diff --git a/0002-Stripped-dockerinit-binary.patch b/0002-Stripped-dockerinit-binary.patch index 89e472c..aefec65 100644 --- a/0002-Stripped-dockerinit-binary.patch +++ b/0002-Stripped-dockerinit-binary.patch @@ -19,7 +19,7 @@ Index: docker/hack/make/.dockerinit =================================================================== --- docker.orig/hack/make/.dockerinit +++ docker/hack/make/.dockerinit -@@ -25,5 +25,7 @@ else +@@ -29,5 +29,7 @@ exit 1 fi diff --git a/docker-rpmlintrc b/docker-rpmlintrc index 00c5581..3d6adae 100644 --- a/docker-rpmlintrc +++ b/docker-rpmlintrc @@ -4,3 +4,11 @@ addFilter ("^docker.x86_64: W: statically-linked-binary /usr/lib/docker/dockerin addFilter ("^docker.x86_64: W: unstripped-binary-or-object /usr/lib/docker/dockerinit") addFilter ("^docker.x86_64: W: no-manual-page-for-binary docker") addFilter ("^docker.x86_64: W: no-manual-page-for-binary nsinit") +addFilter ("test.noarch.*: E: devel-file-in-non-devel-package") +addFilter ("test.noarch.*: W: pem-certificate") +addFilter ("test.noarch.*: W: non-executable-script") +addFilter ("test.noarch.*: W: hidden-file-or-dir") +addFilter ("test.noarch.*: W: files-duplicate") +addFilter ("test.noarch.*: W: script-without-shebang /usr/src/docker/docs/README.md") +addFilter ("test.noarch.*: W: sourced-script-with-shebang /etc/bash_completion.d/docker bash") +addFilter ("test.noarch.*: W: suse-filelist-forbidden-fhs23 /usr/src/docker") diff --git a/docker.changes b/docker.changes index c1cd492..7c302cf 100644 --- a/docker.changes +++ b/docker.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 9 16:35:46 UTC 2015 - jmassaguerpla@suse.com + +- Add test subpackage and fix line numbers in patches + ------------------------------------------------------------------- Fri Jun 5 15:29:45 UTC 2015 - fcastelli@suse.com diff --git a/docker.spec b/docker.spec index ec35ab6..2986080 100644 --- a/docker.spec +++ b/docker.spec @@ -109,6 +109,27 @@ BuildArch: noarch %description zsh-completion Zsh command line completion support for %{name}. +%package test +Summary: Test package for docker +Group: System/Management +Requires: device-mapper-devel >= 1.2.68 +Requires: glibc-devel-static +%ifarch ppc ppc64 s390x ppc64p7 ppc64le +Requires: gcc5-go >= 5.0 +%else +Requires: go >= 1.3 +%endif +Requires: apparmor-parser +Requires: bash-completion +Requires: libapparmor-devel +Requires: libbtrfs-devel >= 3.8 +Requires: procps +Requires: sqlite3-devel +BuildArch: noarch + +%description test +Test package for docker. It contains the source code and the tests. + %prep %setup -q -n docker %patch0 -p1 @@ -126,11 +147,23 @@ ln -s /usr/bin/go-5 /tmp/dirty-hack/go export PATH=/tmp/dirty-hack:$PATH %endif +(cat < docker_build_env +. ./docker_build_env ./hack/make.sh dynbinary docs/man/md2man-all.sh +# remove git files +find . -name ".gitignore" | xargs rm +# remove other than systemd +# otherwise the resulting package will have extra requires +rm -rf contrib/init/openrc +rm -rf contrib/init/sysvinit-debian +rm -rf contrib/init/sysvinit-redhat +rm -rf contrib/init/upstart %install install -d %{buildroot}%{go_contribdir} @@ -144,6 +177,9 @@ install -Dd -m 0755 \ install -D -m0644 contrib/completion/bash/docker "%{buildroot}/etc/bash_completion.d/%{name}" install -D -m0644 contrib/completion/zsh/_docker "%{buildroot}/etc/zsh_completion.d/%{name}" +# copy all for the test package +install -d %{buildroot}/usr/src/docker/ +cp -av . %{buildroot}/usr/src/docker/ # # systemd service @@ -210,4 +246,9 @@ groupadd -r docker 2>/dev/null || : %defattr(-,root,root) %config %{_sysconfdir}/zsh_completion.d/%{name} +%files test +%defattr(-,root,root) +/usr/src/docker/ +%exclude /usr/src/docker/bundles/ + %changelog diff --git a/ignore-dockerinit-checksum.patch b/ignore-dockerinit-checksum.patch index e9d7d1b..2f33404 100644 --- a/ignore-dockerinit-checksum.patch +++ b/ignore-dockerinit-checksum.patch @@ -2,7 +2,7 @@ Index: docker/utils/utils.go =================================================================== --- docker.orig/utils/utils.go +++ docker/utils/utils.go -@@ -111,7 +111,7 @@ func isValidDockerInitPath(target string +@@ -110,7 +110,7 @@ } return os.SameFile(targetFileInfo, selfPathFileInfo) }