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