]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - util-linux/util-linux.nm
strongswan: Update to 5.3.3
[people/amarx/ipfire-3.x.git] / util-linux / util-linux.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = util-linux
7 major_ver = 2.25
8 minor_ver = 2
9 version = %{major_ver}.%{minor_ver}
10 release = 2
11
12 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
13 groups = System/Base
14 url = https://github.com/karelzak/util-linux
15 license = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
16 summary = A collection of basic system utilities.
17
18 description
19 The util-linux package contains a large variety of low-level system
20 utilities that are necessary for a Linux system to function. Among
21 others, Util-linux contains the fdisk configuration tool and the login
22 program.
23 end
24
25 source_dl = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/
26
27 build
28 requires
29 audit-devel
30 automake >= 1.13
31 coreutils >= 8.19
32 gettext
33 libcap-devel
34 libcap-ng-devel
35 libselinux-devel
36 libsepol-devel
37 libudev-devel
38 ncurses-devel
39 pam-devel
40 python3-devel
41 systemd-devel >= 215
42 zlib-devel
43 end
44
45 CFLAGS += \
46 -D_LARGEFILE_SOURCE \
47 -D_LARGEFILE64_SOURCE \
48 -D_FILE_OFFSET_BITS=64
49
50 configure_options += \
51 --with-systemdsystemunitdir=%{unitdir} \
52 --disable-wall \
53 --enable-eject \
54 --enable-kill \
55 --enable-partx \
56 --enable-write \
57 --enable-runuser \
58 --enable-su \
59 --with-systemd \
60 --with-selinux \
61 --with-audit \
62 --with-udev \
63 --disable-makeinstall-chown \
64 --disable-static \
65 --disable-rpath \
66 --with-python=3
67
68 prepare_cmds
69 sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
70 -i $(grep -rl '/etc/adjtime' .)
71 end
72
73 # Build nolodin
74 build_cmds
75 gcc %{CFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
76 end
77
78 install_cmds
79 mkdir -pv \
80 %{BUILDROOT}/var/lib/libuuid \
81 %{BUILDROOT}/var/lib/hwclock \
82 %{BUILDROOT}/usr/share/man/man8 \
83 %{BUILDROOT}/run/uuidd \
84 %{BUILDROOT}/var/log
85
86 install -m 755 %{DIR_APP}/nologin %{BUILDROOT}%{sbindir}
87 install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/
88
89 touch %{BUILDROOT}/var/log/lastlog
90
91 # Remove deprecated commands
92 rm -fv %{BUILDROOT}/{%{sbindir},usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
93 %{BUILDROOT}{%{bindir},%{sbindir}}/{chkdupexe,newgrp,vi{gr,pw}} \
94 %{BUILDROOT}%{sbindir}/{sln,shutdown} %{BUILDROOT}%{bindir}/{line,pg}
95 rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
96 %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
97 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
98
99 # Set capabilities
100 chmod -v -s %{BUILDROOT}%{bindir}/mount
101 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/mount
102 chmod -v -s %{BUILDROOT}%{bindir}/umount
103 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/umount
104
105 # su (set right capabilities)
106 chmod -v u-s %{BUILDROOT}%{bindir}/su
107 setcap cap_setgid,cap_setuid+ep %{BUILDROOT}%{bindir}/su
108 end
109 end
110
111 packages
112 package %{name}
113 groups += Base
114
115 requires
116 /etc/pam.d/system-auth
117 end
118
119 provides
120 eject = %{thisver}
121 /bin/dmesg
122 /bin/eject
123 /bin/kill
124 /bin/more
125 /bin/mount
126 /bin/su
127 /bin/umount
128 /sbin/blkid
129 /sbin/blockdev
130 /sbin/findfs
131 /sbin/fsck
132 /sbin/nologin
133 /sbin/runuser
134 end
135
136 obsoletes
137 util-linux-ng
138 eject <= 2.1.5
139 end
140
141 conflicts
142 filesystem < 002
143 bash-completion <= 2.1-2
144 coreutils < 8.19
145 setup < 3.0-2
146 util-linux-ng
147 sysvinit <= 2.86-6
148 end
149
150 preprequires += coreutils
151
152 script postin
153 touch /var/log/lastlog
154
155 # mtab symlink
156 rm -f /etc/mtab
157 ln -s /proc/mounts /etc/mtab
158 end
159 end
160
161 # Package information for libblkid
162 package libblkid
163 summary = Block device ID library.
164 description
165 This is the block device identification library,
166 part of util-linux.
167 end
168
169 conflicts = filesystem < 002
170
171 files
172 %{libdir}/libblkid.*
173 end
174 end
175
176 # Package information for libblkid-devel
177 package libblkid-devel
178 summary = Development library and header of libblkid.
179 description = %{summary}
180
181 requires
182 libuuid-devel
183 end
184
185 files
186 %{includedir}/blkid/
187 %{libdir}/libblkid.so
188 %{libdir}/pkgconfig/blkid.pc
189 %{mandir}/man3/*blkid*
190 end
191 end
192
193 # Package information for libuuid
194 package libuuid
195 summary = Universally unique ID library.
196 description
197 This is the universally unique ID library,
198 part of util-linux.
199 end
200
201 requires
202 uuidd=%{thisver}
203 end
204
205 conflicts = filesystem < 002
206
207 files
208 %{libdir}/libuuid.*
209 end
210 end
211
212 # Package information for libuuid-devel
213 package libuuid-devel
214 summary = Development library and header of libuuid.
215 description = %{summary}
216
217 files
218 %{includedir}/uuid/
219 %{libdir}/libuuid.so
220 %{libdir}/pkgconfig/uuid.pc
221 %{mandir}/man3/*uuid*
222 end
223 end
224
225 # Package information for libmount
226 package libmount
227 summary = Device mounting library.
228 description
229 This is the device mounting library,
230 part of util-linux.
231 end
232
233 conflicts = filesystem < 002
234
235 files
236 %{libdir}/libmount.*
237 end
238 end
239
240 # Package information for libmount-devel
241 package libmount-devel
242 summary = Development library and header of libmount.
243 description = %{summary}
244
245 files
246 %{includedir}/libmount/
247 %{libdir}/libmount.so
248 %{libdir}/pkgconfig/mount.pc
249 %{mandir}/man3/*mount*
250 end
251 end
252
253 # Package information for libsmartcols.
254 package libsmartcols
255 summary = Formatting library for ls-like programs.
256 description
257 This is a library for ls-like terminal
258 programs, part of util-linux.
259 end
260
261 files
262 %{libdir}/libsmartcols.*
263 end
264 end
265
266 # Package information for libsmartcols-devel.
267 package libsmartcols-devel
268 summary = Development library and header of libsmartcols.
269 description = %{summary}
270
271 files
272 %{includedir}/libsmartcols/*
273 %{libdir}/libsmartcols.so
274 %{libdir}/pkgconfig/smartcols.pc
275 end
276 end
277
278 package uuidd
279 summary = Helper daemon to guarantee uniqueness of time-based UUIDs.
280 description
281 The uuidd package contains a userspace daemon (uuidd) which guarantees
282 uniqueness of time-based UUID generation even at very high rates on
283 SMP systems.
284 end
285
286 groups += Base
287
288 files
289 %{sbindir}/uuidd
290 %{mandir}/man8/uuidd.8*
291 %{sharedstatedir}/libuuid
292 %{unitdir}/uuidd*
293 /run/uuidd
294 end
295
296 prerequires += shadow-utils
297
298 requires
299 systemd-libs >= 215
300 end
301
302 script prein
303 getent group uuidd >/dev/null || groupadd -r uuidd
304 getent passwd uuidd >/dev/null || \
305 useradd -r -g uuidd -d %{sharedstatedir}/libuuid -s /sbin/nologin \
306 -c "UUID generator helper daemon" uuidd
307 end
308
309 script postin
310 systemctl daemon-reload >/dev/null 2>&1 || :
311 systemctl enable uuidd.service >/dev/null 2>&1 || :
312 end
313
314 script preun
315 systemctl --no-reload disable uuidd.service >/dev/null 2>&1 || :
316 systemctl stop uuidd.service >/dev/null 2>&1 || :
317 end
318
319 script postun
320 systemctl daemon-reload >/dev/null 2>&1 || :
321 end
322
323 script postup
324 systemctl daemon-reload >/dev/null 2>&1 || :
325 systemctl try-restart uuidd.service >/dev/null 2>&1 || :
326 end
327 end
328
329 package python3-libmount
330 template PYTHON3
331 end
332
333 package %{name}-debuginfo
334 template DEBUGINFO
335 end
336 end