]>
Commit | Line | Data |
---|---|---|
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 | 6 | name = util-linux |
e57de674 PM |
7 | ver_maj = 2.38 |
8 | version = %{ver_maj}.1 | |
31bc0a59 | 9 | release = 3 |
802ea3af | 10 | |
60b79c99 | 11 | maintainer = Stefan Schantl <stefan.schantl@ipfire.org> |
802ea3af | 12 | groups = System/Base |
0c3143d8 | 13 | url = https://github.com/karelzak/util-linux |
802ea3af MT |
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 | |
88b867df | 21 | program. |
802ea3af MT |
22 | end |
23 | ||
e57de674 | 24 | source_dl = https://www.kernel.org/pub/linux/utils/%{name}/v%{ver_maj}/ |
802ea3af MT |
25 | |
26 | build | |
27 | requires | |
2e1a3760 | 28 | autoconf >= 1.16 |
e57de674 | 29 | automake >= 1.16 |
f54c3df3 | 30 | coreutils >= 8.19 |
802ea3af MT |
31 | gettext |
32 | libcap-devel | |
0c3143d8 | 33 | libcap-ng-devel |
0c3143d8 | 34 | libudev-devel |
802ea3af MT |
35 | ncurses-devel |
36 | pam-devel | |
0c3143d8 SS |
37 | python3-devel |
38 | systemd-devel >= 215 | |
802ea3af MT |
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 += \ | |
f54c3df3 | 48 | --with-systemdsystemunitdir=%{unitdir} \ |
802ea3af | 49 | --disable-wall \ |
f54c3df3 | 50 | --enable-eject \ |
802ea3af | 51 | --enable-kill \ |
802ea3af MT |
52 | --enable-partx \ |
53 | --enable-write \ | |
0c3143d8 | 54 | --enable-runuser \ |
f54c3df3 | 55 | --enable-su \ |
0c3143d8 | 56 | --with-systemd \ |
f54c3df3 | 57 | --with-udev \ |
802ea3af | 58 | --disable-makeinstall-chown \ |
0c3143d8 SS |
59 | --disable-static \ |
60 | --disable-rpath \ | |
61 | --with-python=3 | |
802ea3af MT |
62 | |
63 | prepare_cmds | |
64 | sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \ | |
65 | -i $(grep -rl '/etc/adjtime' .) | |
66 | end | |
67 | ||
802ea3af | 68 | install_cmds |
3d038b51 | 69 | mkdir -pv \ |
f54c3df3 | 70 | %{BUILDROOT}/var/lib/libuuid \ |
802ea3af MT |
71 | %{BUILDROOT}/var/lib/hwclock \ |
72 | %{BUILDROOT}/usr/share/man/man8 \ | |
73 | %{BUILDROOT}/var/log | |
74 | ||
802ea3af MT |
75 | touch %{BUILDROOT}/var/log/lastlog |
76 | ||
77 | # Remove deprecated commands | |
3d038b51 MT |
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} | |
44ed57ab MT |
81 | rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \ |
82 | %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.* | |
802ea3af MT |
83 | rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh |
84 | ||
daf779d6 | 85 | # Set capabilities |
3d038b51 | 86 | chmod -v -s %{BUILDROOT}%{bindir}/mount |
31bc0a59 | 87 | setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/mount |
3d038b51 | 88 | chmod -v -s %{BUILDROOT}%{bindir}/umount |
31bc0a59 | 89 | setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/umount |
f54c3df3 SS |
90 | |
91 | # su (set right capabilities) | |
92 | chmod -v u-s %{BUILDROOT}%{bindir}/su | |
31bc0a59 | 93 | setcap cap_setgid,cap_setuid+ep %{BUILDROOT}%{bindir}/su |
802ea3af | 94 | end |
802ea3af | 95 | end |
4eb2b603 | 96 | |
802ea3af MT |
97 | packages |
98 | package %{name} | |
7dffb82f MT |
99 | requires |
100 | /etc/pam.d/system-auth | |
101 | end | |
102 | ||
3d038b51 | 103 | provides |
f54c3df3 | 104 | eject = %{thisver} |
3d038b51 | 105 | /bin/dmesg |
f54c3df3 | 106 | /bin/eject |
3d038b51 MT |
107 | /bin/kill |
108 | /bin/more | |
109 | /bin/mount | |
f54c3df3 | 110 | /bin/su |
3d038b51 MT |
111 | /bin/umount |
112 | /sbin/blkid | |
113 | /sbin/blockdev | |
114 | /sbin/findfs | |
115 | /sbin/fsck | |
116 | /sbin/nologin | |
0c3143d8 | 117 | /sbin/runuser |
3d038b51 MT |
118 | end |
119 | ||
f54c3df3 SS |
120 | obsoletes |
121 | util-linux-ng | |
122 | eject <= 2.1.5 | |
123 | end | |
7dffb82f MT |
124 | |
125 | conflicts | |
3d038b51 | 126 | filesystem < 002 |
0c3143d8 | 127 | bash-completion <= 2.1-2 |
f54c3df3 | 128 | coreutils < 8.19 |
fc95e010 | 129 | setup < 3.0-2 |
7dffb82f | 130 | util-linux-ng |
815288f0 | 131 | sysvinit <= 2.86-6 |
7dffb82f | 132 | end |
50f0e95a MT |
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 | |
802ea3af | 143 | end |
44ed57ab | 144 | |
802ea3af MT |
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 | |
1f9bc2f0 | 152 | |
3d038b51 MT |
153 | conflicts = filesystem < 002 |
154 | ||
802ea3af | 155 | files |
fc95e010 | 156 | %{libdir}/libblkid.* |
802ea3af MT |
157 | end |
158 | end | |
44ed57ab | 159 | |
802ea3af | 160 | # Package information for libblkid-devel |
44ed57ab | 161 | package libblkid-devel |
802ea3af MT |
162 | summary = Development library and header of libblkid. |
163 | description = %{summary} | |
1f9bc2f0 | 164 | |
53a92667 SS |
165 | requires |
166 | libuuid-devel | |
167 | end | |
168 | ||
802ea3af | 169 | files |
fc95e010 MT |
170 | %{includedir}/blkid/ |
171 | %{libdir}/libblkid.so | |
2a0484c1 | 172 | %{libdir}/pkgconfig/blkid.pc |
fc95e010 | 173 | %{mandir}/man3/*blkid* |
802ea3af MT |
174 | end |
175 | end | |
44ed57ab | 176 | |
802ea3af MT |
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 | |
1f9bc2f0 | 184 | |
f54c3df3 SS |
185 | requires |
186 | uuidd=%{thisver} | |
187 | end | |
188 | ||
3d038b51 MT |
189 | conflicts = filesystem < 002 |
190 | ||
802ea3af | 191 | files |
fc95e010 | 192 | %{libdir}/libuuid.* |
802ea3af MT |
193 | end |
194 | end | |
44ed57ab | 195 | |
802ea3af MT |
196 | # Package information for libuuid-devel |
197 | package libuuid-devel | |
198 | summary = Development library and header of libuuid. | |
199 | description = %{summary} | |
1f9bc2f0 | 200 | |
802ea3af | 201 | files |
fc95e010 MT |
202 | %{includedir}/uuid/ |
203 | %{libdir}/libuuid.so | |
2a0484c1 | 204 | %{libdir}/pkgconfig/uuid.pc |
fc95e010 | 205 | %{mandir}/man3/*uuid* |
802ea3af MT |
206 | end |
207 | end | |
44ed57ab | 208 | |
802ea3af MT |
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 | |
1f9bc2f0 | 216 | |
3d038b51 MT |
217 | conflicts = filesystem < 002 |
218 | ||
802ea3af | 219 | files |
fc95e010 | 220 | %{libdir}/libmount.* |
802ea3af MT |
221 | end |
222 | end | |
44ed57ab | 223 | |
802ea3af MT |
224 | # Package information for libmount-devel |
225 | package libmount-devel | |
226 | summary = Development library and header of libmount. | |
227 | description = %{summary} | |
1f9bc2f0 | 228 | |
3410b8ca SS |
229 | requires |
230 | libblkid-devel = %{thisver} | |
231 | end | |
232 | ||
802ea3af | 233 | files |
2e8f240b | 234 | %{includedir}/libmount/ |
fc95e010 | 235 | %{libdir}/libmount.so |
2a0484c1 | 236 | %{libdir}/pkgconfig/mount.pc |
fc95e010 | 237 | %{mandir}/man3/*mount* |
802ea3af MT |
238 | end |
239 | end | |
1f9bc2f0 | 240 | |
0c3143d8 SS |
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 | ||
2b8dfe67 SS |
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 | ||
f54c3df3 SS |
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 | ||
f54c3df3 SS |
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 | ||
0c3143d8 SS |
306 | requires |
307 | systemd-libs >= 215 | |
308 | end | |
309 | ||
f54c3df3 SS |
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 | |
0c3143d8 SS |
336 | |
337 | package python3-libmount | |
338 | template PYTHON3 | |
339 | end | |
f54c3df3 | 340 | |
1f9bc2f0 MT |
341 | package %{name}-debuginfo |
342 | template DEBUGINFO | |
343 | end | |
802ea3af | 344 | end |