]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - util-linux/util-linux.nm
util-linux: Remove SUID bit from mount and umount.
[people/amarx/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 version = 2.19
8 major_ver = 2.19
9 release = 6
10
11 groups = System/Base
12 url = http://kernel.org/~kzak/util-linux/
13 license = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
14 summary = A collection of basic system utilities.
15
16 description
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
20 program.
21 end
22
23 source_dl = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/
24
25 build
26 requires
27 audit-devel
28 gettext
29 libcap-devel
30 libselinux-devel
31 libsepol-devel
32 ncurses-devel
33 pam-devel
34 zlib-devel
35 end
36
37 CFLAGS += \
38 -D_LARGEFILE_SOURCE \
39 -D_LARGEFILE64_SOURCE \
40 -D_FILE_OFFSET_BITS=64
41
42 configure_options += \
43 --bindir=/bin \
44 --sbindir=/sbin \
45 --disable-wall \
46 --enable-kill \
47 --enable-login-utils \
48 --enable-partx \
49 --enable-write \
50 --enable-libmount-mount \
51 --with-selinux \
52 --with-audit \
53 --disable-makeinstall-chown \
54 --disable-static
55
56 prepare_cmds
57 sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
58 -i $(grep -rl '/etc/adjtime' .)
59 end
60
61 # Build nolodin
62 build_cmds
63 gcc %{CFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
64 end
65
66 install_cmds
67 mkdir -pv %{BUILDROOT}/sbin \
68 %{BUILDROOT}/var/lib/hwclock \
69 %{BUILDROOT}/usr/share/man/man8 \
70 %{BUILDROOT}/var/log
71
72 install -m 755 %{DIR_APP}/nologin %{BUILDROOT}/sbin
73 install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/
74
75 touch %{BUILDROOT}/var/log/lastlog
76
77 # Remove deprecated commands
78 rm -fv %{BUILDROOT}/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
79 %{BUILDROOT}/usr/{,s}bin/{chkdupexe,newgrp,vi{gr,pw}} \
80 %{BUILDROOT}/sbin/{sln,shutdown} %{BUILDROOT}/bin/{line,pg}
81 rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
82 %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
83 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
84
85 # Create /etc/mtab symlink
86 mkdir -pv %{BUILDROOT}/etc
87 ln -svf /proc/mounts %{BUILDROOT}/etc/mtab
88
89 # Set capabilities
90 chmod -v -s %{BUILDROOT}/bin/mount
91 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}/bin/mount
92 chmod -v -s %{BUILDROOT}/bin/umount
93 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}/bin/umount
94 end
95 end
96
97 # This symlink is allowed to be absolute.
98 quality-agent
99 whitelist_symlink
100 /etc/mtab
101 end
102 end
103
104 packages
105 package %{name}
106 groups += Base
107
108 requires
109 /etc/pam.d/system-auth
110 end
111
112 filter_requires = /proc/.*/mounts
113
114 obsoletes = util-linux-ng
115
116 conflicts
117 setup<3.0-2
118 util-linux-ng
119 end
120 end
121
122 # Package information for libblkid
123 package libblkid
124 summary = Block device ID library.
125 description
126 This is the block device identification library,
127 part of util-linux.
128 end
129
130 files
131 /lib/libblkid.*
132 end
133 end
134
135 # Package information for libblkid-devel
136 package libblkid-devel
137 summary = Development library and header of libblkid.
138 description = %{summary}
139
140 files
141 /usr/include/blkid/
142 /usr/lib/libblkid.*
143 /usr/lib/pkgconfig/blkid.pc
144 /usr/share/man/man3/*blkid*
145 end
146 end
147
148 # Package information for libuuid
149 package libuuid
150 summary = Universally unique ID library.
151 description
152 This is the universally unique ID library,
153 part of util-linux.
154 end
155
156 files
157 /lib/libuuid.*
158 end
159 end
160
161 # Package information for libuuid-devel
162 package libuuid-devel
163 summary = Development library and header of libuuid.
164 description = %{summary}
165
166 files
167 /usr/include/uuid/
168 /usr/lib/libuuid.*
169 /usr/lib/pkgconfig/uuid.pc
170 /usr/share/man/man3/*uuid*
171 end
172 end
173
174 # Package information for libmount
175 package libmount
176 summary = Device mounting library.
177 description
178 This is the device mounting library,
179 part of util-linux.
180 end
181
182 files
183 /lib/libmount.*
184 end
185 end
186
187 # Package information for libmount-devel
188 package libmount-devel
189 summary = Development library and header of libmount.
190 description = %{summary}
191
192 files
193 /usr/include/mount/
194 /usr/lib/libmount.*
195 /usr/lib/pkgconfig/mount.pc
196 /usr/share/man/man3/*mount*
197 end
198 end
199 end