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