mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Run reprepro from release, incrementally (it needs S3 credentials). Add virtual package.
This commit is contained in:
parent
9694fb85d7
commit
5b0eaef602
2 changed files with 51 additions and 19 deletions
51
make.sh
51
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 <<EOF
|
||||
Codename: docker
|
||||
Components: main
|
||||
Architectures: amd64
|
||||
EOF
|
||||
|
||||
# Add the DEB package to the APT repo
|
||||
DEBFILE=bundles/$VERSION/ubuntu/lxc-docker*.deb
|
||||
reprepro -b $APTDIR includedeb docker $DEBFILE
|
||||
}
|
||||
|
||||
|
||||
|
|
19
release.sh
19
release.sh
|
@ -44,7 +44,7 @@ BUCKET=$AWS_S3_BUCKET
|
|||
|
||||
setup_s3() {
|
||||
# Try creating the bucket. Ignore errors (it might already exist).
|
||||
s3cmd --acl-public mb $BUCKET 2>/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 <<EOF
|
||||
Codename: docker
|
||||
Components: main
|
||||
Architectures: amd64
|
||||
EOF
|
||||
|
||||
# Add the DEB package to the APT repo
|
||||
DEBFILE=bundles/$VERSION/ubuntu/lxc-docker*.deb
|
||||
reprepro -b $APTDIR includedeb docker $DEBFILE
|
||||
|
||||
# Upload
|
||||
s3cmd --acl-public --verbose --follow-symlinks sync bundles/$VERSION/ubuntu/apt/ s3://$BUCKET/ubuntu/
|
||||
cat <<EOF | write_to_s3 s3://$BUCKET/ubuntu/info
|
||||
# Add the following to /etc/apt/sources.list
|
||||
deb $(s3_url $BUCKET)/ubuntu docker main
|
||||
|
|
Loading…
Reference in a new issue