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