forked from pool/docker
This commit is contained in:
committed by
Git OBS Bridge
parent
5fbd718e69
commit
fed8ecda73
60
docker.spec
60
docker.spec
@@ -17,20 +17,6 @@
|
||||
# nodebuginfo
|
||||
|
||||
|
||||
# Check if go_arches is defined in the project configuration
|
||||
# Otherwise, define it here
|
||||
# In order to define it in the project configuration, see
|
||||
#
|
||||
# https://en.opensuse.org/openSUSE:Build%20Service%20prjconf#Macros
|
||||
#
|
||||
# The Macros tag is the one that defines the go_arches variable to be used
|
||||
# in the spec file.
|
||||
# The "define" one is to help the specfile parser of the buildservice
|
||||
# to see what packages are being built. You also want to define it here
|
||||
# for keeping things consistent.
|
||||
|
||||
%{!?go_arches: %global go_arches %ix86 x86_64 aarch64 ppc64le}
|
||||
|
||||
%global docker_store %{_localstatedir}/lib/docker
|
||||
%global docker_migration_testfile %{docker_store}/.suse-image-migration-v1to2-complete
|
||||
%global docker_migration_warnfile %{docker_store}/docker-update-message.txt
|
||||
@@ -60,10 +46,6 @@ Source8: docker-audit.rules
|
||||
Source9: docker-update-message.txt
|
||||
Source10: tests.sh
|
||||
Source11: docker_service_helper.sh
|
||||
# Fixes for architecture-specific issues (gcc-go).
|
||||
Patch100: gcc-go-patches.patch
|
||||
Patch102: netlink_netns_powerpc.patch
|
||||
Patch103: boltdb_bolt_add_brokenUnaligned.patch
|
||||
# SUSE-FEATURE: Adds the /run/secrets mountpoint inside all Docker containers
|
||||
# which is not snapshotted when images are committed. Note that if you modify
|
||||
# this patch, please also modify the patch in the suse-secrets-v<version>
|
||||
@@ -124,12 +106,10 @@ Recommends: lvm2 >= 2.2.89
|
||||
Conflicts: lxc < 1.0
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExcludeArch: %ix86 s390 ppc
|
||||
%ifarch %{go_arches}
|
||||
BuildRequires: go >= 1.5
|
||||
# Make sure we build with go 1.7
|
||||
BuildRequires: go < 1.8
|
||||
BuildRequires: go >= 1.7
|
||||
BuildRequires: go-go-md2man
|
||||
%else
|
||||
BuildRequires: gcc6-go >= 6.1
|
||||
%endif
|
||||
|
||||
%description
|
||||
Docker complements LXC with a high-level API which operates at the process
|
||||
@@ -169,15 +149,12 @@ Requires: apparmor-parser
|
||||
Requires: bash-completion
|
||||
Requires: device-mapper-devel >= 1.2.68
|
||||
Requires: glibc-devel-static
|
||||
Requires: go < 1.8
|
||||
Requires: go >= 1.7
|
||||
Requires: libapparmor-devel
|
||||
Requires: libbtrfs-devel >= 3.8
|
||||
Requires: procps
|
||||
Requires: sqlite3-devel
|
||||
%ifarch %{go_arches}
|
||||
Requires: go >= 1.4
|
||||
%else
|
||||
Requires: gcc6-go >= 6.1
|
||||
%endif
|
||||
|
||||
%description test
|
||||
Test package for docker. It contains the source code and the tests.
|
||||
@@ -190,11 +167,6 @@ Test package for docker. It contains the source code and the tests.
|
||||
%patch200 -p1
|
||||
%patch201 -p1
|
||||
%endif
|
||||
%ifnarch %{go_arches}
|
||||
%patch100 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
%endif
|
||||
%patch300 -p1
|
||||
%patch301 -p1
|
||||
%patch302 -p1
|
||||
@@ -202,13 +174,6 @@ cp %{SOURCE7} .
|
||||
cp %{SOURCE10} .
|
||||
|
||||
%build
|
||||
%ifnarch %{go_arches}
|
||||
tmphack=/tmp/dirty-hack
|
||||
[ -e $tmphack ] && rm -rf $tmphack
|
||||
mkdir $tmphack
|
||||
ln -s %{_bindir}/go-6 $tmphack/go
|
||||
export PATH=$tmphack:$PATH
|
||||
%endif
|
||||
|
||||
BUILDTAGS="exclude_graphdriver_aufs apparmor selinux pkcs11"
|
||||
%if 0%{?with_libseccomp}
|
||||
@@ -230,12 +195,8 @@ EOF
|
||||
) > docker_build_env
|
||||
. ./docker_build_env
|
||||
|
||||
%ifarch %{go_arches}
|
||||
./hack/make.sh dynbinary
|
||||
man/md2man-all.sh
|
||||
%else
|
||||
./hack/make.sh dyngccgo
|
||||
%endif
|
||||
|
||||
# build the tests binary
|
||||
GOPATH=$(pwd)/vendor:$(pwd)/.gopath/ go test \
|
||||
@@ -246,7 +207,6 @@ GOPATH=$(pwd)/vendor:$(pwd)/.gopath/ go test \
|
||||
# otherwise the resulting package will have extra requires
|
||||
rm -rf hack/make/.build-deb
|
||||
|
||||
%ifarch %go_arches
|
||||
%check
|
||||
. ./docker_build_env
|
||||
|
||||
@@ -304,18 +264,12 @@ PKG_LIST=$(go list -e \
|
||||
%endif
|
||||
|
||||
go test -cover -ldflags -w -tags "$DOCKER_BUILDTAGS" -a -test.timeout=10m $PKG_LIST
|
||||
%endif
|
||||
|
||||
%install
|
||||
install -d %{buildroot}%{go_contribdir}
|
||||
install -d %{buildroot}%{_bindir}
|
||||
%ifarch %{go_arches}
|
||||
install -D -m755 bundles/latest/dynbinary-client/%{name} %{buildroot}/%{_bindir}/%{name}
|
||||
install -D -m755 bundles/latest/dynbinary-daemon/%{name}d %{buildroot}/%{_bindir}/%{name}d
|
||||
%else
|
||||
install -D -m755 bundles/latest/dyngccgo/%{name} %{buildroot}/%{_bindir}/%{name}
|
||||
install -D -m755 bundles/latest/dyngccgo/%{name}d %{buildroot}/%{_bindir}/%{name}d
|
||||
%endif
|
||||
install -d %{buildroot}/%{_prefix}/lib/docker
|
||||
install -Dd -m 0755 \
|
||||
%{buildroot}%{_sysconfdir}/init.d \
|
||||
@@ -356,7 +310,6 @@ install -D -m 0640 %{SOURCE8} %{buildroot}%{_sysconfdir}/audit/rules.d/%{name}.r
|
||||
# sysconfig file
|
||||
install -D -m 644 %{SOURCE4} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.docker
|
||||
|
||||
%ifarch %{go_arches}
|
||||
# install manpages
|
||||
install -d %{buildroot}%{_mandir}/man1
|
||||
install -p -m 644 man/man1/*.1 %{buildroot}%{_mandir}/man1
|
||||
@@ -364,7 +317,6 @@ install -d %{buildroot}%{_mandir}/man5
|
||||
install -p -m 644 man/man5/Dockerfile.5 %{buildroot}%{_mandir}/man5
|
||||
install -d %{buildroot}%{_mandir}/man8
|
||||
install -p -m 644 man/man8/*.8 %{buildroot}%{_mandir}/man8
|
||||
%endif
|
||||
|
||||
install -D -m 0644 %{SOURCE9} %{buildroot}%{docker_migration_warnfile}
|
||||
|
||||
@@ -434,12 +386,10 @@ fi
|
||||
%{_udevrulesdir}/80-%{name}.rules
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.docker
|
||||
%{_localstatedir}/lib/docker/
|
||||
%ifarch %{go_arches}
|
||||
%{_mandir}/man1/docker-*.1%{ext_man}
|
||||
%{_mandir}/man1/docker.1%{ext_man}
|
||||
%{_mandir}/man5/Dockerfile.5%{ext_man}
|
||||
%{_mandir}/man8/dockerd.8%{ext_man}
|
||||
%endif
|
||||
|
||||
%files bash-completion
|
||||
%defattr(-,root,root)
|
||||
|
Reference in New Issue
Block a user