]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blob - util-linux/util-linux.nm
glibc: Disable multilib support on X86_64
[people/stevee/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.28
8 minor_ver = 2
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 = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/
27
28 build
29 requires
30 audit-devel
31 automake >= 1.15
32 coreutils >= 8.19
33 gettext
34 libcap-devel
35 libcap-ng-devel
36 libudev-devel
37 ncurses-devel
38 pam-devel
39 python3-devel
40 systemd-devel >= 215
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 += \
50 --with-systemdsystemunitdir=%{unitdir} \
51 --disable-wall \
52 --enable-eject \
53 --enable-kill \
54 --enable-partx \
55 --enable-write \
56 --enable-runuser \
57 --enable-su \
58 --with-systemd \
59 --with-audit \
60 --with-udev \
61 --disable-makeinstall-chown \
62 --disable-static \
63 --disable-rpath \
64 --with-python=3
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
77 mkdir -pv \
78 %{BUILDROOT}/var/lib/libuuid \
79 %{BUILDROOT}/var/lib/hwclock \
80 %{BUILDROOT}/usr/share/man/man8 \
81 %{BUILDROOT}/run/uuidd \
82 %{BUILDROOT}/var/log
83
84 install -m 755 %{DIR_APP}/nologin %{BUILDROOT}%{sbindir}
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
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}
93 rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
94 %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
95 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
96
97 # Set capabilities
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
102
103 # su (set right capabilities)
104 chmod -v u-s %{BUILDROOT}%{bindir}/su
105 setcap cap_setgid,cap_setuid+ep %{BUILDROOT}%{bindir}/su
106 end
107 end
108
109 packages
110 package %{name}
111 groups += Base
112
113 requires
114 /etc/pam.d/system-auth
115 end
116
117 provides
118 eject = %{thisver}
119 /bin/dmesg
120 /bin/eject
121 /bin/kill
122 /bin/more
123 /bin/mount
124 /bin/su
125 /bin/umount
126 /sbin/blkid
127 /sbin/blockdev
128 /sbin/findfs
129 /sbin/fsck
130 /sbin/nologin
131 /sbin/runuser
132 end
133
134 obsoletes
135 util-linux-ng
136 eject <= 2.1.5
137 end
138
139 conflicts
140 filesystem < 002
141 bash-completion <= 2.1-2
142 coreutils < 8.19
143 setup < 3.0-2
144 util-linux-ng
145 sysvinit <= 2.86-6
146 end
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
157 end
158
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
166
167 conflicts = filesystem < 002
168
169 files
170 %{libdir}/libblkid.*
171 end
172 end
173
174 # Package information for libblkid-devel
175 package libblkid-devel
176 summary = Development library and header of libblkid.
177 description = %{summary}
178
179 requires
180 libuuid-devel
181 end
182
183 files
184 %{includedir}/blkid/
185 %{libdir}/libblkid.so
186 %{libdir}/pkgconfig/blkid.pc
187 %{mandir}/man3/*blkid*
188 end
189 end
190
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
198
199 requires
200 uuidd=%{thisver}
201 end
202
203 conflicts = filesystem < 002
204
205 files
206 %{libdir}/libuuid.*
207 end
208 end
209
210 # Package information for libuuid-devel
211 package libuuid-devel
212 summary = Development library and header of libuuid.
213 description = %{summary}
214
215 files
216 %{includedir}/uuid/
217 %{libdir}/libuuid.so
218 %{libdir}/pkgconfig/uuid.pc
219 %{mandir}/man3/*uuid*
220 end
221 end
222
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
230
231 conflicts = filesystem < 002
232
233 files
234 %{libdir}/libmount.*
235 end
236 end
237
238 # Package information for libmount-devel
239 package libmount-devel
240 summary = Development library and header of libmount.
241 description = %{summary}
242
243 files
244 %{includedir}/libmount/
245 %{libdir}/libmount.so
246 %{libdir}/pkgconfig/mount.pc
247 %{mandir}/man3/*mount*
248 end
249 end
250
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
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
296 requires
297 systemd-libs >= 215
298 end
299
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
326
327 package python3-libmount
328 template PYTHON3
329 end
330
331 package %{name}-debuginfo
332 template DEBUGINFO
333 end
334 end