2024-01-05 21:52:10 +01:00
|
|
|
%define groupid 65440
|
|
|
|
%define userid 65440
|
2024-01-05 21:52:10 +01:00
|
|
|
%define libnetwork_tag master@3eb39382bfa6a3c42f83674ab080ae13b0e34e5d
|
|
|
|
%define tini_tag v0.18.0@fec3683b971d9c3ef73f284f176672c44b448662
|
2024-01-05 21:52:10 +01:00
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
Name: docker
|
2024-01-05 21:52:10 +01:00
|
|
|
Version: 19.03.15
|
2024-01-05 21:52:10 +01:00
|
|
|
Release: 1mamba
|
2024-01-05 21:52:10 +01:00
|
|
|
Summary: An open-source application container engine
|
2024-01-05 21:52:10 +01:00
|
|
|
Group: System/Servers
|
2024-01-05 21:52:10 +01:00
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
URL: http://www.docker.com/
|
2024-01-05 21:52:10 +01:00
|
|
|
Source: https://github.com/docker/docker-ce.git/v%{version}/docker-ce-%{version}.tar.bz2
|
|
|
|
#Source1: https://github.com/opencontainers/runc.git/%{runc_tag}/runc-%{version}.tar.bz2
|
|
|
|
#Source2: https://github.com/containerd/containerd.git/%{containerd_tag}/containerd-%{version}.tar.bz2
|
2024-01-05 21:52:10 +01:00
|
|
|
Source3: https://github.com/docker/libnetwork.git/%{libnetwork_tag}/libnetwork-%{version}.tar.bz2
|
|
|
|
Source4: https://github.com/krallin/tini.git/%{tini_tag}/tini-%{version}.tar.bz2
|
2024-01-05 21:52:10 +01:00
|
|
|
Source5: https://github.com/spf13/cobra.git/master/cobra-%{version}.tar.bz2
|
2024-01-05 21:52:10 +01:00
|
|
|
Patch0: docker-1.9.1-build-missing-flags.patch
|
|
|
|
License: Apache License 2.0
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: glibc-devel
|
2024-01-05 21:52:10 +01:00
|
|
|
BuildRequires: ldconfig
|
2024-01-05 21:52:10 +01:00
|
|
|
BuildRequires: libdevmapper-devel
|
2024-01-05 21:52:10 +01:00
|
|
|
BuildRequires: libseccomp-devel
|
2024-01-05 21:52:10 +01:00
|
|
|
BuildRequires: libsystemd-devel
|
|
|
|
## AUTOBUILDREQ-END
|
2024-01-05 21:52:10 +01:00
|
|
|
BuildRequires: libgo-devel >= 7.3.0-1mamba
|
2024-01-05 21:52:10 +01:00
|
|
|
BuildRequires: go-md2man
|
2024-01-05 21:52:10 +01:00
|
|
|
BuildRequires: gcc-go
|
2024-01-05 21:52:10 +01:00
|
|
|
%systemd_requires
|
2024-01-05 21:52:10 +01:00
|
|
|
Requires: containerd
|
|
|
|
Requires: runc
|
2024-01-05 21:52:10 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
|
|
%description
|
|
|
|
An open-source application container engine.
|
|
|
|
|
|
|
|
%debug_package
|
|
|
|
|
|
|
|
%prep
|
2024-01-05 21:52:10 +01:00
|
|
|
%setup -q -n docker-ce-%{version} -a3 -a4 -a5
|
2024-01-05 21:52:10 +01:00
|
|
|
#%patch0 -p1
|
|
|
|
mv libnetwork-%{version} libnetwork
|
|
|
|
mv tini-%{version} tini
|
2024-01-05 21:52:10 +01:00
|
|
|
mv cobra-%{version} cobra
|
2024-01-05 21:52:10 +01:00
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
sed -i 's,/var/run,/run,' components/engine/contrib/init/systemd/docker.socket
|
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
%build
|
2024-01-05 21:52:10 +01:00
|
|
|
# create a fake go path directory and pushd into it
|
|
|
|
# $1 real directory
|
|
|
|
# $2 gopath directory
|
|
|
|
_fake_gopath_pushd() {
|
|
|
|
mkdir -p "$GOPATH/src/${2%/*}"
|
|
|
|
rm -f "$GOPATH/src/$2"
|
|
|
|
ln -rsT "$1" "$GOPATH/src/$2"
|
|
|
|
pushd "$GOPATH/src/$2" >/dev/null
|
|
|
|
}
|
|
|
|
|
|
|
|
_fake_gopath_popd() {
|
|
|
|
popd >/dev/null
|
|
|
|
}
|
|
|
|
|
|
|
|
srcdir=`pwd`
|
|
|
|
### globals
|
|
|
|
export GOPATH="$srcdir"
|
|
|
|
export PATH="$GOPATH/bin:$PATH"
|
|
|
|
|
|
|
|
### cli
|
|
|
|
_fake_gopath_pushd components/cli github.com/docker/cli
|
|
|
|
DISABLE_WARN_OUTSIDE_CONTAINER=1 make VERSION=%{version}-ce dynbinary
|
|
|
|
_fake_gopath_popd
|
|
|
|
|
|
|
|
### daemon
|
|
|
|
_fake_gopath_pushd components/engine github.com/docker/docker
|
|
|
|
DOCKER_GITCOMMIT=v%{version} \
|
2024-01-05 21:52:10 +01:00
|
|
|
DOCKER_BUILDTAGS='seccomp journald apparmor' \
|
2024-01-05 21:52:10 +01:00
|
|
|
VERSION=%{version}-ce \
|
|
|
|
hack/make.sh dynbinary
|
|
|
|
_fake_gopath_popd
|
|
|
|
|
|
|
|
### docker man pages
|
|
|
|
mkdir -p src/github.com/spf13
|
|
|
|
ln -rsfT cobra src/github.com/spf13/cobra
|
|
|
|
# use docker-ce cli version because they mess up with man dir
|
|
|
|
_fake_gopath_pushd components/cli github.com/docker/cli
|
2024-01-05 21:52:10 +01:00
|
|
|
make manpages
|
|
|
|
#2>/dev/null
|
2024-01-05 21:52:10 +01:00
|
|
|
_fake_gopath_popd
|
|
|
|
|
|
|
|
### docker proxy
|
|
|
|
_fake_gopath_pushd libnetwork github.com/docker/libnetwork
|
|
|
|
go build -ldflags='-linkmode=external' github.com/docker/libnetwork/cmd/proxy
|
|
|
|
_fake_gopath_popd
|
|
|
|
|
|
|
|
### docker-init
|
|
|
|
_fake_gopath_pushd tini github.com/krallin/tini
|
|
|
|
cmake .
|
|
|
|
# we must use the static binary because it's started in a foreign os
|
|
|
|
make tini-static
|
|
|
|
_fake_gopath_popd
|
2024-01-05 21:52:10 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
srcdir=`pwd`
|
|
|
|
|
|
|
|
### engine
|
|
|
|
cd $srcdir/components/engine
|
|
|
|
# binary
|
2024-01-05 21:52:10 +01:00
|
|
|
install -Dm755 {bundles/dynbinary-daemon,%{buildroot}%{_bindir}}/dockerd
|
2024-01-05 21:52:10 +01:00
|
|
|
# systemd
|
2024-01-05 21:52:10 +01:00
|
|
|
install -Dm644 'contrib/init/systemd/docker.service' \
|
|
|
|
%{buildroot}%{_unitdir}/docker.service
|
|
|
|
install -Dm644 'contrib/init/systemd/docker.socket' \
|
|
|
|
%{buildroot}%{_unitdir}/docker.socket
|
|
|
|
install -Dm644 'contrib/udev/80-docker.rules' \
|
|
|
|
%{buildroot}%{_udevrulesdir}/80-docker.rules
|
|
|
|
#install -Dm644 "$srcdir/$pkgname.sysusers" \
|
|
|
|
# "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
|
2024-01-05 21:52:10 +01:00
|
|
|
# vim syntax
|
2024-01-05 21:52:10 +01:00
|
|
|
install -Dm644 'contrib/syntax/vim/syntax/dockerfile.vim' \
|
|
|
|
%{buildroot}%{_datadir}/vim/vimfiles/syntax/dockerfile.vim
|
|
|
|
install -Dm644 'contrib/syntax/vim/ftdetect/dockerfile.vim' \
|
|
|
|
%{buildroot}%{_datadir}/vim/vimfiles/ftdetect/dockerfile.vim
|
|
|
|
### cli
|
|
|
|
cd $srcdir/components/cli
|
|
|
|
# binary
|
|
|
|
install -Dm755 build/docker %{buildroot}%{_bindir}/docker
|
|
|
|
# completion
|
|
|
|
install -Dm644 'contrib/completion/bash/docker' \
|
|
|
|
%{buildroot}%{_datadir}/bash-completion/completions/docker
|
|
|
|
install -Dm644 'contrib/completion/zsh/_docker' \
|
|
|
|
%{buildroot}%{_datadir}/zsh/site-functions/_docker
|
|
|
|
install -Dm644 'contrib/completion/fish/docker.fish' \
|
|
|
|
%{buildroot}%{_datadir}/fish/vendor_completions.d/docker.fish
|
2024-01-05 21:52:10 +01:00
|
|
|
# man
|
2024-01-05 21:52:10 +01:00
|
|
|
install -dm755 %{buildroot}%{_mandir}
|
|
|
|
cp -r man/man* %{buildroot}%{_mandir}/
|
2024-01-05 21:52:10 +01:00
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
# symlink containerd/run
|
|
|
|
ln -s containerd %{buildroot}%{_bindir}/docker-containerd
|
|
|
|
ln -s containerd-shim %{buildroot}%{_bindir}/docker-containerd-shim
|
|
|
|
ln -s ctr %{buildroot}%{_bindir}/docker-containerd-ctr
|
|
|
|
ln -s runc %{buildroot}%{_bindir}/docker-runc
|
2024-01-05 21:52:10 +01:00
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
|
|
|
|
%pre
|
|
|
|
if [ $1 -ge 1 ]; then
|
|
|
|
/usr/sbin/groupadd docker -g %{groupid} &>/dev/null
|
|
|
|
fi
|
|
|
|
:
|
|
|
|
|
|
|
|
%post
|
|
|
|
%systemd_post %{name}
|
|
|
|
:
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun %{name}
|
|
|
|
:
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun %{name}
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
groupdel docker || true
|
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/docker
|
2024-01-05 21:52:10 +01:00
|
|
|
%{_bindir}/docker-containerd-ctr
|
|
|
|
%{_bindir}/docker-containerd-shim
|
|
|
|
%{_bindir}/docker-runc
|
|
|
|
%{_bindir}/docker-containerd
|
2024-01-05 21:52:10 +01:00
|
|
|
%{_bindir}/dockerd
|
|
|
|
%{_udevrulesdir}/80-docker.rules
|
2024-01-05 21:52:10 +01:00
|
|
|
%{_unitdir}/docker.service
|
|
|
|
%{_unitdir}/docker.socket
|
|
|
|
%{_datadir}/bash-completion/completions/docker
|
|
|
|
%{_datadir}/fish/vendor_completions.d/docker.fish
|
|
|
|
%{_mandir}/man1/docker*.1*
|
|
|
|
%{_mandir}/man5/Dockerfile.5*
|
2024-01-05 21:52:10 +01:00
|
|
|
%{_mandir}/man5/docker-config-json.5*
|
|
|
|
%{_mandir}/man8/dockerd.8*
|
2024-01-05 21:52:10 +01:00
|
|
|
%{_datadir}/vim/vimfiles/ftdetect/dockerfile.vim
|
|
|
|
%{_datadir}/vim/vimfiles/syntax/dockerfile.vim
|
|
|
|
%{_datadir}/zsh/site-functions/_docker
|
2024-01-05 21:52:10 +01:00
|
|
|
%doc components/engine/AUTHORS components/engine/LICENSE
|
2024-01-05 21:52:10 +01:00
|
|
|
|
|
|
|
%changelog
|
2024-01-05 21:52:10 +01:00
|
|
|
* Tue Feb 02 2021 Automatic Build System <autodist@mambasoft.it> 19.03.15-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
* Wed Dec 02 2020 Automatic Build System <autodist@mambasoft.it> 19.03.14-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Fri Sep 18 2020 Automatic Build System <autodist@mambasoft.it> 19.03.13-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Tue Sep 01 2020 Automatic Build System <autodist@mambasoft.it> 19.03.12-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Tue May 12 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 19.03.8-1mamba
|
|
|
|
- update to 19.03.8
|
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
* Sun Jul 08 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 18.05.0-1mamba
|
|
|
|
- update to 18.05.0
|
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
* Thu Apr 19 2018 Silvan Calarco <silvan.calarco@mambasoft.it> 1.11.1-3mamba
|
|
|
|
- rebuilt by autoport with build requirements: libgo-devel>=7.3.0-1mamba
|
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
* Fri Jul 29 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 1.11.1-2mamba
|
|
|
|
- require containerd and add necessary symlinks
|
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
* Sun May 15 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 1.11.1-1mamba
|
|
|
|
- update to 1.11.1
|
|
|
|
|
2024-01-05 21:52:10 +01:00
|
|
|
* Fri Jan 01 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 1.9.1-1mamba
|
|
|
|
- package created using the webbuild interface
|