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