From 5b0eaef60264a8a5461d85272e00c6721a19d868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Mon, 12 Aug 2013 20:16:55 -0700 Subject: [PATCH] Run reprepro from release, incrementally (it needs S3 credentials). Add virtual package. --- make.sh | 51 ++++++++++++++++++++++++++++++++++----------------- release.sh | 19 +++++++++++++++++-- 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/make.sh b/make.sh index fd354efe1e..05796b5d14 100755 --- a/make.sh +++ b/make.sh @@ -35,6 +35,16 @@ VERSION=$(cat ./VERSION) GIT_COMMIT=$(git rev-parse --short HEAD) GIT_CHANGES=$(test -n "$(git status --porcelain)" && echo "+CHANGES" || true) +PACKAGE_URL="http://www.docker.io/" +PACKAGE_MAINTAINER="docker@dotcloud.com" +PACKAGE_DESCRIPTION="lxc-docker is a Linux container runtime +Docker complements LXC with a high-level API which operates at the process +level. It runs unix processes with strong guarantees of isolation and +repeatability across servers. +Docker is a great building block for automating distributed systems: +large-scale web deployments, database clusters, continuous deployment systems, +private PaaS, service-oriented architectures, etc." + # Each "bundle" is a different type of build artefact: static binary, Ubuntu # package, etc. @@ -66,7 +76,7 @@ bundle_test() { bundle_ubuntu() { mkdir -p bundles/$VERSION/ubuntu - DIR=$(mktemp -d) + DIR=$(pwd)/bundles/$VERSION/ubuntu/build # Generate an upstart config file (ubuntu-specific) mkdir -p $DIR/etc/init @@ -87,23 +97,30 @@ EOF ( cd bundles/$VERSION/ubuntu - fpm -s dir -t deb -n lxc-docker -v $VERSION -a all --prefix / -C $DIR . + fpm -s dir -C $DIR \ + --name lxc-docker-$VERSION --version $VERSION \ + --architecture $(dpkg-architecture -qDEB_HOST_ARCH) \ + --prefix / \ + --depends lxc --depends aufs-tools \ + --description "$PACKAGE_DESCRIPTION" \ + --maintainer "$PACKAGE_MAINTAINER" \ + --conflicts lxc-docker-virtual-package \ + --provides lxc-docker-virtual-package \ + --replaces lxc-docker-virtual-package \ + --url "$PACKAGE_URL" \ + --vendor "$PACKAGE_VENDOR" \ + -t deb . + mkdir empty + fpm -s dir -C empty \ + --name lxc-docker --version $VERSION \ + --architecture all \ + --depends lxc-docker-$VERSION \ + --description "$PACKAGE_DESCRIPTION" \ + --maintainer "$PACKAGE_MAINTAINER" \ + --url "$PACKAGE_URL" \ + --vendor "$PACKAGE_VENDOR" \ + -t deb . ) - rm -fr $DIR - - - # Setup the APT repo - APTDIR=bundles/$VERSION/ubuntu/apt - mkdir -p $APTDIR/conf - cat > $APTDIR/conf/distributions </dev/null || true + s3cmd --acl-public mb s3://$BUCKET 2>/dev/null || true # Check access to the bucket. # s3cmd has no useful exit status, so we cannot check that. # Instead, we check if it outputs anything on standard output. @@ -69,7 +69,22 @@ s3_url() { # 1. A full APT repository is published at $BUCKET/ubuntu/ # 2. Instructions for using the APT repository are uploaded at $BUCKET/ubuntu/info release_ubuntu() { - s3cmd --acl-public --verbose --delete-removed --follow-symlinks sync bundles/$VERSION/ubuntu/apt/ s3://$BUCKET/ubuntu/ + # Setup the APT repo + APTDIR=bundles/$VERSION/ubuntu/apt + mkdir -p $APTDIR/conf $APTDIR/db + s3cmd sync s3://$BUCKET/ubuntu/db/ $APTDIR/db/ || true + cat > $APTDIR/conf/distributions <