1 | %bcond_with systemd |
---|
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 |
---|
10 | Version: 19.03.9 |
---|
11 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
12 | Group: Development/Tools |
---|
13 | Vendor: Project Vine |
---|
14 | Distribution: Vine Linux |
---|
15 | Packager: tomop |
---|
16 | |
---|
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 |
---|
20 | Source1: https://github.com/docker/docker-ce/raw/v%{version}/README.md |
---|
21 | Source2: https://github.com/docker/docker-ce/raw/v%{version}/components/cli/LICENSE |
---|
22 | |
---|
23 | Source10: docker.init |
---|
24 | Source11: docker.sysconfig |
---|
25 | Source12: docker.conf |
---|
26 | Source100: docker.service |
---|
27 | Source101: docker.socket |
---|
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} |
---|
39 | %if %{with systemd} |
---|
40 | %{?systemd_requires} |
---|
41 | %endif |
---|
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 | |
---|
57 | |
---|
58 | %package cli |
---|
59 | Summary: clients for Docker |
---|
60 | Group: Development/Tools |
---|
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 | |
---|
77 | |
---|
78 | %build |
---|
79 | |
---|
80 | |
---|
81 | # %check |
---|
82 | # cli/build/docker -v |
---|
83 | |
---|
84 | |
---|
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 | |
---|
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 |
---|
103 | |
---|
104 | install -p -m 644 %{SOURCE1} ./ |
---|
105 | install -p -m 644 %{SOURCE2} ./ |
---|
106 | |
---|
107 | |
---|
108 | %clean |
---|
109 | rm -rf %{buildroot} |
---|
110 | |
---|
111 | %pre |
---|
112 | if ! getent group docker > /dev/null; then |
---|
113 | groupadd --system docker |
---|
114 | fi |
---|
115 | |
---|
116 | %post |
---|
117 | %if %{with systemd} |
---|
118 | %systemd_post docker.service |
---|
119 | %else |
---|
120 | if [ $1 -eq 1 ]; then |
---|
121 | /sbin/chkconfig --add docker |
---|
122 | fi |
---|
123 | %endif |
---|
124 | |
---|
125 | %preun |
---|
126 | %if %{with systemd} |
---|
127 | %systemd_preun docker.service |
---|
128 | %else |
---|
129 | if [ $1 -eq 0 -o -x /bin/systemctl ]; then |
---|
130 | /sbin/chkconfig docker off |
---|
131 | /sbin/chkconfig --del docker |
---|
132 | fi |
---|
133 | %endif |
---|
134 | |
---|
135 | %if %{with systemd} |
---|
136 | %postun |
---|
137 | %systemd_postun_with_restart docker.service |
---|
138 | %endif |
---|
139 | |
---|
140 | |
---|
141 | # list files owned by the package here |
---|
142 | %files |
---|
143 | %defattr(-,root,root,-) |
---|
144 | %license LICENSE |
---|
145 | %doc README.md |
---|
146 | %{_bindir}/containerd |
---|
147 | %{_bindir}/containerd-shim |
---|
148 | %{_bindir}/ctr |
---|
149 | %{_bindir}/docker-init |
---|
150 | %{_bindir}/docker-proxy |
---|
151 | %{_bindir}/dockerd |
---|
152 | %dir %{_localstatedir}/run/docker |
---|
153 | %dir %{_localstatedir}/lib/docker |
---|
154 | %if %{with systemd} |
---|
155 | %{_unitdir}/docker.service |
---|
156 | %{_unitdir}/docker.socket |
---|
157 | %else |
---|
158 | %{_initdir}/docker |
---|
159 | %config(noreplace) %{_sysconfdir}/sysconfig/docker |
---|
160 | %config(noreplace) %{_sysconfdir}/rsyslog.d/docker |
---|
161 | %endif |
---|
162 | |
---|
163 | %files cli |
---|
164 | %defattr(-,root,root,-) |
---|
165 | %license LICENSE |
---|
166 | %doc README.md |
---|
167 | %{_bindir}/docker |
---|
168 | %{_bindir}/runc |
---|
169 | |
---|
170 | |
---|
171 | %changelog |
---|
172 | * Sun Jul 26 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.03.09-1 |
---|
173 | - new upstream release. |
---|
174 | - added systemd support (disabled as default). |
---|
175 | |
---|
176 | * Thu Mar 19 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.03.08-1 |
---|
177 | - new upstream release. |
---|
178 | |
---|
179 | * Thu Oct 10 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.03.03-1 |
---|
180 | - new upstream release. |
---|
181 | |
---|
182 | * Tue Aug 27 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.03.1-2 |
---|
183 | - updated initscript: added syslog support. |
---|
184 | |
---|
185 | * Sun Aug 11 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 19.03.1-1 |
---|
186 | - initial build for Vine Linux. |
---|