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