Accepting request 311406 from home:jordimassaguerpla:branches:Virtualization:containers

Remove unneeded dependencies:
 * go-go-md2man: this is required to build the man pages. 
 * systemd-devel: this was a build time dependency required to have some directories inside of the build root

Exclude the whole "/usr/src/docker/bundles" directory from the final package.

OBS-URL: https://build.opensuse.org/request/show/311406
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=11
This commit is contained in:
Flavio Castelli 2015-06-10 08:16:24 +00:00 committed by Git OBS Bridge
parent 9017ee55c3
commit 84f28f19ef
5 changed files with 56 additions and 2 deletions

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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 <<EOF
export AUTO_GOPATH=1
export DOCKER_BUILDTAGS="exclude_graphdriver_aufs apparmor selinux"
export DOCKER_GITCOMMIT=%{git_version}
EOF
) > 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

View File

@ -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)
}