Merged branch packaging

This commit is contained in:
Solomon Hykes 2013-03-15 14:20:02 -07:00
commit ad29305630
5 changed files with 53 additions and 20 deletions

View File

@ -1,4 +1,4 @@
PKG_NAME=docker-dev PKG_NAME=dotcloud-docker
PKG_ARCH=amd64 PKG_ARCH=amd64
PKG_VERSION=1 PKG_VERSION=1
ROOT_PATH:=$(PWD) ROOT_PATH:=$(PWD)
@ -6,11 +6,13 @@ BUILD_PATH=build # Do not change, decided by dpkg-buildpackage
BUILD_SRC=build_src BUILD_SRC=build_src
GITHUB_PATH=src/github.com/dotcloud/docker GITHUB_PATH=src/github.com/dotcloud/docker
INSDIR=usr/bin INSDIR=usr/bin
SOURCE_PACKAGE=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz SOURCE_PACKAGE=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
DEB_PACKAGE=$(PKG_NAME)_$(PKG_VERSION)_$(PKG_ARCH).deb DEB_PACKAGE=$(PKG_NAME)_$(PKG_VERSION)_$(PKG_ARCH).deb
EXTRA_GO_PKG=fs auth
TMPDIR=$(shell mktemp -d -t XXXXXX) TMPDIR=$(shell mktemp -d -t XXXXXX)
# Build a debian source package # Build a debian source package
all: build_in_deb all: build_in_deb
@ -25,7 +27,7 @@ install:
mkdir -p $(DESTDIR)/$(INSDIR) mkdir -p $(DESTDIR)/$(INSDIR)
mkdir -p $(DESTDIR)/etc/init mkdir -p $(DESTDIR)/etc/init
install -m 0755 bin/docker $(DESTDIR)/$(INSDIR) install -m 0755 bin/docker $(DESTDIR)/$(INSDIR)
install -o root -m 0755 etc/docker-dev.upstart $(DESTDIR)/etc/init/docker-dev.conf install -o root -m 0755 etc/docker.upstart $(DESTDIR)/etc/init/docker.conf
$(BUILD_SRC): cleanup $(BUILD_SRC): cleanup
# Copy ourselves into $BUILD_SRC to comply with unusual golang constraints # Copy ourselves into $BUILD_SRC to comply with unusual golang constraints
@ -44,7 +46,7 @@ $(SOURCE_PACKAGE): $(BUILD_SRC)
# Build deb package fetching go dependencies and cleaning up git repositories # Build deb package fetching go dependencies and cleaning up git repositories
deb: $(DEB_PACKAGE) deb: $(DEB_PACKAGE)
$(DEB_PACKAGE): $(SOURCE_PACKAGE) $(DEB_PACKAGE): $(SOURCE_PACKAGE)
# dpkg-buildpackage looks for source package tarball in ../ # dpkg-buildpackage looks for source package tarball in ../
cd $(BUILD_SRC); dpkg-buildpackage cd $(BUILD_SRC); dpkg-buildpackage
@ -52,5 +54,31 @@ $(DEB_PACKAGE): $(SOURCE_PACKAGE)
debsrc: $(SOURCE_PACKAGE) debsrc: $(SOURCE_PACKAGE)
# Build local sources
#$(PKG_NAME): build_local
build_local:
-@mkdir -p bin
cd docker && go build -o ../bin/docker
gotest:
@echo "\033[36m[Testing]\033[00m docker..."
@sudo -E GOPATH=$(ROOT_PATH)/$(BUILD_SRC) go test -v && \
echo -n "\033[32m[OK]\033[00m" || \
echo -n "\033[31m[FAIL]\033[00m"; \
echo " docker"
@echo "Testing extra repos {$(EXTRA_GO_PKG)}"
@for package in $(EXTRA_GO_PKG); do \
echo "\033[36m[Testing]\033[00m docker/$$package..." && \
cd $$package ; \
sudo -E GOPATH=$(ROOT_PATH)/$(BUILD_SRC) go test -v && \
echo -n "\033[32m[OK]\033[00m" || \
echo -n "\033[31m[FAIL]\033[00m" ; \
echo " docker/$$package" ; \
cd .. ;\
done
@sudo rm -rf /tmp/docker-*
cleanup: cleanup:
rm -rf $(BUILD_PATH) debian/$(PKG_NAME)* debian/files $(BUILD_SRC) checkout.tgz rm -rf $(BUILD_PATH) debian/$(PKG_NAME)* debian/files $(BUILD_SRC) checkout.tgz

View File

@ -1,11 +1,5 @@
docker-dev (1) precise; urgency=low dotcloud-docker (1) precise; urgency=low
* Update release * Initial release
-- dotCloud <noise+ppa@dotcloud.com> Mon, 13 Mar 2013 16:44:21 -0700 -- dotCloud <ops@dotcloud.com> Mon, 14 Mar 2013 04:43:21 -0700
docker-dev (0.1-1) precise; urgency=low
* Initial release (Closes: #30)
-- dotCloud <noise+ppa@dotcloud.com> Mon, 11 Mar 2013 21:05:56 -0700

View File

@ -1,18 +1,18 @@
Source: docker-dev Source: dotcloud-docker
Section: misc Section: misc
Priority: extra Priority: extra
Homepage: https://github.com/dotcloud/docker Homepage: https://github.com/dotcloud/docker
Maintainer: Daniel Mizyrycki <daniel@dotcloud.com> Maintainer: Daniel Mizyrycki <daniel@dotcloud.com>
Build-Depends: debhelper (>= 8.0.0), git, golang, libsqlite3-dev Build-Depends: debhelper (>= 8.0.0), pkg-config, git, golang, libsqlite3-dev
Vcs-Git: https://github.com/dotcloud/docker.git Vcs-Git: https://github.com/dotcloud/docker.git
Standards-Version: 3.9.2 Standards-Version: 3.9.2
Package: docker-dev Package: dotcloud-docker
Architecture: amd64 Architecture: amd64
Provides: docker-dev Provides: dotcloud-docker
Depends: lxc, wget, bsdtar, curl, sqlite3 Depends: lxc, wget, bsdtar, curl, sqlite3
Description: Docker Conflicts: docker
Docker is a process manager with superpowers. Description: A process manager with superpowers
It encapsulates heterogeneous payloads in Standard Containers, and runs It encapsulates heterogeneous payloads in Standard Containers, and runs
them on any server with strong guarantees of isolation and repeatability. them on any server with strong guarantees of isolation and repeatability.
Is is a great building block for automating distributed systems: Is is a great building block for automating distributed systems:

View File

@ -1,6 +1,7 @@
Format: http://dep.debian.net/deps/dep5 Format: http://dep.debian.net/deps/dep5
Upstream-Name: docker-dev Upstream-Name: dotcloud-docker
Source: https://github.com/dotcloud/docker Source: https://github.com/dotcloud/docker
Files: * Files: *
Copyright: 2012 DotCloud Inc (opensource@dotcloud.com) Copyright: 2012 DotCloud Inc (opensource@dotcloud.com)
License: Apache License Version 2.0 License: Apache License Version 2.0

10
deb/etc/docker.upstart Normal file
View File

@ -0,0 +1,10 @@
description "Run docker"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
respawn
script
test -f /etc/default/locale && . /etc/default/locale || true
LANG=$LANG LC_ALL=$LANG /usr/bin/docker -d
end script