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