Пакет docker-ce: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
%define _unpackaged_files_terminate_build 1
%define _libexecdir /usr/libexec

%global provider        github
%global provider_tld    com
%global project         docker
%global repo_engine     docker
%global repo_cli        cli

%global import_path_engine %{provider}.%{provider_tld}/%{project}/%{repo_engine}
%global import_path_cli %{provider}.%{provider_tld}/%{project}/%{repo_cli}
%global build_dir ./_build
%global build_dir_cli %build_dir/src/%import_path_cli
%global build_dir_engine %build_dir/src/%import_path_engine
%global commit      4484c46d9d1a2d10b8fc662923ad586daeedb04f
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:       docker-ce
Version:    19.03.13
Release: alt2
Summary: Automates deployment of containerized applications
License: Apache-2.0
Group: System/Configuration/Other

%global versuffix ce
%global fullversion %{version}-%{versuffix}

Url: https://github.com/docker/docker-ce
ExclusiveArch: %go_arches
Conflicts: docker

Source0: %name-%version.tar
Source1: %repo_engine.service
Source2: %repo_engine.init
Source3: %repo_engine.sysconf
Source4: %repo_engine-storage.sysconf
Source5: daemon.json

BuildRequires(pre): rpm-build-golang
BuildRequires: /proc gcc golang >= 1.3 systemd-devel libdevmapper-devel libbtrfs-devel libseccomp-devel
BuildRequires: go-md2man
Requires: tar xz
Provides: docker-io = %version-%release
Obsoletes: docker-io <= 17.05.0
Obsoletes: docker-io-devel <= 17.05.0
Requires: /usr/bin/docker-proxy
Requires: docker-containerd >= 1.0.2-alt1
Requires: docker-runc >= 1.0.0-alt4.rc5
Requires: docker-init >= 0.17.0-alt1
Requires: iptables

# do not extract debuginfo
%define __find_debuginfo_files %nil

# do not run debugedit for them
%add_debuginfo_skiplist /usr/bin/docker

%description
Docker is an open-source engine that automates the deployment of any
application as a lightweight, portable, self-sufficient container that will
run virtually anywhere.

Docker containers can encapsulate any payload, and will run consistently on
and between virtually any server. The same container that a developer builds
and tests on a laptop will run at scale, in production*, on VMs, bare-metal
servers, OpenStack clusters, public instances, or combinations of the above.

%prep
%setup

%build

mkdir -p %{build_dir}
export GOPATH="$(pwd)/%{build_dir}:%{go_path}"

# build cli
mkdir -p %{build_dir_cli}
cp -alv -- components/cli/* %{build_dir_cli}
DISABLE_WARN_OUTSIDE_CONTAINER=1 make -C %{build_dir_cli} VERSION=%{version} GITCOMMIT=%{shortcommit}
DISABLE_WARN_OUTSIDE_CONTAINER=1 make -C %{build_dir_cli} manpages

# build daemon
export DOCKER_GITCOMMIT=%{shortcommit}
export DOCKER_BUILDTAGS='selinux journald pkcs11 seccomp'
export VERSION=%{version}
mkdir -p %{build_dir_engine}
cp -alv -- components/engine/* %{build_dir_engine}
pushd %{build_dir_engine}
hack/make.sh dynbinary
popd

%install
# install binary
install -d %{buildroot}%{_bindir}
install -p -m 755 %{build_dir_cli}/build/docker %{buildroot}%{_bindir}/docker
install -p -m 755 %{build_dir_engine}/bundles/dynbinary-daemon/dockerd %{buildroot}%{_bindir}/dockerd

install -d %{buildroot}%{_libexecdir}/docker

# install manpages
install -d %{buildroot}%{_mandir}/man1
install -p -m 644 %{build_dir_cli}/man/man1/*.1 %{buildroot}%{_mandir}/man1
install -d %{buildroot}%{_mandir}/man5
install -p -m 644 %{build_dir_cli}/man/man5/*.5 %{buildroot}%{_mandir}/man5
install -d %{buildroot}%{_mandir}/man8
install -p -m 644 %{build_dir_cli}/man/man8/*.8 %{buildroot}%{_mandir}/man8

# install bash completion
install -Dp -m 644 %{build_dir_cli}/contrib/completion/bash/docker %{buildroot}%{_datadir}/bash-completion/completions/docker

# install zsh completion
install -Dp -m 644 %{build_dir_cli}/contrib/completion/zsh/_docker %{buildroot}%{_datadir}/zsh/site-functions/_docker

# install fish completion
install -Dp -m 644 %{build_dir_cli}/contrib/completion/fish/docker.fish %{buildroot}%{_datadir}/fish/completions/docker.fish

# install vim syntax highlighting
# (in process of being included in default vim)
install -d %{buildroot}%{_datadir}/vim/vimfiles/{doc,ftdetect,syntax}
install -p -m 644 %{build_dir_engine}/contrib/syntax/vim/doc/dockerfile.txt %{buildroot}%{_datadir}/vim/vimfiles/doc
install -p -m 644 %{build_dir_engine}/contrib/syntax/vim/ftdetect/dockerfile.vim %{buildroot}%{_datadir}/vim/vimfiles/ftdetect
install -p -m 644 %{build_dir_engine}/contrib/syntax/vim/syntax/dockerfile.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax

# install udev rules
install -d %{buildroot}%{_sysconfdir}/udev/rules.d
install -m 644 -p %{build_dir_engine}/contrib/udev/80-docker.rules %{buildroot}%{_sysconfdir}/udev/rules.d

# install storage dir
install -d %{buildroot}%{_sharedstatedir}/%{repo_engine}

# install systemd/init scripts
install -p -D -m 644 altlinux/%{repo_engine}.service %{buildroot}%{_unitdir}/%{repo_engine}.service
install -p -m 644 %{build_dir_engine}/contrib/init/systemd/docker.socket %{buildroot}%{_unitdir}/
install -p -D -m 755 altlinux/%{repo_engine}.init %{buildroot}%{_initddir}/%{repo_engine}

install -d %buildroot%_sysconfdir/sysconfig
install -p -m 644 altlinux/docker.sysconf %buildroot%_sysconfdir/sysconfig/docker
install -p -m 644 altlinux/docker-storage.sysconf %buildroot%_sysconfdir/sysconfig/docker-storage

install -d %buildroot%_sysconfdir/docker
install -p -m 644 altlinux/daemon.json %buildroot%_sysconfdir/docker/daemon.json

%pre
getent group docker > /dev/null || %{_sbindir}/groupadd -r docker
exit 0

%post
%post_service docker

%preun
%preun_service docker

%files
%doc components/engine/AUTHORS components/engine/LICENSE
%doc components/engine/MAINTAINERS components/engine/NOTICE
%doc CHANGELOG.md CONTRIBUTING.md README.md
%doc components/engine/contrib/syntax/vim/LICENSE
%doc components/engine/contrib/syntax/vim/README.md
%config(noreplace) %{_sysconfdir}/sysconfig/docker
%config(noreplace) %{_sysconfdir}/sysconfig/docker-storage
%config(noreplace) %{_sysconfdir}/docker/daemon.json
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_bindir}/docker
%{_bindir}/dockerd
%dir %{_libexecdir}/docker
%{_unitdir}/docker.service
%{_unitdir}/docker.socket
%_initdir/docker
%{_datadir}/bash-completion/completions/docker
%{_datadir}/zsh/site-functions/_docker
%{_datadir}/fish/completions/docker.fish
%dir %{_sharedstatedir}/docker
%{_sysconfdir}/udev/rules.d/80-docker.rules
%{_datadir}/vim/vimfiles/doc/dockerfile.txt
%{_datadir}/vim/vimfiles/ftdetect/dockerfile.vim
%{_datadir}/vim/vimfiles/syntax/dockerfile.vim

%changelog
* Sat Oct 24 2020 Alexey Shabalin <shaba@altlinux.org> 19.03.13-alt2
- fix docker and dockerd --version
- update default docker daemon config (daemon.json)
- update systemd service unit and install docker.socket

* Wed Sep 30 2020 Vladimir Didenko <cow@altlinux.org> 19.03.13-alt1
- 19.03.13

* Fri Jul 3 2020 Vladimir Didenko <cow@altlinux.org> 19.03.12-alt1
- 19.03.12

* Fri Jun 5 2020 Vladimir Didenko <cow@altlinux.org> 19.03.11-alt1
- 19.03.11 (fixes: CVE-2020-13401)

* Fri May 29 2020 Vladimir Didenko <cow@altlinux.org> 19.03.10-alt1
- 19.03.10

* Thu Mar 12 2020 Vladimir Didenko <cow@altlinux.org> 19.03.8-alt1
- 19.03.8 (better mitigation for CVE-2019-14271)

* Tue Feb 18 2020 Vladimir Didenko <cow@altlinux.org> 19.03.6-alt1
- 19.03.6
- Fix license name

* Fri Nov 15 2019 Vladimir Didenko <cow@altlinux.org> 19.03.5-alt1
- 19.03.5

* Thu Oct 10 2019 Vladimir Didenko <cow@altlinux.org> 19.03.3-alt1
- 19.03.3

* Thu Sep 12 2019 Vladimir Didenko <cow@altlinux.org> 19.03.2-alt1
- 19.03.2

* Thu Sep 05 2019 Mikhail Gordeev <obirvalger@altlinux.org> 19.03.1-alt2
- Make udev rules not executable

* Wed Aug 7 2019 Vladimir Didenko <cow@altlinux.org> 19.03.1-alt1
- 19.03.1 (fixes CVE-2019-14271)

* Thu Jul 25 2019 Vladimir Didenko <cow@altlinux.org> 19.03.0-alt1
- 19.03.0

* Wed Jul 24 2019 Mikhail Gordeev <obirvalger@altlinux.org> 18.09.8-alt1
- 18.09.8

* Thu Jul 4 2019 Vladimir Didenko <cow@altlinux.org> 18.09.7-alt2
- fix spec file

* Thu Jul 4 2019 Vladimir Didenko <cow@altlinux.org> 18.09.7-alt1
- 18.09.7

* Wed May 8 2019 Vladimir Didenko <cow@altlinux.org> 18.09.6-alt1
- 18.09.6

* Wed Apr 17 2019 Vladimir Didenko <cow@altlinux.org> 18.09.5-alt1
- 18.09.5

* Wed Apr 10 2019 Vladimir Didenko <cow@altlinux.org> 18.09.4-alt1
- 18.09.4

* Fri Mar 22 2019 Alexey Shabalin <shaba@altlinux.org> 18.09.3-alt1
- 18.09.3
- build with seccomp support

* Fri Mar 15 2019 Mikhail Gordeev <obirvalger@altlinux.org> 18.09.1-alt2
- Change golang-github-cpuguy83-go-md2man to go-md2man in BuildRequires

* Tue Jan 29 2019 Vladimir Didenko <cow@altlinux.org> 18.09.1-alt1
- New version

* Thu Jan 17 2019 Mikhail Gordeev <obirvalger@altlinux.org> 18.09.0-alt4
- add iptables to requires

* Wed Jan 09 2019 Alexey Shabalin <shaba@altlinux.org> 18.09.0-alt3
- add completions for zsh and fish

* Tue Dec 25 2018 Vladimir Didenko <cow@altlinux.org> 18.09.0-alt2
- Use overlay2 storage driver by default

* Thu Nov 22 2018 Vladimir Didenko <cow@altlinux.org> 18.09.0-alt1
- New version

* Thu Aug 30 2018 Vladimir Didenko <cow@altlinux.org> 18.06.1-alt1
- New version

* Fri Jul 20 2018 Vladimir Didenko <cow@altlinux.org> 18.06.0-alt1.1
- remove unused build requirements

* Fri Jul 20 2018 Vladimir Didenko <cow@altlinux.org> 18.06.0-alt1
- New version

* Mon May 14 2018 Alexey Shabalin <shaba@altlinux.ru> 18.03.1-alt2
- define ExclusiveArch as  %%go_arches

* Thu May 10 2018 Vladimir Didenko <cow@altlinux.org> 18.03.1-alt1
- New version

* Thu Mar 22 2018 Vladimir Didenko <cow@altlinux.org> 18.03.0-alt1
- New version

* Wed Feb 7 2018 Vladimir Didenko <cow@altlinux.org> 18.02.0-alt2.rc2
- Support rename of docker-init to tini

* Wed Feb 7 2018 Vladimir Didenko <cow@altlinux.org> 18.02.0-alt1.rc2
- New version

* Mon Jan 15 2018 Vladimir Didenko <cow@altlinux.org> 18.01.0-alt1
- New version

* Tue Jan 9 2018 Vladimir Didenko <cow@altlinux.org> 17.12.0-alt1
- New version
- Remove devel package (seems useless)

* Tue May 16 2017 Vladimir Didenko <cow@altlinux.org> 17.05.0-alt1
- New version

* Fri Apr 7 2017 Vladimir Didenko <cow@altlinux.org> 17.04.0-alt1
- New version

* Mon Mar 6 2017 Vladimir Didenko <cow@altlinux.org> 17.03.0-alt1
- New version

* Fri Feb 10 2017 Vladimir Didenko <cow@altlinux.org> 1.13.1-alt1
- New version

* Wed Jan 25 2017 Vladimir Didenko <cow@altlinux.org> 1.13.0-alt1
- New version

* Fri Dec 16 2016 Vladimir Didenko <cow@altlinux.org> 1.12.5-alt1
- New version

* Tue Nov 29 2016 Vladimir Didenko <cow@altlinux.org> 1.12.3-alt1
- New version

* Wed Oct 12 2016 Vladimir Didenko <cow@altlinux.org> 1.12.2-alt1
- New version

* Tue Sep 20 2016 Alexandr Boltris <alex@altlinux.org> 1.12.1-alt2
- add docker-proxy. fixes #32489

* Fri Aug 19 2016 Vladimir Didenko <cow@altlinux.org> 1.12.1-alt1
- New version

* Tue Aug 2 2016 Vladimir Didenko <cow@altlinux.org> 1.12.0-alt1
- New version

* Thu Jun 2 2016 Vladimir Didenko <cow@altlinux.org> 1.11.2-alt1
- New version

* Fri May 6 2016 Vladimir Didenko <cow@altlinux.org> 1.11.1-alt1
- New version
- Remove manual provides

* Thu May 5 2016 Vladimir Didenko <cow@altlinux.org> 1.11.0-alt1
- New version

* Fri Mar 11 2016 Vladimir Didenko <cow@altlinux.org> 1.10.3-alt1
- New version

* Thu Feb 25 2016 Vladimir Didenko <cow@altlinux.org> 1.10.2-alt1
- New version

* Tue Feb 16 2016 Vladimir Didenko <cow@altlinux.org> 1.10.1-alt1
- New version
- Restore bash completions

* Wed Feb 10 2016 Vladimir Didenko <cow@altlinux.org> 1.10.0-alt1.1
- fix provides

* Mon Feb 8 2016 Vladimir Didenko <cow@altlinux.org> 1.10.0-alt1
- New version.
- Merge devel and pkg-devel packages
- add init script for sysvinit

* Wed Nov 25 2015 Vladimir Didenko <cow@altlinux.org> 1.9.1-alt1
- New version.

* Fri Nov 6 2015 Vladimir Didenko <cow@altlinux.org> 1.9.0-alt1
- New version.

* Tue Oct 13 2015 Vladimir Didenko <cow@altlinux.org> 1.8.3-alt1
- New version.
- Return CAP_AUDIT_READ since std-def kernel supports it now
- Fix build with golang 1.5

* Mon Aug 24 2015 Vladimir Didenko <cow@altlinux.org> 1.8.1-alt1
- New version.

* Fri May 08 2015 Evgeny Sinelnikov <sin@altlinux.ru> 1.6.1-alt1
- Update to new version with security updates
 + Fix read/write /proc paths (CVE-2015-3630)
 + Prohibit VOLUME /proc and VOLUME / (CVE-2015-3631)
 + Fix opening of file-descriptor 1 (CVE-2015-3627)
 + Fix symlink traversal on container respawn allowing
   local privilege escalation (CVE-2015-3629)
 + Prohibit mount of /sys

* Sat Apr 18 2015 Evgeny Sinelnikov <sin@altlinux.ru> 1.6.0-alt1
- Update to last stable version
- Avoid of using CAP_AUDIT_READ capability for support
  less than 3.16.x kernel versions
- Rename dockerversion to autogen (c40993777f152426ea029)

* Wed Nov 12 2014 Gleb F-Malinovskiy <glebfm@altlinux.org> 1.3.1-alt1
- New version.
- Updated spec to Fedora 1.3.1-2.

* Mon Sep 15 2014 Gleb F-Malinovskiy <glebfm@altlinux.org> 1.2.0-alt1
- New version.

* Wed Aug 13 2014 Gleb F-Malinovskiy <glebfm@altlinux.org> 1.1.2-alt1
- New version.

* Thu Jun 19 2014 Gleb F-Malinovskiy <glebfm@altlinux.org> 1.0.0-alt2
- Dropped %%_datadir/vim/vimfiles/{doc,ftdetect,syntax}.

* Wed Jun 11 2014 Gleb F-Malinovskiy <glebfm@altlinux.org> 1.0.0-alt1
- New version.

* Mon May 12 2014 Gleb F-Malinovskiy <glebfm@altlinux.org> 0.11.1-alt1
- New version.

* Wed Apr 23 2014 Gleb F-Malinovskiy <glebfm@altlinux.org> 0.10.0-alt2
- %%post: restored creation of docker group.

* Tue Apr 22 2014 Gleb F-Malinovskiy <glebfm@altlinux.org> 0.10.0-alt1
- New version.

* Mon Jan 06 2014 Slava Dubrovskiy <dubrsl@altlinux.org> 0.7.3-alt1
- New version

* Sat Dec 28 2013 Slava Dubrovskiy <dubrsl@altlinux.org> 0.7.2-alt1
- New version

* Tue Nov 26 2013 Slava Dubrovskiy <dubrsl@altlinux.org> 0.7.0-alt1
- Release

* Mon Nov 25 2013 Slava Dubrovskiy <dubrsl@altlinux.org> 0.7-alt3.rc7
- New RC

* Sat Oct 19 2013 Slava Dubrovskiy <dubrsl@altlinux.org> 0.7-alt3.rc4
- New RC

* Fri Oct 11 2013 Slava Dubrovskiy <dubrsl@altlinux.org> 0.7-alt2.rc3
- Update up to upstream/v0.7-rc3 branch
- Add ExclusiveArch: x86_64
- Build docker-init statically

* Wed Oct 09 2013 Slava Dubrovskiy <dubrsl@altlinux.org> 0.7-alt1.rc3
- Build for ALT