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