[12431] | 1 | %bcond_with systemd |
---|
[12340] | 2 | %bcond_with build_nosrc |
---|
| 3 | |
---|
| 4 | %if !%{with build_nosrc} |
---|
| 5 | %global _disable_source_fetch 0 |
---|
| 6 | %endif |
---|
| 7 | |
---|
| 8 | Name: docker-ce |
---|
| 9 | Summary: The open-source application container engine |
---|
[12527] | 10 | Version: 20.10.3 |
---|
[12431] | 11 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
[12514] | 12 | Group: system,virtualization |
---|
[12431] | 13 | Vendor: Project Vine |
---|
| 14 | Distribution: Vine Linux |
---|
| 15 | Packager: tomop |
---|
| 16 | |
---|
[12340] | 17 | License: ASL 2.0 |
---|
| 18 | URL: https://www.docker.com |
---|
| 19 | Source0: https://download.docker.com/linux/static/stable/x86_64/docker-%{version}.tgz |
---|
[12527] | 20 | Source1: https://raw.githubusercontent.com/docker/cli/v%{version}/README.md |
---|
| 21 | Source2: https://raw.githubusercontent.com/docker/cli/v%{version}/LICENSE |
---|
[12340] | 22 | |
---|
| 23 | Source10: docker.init |
---|
| 24 | Source11: docker.sysconfig |
---|
| 25 | Source12: docker.conf |
---|
[12431] | 26 | Source100: docker.service |
---|
| 27 | Source101: docker.socket |
---|
[12340] | 28 | |
---|
| 29 | %if %{with build_nosrc} |
---|
| 30 | NoSource: 0 |
---|
| 31 | NoSource: 1 |
---|
| 32 | NoSource: 2 |
---|
| 33 | %endif |
---|
| 34 | |
---|
| 35 | # required packages on install |
---|
| 36 | Requires: /bin/sh |
---|
| 37 | Requires: libcgroup |
---|
| 38 | Requires: docker-ce-cli = %{version}-%{release} |
---|
[12431] | 39 | %if %{with systemd} |
---|
| 40 | %{?systemd_requires} |
---|
| 41 | %endif |
---|
[12340] | 42 | |
---|
| 43 | Conflicts: docker-ee |
---|
| 44 | Conflicts: docker-ee-cli |
---|
| 45 | |
---|
| 46 | %description |
---|
| 47 | Docker is is a product for you to build, ship and run any application as a |
---|
| 48 | lightweight container. |
---|
| 49 | |
---|
| 50 | Docker containers are both hardware-agnostic and platform-agnostic. This means |
---|
| 51 | they can run anywhere, from your laptop to the largest cloud compute instance and |
---|
| 52 | everything in between - and they don't require you to use a particular |
---|
| 53 | language, framework or packaging system. That makes them great building blocks |
---|
| 54 | for deploying and scaling web apps, databases, and backend services without |
---|
| 55 | depending on a particular stack or provider. |
---|
| 56 | |
---|
[12431] | 57 | |
---|
[12340] | 58 | %package cli |
---|
| 59 | Summary: clients for Docker |
---|
[12514] | 60 | Group: admin-tools,virtualization |
---|
[12340] | 61 | |
---|
| 62 | %description cli |
---|
| 63 | Docker is is a product for you to build, ship and run any application as a |
---|
| 64 | lightweight container. |
---|
| 65 | |
---|
| 66 | Docker containers are both hardware-agnostic and platform-agnostic. This means |
---|
| 67 | they can run anywhere, from your laptop to the largest cloud compute instance and |
---|
| 68 | everything in between - and they don't require you to use a particular |
---|
| 69 | language, framework or packaging system. That makes them great building blocks |
---|
| 70 | for deploying and scaling web apps, databases, and backend services without |
---|
| 71 | depending on a particular stack or provider. |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | %prep |
---|
| 75 | %setup -q -c -n docker |
---|
| 76 | |
---|
[12431] | 77 | |
---|
[12340] | 78 | %build |
---|
| 79 | |
---|
[12431] | 80 | |
---|
[12340] | 81 | # %check |
---|
| 82 | # cli/build/docker -v |
---|
| 83 | |
---|
[12431] | 84 | |
---|
[12340] | 85 | %install |
---|
| 86 | # install binary |
---|
| 87 | install -d %{buildroot}%{_bindir} |
---|
| 88 | install -d %{buildroot}%{_localstatedir}/lib/docker |
---|
| 89 | install -d %{buildroot}%{_localstatedir}/run/docker |
---|
| 90 | |
---|
| 91 | for f in docker/*; do |
---|
| 92 | install -p -m 755 $f %{buildroot}%{_bindir}/ |
---|
| 93 | done |
---|
| 94 | |
---|
[12431] | 95 | %if %{with systemd} |
---|
| 96 | install -D -p -m 644 %{SOURCE100} %{buildroot}%{_unitdir}/docker.service |
---|
| 97 | install -D -p -m 755 %{SOURCE101} %{buildroot}%{_unitdir}/docker.socket |
---|
| 98 | %else |
---|
| 99 | install -D -p -m 755 %{SOURCE10} %{buildroot}%{_initdir}/docker |
---|
| 100 | install -D -p -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/sysconfig/docker |
---|
| 101 | install -D -p -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/rsyslog.d/docker |
---|
| 102 | %endif |
---|
[12340] | 103 | |
---|
| 104 | install -p -m 644 %{SOURCE1} ./ |
---|
| 105 | install -p -m 644 %{SOURCE2} ./ |
---|
| 106 | |
---|
| 107 | |
---|
| 108 | %clean |
---|
| 109 | rm -rf %{buildroot} |
---|
| 110 | |
---|
[12431] | 111 | %pre |
---|
[12340] | 112 | if ! getent group docker > /dev/null; then |
---|
| 113 | groupadd --system docker |
---|
| 114 | fi |
---|
[12431] | 115 | |
---|
| 116 | %post |
---|
| 117 | %if %{with systemd} |
---|
| 118 | %systemd_post docker.service |
---|
| 119 | %else |
---|
[12340] | 120 | if [ $1 -eq 1 ]; then |
---|
| 121 | /sbin/chkconfig --add docker |
---|
| 122 | fi |
---|
[12431] | 123 | %endif |
---|
[12340] | 124 | |
---|
| 125 | %preun |
---|
[12431] | 126 | %if %{with systemd} |
---|
| 127 | %systemd_preun docker.service |
---|
| 128 | %else |
---|
| 129 | if [ $1 -eq 0 -o -x /bin/systemctl ]; then |
---|
[12340] | 130 | /sbin/chkconfig docker off |
---|
| 131 | /sbin/chkconfig --del docker |
---|
| 132 | fi |
---|
[12431] | 133 | %endif |
---|
[12340] | 134 | |
---|
[12431] | 135 | %if %{with systemd} |
---|
| 136 | %postun |
---|
| 137 | %systemd_postun_with_restart docker.service |
---|
| 138 | %endif |
---|
| 139 | |
---|
| 140 | |
---|
[12340] | 141 | # list files owned by the package here |
---|
| 142 | %files |
---|
| 143 | %defattr(-,root,root,-) |
---|
| 144 | %license LICENSE |
---|
| 145 | %doc README.md |
---|
| 146 | %{_bindir}/containerd |
---|
[12527] | 147 | %{_bindir}/containerd-shim* |
---|
[12340] | 148 | %{_bindir}/ctr |
---|
| 149 | %{_bindir}/docker-init |
---|
| 150 | %{_bindir}/docker-proxy |
---|
| 151 | %{_bindir}/dockerd |
---|
| 152 | %dir %{_localstatedir}/run/docker |
---|
| 153 | %dir %{_localstatedir}/lib/docker |
---|
[12431] | 154 | %if %{with systemd} |
---|
| 155 | %{_unitdir}/docker.service |
---|
| 156 | %{_unitdir}/docker.socket |
---|
| 157 | %else |
---|
[12340] | 158 | %{_initdir}/docker |
---|
| 159 | %config(noreplace) %{_sysconfdir}/sysconfig/docker |
---|
| 160 | %config(noreplace) %{_sysconfdir}/rsyslog.d/docker |
---|
[12431] | 161 | %endif |
---|
[12340] | 162 | |
---|
| 163 | %files cli |
---|
| 164 | %defattr(-,root,root,-) |
---|
| 165 | %license LICENSE |
---|
| 166 | %doc README.md |
---|
| 167 | %{_bindir}/docker |
---|
| 168 | %{_bindir}/runc |
---|
| 169 | |
---|
[12431] | 170 | |
---|
[12340] | 171 | %changelog |
---|
[12527] | 172 | * Thu Feb 11 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.10.3-1 |
---|
| 173 | - new upstream release. |
---|
| 174 | |
---|
[12514] | 175 | * Thu Dec 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.03.14-1 |
---|
| 176 | - new upstream release. |
---|
| 177 | |
---|
[12431] | 178 | * Sun Jul 26 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.03.09-1 |
---|
| 179 | - new upstream release. |
---|
| 180 | - added systemd support (disabled as default). |
---|
| 181 | |
---|
[12340] | 182 | * Thu Mar 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.03.08-1 |
---|
| 183 | - new upstream release. |
---|
| 184 | |
---|
| 185 | * Thu Oct 10 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.03.03-1 |
---|
| 186 | - new upstream release. |
---|
| 187 | |
---|
| 188 | * Tue Aug 27 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.03.1-2 |
---|
| 189 | - updated initscript: added syslog support. |
---|
| 190 | |
---|
| 191 | * Sun Aug 11 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.03.1-1 |
---|
| 192 | - initial build for Vine Linux. |
---|