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