]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - util-linux/util-linux.nm
libnetfilter_queue: Update to 1.0.2.
[people/ms/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.22
8 minor_ver = 1
9 version = %{major_ver}.%{minor_ver}
10 release = 1
11
12 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
13 groups = System/Base
14 url = http://kernel.org/~kzak/util-linux/
15 license = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
16 summary = A collection of basic system utilities.
17
18 description
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
22 program.
23 end
24
25 source_dl = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/
26
27 build
28 requires
29 audit-devel
30 coreutils >= 8.19
31 gettext
32 libcap-devel
33 libselinux-devel
34 libsepol-devel
35 ncurses-devel
36 pam-devel
37 libudev-devel
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 += \
47 --with-systemdsystemunitdir=%{unitdir} \
48 --disable-wall \
49 --enable-eject \
50 --enable-kill \
51 --enable-partx \
52 --enable-write \
53 --enable-su \
54 --enable-socket-activation \
55 --enable-libmount-mount \
56 --with-selinux \
57 --with-audit \
58 --with-udev \
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
73 mkdir -pv \
74 %{BUILDROOT}/var/lib/libuuid \
75 %{BUILDROOT}/var/lib/hwclock \
76 %{BUILDROOT}/usr/share/man/man8 \
77 %{BUILDROOT}/run/uuidd \
78 %{BUILDROOT}/var/log
79
80 install -m 755 %{DIR_APP}/nologin %{BUILDROOT}%{sbindir}
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
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}
89 rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
90 %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
91 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
92
93 # Set capabilities
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
98
99 # su (set right capabilities)
100 chmod -v u-s %{BUILDROOT}%{bindir}/su
101 setcap cap_setgid,cap_setuid+ep %{BUILDROOT}%{bindir}/su
102 end
103 end
104
105 packages
106 package %{name}
107 groups += Base
108
109 requires
110 /etc/pam.d/system-auth
111 end
112
113 provides
114 eject = %{thisver}
115 /bin/dmesg
116 /bin/eject
117 /bin/kill
118 /bin/more
119 /bin/mount
120 /bin/su
121 /bin/umount
122 /sbin/blkid
123 /sbin/blockdev
124 /sbin/findfs
125 /sbin/fsck
126 /sbin/nologin
127 end
128
129 obsoletes
130 util-linux-ng
131 eject <= 2.1.5
132 end
133
134 conflicts
135 filesystem < 002
136 coreutils < 8.19
137 setup < 3.0-2
138 util-linux-ng
139 sysvinit <= 2.86-2
140 end
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
151 end
152
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
160
161 conflicts = filesystem < 002
162
163 files
164 %{libdir}/libblkid.*
165 end
166 end
167
168 # Package information for libblkid-devel
169 package libblkid-devel
170 summary = Development library and header of libblkid.
171 description = %{summary}
172
173 requires
174 libuuid-devel
175 end
176
177 files
178 %{includedir}/blkid/
179 %{libdir}/libblkid.so
180 %{libdir}/pkgconfig/blkid.pc
181 %{mandir}/man3/*blkid*
182 end
183 end
184
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
192
193 requires
194 uuidd=%{thisver}
195 end
196
197 conflicts = filesystem < 002
198
199 files
200 %{libdir}/libuuid.*
201 end
202 end
203
204 # Package information for libuuid-devel
205 package libuuid-devel
206 summary = Development library and header of libuuid.
207 description = %{summary}
208
209 files
210 %{includedir}/uuid/
211 %{libdir}/libuuid.so
212 %{libdir}/pkgconfig/uuid.pc
213 %{mandir}/man3/*uuid*
214 end
215 end
216
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
224
225 conflicts = filesystem < 002
226
227 files
228 %{libdir}/libmount.*
229 end
230 end
231
232 # Package information for libmount-devel
233 package libmount-devel
234 summary = Development library and header of libmount.
235 description = %{summary}
236
237 files
238 %{includedir}/libmount/
239 %{libdir}/libmount.so
240 %{libdir}/pkgconfig/mount.pc
241 %{mandir}/man3/*mount*
242 end
243 end
244
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
292 package %{name}-debuginfo
293 template DEBUGINFO
294 end
295 end