aboutsummaryrefslogtreecommitdiffstats
path: root/community/docker
diff options
context:
space:
mode:
authorGennady Feldman <gena01@gmail.com>2017-03-27 23:46:46 -0400
committerNatanael Copa <ncopa@alpinelinux.org>2017-03-30 12:51:09 +0000
commitcc01cdeb2841a0a9ae5e942515cca8735c28c893 (patch)
tree58cbfcc403ee4a1220cbbf0b6094546042f90245 /community/docker
parent8fd426c50a952898815cb1a2ff8d22202b79e5fc (diff)
downloadaports-cc01cdeb2841a0a9ae5e942515cca8735c28c893.tar.gz
aports-cc01cdeb2841a0a9ae5e942515cca8735c28c893.tar.bz2
aports-cc01cdeb2841a0a9ae5e942515cca8735c28c893.tar.xz
community/docker: Fixing some packaging issues, adding docker-doc subpackage.
* Needed to tweak tini to return not just version but also commit. This is needed so docker doesn't complain it can't get version. * Added docker-doc man pages (sub package) * Upgrade to v17.03.1-ce
Diffstat (limited to 'community/docker')
-rw-r--r--community/docker/APKBUILD38
-rw-r--r--community/docker/tini-cmake-fixes.patch78
2 files changed, 111 insertions, 5 deletions
diff --git a/community/docker/APKBUILD b/community/docker/APKBUILD
index 58cd992feb..5ae1c4c6bb 100644
--- a/community/docker/APKBUILD
+++ b/community/docker/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Eivind Uggedal <eivind@uggedal.com>
pkgname=docker
-pkgver=17.03.0
+pkgver=17.03.1
_ver=${pkgver/_/-}-ce
pkgrel=0
_gitcommit=v$_ver
@@ -10,7 +10,7 @@ arch="all"
license="ASL 2.0"
depends="iptables"
depends_dev=""
-makedepends="go btrfs-progs-dev bash linux-headers coreutils libseccomp-dev cmake lvm2-dev"
+makedepends="go btrfs-progs-dev bash linux-headers coreutils libseccomp-dev cmake lvm2-dev glide"
options="!check"
install="$pkgname.pre-install"
@@ -33,6 +33,7 @@ subpackages="
$pkgname-fish-completion:fishcomp:noarch
$pkgname-zsh-completion:zshcomp:noarch
$pkgname-vim:vim:noarch
+ $pkgname-doc
"
source="
$pkgname-$pkgver.tar.gz::https://github.com/docker/docker/archive/v$_ver.tar.gz
@@ -41,6 +42,7 @@ source="
libnetwork-$_libnetwork_ver.tar.gz::https://github.com/docker/libnetwork/archive/$_libnetwork_ver.tar.gz
tini-$_tini_ver.tar.gz::https://github.com/krallin/tini/archive/$_tini_ver.tar.gz
docker-openrc-fixes.patch
+ tini-cmake-fixes.patch
"
builddir="$srcdir"/$pkgname-$_ver
@@ -69,6 +71,7 @@ _apply_patches() {
prepare() {
_apply_patches "$builddir" docker || return 1
_apply_patches "$_runc_builddir" runc || return 1
+ _apply_patches "$_tini_builddir" tini || return 1
}
build() {
@@ -104,13 +107,33 @@ build() {
# tini
msg "building tini"
cd "$_tini_builddir" || return 1
- cmake . || return 1
+ cmake -DVERSION_GIT=$_tini_ver || return 1
make tini-static|| return 1
# docker
msg "building docker"
cd "$builddir"
./hack/make.sh dynbinary
+
+ # docker man
+ msg "building docker man pages"
+ cd "$builddir/man"
+ mkdir -p genman
+ cp glide.lock glide.yaml genman/
+ cd genman
+ # need empty src folder for glide
+ mkdir src
+ GOPATH=`pwd` glide install
+ rmdir src && mv vendor src
+ mkdir -p src/github.com/docker
+ ln -s `pwd`/../../ src/github.com/docker/docker
+ cd src/github.com/docker/docker
+ GOPATH="$builddir/man/genman" go build -o man/gen-manpages ./man
+
+ msg "Generating man pages"
+ cd "$builddir/man"
+ mkdir -p man1
+ ./gen-manpages ./man1
}
package() {
@@ -145,6 +168,10 @@ package() {
"$pkgdir"/etc/init.d/docker || return 1
install -Dm644 contrib/init/openrc/docker.confd \
"$pkgdir"/etc/conf.d/docker || return 1
+
+ mkdir -p "$pkgdir"/usr/share/man/man1
+ install -Dm644 man/man1/* \
+ "$pkgdir"/usr/share/man/man1 || return 1
}
bashcomp() {
@@ -185,9 +212,10 @@ vim() {
done
}
-sha512sums="042d94143f8867e8165e4c306188fc8e5801faaa9901716a509c5a9f380e460ab54b4c48ee223909c0bf9360ec023b765e6258acbe1f03e6513a8fc364663970 docker-17.03.0.tar.gz
+sha512sums="51e2a9d6ca529ac67d63794b9fd257f962278019ae1a36a39ff635c742d6ca16286cc164470333ff6cd88d709ecf2cb90343b2dd94bb3939747550f74fb442d5 docker-17.03.1.tar.gz
1ea7ed8a98b2cbc508933608d7dc16b26c1507021200691e66fa61d4c567a5437aafae8b9710bf29ba94a8c4853de7f9e38e9e09de9a358a68e0e431771a13cc runc-a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70.tar.gz
511732a70d3bea6efe85f2e41fe5d23a2e6d2bc85d961a5f757064d4a5062677e9c839ec94a7650c8dd37a1c0da32bcb74171dad257ba23e4bb1c7a045433d24 containerd-977c511eda0925a723debdc94d09459af49d082a.tar.gz
754cf6489968f3a83392c52b9445f71e8d5faca96e23ffc3ee2c6e8644bf065b64c7497395cf8fac9cc083ce9c7668260e319d01a8f10613e67db2d8254f6b06 libnetwork-0f534354b813003a754606689722fe253101bc4e.tar.gz
b6c1454f734662adf2fdedcb75cb7cdc82f4cf5b4c41fadf6891a670fa26d49b789034f4af8bf920b9e1ff1c3536123637ade9471f4ae2c1ef6c534e839b9f27 tini-949e6facb77383876aeff8a6944dde66b3089574.tar.gz
-8296b1bc88ef3dec4f9038c4e0bf83120ac5870860f6662eac9f9f8850ea8b7596bcd2b47932551e804ae8b6f6f26ad3bc4ce6d49600cc8eaf0a3016c15a9ccf docker-openrc-fixes.patch"
+8296b1bc88ef3dec4f9038c4e0bf83120ac5870860f6662eac9f9f8850ea8b7596bcd2b47932551e804ae8b6f6f26ad3bc4ce6d49600cc8eaf0a3016c15a9ccf docker-openrc-fixes.patch
+29a343848d0aa14864c6bfc87c2a6fd408f546f0114e12f7035fb4678ee769fe728872a5d283803177990a61d7e02c4916017d5e45380ad3b0a2dffa3e746857 tini-cmake-fixes.patch"
diff --git a/community/docker/tini-cmake-fixes.patch b/community/docker/tini-cmake-fixes.patch
new file mode 100644
index 0000000000..dfd2a749bd
--- /dev/null
+++ b/community/docker/tini-cmake-fixes.patch
@@ -0,0 +1,78 @@
+From a8f82ea60cde15cbbd0ebcf729062de6bad9859c Mon Sep 17 00:00:00 2001
+From: Thomas Orozco <thomas@orozco.fr>
+Date: Tue, 28 Mar 2017 21:59:07 +0200
+Subject: [PATCH] Allow setting VERSION_GIT
+
+Fixes: #79
+---
+ CMakeLists.txt | 48 +++++++++++++++++++++++++++++-------------------
+ 1 file changed, 29 insertions(+), 19 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8936f18..06c180c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,34 +6,44 @@ set (tini_VERSION_MAJOR 0)
+ set (tini_VERSION_MINOR 14)
+ set (tini_VERSION_PATCH 0)
+
++set (GIT_PREFIX " - git.")
++
+ # Build options
+ option(MINIMAL "Disable argument parsing and verbose output" OFF)
+
++# Set VERSION_GIT to INTERNAL so it does not persist across runs of CMake, just
++# like the auto-discovery would.
++set(VERSION_GIT "" CACHE INTERNAL "Override the git revision")
++
+ if(MINIMAL)
+ add_definitions(-DTINI_MINIMAL=1)
+ endif()
+
+ # Extract git version and dirty-ness
+-execute_process (
+- COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" log -n 1 --date=local --pretty=format:%h
+- WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
+- RESULT_VARIABLE git_version_check_ret
+- OUTPUT_VARIABLE tini_VERSION_GIT
+-)
+-
+-execute_process(
+- COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" status --porcelain --untracked-files=no
+- WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
+- OUTPUT_VARIABLE git_dirty_check_out
+-)
+-
+-if("${git_version_check_ret}" EQUAL 0)
+- set(tini_VERSION_GIT " - git.${tini_VERSION_GIT}")
+- if(NOT "${git_dirty_check_out}" STREQUAL "")
+- set(tini_VERSION_GIT "${tini_VERSION_GIT}-dirty")
+- endif()
++if(VERSION_GIT)
++ set(tini_VERSION_GIT "${GIT_PREFIX}${VERSION_GIT}")
+ else()
+- set(tini_VERSION_GIT "")
++ execute_process (
++ COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" log -n 1 --date=local --pretty=format:%h
++ WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
++ RESULT_VARIABLE git_version_check_ret
++ OUTPUT_VARIABLE tini_VERSION_GIT
++ )
++
++ execute_process(
++ COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" status --porcelain --untracked-files=no
++ WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
++ OUTPUT_VARIABLE git_dirty_check_out
++ )
++
++ if("${git_version_check_ret}" EQUAL 0)
++ set(tini_VERSION_GIT "${GIT_PREFIX}${tini_VERSION_GIT}")
++ if(NOT "${git_dirty_check_out}" STREQUAL "")
++ set(tini_VERSION_GIT "${tini_VERSION_GIT}-dirty")
++ endif()
++ else()
++ set(tini_VERSION_GIT "")
++ endif()
+ endif()
+
+ # Flags