-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpodman.spec
185 lines (161 loc) · 5.8 KB
/
podman.spec
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
Summary: A tool for managing OCI containers and pods
Name: podman
Version: 5.4.0
Release: 1
License: Apache v2.0
Group: Applications/System
#Source0Download: https://github.com/containers/podman/releases
Source0: https://github.com/containers/podman/archive/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: cf13b68a57beb577cd36a97140502736
Source1: policy.json
Source2: registries.conf
URL: https://github.com/containers/podman
BuildRequires: btrfs-progs-devel
BuildRequires: device-mapper-devel
BuildRequires: go-md2man
BuildRequires: golang >= 1.22.8
BuildRequires: golang-varlink
BuildRequires: gpgme-devel
BuildRequires: libseccomp-devel
BuildRequires: pkgconfig
BuildRequires: python3-modules
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 2.009
BuildRequires: systemd-devel
Requires: conmon
Requires: crun
Requires: netavark
Suggests: passt
Suggests: uidmap
ExclusiveArch: %go_arches
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _enable_debug_packages 0
%description
Podman (the POD MANager) is a tool for managing containers and images,
volumes mounted into those containers, and pods made from groups of
containers. Podman is based on libpod, a library for container
lifecycle management that is also contained in this repository. The
libpod library provides APIs for managing containers, pods, container
images, and volumes.
%package -n bash-completion-podman
Summary: bash-completion for podman
Group: Applications/Shells
Requires: %{name} = %{version}-%{release}
Requires: bash-completion >= 1:2.0
BuildArch: noarch
%description -n bash-completion-podman
This package provides bash-completion for podman.
%package -n fish-completion-podman
Summary: Fish completion for podman command
Group: Applications/Shells
Requires: %{name} = %{version}-%{release}
Requires: fish
BuildArch: noarch
%description -n fish-completion-podman
Fish completion for podman command.
%package -n zsh-completion-podman
Summary: Zsh completion for podman command
Group: Applications/Shells
Requires: %{name} = %{version}-%{release}
Requires: zsh
BuildArch: noarch
%description -n zsh-completion-podman
Zsh completion for podman command.
%prep
%setup -q
%build
%{__make} -j1 \
GO=/usr/bin/go \
GOCMD="CGO_ENABLED=1 %__go" \
GOPATH=$(pwd)/.gopath \
PREFIX="%{_prefix}" \
BINDIR="%{_bindir}" \
LIBEXECDIR="%{_libexecdir}" \
MANDIR="%{_mandir}" \
SHAREDIR_CONTAINERS="%{_datadir}/containers" \
ETCDIR="%{_sysconfdir}" \
TMPFILESDIR="%{systemdtmpfilesdir}" \
SYSTEMDDIR="%{systemdunitdir}" \
USERSYSTEMDDIR="%{systemduserunitdir}" \
PYTHON="%{__python3}"
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sysconfdir}/containers,%{bash_compdir},%{fish_compdir},%{zsh_compdir},%{_sharedstatedir}/containers}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
PREFIX="%{_prefix}" \
BINDIR="%{_bindir}" \
LIBEXECDIR="%{_libexecdir}" \
MANDIR="%{_mandir}" \
SHAREDIR_CONTAINERS="%{_datadir}/containers" \
ETCDIR="%{_sysconfdir}" \
TMPFILESDIR="%{systemdtmpfilesdir}" \
SYSTEMDDIR="%{systemdunitdir}" \
SYSTEMDGENERATORSDIR="%{_systemdgeneratordir}" \
USERSYSTEMDGENERATORSDIR="%{_systemdusergeneratordir}" \
USERSYSTEMDDIR="%{systemduserunitdir}" \
PYTHON="%{__python3}"
cp -p %{SOURCE1} %{SOURCE2} \
vendor/github.com/containers/common/pkg/config/containers.conf \
$RPM_BUILD_ROOT%{_sysconfdir}/containers
%{__sed} -e 's|/var/lib/containers|%{_sharedstatedir}/containers|g' \
vendor/github.com/containers/storage/storage.conf \
> $RPM_BUILD_ROOT%{_sysconfdir}/containers/storage.conf
$RPM_BUILD_ROOT%{_bindir}/podman completion -f $RPM_BUILD_ROOT%{bash_compdir}/podman bash
$RPM_BUILD_ROOT%{_bindir}/podman completion -f $RPM_BUILD_ROOT%{fish_compdir}/podman.fish fish
$RPM_BUILD_ROOT%{_bindir}/podman completion -f $RPM_BUILD_ROOT%{zsh_compdir}/_podman zsh
%clean
rm -rf $RPM_BUILD_ROOT
%post
%systemd_post podman.service podman.socket
%preun
%systemd_preun podman.service podman.socket
%postun
%systemd_reload
%files
%defattr(644,root,root,755)
%doc README.md
%dir %{_sysconfdir}/containers
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/containers/containers.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/containers/policy.json
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/containers/registries.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/containers/storage.conf
%attr(755,root,root) %{_bindir}/podman
%attr(755,root,root) %{_bindir}/podman-remote
%attr(755,root,root) %{_bindir}/podmansh
%dir %{_libexecdir}/podman
%attr(755,root,root) %{_libexecdir}/podman/quadlet
%attr(755,root,root) %{_libexecdir}/podman/rootlessport
%{systemdunitdir}/podman.service
%{systemdunitdir}/podman.socket
%{systemdunitdir}/podman-auto-update.service
%{systemdunitdir}/podman-auto-update.timer
%{systemdunitdir}/podman-clean-transient.service
%{systemdunitdir}/[email protected]
%{systemdunitdir}/podman-restart.service
%{_systemdgeneratordir}/podman-system-generator
%{systemduserunitdir}/podman.service
%{systemduserunitdir}/podman.socket
%{systemduserunitdir}/podman-auto-update.service
%{systemduserunitdir}/podman-auto-update.timer
%{systemduserunitdir}/podman-clean-transient.service
%{systemduserunitdir}/[email protected]
%{systemduserunitdir}/podman-restart.service
%{systemduserunitdir}/podman-user-wait-network-online.service
%{_systemdusergeneratordir}/podman-user-generator
%{_mandir}/man1/podman*.1*
%{_mandir}/man5/podman-systemd.unit.5*
%{_mandir}/man5/quadlet.5*
%{_mandir}/man7/podman-rootless.7*
%{_mandir}/man7/podman-troubleshooting.7*
/usr/lib/tmpfiles.d/podman.conf
%dir %{_sharedstatedir}/containers
%files -n bash-completion-podman
%defattr(644,root,root,755)
%{bash_compdir}/podman
%files -n fish-completion-%{name}
%defattr(644,root,root,755)
%{fish_compdir}/podman.fish
%files -n zsh-completion-%{name}
%defattr(644,root,root,755)
%{zsh_compdir}/_podman