diff options
Diffstat (limited to 'meta/recipes-core/util-linux')
23 files changed, 1221 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc new file mode 100644 index 0000000000..dbc6a2856f --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux.inc | |||
@@ -0,0 +1,276 @@ | |||
1 | SUMMARY = "A suite of basic system administration utilities" | ||
2 | DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \ | ||
3 | commonly found on most Linux systems. Some of the more important utilities include \ | ||
4 | disk partitioning, kernel message management, filesystem creation, and system login." | ||
5 | |||
6 | SECTION = "base" | ||
7 | |||
8 | LICENSE = "GPLv2+ & LGPLv2.1+ & BSD" | ||
9 | |||
10 | LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c \ | ||
11 | file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
12 | file://Documentation/licenses/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
13 | file://Documentation/licenses/COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \ | ||
14 | file://Documentation/licenses/COPYING.BSD-3;md5=58dcd8452651fc8b07d1f65ce07ca8af \ | ||
15 | file://Documentation/licenses/COPYING.UCB;md5=263860f8968d8bafa5392cab74285262 \ | ||
16 | file://libuuid/COPYING;md5=b442ffb762cf8d3e9df1b99e0bb4af70 \ | ||
17 | file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \ | ||
18 | file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16" | ||
19 | |||
20 | inherit autotools gettext pkgconfig systemd ptest | ||
21 | DEPENDS = "zlib ncurses" | ||
22 | DEPENDS_append_class-native = " lzo-native" | ||
23 | DEPENDS_append_class-nativesdk = " lzo-native" | ||
24 | |||
25 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \ | ||
26 | file://MCONFIG \ | ||
27 | file://defines.h \ | ||
28 | file://make_include \ | ||
29 | file://swapargs.h \ | ||
30 | file://ptest.patch \ | ||
31 | file://run-ptest \ | ||
32 | file://avoid_unsupported_find_opts.patch \ | ||
33 | file://avoid_unsupported_grep_opts.patch \ | ||
34 | file://avoid_unsupported_sleep_param.patch \ | ||
35 | file://display_testname_for_subtest.patch \ | ||
36 | " | ||
37 | |||
38 | PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfdisk \ | ||
39 | util-linux-swaponoff util-linux-losetup util-linux-umount \ | ||
40 | util-linux-mount util-linux-readprofile util-linux-libblkid \ | ||
41 | util-linux-libmount util-linux-libuuid util-linux-uuidd \ | ||
42 | util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \ | ||
43 | util-linux-mkfs util-linux-mcookie util-linux-reset \ | ||
44 | util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \ | ||
45 | util-linux-partx ${PN}-bash-completion util-linux-hwclock \ | ||
46 | util-linux-findfs" | ||
47 | |||
48 | SHARED_EXTRA_OECONF = "--disable-use-tty-group \ | ||
49 | --disable-makeinstall-chown \ | ||
50 | --enable-kill --enable-last --enable-mesg --enable-partx \ | ||
51 | --enable-raw --enable-reset --disable-login \ | ||
52 | --disable-vipw --disable-newgrp --disable-chfn-chsh \ | ||
53 | --enable-write --enable-mount \ | ||
54 | --enable-libuuid --enable-libblkid --enable-fsck --without-udev \ | ||
55 | usrsbin_execdir='${sbindir}' \ | ||
56 | " | ||
57 | |||
58 | EXTRA_OECONF = "${SHARED_EXTRA_OECONF} --libdir=${base_libdir}" | ||
59 | |||
60 | PACKAGECONFIG_class-target ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ | ||
61 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} " | ||
62 | PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam," | ||
63 | |||
64 | # Respect the systemd feature for uuidd | ||
65 | PACKAGECONFIG[systemd] = "--enable-socket-activation --with-systemdsystemunitdir=${systemd_unitdir}/system/, --disable-socket-activation --without-systemdsystemunitdir" | ||
66 | |||
67 | # Build setpriv requires libcap-ng | ||
68 | PACKAGECONFIG[libcap-ng] = "--enable-setpriv,--disable-setpriv,libcap-ng," | ||
69 | |||
70 | FILES_${PN}-bash-completion += "${datadir}/bash-completion" | ||
71 | FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*" | ||
72 | |||
73 | FILES_util-linux-agetty = "${base_sbindir}/agetty" | ||
74 | FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${BPN}" | ||
75 | FILES_util-linux-fstrim = "${base_sbindir}/fstrim" | ||
76 | FILES_util-linux-cfdisk = "${base_sbindir}/cfdisk" | ||
77 | FILES_util-linux-sfdisk = "${sbindir}/sfdisk" | ||
78 | FILES_util-linux-swaponoff = "${base_sbindir}/swapon.${BPN} ${base_sbindir}/swapoff.${BPN}" | ||
79 | FILES_util-linux-losetup = "${base_sbindir}/losetup.${BPN}" | ||
80 | FILES_util-linux-mount = "${base_bindir}/mount.${BPN}" | ||
81 | FILES_util-linux-mcookie = "${bindir}/mcookie" | ||
82 | FILES_util-linux-umount = "${base_bindir}/umount.${BPN}" | ||
83 | FILES_util-linux-readprofile = "${base_sbindir}/readprofile.${BPN}" | ||
84 | FILES_util-linux-uuidgen = "${bindir}/uuidgen" | ||
85 | FILES_util-linux-uuidd = "${sbindir}/uuidd" | ||
86 | FILES_util-linux-reset = "${base_bindir}/reset" | ||
87 | FILES_util-linux-partx = "${sbindir}/partx" | ||
88 | FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}" | ||
89 | FILES_util-linux-findfs = "${sbindir}/findfs" | ||
90 | |||
91 | FILES_util-linux-libblkid = "${base_libdir}/libblkid.so.*" | ||
92 | FILES_util-linux-libmount = "${base_libdir}/libmount.so.*" | ||
93 | FILES_util-linux-libuuid = "${base_libdir}/libuuid.so.*" | ||
94 | FILES_util-linux-lscpu = "${bindir}/lscpu" | ||
95 | |||
96 | FILES_util-linux-fsck = "${base_sbindir}/fsck*" | ||
97 | FILES_util-linux-mkfs = "${sbindir}/mkfs" | ||
98 | |||
99 | FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs" | ||
100 | FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs" | ||
101 | |||
102 | |||
103 | # Util-linux' blkid replaces the e2fsprogs one | ||
104 | FILES_util-linux-blkid = "${base_sbindir}/blkid*" | ||
105 | RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid" | ||
106 | RREPLACES_util-linux-blkid = "e2fsprogs-blkid" | ||
107 | |||
108 | # reset calls 'tput' | ||
109 | RDEPENDS_util-linux-reset += "ncurses" | ||
110 | |||
111 | RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup" | ||
112 | RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs " | ||
113 | |||
114 | RRECOMMENDS_${PN}_class-native = "" | ||
115 | RRECOMMENDS_${PN}_class-nativesdk = "" | ||
116 | RDEPENDS_${PN}_class-native = "" | ||
117 | RDEPENDS_${PN}_class-nativesdk = "" | ||
118 | |||
119 | RPROVIDES_${PN}-dev = "util-linux-libblkid-dev util-linux-libmount-dev util-linux-libuuid-dev" | ||
120 | |||
121 | SYSTEMD_PACKAGES = "${PN}-uuidd" | ||
122 | SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.service" | ||
123 | |||
124 | do_compile () { | ||
125 | set -e | ||
126 | install ${WORKDIR}/MCONFIG ${S}/MCONFIG | ||
127 | install ${WORKDIR}/make_include ${S}/make_include | ||
128 | install ${WORKDIR}/swapargs.h ${S}/mount-deprecated/swapargs.h | ||
129 | install ${WORKDIR}/defines.h ${S}/defines.h | ||
130 | oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}' | ||
131 | } | ||
132 | |||
133 | do_install () { | ||
134 | # with ccache the timestamps on compiled files may | ||
135 | # end up earlier than on their inputs, this allows | ||
136 | # for the resultant compilation in the install step. | ||
137 | oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \ | ||
138 | 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \ | ||
139 | 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install | ||
140 | |||
141 | mkdir -p ${D}${base_bindir} | ||
142 | |||
143 | sbinprogs="agetty ctrlaltdel cfdisk vipw vigr" | ||
144 | sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk readprofile fsck blkid blockdev fstrim sulogin switch_root" | ||
145 | usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice utmpdump wall setsid chrt flock getopt" | ||
146 | binprogs_a="dmesg kill more umount mount login reset su" | ||
147 | |||
148 | if [ "${base_sbindir}" != "${sbindir}" ]; then | ||
149 | mkdir -p ${D}${base_sbindir} | ||
150 | for p in $sbinprogs $sbinprogs_a; do | ||
151 | if [ -f "${D}${sbindir}/$p" ]; then | ||
152 | mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p" | ||
153 | fi | ||
154 | done | ||
155 | fi | ||
156 | |||
157 | if [ "${base_bindir}" != "${bindir}" ]; then | ||
158 | mkdir -p ${D}${base_bindir} | ||
159 | for p in $binprogs_a; do | ||
160 | if [ -f "${D}${bindir}/$p" ]; then | ||
161 | mv "${D}${bindir}/$p" "${D}${base_bindir}/$p" | ||
162 | fi | ||
163 | done | ||
164 | fi | ||
165 | |||
166 | install -d ${D}${sysconfdir}/default/ | ||
167 | echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall | ||
168 | |||
169 | rm -f ${D}${bindir}/chkdupexe | ||
170 | } | ||
171 | |||
172 | inherit update-alternatives | ||
173 | |||
174 | ALTERNATIVE_PRIORITY = "100" | ||
175 | |||
176 | ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root switch_root" | ||
177 | ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg renice wall" | ||
178 | ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject getopt sulogin" | ||
179 | |||
180 | ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg" | ||
181 | ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill" | ||
182 | ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more" | ||
183 | ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap" | ||
184 | ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev" | ||
185 | ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root" | ||
186 | ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root" | ||
187 | ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix" | ||
188 | ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject" | ||
189 | ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" | ||
190 | ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" | ||
191 | ALTERNATIVE_TARGET[getopt] = "${bindir}/getopt" | ||
192 | |||
193 | ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1 reset.1" | ||
194 | |||
195 | ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" | ||
196 | ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" | ||
197 | ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" | ||
198 | ALTERNATIVE_LINK_NAME[reset.1] = "${mandir}/man1/reset.1" | ||
199 | ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" | ||
200 | ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" | ||
201 | ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" | ||
202 | |||
203 | ALTERNATIVE_util-linux-hwclock = "hwclock" | ||
204 | # There seems to be problem, atleast on nslu2, with these, untill they are | ||
205 | # fixed the busybox ones have higher priority | ||
206 | ALTERNATIVE_PRIORITY[hwclock] = "10" | ||
207 | ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock" | ||
208 | |||
209 | ALTERNATIVE_util-linux-fdisk = "fdisk" | ||
210 | ALTERNATIVE_LINK_NAME[fdisk] = "${base_sbindir}/fdisk" | ||
211 | |||
212 | ALTERNATIVE_util-linux-agetty = "getty" | ||
213 | ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" | ||
214 | ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty" | ||
215 | |||
216 | ALTERNATIVE_util-linux-mount = "mount" | ||
217 | ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount" | ||
218 | |||
219 | ALTERNATIVE_util-linux-umount = "umount" | ||
220 | ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" | ||
221 | |||
222 | ALTERNATIVE_util-linux-readprofile = "readprofile" | ||
223 | ALTERNATIVE_LINK_NAME[readprofile] = "${base_sbindir}/readprofile" | ||
224 | |||
225 | ALTERNATIVE_util-linux-losetup = "losetup" | ||
226 | ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup" | ||
227 | |||
228 | ALTERNATIVE_util-linux-swaponoff = "swapoff swapon" | ||
229 | ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff" | ||
230 | ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon" | ||
231 | |||
232 | ALTERNATIVE_util-linux-fsck = "fsck.minix fsck" | ||
233 | ALTERNATIVE_LINK_NAME[fsck.minix] = "${base_sbindir}/fsck.minix" | ||
234 | ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck" | ||
235 | |||
236 | ALTERNATIVE_util-linux-blkid = "blkid" | ||
237 | ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" | ||
238 | |||
239 | ALTERNATIVE_util-linux-reset = "reset" | ||
240 | ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset" | ||
241 | ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset" | ||
242 | |||
243 | BBCLASSEXTEND = "native nativesdk" | ||
244 | |||
245 | python do_package_prepend () { | ||
246 | if '--enable-su' in d.getVar('EXTRA_OECONF', True).split(): | ||
247 | alt_name = "su" | ||
248 | d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('base_bindir', True), alt_name)) | ||
249 | d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name) | ||
250 | } | ||
251 | |||
252 | do_compile_ptest() { | ||
253 | oe_runmake buildtest-TESTS | ||
254 | } | ||
255 | |||
256 | do_install_ptest() { | ||
257 | mkdir -p ${D}${PTEST_PATH}/tests/ts | ||
258 | find . -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; | ||
259 | cp ${S}/tests/functions.sh ${D}${PTEST_PATH}/tests/ | ||
260 | cp ${S}/tests/commands.sh ${D}${PTEST_PATH}/tests/ | ||
261 | cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/ | ||
262 | cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected | ||
263 | |||
264 | list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look lscpu md5 misc more namei paths schedutils script swapon tailf utmpdump" | ||
265 | # The following tests are not installed yet: | ||
266 | # blkid scsi_debug module dependent | ||
267 | # cramfs gcc dependent | ||
268 | # eject gcc dependent | ||
269 | # fdisk scsi_debug module and gcc dependent | ||
270 | # libmount uuidgen dependent | ||
271 | # mount gcc dependant | ||
272 | # partx blkid dependant | ||
273 | for d in $list; do | ||
274 | cp -pR ${S}/tests/ts/$d ${D}${PTEST_PATH}/tests/ts/ | ||
275 | done | ||
276 | } | ||
diff --git a/meta/recipes-core/util-linux/util-linux/CVE-2014-9114.patch b/meta/recipes-core/util-linux/util-linux/CVE-2014-9114.patch new file mode 100644 index 0000000000..46c5e8ecb7 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/CVE-2014-9114.patch | |||
@@ -0,0 +1,176 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | This patch is for CVE-2014-9114. | ||
4 | This patch should be removed once util-linux is upgraded to 2.26. | ||
5 | |||
6 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
7 | |||
8 | From 89e90ae7b2826110ea28c1c0eb8e7c56c3907bdc Mon Sep 17 00:00:00 2001 | ||
9 | From: Karel Zak <kzak@redhat.com> | ||
10 | Date: Thu, 27 Nov 2014 13:39:35 +0100 | ||
11 | Subject: [PATCH] libblkid: care about unsafe chars in cache | ||
12 | |||
13 | The high-level libblkid API uses /run/blkid/blkid.tab cache to | ||
14 | store probing results. The cache format is | ||
15 | |||
16 | <device NAME="value" ...>devname</device> | ||
17 | |||
18 | and unfortunately the cache code does not escape quotation marks: | ||
19 | |||
20 | # mkfs.ext4 -L 'AAA"BBB' | ||
21 | |||
22 | # cat /run/blkid/blkid.tab | ||
23 | ... | ||
24 | <device ... LABEL="AAA"BBB" ...>/dev/sdb1</device> | ||
25 | |||
26 | such string is later incorrectly parsed and blkid(8) returns | ||
27 | nonsenses. And for use-cases like | ||
28 | |||
29 | # eval $(blkid -o export /dev/sdb1) | ||
30 | |||
31 | it's also insecure. | ||
32 | |||
33 | Note that mount, udevd and blkid -p are based on low-level libblkid | ||
34 | API, it bypass the cache and directly read data from the devices. | ||
35 | |||
36 | The current udevd upstream does not depend on blkid(8) output at all, | ||
37 | it's directly linked with the library and all unsafe chars are encoded by | ||
38 | \x<hex> notation. | ||
39 | |||
40 | # mkfs.ext4 -L 'X"`/tmp/foo` "' /dev/sdb1 | ||
41 | # udevadm info --export-db | grep LABEL | ||
42 | ... | ||
43 | E: ID_FS_LABEL=X__/tmp/foo___ | ||
44 | E: ID_FS_LABEL_ENC=X\x22\x60\x2ftmp\x2ffoo\x60\x20\x22 | ||
45 | |||
46 | Signed-off-by: Karel Zak <kzak@redhat.com> | ||
47 | --- | ||
48 | libblkid/src/read.c | 21 ++++++++++++++++++--- | ||
49 | libblkid/src/save.c | 22 +++++++++++++++++++++- | ||
50 | misc-utils/blkid.8 | 5 ++++- | ||
51 | misc-utils/blkid.c | 4 ++-- | ||
52 | 4 files changed, 45 insertions(+), 7 deletions(-) | ||
53 | |||
54 | Index: util-linux-2.24.2/libblkid/src/save.c | ||
55 | =================================================================== | ||
56 | --- util-linux-2.24.2.orig/libblkid/src/save.c | ||
57 | +++ util-linux-2.24.2/libblkid/src/save.c | ||
58 | @@ -26,6 +26,21 @@ | ||
59 | |||
60 | #include "blkidP.h" | ||
61 | |||
62 | + | ||
63 | +static void save_quoted(const char *data, FILE *file) | ||
64 | +{ | ||
65 | + const char *p; | ||
66 | + | ||
67 | + fputc('"', file); | ||
68 | + for (p = data; p && *p; p++) { | ||
69 | + if ((unsigned char) *p == 0x22 || /* " */ | ||
70 | + (unsigned char) *p == 0x5c) /* \ */ | ||
71 | + fputc('\\', file); | ||
72 | + | ||
73 | + fputc(*p, file); | ||
74 | + } | ||
75 | + fputc('"', file); | ||
76 | +} | ||
77 | static int save_dev(blkid_dev dev, FILE *file) | ||
78 | { | ||
79 | struct list_head *p; | ||
80 | @@ -43,9 +58,14 @@ static int save_dev(blkid_dev dev, FILE | ||
81 | |||
82 | if (dev->bid_pri) | ||
83 | fprintf(file, " PRI=\"%d\"", dev->bid_pri); | ||
84 | + | ||
85 | list_for_each(p, &dev->bid_tags) { | ||
86 | blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags); | ||
87 | - fprintf(file, " %s=\"%s\"", tag->bit_name,tag->bit_val); | ||
88 | + | ||
89 | + fputc(' ', file); /* space between tags */ | ||
90 | + fputs(tag->bit_name, file); /* tag NAME */ | ||
91 | + fputc('=', file); /* separator between NAME and VALUE */ | ||
92 | + save_quoted(tag->bit_val, file); /* tag "VALUE" */ | ||
93 | } | ||
94 | fprintf(file, ">%s</device>\n", dev->bid_name); | ||
95 | |||
96 | Index: util-linux-2.24.2/misc-utils/blkid.8 | ||
97 | =================================================================== | ||
98 | --- util-linux-2.24.2.orig/misc-utils/blkid.8 | ||
99 | +++ util-linux-2.24.2/misc-utils/blkid.8 | ||
100 | @@ -193,7 +193,10 @@ partitions. This output format is \fBDE | ||
101 | .TP | ||
102 | .B export | ||
103 | print key=value pairs for easy import into the environment; this output format | ||
104 | -is automatically enabled when I/O Limits (\fB-i\fR option) are requested | ||
105 | +is automatically enabled when I/O Limits (\fB-i\fR option) are requested. | ||
106 | + | ||
107 | +The non-printing characters are encoded by ^ and M- notation and all | ||
108 | +potentially unsafe characters are escaped. | ||
109 | .RE | ||
110 | .TP | ||
111 | .BI \-O " offset" | ||
112 | Index: util-linux-2.24.2/misc-utils/blkid.c | ||
113 | =================================================================== | ||
114 | --- util-linux-2.24.2.orig/misc-utils/blkid.c | ||
115 | +++ util-linux-2.24.2/misc-utils/blkid.c | ||
116 | @@ -306,7 +306,7 @@ static void print_value(int output, int | ||
117 | printf("DEVNAME=%s\n", devname); | ||
118 | fputs(name, stdout); | ||
119 | fputs("=", stdout); | ||
120 | - safe_print(value, valsz, NULL); | ||
121 | + safe_print(value, valsz, " \\\"'$`<>"); | ||
122 | fputs("\n", stdout); | ||
123 | |||
124 | } else { | ||
125 | @@ -314,7 +314,7 @@ static void print_value(int output, int | ||
126 | printf("%s: ", devname); | ||
127 | fputs(name, stdout); | ||
128 | fputs("=\"", stdout); | ||
129 | - safe_print(value, valsz, "\""); | ||
130 | + safe_print(value, valsz, "\"\\"); | ||
131 | fputs("\" ", stdout); | ||
132 | } | ||
133 | } | ||
134 | Index: util-linux-2.24.2/libblkid/src/read.c | ||
135 | =================================================================== | ||
136 | --- util-linux-2.24.2.orig/libblkid/src/read.c | ||
137 | +++ util-linux-2.24.2/libblkid/src/read.c | ||
138 | @@ -252,8 +252,23 @@ static int parse_token(char **name, char | ||
139 | *value = skip_over_blank(*value + 1); | ||
140 | |||
141 | if (**value == '"') { | ||
142 | - end = strchr(*value + 1, '"'); | ||
143 | - if (!end) { | ||
144 | + char *p = end = *value + 1; | ||
145 | + | ||
146 | + /* convert 'foo\"bar' to 'foo"bar' */ | ||
147 | + while (*p) { | ||
148 | + if (*p == '\\') { | ||
149 | + p++; | ||
150 | + *end = *p; | ||
151 | + } else { | ||
152 | + *end = *p; | ||
153 | + if (*p == '"') | ||
154 | + break; | ||
155 | + } | ||
156 | + p++; | ||
157 | + end = ++p; | ||
158 | + } | ||
159 | + | ||
160 | + if (*end != '"') { | ||
161 | DBG(READ, blkid_debug("unbalanced quotes at: %s", *value)); | ||
162 | *cp = *value; | ||
163 | return -BLKID_ERR_CACHE; | ||
164 | @@ -261,11 +276,11 @@ static int parse_token(char **name, char | ||
165 | (*value)++; | ||
166 | *end = '\0'; | ||
167 | end++; | ||
168 | + end = ++p; | ||
169 | } else { | ||
170 | end = skip_over_word(*value); | ||
171 | if (*end) { | ||
172 | *end = '\0'; | ||
173 | - end++; | ||
174 | } | ||
175 | } | ||
176 | *cp = end; | ||
diff --git a/meta/recipes-core/util-linux/util-linux/MCONFIG b/meta/recipes-core/util-linux/util-linux/MCONFIG new file mode 100644 index 0000000000..3fea2c02d7 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/MCONFIG | |||
@@ -0,0 +1,223 @@ | |||
1 | # MCONFIG -- Configuration stuff for util-linux | ||
2 | # Created: Sat Feb 4 15:50:30 1995 | ||
3 | # Copyright 1995 Rickard E. Faith (faith@cs.unc.edu) | ||
4 | |||
5 | # For a user-mode install, make (at least) three changes: | ||
6 | # - remove the `-o root' part in INSTALLSUID | ||
7 | # - set USE_TTY_GROUP=no | ||
8 | # - define DESTDIR | ||
9 | |||
10 | # Select for ARCH one of intel, alpha, sparc, arm, m68k, mips | ||
11 | # Select for CPU i386 if the binaries must be able to run on an intel 386 | ||
12 | # (by default i486 code is generated, see below) | ||
13 | CPU=$(shell uname -m) | ||
14 | ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/') | ||
15 | |||
16 | # If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp | ||
17 | # will use PAM for authentication. Additionally, passwd will not be | ||
18 | # installed as it is not PAM aware. | ||
19 | HAVE_PAM=no | ||
20 | |||
21 | # If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd, | ||
22 | # and vipw will not be built or installed from the login-utils | ||
23 | # subdirectory. | ||
24 | HAVE_SHADOW=yes | ||
25 | |||
26 | # If HAVE_PASSWD is set to "yes", then passwd will not be built or | ||
27 | # installed from the login-utils subdirectory (but login, chfn, chsh, | ||
28 | # newgrp, and vipw *will* be installed). | ||
29 | HAVE_PASSWD=no | ||
30 | |||
31 | # If you use chfn and chsh from this package, REQUIRE_PASSWORD will require | ||
32 | # non-root users to enter the account password before updating /etc/passwd. | ||
33 | REQUIRE_PASSWORD=yes | ||
34 | #REQUIRE_PASSWORD=no | ||
35 | |||
36 | # If you use chsh from this package, ONLY_LISTED_SHELLS will require that | ||
37 | # the selected shell be listed in /etc/shells -- otherwise only a warning is | ||
38 | # printed. This prevents someone from setting their shell to /bin/false. | ||
39 | ONLY_LISTED_SHELLS=yes | ||
40 | #ONLY_LISTED_SHELLS=no | ||
41 | |||
42 | |||
43 | # If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not | ||
44 | # be built or installed from the login-utils subdirectory. (The shutdown | ||
45 | # and halt that come with the SysVinit package should be used with the init | ||
46 | # found in that package.) | ||
47 | HAVE_SYSVINIT=no | ||
48 | |||
49 | # If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will | ||
50 | # not be built or installed from the login-utils subdirectory. (The | ||
51 | # shutdown and init from the SysVinit package do not depend on the last, | ||
52 | # mesg, and wall from that package.) | ||
53 | HAVE_SYSVINIT_UTILS=no | ||
54 | |||
55 | # If HAVE_WRITE is set to "yes", then write will not be built or | ||
56 | # installed from the misc-utils subdirectory. | ||
57 | # (There is a network aware write in netwrite from NetKit 0.16 or later.) | ||
58 | HAVE_WRITE=no | ||
59 | |||
60 | # If HAVE_GETTY is set to "yes", then agetty will not be built or | ||
61 | # installed from the login-utils subdirectory. Note that agetty can | ||
62 | # co-exist with other gettys, so this option should never be used. | ||
63 | HAVE_GETTY=no | ||
64 | |||
65 | # If USE_TTY_GROUP is set to "yes", then wall and write will be installed | ||
66 | # setgid to the "tty" group, and mesg will only set the group write bit. | ||
67 | # Note that this is only useful if login/xterm/etc. change the group of the | ||
68 | # user's tty to "tty" [The login in util-linux does this correctly, and | ||
69 | # xterm will do it correctly if X is compiled with USE_TTY_GROUP set | ||
70 | # properly.] | ||
71 | USE_TTY_GROUP=no | ||
72 | |||
73 | # If HAVE_KILL is set to "yes", then kill will not be built or | ||
74 | # installed from the misc-utils subdirectory. | ||
75 | # (There is also a kill in the procps package.) | ||
76 | HAVE_KILL=no | ||
77 | |||
78 | # If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN | ||
79 | # to the current user, allowing her to make a screendump and do other | ||
80 | # nifty things on the console, but also allowing him to keep an open | ||
81 | # file descriptor after logging out to trick the next user. | ||
82 | ALLOW_VCS_USE=yes | ||
83 | |||
84 | # If HAVE_RESET is set to "yes", then reset won't be installed. The version | ||
85 | # of reset that comes with the ncurses package is less aggressive. | ||
86 | HAVE_RESET=yes | ||
87 | |||
88 | # If HAVE_SLN is set to "yes", then sln won't be installed | ||
89 | # (but the man page sln.8 will be installed anyway). | ||
90 | # sln also comes with libc and glibc. | ||
91 | HAVE_SLN=no | ||
92 | |||
93 | # If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed. | ||
94 | HAVE_FDUTILS=no | ||
95 | |||
96 | # If SILENT_PG is set to "yes", then pg will not ring the bell | ||
97 | # when an invalid key is pressed | ||
98 | SILENT_PG=no | ||
99 | |||
100 | # If configure decides that Native Language Support (NLS) is available, | ||
101 | # it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set | ||
102 | # DISABLE_NLS to "yes". | ||
103 | DISABLE_NLS=no | ||
104 | |||
105 | # Different optimizations for different cpus. | ||
106 | # gcc 3.0 likes options -mcpu=i486 instead of -m486 | ||
107 | ifeq "$(ARCH)" "intel" | ||
108 | ifeq "$(HAVE_OLD_GCC)" "yes" | ||
109 | CPUHEAD=-m | ||
110 | else | ||
111 | CPUHEAD=-mcpu=i | ||
112 | endif | ||
113 | ifeq "$(CPU)" "i386" | ||
114 | CPUTAIL=386 | ||
115 | else | ||
116 | CPUTAIL=486 | ||
117 | endif | ||
118 | CPUOPT= $(CPUHEAD)$(CPUTAIL) | ||
119 | OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer | ||
120 | else | ||
121 | ifeq "$(ARCH)" "arm" | ||
122 | OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer | ||
123 | else | ||
124 | OPT= -O2 -fomit-frame-pointer | ||
125 | endif | ||
126 | endif | ||
127 | |||
128 | WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes | ||
129 | |||
130 | LIB=../lib | ||
131 | |||
132 | ERR_O=$(LIB)/err.o | ||
133 | |||
134 | # Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk) | ||
135 | # (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.) | ||
136 | # HAVE_SLANG=yes | ||
137 | # There is a subdirectory /usr/include/slang containing slcurses.h | ||
138 | # SLANGFLAGS=-I/usr/include/slang | ||
139 | # No such subdirectory - slcurses.h lives in /usr/include | ||
140 | # (no extra definition required). | ||
141 | LIBSLANG=-lslang | ||
142 | |||
143 | # | ||
144 | # Paths used for compilation (not all are actually used, see CFLAGS below) | ||
145 | # | ||
146 | DEV_DIR= /dev | ||
147 | ETC_DIR= /etc | ||
148 | SBIN_DIR= /sbin | ||
149 | USRSBIN_DIR= /usr/sbin | ||
150 | USRLIB_DIR= /usr/lib | ||
151 | USRBIN_DIR= /usr/bin | ||
152 | USRGAMES_DIR= /usr/games | ||
153 | USRSHAREMISC_DIR=/usr/share/misc | ||
154 | LOCALE_DIR= /usr/share/locale | ||
155 | BIN_DIR= /bin | ||
156 | VAR_PATH= /var | ||
157 | LOG_DIR= /var/log | ||
158 | MAN_DIR= /usr/share/man | ||
159 | INFO_DIR= /usr/share/info | ||
160 | |||
161 | # | ||
162 | # Paths used for install | ||
163 | # | ||
164 | DEVDIR= $(DESTDIR)$(DEV_DIR) | ||
165 | ETCDIR= $(DESTDIR)$(ETC_DIR) | ||
166 | SBINDIR= $(DESTDIR)$(SBIN_DIR) | ||
167 | USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR) | ||
168 | USRLIBDIR= $(DESTDIR)$(USRLIB_DIR) | ||
169 | USRBINDIR= $(DESTDIR)$(USRBIN_DIR) | ||
170 | USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR) | ||
171 | USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR) | ||
172 | LOCALEDIR= $(DESTDIR)$(LOCALE_DIR) | ||
173 | BINDIR= $(DESTDIR)$(BIN_DIR) | ||
174 | VARPATH= $(DESTDIR)$(VAR_PATH) | ||
175 | LOGDIR= $(DESTDIR)$(LOG_DIR) | ||
176 | MANDIR= $(DESTDIR)$(MAN_DIR) | ||
177 | MAN1DIR= $(MANDIR)/man1 | ||
178 | MAN3DIR= $(MANDIR)/man3 | ||
179 | MAN5DIR= $(MANDIR)/man5 | ||
180 | MAN6DIR= $(MANDIR)/man6 | ||
181 | MAN8DIR= $(MANDIR)/man8 | ||
182 | INFODIR= $(DESTDIR)$(INFO_DIR) | ||
183 | |||
184 | # Directory for shutdown, halt, reboot, etc. | ||
185 | SHUTDOWNDIR= $(SBINDIR) | ||
186 | |||
187 | # Modes | ||
188 | DIRMODE= 755 | ||
189 | BINMODE= 755 | ||
190 | MANMODE= 644 | ||
191 | DATMODE= 644 | ||
192 | INFOMODE= 644 | ||
193 | SUIDMODE= 4755 | ||
194 | |||
195 | CHMOD= chmod | ||
196 | INSTALL= install | ||
197 | INSTALLDIR= $(INSTALL) -d -m $(DIRMODE) | ||
198 | INSTALLBIN= $(INSTALL) -m $(BINMODE) | ||
199 | INSTALLMAN= $(INSTALL) -m $(MANMODE) | ||
200 | INSTALLDAT= $(INSTALL) -m $(DATMODE) | ||
201 | INSTALLSUID= $(INSTALL) -m $(SUIDMODE) | ||
202 | |||
203 | ifeq "$(DISABLE_NLS)" "yes" | ||
204 | NLSFLAGS = -DDISABLE_NLS | ||
205 | endif | ||
206 | |||
207 | CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \ | ||
208 | $(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \ | ||
209 | -D_FILE_OFFSET_BITS=64 \ | ||
210 | -DSBINDIR=\"$(SBIN_DIR)\" \ | ||
211 | -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \ | ||
212 | -DLOGDIR=\"$(LOG_DIR)\" \ | ||
213 | -DVARPATH=\"$(VAR_PATH)\" \ | ||
214 | -DLOCALEDIR=\"$(LOCALE_DIR)\" \ | ||
215 | $(CFLAGS) | ||
216 | |||
217 | |||
218 | %.o: %.c | ||
219 | $(CC) -c $(CFLAGS) $< -o $@ | ||
220 | |||
221 | %: %.cc | ||
222 | $(CXX) $(CFLAGS) $< -o $@ | ||
223 | |||
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch new file mode 100644 index 0000000000..889ed43978 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | ptest needs buildtest-TESTS and runtest-TESTS targets. | ||
2 | serial-tests is required to generate those targets. | ||
3 | |||
4 | Signed-off-by: Alexandra Safta <alexandra.safta@enea.com> | ||
5 | Upstream-Status: Pending | ||
6 | |||
7 | diff -ruN a/configure.ac b/configure.ac | ||
8 | --- a/configure.ac 2014-05-27 12:37:42.119772658 +0200 | ||
9 | +++ b/configure.ac 2014-05-27 12:41:46.225573272 +0200 | ||
10 | @@ -10,7 +10,7 @@ | ||
11 | dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run | ||
12 | dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors. | ||
13 | AC_USE_SYSTEM_EXTENSIONS | ||
14 | -AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects]) | ||
15 | +AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects serial-tests]) | ||
16 | |||
17 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], | ||
18 | [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) | ||
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch new file mode 100644 index 0000000000..13dc7ddaa1 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_find_opts.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Avoid unsupported find options | ||
2 | |||
3 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | |||
6 | diff -ruN a/tests/run.sh b/tests/run.sh | ||
7 | --- a/tests/run.sh 2013-08-26 23:48:48.868279097 +0200 | ||
8 | +++ b/tests/run.sh 2013-08-27 00:14:35.646730004 +0200 | ||
9 | @@ -91,7 +91,7 @@ | ||
10 | # selected tests only | ||
11 | for s in $SUBTESTS; do | ||
12 | if [ -d "$top_srcdir/tests/ts/$s" ]; then | ||
13 | - co=$(find $top_srcdir/tests/ts/$s -type f -perm /a+x -regex ".*/[^\.~]*" | sort) | ||
14 | + co=$(find $top_srcdir/tests/ts/$s -type f -perm -111 -regex ".*/[^\.~]*" | sort) | ||
15 | comps="$comps $co" | ||
16 | else | ||
17 | echo "Unknown test component '$s'" | ||
18 | @@ -104,7 +104,7 @@ | ||
19 | exit 1 | ||
20 | fi | ||
21 | |||
22 | - comps=$(find $top_srcdir/tests/ts/ -type f -perm /a+x -regex ".*/[^\.~]*" | sort) | ||
23 | + comps=$(find $top_srcdir/tests/ts/ -type f -perm -111 -regex ".*/[^\.~]*" | sort) | ||
24 | fi | ||
25 | |||
26 | |||
27 | diff -ruN a/tests/ts/build-sys/config b/tests/ts/build-sys/config | ||
28 | --- a/tests/ts/build-sys/config 2013-08-26 23:50:26.800131581 +0200 | ||
29 | +++ b/tests/ts/build-sys/config 2013-08-27 00:10:02.806302850 +0200 | ||
30 | @@ -32,7 +32,7 @@ | ||
31 | ./configure $opts &> /dev/null | ||
32 | make -j &> /dev/null | ||
33 | |||
34 | - bins=$(find . -type f -perm /a+x | sort) | ||
35 | + bins=$(find . -type f -perm -111 | sort) | ||
36 | for b in $bins; do | ||
37 | libs=$(readelf --dynamic $b 2> /dev/null | \ | ||
38 | awk '/NEEDED/ { print $5 }' | \ | ||
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch new file mode 100644 index 0000000000..a0d5efad0f --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | Avoid unsupported grep options | ||
2 | |||
3 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | |||
6 | diff -ruN a/ts/ipcs/headers b/ts/ipcs/headers | ||
7 | --- a/tests/ts/ipcs/headers 2013-09-04 11:03:36.118613250 +0200 | ||
8 | +++ b/teste/ts/ipcs/headers 2013-09-04 11:03:27.906958437 +0200 | ||
9 | @@ -22,35 +22,35 @@ | ||
10 | ts_init "$*" | ||
11 | |||
12 | ts_log "test: shm headers" | ||
13 | -$TS_CMD_IPCS -m -t | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
14 | -$TS_CMD_IPCS -m -p | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
15 | -$TS_CMD_IPCS -m -c | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
16 | +$TS_CMD_IPCS -m -t | grep -A 1 "^---" >> $TS_OUTPUT | ||
17 | +$TS_CMD_IPCS -m -p | grep -A 1 "^---" >> $TS_OUTPUT | ||
18 | +$TS_CMD_IPCS -m -c | grep -A 1 "^---" >> $TS_OUTPUT | ||
19 | $TS_CMD_IPCS -m -l | grep "^---" >> $TS_OUTPUT | ||
20 | $TS_CMD_IPCS -m -u | grep "^---" >> $TS_OUTPUT | ||
21 | echo >> $TS_OUTPUT | ||
22 | |||
23 | ts_log "test: mesg headers" | ||
24 | -$TS_CMD_IPCS -q -t | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
25 | -$TS_CMD_IPCS -q -p | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
26 | -$TS_CMD_IPCS -q -c | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
27 | +$TS_CMD_IPCS -q -t | grep -A 1 "^---" >> $TS_OUTPUT | ||
28 | +$TS_CMD_IPCS -q -p | grep -A 1 "^---" >> $TS_OUTPUT | ||
29 | +$TS_CMD_IPCS -q -c | grep -A 1 "^---" >> $TS_OUTPUT | ||
30 | $TS_CMD_IPCS -q -l | grep "^---" >> $TS_OUTPUT | ||
31 | $TS_CMD_IPCS -q -u | grep "^---" >> $TS_OUTPUT | ||
32 | echo >> $TS_OUTPUT | ||
33 | |||
34 | ts_log "test: sem headers" | ||
35 | -$TS_CMD_IPCS -s -t | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
36 | -$TS_CMD_IPCS -s -p | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
37 | -$TS_CMD_IPCS -s -c | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
38 | +$TS_CMD_IPCS -s -t | grep -A 1 "^---" >> $TS_OUTPUT | ||
39 | +$TS_CMD_IPCS -s -p | grep -A 1 "^---" >> $TS_OUTPUT | ||
40 | +$TS_CMD_IPCS -s -c | grep -A 1 "^---" >> $TS_OUTPUT | ||
41 | $TS_CMD_IPCS -s -l | grep "^---" >> $TS_OUTPUT | ||
42 | $TS_CMD_IPCS -s -u | grep "^---" >> $TS_OUTPUT | ||
43 | echo >> $TS_OUTPUT | ||
44 | |||
45 | ts_log "test: all headers" | ||
46 | -$TS_CMD_IPCS -a | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
47 | +$TS_CMD_IPCS -a | grep -A 1 "^---" >> $TS_OUTPUT | ||
48 | |||
49 | -$TS_CMD_IPCS -a -t | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
50 | -$TS_CMD_IPCS -a -p | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
51 | -$TS_CMD_IPCS -a -c | grep --after-context=1 "^---" >> $TS_OUTPUT | ||
52 | +$TS_CMD_IPCS -a -t | grep -A 1 "^---" >> $TS_OUTPUT | ||
53 | +$TS_CMD_IPCS -a -p | grep -A 1 "^---" >> $TS_OUTPUT | ||
54 | +$TS_CMD_IPCS -a -c | grep -A 1 "^---" >> $TS_OUTPUT | ||
55 | $TS_CMD_IPCS -a -l | grep "^---" >> $TS_OUTPUT | ||
56 | $TS_CMD_IPCS -a -u | grep "^---" >> $TS_OUTPUT | ||
57 | |||
diff --git a/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch new file mode 100644 index 0000000000..3a6206704a --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Avoid unsupported sleep parameter | ||
2 | |||
3 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | |||
6 | diff -ruN a/simple b/simple | ||
7 | --- a/tests/ts/tailf/simple 2013-09-04 11:34:49.971817130 +0200 | ||
8 | +++ b/tests/ts/tailf/simple 2013-09-04 11:34:37.876325128 +0200 | ||
9 | @@ -25,9 +25,9 @@ | ||
10 | |||
11 | $TS_CMD_TAILF $INPUT > $TS_OUTPUT 2>&1 & | ||
12 | |||
13 | -sleep 0.1 | ||
14 | +sleep 1 | ||
15 | echo {0..9} >> $INPUT | ||
16 | -sleep 0.1 | ||
17 | +sleep 1 | ||
18 | |||
19 | rm -f $INPUT | ||
20 | |||
diff --git a/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch new file mode 100644 index 0000000000..a5b1ff12e5 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | util-linux: take ${sbindir} from the environment if it is set there | ||
2 | fix the test, the [ ] syntax was getting eaten by autoconf | ||
3 | |||
4 | Signed-off-by: Phil Blundell <pb@pbcl.net> | ||
5 | Signed-off-by: Saul Wold <sgw@linux.intel.com | ||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | Index: util-linux-2.22.1/configure.ac | ||
9 | =================================================================== | ||
10 | --- util-linux-2.22.1.orig/configure.ac | ||
11 | +++ util-linux-2.22.1/configure.ac | ||
12 | @@ -73,7 +73,10 @@ AC_SUBST([localstatedir]) | ||
13 | usrbin_execdir='${exec_prefix}/bin' | ||
14 | AC_SUBST([usrbin_execdir]) | ||
15 | |||
16 | -usrsbin_execdir='${exec_prefix}/sbin' | ||
17 | +if test -z "$usrsbin_execdir" ; | ||
18 | +then | ||
19 | + usrsbin_execdir='${exec_prefix}/sbin' | ||
20 | +fi | ||
21 | AC_SUBST([usrsbin_execdir]) | ||
22 | |||
23 | case $libdir in | ||
diff --git a/meta/recipes-core/util-linux/util-linux/defines.h b/meta/recipes-core/util-linux/util-linux/defines.h new file mode 100644 index 0000000000..6ce6b86df5 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/defines.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #define UTIL_LINUX_VERSION "2.12" | ||
2 | #define util_linux_version "util-linux-2.12" | ||
3 | |||
4 | #define HAVE_blkpg_h | ||
5 | #define HAVE_kd_h | ||
6 | #define HAVE_locale_h | ||
7 | #define HAVE_langinfo_h | ||
8 | #define HAVE_sys_user_h | ||
9 | #define HAVE_asm_types_h | ||
10 | //#define NEED_tqueue_h | ||
diff --git a/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch new file mode 100644 index 0000000000..64f02d570f --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Display testname for subtest | ||
2 | |||
3 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | |||
6 | diff -ruN a/functions.sh b/functions.sh | ||
7 | --- a/tests/functions.sh 2013-09-04 12:41:07.625488953 +0200 | ||
8 | +++ b/tests/functions.sh 2013-09-04 17:33:02.402802957 +0200 | ||
9 | @@ -209,7 +209,7 @@ | ||
10 | [ $TS_NSUBTESTS -eq 0 ] && echo | ||
11 | TS_NSUBTESTS=$(( $TS_NSUBTESTS + 1 )) | ||
12 | |||
13 | - printf "%16s: %-27s ..." "" "$TS_SUBNAME" | ||
14 | + printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME" | ||
15 | } | ||
16 | |||
17 | function ts_init { | ||
diff --git a/meta/recipes-core/util-linux/util-linux/fix-configure.patch b/meta/recipes-core/util-linux/util-linux/fix-configure.patch new file mode 100644 index 0000000000..cefae97e9c --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/fix-configure.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | The userlib_execdir was not getting set correctly, the quoting | ||
2 | was wrong as these quoted items were not getting expanded correctly. | ||
3 | |||
4 | Upstream-Status: Pending | ||
5 | |||
6 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
7 | |||
8 | Index: util-linux-2.24.1/configure.ac | ||
9 | =================================================================== | ||
10 | --- util-linux-2.24.1.orig/configure.ac | ||
11 | +++ util-linux-2.24.1/configure.ac | ||
12 | @@ -76,7 +76,7 @@ fi | ||
13 | AC_SUBST([usrsbin_execdir]) | ||
14 | |||
15 | AS_CASE([$libdir], | ||
16 | - ['${exec_prefix}/'* | '${prefix}/'* | /usr/*], | ||
17 | + [${exec_prefix}/* | ${prefix}/* | /usr/*], | ||
18 | [usrlib_execdir=$libdir], | ||
19 | [usrlib_execdir='${exec_prefix}'$libdir] | ||
20 | ) | ||
diff --git a/meta/recipes-core/util-linux/util-linux/fix-parallel-build.patch b/meta/recipes-core/util-linux/util-linux/fix-parallel-build.patch new file mode 100644 index 0000000000..adb271ce0d --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/fix-parallel-build.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 774f55f9dd22c01e4041a183d8dff14811f29114 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Fri, 4 Apr 2014 17:33:04 +0800 | ||
4 | Subject: [PATCH] sys-utils/Makemodule.am: fix parallel build issue | ||
5 | |||
6 | The rule SETARCH_MAN_LINKS is used for the files under the sys-utils | ||
7 | dir, for example: | ||
8 | |||
9 | echo ".so man8/setarch.8" > sys-utils/linux32.8 | ||
10 | |||
11 | but it depends on nothing so that the sys-utils dir may not exist, we | ||
12 | can create the sys-utils dir to fix problem. | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
17 | --- | ||
18 | sys-utils/Makemodule.am | 1 + | ||
19 | 1 file changed, 1 insertion(+) | ||
20 | |||
21 | diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am | ||
22 | index 6265282..62ead37 100644 | ||
23 | --- a/sys-utils/Makemodule.am | ||
24 | +++ b/sys-utils/Makemodule.am | ||
25 | @@ -124,6 +124,7 @@ man_MANS += $(SETARCH_MAN_LINKS) | ||
26 | CLEANFILES += $(SETARCH_MAN_LINKS) | ||
27 | |||
28 | $(SETARCH_MAN_LINKS): | ||
29 | + $(MKDIR_P) sys-utils | ||
30 | $(AM_V_GEN)echo ".so man8/setarch.8" > $@ | ||
31 | |||
32 | install-exec-hook-setarch: | ||
33 | -- | ||
34 | 1.8.2.1 | ||
35 | |||
diff --git a/meta/recipes-core/util-linux/util-linux/make_include b/meta/recipes-core/util-linux/util-linux/make_include new file mode 100644 index 0000000000..e6abcd91f7 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/make_include | |||
@@ -0,0 +1,17 @@ | |||
1 | VERSION=2.12 | ||
2 | CC=gcc | ||
3 | CFLAGS= | ||
4 | LDFLAGS= | ||
5 | HAVE_OLD_GCC=yes | ||
6 | HAVE_RAW_H=yes | ||
7 | HAVE_NCURSES=yes | ||
8 | CURSESFLAGS=-DNCH=1 | ||
9 | LIBCURSES=-lncurses | ||
10 | HAVE_TERMCAP=no | ||
11 | NEED_LIBCRYPT=yes | ||
12 | FOREIGN = --foreign-user | ||
13 | HAVE_XGETTEXT=yes | ||
14 | HAVE_OPENPTY=yes | ||
15 | HAVE_PIVOT_ROOT=yes | ||
16 | HAVE_GOOD_RPC=yes | ||
17 | HAVE_ZLIB=yes | ||
diff --git a/meta/recipes-core/util-linux/util-linux/ptest.patch b/meta/recipes-core/util-linux/util-linux/ptest.patch new file mode 100644 index 0000000000..e9adc90a21 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/ptest.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Define TESTS variable | ||
2 | |||
3 | Signed-off-by: Tudor Florea <tudor.florea@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | |||
6 | diff -ruN a/Makefile.am b/Makefile.am | ||
7 | --- a/Makefile.am 2013-08-26 16:29:42.151429221 +0200 | ||
8 | +++ b/Makefile.am 2013-08-26 17:52:31.013898120 +0200 | ||
9 | @@ -43,7 +43,7 @@ | ||
10 | dist_usrbin_exec_SCRIPTS = | ||
11 | systemdsystemunit_DATA = | ||
12 | check_PROGRAMS = | ||
13 | -TESTS = | ||
14 | +TESTS = $(check_PROGRAMS) | ||
15 | |||
16 | PATHFILES = | ||
diff --git a/meta/recipes-core/util-linux/util-linux/run-ptest b/meta/recipes-core/util-linux/util-linux/run-ptest new file mode 100644 index 0000000000..b04f14a835 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/run-ptest | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd tests || exit 1 | ||
4 | sh ./run.sh 2>&1 | { | ||
5 | sed '{ | ||
6 | s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/ | ||
7 | s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/ | ||
8 | s/^\(.*\):\(.*\) \.\.\. IGNORE \(.*\)$/SKIP: \1:\2 \3/ | ||
9 | }' | ||
10 | } | ||
diff --git a/meta/recipes-core/util-linux/util-linux/swapargs.h b/meta/recipes-core/util-linux/util-linux/swapargs.h new file mode 100644 index 0000000000..e960eef05f --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/swapargs.h | |||
@@ -0,0 +1,3 @@ | |||
1 | #define SWAPON_HAS_TWO_ARGS | ||
2 | #include <asm/page.h> | ||
3 | #include <sys/swap.h> | ||
diff --git a/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch b/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch new file mode 100644 index 0000000000..5031a7313e --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | configure should include errno.h instead of argp.h when | ||
2 | checking for presence of program_invocation_short_name | ||
3 | uclibc defines this to be const char* unlike util-linux-ng | ||
4 | which defines this to be char* so this error goes unnoticed | ||
5 | on glibc/eglibc systems. | ||
6 | |||
7 | here is the error it fixes | ||
8 | |||
9 | in file included from mountP.h:14:0, | ||
10 | from cache.c:29: | ||
11 | /home/kraj/work/slugos/build/tmp-slugos-uclibc/sysroots/nslu2le/usr/include/errno.h:55:46: error: conflicting types for '__progname' | ||
12 | ../../../include/c.h:118:14: note: previous declaration of '__progname' was here | ||
13 | make[3]: *** [cache.lo] Error 1 | ||
14 | |||
15 | |||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
18 | |||
19 | Upstream-Status: Pending | ||
20 | Index: util-linux-2.22.1/configure.ac | ||
21 | =================================================================== | ||
22 | --- util-linux-2.22.1.orig/configure.ac | ||
23 | +++ util-linux-2.22.1/configure.ac | ||
24 | @@ -372,7 +372,7 @@ esac | ||
25 | |||
26 | AC_MSG_CHECKING([whether program_invocation_short_name is defined]) | ||
27 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||
28 | - #include <argp.h> | ||
29 | + #include <errno.h> | ||
30 | ]], [[ | ||
31 | program_invocation_short_name = "test"; | ||
32 | ]])], [ | ||
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch b/meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch new file mode 100644 index 0000000000..8f26451aa8 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | util-linux: ensure the existence of directory for PATHFILES | ||
4 | |||
5 | When compiling util-linux, it's possible to encounter the following error. | ||
6 | /bin/sh: line 2:: misc-utils/uuidd.8.tmp: No such file or directory | ||
7 | |||
8 | This is because that the misc-utils directory doesn't exist when trying to write to | ||
9 | misc-utils/uuidd.8.tmp. | ||
10 | |||
11 | When generating misc-utils/uuidd.8 (or anything in PATHFILES), its directory | ||
12 | may not have been created yet. So we need to ensure the existence of the directory | ||
13 | to avoid the compilation error. | ||
14 | |||
15 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
16 | --- | ||
17 | Makefile.am | 1 + | ||
18 | 1 file changed, 1 insertion(+) | ||
19 | |||
20 | diff --git a/Makefile.am b/Makefile.am | ||
21 | index 17f4c33..ca3dc0f 100644 | ||
22 | --- a/Makefile.am | ||
23 | +++ b/Makefile.am | ||
24 | @@ -123,6 +123,7 @@ EXTRA_DIST += $(PATHFILES:=.in) | ||
25 | |||
26 | $(PATHFILES): Makefile | ||
27 | @ rm -f $@ $@.tmp | ||
28 | + @ mkdir -p `dirname $@` | ||
29 | $(AM_V_GEN) srcdir=''; \ | ||
30 | test -f ./$@.in || srcdir=$(srcdir)/; \ | ||
31 | $(edit_cmd) $${srcdir}$@.in >$@.tmp | ||
32 | -- | ||
33 | 1.7.9.5 | ||
34 | |||
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch b/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch new file mode 100644 index 0000000000..68bf22de8c --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From f220d809be1baa654503bf6ff52f3630b0d7015c Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Wed, 26 Mar 2014 01:30:29 +0000 | ||
4 | Subject: [PATCH] sun.c: use qsort() to instead of qsort_r() | ||
5 | |||
6 | qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on | ||
7 | the host like CentOS 5.x. | ||
8 | |||
9 | Upstream-Status: Inappropriate [Other] | ||
10 | |||
11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
12 | --- | ||
13 | libfdisk/src/sun.c | 5 ++--- | ||
14 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
15 | |||
16 | Index: util-linux-2.24.2/libfdisk/src/sun.c | ||
17 | =================================================================== | ||
18 | --- util-linux-2.24.2.orig/libfdisk/src/sun.c | ||
19 | +++ util-linux-2.24.2/libfdisk/src/sun.c | ||
20 | @@ -431,10 +431,9 @@ static int sun_verify_disklabel(struct f | ||
21 | } | ||
22 | verify_sun_starts = starts; | ||
23 | |||
24 | - qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]), | ||
25 | - (int (*)(const void *,const void *,void *)) verify_sun_cmp, | ||
26 | - verify_sun_starts); | ||
27 | - | ||
28 | + qsort(array,ARRAY_SIZE(array),sizeof(array[0]), | ||
29 | + (int (*)(const void *,const void *)) verify_sun_cmp); | ||
30 | + | ||
31 | if (array[0] == -1) { | ||
32 | fdisk_info(cxt, _("No partitions defined.")); | ||
33 | return 0; | ||
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-native.patch b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch new file mode 100644 index 0000000000..afe543c6e8 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | Support older hosts with latest util-linux-native | ||
2 | |||
3 | mkostemp is not defined on older machines. So we detect this and | ||
4 | provide a define that uses mkstemp instead. | ||
5 | |||
6 | O_CLOEXEC is not defined on older machines. It is however defined | ||
7 | in the 'c.h' header. Fix up the users to include 'c.h'. | ||
8 | |||
9 | fdisks/fdisksunlabel.c was modified to use qsort_r, however | ||
10 | this is not defined on older hosts. Revert: | ||
11 | commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698 | ||
12 | fdisk: (sun): use ask API, remove global variable | ||
13 | |||
14 | Upstream-Status: Inappropriate [other] | ||
15 | Patches revert upstream changes in order to support older | ||
16 | machines. | ||
17 | |||
18 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
19 | |||
20 | Index: util-linux-2.24.1/configure.ac | ||
21 | =================================================================== | ||
22 | --- util-linux-2.24.1.orig/configure.ac | ||
23 | +++ util-linux-2.24.1/configure.ac | ||
24 | @@ -302,6 +302,7 @@ AC_CHECK_FUNCS([ \ | ||
25 | llseek \ | ||
26 | lseek64 \ | ||
27 | mempcpy \ | ||
28 | + mkostemp \ | ||
29 | nanosleep \ | ||
30 | personality \ | ||
31 | posix_fadvise \ | ||
32 | Index: util-linux-2.24.1/include/c.h | ||
33 | =================================================================== | ||
34 | --- util-linux-2.24.1.orig/include/c.h | ||
35 | +++ util-linux-2.24.1/include/c.h | ||
36 | @@ -236,6 +236,13 @@ static inline int dirfd(DIR *d) | ||
37 | #endif | ||
38 | |||
39 | /* | ||
40 | + * mkostemp replacement | ||
41 | + */ | ||
42 | +#ifndef HAVE_MKOSTEMP | ||
43 | +#define mkostemp(template, flags) mkstemp(template) | ||
44 | +#endif | ||
45 | + | ||
46 | +/* | ||
47 | * MAXHOSTNAMELEN replacement | ||
48 | */ | ||
49 | static inline size_t get_hostname_max(void) | ||
50 | Index: util-linux-2.24.1/lib/randutils.c | ||
51 | =================================================================== | ||
52 | --- util-linux-2.24.1.orig/lib/randutils.c | ||
53 | +++ util-linux-2.24.1/lib/randutils.c | ||
54 | @@ -16,6 +16,7 @@ | ||
55 | #include <sys/syscall.h> | ||
56 | |||
57 | #include "randutils.h" | ||
58 | +#include "c.h" | ||
59 | |||
60 | #ifdef HAVE_TLS | ||
61 | #define THREAD_LOCAL static __thread | ||
62 | Index: util-linux-2.24.1/lib/wholedisk.c | ||
63 | =================================================================== | ||
64 | --- util-linux-2.24.1.orig/lib/wholedisk.c | ||
65 | +++ util-linux-2.24.1/lib/wholedisk.c | ||
66 | @@ -10,6 +10,7 @@ | ||
67 | |||
68 | #include "blkdev.h" | ||
69 | #include "wholedisk.h" | ||
70 | +#include "c.h" | ||
71 | |||
72 | int is_whole_disk_fd(int fd, const char *name) | ||
73 | { | ||
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch b/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch new file mode 100644 index 0000000000..5773d7ea1b --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | The FHS indicates that /etc must be capable of being mounted R/O. | ||
4 | |||
5 | The FHS also indicates that lock files belong in /var/lock, and /var must | ||
6 | be R/W as soon as possible during boot. | ||
7 | |||
8 | This patch moves the mtab lock file from the potentially R/O /etc, to the | ||
9 | R/W /var/lock area. This lock file is used when mounting disks and making | ||
10 | other mount adjustments. The _PATH_MOUNTED_TMP is not adjusted, as failing | ||
11 | to write to this file does not cause any functional limitations. | ||
12 | |||
13 | (Note, if /etc is R/O, then /etc/mtab should be a symlink to /proc/mounts) | ||
14 | |||
15 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
16 | |||
17 | --- util-linux-ng-2.16/include/pathnames.h.orig | ||
18 | +++ util-linux-ng-2.16/include/pathnames.h | ||
19 | @@ -90,7 +90,7 @@ | ||
20 | # endif | ||
21 | #endif | ||
22 | |||
23 | -#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~" | ||
24 | +#define _PATH_MOUNTED_LOCK "/var/lock/mtab~" | ||
25 | #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp" | ||
26 | |||
27 | #ifndef _PATH_DEV | ||
diff --git a/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch b/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch new file mode 100644 index 0000000000..f131b763ca --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Index: util-linux-2.22.1/login-utils/login.c | ||
4 | =================================================================== | ||
5 | --- util-linux-2.22.1.orig/login-utils/login.c | ||
6 | +++ util-linux-2.22.1/login-utils/login.c | ||
7 | @@ -1239,6 +1239,8 @@ int main(int argc, char **argv) | ||
8 | char *buff; | ||
9 | int childArgc = 0; | ||
10 | int retcode; | ||
11 | + struct sigaction act; | ||
12 | + | ||
13 | |||
14 | char *pwdbuf = NULL; | ||
15 | struct passwd *pwd = NULL, _pwd; | ||
16 | @@ -1252,7 +1254,10 @@ int main(int argc, char **argv) | ||
17 | timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT); | ||
18 | |||
19 | signal(SIGALRM, timedout); | ||
20 | - siginterrupt(SIGALRM, 1); /* we have to interrupt syscalls like ioclt() */ | ||
21 | + (void) sigaction(SIGALRM, NULL, &act); | ||
22 | + act.sa_flags &= ~SA_RESTART; | ||
23 | + sigaction(SIGALRM, &act, NULL); | ||
24 | + | ||
25 | alarm(timeout); | ||
26 | signal(SIGQUIT, SIG_IGN); | ||
27 | signal(SIGINT, SIG_IGN); | ||
diff --git a/meta/recipes-core/util-linux/util-linux_2.24.2.bb b/meta/recipes-core/util-linux/util-linux_2.24.2.bb new file mode 100644 index 0000000000..81e719058b --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux_2.24.2.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | MAJOR_VERSION = "2.24" | ||
2 | require util-linux.inc | ||
3 | PR = "r1" | ||
4 | |||
5 | # To support older hosts, we need to patch and/or revert | ||
6 | # some upstream changes. Only do this for native packages. | ||
7 | OLDHOST = "" | ||
8 | OLDHOST_class-native = "file://util-linux-native.patch \ | ||
9 | file://util-linux-native-qsort.patch \ | ||
10 | " | ||
11 | |||
12 | SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \ | ||
13 | file://util-linux-ng-2.16-mount_lock_path.patch \ | ||
14 | file://uclibc-__progname-conflict.patch \ | ||
15 | file://configure-sbindir.patch \ | ||
16 | file://fix-configure.patch \ | ||
17 | file://fix-parallel-build.patch \ | ||
18 | file://util-linux-ensure-the-existence-of-directory-for-PAT.patch \ | ||
19 | file://avoid_parallel_tests.patch \ | ||
20 | file://CVE-2014-9114.patch \ | ||
21 | ${OLDHOST} \ | ||
22 | " | ||
23 | |||
24 | SRC_URI[md5sum] = "3f191727a0d28f7204b755cf1b6ea0aa" | ||
25 | SRC_URI[sha256sum] = "1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0" | ||
26 | |||
27 | CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms" | ||
28 | |||
29 | EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \ | ||
30 | --disable-fallocate --disable-use-tty-group \ | ||
31 | " | ||
32 | EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \ | ||
33 | --disable-fallocate --disable-use-tty-group \ | ||
34 | " | ||
35 | |||
36 | RDEPENDS_${PN}-ptest += " bash" | ||