diff options
Diffstat (limited to 'meta/recipes-core')
154 files changed, 3334 insertions, 3558 deletions
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile index 88ab8d877b..53c2680409 100644 --- a/meta/recipes-core/base-files/base-files/profile +++ b/meta/recipes-core/base-files/base-files/profile @@ -2,7 +2,7 @@ # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). PATH="/usr/local/bin:/usr/bin:/bin" -EDITOR="/bin/vi" # needed for packages like cron +EDITOR="vi" # needed for packages like cron, git-commit test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc. if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 07f5c54c97..e16fe722b8 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -59,13 +59,39 @@ conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ ${sysconfdir}/default" +# By default the hostname is the machine name. If the hostname is unset then a +# /etc/hostname file isn't written, suitable for environments with dynamic +# hostnames. # -# set standard hostname, might be a candidate for a DISTRO variable? :M: -# -hostname = "openembedded" +# The hostname can be changed outside of this recipe by using +# hostname_pn-base-files = "my-host-name". +hostname = "${MACHINE}" BASEFILESISSUEINSTALL ?= "do_install_basefilesissue" +# In previous versions of base-files, /run was a softlink to /var/run and the +# directory was located in /var/volatlie/run. Also, /var/lock was a softlink +# to /var/volatile/lock which is where the real directory was located. Now, +# /run and /run/lock are the real directories. If we are upgrading, we may +# need to remove the symbolic links first before we create the directories. +# Otherwise the directory creation will fail and we will have circular symbolic +# links. +# +pkg_preinst_${PN} () { + #!/bin/sh -e + if [ x"$D" = "x" ]; then + if [ -h "/var/lock" ]; then + # Remove the symbolic link + rm -f /var/lock + fi + + if [ -h "/run" ]; then + # Remove the symbolic link + rm -f /run + fi + fi +} + do_install () { for d in ${dirs755}; do install -m 0755 -d ${D}$d @@ -79,6 +105,7 @@ do_install () { for d in ${volatiles}; do ln -sf volatile/$d ${D}${localstatedir}/$d done + ln -snf ../run ${D}${localstatedir}/run ln -snf ../run/lock ${D}${localstatedir}/lock @@ -111,15 +138,11 @@ do_install () { DISTRO_VERSION[vardepsexclude] += "DATE" do_install_basefilesissue () { - if [ "${hostname}" != "" ]; then - if [ -n "${MACHINE}" -a "${hostname}" = "openembedded" ]; then - echo ${MACHINE} > ${D}${sysconfdir}/hostname - else - echo ${hostname} > ${D}${sysconfdir}/hostname - fi + if [ "${hostname}" ]; then + echo ${hostname} > ${D}${sysconfdir}/hostname fi - install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} + install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} if [ -n "${DISTRO_NAME}" ]; then printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net @@ -151,4 +174,5 @@ FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses" PACKAGE_ARCH = "${MACHINE_ARCH}" CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]} ${sysconfdir}/shells" +CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile" diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb index ec8f2afb22..a8bd7c4e3f 100644 --- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb +++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb @@ -4,7 +4,7 @@ SECTION = "base" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" -SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \ +SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar.gz \ file://add_shutdown.patch \ file://nobash.patch \ file://noshadow.patch \ @@ -75,11 +75,11 @@ python populate_packages_prepend() { preinst = """#!/bin/sh mkdir -p $D${sysconfdir} if [ ! -e $D${sysconfdir}/passwd ]; then -\tcat << EOF > $D${sysconfdir}/passwd +\tcat << 'EOF' > $D${sysconfdir}/passwd """ + passwd + """EOF fi if [ ! -e $D${sysconfdir}/group ]; then -\tcat << EOF > $D${sysconfdir}/group +\tcat << 'EOF' > $D${sysconfdir}/group """ + group + """EOF fi """ diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index deb2ee4606..0769d92c50 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -270,6 +270,7 @@ do_install () { install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf install -d ${D}${sysconfdir}/mdev install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev + install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev fi fi diff --git a/meta/recipes-core/busybox/busybox/0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch b/meta/recipes-core/busybox/busybox/0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch deleted file mode 100644 index 3da38bb4ca..0000000000 --- a/meta/recipes-core/busybox/busybox/0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 28389e59701c2408e87e886c358f8e1766c677f7 Mon Sep 17 00:00:00 2001 -From: Drew Moseley <drew_moseley@mentor.com> -Date: Sat, 29 Mar 2014 11:13:16 -0400 -Subject: [PATCH] build system: Specify '-nostldlib' when linking to .o files. - -For certain cross build scenarios the LD variable is overridden -to use the gcc executive to ensure all the target tuning parameters -are used. In these cases, the executive errors out as shown below -but since this step is only linking to a .o file the standard libs -are not needed. - - $ make LD=gcc applets/built-in.o - LD applets/built-in.o - /usr/bin/ld: cannot find -lgcc_s - /usr/bin/ld: cannot find -lgcc_s - collect2: ld returned 1 exit status - make[1]: *** [applets/built-in.o] Error 1 - make: *** [applets_dir] Error 2 - -Signed-off-by: Drew Moseley <drew_moseley@mentor.com> ---- - scripts/Makefile.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/Makefile.build b/scripts/Makefile.build -index 5685b5b..eba69f6 100644 ---- a/scripts/Makefile.build -+++ b/scripts/Makefile.build -@@ -256,7 +256,7 @@ ifdef builtin-target - quiet_cmd_link_o_target = LD $@ - # If the list of objects to link is empty, just create an empty built-in.o - cmd_link_o_target = $(if $(strip $(obj-y)),\ -- $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^),\ -+ $(LD) -nostdlib $(ld_flags) -r -o $@ $(filter $(obj-y), $^),\ - rm -f $@; $(AR) rcs $@) - - $(builtin-target): $(obj-y) FORCE --- -1.7.9.5 - diff --git a/meta/recipes-core/busybox/busybox/CVE-2014-9645_busybox_reject_module_names_with_slashes.patch b/meta/recipes-core/busybox/busybox/CVE-2014-9645_busybox_reject_module_names_with_slashes.patch deleted file mode 100644 index 4e76067b3c..0000000000 --- a/meta/recipes-core/busybox/busybox/CVE-2014-9645_busybox_reject_module_names_with_slashes.patch +++ /dev/null @@ -1,41 +0,0 @@ -Upstream-status: Backport -http://git.busybox.net/busybox/commit/?id=4e314faa0aecb66717418e9a47a4451aec59262b - -CVE-2014-9645 fix. - -[YOCTO #7257] - -Signed-off-by: Armin Kuster <akuster@mvista.com> - -From 4e314faa0aecb66717418e9a47a4451aec59262b Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko <vda.linux@googlemail.com> -Date: Thu, 20 Nov 2014 17:24:33 +0000 -Subject: modprobe,rmmod: reject module names with slashes - -function old new delta -add_probe 86 113 +27 - -Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> ---- -Index: busybox-1.22.1/modutils/modprobe.c -=================================================================== ---- busybox-1.22.1.orig/modutils/modprobe.c -+++ busybox-1.22.1/modutils/modprobe.c -@@ -238,6 +238,17 @@ static void add_probe(const char *name) - { - struct module_entry *m; - -+ /* -+ * get_or_add_modentry() strips path from name and works -+ * on remaining basename. -+ * This would make "rmmod dir/name" and "modprobe dir/name" -+ * to work like "rmmod name" and "modprobe name", -+ * which is wrong, and can be abused via implicit modprobing: -+ * "ifconfig /usbserial up" tries to modprobe netdev-/usbserial. -+ */ -+ if (strchr(name, '/')) -+ bb_error_msg_and_die("malformed module name '%s'", name); -+ - m = get_or_add_modentry(name); - if (!(option_mask32 & (OPT_REMOVE | OPT_SHOW_DEPS)) - && (m->flags & MODULE_FLAG_LOADED) diff --git a/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch index fc7b778be1..781f5af14a 100644 --- a/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch +++ b/meta/recipes-core/busybox/busybox/busybox-cross-menuconfig.patch @@ -2,7 +2,7 @@ From: Jason Wessel <jason.wessel@windriver.com> Date: Sun, 3 Mar 2013 12:31:40 -0600 Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses location -Upstream-status: Submitted +Upstream-status: Submitted [ based on: https://lkml.org/lkml/2013/3/3/103 ] @@ -44,9 +44,9 @@ cc: linux-kbuild@vger.kernel.org + echo "$CROSS_CURSES_LIB" + exit + fi - for ext in so a dylib ; do - for lib in ncursesw ncurses curses ; do - $cc -print-file-name=lib${lib}.${ext} | grep -q / + for ext in so a dylib ; do + for lib in ncursesw ncurses curses ; do + $cc -print-file-name=lib${lib}.${ext} | grep -q / @@ -19,6 +23,10 @@ ldflags() # Where is ncurses.h? ccflags() @@ -55,17 +55,17 @@ cc: linux-kbuild@vger.kernel.org + echo "$CROSS_CURSES_INC" + exit + fi - if [ -f /usr/include/ncursesw/ncurses.h ]; then - echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"' - elif [ -f /usr/include/ncursesw/curses.h ]; then + if [ -f /usr/include/ncursesw/ncurses.h ]; then + echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"' + elif [ -f /usr/include/ncursesw/curses.h ]; then --- a/scripts/kconfig/lxdialog/Makefile +++ b/scripts/kconfig/lxdialog/Makefile @@ -5,7 +5,7 @@ check-lxdialog := $(srctree)/$(src)/che - + # Use reursively expanded variables so we do not call gcc unless # we really need to do so. (Do not call gcc as part of make mrproper) -HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) +HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) - + HOST_EXTRACFLAGS += -DLOCALE diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig index 8394067bed..c200ee074d 100644 --- a/meta/recipes-core/busybox/busybox/defconfig +++ b/meta/recipes-core/busybox/busybox/defconfig @@ -441,7 +441,7 @@ CONFIG_FEATURE_KILL_DELAY=0 # CONFIG_FEATURE_INIT_COREDUMPS is not set # CONFIG_FEATURE_INITRD is not set CONFIG_INIT_TERMINAL_TYPE="" -# CONFIG_MESG is not set +CONFIG_MESG=y # CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set # diff --git a/meta/recipes-core/busybox/busybox/libarchive-open_zipped-does-not-need-to-check-extens.patch b/meta/recipes-core/busybox/busybox/libarchive-open_zipped-does-not-need-to-check-extens.patch deleted file mode 100644 index cf914339cd..0000000000 --- a/meta/recipes-core/busybox/busybox/libarchive-open_zipped-does-not-need-to-check-extens.patch +++ /dev/null @@ -1,66 +0,0 @@ -Upstream-status: Backport -http://git.busybox.net/busybox/commit/?h=1_22_stable&id=28dd64a0e1a9cffcde7799f2849b66c0e16bb9cc - -From 28dd64a0e1a9cffcde7799f2849b66c0e16bb9cc Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko <vda.linux@googlemail.com> -Date: Fri, 10 Jan 2014 14:06:57 +0100 -Subject: [PATCH] libarchive: open_zipped() does not need to check extensions for e.g. gzip - -We only need to check for signature-less extensions, -currently only .lzma. The rest can be happily autodetected. - -This fixes "zcat FILE_WITHOUT_GZ_EXT" case, among others. - -Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> -(cherry picked from commit 7c47b560a8fc97956dd8132bd7f1863d83c19866) -Signed-off-by: Mike Frysinger <vapier@gentoo.org> ---- - archival/libarchive/open_transformer.c | 23 +++++++++++------------ - 1 file changed, 11 insertions(+), 12 deletions(-) - -diff --git a/archival/libarchive/open_transformer.c b/archival/libarchive/open_transformer.c -index 4e98264..1aeba13 100644 ---- a/archival/libarchive/open_transformer.c -+++ b/archival/libarchive/open_transformer.c -@@ -182,27 +182,26 @@ int FAST_FUNC setup_unzip_on_fd(int fd, int fail_if_not_detected) - - int FAST_FUNC open_zipped(const char *fname) - { -- char *sfx; - int fd; - - fd = open(fname, O_RDONLY); - if (fd < 0) - return fd; - -- sfx = strrchr(fname, '.'); -- if (sfx) { -- sfx++; -- if (ENABLE_FEATURE_SEAMLESS_LZMA && strcmp(sfx, "lzma") == 0) -- /* .lzma has no header/signature, just trust it */ -+ if (ENABLE_FEATURE_SEAMLESS_LZMA) { -+ /* .lzma has no header/signature, can only detect it by extension */ -+ char *sfx = strrchr(fname, '.'); -+ if (sfx && strcmp(sfx+1, "lzma") == 0) { - open_transformer_with_sig(fd, unpack_lzma_stream, "unlzma"); -- else -- if ((ENABLE_FEATURE_SEAMLESS_GZ && strcmp(sfx, "gz") == 0) -- || (ENABLE_FEATURE_SEAMLESS_BZ2 && strcmp(sfx, "bz2") == 0) -- || (ENABLE_FEATURE_SEAMLESS_XZ && strcmp(sfx, "xz") == 0) -- ) { -- setup_unzip_on_fd(fd, /*fail_if_not_detected:*/ 1); -+ return fd; - } - } -+ if ((ENABLE_FEATURE_SEAMLESS_GZ) -+ || (ENABLE_FEATURE_SEAMLESS_BZ2) -+ || (ENABLE_FEATURE_SEAMLESS_XZ) -+ ) { -+ setup_unzip_on_fd(fd, /*fail_if_not_detected:*/ 1); -+ } - - return fd; - } --- -1.9.1 - diff --git a/meta/recipes-core/busybox/busybox/lzop-add-overflow-check.patch b/meta/recipes-core/busybox/busybox/lzop-add-overflow-check.patch deleted file mode 100644 index 63d49481a3..0000000000 --- a/meta/recipes-core/busybox/busybox/lzop-add-overflow-check.patch +++ /dev/null @@ -1,71 +0,0 @@ -Upstream-status: Backport -http://git.busybox.net/busybox/commit/?h=1_22_stable&id=5698ff93233b47218a677fd7facd8cc90211d1a4 - -From 5698ff93233b47218a677fd7facd8cc90211d1a4 Mon Sep 17 00:00:00 2001 -From: Denys Vlasenko <vda.linux@googlemail.com> -Date: Mon, 30 Jun 2014 10:14:34 +0200 -Subject: [PATCH] lzop: add overflow check - -See CVE-2014-4607 -http://www.openwall.com/lists/oss-security/2014/06/26/20 - -function old new delta -lzo1x_decompress_safe 1010 1031 +21 - -Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> -Signed-off-by: Mike Frysinger <vapier@gentoo.org> -(cherry picked from commit a9dc7c2f59dc5e92870d2d46316ea5c1f14740e3) ---- - archival/libarchive/liblzo.h | 2 ++ - archival/libarchive/lzo1x_d.c | 3 +++ - 2 files changed, 5 insertions(+) - -diff --git a/archival/libarchive/liblzo.h b/archival/libarchive/liblzo.h -index 843997c..4596620 100644 ---- a/archival/libarchive/liblzo.h -+++ b/archival/libarchive/liblzo.h -@@ -76,11 +76,13 @@ - # define TEST_IP (ip < ip_end) - # define NEED_IP(x) \ - if ((unsigned)(ip_end - ip) < (unsigned)(x)) goto input_overrun -+# define TEST_IV(x) if ((x) > (unsigned)0 - (511)) goto input_overrun - - # undef TEST_OP /* don't need both of the tests here */ - # define TEST_OP 1 - # define NEED_OP(x) \ - if ((unsigned)(op_end - op) < (unsigned)(x)) goto output_overrun -+# define TEST_OV(x) if ((x) > (unsigned)0 - (511)) goto output_overrun - - #define HAVE_ANY_OP 1 - -diff --git a/archival/libarchive/lzo1x_d.c b/archival/libarchive/lzo1x_d.c -index 9bc1270..40b167e 100644 ---- a/archival/libarchive/lzo1x_d.c -+++ b/archival/libarchive/lzo1x_d.c -@@ -92,6 +92,7 @@ int lzo1x_decompress_safe(const uint8_t* in, unsigned in_len, - ip++; - NEED_IP(1); - } -+ TEST_IV(t); - t += 15 + *ip++; - } - /* copy literals */ -@@ -224,6 +225,7 @@ int lzo1x_decompress_safe(const uint8_t* in, unsigned in_len, - ip++; - NEED_IP(1); - } -+ TEST_IV(t); - t += 31 + *ip++; - } - #if defined(COPY_DICT) -@@ -265,6 +267,7 @@ int lzo1x_decompress_safe(const uint8_t* in, unsigned in_len, - ip++; - NEED_IP(1); - } -+ TEST_IV(t); - t += 7 + *ip++; - } - #if defined(COPY_DICT) --- -1.9.1 - diff --git a/meta/recipes-core/busybox/busybox_1.22.1.bb b/meta/recipes-core/busybox/busybox_1.23.1.bb index ae8eca70ff..7c3ed84394 100644 --- a/meta/recipes-core/busybox/busybox_1.22.1.bb +++ b/meta/recipes-core/busybox/busybox_1.23.1.bb @@ -1,7 +1,5 @@ require busybox.inc -PR = "r32" - SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://get_header_tar.patch \ file://busybox-appletlib-dependency.patch \ @@ -20,6 +18,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://busybox-syslog.default \ file://mdev \ file://mdev.conf \ + file://mdev-mount.sh \ file://umount.busybox \ file://defconfig \ file://busybox-syslog.service.in \ @@ -29,16 +28,12 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://inetd.conf \ file://inetd \ file://login-utilities.cfg \ - file://0001-build-system-Specify-nostldlib-when-linking-to-.o-fi.patch \ file://recognize_connmand.patch \ file://busybox-cross-menuconfig.patch \ - file://CVE-2014-9645_busybox_reject_module_names_with_slashes.patch \ - file://lzop-add-overflow-check.patch \ - file://libarchive-open_zipped-does-not-need-to-check-extens.patch \ " -SRC_URI[tarball.md5sum] = "337d1a15ab1cb1d4ed423168b1eb7d7e" -SRC_URI[tarball.sha256sum] = "ae0b029d0a9e4dd71a077a790840e496dd838998e4571b87b60fed7462b6678b" +SRC_URI[tarball.md5sum] = "5c94d6301a964cd91619bd4d74605245" +SRC_URI[tarball.sha256sum] = "300f1db0a7ca4ecee8f8d8027aba250b903372e8339b7d9123d37c1e900473bf" EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" diff --git a/meta/recipes-core/busybox/busybox_git.bb b/meta/recipes-core/busybox/busybox_git.bb index f2cc119400..529ed5b318 100644 --- a/meta/recipes-core/busybox/busybox_git.bb +++ b/meta/recipes-core/busybox/busybox_git.bb @@ -1,8 +1,8 @@ require busybox.inc -SRCREV = "d9e0c438e10e2155513e5d26498af472c5137d65" +SRCREV = "1ecfe811fe2f70380170ef7d820e8150054e88ca" # Lookout for PV bump too when SRCREV is changed -PV = "1.22.1+git${SRCPV}" +PV = "1.23.1+git${SRCPV}" S = "${WORKDIR}/git" @@ -24,6 +24,7 @@ SRC_URI = "git://busybox.net/busybox.git \ file://busybox-syslog.default \ file://mdev \ file://mdev.conf \ + file://mdev-mount.sh \ file://umount.busybox \ file://defconfig \ file://busybox-syslog.service.in \ diff --git a/meta/recipes-core/busybox/files/find-touchscreen.sh b/meta/recipes-core/busybox/files/find-touchscreen.sh index 1582ea891c..52c5e7a096 100644 --- a/meta/recipes-core/busybox/files/find-touchscreen.sh +++ b/meta/recipes-core/busybox/files/find-touchscreen.sh @@ -1,9 +1,6 @@ #!/bin/sh -if [ `egrep "input:.*-e0.*,3,.*a0,1,.*18,.*" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then - ln -sf /dev/input/$MDEV /dev/input/touchscreen0 +if grep -q "input:.*-e0.*,3,.*a0,1,\|ads7846" /sys/class/$MDEV/device/modalias ; then + ln -sf /dev/$MDEV /dev/input/touchscreen0 fi -if [ `egrep "ads7846" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then - ln -sf /dev/input/$MDEV /dev/input/touchscreen0 -fi diff --git a/meta/recipes-core/busybox/files/mdev-mount.sh b/meta/recipes-core/busybox/files/mdev-mount.sh new file mode 100644 index 0000000000..d5d66d66fb --- /dev/null +++ b/meta/recipes-core/busybox/files/mdev-mount.sh @@ -0,0 +1,63 @@ +#!/bin/sh +MDEV_AUTOMOUNT=y +MDEV_AUTOMOUNT_ROOT=/run/media +[ -f /etc/default/mdev ] && . /etc/default/mdev +if [ "${MDEV_AUTOMOUNT}" = "n" ] ; then + exit 0 +fi + +case "$ACTION" in + add|"") + ACTION="add" + # check if already mounted + if grep -q "^/dev/${MDEV} " /proc/mounts ; then + # Already mounted + exit 0 + fi + DEVBASE=`expr substr $MDEV 1 3` + if [ "${DEVBASE}" == "mmc" ] ; then + DEVBASE=`expr substr $MDEV 1 7` + fi + # check for "please don't mount it" file + if [ -f "/dev/nomount.${DEVBASE}" ] ; then + # blocked + exit 0 + fi + # check for full-disk partition + if [ "${DEVBASE}" == "${MDEV}" ] ; then + if [ -d /sys/block/${DEVBASE}/${DEVBASE}*1 ] ; then + # Partition detected, just quit + exit 0 + fi + if [ ! -f /sys/block/${DEVBASE}/size ] ; then + # No size at all + exit 0 + fi + if [ `cat /sys/block/${DEVBASE}/size` == 0 ] ; then + # empty device, bail out + exit 0 + fi + fi + # first allow fstab to determine the mountpoint + if ! mount /dev/$MDEV > /dev/null 2>&1 + then + MOUNTPOINT="${MDEV_AUTOMOUNT_ROOT}/$MDEV" + mkdir "$MOUNTPOINT" + mount -t auto /dev/$MDEV "$MOUNTPOINT" + fi + ;; + remove) + MOUNTPOINT=`grep "^/dev/$MDEV\s" /proc/mounts | cut -d' ' -f 2` + if [ ! -z "$MOUNTPOINT" ] + then + umount "$MOUNTPOINT" + rmdir "$MOUNTPOINT" + else + umount /dev/$MDEV + fi + ;; + *) + # Unexpected keyword + exit 1 + ;; +esac diff --git a/meta/recipes-core/busybox/files/mdev.conf b/meta/recipes-core/busybox/files/mdev.conf index e688911ff1..17e93da7c3 100644 --- a/meta/recipes-core/busybox/files/mdev.conf +++ b/meta/recipes-core/busybox/files/mdev.conf @@ -1,3 +1,5 @@ +$MODALIAS=.* 0:0 660 @modprobe "$MODALIAS" + console 0:0 0600 cpu_dma_latency 0:0 0660 fb0:0 44 0660 @@ -35,3 +37,6 @@ input/mice 0:0 0660 input/mouse.* 0:0 0660 tun[0-9]* 0:0 0660 =net/ + +[hs]d[a-z][0-9]? 0:0 660 */etc/mdev/mdev-mount.sh +mmcblk[0-9].* 0:0 660 */etc/mdev/mdev-mount.sh diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script index 757e487b97..22168b07e6 100644 --- a/meta/recipes-core/busybox/files/simple.script +++ b/meta/recipes-core/busybox/files/simple.script @@ -46,7 +46,7 @@ case "$1" in if [ -n "$router" ] ; then if ! root_is_nfs ; then if [ $have_bin_ip -eq 1 ]; then - while ip route del default 2>/dev/null ; do + while ip route del default dev $interface 2>/dev/null ; do : done else @@ -56,7 +56,7 @@ case "$1" in fi fi - metric=0 + metric=10 for i in $router ; do if [ $have_bin_ip -eq 1 ]; then ip route add default via $i metric $metric diff --git a/meta/recipes-core/coreutils/coreutils-8.22/date-tz-crash.patch b/meta/recipes-core/coreutils/coreutils-8.22/date-tz-crash.patch deleted file mode 100644 index 570e4fd49c..0000000000 --- a/meta/recipes-core/coreutils/coreutils-8.22/date-tz-crash.patch +++ /dev/null @@ -1,43 +0,0 @@ -This was reported in http://bugs.gnu.org/16872 -from the coreutils command: date -d 'TZ="""' - -The infinite loop for this case was present since the -initial TZ="" parsing support in commit de95bdc2 29-10-2004. -This was changed to a crash or heap corruption depending -on the platform with commit 2e3e4195 18-01-2010. - -* lib/parse-datetime.y (parse_datetime): Break out of the -TZ="" parsing loop once the second significant " is found. -Also skip over any subsequent whitespace to be consistent -with the non TZ= case. - -Fixes: CVE-2014-9471 - -Upstream-Status: backport - -Signed-off-by: Maxin B. John <maxin.john@enea.com> -Signed-off-by: Pádraig Brady <P@draigBrady.com> ---- -diff -Naur coreutils-8.22-origin/lib/parse-datetime.y coreutils-8.22/lib/parse-datetime.y ---- coreutils-8.22-origin/lib/parse-datetime.y 2013-12-04 15:53:33.000000000 +0100 -+++ coreutils-8.22/lib/parse-datetime.y 2015-01-05 17:11:16.754358184 +0100 -@@ -1303,8 +1303,6 @@ - char tz1buf[TZBUFSIZE]; - bool large_tz = TZBUFSIZE < tzsize; - bool setenv_ok; -- /* Free tz0, in case this is the 2nd or subsequent time through. */ -- free (tz0); - tz0 = get_tz (tz0buf); - z = tz1 = large_tz ? xmalloc (tzsize) : tz1buf; - for (s = tzbase; *s != '"'; s++) -@@ -1317,6 +1315,10 @@ - goto fail; - tz_was_altered = true; - p = s + 1; -+ while (c = *p, c_isspace (c)) -+ p++; -+ -+ break; - } - } - diff --git a/meta/recipes-core/coreutils/coreutils-8.22/dummy_help2man.patch b/meta/recipes-core/coreutils/coreutils-8.22/dummy_help2man.patch deleted file mode 100644 index 4757f52aa0..0000000000 --- a/meta/recipes-core/coreutils/coreutils-8.22/dummy_help2man.patch +++ /dev/null @@ -1,22 +0,0 @@ -Upstream-Status: Inappropriate [disable feature] - -Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> -diff -Nurd coreutils-8.21/man/local.mk coreutils-8.21/man/local.mk ---- coreutils-8.21/man/local.mk 2013-02-05 16:01:21.000000000 +0200 -+++ coreutils-8.21/man/local.mk 2013-03-23 09:12:53.360470192 +0200 -@@ -19,11 +19,11 @@ - EXTRA_DIST += man/help2man man/dummy-man - - ## Graceful degradation for systems lacking perl. --if HAVE_PERL --run_help2man = $(PERL) -- $(srcdir)/man/help2man --else -+#if HAVE_PERL -+#run_help2man = $(PERL) -- $(srcdir)/man/help2man -+#else - run_help2man = $(SHELL) $(srcdir)/man/dummy-man --endif -+#endif - - man1_MANS = @man1_MANS@ - EXTRA_DIST += $(man1_MANS:.1=.x) diff --git a/meta/recipes-core/coreutils/coreutils-8.22/fix-for-dummy-man-usage.patch b/meta/recipes-core/coreutils/coreutils-8.22/fix-for-dummy-man-usage.patch deleted file mode 100644 index b7e82609bd..0000000000 --- a/meta/recipes-core/coreutils/coreutils-8.22/fix-for-dummy-man-usage.patch +++ /dev/null @@ -1,31 +0,0 @@ -Upstream-Status: Pending - -coreutils: fix for dummy-man usage - -The options should be before the final argument, otherwise, the following error -would appear when compiling. - -"dummy-man: too many non-option arguments" - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - man/local.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/man/local.mk b/man/local.mk -index 7cef5e3..dc0865f 100644 ---- a/man/local.mk -+++ b/man/local.mk -@@ -189,8 +189,8 @@ man/yes.1: src/yes - && $(run_help2man) \ - --source='$(PACKAGE_STRING)' \ - --include=$(srcdir)/man/$$name.x \ -- --output=$$t/$$name.1 $$t/$$name \ - --info-page='coreutils \(aq'$$name' invocation\(aq' \ -+ --output=$$t/$$name.1 $$t/$$name \ - && sed \ - -e 's|$*\.td/||g' \ - -e '/For complete documentation/d' \ --- -1.7.9.5 - diff --git a/meta/recipes-core/coreutils/coreutils-8.22/fix-selinux-flask.patch b/meta/recipes-core/coreutils/coreutils-8.23/fix-selinux-flask.patch index 9d1ae55d47..9d1ae55d47 100644 --- a/meta/recipes-core/coreutils/coreutils-8.22/fix-selinux-flask.patch +++ b/meta/recipes-core/coreutils/coreutils-8.23/fix-selinux-flask.patch diff --git a/meta/recipes-core/coreutils/coreutils-8.23/man-decouple-manpages-from-build.patch b/meta/recipes-core/coreutils/coreutils-8.23/man-decouple-manpages-from-build.patch new file mode 100644 index 0000000000..3c896a11bf --- /dev/null +++ b/meta/recipes-core/coreutils/coreutils-8.23/man-decouple-manpages-from-build.patch @@ -0,0 +1,27 @@ +From b4d258629f090066783c3b4c91b40f63b9d0a296 Mon Sep 17 00:00:00 2001 +From: Paul Gortmaker <paul.gortmaker@windriver.com> +Date: Sun, 8 Feb 2015 16:51:57 -0500 +Subject: [PATCH] man: decouple manpages from build + +The use of "help2man" doesn't work at all for cross compile, in +addition to the extra requirement of perl it adds. + +Just decouple the manpages from the build in order to pave the way for +importing prebuilt manpages that can be used in a cross build situation. + +Upstream-Status: Inappropriate [upstream doesn't care about x-compile case.] +Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> + +diff --git a/Makefile.am b/Makefile.am +index fb4af27..7576b2c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -214,5 +214,4 @@ AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib -Isrc -I$(top_srcdir)/src + include $(top_srcdir)/lib/local.mk + include $(top_srcdir)/src/local.mk + include $(top_srcdir)/doc/local.mk +-include $(top_srcdir)/man/local.mk + include $(top_srcdir)/tests/local.mk +-- +2.2.2 + diff --git a/meta/recipes-core/coreutils/coreutils-8.22/remove-usr-local-lib-from-m4.patch b/meta/recipes-core/coreutils/coreutils-8.23/remove-usr-local-lib-from-m4.patch index 2ef8a548ac..2ef8a548ac 100644 --- a/meta/recipes-core/coreutils/coreutils-8.22/remove-usr-local-lib-from-m4.patch +++ b/meta/recipes-core/coreutils/coreutils-8.23/remove-usr-local-lib-from-m4.patch diff --git a/meta/recipes-core/coreutils/coreutils_6.9.bb b/meta/recipes-core/coreutils/coreutils_6.9.bb index debd2a123b..9189426315 100644 --- a/meta/recipes-core/coreutils/coreutils_6.9.bb +++ b/meta/recipes-core/coreutils/coreutils_6.9.bb @@ -9,11 +9,10 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ file://src/ls.c;beginline=4;endline=16;md5=15ed60f67b1db5fedd5dbc37cf8a9543" PR = "r5" -DEPENDS_class-native = "gettext-native" inherit autotools gettext texinfo -SRC_URI_BASE = "${GNU_MIRROR}/coreutils/${BP}.tar.bz2 \ +SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.bz2 \ file://gnulib_m4.patch \ file://futimens.patch \ file://coreutils-ls-x.patch \ @@ -25,23 +24,20 @@ SRC_URI_BASE = "${GNU_MIRROR}/coreutils/${BP}.tar.bz2 \ file://coreutils_fix_for_automake-1.12.patch \ file://coreutils-build-with-acl.patch \ file://coreutils-fix-texinfo.patch \ + file://fix_for_manpage_building.patch \ " -SRC_URI = "${SRC_URI_BASE} file://fix_for_manpage_building.patch" -SRC_URI_class-native = "${SRC_URI_BASE}" - SRC_URI[md5sum] = "c9607d8495f16e98906e7ed2d9751a06" SRC_URI[sha256sum] = "89c2895ad157de50e53298b22d91db116ee4e1dd3fdf4019260254e2e31497b0" # acl is not a default feature # -PACKAGECONFIG_class-target ??= "${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" -PACKAGECONFIG_class-native ??= "" +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}" # with, without, depends, rdepends # -PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl," +PACKAGECONFIG[acl] = "ac_cv_header_sys_acl_h=yes,ac_cv_header_sys_acl_h=no,acl," # [ gets a special treatment and is not included in this @@ -102,5 +98,3 @@ python __anonymous() { for prog in d.getVar('sbindir_progs', True).split(): d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir', True), prog)) } - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-core/coreutils/coreutils_8.22.bb b/meta/recipes-core/coreutils/coreutils_8.23.bb index 4a1aee6260..63df75e7ba 100644 --- a/meta/recipes-core/coreutils/coreutils_8.22.bb +++ b/meta/recipes-core/coreutils/coreutils_8.23.bb @@ -12,16 +12,17 @@ DEPENDS_class-native = "" inherit autotools gettext texinfo -SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ +SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \ + http://distfiles.gentoo.org/distfiles/${BP}-man.tar.xz;name=manpages \ + file://man-decouple-manpages-from-build.patch \ file://remove-usr-local-lib-from-m4.patch \ - file://dummy_help2man.patch \ - file://fix-for-dummy-man-usage.patch \ file://fix-selinux-flask.patch \ - file://date-tz-crash.patch \ " -SRC_URI[md5sum] = "8fb0ae2267aa6e728958adc38f8163a2" -SRC_URI[sha256sum] = "5b3e94998152c017e6c75d56b9b994188eb71bf46d4038a642cb9141f6ff1212" +SRC_URI[tarball.md5sum] = "abed135279f87ad6762ce57ff6d89c41" +SRC_URI[tarball.sha256sum] = "ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d" +SRC_URI[manpages.md5sum] = "ce49bc8360e16afe67581d136606efc7" +SRC_URI[manpages.sha256sum] = "d1b16e74b3dba4f313aeebae2c69da205f7d2e6e1c2aa8d39026c860d314ecca" EXTRA_OECONF_class-native = "--without-gmp" EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}" @@ -73,6 +74,13 @@ do_install_append() { # in update-alternatives to fail, therefore use lbracket - the name used # for the actual source file. mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN} + + # prebuilt man pages + install -d ${D}/${mandir}/man1 + install -t ${D}/${mandir}/man1 ${S}/man/*.1 + # prebuilt man pages don't do a separate man page for [ vs test. + # see comment above r.e. sed and update-alternatives + cp -a ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN} } do_install_append_class-native(){ @@ -84,18 +92,23 @@ inherit update-alternatives ALTERNATIVE_PRIORITY = "100" ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df" +ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1" ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64" ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}" +ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1" ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp" ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}" +ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1" ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df" ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}" +ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1" ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/[" ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}" +ALTERNATIVE_LINK_NAME[lbracket.1] = "${mandir}/man1/lbracket.1" python __anonymous() { for prog in d.getVar('base_bindir_progs', True).split(): diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch deleted file mode 100644 index 40e3b12b5d..0000000000 --- a/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch +++ /dev/null @@ -1,15 +0,0 @@ -Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003] - -Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> -diff -Nurd dbus-glib-0.100/configure.ac dbus-glib-0.100/configure.ac ---- dbus-glib-0.100/configure.ac 2012-06-25 19:26:39.000000000 +0300 -+++ dbus-glib-0.100/configure.ac 2013-01-03 04:53:22.314976758 +0200 -@@ -8,7 +8,7 @@ - - AM_INIT_AUTOMAKE([1.9]) - --AM_CONFIG_HEADER(config.h) -+AC_CONFIG_HEADERS(config.h) - - # Honor aclocal flags - ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" diff --git a/meta/recipes-core/dbus/dbus-glib.inc b/meta/recipes-core/dbus/dbus-glib.inc index 6c60d9e408..abd013247c 100644 --- a/meta/recipes-core/dbus/dbus-glib.inc +++ b/meta/recipes-core/dbus/dbus-glib.inc @@ -13,7 +13,6 @@ DEPENDS_class-native = "glib-2.0-native dbus-native" SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \ file://no-examples.patch \ file://test-install-makefile.patch \ - file://obsolete_automake_macros.patch \ " inherit autotools pkgconfig gettext diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch b/meta/recipes-core/dbus/dbus-glib/no-examples.patch index fbb4967828..fbb4967828 100644 --- a/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch +++ b/meta/recipes-core/dbus/dbus-glib/no-examples.patch diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch b/meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch index 2e8e178bb7..027c82b27e 100644 --- a/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch +++ b/meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch @@ -3,26 +3,46 @@ Change Makefile.am to install regression tests for test package purpose. Upstream-Status: Inappropriate [test not install is for purpose from upstream] Signed-off-by: Yao Zhao <yao.zhao@windriver.com> +Signed-off-by: Chong Lu <Chong.Lu@windriver.com> +--- + test/Makefile.am | 3 ++- + test/core/Makefile.am | 3 ++- + test/interfaces/Makefile.am | 3 ++- + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am -index 7ba11a8..249f0e7 100644 +index 379c8c3..6580927 100644 --- a/test/Makefile.am +++ b/test/Makefile.am -@@ -13,7 +13,8 @@ else - TEST_BINARIES= - endif +@@ -48,7 +48,8 @@ TESTS = \ + $(test_scripts) \ + $(NULL) --noinst_PROGRAMS= $(TEST_BINARIES) +-noinst_PROGRAMS = \ +testdir = $(datadir)/@PACKAGE@/tests -+test_PROGRAMS= $(TEST_BINARIES) ++test_PROGRAMS = \ + $(test_programs) \ + $(test_related_programs) \ + $(NULL) +diff --git a/test/core/Makefile.am b/test/core/Makefile.am +index e4bceb4..54b077d 100644 +--- a/test/core/Makefile.am ++++ b/test/core/Makefile.am +@@ -64,7 +64,8 @@ endif - test_service_SOURCES= \ - test-service.c + ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we + ## build even when not doing "make check" +-noinst_PROGRAMS = \ ++testdir = $(datadir)/@PACKAGE@/tests/core ++test_PROGRAMS = \ + test-dbus-glib \ + test-error-mapping \ + test-service-glib \ diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am -index 3cb2c39..e6de67d 100644 +index a94d08d..707dcac 100644 --- a/test/interfaces/Makefile.am +++ b/test/interfaces/Makefile.am -@@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS +@@ -57,7 +57,8 @@ if DBUS_BUILD_TESTS ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we ## build even when not doing "make check" @@ -32,17 +52,6 @@ index 3cb2c39..e6de67d 100644 test_service_SOURCES = \ test-interfaces.c \ -diff --git a/test/core/Makefile.am b/test/core/Makefile.am -index ef6cb26..9786c3a 100644 ---- a/test/core/Makefile.am -+++ b/test/core/Makefile.am -@@ -46,7 +46,8 @@ endif - - ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we - ## build even when not doing "make check" --noinst_PROGRAMS = \ -+testdir = $(datadir)/@PACKAGE@/tests/core -+test_PROGRAMS = \ - test-dbus-glib \ - test-service-glib \ - $(THREAD_APPS) \ +-- +1.9.1 + diff --git a/meta/recipes-core/dbus/dbus-glib_0.100.2.bb b/meta/recipes-core/dbus/dbus-glib_0.100.2.bb deleted file mode 100644 index c1bb06a1b4..0000000000 --- a/meta/recipes-core/dbus/dbus-glib_0.100.2.bb +++ /dev/null @@ -1,5 +0,0 @@ -require dbus-glib.inc - - -SRC_URI[md5sum] = "ad0920c7e3aad669163bb59171cf138e" -SRC_URI[sha256sum] = "a5bb42da921f51c28161e0e54a5a8241d94a1c0499a14007150e9ce743da6ac5" diff --git a/meta/recipes-core/dbus/dbus-glib_0.102.bb b/meta/recipes-core/dbus/dbus-glib_0.102.bb new file mode 100644 index 0000000000..d798ebfac0 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib_0.102.bb @@ -0,0 +1,5 @@ +require dbus-glib.inc + + +SRC_URI[md5sum] = "f76b8558fd575d0106c3a556eaa49184" +SRC_URI[sha256sum] = "6964ed585bb8149a14ab744b5ded5e77cf71ec5446e6dcc5fcf5eebcc52df29c" diff --git a/meta/recipes-core/dbus/dbus-test_1.8.2.bb b/meta/recipes-core/dbus/dbus-test_1.8.10.bb index e19d2e9d1e..719c1f9621 100644 --- a/meta/recipes-core/dbus/dbus-test_1.8.2.bb +++ b/meta/recipes-core/dbus/dbus-test_1.8.10.bb @@ -18,8 +18,8 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ " -SRC_URI[md5sum] = "d6f709bbec0a022a1847c7caec9d6068" -SRC_URI[sha256sum] = "5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08" +SRC_URI[md5sum] = "6be5ef99ae784de9d04589eb067fe038" +SRC_URI[sha256sum] = "10bf87fdb68815edd01d53885101dbcdd80dacad7198912cca61a4fa22dfaf8e" S="${WORKDIR}/dbus-${PV}" FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:" @@ -44,6 +44,7 @@ EXTRA_OECONF = "--enable-tests \ ${EXTRA_OECONF_X}" do_install() { + : } do_install_ptest() { diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc index d38ba7e1d2..fb5d017856 100644 --- a/meta/recipes-core/dbus/dbus.inc +++ b/meta/recipes-core/dbus/dbus.inc @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ DEPENDS = "expat virtual/libintl" RDEPENDS_dbus_class-native = "" RDEPENDS_dbus_class-nativesdk = "" -PACKAGES += "${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus-ptest', '', d)}" +PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}" ALLOW_EMPTY_dbus-ptest = "1" RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest" diff --git a/meta/recipes-core/dbus/dbus_1.8.10.bb b/meta/recipes-core/dbus/dbus_1.8.10.bb new file mode 100644 index 0000000000..250ea21ddc --- /dev/null +++ b/meta/recipes-core/dbus/dbus_1.8.10.bb @@ -0,0 +1,4 @@ +include dbus.inc + +SRC_URI[md5sum] = "6be5ef99ae784de9d04589eb067fe038" +SRC_URI[sha256sum] = "10bf87fdb68815edd01d53885101dbcdd80dacad7198912cca61a4fa22dfaf8e" diff --git a/meta/recipes-core/dbus/dbus_1.8.2.bb b/meta/recipes-core/dbus/dbus_1.8.2.bb deleted file mode 100644 index 37ebed2bd6..0000000000 --- a/meta/recipes-core/dbus/dbus_1.8.2.bb +++ /dev/null @@ -1,4 +0,0 @@ -include dbus.inc - -SRC_URI[md5sum] = "d6f709bbec0a022a1847c7caec9d6068" -SRC_URI[sha256sum] = "5689f7411165adc953f37974e276a3028db94447c76e8dd92efe910c6d3bae08" diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc index 947a491679..e187d04339 100644 --- a/meta/recipes-core/dropbear/dropbear.inc +++ b/meta/recipes-core/dropbear/dropbear.inc @@ -5,7 +5,7 @@ SECTION = "console/network" # some files are from other projects and have others license terms: # public domain, OpenSSH 3.5p1, OpenSSH3.6.1p2, PuTTY LICENSE = "MIT & BSD-3-Clause & BSD-2-Clause & PD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4d290ce0ac102c828dfc9ce836784688" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3a1b9604afd1648b28b0c6f1709e9f4" DEPENDS = "zlib" RPROVIDES_${PN} = "ssh sshd" diff --git a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch index 71a4666b5c..dc9d5782e8 100644 --- a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch +++ b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch @@ -13,7 +13,7 @@ index 7d06322..71a21c2 100644 /* The command to invoke for xauth when using X11 forwarding. * "-q" for quiet */ #ifndef XAUTH_COMMAND --#define XAUTH_COMMAND "/usr/bin/X11/xauth -q" +-#define XAUTH_COMMAND "/usr/bin/xauth -q" +#define XAUTH_COMMAND "xauth -q" #endif diff --git a/meta/recipes-core/dropbear/dropbear_2014.63.bb b/meta/recipes-core/dropbear/dropbear_2014.63.bb deleted file mode 100644 index bb7e6178bc..0000000000 --- a/meta/recipes-core/dropbear/dropbear_2014.63.bb +++ /dev/null @@ -1,4 +0,0 @@ -require dropbear.inc - -SRC_URI[md5sum] = "7066bb9a2da708f3ed06314fdc9c47fd" -SRC_URI[sha256sum] = "595992de432ba586a0e7e191bbb1ad587727678bb3e345b018c395b8c55b57ae" diff --git a/meta/recipes-core/dropbear/dropbear_2014.66.bb b/meta/recipes-core/dropbear/dropbear_2014.66.bb new file mode 100644 index 0000000000..8931eb75b2 --- /dev/null +++ b/meta/recipes-core/dropbear/dropbear_2014.66.bb @@ -0,0 +1,4 @@ +require dropbear.inc + +SRC_URI[md5sum] = "c21a01111aa5015db038c6efdb85717d" +SRC_URI[sha256sum] = "ab3fe2670a517cc0bbe398ff5d15e9ca12cd14f2fc18930a8111ae2baa64ab76" diff --git a/meta/recipes-core/feed-config/poky-feed-config-opkg_1.0.bb b/meta/recipes-core/feed-config/poky-feed-config-opkg_1.0.bb deleted file mode 100644 index fb312f8151..0000000000 --- a/meta/recipes-core/feed-config/poky-feed-config-opkg_1.0.bb +++ /dev/null @@ -1,44 +0,0 @@ -SUMMARY = "Poky example feed configuration" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -PR = "r2" -PACKAGE_ARCH = "${MACHINE_ARCH}" -INHIBIT_DEFAULT_DEPS = "1" - -#FEEDNAMEPREFIX ?= "INVALID" -#FEEDURIPREFIX ?= "INVALID" - -do_compile() { - mkdir -p ${S}/${sysconfdir}/opkg/ - - archconf=${S}/${sysconfdir}/opkg/arch.conf - - rm -f $archconf - ipkgarchs="${ALL_MULTILIB_PACKAGE_ARCHS}" - priority=1 - for arch in $ipkgarchs; do - echo "arch $arch $priority" >> $archconf - priority=$(expr $priority + 5) - done - - basefeedconf=${S}/${sysconfdir}/opkg/base-feeds.conf - - rm -f $basefeedconf - touch $basefeedconf - - #for arch in $ipkgarchs; do - # echo "src/gz ${FEEDNAMEPREFIX}-$arch http://pokylinux.org/${FEEDURIPREFIX}$arch" >> $basefeedconf - #done -} - - -do_install () { - install -d ${D}${sysconfdir}/opkg - install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/ -} - -FILES_${PN} = "${sysconfdir}/opkg/ " - -CONFFILES_${PN} += "${sysconfdir}/opkg/base-feeds.conf \ - ${sysconfdir}/opkg/arch.conf" - diff --git a/meta/recipes-core/gettext/gettext-0.18.3.2/parallel.patch b/meta/recipes-core/gettext/gettext-0.19.4/parallel.patch index f2c567d188..c8e2c94af0 100644 --- a/meta/recipes-core/gettext/gettext-0.18.3.2/parallel.patch +++ b/meta/recipes-core/gettext/gettext-0.19.4/parallel.patch @@ -21,16 +21,3 @@ Signed-off-by: Joe Slater <jslater@windriver.com> # Which classes to export from the shared library. MOOPPFLAGS += --dllexport=styled_ostream ---- a/gettext-tools/src/Makefile.am -+++ b/gettext-tools/src/Makefile.am -@@ -229,8 +229,8 @@ libgettextsrc_la_LDFLAGS += -Wl,--export - endif - - # No need to install libgettextsrc.a, except on AIX. --install-exec-local: install-libLTLIBRARIES install-exec-clean --install-exec-clean: -+install-exec-local: install-exec-clean -+install-exec-clean: install-libLTLIBRARIES - case "@host_os@" in \ - aix*) ;; \ - *) $(RM) $(DESTDIR)$(libdir)/libgettextsrc.a ;; \ diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makevars.template b/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makevars.template deleted file mode 100644 index 4a9ff7d231..0000000000 --- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makevars.template +++ /dev/null @@ -1,53 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = Free Software Foundation, Inc. - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = - -# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' -# context. Possible values are "yes" and "no". Set this to yes if the -# package uses functions taking also a message context, like pgettext(), or -# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. -USE_MSGCTXT = no - -# These options get passed to msgmerge. -# Useful options are in particular: -# --previous to keep previous msgids of translated messages, -# --quiet to reduce the verbosity. -MSGMERGE_OPTIONS = diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/aclocal.tgz b/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/aclocal.tgz Binary files differdeleted file mode 100644 index e0335a3d1c..0000000000 --- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/aclocal.tgz +++ /dev/null diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/iconv-m4-remove-the-test-to-convert-euc-jp.patch b/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/iconv-m4-remove-the-test-to-convert-euc-jp.patch deleted file mode 100644 index d453a74b51..0000000000 --- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/iconv-m4-remove-the-test-to-convert-euc-jp.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0bfade685783ccd193b2e1b94d0e4ef5ce449432 Mon Sep 17 00:00:00 2001 -From: Jackie Huang <jackie.huang@windriver.com> -Date: Wed, 20 Nov 2013 17:52:50 +0800 -Subject: [PATCH] remove the test to convert euc-jp - -Remove the test "Test against HP-UX 11.11 bug: -No converter from EUC-JP to UTF-8 is provided" -since we don't support HP-UX and it causes -guile-native compile failure if the euc-jp is not -installed on the host - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - iconv.m4 | 11 ----------- - 1 file changed, 11 deletions(-) - -diff --git a/iconv.m4 b/iconv.m4 -index a503646..dbe7ca1 100644 ---- a/iconv.m4 -+++ b/iconv.m4 -@@ -159,17 +159,6 @@ int main () - } - } - #endif -- /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is -- provided. */ -- if (/* Try standardized names. */ -- iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) -- /* Try IRIX, OSF/1 names. */ -- && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) -- /* Try AIX names. */ -- && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) -- /* Try HP-UX names. */ -- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) -- result |= 16; - return result; - }]])], - [am_cv_func_iconv_works=yes], --- -1.8.3 - diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/COPYING b/meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING index 3485c5a2cb..8d11d1d8e9 100644 --- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/COPYING +++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/COPYING @@ -1,4 +1,4 @@ -dnl Copyright (C) 1997-2010 Free Software Foundation, Inc. +dnl Copyright (C) 1995-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makefile.in.in b/meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in index fabdc76c9c..65184f65c7 100644 --- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/Makefile.in.in +++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/Makefile.in.in @@ -8,8 +8,8 @@ # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # -# Origin: gettext-0.18.3 -GETTEXT_MACRO_VERSION = 0.18 +# Origin: gettext-0.19 +GETTEXT_MACRO_VERSION = 0.19 PACKAGE = @PACKAGE@ VERSION = @VERSION@ @@ -77,6 +77,16 @@ POTFILES = \ CATALOGS = @CATALOGS@ +POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot +POFILESDEPS_yes = $(POFILESDEPS_) +POFILESDEPS_no = +POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) + +DISTFILESDEPS_ = update-po +DISTFILESDEPS_yes = $(DISTFILESDEPS_) +DISTFILESDEPS_no = +DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) + # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: @@ -143,15 +153,25 @@ stamp-po: $(srcdir)/$(DOMAIN).pot # heuristic whether some file in the top level directory mentions "GNU xyz". # If GNU 'find' is available, we avoid grepping through monster files. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed - if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ - else \ - LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ - fi; \ - } | grep -v 'libtool:' >/dev/null; then \ - package_gnu='GNU '; \ + package_gnu="$(PACKAGE_GNU)"; \ + test -n "$$package_gnu" || { \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \ + -size -10000000c -exec grep 'GNU @PACKAGE@' \ + /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ + package_gnu=yes; \ + else \ + package_gnu=no; \ + fi; \ + }; \ + if test "$$package_gnu" = "yes"; then \ + package_prefix='GNU '; \ else \ - package_gnu=''; \ + package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ @@ -171,7 +191,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --package-name="$${package_gnu}@PACKAGE@" \ + --package-name="$${package_prefix}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ @@ -199,9 +219,10 @@ $(srcdir)/$(DOMAIN).pot: # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. -$(POFILES): $(srcdir)/$(DOMAIN).pot +$(POFILES): $(POFILESDEPS) @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ + test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ @@ -362,7 +383,7 @@ maintainer-clean: distclean distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: - $(MAKE) update-po + test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: stamp-po $(DISTFILES) diff --git a/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz b/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz Binary files differnew file mode 100644 index 0000000000..b04ba55032 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/aclocal.tgz diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/config.rpath b/meta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath index c38b914d6b..b625621fac 100755 --- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/config.rpath +++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/config.rpath @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2013 Free Software Foundation, Inc. +# Copyright 1996-2014 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # @@ -367,11 +367,7 @@ else dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; - freebsd2.2*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - freebsd2*) + freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; @@ -548,13 +544,11 @@ case "$host_os" in dgux*) library_names_spec='$libname$shrext' ;; + freebsd[23].*) + library_names_spec='$libname$shrext$versuffix' + ;; freebsd* | dragonfly*) - case "$host_os" in - freebsd[123]*) - library_names_spec='$libname$shrext$versuffix' ;; - *) - library_names_spec='$libname$shrext' ;; - esac + library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' diff --git a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/remove-potcdate.sin b/meta/recipes-core/gettext/gettext-minimal-0.19.4/remove-potcdate.sin index 2436c49e78..2436c49e78 100644 --- a/meta/recipes-core/gettext/gettext-minimal-0.18.3.2/remove-potcdate.sin +++ b/meta/recipes-core/gettext/gettext-minimal-0.19.4/remove-potcdate.sin diff --git a/meta/recipes-core/gettext/gettext-minimal-native_0.18.3.2.bb b/meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb index 2b43b97022..ca97315a85 100644 --- a/meta/recipes-core/gettext/gettext-minimal-native_0.18.3.2.bb +++ b/meta/recipes-core/gettext/gettext-minimal-native_0.19.4.bb @@ -8,14 +8,13 @@ SRC_URI = "file://aclocal.tgz \ file://Makefile.in.in \ file://remove-potcdate.sin \ file://COPYING \ - file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \ " INHIBIT_DEFAULT_DEPS = "1" INHIBIT_AUTOTOOLS_DEPS = "1" LICENSE = "FSF-Unlimited" -LIC_FILES_CHKSUM = "file://COPYING;md5=0854da868a929923087141d9d7aba7d5" +LIC_FILES_CHKSUM = "file://COPYING;md5=1b20675cd5158442f6007d022f46b35b" inherit native diff --git a/meta/recipes-core/gettext/gettext_0.18.3.2.bb b/meta/recipes-core/gettext/gettext_0.19.4.bb index 65d4103a97..cebf6c78c6 100644 --- a/meta/recipes-core/gettext/gettext_0.18.3.2.bb +++ b/meta/recipes-core/gettext/gettext_0.19.4.bb @@ -18,8 +18,8 @@ PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,-- LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread " -SRC_URI[md5sum] = "241aba309d07aa428252c74b40a818ef" -SRC_URI[sha256sum] = "d1a4e452d60eb407ab0305976529a45c18124bd518d976971ac6dc7aa8b4c5d7" +SRC_URI[md5sum] = "d3511af1e604a3478900d2c2b4a4a48e" +SRC_URI[sha256sum] = "8ac9f1ed1a5f8c4e656a2f37f5ba6b9ee04c4df79a575e876b0b6946aa417f3f" inherit autotools texinfo diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.42.1.bb index 4b1bcf85c5..69b3ef8e37 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.42.1.bb @@ -18,5 +18,5 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ SRC_URI_append_class-native = " file://glib-gettextize-dir.patch" -SRC_URI[md5sum] = "05fb7cb17eacbc718e90366a1eae60d9" -SRC_URI[sha256sum] = "0d27f195966ecb1995dcce0754129fd66ebe820c7cd29200d264b02af1aa28b5" +SRC_URI[md5sum] = "89c4119e50e767d3532158605ee9121a" +SRC_URI[sha256sum] = "8f3f0865280e45b8ce840e176ef83bcfd511148918cc8d39df2ee89b67dcf89a" diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc index 2d81afc8f2..072f790111 100644 --- a/meta/recipes-core/glib-2.0/glib.inc +++ b/meta/recipes-core/glib-2.0/glib.inc @@ -1,5 +1,7 @@ SUMMARY = "A general-purpose utility library" DESCRIPTION = "GLib is a general-purpose utility library, which provides many useful data types, macros, type conversions, string utilities, file utilities, a main loop abstraction, and so on." +HOMEPAGE = "https://developer.gnome.org/glib/" + # pcre is under BSD; # docs/reference/COPYING is with a 'public domai'-like license! LICENSE = "LGPLv2+ & BSD & PD" diff --git a/meta/recipes-core/glibc/cross-localedef-native_2.20.bb b/meta/recipes-core/glibc/cross-localedef-native_2.21.bb index ccf56a9415..4e15f02140 100644 --- a/meta/recipes-core/glibc/cross-localedef-native_2.20.bb +++ b/meta/recipes-core/glibc/cross-localedef-native_2.21.bb @@ -14,11 +14,11 @@ inherit autotools FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:" -PV = "2.20" +BRANCH = "release/${PV}/master" -SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master;name=glibc \ +SRC_URI = "git://sourceware.org/git/glibc.git;branch=${BRANCH};name=glibc \ git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \ - file://fix_for_centos_5.8.patch \ + file://fix_for_centos_5.8.patch \ ${EGLIBCPATCHES} \ " EGLIBCPATCHES = "\ @@ -33,13 +33,17 @@ EGLIBCPATCHES = "\ file://eglibc-use-option-groups.patch \ " -SRCREV_glibc = "b8079dd0d360648e4e8de48656c5c38972621072" +SRCREV_glibc = "4e42b5b8f89f0e288e68be7ad70f9525aebc2cff" SRCREV_localedef = "c833367348d39dad7ba018990bfdaffaec8e9ed3" +# Makes for a rather long rev (22 characters), but... +# +SRCREV_FORMAT = "glibc_localedef" + S = "${WORKDIR}/git" EXTRA_OECONF = "--with-glibc=${S}" -CFLAGS += "-DNOT_IN_libc=1" +CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'" do_configure () { ${S}/localedef/configure ${EXTRA_OECONF} @@ -47,6 +51,6 @@ do_configure () { do_install() { - install -d ${D}${bindir} + install -d ${D}${bindir} install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef } diff --git a/meta/recipes-core/glibc/glibc-collateral.inc b/meta/recipes-core/glibc/glibc-collateral.inc index 85e06da816..f82db06cb9 100644 --- a/meta/recipes-core/glibc/glibc-collateral.inc +++ b/meta/recipes-core/glibc/glibc-collateral.inc @@ -1,7 +1,14 @@ INHIBIT_DEFAULT_DEPS = "1" LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ + file://${COMMON_LICENSE_DIR}/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780" HOMEPAGE = "http://www.gnu.org/software/libc/index.html" +# This needs to match with glibc.inc, otherwise glibc-scripts and glibc-locale +# will fail to find main glibc, for details see +# http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html +ARM_INSTRUCTION_SET = "arm" + do_fetch[noexec] = "1" do_unpack[noexec] = "1" do_patch[noexec] = "1" diff --git a/meta/recipes-core/glibc/glibc-initial_2.20.bb b/meta/recipes-core/glibc/glibc-initial_2.21.bb index 8ab01dc79d..8ab01dc79d 100644 --- a/meta/recipes-core/glibc/glibc-initial_2.20.bb +++ b/meta/recipes-core/glibc/glibc-initial_2.21.bb diff --git a/meta/recipes-core/glibc/glibc-locale.inc b/meta/recipes-core/glibc/glibc-locale.inc index d472605842..df6d073436 100644 --- a/meta/recipes-core/glibc/glibc-locale.inc +++ b/meta/recipes-core/glibc/glibc-locale.inc @@ -23,7 +23,7 @@ ENABLE_BINARY_LOCALE_GENERATION_pn-nativesdk-glibc-locale = "0" #enable locale generation on these arches # BINARY_LOCALE_ARCHES is a space separated list of regular expressions -BINARY_LOCALE_ARCHES ?= "arm.* i[3-6]86 x86_64 powerpc mips mips64" +BINARY_LOCALE_ARCHES ?= "arm.* aarch64 i[3-6]86 x86_64 powerpc mips mips64" # set "1" to use cross-localedef for locale generation # set "0" for qemu emulation of native localedef for locale generation diff --git a/meta/recipes-core/glibc/glibc-locale_2.20.bb b/meta/recipes-core/glibc/glibc-locale_2.21.bb index f7702e0358..f7702e0358 100644 --- a/meta/recipes-core/glibc/glibc-locale_2.20.bb +++ b/meta/recipes-core/glibc/glibc-locale_2.21.bb diff --git a/meta/recipes-core/glibc/glibc-mtrace_2.20.bb b/meta/recipes-core/glibc/glibc-mtrace_2.21.bb index 0b69bad46a..0b69bad46a 100644 --- a/meta/recipes-core/glibc/glibc-mtrace_2.20.bb +++ b/meta/recipes-core/glibc/glibc-mtrace_2.21.bb diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc index 6212e5b38e..984362e3ce 100644 --- a/meta/recipes-core/glibc/glibc-package.inc +++ b/meta/recipes-core/glibc/glibc-package.inc @@ -32,6 +32,8 @@ RPROVIDES_glibc-thread-db = "eglibc-thread-db" RPROVIDES_${PN}-pcprofile = "eglibc-pcprofile" RPROVIDES_${PN}-dbg = "eglibc-dbg" libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so" +libc_baselibs_append_aarch64 = " /lib/ld-linux-aarch64*.so.1" +INSANE_SKIP_glibc_append_aarch64 = " libdir" FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}" FILES_ldd = "${bindir}/ldd" @@ -103,6 +105,20 @@ do_install_append () { fi } +do_install_append_aarch64 () { + if [ "${base_libdir}" != "/lib" ] ; then + # The aarch64 ABI says the dynamic linker -must- be /lib/ld-linux-aarch64[_be].so.1 + install -d ${D}/lib + if [ -e ${D}${base_libdir}/ld-linux-aarch64.so.1 ]; then + ln -s ${@base_path_relative('/lib', '${base_libdir}')}/ld-linux-aarch64.so.1 \ + ${D}/lib/ld-linux-aarch64.so.1 + elif [ -e ${D}${base_libdir}/ld-linux-aarch64_be.so.1 ]; then + ln -s ${@base_path_relative('/lib', '${base_libdir}')}/ld-linux-aarch64_be.so.1 \ + ${D}/lib/ld-linux-aarch64_be.so.1 + fi + fi +} + do_install_locale () { dest=${D}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS} install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir} diff --git a/meta/recipes-core/glibc/glibc-scripts_2.20.bb b/meta/recipes-core/glibc/glibc-scripts_2.21.bb index 5a89bd8022..5a89bd8022 100644 --- a/meta/recipes-core/glibc/glibc-scripts_2.20.bb +++ b/meta/recipes-core/glibc/glibc-scripts_2.21.bb diff --git a/meta/recipes-core/glibc/glibc-testing.inc b/meta/recipes-core/glibc/glibc-testing.inc index ec16fe1fde..fd1af39922 100644 --- a/meta/recipes-core/glibc/glibc-testing.inc +++ b/meta/recipes-core/glibc/glibc-testing.inc @@ -65,9 +65,26 @@ then fi echo "# we test using cross compiler from real sysroot therefore override the" > ${B}/configparms echo "# definitions that come from ${B}/config.make" >> ${B}/configparms - fgrep tcbootstrap ${B}/config.make > ${B}/configparms sed -i -e "s/\-tcbootstrap//g" ${B}/configparms + +# g++ uses flag -nostdinc, so the locations of system include headers must be explicitly specified +# If the locations are not already specified in config.make, then we provide the following locations: +# <sysroot>/usr/include/c++/<g++ version> +# <sysroot>/usr/include/c++/<g++ version>/<machine> + +cxxincludes=\`cat ${B}/config.make | gawk '\$1 == "c++-sysincludes"' | gawk -F"=" '{print \$2}' | sed "s/[ \t]\?//g"\` + +if [ -z "\$cxxincludes" ]; then + sysroot=\`cat ${B}/configparms | sed -n "/CXX/p" | sed -e "s/^.*--sysroot=//"\` + cxx=\`cat ${B}/configparms | gawk '\$1 ~ /^CXX/' | gawk -F"=" '{print \$2}' | gawk '{print \$1}'\` + cxxmachine=\`\$cxx -dumpmachine\` + cxxversion=\`\$cxx -dumpversion\` + # pass the new value of c++-sysincludes via configparms + echo "# c++-sysincludes added:" >> ${B}/configparms + echo "c++-sysincludes = -isystem \$sysroot/usr/include/c++/\$cxxversion -isystem \$sysroot/usr/include/c++/\$cxxversion/\$cxxmachine" >> ${B}/configparms +fi + wrapper="${S}/scripts/cross-test-ssh.sh \$target" localedef="${STAGING_BINDIR_NATIVE}/cross-localedef --little-endian --uint32-align=4" make tests-clean diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc index 8aa78dfb34..da56bc90a1 100644 --- a/meta/recipes-core/glibc/glibc.inc +++ b/meta/recipes-core/glibc/glibc.inc @@ -15,12 +15,15 @@ def get_optimization(d): if bb.utils.contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x": bb.note("glibc can't be built with -O0, -O2 will be used instead.") return selected_optimization.replace("-O0", "-O2") + elif bb.utils.contains("SELECTED_OPTIMIZATION", "-Os", "x", "", d) == "x": + bb.note("glibc can't be built with -Os, -Os -Wno-error will be used instead.") + return selected_optimization.replace("-Os", "-Os -Wno-error") return selected_optimization SELECTED_OPTIMIZATION := "${@get_optimization(d)}" # siteconfig.bbclass runs configure which needs a working compiler -# For the compiler to work we need a working libc yet libc isn't +# For the compiler to work we need a working libc yet libc isn't # in the sysroots directory at this point. This means the libc.so # linker script won't work as the --sysroot setting isn't correct. # Here we create a hacked up libc linker script and pass in the right @@ -61,6 +64,9 @@ GLIBC_EXTRA_OECONF ?= "" GLIBC_EXTRA_OECONF_class-nativesdk = "" INHIBIT_DEFAULT_DEPS = "1" +# This needs to match with glibc-collateral.inc, otherwise glibc-scripts and glibc-locale +# will fail to find main glibc, for details see +# http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html ARM_INSTRUCTION_SET = "arm" # glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer @@ -71,7 +77,7 @@ EXTRA_OEMAKE += "${EGLIBCPARALLELISM}" PARALLEL_MAKE = "" # glibc make-syscalls.sh has a number of issues with /bin/dash and -# it's output which make calls via the SHELL also has issues, so +# it's output which make calls via the SHELL also has issues, so # ensure make uses /bin/bash EXTRA_OEMAKE += "SHELL=/bin/bash" @@ -82,7 +88,7 @@ do_configure_prepend() { } do_configure_append() { - oe_runmake config + yes '' | oe_runmake config # Remove quotation marks from OPTION_EGLIBC_NSSWITCH_FIXED_*. This will # avoid install error. diff --git a/meta/recipes-core/glibc/glibc/0001-Add-unused-attribute.patch b/meta/recipes-core/glibc/glibc/0001-Add-unused-attribute.patch new file mode 100644 index 0000000000..f51a0ccb22 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0001-Add-unused-attribute.patch @@ -0,0 +1,36 @@ +2015-02-18 Khem Raj <raj.khem@gmail.com>> + + * iconv/gconv_charset.h (strip): + Add unused attribute. + +From 9c4a91cb331ff1e8cde2314dadee74559d8cb0dd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 18 Feb 2015 19:45:31 +0000 +Subject: [PATCH] Add unused attribute + +Helps in avoiding gcc warning when header is is included in +a source file which does not use both functions + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Pending +--- + iconv/gconv_charset.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h +index 80290bc..7890a8e 100644 +--- a/iconv/gconv_charset.h ++++ b/iconv/gconv_charset.h +@@ -21,7 +21,7 @@ + #include <locale.h> + + +-static void ++static void __attribute__ ((unused)) + strip (char *wp, const char *s) + { + int slash_count = 0; +-- +2.1.4 + diff --git a/meta/recipes-core/glibc/glibc/0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch b/meta/recipes-core/glibc/glibc/0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch new file mode 100644 index 0000000000..a6395b77bc --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch @@ -0,0 +1,32 @@ +From 6f5639f6405ff9a42e4f71e7b0f18bddb68d992a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 19 Feb 2015 03:23:45 +0000 +Subject: [PATCH] When disabling SSE also make sure that fpmath is not set to + use SSE as well + +This fixes errors when we inject sse options through CFLAGS and now +that we have -Werror turned on by default this warning turns to become +error on x86 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Pending +--- + sysdeps/x86/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile +index 19f5eca..827ea71 100644 +--- a/sysdeps/x86/Makefile ++++ b/sysdeps/x86/Makefile +@@ -1,6 +1,6 @@ + ifeq ($(subdir),elf) + CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\ +- -mno-sse -mno-mmx) ++ -mno-sse -mno-mmx -mfpmath=387) + + tests-special += $(objpfx)tst-ld-sse-use.out + $(objpfx)tst-ld-sse-use.out: ../sysdeps/x86/tst-ld-sse-use.sh $(objpfx)ld.so +-- +2.1.4 + diff --git a/meta/recipes-core/glibc/glibc/0001-yes-within-the-path-sets-wrong-config-variables.patch b/meta/recipes-core/glibc/glibc/0001-yes-within-the-path-sets-wrong-config-variables.patch new file mode 100644 index 0000000000..827e980332 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0001-yes-within-the-path-sets-wrong-config-variables.patch @@ -0,0 +1,245 @@ +'yes' within the path sets wrong config variables + +It seems that the 'AC_EGREP_CPP(yes...' example is quite popular +but being such a short word to grep it is likely to produce +false-positive matches with the path it is configured into. + +The change is to use a more elaborated string to grep for. + +Upstream-Status: Submitted [libc-alpha@sourceware.org] + +Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> +--- +diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure +index 5bd355a..3bc5537 100644 +--- a/sysdeps/aarch64/configure ++++ b/sysdeps/aarch64/configure +@@ -148,12 +148,12 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __AARCH64EB__ +- yes ++ is_aarch64_be + #endif + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "is_aarch64_be" >/dev/null 2>&1; then : + libc_cv_aarch64_be=yes + else + libc_cv_aarch64_be=no +diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac +index 7851dd4..6e92381 100644 +--- a/sysdeps/aarch64/configure.ac ++++ b/sysdeps/aarch64/configure.ac +@@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + # the dynamic linker via %ifdef. + AC_CACHE_CHECK([for big endian], + [libc_cv_aarch64_be], +- [AC_EGREP_CPP(yes,[#ifdef __AARCH64EB__ +- yes ++ [AC_EGREP_CPP(is_aarch64_be,[#ifdef __AARCH64EB__ ++ is_aarch64_be + #endif + ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)]) + if test $libc_cv_aarch64_be = yes; then +diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure +index 45667cc..0b2ef11 100644 +--- a/sysdeps/arm/configure ++++ b/sysdeps/arm/configure +@@ -150,12 +150,12 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __ARM_PCS_VFP +- yes ++ use_arm_pcs_vfp + #endif + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "use_arm_pcs_vfp" >/dev/null 2>&1; then : + libc_cv_arm_pcs_vfp=yes + else + libc_cv_arm_pcs_vfp=no +diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac +index 002b8ef..e1746a7 100644 +--- a/sysdeps/arm/configure.ac ++++ b/sysdeps/arm/configure.ac +@@ -16,8 +16,8 @@ dnl it. Until we do, don't define it. + # the dynamic linker via %ifdef. + AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], + [libc_cv_arm_pcs_vfp], +- [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP +- yes ++ [AC_EGREP_CPP(use_arm_pcs_vfp,[#ifdef __ARM_PCS_VFP ++ use_arm_pcs_vfp + #endif + ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)]) + if test $libc_cv_arm_pcs_vfp = yes; then +diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure +index 4e13248..f14af95 100644 +--- a/sysdeps/mips/configure ++++ b/sysdeps/mips/configure +@@ -143,11 +143,11 @@ else + /* end confdefs.h. */ + dnl + #ifdef __mips_nan2008 +-yes ++use_mips_nan2008 + #endif + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "use_mips_nan2008" >/dev/null 2>&1; then : + libc_cv_mips_nan2008=yes + else + libc_cv_mips_nan2008=no +diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac +index bcbdaff..ad3057f 100644 +--- a/sysdeps/mips/configure.ac ++++ b/sysdeps/mips/configure.ac +@@ -6,9 +6,9 @@ dnl position independent way. + dnl AC_DEFINE(PI_STATIC_AND_HIDDEN) + + AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], +- libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl ++ libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl + #ifdef __mips_nan2008 +-yes ++use_mips_nan2008 + #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) + if test x$libc_cv_mips_nan2008 = xyes; then + AC_DEFINE(HAVE_MIPS_NAN2008) +diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure +index 14c8a3a..dde3814 100644 +--- a/sysdeps/nios2/configure ++++ b/sysdeps/nios2/configure +@@ -142,12 +142,12 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __nios2_big_endian__ +- yes ++ is_nios2_be + #endif + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "is_nios2_be" >/dev/null 2>&1; then : + libc_cv_nios2_be=yes + else + libc_cv_nios2_be=no +diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac +index f05f438..dc86399 100644 +--- a/sysdeps/nios2/configure.ac ++++ b/sysdeps/nios2/configure.ac +@@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + # Nios II big endian is not yet supported. + AC_CACHE_CHECK([for big endian], + [libc_cv_nios2_be], +- [AC_EGREP_CPP(yes,[#ifdef __nios2_big_endian__ +- yes ++ [AC_EGREP_CPP(is_nios2_be,[#ifdef __nios2_big_endian__ ++ is_nios2_be + #endif + ], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)]) + if test $libc_cv_nios2_be = yes; then +diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure +index 83f8b13..2b6cbee 100644 +--- a/sysdeps/unix/sysv/linux/mips/configure ++++ b/sysdeps/unix/sysv/linux/mips/configure +@@ -387,11 +387,11 @@ else + /* end confdefs.h. */ + dnl + #ifdef __mips_nan2008 +-yes ++use_mips_nan2008 + #endif + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "use_mips_nan2008" >/dev/null 2>&1; then : + libc_cv_mips_nan2008=yes + else + libc_cv_mips_nan2008=no +diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac +index 5039ec9..1035f76 100644 +--- a/sysdeps/unix/sysv/linux/mips/configure.ac ++++ b/sysdeps/unix/sysv/linux/mips/configure.ac +@@ -98,9 +98,9 @@ AC_COMPILE_IFELSE( + LIBC_CONFIG_VAR([mips-mode-switch],[${libc_mips_mode_switch}]) + + AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], +- libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl ++ libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl + #ifdef __mips_nan2008 +-yes ++use_mips_nan2008 + #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) + + libc_mips_nan= +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure +index 70bb18a..ffd9e3e 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure +@@ -155,12 +155,12 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #if _CALL_ELF == 2 +- yes ++ use_ppc_elfv2_abi + #endif + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "use_ppc_elfv2_abi" >/dev/null 2>&1; then : + libc_cv_ppc64_elfv2_abi=yes + else + libc_cv_ppc64_elfv2_abi=no +@@ -188,12 +188,12 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef _CALL_ELF +- yes ++ is_def_call_elf + #endif + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then : ++ $EGREP "is_def_call_elf" >/dev/null 2>&1; then : + libc_cv_ppc64_def_call_elf=yes + else + libc_cv_ppc64_def_call_elf=no +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac +index 0822915..9a32fdd 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac +@@ -6,8 +6,8 @@ LIBC_SLIBDIR_RTLDDIR([lib64], [lib64]) + # Define default-abi according to compiler flags. + AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI], + [libc_cv_ppc64_elfv2_abi], +- [AC_EGREP_CPP(yes,[#if _CALL_ELF == 2 +- yes ++ [AC_EGREP_CPP(use_ppc_elfv2_abi,[#if _CALL_ELF == 2 ++ use_ppc_elfv2_abi + #endif + ], libc_cv_ppc64_elfv2_abi=yes, libc_cv_ppc64_elfv2_abi=no)]) + if test $libc_cv_ppc64_elfv2_abi = yes; then +@@ -19,8 +19,8 @@ else + # Compiler that do not support ELFv2 ABI does not define _CALL_ELF + AC_CACHE_CHECK([whether the compiler defines _CALL_ELF], + [libc_cv_ppc64_def_call_elf], +- [AC_EGREP_CPP(yes,[#ifdef _CALL_ELF +- yes ++ [AC_EGREP_CPP(is_def_call_elf,[#ifdef _CALL_ELF ++ is_def_call_elf + #endif + ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)]) + if test $libc_cv_ppc64_def_call_elf = no; then +-- +1.8.4.5 + diff --git a/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch b/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch deleted file mode 100644 index 92b85014b3..0000000000 --- a/meta/recipes-core/glibc/glibc/CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch +++ /dev/null @@ -1,339 +0,0 @@ -From a5357b7ce2a2982c5778435704bcdb55ce3667a0 Mon Sep 17 00:00:00 2001 -From: Jeff Law <law@redhat.com> -Date: Mon, 15 Dec 2014 10:09:32 +0100 -Subject: [PATCH] CVE-2012-3406: Stack overflow in vfprintf [BZ #16617] - -A larger number of format specifiers coudld cause a stack overflow, -potentially allowing to bypass _FORTIFY_SOURCE format string -protection. ---- - ChangeLog | 9 +++++++ - NEWS | 13 +++++---- - stdio-common/Makefile | 2 +- - stdio-common/bug23-2.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ - stdio-common/bug23-3.c | 50 +++++++++++++++++++++++++++++++++++ - stdio-common/bug23-4.c | 31 ++++++++++++++++++++++ - stdio-common/vfprintf.c | 40 ++++++++++++++++++++++++++-- - 7 files changed, 207 insertions(+), 8 deletions(-) - create mode 100644 stdio-common/bug23-2.c - create mode 100644 stdio-common/bug23-3.c - create mode 100644 stdio-common/bug23-4.c - -Index: git/ChangeLog -=================================================================== ---- git.orig/ChangeLog -+++ git/ChangeLog -@@ -1,3 +1,12 @@ -+2014-12-15 Jeff Law <law@redhat.com> -+ -+ [BZ #16617] -+ * stdio-common/vfprintf.c (vfprintf): Allocate large specs array -+ on the heap. (CVE-2012-3406) -+ * stdio-common/bug23-2.c, stdio-common/bug23-3.c: New file. -+ * stdio-common/bug23-4.c: New file. Test case by Joseph Myers. -+ * stdio-common/Makefile (tests): Add bug23-2, bug23-3, bug23-4. -+ - 2014-11-19 Carlos O'Donell <carlos@redhat.com> - Florian Weimer <fweimer@redhat.com> - Joseph Myers <joseph@codesourcery.com> -Index: git/NEWS -=================================================================== ---- git.orig/NEWS -+++ git/NEWS -@@ -13,24 +13,28 @@ Version 2.20 - 15698, 15804, 15894, 15946, 16002, 16064, 16095, 16194, 16198, 16275, - 16284, 16287, 16315, 16348, 16349, 16354, 16357, 16362, 16447, 16516, - 16532, 16539, 16545, 16561, 16562, 16564, 16574, 16599, 16600, 16609, -- 16610, 16611, 16613, 16619, 16623, 16629, 16632, 16634, 16639, 16642, -- 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683, 16689, 16695, -- 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731, 16739, 16740, -- 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16791, 16796, -- 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16839, 16849, 16854, -- 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16892, 16912, 16915, -- 16916, 16917, 16918, 16922, 16927, 16928, 16932, 16943, 16958, 16965, -- 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031, -- 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, 17079, -- 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, 17153, -- 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, 17625. -- -+ 16610, 16611, 16613, 16617, 16619, 16623, 16629, 16632, 16634, 16639, -+ 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683, 16689, -+ 16695, 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731, 16739, -+ 16740, 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16791, -+ 16796, 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16839, 16849, -+ 16854, 16876, 16877, 16878, 16882, 16885, 16888, 16890, 16892, 16912, -+ 16915, 16916, 16917, 16918, 16922, 16927, 16928, 16932, 16943, 16958, -+ 16965, 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, -+ 17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, -+ 17079, 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, -+ 17153, 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, -+ 17625. -+ - * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag - under certain input conditions resulting in the execution of a shell for - command substitution when the applicaiton did not request it. The - implementation now checks WRDE_NOCMD immediately before executing the - shell and returns the error WRDE_CMDSUB as expected. - -+* CVE-2012-3406 printf-style functions could run into a stack overflow when -+ processing format strings with a large number of format specifiers. -+ - * Reverted change of ABI data structures for s390 and s390x: - On s390 and s390x the size of struct ucontext and jmp_buf was increased in - 2.19. This change is reverted in 2.20. The introduced 2.19 symbol versions -Index: git/stdio-common/bug23-2.c -=================================================================== ---- /dev/null -+++ git/stdio-common/bug23-2.c -@@ -0,0 +1,70 @@ -+#include <stdio.h> -+#include <string.h> -+#include <stdlib.h> -+ -+static const char expected[] = "\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55\ -+\n\ -+a\n\ -+abbcd55%%%%%%%%%%%%%%%%%%%%%%%%%%\n"; -+ -+static int -+do_test (void) -+{ -+ char *buf = malloc (strlen (expected) + 1); -+ snprintf (buf, strlen (expected) + 1, -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n", -+ "a", "b", "c", "d", 5); -+ return strcmp (buf, expected) != 0; -+} -+ -+#define TEST_FUNCTION do_test () -+#include "../test-skeleton.c" -Index: git/stdio-common/bug23-3.c -=================================================================== ---- /dev/null -+++ git/stdio-common/bug23-3.c -@@ -0,0 +1,50 @@ -+#include <stdio.h> -+#include <string.h> -+#include <stdlib.h> -+ -+int -+do_test (void) -+{ -+ size_t instances = 16384; -+#define X0 "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d" -+ const char *item = "\na\nabbcd55"; -+#define X3 X0 X0 X0 X0 X0 X0 X0 X0 -+#define X6 X3 X3 X3 X3 X3 X3 X3 X3 -+#define X9 X6 X6 X6 X6 X6 X6 X6 X6 -+#define X12 X9 X9 X9 X9 X9 X9 X9 X9 -+#define X14 X12 X12 X12 X12 -+#define TRAILER "%%%%%%%%%%%%%%%%%%%%%%%%%%" -+#define TRAILER2 TRAILER TRAILER -+ size_t length = instances * strlen (item) + strlen (TRAILER) + 1; -+ -+ char *buf = malloc (length + 1); -+ snprintf (buf, length + 1, -+ X14 TRAILER2 "\n", -+ "a", "b", "c", "d", 5); -+ -+ const char *p = buf; -+ size_t i; -+ for (i = 0; i < instances; ++i) -+ { -+ const char *expected; -+ for (expected = item; *expected; ++expected) -+ { -+ if (*p != *expected) -+ { -+ printf ("mismatch at offset %zu (%zu): expected %d, got %d\n", -+ (size_t) (p - buf), i, *expected & 0xFF, *p & 0xFF); -+ return 1; -+ } -+ ++p; -+ } -+ } -+ if (strcmp (p, TRAILER "\n") != 0) -+ { -+ printf ("mismatch at trailer: [%s]\n", p); -+ return 1; -+ } -+ free (buf); -+ return 0; -+} -+#define TEST_FUNCTION do_test () -+#include "../test-skeleton.c" -Index: git/stdio-common/bug23-4.c -=================================================================== ---- /dev/null -+++ git/stdio-common/bug23-4.c -@@ -0,0 +1,31 @@ -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <sys/resource.h> -+ -+#define LIMIT 1000000 -+ -+int -+main (void) -+{ -+ struct rlimit lim; -+ getrlimit (RLIMIT_STACK, &lim); -+ lim.rlim_cur = 1048576; -+ setrlimit (RLIMIT_STACK, &lim); -+ char *fmtstr = malloc (4 * LIMIT + 1); -+ if (fmtstr == NULL) -+ abort (); -+ char *output = malloc (LIMIT + 1); -+ if (output == NULL) -+ abort (); -+ for (size_t i = 0; i < LIMIT; i++) -+ memcpy (fmtstr + 4 * i, "%1$d", 4); -+ fmtstr[4 * LIMIT] = '\0'; -+ int ret = snprintf (output, LIMIT + 1, fmtstr, 0); -+ if (ret != LIMIT) -+ abort (); -+ for (size_t i = 0; i < LIMIT; i++) -+ if (output[i] != '0') -+ abort (); -+ return 0; -+} -Index: git/stdio-common/vfprintf.c -=================================================================== ---- git.orig/stdio-common/vfprintf.c -+++ git/stdio-common/vfprintf.c -@@ -276,6 +276,12 @@ vfprintf (FILE *s, const CHAR_T *format, - /* For the argument descriptions, which may be allocated on the heap. */ - void *args_malloced = NULL; - -+ /* For positional argument handling. */ -+ struct printf_spec *specs; -+ -+ /* Track if we malloced the SPECS array and thus must free it. */ -+ bool specs_malloced = false; -+ - /* This table maps a character into a number representing a - class. In each step there is a destination label for each - class. */ -@@ -1699,8 +1705,8 @@ do_positional: - size_t nspecs = 0; - /* A more or less arbitrary start value. */ - size_t nspecs_size = 32 * sizeof (struct printf_spec); -- struct printf_spec *specs = alloca (nspecs_size); - -+ specs = alloca (nspecs_size); - /* The number of arguments the format string requests. This will - determine the size of the array needed to store the argument - attributes. */ -@@ -1743,11 +1749,39 @@ do_positional: - if (nspecs * sizeof (*specs) >= nspecs_size) - { - /* Extend the array of format specifiers. */ -+ if (nspecs_size * 2 < nspecs_size) -+ { -+ __set_errno (ENOMEM); -+ done = -1; -+ goto all_done; -+ } - struct printf_spec *old = specs; -- specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size); -+ if (__libc_use_alloca (2 * nspecs_size)) -+ specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size); -+ else -+ { -+ nspecs_size *= 2; -+ specs = malloc (nspecs_size); -+ if (specs == NULL) -+ { -+ __set_errno (ENOMEM); -+ specs = old; -+ done = -1; -+ goto all_done; -+ } -+ } - - /* Copy the old array's elements to the new space. */ - memmove (specs, old, nspecs * sizeof (*specs)); -+ -+ /* If we had previously malloc'd space for SPECS, then -+ release it after the copy is complete. */ -+ if (specs_malloced) -+ free (old); -+ -+ /* Now set SPECS_MALLOCED if needed. */ -+ if (!__libc_use_alloca (nspecs_size)) -+ specs_malloced = true; - } - - /* Parse the format specifier. */ -@@ -2068,6 +2102,8 @@ do_positional: - } - - all_done: -+ if (specs_malloced) -+ free (specs); - if (__glibc_unlikely (args_malloced != NULL)) - free (args_malloced); - if (__glibc_unlikely (workstart != NULL)) -Index: git/stdio-common/Makefile -=================================================================== ---- git.orig/stdio-common/Makefile -+++ git/stdio-common/Makefile -@@ -66,7 +66,7 @@ tests := tstscanf test_rdwr test-popen t - tst-fwrite bug16 bug17 tst-sprintf2 bug18 \ - bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \ - tst-setvbuf1 bug23 bug24 bug-vfprintf-nargs tst-sprintf3 bug25 \ -- tst-printf-round bug26 -+ tst-printf-round bug23-2 bug23-3 bug23-4 - - tests-$(OPTION_EGLIBC_LOCALE_CODE) \ - += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping diff --git a/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch b/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch deleted file mode 100644 index 9bfea10623..0000000000 --- a/meta/recipes-core/glibc/glibc/CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch +++ /dev/null @@ -1,215 +0,0 @@ -From a39208bd7fb76c1b01c127b4c61f9bfd915bfe7c Mon Sep 17 00:00:00 2001 -From: Carlos O'Donell <carlos@redhat.com> -Date: Wed, 19 Nov 2014 11:44:12 -0500 -Subject: [PATCH] CVE-2014-7817: wordexp fails to honour WRDE_NOCMD. - -The function wordexp() fails to properly handle the WRDE_NOCMD -flag when processing arithmetic inputs in the form of "$((... ``))" -where "..." can be anything valid. The backticks in the arithmetic -epxression are evaluated by in a shell even if WRDE_NOCMD forbade -command substitution. This allows an attacker to attempt to pass -dangerous commands via constructs of the above form, and bypass -the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD -in exec_comm(), the only place that can execute a shell. All other -checks for WRDE_NOCMD are superfluous and removed. - -We expand the testsuite and add 3 new regression tests of roughly -the same form but with a couple of nested levels. - -On top of the 3 new tests we add fork validation to the WRDE_NOCMD -testing. If any forks are detected during the execution of a wordexp() -call with WRDE_NOCMD, the test is marked as failed. This is slightly -heuristic since vfork might be used in the future, but it provides a -higher level of assurance that no shells were executed as part of -command substitution with WRDE_NOCMD in effect. In addition it doesn't -require libpthread or libdl, instead we use the public implementation -namespace function __register_atfork (already part of the public ABI -for libpthread). - -Tested on x86_64 with no regressions. ---- - ChangeLog | 22 ++++++++++++++++++++++ - NEWS | 8 +++++++- - posix/wordexp-test.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ - posix/wordexp.c | 16 ++++------------ - 4 files changed, 77 insertions(+), 13 deletions(-) - -Index: git/ChangeLog -=================================================================== ---- git.orig/ChangeLog -+++ git/ChangeLog -@@ -1,3 +1,24 @@ -+2014-11-19 Carlos O'Donell <carlos@redhat.com> -+ Florian Weimer <fweimer@redhat.com> -+ Joseph Myers <joseph@codesourcery.com> -+ Adam Conrad <adconrad@0c3.net> -+ Andreas Schwab <schwab@suse.de> -+ Brooks <bmoses@google.com> -+ -+ [BZ #17625] -+ * wordexp-test.c (__dso_handle): Add prototype. -+ (__register_atfork): Likewise. -+ (__app_register_atfork): New function. -+ (registered_forks): New global. -+ (register_fork): New function. -+ (test_case): Add 3 new tests for WRDE_CMDSUB. -+ (main): Call __app_register_atfork. -+ (testit): If WRDE_NOCMD set registered_forks to zero, run test, and if -+ fork count is non-zero fail the test. -+ * posix/wordexp.c (exec_comm): Return WRDE_CMDSUB if WRDE_NOCMD flag -+ is set. -+ (parse_dollars): Remove check for WRDE_NOCMD. -+ - 2014-09-07 Allan McRae <allan@archlinux.org - - * version.h (RELEASE): Set to "stable". -Index: git/NEWS -=================================================================== ---- git.orig/NEWS -+++ git/NEWS -@@ -23,7 +23,13 @@ Version 2.20 - 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022, 17031, - 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, 17079, - 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, 17153, -- 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354. -+ 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, 17625. -+ -+* CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag -+ under certain input conditions resulting in the execution of a shell for -+ command substitution when the applicaiton did not request it. The -+ implementation now checks WRDE_NOCMD immediately before executing the -+ shell and returns the error WRDE_CMDSUB as expected. - - * Reverted change of ABI data structures for s390 and s390x: - On s390 and s390x the size of struct ucontext and jmp_buf was increased in -Index: git/posix/wordexp-test.c -=================================================================== ---- git.orig/posix/wordexp-test.c -+++ git/posix/wordexp-test.c -@@ -27,6 +27,25 @@ - - #define IFS " \n\t" - -+extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden"))); -+extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *); -+ -+static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void)) -+{ -+ return __register_atfork (prepare, parent, child, -+ &__dso_handle == NULL ? NULL : __dso_handle); -+} -+ -+/* Number of forks seen. */ -+static int registered_forks; -+ -+/* For each fork increment the fork count. */ -+static void -+register_fork (void) -+{ -+ registered_forks++; -+} -+ - struct test_case_struct - { - int retval; -@@ -206,6 +225,12 @@ struct test_case_struct - { WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS }, - { WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS }, - { WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS }, -+ /* Test for CVE-2014-7817. We test 3 combinations of command -+ substitution inside an arithmetic expression to make sure that -+ no commands are executed and error is returned. */ -+ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, -+ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, -+ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS }, - - { -1, NULL, NULL, 0, 0, { NULL, }, IFS }, - }; -@@ -258,6 +283,15 @@ main (int argc, char *argv[]) - return -1; - } - -+ /* If we are not allowed to do command substitution, we install -+ fork handlers to verify that no forks happened. No forks should -+ happen at all if command substitution is disabled. */ -+ if (__app_register_atfork (register_fork, NULL, NULL) != 0) -+ { -+ printf ("Failed to register fork handler.\n"); -+ return -1; -+ } -+ - for (test = 0; test_case[test].retval != -1; test++) - if (testit (&test_case[test])) - ++fail; -@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc) - - printf ("Test %d (%s): ", ++tests, tc->words); - -+ if (tc->flags & WRDE_NOCMD) -+ registered_forks = 0; -+ - if (tc->flags & WRDE_APPEND) - { - /* initial wordexp() call, to be appended to */ -@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc) - } - retval = wordexp (tc->words, &we, tc->flags); - -+ if ((tc->flags & WRDE_NOCMD) -+ && (registered_forks > 0)) -+ { -+ printf ("FAILED fork called for WRDE_NOCMD\n"); -+ return 1; -+ } -+ - if (tc->flags & WRDE_DOOFFS) - start_offs = sav_we.we_offs; - -Index: git/posix/wordexp.c -=================================================================== ---- git.orig/posix/wordexp.c -+++ git/posix/wordexp.c -@@ -893,6 +893,10 @@ exec_comm (char *comm, char **word, size - pid_t pid; - int noexec = 0; - -+ /* Do nothing if command substitution should not succeed. */ -+ if (flags & WRDE_NOCMD) -+ return WRDE_CMDSUB; -+ - /* Don't fork() unless necessary */ - if (!comm || !*comm) - return 0; -@@ -2082,9 +2086,6 @@ parse_dollars (char **word, size_t *word - } - } - -- if (flags & WRDE_NOCMD) -- return WRDE_CMDSUB; -- - (*offset) += 2; - return parse_comm (word, word_length, max_length, words, offset, flags, - quoted? NULL : pwordexp, ifs, ifs_white); -@@ -2196,9 +2197,6 @@ parse_dquote (char **word, size_t *word_ - break; - - case '`': -- if (flags & WRDE_NOCMD) -- return WRDE_CMDSUB; -- - ++(*offset); - error = parse_backtick (word, word_length, max_length, words, - offset, flags, NULL, NULL, NULL); -@@ -2357,12 +2355,6 @@ wordexp (const char *words, wordexp_t *p - break; - - case '`': -- if (flags & WRDE_NOCMD) -- { -- error = WRDE_CMDSUB; -- goto do_error; -- } -- - ++words_offset; - error = parse_backtick (&word, &word_length, &max_length, words, - &words_offset, flags, pwordexp, ifs, diff --git a/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch b/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch deleted file mode 100644 index ba1da67b76..0000000000 --- a/meta/recipes-core/glibc/glibc/CVE-2014-9402_endless-loop-in-getaddr_r.patch +++ /dev/null @@ -1,65 +0,0 @@ -CVE-2014-9402 endless loop in getaddr_r - - -https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=11e3417af6e354f1942c68a271ae51e892b2814d - -Upstream-Status: Backport - -Signed-off-by: Armin Kuster <akuster@mvista.com> - -From 11e3417af6e354f1942c68a271ae51e892b2814d Mon Sep 17 00:00:00 2001 -From: Florian Weimer <fweimer@redhat.com> -Date: Mon, 15 Dec 2014 17:41:13 +0100 -Subject: [PATCH] Avoid infinite loop in nss_dns getnetbyname [BZ #17630] - ---- - ChangeLog | 6 ++++++ - NEWS | 7 +++++-- - resolv/nss_dns/dns-network.c | 4 ++-- - 3 files changed, 13 insertions(+), 4 deletions(-) - -Index: git/NEWS -=================================================================== ---- git.orig/NEWS -+++ git/NEWS -@@ -24,7 +24,10 @@ Version 2.20 - 17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17078, - 17079, 17084, 17086, 17088, 17092, 17097, 17125, 17135, 17137, 17150, - 17153, 17187, 17213, 17259, 17261, 17262, 17263, 17319, 17325, 17354, -- 17625. -+ 17625, 17630. -+ -+* The nss_dns implementation of getnetbyname could run into an infinite loop -+ if the DNS response contained a PTR record of an unexpected format. - - * CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag - under certain input conditions resulting in the execution of a shell for -Index: git/resolv/nss_dns/dns-network.c -=================================================================== ---- git.orig/resolv/nss_dns/dns-network.c -+++ git/resolv/nss_dns/dns-network.c -@@ -398,8 +398,8 @@ getanswer_r (const querybuf *answer, int - - case BYNAME: - { -- char **ap = result->n_aliases++; -- while (*ap != NULL) -+ char **ap; -+ for (ap = result->n_aliases; *ap != NULL; ++ap) - { - /* Check each alias name for being of the forms: - 4.3.2.1.in-addr.arpa = net 1.2.3.4 -Index: git/ChangeLog -=================================================================== ---- git.orig/ChangeLog -+++ git/ChangeLog -@@ -1,3 +1,9 @@ -+2014-12-16 Florian Weimer <fweimer@redhat.com> -+ -+ [BZ #17630] -+ * resolv/nss_dns/dns-network.c (getanswer_r): Iterate over alias -+ names. -+ - 2014-12-15 Jeff Law <law@redhat.com> - - [BZ #16617] diff --git a/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch b/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch index 332b8f73a6..439b4a95f6 100644 --- a/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch +++ b/meta/recipes-core/glibc/glibc/eglibc-use-option-groups.patch @@ -4,8 +4,8 @@ Upstream-Status: Pending Index: git/argp/argp-fmtstream.c =================================================================== ---- git.orig/argp/argp-fmtstream.c 2014-08-29 20:00:42.976070587 -0700 -+++ git/argp/argp-fmtstream.c 2014-08-29 20:01:15.188070587 -0700 +--- git.orig/argp/argp-fmtstream.c ++++ git/argp/argp-fmtstream.c @@ -42,6 +42,7 @@ #ifdef _LIBC # include <wchar.h> @@ -14,7 +14,7 @@ Index: git/argp/argp-fmtstream.c # define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a) #endif -@@ -100,7 +101,11 @@ +@@ -100,7 +101,11 @@ __argp_fmtstream_free (argp_fmtstream_t __argp_fmtstream_update (fs); if (fs->p > fs->buf) { @@ -26,7 +26,7 @@ Index: git/argp/argp-fmtstream.c } free (fs->buf); free (fs); -@@ -145,9 +150,17 @@ +@@ -145,9 +150,17 @@ __argp_fmtstream_update (argp_fmtstream_ size_t i; for (i = 0; i < pad; i++) { @@ -45,7 +45,7 @@ Index: git/argp/argp-fmtstream.c putc_unlocked (' ', fs->stream); } } -@@ -308,9 +321,17 @@ +@@ -308,9 +321,17 @@ __argp_fmtstream_update (argp_fmtstream_ *nl++ = ' '; else for (i = 0; i < fs->wmargin; ++i) @@ -66,9 +66,9 @@ Index: git/argp/argp-fmtstream.c /* Copy the tail of the original buffer into the current buffer Index: git/argp/argp-help.c =================================================================== ---- git.orig/argp/argp-help.c 2014-08-29 20:00:42.976070587 -0700 -+++ git/argp/argp-help.c 2014-08-29 20:01:15.188070587 -0700 -@@ -51,6 +51,7 @@ +--- git.orig/argp/argp-help.c ++++ git/argp/argp-help.c +@@ -51,6 +51,7 @@ char *alloca (); #ifdef _LIBC # include <../libio/libioP.h> # include <wchar.h> @@ -76,7 +76,7 @@ Index: git/argp/argp-help.c #endif #ifndef _ -@@ -1702,7 +1703,7 @@ +@@ -1702,7 +1703,7 @@ char *__argp_basename (char *name) } char * @@ -85,7 +85,7 @@ Index: git/argp/argp-help.c { # if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME return program_invocation_short_name; -@@ -1873,9 +1874,17 @@ +@@ -1873,9 +1874,17 @@ __argp_failure (const struct argp_state #endif } @@ -106,8 +106,8 @@ Index: git/argp/argp-help.c #if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE) Index: git/argp/argp-namefrob.h =================================================================== ---- git.orig/argp/argp-namefrob.h 2014-08-29 20:00:42.976070587 -0700 -+++ git/argp/argp-namefrob.h 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/argp/argp-namefrob.h ++++ git/argp/argp-namefrob.h @@ -76,10 +76,12 @@ #undef __argp_fmtstream_wmargin #define __argp_fmtstream_wmargin argp_fmtstream_wmargin @@ -123,8 +123,8 @@ Index: git/argp/argp-namefrob.h #undef __flockfile Index: git/argp/Makefile =================================================================== ---- git.orig/argp/Makefile 2014-08-29 20:00:42.976070587 -0700 -+++ git/argp/Makefile 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/argp/Makefile ++++ git/argp/Makefile @@ -18,6 +18,8 @@ # # Makefile for argp. @@ -136,9 +136,9 @@ Index: git/argp/Makefile include ../Makeconfig Index: git/catgets/Makefile =================================================================== ---- git.orig/catgets/Makefile 2014-08-29 20:00:43.008070587 -0700 -+++ git/catgets/Makefile 2014-08-29 20:01:15.192070587 -0700 -@@ -22,20 +22,23 @@ +--- git.orig/catgets/Makefile ++++ git/catgets/Makefile +@@ -22,20 +22,23 @@ subdir := catgets include ../Makeconfig @@ -171,8 +171,8 @@ Index: git/catgets/Makefile # To find xmalloc.c Index: git/crypt/crypt-entry.c =================================================================== ---- git.orig/crypt/crypt-entry.c 2014-08-29 20:00:43.028070587 -0700 -+++ git/crypt/crypt-entry.c 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/crypt/crypt-entry.c ++++ git/crypt/crypt-entry.c @@ -27,6 +27,7 @@ #include <stdio.h> #endif @@ -181,7 +181,7 @@ Index: git/crypt/crypt-entry.c #include <errno.h> #include <fips-private.h> -@@ -76,9 +77,11 @@ +@@ -76,9 +77,11 @@ __crypt_r (key, salt, data) const char *salt; struct crypt_data * __restrict data; { @@ -193,7 +193,7 @@ Index: git/crypt/crypt-entry.c #ifdef _LIBC /* Try to find out whether we have to use MD5 encryption replacement. */ -@@ -105,6 +108,7 @@ +@@ -105,6 +108,7 @@ __crypt_r (key, salt, data) sizeof (struct crypt_data)); #endif @@ -201,7 +201,7 @@ Index: git/crypt/crypt-entry.c /* * Hack DES tables according to salt */ -@@ -144,6 +148,10 @@ +@@ -144,6 +148,10 @@ __crypt_r (key, salt, data) */ _ufc_output_conversion_r (res[0], res[1], salt, data); return data->crypt_3_buf; @@ -212,7 +212,7 @@ Index: git/crypt/crypt-entry.c } weak_alias (__crypt_r, crypt_r) -@@ -168,7 +176,12 @@ +@@ -168,7 +176,12 @@ crypt (key, salt) return __sha512_crypt (key, salt); #endif @@ -227,8 +227,8 @@ Index: git/crypt/crypt-entry.c Index: git/crypt/Makefile =================================================================== ---- git.orig/crypt/Makefile 2014-08-29 20:00:43.024070587 -0700 -+++ git/crypt/Makefile 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/crypt/Makefile ++++ git/crypt/Makefile @@ -18,21 +18,25 @@ # # Sub-makefile for crypt() portion of the library. @@ -261,7 +261,7 @@ Index: git/crypt/Makefile routines += $(libcrypt-routines) endif -@@ -44,7 +48,7 @@ +@@ -44,7 +48,7 @@ LDLIBS-crypt.so = -lfreebl3 else libcrypt-routines += md5 sha256 sha512 @@ -270,7 +270,7 @@ Index: git/crypt/Makefile # The test md5test-giant uses up to 400 MB of RSS and runs on a fast # machine over a minute. -@@ -64,8 +68,10 @@ +@@ -64,8 +68,10 @@ $(objpfx)sha256test: $(patsubst %, $(obj $(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines)) endif @@ -283,8 +283,8 @@ Index: git/crypt/Makefile +endif # eglibc: OPTION_EGLIBC_CRYPT Index: git/csu/Makefile =================================================================== ---- git.orig/csu/Makefile 2014-08-29 20:00:43.032070587 -0700 -+++ git/csu/Makefile 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/csu/Makefile ++++ git/csu/Makefile @@ -22,6 +22,8 @@ # crtn.o, special "initializer" and "finalizer" files used in the link # to make the .init and .fini sections work right. @@ -296,8 +296,8 @@ Index: git/csu/Makefile include ../Makeconfig Index: git/debug/Makefile =================================================================== ---- git.orig/debug/Makefile 2014-08-29 20:00:43.036070587 -0700 -+++ git/debug/Makefile 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/debug/Makefile ++++ git/debug/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for debug portion of the library. @@ -307,7 +307,7 @@ Index: git/debug/Makefile subdir := debug include ../Makeconfig -@@ -27,7 +29,7 @@ +@@ -27,7 +29,7 @@ headers := execinfo.h # Note that ptsname_r_chk and getlogin_r are not here, but in # login/Makefile instead. If that subdir is omitted from the # build, its _FORTIFY_SOURCE support will be too. @@ -316,7 +316,7 @@ Index: git/debug/Makefile memcpy_chk memmove_chk mempcpy_chk memset_chk stpcpy_chk \ strcat_chk strcpy_chk strncat_chk strncpy_chk stpncpy_chk \ sprintf_chk vsprintf_chk snprintf_chk vsnprintf_chk \ -@@ -36,20 +38,27 @@ +@@ -36,20 +38,27 @@ routines = backtrace backtracesyms back read_chk pread_chk pread64_chk recv_chk recvfrom_chk \ readlink_chk readlinkat_chk getwd_chk getcwd_chk \ realpath_chk fread_chk fread_u_chk \ @@ -352,7 +352,7 @@ Index: git/debug/Makefile static-only-routines := warning-nop stack_chk_fail_local CFLAGS-backtrace.c = -fno-omit-frame-pointer -@@ -129,11 +138,15 @@ +@@ -131,11 +140,15 @@ LDFLAGS-tst-backtrace4 = -rdynamic LDFLAGS-tst-backtrace5 = -rdynamic LDFLAGS-tst-backtrace6 = -rdynamic @@ -371,12 +371,12 @@ Index: git/debug/Makefile +tests += tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6 +endif - tests-ifunc := $(stpcpy_chk strcpy_chk:%=test-%-ifunc) - tests += $(tests-ifunc) + extra-libs = libSegFault libpcprofile + extra-libs-others = $(extra-libs) Index: git/debug/segfault.c =================================================================== ---- git.orig/debug/segfault.c 2014-08-29 20:00:46.280070587 -0700 -+++ git/debug/segfault.c 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/debug/segfault.c ++++ git/debug/segfault.c @@ -30,6 +30,7 @@ #include <unistd.h> #include <_itoa.h> @@ -385,7 +385,24 @@ Index: git/debug/segfault.c /* This file defines macros to access the content of the sigcontext element passed up by the signal handler. */ -@@ -91,6 +92,7 @@ +@@ -68,11 +69,13 @@ write_strsignal (int fd, int signal) + static void + catch_segfault (int signal, SIGCONTEXT ctx) + { +- int fd, cnt, i; +- void **arr; ++ int fd; + struct sigaction sa; ++#if __OPTION_EGLIBC_BACKTRACE ++ int cnt, i; ++ void **arr; + uintptr_t pc; +- ++#endif + /* This is the name of the file we are writing to. If none is given + or we cannot write to this file write to stderr. */ + fd = 2; +@@ -91,6 +94,7 @@ catch_segfault (int signal, SIGCONTEXT c REGISTER_DUMP; #endif @@ -393,7 +410,7 @@ Index: git/debug/segfault.c WRITE_STRING ("\nBacktrace:\n"); /* Get the backtrace. */ -@@ -113,6 +115,7 @@ +@@ -113,6 +117,7 @@ catch_segfault (int signal, SIGCONTEXT c /* Now generate nicely formatted output. */ __backtrace_symbols_fd (arr + i, cnt - i, fd); @@ -403,8 +420,8 @@ Index: git/debug/segfault.c /* Now the link map. */ Index: git/debug/tst-chk1.c =================================================================== ---- git.orig/debug/tst-chk1.c 2014-08-29 20:00:46.288070587 -0700 -+++ git/debug/tst-chk1.c 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/debug/tst-chk1.c ++++ git/debug/tst-chk1.c @@ -31,6 +31,7 @@ #include <sys/select.h> #include <sys/socket.h> @@ -413,7 +430,7 @@ Index: git/debug/tst-chk1.c #define obstack_chunk_alloc malloc -@@ -307,6 +308,7 @@ +@@ -307,6 +308,7 @@ do_test (void) snprintf (buf + 8, l0 + 3, "%d", num2); CHK_FAIL_END @@ -421,7 +438,7 @@ Index: git/debug/tst-chk1.c CHK_FAIL_START swprintf (wbuf + 8, 3, L"%d", num1); CHK_FAIL_END -@@ -314,6 +316,7 @@ +@@ -314,6 +316,7 @@ do_test (void) CHK_FAIL_START swprintf (wbuf + 8, l0 + 3, L"%d", num1); CHK_FAIL_END @@ -429,7 +446,7 @@ Index: git/debug/tst-chk1.c # endif memcpy (buf, str1 + 2, l0 + 9); -@@ -381,6 +384,7 @@ +@@ -381,6 +384,7 @@ do_test (void) CHK_FAIL_END #endif @@ -437,7 +454,7 @@ Index: git/debug/tst-chk1.c /* These ops can be done without runtime checking of object size. */ wmemcpy (wbuf, L"abcdefghij", 10); -@@ -605,6 +609,7 @@ +@@ -605,6 +609,7 @@ do_test (void) CHK_FAIL_END #endif @@ -445,7 +462,7 @@ Index: git/debug/tst-chk1.c /* Now checks for %n protection. */ -@@ -1192,6 +1197,7 @@ +@@ -1192,6 +1197,7 @@ do_test (void) # endif #endif @@ -453,7 +470,7 @@ Index: git/debug/tst-chk1.c if (setlocale (LC_ALL, "de_DE.UTF-8") != NULL) { assert (MB_CUR_MAX <= 10); -@@ -1348,6 +1354,7 @@ +@@ -1348,6 +1354,7 @@ do_test (void) puts ("cannot set locale"); ret = 1; } @@ -463,8 +480,8 @@ Index: git/debug/tst-chk1.c if (fd != -1) Index: git/dlfcn/Makefile =================================================================== ---- git.orig/dlfcn/Makefile 2014-08-29 20:00:46.312070587 -0700 -+++ git/dlfcn/Makefile 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/dlfcn/Makefile ++++ git/dlfcn/Makefile @@ -15,6 +15,8 @@ # License along with the GNU C Library; if not, see # <http://www.gnu.org/licenses/>. @@ -474,21 +491,23 @@ Index: git/dlfcn/Makefile subdir := dlfcn include ../Makeconfig -@@ -36,7 +38,9 @@ +@@ -36,8 +38,11 @@ endif ifeq (yes,$(build-shared)) tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \ bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \ -- bug-atexit3 tstatexit bug-dl-leaf -+ tstatexit bug-dl-leaf +- bug-atexit3 tstatexit bug-dl-leaf tst-rec-dlopen ++ tstatexit bug-dl-leaf tst-rec-dlopen + endif + +tests-$(OPTION_EGLIBC_CXX_TESTS) += bug-atexit3 - endif ++ modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \ defaultmod2 errmsg1mod modatexit modcxaatexit \ + bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \ Index: git/elf/dl-support.c =================================================================== ---- git.orig/elf/dl-support.c 2014-08-29 20:00:46.384070587 -0700 -+++ git/elf/dl-support.c 2014-08-29 20:01:15.192070587 -0700 +--- git.orig/elf/dl-support.c ++++ git/elf/dl-support.c @@ -19,6 +19,7 @@ /* This file defines some things that for the dynamic linker are defined in rtld.c and dl-sysdep.c in ways appropriate to bootstrap dynamic linking. */ @@ -497,7 +516,7 @@ Index: git/elf/dl-support.c #include <errno.h> #include <libintl.h> #include <stdlib.h> -@@ -42,7 +43,9 @@ +@@ -42,7 +43,9 @@ char **_dl_argv = &__progname; /* This i const char *_dl_platform; size_t _dl_platformlen; @@ -509,8 +528,8 @@ Index: git/elf/dl-support.c int _dl_dynamic_weak; Index: git/elf/rtld.c =================================================================== ---- git.orig/elf/rtld.c 2014-08-29 20:01:14.708070587 -0700 -+++ git/elf/rtld.c 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/elf/rtld.c ++++ git/elf/rtld.c @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ @@ -519,7 +538,7 @@ Index: git/elf/rtld.c #include <errno.h> #include <dlfcn.h> #include <fcntl.h> -@@ -2200,6 +2201,7 @@ +@@ -2200,6 +2201,7 @@ print_missing_version (int errcode __att objname, errstring); } @@ -527,7 +546,7 @@ Index: git/elf/rtld.c /* Nonzero if any of the debugging options is enabled. */ static int any_debug attribute_relro; -@@ -2309,6 +2311,7 @@ +@@ -2309,6 +2311,7 @@ a filename can be specified using the LD _exit (0); } } @@ -535,7 +554,18 @@ Index: git/elf/rtld.c static void process_dl_audit (char *str) -@@ -2376,12 +2379,14 @@ +@@ -2348,8 +2351,9 @@ process_envvars (enum mode *modep) + char **runp = _environ; + char *envline; + enum mode mode = normal; ++#if __OPTION_EGLIBC_RTLD_DEBUG + char *debug_output = NULL; +- ++#endif + /* This is the default place for profiling data file. */ + GLRO(dl_profile_output) + = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0]; +@@ -2376,12 +2380,14 @@ process_envvars (enum mode *modep) break; case 5: @@ -550,7 +580,23 @@ Index: git/elf/rtld.c if (memcmp (envline, "AUDIT", 5) == 0) process_dl_audit (&envline[6]); break; -@@ -2490,7 +2495,9 @@ +@@ -2447,13 +2453,14 @@ process_envvars (enum mode *modep) + break; + } + ++#if __OPTION_EGLIBC_RTLD_DEBUG + /* Where to place the profiling data file. */ + if (memcmp (envline, "DEBUG_OUTPUT", 12) == 0) + { + debug_output = &envline[13]; + break; + } +- ++#endif + if (!__libc_enable_secure + && memcmp (envline, "DYNAMIC_WEAK", 12) == 0) + GLRO(dl_dynamic_weak) = 1; +@@ -2490,7 +2497,9 @@ process_envvars (enum mode *modep) { mode = trace; GLRO(dl_verbose) = 1; @@ -560,7 +606,7 @@ Index: git/elf/rtld.c GLRO(dl_trace_prelink) = &envline[17]; } break; -@@ -2537,12 +2544,15 @@ +@@ -2537,12 +2546,15 @@ process_envvars (enum mode *modep) if (__access ("/etc/suid-debug", F_OK) != 0) { unsetenv ("MALLOC_CHECK_"); @@ -576,7 +622,7 @@ Index: git/elf/rtld.c /* If we have to run the dynamic linker in debugging mode and the LD_DEBUG_OUTPUT environment variable is given, we write the debug messages to this file. */ -@@ -2567,6 +2577,7 @@ +@@ -2567,6 +2579,7 @@ process_envvars (enum mode *modep) /* We use standard output if opening the file failed. */ GLRO(dl_debug_fd) = STDOUT_FILENO; } @@ -586,9 +632,9 @@ Index: git/elf/rtld.c Index: git/extra-lib.mk =================================================================== ---- git.orig/extra-lib.mk 2014-08-29 20:00:46.544070587 -0700 -+++ git/extra-lib.mk 2014-08-29 20:01:15.196070587 -0700 -@@ -25,7 +25,9 @@ +--- git.orig/extra-lib.mk ++++ git/extra-lib.mk +@@ -25,7 +25,9 @@ install-lib := $(install-lib) extra-objs := $(extra-objs) # The modules that go in $(lib). @@ -599,7 +645,7 @@ Index: git/extra-lib.mk # Add each flavor of library to the lists of things to build and install. install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) -@@ -101,7 +103,7 @@ +@@ -101,7 +103,7 @@ endif endif # This will define `libof-ROUTINE := LIB' for each of the routines. @@ -610,8 +656,8 @@ Index: git/extra-lib.mk endif Index: git/grp/Makefile =================================================================== ---- git.orig/grp/Makefile 2014-08-29 20:00:46.556070587 -0700 -+++ git/grp/Makefile 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/grp/Makefile ++++ git/grp/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for grp portion of the library. @@ -621,7 +667,7 @@ Index: git/grp/Makefile subdir := grp include ../Makeconfig -@@ -29,6 +31,9 @@ +@@ -29,6 +31,9 @@ routines := fgetgrent initgroups setgrou getgrent_r getgrgid_r getgrnam_r fgetgrent_r tests := testgrp @@ -633,8 +679,8 @@ Index: git/grp/Makefile test-srcs := tst_fgetgrent Index: git/hesiod/Makefile =================================================================== ---- git.orig/hesiod/Makefile 2014-08-29 20:00:46.580070587 -0700 -+++ git/hesiod/Makefile 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/hesiod/Makefile ++++ git/hesiod/Makefile @@ -18,12 +18,14 @@ # # Sub-makefile for hesiod portion of the library. @@ -654,8 +700,8 @@ Index: git/hesiod/Makefile vpath %.c nss_hesiod Index: git/iconv/gconv_db.c =================================================================== ---- git.orig/iconv/gconv_db.c 2014-08-29 20:00:46.604070587 -0700 -+++ git/iconv/gconv_db.c 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/iconv/gconv_db.c ++++ git/iconv/gconv_db.c @@ -25,6 +25,7 @@ #include <sys/param.h> #include <bits/libc-lock.h> @@ -664,7 +710,7 @@ Index: git/iconv/gconv_db.c #include <dlfcn.h> #include <gconv_int.h> -@@ -828,9 +829,11 @@ +@@ -828,9 +829,11 @@ free_modules_db (struct gconv_module *no /* Free all resources if necessary. */ libc_freeres_fn (free_mem) { @@ -678,8 +724,8 @@ Index: git/iconv/gconv_db.c extern void _nl_finddomain_subfreeres (void) attribute_hidden; Index: git/iconv/gconv_trans.c =================================================================== ---- git.orig/iconv/gconv_trans.c 2014-08-29 20:00:46.612070587 -0700 -+++ git/iconv/gconv_trans.c 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/iconv/gconv_trans.c ++++ git/iconv/gconv_trans.c @@ -23,6 +23,7 @@ #include <stdint.h> #include <string.h> @@ -688,7 +734,27 @@ Index: git/iconv/gconv_trans.c #include <bits/libc-lock.h> #include "gconv_int.h" -@@ -59,6 +60,7 @@ +@@ -38,15 +39,19 @@ __gconv_transliterate (struct __gconv_st + unsigned char **outbufstart, size_t *irreversible) + { + /* Find out about the locale's transliteration. */ ++#if __OPTION_EGLIBC_LOCALE_CODE + uint_fast32_t size; + const uint32_t *from_idx; + const uint32_t *from_tbl; + const uint32_t *to_idx; + const uint32_t *to_tbl; ++#endif + const uint32_t *winbuf; + const uint32_t *winbufend; ++#if __OPTION_EGLIBC_LOCALE_CODE + uint_fast32_t low; + uint_fast32_t high; ++#endif + + /* The input buffer. There are actually 4-byte values. */ + winbuf = (const uint32_t *) *inbufp; +@@ -58,6 +63,7 @@ __gconv_transliterate (struct __gconv_st PTR_DEMANGLE (fct); #endif @@ -696,7 +762,7 @@ Index: git/iconv/gconv_trans.c /* If there is no transliteration information in the locale don't do anything and return the error. */ size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_TAB_SIZE); -@@ -194,6 +196,7 @@ +@@ -193,6 +199,7 @@ __gconv_transliterate (struct __gconv_st sorted. */ break; } @@ -706,8 +772,8 @@ Index: git/iconv/gconv_trans.c if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN) != 0) Index: git/iconv/iconv_prog.c =================================================================== ---- git.orig/iconv/iconv_prog.c 2014-08-29 20:00:46.612070587 -0700 -+++ git/iconv/iconv_prog.c 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/iconv/iconv_prog.c ++++ git/iconv/iconv_prog.c @@ -35,6 +35,7 @@ #ifdef _POSIX_MAPPED_FILES # include <sys/mman.h> @@ -716,7 +782,7 @@ Index: git/iconv/iconv_prog.c #include <charmap.h> #include <gconv_int.h> #include "iconv_prog.h" -@@ -221,10 +222,17 @@ +@@ -221,10 +222,17 @@ main (int argc, char *argv[]) bool to_wrong = (iconv_open (to_code, "UTF-8") == (iconv_t) -1 && errno == EINVAL); @@ -736,8 +802,8 @@ Index: git/iconv/iconv_prog.c { Index: git/iconv/Makefile =================================================================== ---- git.orig/iconv/Makefile 2014-08-29 20:00:46.600070587 -0700 -+++ git/iconv/Makefile 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/iconv/Makefile ++++ git/iconv/Makefile @@ -18,6 +18,8 @@ # # Makefile for iconv. @@ -747,20 +813,22 @@ Index: git/iconv/Makefile subdir := iconv include ../Makeconfig -@@ -57,6 +59,9 @@ - CPPFLAGS-strtab = -DNOT_IN_libc - CPPFLAGS-charmap = -DNOT_IN_libc - CPPFLAGS-charmap-dir = -DNOT_IN_libc +@@ -39,6 +41,11 @@ CFLAGS-iconv_charmap.c = -I../locale/pro + CFLAGS-dummy-repertoire.c = -I../locale/programs + CFLAGS-charmap.c = -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \ + -DDEFAULT_CHARMAP=null_pointer -DNEED_NULL_POINTER ++ +ifneq (y,$(OPTION_EGLIBC_SPAWN)) -+CPPFLAGS-charmap-dir.c += -DNO_UNCOMPRESS ++CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS +endif ++ + CFLAGS-linereader.c = -DNO_TRANSLITERATION + CFLAGS-simple-hash.c = -I../locale - ifeq ($(run-built-tests),yes) - xtests-special += $(objpfx)test-iconvconfig.out Index: git/iconvdata/Makefile =================================================================== ---- git.orig/iconvdata/Makefile 2014-08-29 20:00:46.628070587 -0700 -+++ git/iconvdata/Makefile 2014-08-29 20:01:15.196070587 -0700 +--- git.orig/iconvdata/Makefile ++++ git/iconvdata/Makefile @@ -18,12 +18,15 @@ # # Makefile for iconv data and code. @@ -778,7 +846,7 @@ Index: git/iconvdata/Makefile ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10 \ ISO8859-11 ISO8859-13 ISO8859-14 ISO8859-15 ISO8859-16 \ T.61 ISO_6937 SJIS KOI-8 HP-ROMAN8 HP-ROMAN9 EBCDIC-AT-DE \ -@@ -63,11 +66,13 @@ +@@ -63,11 +66,13 @@ modules := ISO8859-1 ISO8859-2 ISO8859-3 MAC-CENTRALEUROPE KOI8-RU ISO8859-9E \ CP770 CP771 CP772 CP773 CP774 @@ -794,7 +862,7 @@ Index: git/iconvdata/Makefile ifeq ($(have-thread-library),yes) tests += bug-iconv3 endif -@@ -130,13 +135,13 @@ +@@ -127,13 +132,13 @@ ifeq (yes,$(build-shared)) # Rule to generate the shared objects. charmaps = ../localedata/charmaps -include $(objpfx)iconv-rules @@ -811,7 +879,7 @@ Index: git/iconvdata/Makefile # We can build the conversion tables for numerous charsets automatically. -@@ -204,7 +209,7 @@ +@@ -201,7 +206,7 @@ before-compile += $(addprefix $(objpfx), ifndef avoid-generated $(objpfx)iconv-rules: Makefile $(make-target-directory) @@ -820,7 +888,7 @@ Index: git/iconvdata/Makefile echo 8bit $(gen-8bit-modules); \ echo 8bit-gap $(gen-8bit-gap-modules); } | \ LC_ALL=C \ -@@ -247,7 +252,7 @@ +@@ -245,7 +250,7 @@ $(addprefix $(inst_gconvdir)/, $(modules $(do-install-program) $(inst_gconvdir)/gconv-modules: gconv-modules $(+force) $(do-install) @@ -829,7 +897,7 @@ Index: git/iconvdata/Makefile # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary # if this libc has more gconv modules than the previously installed one. if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \ -@@ -256,9 +261,9 @@ +@@ -254,9 +259,9 @@ ifeq (no,$(cross-compiling)) $(common-objpfx)iconv/iconvconfig \ $(addprefix --prefix=,$(install_root)); \ fi @@ -844,9 +912,9 @@ Index: git/iconvdata/Makefile Index: git/include/netdb.h =================================================================== ---- git.orig/include/netdb.h 2014-08-29 20:00:47.152070587 -0700 -+++ git/include/netdb.h 2014-08-29 20:01:15.196070587 -0700 -@@ -232,6 +232,10 @@ +--- git.orig/include/netdb.h ++++ git/include/netdb.h +@@ -232,6 +232,10 @@ extern enum nss_status _nss_ ## service (const char *name, int af, struct hostent *host, \ char *buffer, size_t buflen, int *errnop, \ int *h_errnop); \ @@ -859,8 +927,8 @@ Index: git/include/netdb.h size_t buflen, int *errnop, int *h_errnop); \ Index: git/inet/Makefile =================================================================== ---- git.orig/inet/Makefile 2014-08-29 20:00:47.176070587 -0700 -+++ git/inet/Makefile 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/inet/Makefile ++++ git/inet/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for inet portion of the library. @@ -870,7 +938,7 @@ Index: git/inet/Makefile subdir := inet include ../Makeconfig -@@ -27,7 +29,8 @@ +@@ -27,7 +29,8 @@ headers := netinet/ether.h netinet/in.h netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \ aliases.h ifaddrs.h netinet/ip6.h netinet/icmp6.h bits/in.h @@ -880,7 +948,7 @@ Index: git/inet/Makefile inet_lnaof inet_mkadr \ inet_netof inet_ntoa inet_net herrno herrno-loc \ gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \ -@@ -41,18 +44,23 @@ +@@ -41,18 +44,23 @@ routines := htonl htons \ getrpcent_r getrpcbyname_r getrpcbynumber_r \ ether_aton ether_aton_r ether_hton ether_line \ ether_ntoa ether_ntoa_r ether_ntoh \ @@ -912,89 +980,112 @@ Index: git/inet/Makefile Index: git/intl/dcigettext.c =================================================================== ---- git.orig/intl/dcigettext.c 2014-08-29 20:00:47.224070587 -0700 -+++ git/intl/dcigettext.c 2014-08-29 20:01:15.200070587 -0700 -@@ -77,6 +77,10 @@ +--- git.orig/intl/dcigettext.c ++++ git/intl/dcigettext.c +@@ -100,11 +100,15 @@ extern int errno; + # include "libgnuintl.h" #endif #include "hash-string.h" - +#ifdef _LIBC +# include <gnu/option-groups.h> +#endif -+ - /* Thread safetyness. */ + + /* Handle multi-threaded applications. */ #ifdef _LIBC # include <bits/libc-lock.h> -@@ -449,9 +453,11 @@ - #endif + # define gl_rwlock_define_initialized __libc_rwlock_define_initialized ++# define gl_rwlock_define __libc_rwlock_define + # define gl_rwlock_rdlock __libc_rwlock_rdlock + # define gl_rwlock_wrlock __libc_rwlock_wrlock + # define gl_rwlock_unlock __libc_rwlock_unlock +@@ -523,8 +527,10 @@ DCIGETTEXT (const char *domainname, cons + saved_errno = errno; #ifdef _LIBC -+#if __OPTION_EGLIBC_LOCALE_CODE - __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden) - __libc_rwlock_rdlock (__libc_setlocale_lock); +- __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden) +- __libc_rwlock_rdlock (__libc_setlocale_lock); ++# if __OPTION_EGLIBC_LOCALE_CODE ++ gl_rwlock_define (extern, __libc_setlocale_lock attribute_hidden) ++ gl_rwlock_rdlock (__libc_setlocale_lock); ++# endif #endif -+#endif - __libc_rwlock_rdlock (_nl_state_lock); - -@@ -470,7 +476,11 @@ - search.category = category; - # ifdef HAVE_PER_THREAD_LOCALE + gl_rwlock_rdlock (_nl_state_lock); +@@ -550,7 +556,11 @@ DCIGETTEXT (const char *domainname, cons + #ifdef HAVE_PER_THREAD_LOCALE + # ifndef IN_LIBGLOCALE # ifdef _LIBC +- localename = strdupa (__current_locale_name (category)); +# if __OPTION_EGLIBC_LOCALE_CODE - localename = strdupa (__current_locale_name (category)); ++ localename = strdupa (__current_locale_name (category)); +# else -+ localename = "C"; ++ localename = "C"; +# endif - # endif - search.localename = localename; - # endif -@@ -494,7 +504,9 @@ + # else + categoryname = category_to_name (category); + # define CATEGORYNAME_INITIALIZED +@@ -581,10 +591,12 @@ DCIGETTEXT (const char *domainname, cons + else retval = (char *) (*foundp)->translation; +- gl_rwlock_unlock (_nl_state_lock); # ifdef _LIBC -+#if __OPTION_EGLIBC_LOCALE_CODE - __libc_rwlock_unlock (__libc_setlocale_lock); -+#endif +- __libc_rwlock_unlock (__libc_setlocale_lock); ++# if __OPTION_EGLIBC_LOCALE_CODE ++ gl_rwlock_unlock (__libc_setlocale_lock); ++# endif # endif - __libc_rwlock_unlock (_nl_state_lock); ++ gl_rwlock_unlock (_nl_state_lock); + __set_errno (saved_errno); return retval; -@@ -611,7 +623,9 @@ - { - no_translation: - FREE_BLOCKS (block_list); -+#if __OPTION_EGLIBC_LOCALE_CODE - __libc_rwlock_unlock (__libc_setlocale_lock); -+#endif - __libc_rwlock_unlock (_nl_state_lock); - __set_errno (saved_errno); - return (plural == 0 -@@ -730,7 +744,9 @@ + } +@@ -838,10 +850,13 @@ DCIGETTEXT (const char *domainname, cons if (plural) retval = plural_lookup (domain, n, retval, retlen); -+#if __OPTION_EGLIBC_LOCALE_CODE - __libc_rwlock_unlock (__libc_setlocale_lock); -+#endif - __libc_rwlock_unlock (_nl_state_lock); +- gl_rwlock_unlock (_nl_state_lock); + #ifdef _LIBC +- __libc_rwlock_unlock (__libc_setlocale_lock); ++# if __OPTION_EGLIBC_LOCALE_CODE ++ ++ gl_rwlock_unlock (__libc_setlocale_lock); ++# endif + #endif ++ gl_rwlock_unlock (_nl_state_lock); return retval; } -@@ -1361,7 +1377,11 @@ - `LC_xxx', and `LANG'. On some systems this can be done by the - `setlocale' function itself. */ + } +@@ -850,10 +865,12 @@ DCIGETTEXT (const char *domainname, cons + return_untranslated: + /* Return the untranslated MSGID. */ + FREE_BLOCKS (block_list); +- gl_rwlock_unlock (_nl_state_lock); #ifdef _LIBC +- __libc_rwlock_unlock (__libc_setlocale_lock); +# if __OPTION_EGLIBC_LOCALE_CODE - retval = __current_locale_name (category); -+# else -+ retval = "C"; ++ gl_rwlock_unlock (__libc_setlocale_lock); +# endif - #else - retval = _nl_locale_name (category, categoryname); #endif ++ gl_rwlock_unlock (_nl_state_lock); + #ifndef _LIBC + if (!ENABLE_SECURE) + { +@@ -1550,7 +1567,11 @@ guess_category_value (int category, cons + `LC_xxx', and `LANG'. On some systems this can be done by the + `setlocale' function itself. */ + # ifdef _LIBC ++# if __OPTION_EGLIBC_LOCALE_CODE + locale = __current_locale_name (category); ++# else ++ locale = "C"; ++# endif + # else + locale_defaulted = 0; + # if HAVE_USELOCALE Index: git/intl/Makefile =================================================================== ---- git.orig/intl/Makefile 2014-08-29 20:00:47.220070587 -0700 -+++ git/intl/Makefile 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/intl/Makefile ++++ git/intl/Makefile @@ -16,6 +16,7 @@ # <http://www.gnu.org/licenses/>. @@ -1003,7 +1094,7 @@ Index: git/intl/Makefile subdir = intl -@@ -48,7 +49,7 @@ +@@ -48,7 +49,7 @@ endif $(objpfx)plural.o: plural.c ifeq ($(run-built-tests),yes) @@ -1014,8 +1105,8 @@ Index: git/intl/Makefile $(objpfx)tst-gettext2.out $(objpfx)tst-codeset.out \ Index: git/io/Makefile =================================================================== ---- git.orig/io/Makefile 2014-08-29 20:00:47.244070587 -0700 -+++ git/io/Makefile 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/io/Makefile ++++ git/io/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for I/O portion of the library. @@ -1025,7 +1116,7 @@ Index: git/io/Makefile subdir := io include ../Makeconfig -@@ -36,7 +38,7 @@ +@@ -36,7 +38,7 @@ routines := \ fxstatat fxstatat64 \ statfs fstatfs statfs64 fstatfs64 \ statvfs fstatvfs statvfs64 fstatvfs64 \ @@ -1034,7 +1125,7 @@ Index: git/io/Makefile mkdir mkdirat \ open open_2 open64 open64_2 openat openat_2 openat64 openat64_2 \ read write lseek lseek64 access euidaccess faccessat \ -@@ -49,11 +51,13 @@ +@@ -49,11 +51,13 @@ routines := \ ttyname ttyname_r isatty \ link linkat symlink symlinkat readlink readlinkat \ unlink unlinkat rmdir \ @@ -1049,7 +1140,7 @@ Index: git/io/Makefile aux := have_o_cloexec -@@ -64,18 +68,22 @@ +@@ -64,18 +68,22 @@ static-only-routines = stat fstat lstat fstatat fstatat64 mknod mknodat others := pwd @@ -1077,8 +1168,8 @@ Index: git/io/Makefile Index: git/libidn/Makefile =================================================================== ---- git.orig/libidn/Makefile 2014-08-29 20:00:47.316070587 -0700 -+++ git/libidn/Makefile 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/libidn/Makefile ++++ git/libidn/Makefile @@ -16,6 +16,7 @@ # <http://www.gnu.org/licenses/>. @@ -1087,7 +1178,7 @@ Index: git/libidn/Makefile subdir := libidn -@@ -23,8 +24,8 @@ +@@ -23,8 +24,8 @@ include ../Makeconfig routines = idn-stub @@ -1100,8 +1191,8 @@ Index: git/libidn/Makefile iconvme Index: git/libidn/toutf8.c =================================================================== ---- git.orig/libidn/toutf8.c 2014-08-29 20:00:47.332070587 -0700 -+++ git/libidn/toutf8.c 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/libidn/toutf8.c ++++ git/libidn/toutf8.c @@ -33,6 +33,11 @@ /* Get strlen. */ #include <string.h> @@ -1129,8 +1220,8 @@ Index: git/libidn/toutf8.c * stringprep_locale_charset - return charset used in current locale Index: git/libio/fileops.c =================================================================== ---- git.orig/libio/fileops.c 2014-08-29 20:00:47.352070587 -0700 -+++ git/libio/fileops.c 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/libio/fileops.c ++++ git/libio/fileops.c @@ -38,6 +38,7 @@ #include <string.h> #include <errno.h> @@ -1139,7 +1230,7 @@ Index: git/libio/fileops.c #include <stdlib.h> #if _LIBC # include "../wcsmbs/wcsmbsload.h" -@@ -174,7 +175,7 @@ +@@ -172,7 +173,7 @@ _IO_new_file_close_it (_IO_FILE *fp) /* Free buffer. */ #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T @@ -1148,7 +1239,7 @@ Index: git/libio/fileops.c { if (_IO_have_wbackup (fp)) _IO_free_wbackup_area (fp); -@@ -359,6 +360,7 @@ +@@ -347,6 +348,7 @@ _IO_new_file_fopen (_IO_FILE *fp, const cs = strstr (last_recognized + 1, ",ccs="); if (cs != NULL) { @@ -1156,7 +1247,7 @@ Index: git/libio/fileops.c /* Yep. Load the appropriate conversions and set the orientation to wide. */ struct gconv_fcts fcts; -@@ -423,6 +425,12 @@ +@@ -406,6 +408,12 @@ _IO_new_file_fopen (_IO_FILE *fp, const /* Set the mode now. */ result->_mode = 1; @@ -1171,8 +1262,8 @@ Index: git/libio/fileops.c Index: git/libio/__fpurge.c =================================================================== ---- git.orig/libio/__fpurge.c 2014-08-29 20:00:47.336070587 -0700 -+++ git/libio/__fpurge.c 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/libio/__fpurge.c ++++ git/libio/__fpurge.c @@ -21,7 +21,7 @@ void __fpurge (FILE *fp) @@ -1184,8 +1275,8 @@ Index: git/libio/__fpurge.c if (_IO_in_backup (fp)) Index: git/libio/iofwide.c =================================================================== ---- git.orig/libio/iofwide.c 2014-08-29 20:00:47.360070587 -0700 -+++ git/libio/iofwide.c 2014-08-29 20:01:15.200070587 -0700 +--- git.orig/libio/iofwide.c ++++ git/libio/iofwide.c @@ -26,6 +26,7 @@ #include <libioP.h> @@ -1203,7 +1294,7 @@ Index: git/libio/iofwide.c /* Prototypes of libio's codecvt functions. */ static enum __codecvt_result do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep, -@@ -513,3 +516,26 @@ +@@ -499,3 +502,26 @@ do_max_length (struct _IO_codecvt *codec return MB_CUR_MAX; #endif } @@ -1232,9 +1323,9 @@ Index: git/libio/iofwide.c +#endif Index: git/libio/ioseekoff.c =================================================================== ---- git.orig/libio/ioseekoff.c 2014-08-29 20:00:47.364070587 -0700 -+++ git/libio/ioseekoff.c 2014-08-29 20:01:15.200070587 -0700 -@@ -60,7 +60,7 @@ +--- git.orig/libio/ioseekoff.c ++++ git/libio/ioseekoff.c +@@ -60,7 +60,7 @@ _IO_seekoff_unlocked (fp, offset, dir, m else abort (); } @@ -1245,9 +1336,9 @@ Index: git/libio/ioseekoff.c _IO_free_wbackup_area (fp); Index: git/libio/ioseekpos.c =================================================================== ---- git.orig/libio/ioseekpos.c 2014-08-29 20:00:47.364070587 -0700 -+++ git/libio/ioseekpos.c 2014-08-29 20:01:15.200070587 -0700 -@@ -35,7 +35,7 @@ +--- git.orig/libio/ioseekpos.c ++++ git/libio/ioseekpos.c +@@ -35,7 +35,7 @@ _IO_seekpos_unlocked (fp, pos, mode) /* If we have a backup buffer, get rid of it, since the __seekoff callback may not know to do the right thing about it. This may be over-kill, but it'll do for now. TODO */ @@ -1258,8 +1349,8 @@ Index: git/libio/ioseekpos.c _IO_free_backup_area (fp); Index: git/libio/iosetbuffer.c =================================================================== ---- git.orig/libio/iosetbuffer.c 2014-08-29 20:00:47.364070587 -0700 -+++ git/libio/iosetbuffer.c 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/libio/iosetbuffer.c ++++ git/libio/iosetbuffer.c @@ -24,6 +24,8 @@ This exception applies to code released by its copyright holders in files containing the exception. */ @@ -1269,7 +1360,7 @@ Index: git/libio/iosetbuffer.c #include "libioP.h" void -@@ -38,9 +40,11 @@ +@@ -38,9 +40,11 @@ _IO_setbuffer (fp, buf, size) if (!buf) size = 0; (void) _IO_SETBUF (fp, buf, size); @@ -1283,8 +1374,8 @@ Index: git/libio/iosetbuffer.c libc_hidden_def (_IO_setbuffer) Index: git/libio/libioP.h =================================================================== ---- git.orig/libio/libioP.h 2014-08-29 20:00:47.372070587 -0700 -+++ git/libio/libioP.h 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/libio/libioP.h ++++ git/libio/libioP.h @@ -42,6 +42,10 @@ /*# include <comthread.h>*/ #endif @@ -1296,7 +1387,7 @@ Index: git/libio/libioP.h #include <math_ldbl_opt.h> #include "iolibio.h" -@@ -508,8 +512,20 @@ +@@ -508,8 +512,20 @@ extern void _IO_old_init (_IO_FILE *fp, #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T @@ -1320,8 +1411,8 @@ Index: git/libio/libioP.h : _IO_wdo_write(_f, (_f)->_wide_data->_IO_write_base, \ Index: git/libio/Makefile =================================================================== ---- git.orig/libio/Makefile 2014-08-29 20:00:47.332070587 -0700 -+++ git/libio/Makefile 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/libio/Makefile ++++ git/libio/Makefile @@ -18,6 +18,8 @@ # # Specific makefile for libio. @@ -1331,7 +1422,7 @@ Index: git/libio/Makefile subdir := libio include ../Makeconfig -@@ -27,16 +29,13 @@ +@@ -27,16 +29,13 @@ headers := stdio.h libio.h _G_config.h b routines := \ filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen \ @@ -1351,63 +1442,61 @@ Index: git/libio/Makefile \ clearerr feof ferror fileno fputc freopen fseek getc getchar \ memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \ -@@ -47,25 +46,48 @@ - __fpurge __fpending __fsetlocking \ +@@ -48,24 +47,49 @@ routines := \ \ libc_fatal fmemopen -- + -tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ - tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \ - tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf \ - tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof \ - tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \ -- tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \ -- tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \ -- bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \ -- tst-memstream1 tst-memstream2 \ -- tst-wmemstream1 tst-wmemstream2 \ -- bug-memstream1 bug-wmemstream1 \ -- tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \ -- tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \ -- tst-ftell-append +routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \ -+ wfiledoalloc \ -+ iowpadn \ -+ swprintf \ -+ vswprintf iovswscanf swscanf wgenops \ ++ wfiledoalloc \ ++ iowpadn \ ++ swprintf \ ++ vswprintf iovswscanf swscanf wgenops \ + wstrops wfileops wmemstream +routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += \ + wdummyfileops +routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += \ + fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \ -+ iofputws iofputws_u iogetwline ioungetwc putwc putwc_u \ -+ putwchar putwchar_u fwprintf vwprintf \ -+ wprintf wscanf fwscanf vwscanf \ ++ iofputws iofputws_u iogetwline ioungetwc putwc putwc_u \ ++ putwchar putwchar_u fwprintf vwprintf \ ++ wprintf wscanf fwscanf vwscanf \ + fwide + -+tests = test-fmemopen tst-ext tst-ext2 \ -+ tst-mmap-setvbuf tst-atime tst-eof \ -+ tst-freopen bug-ungetc bug-fseek \ -+ tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \ -+ tst-mmap2-eofsync tst-mmap-offend bug-fopena+ \ -+ bug-ungetc2 bug-ungetc3 bug-ungetc4 \ -+ tst-memstream1 tst-memstream2 \ -+ bug-memstream1 tst-popen1 tst-fwrite-error \ ++tests = test-fmemopen tst-ext tst-ext2 \ ++ tst-mmap-setvbuf tst-atime tst-eof \ ++ tst-freopen bug-ungetc bug-fseek \ + tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \ +- tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \ +- bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \ ++ tst-mmap2-eofsync tst-mmap-offend bug-fopena+ \ ++ bug-ungetc2 bug-ungetc3 bug-ungetc4 \ + tst-memstream1 tst-memstream2 \ +- tst-wmemstream1 tst-wmemstream2 \ +- bug-memstream1 bug-wmemstream1 \ +- tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \ +- tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \ +- tst-ftell-append tst-fputws ++ bug-memstream1 tst-popen1 tst-fwrite-error \ + tst-ftell-active-handler tst-ftell-append -+tests-$(OPTION_EGLIBC_LOCALE_CODE) \ -+ += tst-swscanf tst-fgetws tst-setvbuf1 \ -+ tst-ungetwc1 tst-ungetwc2 bug-ftell bug-ungetwc2 \ -+ tst-widetext -+tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ -+ += bug-rewind bug-rewind2 bug-ungetwc1 \ -+ bug-wfflush bug-wmemstream1 tst-fopenloc2 \ -+ tst_getwc \ -+ tst_putwc tst_wprintf tst_wprintf2 tst_wscanf \ ++tests-$(OPTION_EGLIBC_LOCALE_CODE) \ ++ += tst-swscanf tst-fgetws tst-setvbuf1 \ ++ tst-ungetwc1 tst-ungetwc2 bug-ftell bug-ungetwc2 \ ++ tst-widetext tst-fputws ++tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ ++ += bug-rewind bug-rewind2 bug-ungetwc1 \ ++ bug-wfflush bug-wmemstream1 tst-fopenloc2 \ ++ tst_getwc \ ++ tst_putwc tst_wprintf tst_wprintf2 tst_wscanf \ + tst-fgetwc bug-wsetpos tst-fseek tst-ftell-partial-wide -+tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ -+ += tst_swprintf tst_swscanf \ -+ tst-sscanf \ ++tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ ++ += tst_swprintf tst_swscanf \ ++ tst-sscanf \ + tst-wmemstream1 tst-wmemstream2 ++ ifeq (yes,$(build-shared)) # Add test-fopenloc only if shared library is enabled since it depends on # shared localedata objects. @@ -1416,7 +1505,7 @@ Index: git/libio/Makefile endif test-srcs = test-freopen -@@ -164,13 +186,17 @@ +@@ -164,13 +188,17 @@ shared-only-routines = oldiofopen oldiof oldiofsetpos64 ifeq ($(run-built-tests),yes) @@ -1436,8 +1525,8 @@ Index: git/libio/Makefile Index: git/libio/wdummyfileops.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/libio/wdummyfileops.c 2014-08-29 20:01:15.204070587 -0700 +--- /dev/null ++++ git/libio/wdummyfileops.c @@ -0,0 +1,161 @@ +/* Copyright (C) 2007 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -1602,8 +1691,8 @@ Index: git/libio/wdummyfileops.c +strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_maybe_mmap) Index: git/locale/catnames.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/locale/catnames.c 2014-08-29 20:01:15.204070587 -0700 +--- /dev/null ++++ git/locale/catnames.c @@ -0,0 +1,48 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -1655,8 +1744,8 @@ Index: git/locale/catnames.c + }; Index: git/locale/C-ctype.c =================================================================== ---- git.orig/locale/C-ctype.c 2014-08-29 20:00:47.396070587 -0700 -+++ git/locale/C-ctype.c 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/locale/C-ctype.c ++++ git/locale/C-ctype.c @@ -19,8 +19,11 @@ #include "localeinfo.h" #include <endian.h> @@ -1669,7 +1758,7 @@ Index: git/locale/C-ctype.c /* This table's entries are taken from POSIX.2 Table 2-6 ``LC_CTYPE Category Definition in the POSIX Locale''. -@@ -647,6 +650,7 @@ +@@ -647,6 +650,7 @@ const struct __locale_data _nl_C_LC_CTYP { .word = L'7' }, { .word = L'8' }, { .word = L'9' }, @@ -1677,7 +1766,7 @@ Index: git/locale/C-ctype.c /* _NL_CTYPE_TRANSLIT_TAB_SIZE */ { .word = NTRANSLIT }, /* _NL_CTYPE_TRANSLIT_FROM_IDX */ -@@ -657,6 +661,22 @@ +@@ -657,6 +661,22 @@ const struct __locale_data _nl_C_LC_CTYP { .wstr = translit_to_idx }, /* _NL_CTYPE_TRANSLIT_TO_TBL */ { .wstr = (uint32_t *) translit_to_tbl }, @@ -1702,8 +1791,8 @@ Index: git/locale/C-ctype.c /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING */ Index: git/locale/dummy-setlocale.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/locale/dummy-setlocale.c 2014-08-29 20:01:15.204070587 -0700 +--- /dev/null ++++ git/locale/dummy-setlocale.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -1740,9 +1829,9 @@ Index: git/locale/dummy-setlocale.c +libc_hidden_def (setlocale) Index: git/locale/localeinfo.h =================================================================== ---- git.orig/locale/localeinfo.h 2014-08-29 20:00:47.404070587 -0700 -+++ git/locale/localeinfo.h 2014-08-29 20:01:15.204070587 -0700 -@@ -224,7 +224,7 @@ +--- git.orig/locale/localeinfo.h ++++ git/locale/localeinfo.h +@@ -224,7 +224,7 @@ __libc_tsd_define (extern, __locale_t, L unused. We can manage this playing some tricks with weak references. But with thread-local locale settings, it becomes quite ungainly unless we can use __thread variables. So only in that case do we attempt this. */ @@ -1753,8 +1842,8 @@ Index: git/locale/localeinfo.h #endif Index: git/locale/Makefile =================================================================== ---- git.orig/locale/Makefile 2014-08-29 20:00:47.400070587 -0700 -+++ git/locale/Makefile 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/locale/Makefile ++++ git/locale/Makefile @@ -18,27 +18,43 @@ # # Makefile for locales. @@ -1810,7 +1899,7 @@ Index: git/locale/Makefile libBrokenLocale-routines = broken_cur_max -@@ -94,6 +110,9 @@ +@@ -93,6 +109,9 @@ CPPFLAGS-locale-programs = -DLOCALE_PATH CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts CFLAGS-charmap-dir.c = -Wno-write-strings @@ -1818,12 +1907,12 @@ Index: git/locale/Makefile +CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS +endif - # This makes sure -DNOT_IN_libc et al are passed for all these modules. - cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \ + # Set libof-* for each routine. + cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \ Index: git/locale/programs/charmap-dir.c =================================================================== ---- git.orig/locale/programs/charmap-dir.c 2014-08-29 20:00:47.408070587 -0700 -+++ git/locale/programs/charmap-dir.c 2014-08-29 20:01:15.204070587 -0700 +--- git.orig/locale/programs/charmap-dir.c ++++ git/locale/programs/charmap-dir.c @@ -19,7 +19,9 @@ #include <error.h> #include <fcntl.h> @@ -1834,7 +1923,7 @@ Index: git/locale/programs/charmap-dir.c #include <stdio.h> #include <stdlib.h> #include <string.h> -@@ -156,6 +158,7 @@ +@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir) return closedir (dir); } @@ -1842,7 +1931,7 @@ Index: git/locale/programs/charmap-dir.c /* Creates a subprocess decompressing the given pathname, and returns a stream reading its output (the decompressed data). */ static -@@ -204,6 +207,7 @@ +@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname } return NULL; } @@ -1850,7 +1939,7 @@ Index: git/locale/programs/charmap-dir.c /* Opens a charmap for reading, given its name (not an alias name). */ FILE * -@@ -226,6 +230,7 @@ +@@ -226,6 +230,7 @@ charmap_open (const char *directory, con if (stream != NULL) return stream; @@ -1858,7 +1947,7 @@ Index: git/locale/programs/charmap-dir.c memcpy (p, ".gz", 4); stream = fopen_uncompressed (pathname, "gzip"); if (stream != NULL) -@@ -235,6 +240,7 @@ +@@ -235,6 +240,7 @@ charmap_open (const char *directory, con stream = fopen_uncompressed (pathname, "bzip2"); if (stream != NULL) return stream; @@ -1866,22 +1955,11 @@ Index: git/locale/programs/charmap-dir.c return NULL; } -@@ -263,8 +269,8 @@ - char *alias = NULL; - char junk[BUFSIZ]; - -- if (fscanf (stream, " <code_set_name> %ms", &alias) == 1 -- || fscanf (stream, "%% alias %ms", &alias) == 1) -+ if (fscanf (stream, " <code_set_name> %as", &alias) == 1 -+ || fscanf (stream, "%% alias %as", &alias) == 1) - { - aliases = (char **) xrealloc (aliases, - (naliases + 2) * sizeof (char *)); Index: git/locale/programs/ld-collate.c =================================================================== ---- git.orig/locale/programs/ld-collate.c 2014-08-29 20:00:47.408070587 -0700 -+++ git/locale/programs/ld-collate.c 2014-08-29 20:01:15.208070587 -0700 -@@ -350,7 +350,7 @@ +--- git.orig/locale/programs/ld-collate.c ++++ git/locale/programs/ld-collate.c +@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *co } if (wcs != NULL) { @@ -1890,7 +1968,7 @@ Index: git/locale/programs/ld-collate.c uint32_t zero = 0; /* Handle <U0000> as a single character. */ if (nwcs == 0) -@@ -1776,8 +1776,7 @@ +@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), if ((*eptr)->nwcs == runp->nwcs) { @@ -1900,7 +1978,7 @@ Index: git/locale/programs/ld-collate.c if (c == 0) { -@@ -2010,9 +2009,9 @@ +@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct elem one consecutive entry. */ if (runp->wcnext != NULL && runp->nwcs == runp->wcnext->nwcs @@ -1913,7 +1991,7 @@ Index: git/locale/programs/ld-collate.c && (runp->wcs[runp->nwcs - 1] == runp->wcnext->wcs[runp->nwcs - 1] + 1)) { -@@ -2036,9 +2035,9 @@ +@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct elem runp = runp->wcnext; while (runp->wcnext != NULL && runp->nwcs == runp->wcnext->nwcs @@ -1928,9 +2006,9 @@ Index: git/locale/programs/ld-collate.c Index: git/locale/programs/ld-ctype.c =================================================================== ---- git.orig/locale/programs/ld-ctype.c 2014-08-29 20:00:47.408070587 -0700 -+++ git/locale/programs/ld-ctype.c 2014-08-29 20:01:15.208070587 -0700 -@@ -957,7 +957,7 @@ +--- git.orig/locale/programs/ld-ctype.c ++++ git/locale/programs/ld-ctype.c +@@ -960,7 +960,7 @@ ctype_output (struct localedef_t *locale allocate_arrays (ctype, charmap, ctype->repertoire); default_missing_len = (ctype->default_missing @@ -1939,7 +2017,7 @@ Index: git/locale/programs/ld-ctype.c : 0); init_locale_data (&file, nelems); -@@ -1968,7 +1968,7 @@ +@@ -1971,7 +1971,7 @@ read_translit_entry (struct linereader * ignore = 1; else /* This value is usable. */ @@ -1948,7 +2026,7 @@ Index: git/locale/programs/ld-ctype.c first = 0; } -@@ -2516,8 +2516,8 @@ +@@ -2519,8 +2519,8 @@ with character code range values one mus } handle_tok_digit: @@ -1959,7 +2037,7 @@ Index: git/locale/programs/ld-ctype.c handle_digits = 1; goto read_charclass; -@@ -4001,8 +4001,7 @@ +@@ -4002,8 +4002,7 @@ allocate_arrays (struct locale_ctype_t * while (idx < number) { @@ -1969,8 +2047,8 @@ Index: git/locale/programs/ld-ctype.c if (res == 0) { replace = 1; -@@ -4039,11 +4038,11 @@ - for (cnt = 0; cnt < number; ++cnt) +@@ -4040,11 +4039,11 @@ allocate_arrays (struct locale_ctype_t * + for (size_t cnt = 0; cnt < number; ++cnt) { struct translit_to_t *srunp; - from_len += wcslen ((const wchar_t *) sorted[cnt]->from) + 1; @@ -1983,7 +2061,7 @@ Index: git/locale/programs/ld-ctype.c srunp = srunp->next; } /* Plus one for the extra NUL character marking the end of -@@ -4067,18 +4066,18 @@ +@@ -4068,18 +4067,18 @@ allocate_arrays (struct locale_ctype_t * ctype->translit_from_idx[cnt] = from_len; ctype->translit_to_idx[cnt] = to_len; @@ -2010,8 +2088,8 @@ Index: git/locale/programs/ld-ctype.c } Index: git/locale/programs/ld-messages.c =================================================================== ---- git.orig/locale/programs/ld-messages.c 2014-08-29 20:00:47.412070587 -0700 -+++ git/locale/programs/ld-messages.c 2014-08-29 20:01:15.208070587 -0700 +--- git.orig/locale/programs/ld-messages.c ++++ git/locale/programs/ld-messages.c @@ -25,6 +25,7 @@ #include <string.h> #include <stdint.h> @@ -2020,7 +2098,7 @@ Index: git/locale/programs/ld-messages.c #include <assert.h> -@@ -124,6 +125,7 @@ +@@ -124,6 +125,7 @@ No definition for %s category found"), " } else { @@ -2028,7 +2106,7 @@ Index: git/locale/programs/ld-messages.c int result; regex_t re; -@@ -140,6 +142,7 @@ +@@ -140,6 +142,7 @@ No definition for %s category found"), " } else if (result != 0) regfree (&re); @@ -2036,7 +2114,7 @@ Index: git/locale/programs/ld-messages.c } if (messages->noexpr == NULL) -@@ -158,6 +161,7 @@ +@@ -158,6 +161,7 @@ No definition for %s category found"), " } else { @@ -2044,7 +2122,7 @@ Index: git/locale/programs/ld-messages.c int result; regex_t re; -@@ -174,6 +178,7 @@ +@@ -174,6 +178,7 @@ No definition for %s category found"), " } else if (result != 0) regfree (&re); @@ -2054,9 +2132,9 @@ Index: git/locale/programs/ld-messages.c Index: git/locale/programs/ld-time.c =================================================================== ---- git.orig/locale/programs/ld-time.c 2014-08-29 20:00:47.412070587 -0700 -+++ git/locale/programs/ld-time.c 2014-08-29 20:01:15.208070587 -0700 -@@ -215,8 +215,10 @@ +--- git.orig/locale/programs/ld-time.c ++++ git/locale/programs/ld-time.c +@@ -215,8 +215,10 @@ No definition for %s category found"), " } else { @@ -2068,7 +2146,7 @@ Index: git/locale/programs/ld-time.c } } -@@ -226,7 +228,7 @@ +@@ -226,7 +228,7 @@ No definition for %s category found"), " const int days_per_month[12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31 ,30, 31 }; size_t idx; @@ -2077,7 +2155,7 @@ Index: git/locale/programs/ld-time.c time->era_entries = (struct era_data *) xmalloc (time->num_era -@@ -464,18 +466,18 @@ +@@ -464,18 +466,18 @@ No definition for %s category found"), " } /* Now generate the wide character name and format. */ @@ -2103,7 +2181,7 @@ Index: git/locale/programs/ld-time.c } else time->era_entries[idx].wname = -@@ -530,7 +532,16 @@ +@@ -530,7 +532,16 @@ No definition for %s category found"), " if (time->date_fmt == NULL) time->date_fmt = "%a %b %e %H:%M:%S %Z %Y"; if (time->wdate_fmt == NULL) @@ -2123,9 +2201,9 @@ Index: git/locale/programs/ld-time.c Index: git/locale/programs/linereader.c =================================================================== ---- git.orig/locale/programs/linereader.c 2014-08-29 20:00:47.412070587 -0700 -+++ git/locale/programs/linereader.c 2014-08-29 20:01:15.208070587 -0700 -@@ -595,7 +595,7 @@ +--- git.orig/locale/programs/linereader.c ++++ git/locale/programs/linereader.c +@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const { int return_widestr = lr->return_widestr; char *buf; @@ -2136,9 +2214,9 @@ Index: git/locale/programs/linereader.c Index: git/locale/programs/localedef.c =================================================================== ---- git.orig/locale/programs/localedef.c 2014-08-29 20:00:47.416070587 -0700 -+++ git/locale/programs/localedef.c 2014-08-29 20:01:15.208070587 -0700 -@@ -114,6 +114,7 @@ +--- git.orig/locale/programs/localedef.c ++++ git/locale/programs/localedef.c +@@ -114,6 +114,7 @@ void (*argp_program_version_hook) (FILE #define OPT_LIST_ARCHIVE 309 #define OPT_LITTLE_ENDIAN 400 #define OPT_BIG_ENDIAN 401 @@ -2146,7 +2224,7 @@ Index: git/locale/programs/localedef.c /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = -@@ -150,6 +151,8 @@ +@@ -150,6 +151,8 @@ static const struct argp_option options[ N_("Generate little-endian output") }, { "big-endian", OPT_BIG_ENDIAN, NULL, 0, N_("Generate big-endian output") }, @@ -2155,7 +2233,7 @@ Index: git/locale/programs/localedef.c { NULL, 0, NULL, 0, NULL } }; -@@ -239,12 +242,14 @@ +@@ -239,12 +242,14 @@ main (int argc, char *argv[]) ctype locale. (P1003.2 4.35.5.2) */ setlocale (LC_CTYPE, "POSIX"); @@ -2170,7 +2248,7 @@ Index: git/locale/programs/localedef.c /* Process charmap file. */ charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1); -@@ -338,6 +343,9 @@ +@@ -338,6 +343,9 @@ parse_opt (int key, char *arg, struct ar case OPT_BIG_ENDIAN: set_big_endian (true); break; @@ -2182,9 +2260,9 @@ Index: git/locale/programs/localedef.c break; Index: git/locale/programs/locfile.c =================================================================== ---- git.orig/locale/programs/locfile.c 2014-08-29 20:00:47.432070587 -0700 -+++ git/locale/programs/locfile.c 2014-08-29 20:01:15.208070587 -0700 -@@ -544,6 +544,9 @@ +--- git.orig/locale/programs/locfile.c ++++ git/locale/programs/locfile.c +@@ -544,6 +544,9 @@ compare_files (const char *filename1, co machine running localedef. */ bool swap_endianness_p; @@ -2194,7 +2272,7 @@ Index: git/locale/programs/locfile.c /* When called outside a start_locale_structure/end_locale_structure or start_locale_prelude/end_locale_prelude block, record that the next byte in FILE's obstack will be the first byte of a new element. -@@ -621,7 +624,7 @@ +@@ -621,7 +624,7 @@ add_locale_string (struct locale_file *f void add_locale_wstring (struct locale_file *file, const uint32_t *string) { @@ -2205,9 +2283,9 @@ Index: git/locale/programs/locfile.c /* Record that FILE's next element is the 32-bit integer VALUE. */ Index: git/locale/programs/locfile.h =================================================================== ---- git.orig/locale/programs/locfile.h 2014-08-29 20:00:47.432070587 -0700 -+++ git/locale/programs/locfile.h 2014-08-29 20:01:15.208070587 -0700 -@@ -71,6 +71,8 @@ +--- git.orig/locale/programs/locfile.h ++++ git/locale/programs/locfile.h +@@ -71,6 +71,8 @@ extern void write_all_categories (struct extern bool swap_endianness_p; @@ -2216,11 +2294,37 @@ Index: git/locale/programs/locfile.h /* Change the output to be big-endian if BIG_ENDIAN is true and little-endian otherwise. */ static inline void -@@ -275,4 +277,49 @@ +@@ -89,7 +91,8 @@ maybe_swap_uint32 (uint32_t value) + } + + /* Likewise, but munge an array of N uint32_ts starting at ARRAY. */ +-static inline void ++static void ++__attribute__ ((unused)) + maybe_swap_uint32_array (uint32_t *array, size_t n) + { + if (swap_endianness_p) +@@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array + + /* Like maybe_swap_uint32_array, but the array of N elements is at + the end of OBSTACK's current object. */ +-static inline void ++static void ++__attribute__ ((unused)) + maybe_swap_uint32_obstack (struct obstack *obstack, size_t n) + { + maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n); +@@ -276,4 +280,55 @@ extern void identification_output (struc const struct charmap_t *charmap, const char *output_path); -+static inline size_t ++static size_t wcslen_uint32 (const uint32_t *str) __attribute__ ((unused)); ++static uint32_t * wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused)); ++static uint32_t * wcschr_uint32 (const uint32_t *s, uint32_t ch) __attribute__ ((unused)); ++static int wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) __attribute__ ((unused)); ++static int wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused)); ++ ++static size_t +wcslen_uint32 (const uint32_t *str) +{ + size_t len = 0; @@ -2229,7 +2333,7 @@ Index: git/locale/programs/locfile.h + return len; +} + -+static inline int ++static int +wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) +{ + while (n-- != 0) @@ -2241,7 +2345,7 @@ Index: git/locale/programs/locfile.h + return 0; +} + -+static inline int ++static int +wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) +{ + while (*s1 != 0 && *s1 == *s2) @@ -2249,13 +2353,13 @@ Index: git/locale/programs/locfile.h + return *s1 - *s2; +} + -+static inline uint32_t * ++static uint32_t * +wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) +{ + return memcpy (s1, s2, n * sizeof (uint32_t)); +} + -+static inline uint32_t * ++static uint32_t * +wcschr_uint32 (const uint32_t *s, uint32_t ch) +{ + do @@ -2268,9 +2372,9 @@ Index: git/locale/programs/locfile.h #endif /* locfile.h */ Index: git/locale/setlocale.c =================================================================== ---- git.orig/locale/setlocale.c 2014-08-29 20:00:47.432070587 -0700 -+++ git/locale/setlocale.c 2014-08-29 20:01:15.208070587 -0700 -@@ -64,36 +64,6 @@ +--- git.orig/locale/setlocale.c ++++ git/locale/setlocale.c +@@ -64,36 +64,6 @@ static char *const _nl_current_used[] = #endif @@ -2309,8 +2413,8 @@ Index: git/locale/setlocale.c #else Index: git/locale/xlocale.c =================================================================== ---- git.orig/locale/xlocale.c 2014-08-29 20:00:47.436070587 -0700 -+++ git/locale/xlocale.c 2014-08-29 20:01:15.208070587 -0700 +--- git.orig/locale/xlocale.c ++++ git/locale/xlocale.c @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ @@ -2319,7 +2423,7 @@ Index: git/locale/xlocale.c #include "localeinfo.h" #define DEFINE_CATEGORY(category, category_name, items, a) \ -@@ -25,6 +26,19 @@ +@@ -25,6 +26,19 @@ extern struct __locale_data _nl_C_##cate #include "categories.def" #undef DEFINE_CATEGORY @@ -2339,7 +2443,7 @@ Index: git/locale/xlocale.c /* Defined in locale/C-ctype.c. */ extern const char _nl_C_LC_CTYPE_class[] attribute_hidden; extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden; -@@ -52,3 +66,26 @@ +@@ -52,3 +66,26 @@ const struct __locale_struct _nl_C_locob .__ctype_tolower = (const int *) _nl_C_LC_CTYPE_tolower + 128, .__ctype_toupper = (const int *) _nl_C_LC_CTYPE_toupper + 128 }; @@ -2368,9 +2472,9 @@ Index: git/locale/xlocale.c +#endif /* __OPTION_EGLIBC_LOCALE_CODE */ Index: git/localedata/Makefile =================================================================== ---- git.orig/localedata/Makefile 2014-08-29 20:00:47.444070587 -0700 -+++ git/localedata/Makefile 2014-08-29 20:01:15.212070587 -0700 -@@ -21,12 +21,22 @@ +--- git.orig/localedata/Makefile ++++ git/localedata/Makefile +@@ -21,12 +21,22 @@ subdir := localedata include ../Makeconfig @@ -2396,7 +2500,7 @@ Index: git/localedata/Makefile subdir-dirs = tests-mbwc vpath %.c tests-mbwc -@@ -71,14 +81,20 @@ +@@ -71,14 +81,20 @@ locale_test_suite := tst_iswalnum tst_is tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \ tst_wctype tst_wcwidth @@ -2419,39 +2523,23 @@ Index: git/localedata/Makefile ifneq (no,$(PERL)) tests-special += $(objpfx)mtrace-tst-leaks.out endif -@@ -92,12 +108,14 @@ - - tests: $(objdir)/iconvdata/gconv-modules +@@ -95,6 +111,7 @@ tests: $(objdir)/iconvdata/gconv-modules + tests-static += tst-langinfo-static + ifeq ($(run-built-tests),yes) +ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE)) tests-special += $(objpfx)sort-test.out $(objpfx)tst-fmon.out \ $(objpfx)tst-locale.out $(objpfx)tst-rpmatch.out \ $(objpfx)tst-trans.out $(objpfx)tst-ctype.out \ - $(objpfx)tst-langinfo.out $(objpfx)tst-langinfo-static.out \ - $(objpfx)tst-numeric.out - tests-static += tst-langinfo-static +@@ -113,6 +130,7 @@ CHARMAPS := $(shell echo "$(LOCALES)" | + CTYPE_FILES = $(addsuffix /LC_CTYPE,$(LOCALES)) + tests-special += $(addprefix $(objpfx),$(CTYPE_FILES)) + endif +endif - ifeq ($(run-built-tests),yes) - # We have to generate locales -@@ -143,9 +161,13 @@ - $(addprefix $(objpfx),$(CTYPE_FILES)): %: \ - gen-locale.sh $(common-objpfx)locale/localedef Makefile \ - $(addprefix charmaps/,$(CHARMAPS)) $(addprefix locales/,$(LOCALE_SRCS)) -- @$(SHELL) gen-locale.sh $(common-objpfx) \ -- '$(built-program-cmd-before-env)' '$(run-program-env)' \ -- '$(built-program-cmd-after-env)' $@; \ -+ @$(SHELL) gen-locale.sh $(common-objpfx) \ -+ '$(if $(cross-localedef), \ -+ $(cross-localedef), \ -+ $(built-program-cmd-before-env) \ -+ $(run-program-env) \ -+ $(built-program-cmd-after-env))' \ -+ $@; \ - $(evaluate-test) + include ../Rules - $(addsuffix .out,$(addprefix $(objpfx),$(tests))): %: \ -@@ -213,6 +235,11 @@ +@@ -205,6 +223,11 @@ endif include SUPPORTED @@ -2465,8 +2553,8 @@ Index: git/localedata/Makefile # Sometimes the whole collection of locale files should be installed. Index: git/login/Makefile =================================================================== ---- git.orig/login/Makefile 2014-08-29 20:00:47.736070587 -0700 -+++ git/login/Makefile 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/login/Makefile ++++ git/login/Makefile @@ -18,6 +18,7 @@ # # Sub-makefile for login portion of the library. @@ -2475,7 +2563,7 @@ Index: git/login/Makefile subdir := login -@@ -25,14 +26,16 @@ +@@ -25,14 +26,16 @@ include ../Makeconfig headers := utmp.h bits/utmp.h lastlog.h pty.h @@ -2497,7 +2585,7 @@ Index: git/login/Makefile ifeq (yes,$(build-pt-chown)) others += pt_chown -@@ -46,8 +49,8 @@ +@@ -46,8 +49,8 @@ vpath %.c programs tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname # Build the -lutil library with these extra functions. @@ -2510,9 +2598,9 @@ Index: git/login/Makefile Index: git/Makeconfig =================================================================== ---- git.orig/Makeconfig 2014-08-29 20:00:42.956070587 -0700 -+++ git/Makeconfig 2014-08-29 20:01:15.212070587 -0700 -@@ -582,7 +582,7 @@ +--- git.orig/Makeconfig ++++ git/Makeconfig +@@ -582,7 +582,7 @@ elf-objpfx = $(common-objpfx)elf/ # and run on the build system, causes that program with those # arguments to be run on the host for which the library is built. ifndef test-wrapper @@ -2521,7 +2609,7 @@ Index: git/Makeconfig endif # Likewise, but the name of the program is preceded by # <variable>=<value> assignments for environment variables. -@@ -1057,6 +1057,24 @@ +@@ -1055,6 +1055,24 @@ else libm = $(common-objpfx)math/libm.a endif @@ -2548,9 +2636,9 @@ Index: git/Makeconfig # dependencies. Index: git/Makerules =================================================================== ---- git.orig/Makerules 2014-08-29 20:00:42.960070587 -0700 -+++ git/Makerules 2014-08-29 20:01:15.212070587 -0700 -@@ -379,6 +379,25 @@ +--- git.orig/Makerules ++++ git/Makerules +@@ -446,6 +446,25 @@ define sed-remove-objpfx endef endif @@ -2578,8 +2666,8 @@ Index: git/Makerules ifeq (yes,$(build-shared)) Index: git/malloc/Makefile =================================================================== ---- git.orig/malloc/Makefile 2014-08-29 20:00:47.760070587 -0700 -+++ git/malloc/Makefile 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/malloc/Makefile ++++ git/malloc/Makefile @@ -18,6 +18,8 @@ # # Makefile for malloc routines @@ -2589,7 +2677,7 @@ Index: git/malloc/Makefile subdir := malloc include ../Makeconfig -@@ -36,9 +38,15 @@ +@@ -36,9 +38,15 @@ install-lib := libmcheck.a non-lib.a := libmcheck.a # Additional library. @@ -2605,7 +2693,7 @@ Index: git/malloc/Makefile libmemusage-routines = memusage libmemusage-inhibit-o = $(filter-out .os,$(object-suffixes)) -@@ -67,7 +75,7 @@ +@@ -65,7 +73,7 @@ endif # Unless we get a test for the availability of libgd which also works # for cross-compiling we disable the memusagestat generation in this # situation. @@ -2616,8 +2704,8 @@ Index: git/malloc/Makefile others: $(objpfx)memusage Index: git/malloc/memusage.c =================================================================== ---- git.orig/malloc/memusage.c 2014-08-29 20:00:47.768070587 -0700 -+++ git/malloc/memusage.c 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/malloc/memusage.c ++++ git/malloc/memusage.c @@ -33,6 +33,7 @@ #include <stdint.h> #include <sys/mman.h> @@ -2626,7 +2714,7 @@ Index: git/malloc/memusage.c #include <memusage.h> -@@ -93,7 +94,11 @@ +@@ -93,7 +94,11 @@ static __thread uintptr_t start_sp; #define peak_stack peak_use[1] #define peak_total peak_use[2] @@ -2641,9 +2729,9 @@ Index: git/malloc/memusage.c static int fd = -1; Index: git/malloc/memusage.sh =================================================================== ---- git.orig/malloc/memusage.sh 2014-08-29 20:00:47.768070587 -0700 -+++ git/malloc/memusage.sh 2014-08-29 20:01:15.212070587 -0700 -@@ -35,7 +35,7 @@ +--- git.orig/malloc/memusage.sh ++++ git/malloc/memusage.sh +@@ -35,7 +35,7 @@ do_missing_arg() { # Print help message do_help() { @@ -2654,9 +2742,9 @@ Index: git/malloc/memusage.sh -n,--progname=NAME Name of the program file to profile Index: git/math/Makefile =================================================================== ---- git.orig/math/Makefile 2014-08-29 20:00:47.836070587 -0700 -+++ git/math/Makefile 2014-08-29 20:01:15.212070587 -0700 -@@ -21,6 +21,8 @@ +--- git.orig/math/Makefile ++++ git/math/Makefile +@@ -21,6 +21,8 @@ subdir := math include ../Makeconfig @@ -2665,7 +2753,7 @@ Index: git/math/Makefile # Installed header files. headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \ bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \ -@@ -33,8 +35,8 @@ +@@ -33,8 +35,8 @@ aux := setfpucw fpu_control # Build the -lm library. @@ -2674,12 +2762,12 @@ Index: git/math/Makefile +extra-libs-$(OPTION_EGLIBC_LIBM) := libm +extra-libs-others-$(OPTION_EGLIBC_LIBM) = $(extra-libs-$(OPTION_EGLIBC_LIBM)) - libm-support = k_standard s_lib_version s_matherr s_signgam \ + libm-support = s_lib_version s_matherr s_signgam \ fclrexcpt fgetexcptflg fraiseexcpt fsetexcptflg \ Index: git/misc/err.c =================================================================== ---- git.orig/misc/err.c 2014-08-29 20:00:48.232070587 -0700 -+++ git/misc/err.c 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/misc/err.c ++++ git/misc/err.c @@ -22,6 +22,7 @@ #include <errno.h> #include <string.h> @@ -2688,7 +2776,7 @@ Index: git/misc/err.c #include <wchar.h> #define flockfile(s) _IO_flockfile (s) -@@ -37,6 +38,7 @@ +@@ -37,6 +38,7 @@ extern char *__progname; va_end (ap); \ } @@ -2696,7 +2784,7 @@ Index: git/misc/err.c static void convert_and_print (const char *format, __gnuc_va_list ap) { -@@ -81,6 +83,7 @@ +@@ -81,6 +83,7 @@ convert_and_print (const char *format, _ __vfwprintf (stderr, wformat, ap); } @@ -2704,7 +2792,7 @@ Index: git/misc/err.c void vwarnx (const char *format, __gnuc_va_list ap) -@@ -88,9 +91,13 @@ +@@ -88,9 +91,13 @@ vwarnx (const char *format, __gnuc_va_li flockfile (stderr); if (_IO_fwide (stderr, 0) > 0) { @@ -2718,7 +2806,7 @@ Index: git/misc/err.c } else { -@@ -111,6 +118,7 @@ +@@ -111,6 +118,7 @@ vwarn (const char *format, __gnuc_va_lis flockfile (stderr); if (_IO_fwide (stderr, 0) > 0) { @@ -2726,7 +2814,7 @@ Index: git/misc/err.c __fwprintf (stderr, L"%s: ", __progname); if (format) { -@@ -119,6 +127,9 @@ +@@ -119,6 +127,9 @@ vwarn (const char *format, __gnuc_va_lis } __set_errno (error); __fwprintf (stderr, L"%m\n"); @@ -2738,8 +2826,8 @@ Index: git/misc/err.c { Index: git/misc/error.c =================================================================== ---- git.orig/misc/error.c 2014-08-29 20:00:48.232070587 -0700 -+++ git/misc/error.c 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/misc/error.c ++++ git/misc/error.c @@ -35,6 +35,7 @@ #endif @@ -2748,7 +2836,7 @@ Index: git/misc/error.c # include <libintl.h> # include <stdbool.h> # include <stdint.h> -@@ -205,6 +206,7 @@ +@@ -205,6 +206,7 @@ error_tail (int status, int errnum, cons #if _LIBC if (_IO_fwide (stderr, 0) > 0) { @@ -2756,7 +2844,7 @@ Index: git/misc/error.c size_t len = strlen (message) + 1; wchar_t *wmessage = NULL; mbstate_t st; -@@ -265,6 +267,9 @@ +@@ -265,6 +267,9 @@ error_tail (int status, int errnum, cons if (use_malloc) free (wmessage); @@ -2768,8 +2856,8 @@ Index: git/misc/error.c #endif Index: git/misc/Makefile =================================================================== ---- git.orig/misc/Makefile 2014-08-29 20:00:48.232070587 -0700 -+++ git/misc/Makefile 2014-08-29 20:01:15.212070587 -0700 +--- git.orig/misc/Makefile ++++ git/misc/Makefile @@ -19,6 +19,10 @@ # Sub-makefile for misc portion of the library. # @@ -2781,7 +2869,7 @@ Index: git/misc/Makefile subdir := misc include ../Makeconfig -@@ -46,40 +50,47 @@ +@@ -46,40 +50,47 @@ routines := brk sbrk sstk ioctl \ select pselect \ acct chroot fsync sync fdatasync syncfs reboot \ gethostid sethostid \ @@ -2836,31 +2924,11 @@ Index: git/misc/Makefile CFLAGS-select.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-tsearch.c = $(uses-callbacks) -Index: git/misc/sys/xattr.h -=================================================================== ---- git.orig/misc/sys/xattr.h 2014-08-29 20:00:52.644070587 -0700 -+++ git/misc/sys/xattr.h 2014-08-29 20:01:15.216070587 -0700 -@@ -26,7 +26,6 @@ - - /* The following constants should be used for the fifth parameter of - `*setxattr'. */ --#ifndef __USE_KERNEL_XATTR_DEFS - enum - { - XATTR_CREATE = 1, /* set value, fail if attr already exists. */ -@@ -34,7 +33,6 @@ - XATTR_REPLACE = 2 /* set value, fail if attr does not exist. */ - #define XATTR_REPLACE XATTR_REPLACE - }; --#endif - - /* Set the attribute NAME of the file pointed to by PATH to VALUE (which - is SIZE bytes long). Return 0 on success, -1 for errors. */ Index: git/misc/tst-efgcvt.c =================================================================== ---- git.orig/misc/tst-efgcvt.c 2014-08-29 20:00:52.652070587 -0700 -+++ git/misc/tst-efgcvt.c 2014-08-29 20:01:15.216070587 -0700 -@@ -59,7 +59,7 @@ +--- git.orig/misc/tst-efgcvt.c ++++ git/misc/tst-efgcvt.c +@@ -59,7 +59,7 @@ static testcase ecvt_tests[] = { 123.01, -4, 3, "" }, { 126.71, -4, 3, "" }, { 0.0, 4, 1, "0000" }, @@ -2871,8 +2939,8 @@ Index: git/misc/tst-efgcvt.c #endif Index: git/nis/Makefile =================================================================== ---- git.orig/nis/Makefile 2014-08-29 20:00:52.660070587 -0700 -+++ git/nis/Makefile 2014-08-29 20:01:15.216070587 -0700 +--- git.orig/nis/Makefile ++++ git/nis/Makefile @@ -18,6 +18,8 @@ # # Makefile for NIS/NIS+ part. @@ -2882,7 +2950,7 @@ Index: git/nis/Makefile subdir := nis include ../Makeconfig -@@ -30,19 +32,26 @@ +@@ -30,19 +32,26 @@ endif # These are the databases available for the nis (and perhaps later nisplus) # service. This must be a superset of the services in nss. @@ -2915,7 +2983,7 @@ Index: git/nis/Makefile vpath %.c $(subdir-dirs) libnsl-routines = yp_xdr ypclnt ypupdate_xdr \ -@@ -60,11 +69,11 @@ +@@ -60,11 +69,11 @@ libnsl-routines = yp_xdr ypclnt ypupdate libnss_compat-routines := $(addprefix compat-,grp pwd spwd initgroups) libnss_compat-inhibit-o = $(filter-out .os,$(object-suffixes)) @@ -2929,7 +2997,7 @@ Index: git/nis/Makefile nss-nisplus nisplus-initgroups libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes)) -@@ -80,12 +89,12 @@ +@@ -80,12 +89,12 @@ libnsl-libc = $(common-objpfx)linkobj/li # Target-specific variable setting to link objects using deprecated # RPC interfaces with the version of libc.so that makes them available # for new links: @@ -2947,8 +3015,8 @@ Index: git/nis/Makefile endif Index: git/nptl/Makefile =================================================================== ---- git.orig/nptl/Makefile 2014-08-29 20:00:52.704070587 -0700 -+++ git/nptl/Makefile 2014-08-29 20:01:15.216070587 -0700 +--- git.orig/nptl/Makefile ++++ git/nptl/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for NPTL portion of the library. @@ -2958,7 +3026,7 @@ Index: git/nptl/Makefile subdir := nptl include ../Makeconfig -@@ -116,7 +118,7 @@ +@@ -117,7 +119,7 @@ libpthread-routines = nptl-init vars eve pt-raise pt-system \ flockfile ftrylockfile funlockfile \ sigaction \ @@ -2967,7 +3035,7 @@ Index: git/nptl/Makefile pthread_kill_other_threads \ pthread_getaffinity pthread_setaffinity \ pthread_attr_getaffinity pthread_attr_setaffinity \ -@@ -136,6 +138,8 @@ +@@ -137,6 +139,8 @@ libpthread-routines = nptl-init vars eve # pthread_setgid pthread_setegid pthread_setregid \ # pthread_setresgid @@ -2976,7 +3044,7 @@ Index: git/nptl/Makefile libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind libpthread-static-only-routines = pthread_atfork -@@ -210,7 +214,7 @@ +@@ -211,7 +215,7 @@ tests = tst-typesizes \ tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \ tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \ tst-mutexpi9 \ @@ -2985,7 +3053,7 @@ Index: git/nptl/Makefile tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \ tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \ tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \ -@@ -244,14 +248,14 @@ +@@ -245,14 +249,14 @@ tests = tst-typesizes \ tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \ tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \ tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \ @@ -3001,8 +3069,8 @@ Index: git/nptl/Makefile + tst-exec2 tst-exec3 tst-exec4 \ tst-exit1 tst-exit2 tst-exit3 \ tst-stdio1 tst-stdio2 \ - tst-stack1 tst-stack2 tst-stack3 tst-pthread-getattr \ -@@ -259,13 +263,12 @@ + tst-stack1 tst-stack2 tst-stack3 tst-stack4 tst-pthread-getattr \ +@@ -260,13 +264,12 @@ tests = tst-typesizes \ tst-unload \ tst-dlsym1 \ tst-sysconf \ @@ -3017,7 +3085,7 @@ Index: git/nptl/Makefile tst-abstime \ tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \ tst-getpid1 tst-getpid2 tst-getpid3 \ -@@ -275,6 +278,17 @@ +@@ -277,6 +280,17 @@ xtests = tst-setuid1 tst-setuid1-static tst-mutexpp1 tst-mutexpp6 tst-mutexpp10 test-srcs = tst-oddstacklimit @@ -3037,17 +3105,17 @@ Index: git/nptl/Makefile Index: git/nptl/pthread_create.c =================================================================== ---- git.orig/nptl/pthread_create.c 2014-08-29 20:00:52.764070587 -0700 -+++ git/nptl/pthread_create.c 2014-08-29 20:01:15.216070587 -0700 -@@ -31,6 +31,7 @@ - #include <kernel-features.h> +--- git.orig/nptl/pthread_create.c ++++ git/nptl/pthread_create.c +@@ -32,6 +32,7 @@ #include <exit-thread.h> + #include <default-sched.h> +#include <gnu/option-groups.h> #include <shlib-compat.h> #include <stap-probe.h> -@@ -240,8 +241,10 @@ +@@ -261,8 +262,10 @@ START_THREAD_DEFN THREAD_SETMEM (pd, cpuclock_offset, now); #endif @@ -3058,7 +3126,7 @@ Index: git/nptl/pthread_create.c /* Initialize pointers to locale data. */ __ctype_init (); -@@ -322,8 +325,10 @@ +@@ -345,8 +348,10 @@ START_THREAD_DEFN /* Run the destructor for the thread-local data. */ __nptl_deallocate_tsd (); @@ -3071,8 +3139,8 @@ Index: git/nptl/pthread_create.c do not notify the debugger, it might just irritate it if there Index: git/nscd/Makefile =================================================================== ---- git.orig/nscd/Makefile 2014-08-29 20:00:52.948070587 -0700 -+++ git/nscd/Makefile 2014-08-29 20:01:15.216070587 -0700 +--- git.orig/nscd/Makefile ++++ git/nscd/Makefile @@ -18,14 +18,17 @@ # # Sub-makefile for nscd portion of the library. @@ -3093,7 +3161,7 @@ Index: git/nscd/Makefile endif # To find xmalloc.c -@@ -37,14 +40,18 @@ +@@ -37,14 +40,18 @@ nscd-modules := nscd connections pwdcach dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \ xmalloc xstrdup aicache initgrcache gai res_hconf \ netgroupcache @@ -3117,7 +3185,7 @@ Index: git/nscd/Makefile endif -@@ -101,7 +108,15 @@ +@@ -100,7 +107,15 @@ include $(patsubst %,$(..)cppflags-itera $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o) ifeq ($(build-shared),yes) @@ -3137,16 +3205,16 @@ Index: git/nscd/Makefile endif Index: git/nscd/nis_hash.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/nscd/nis_hash.c 2014-08-29 20:01:15.216070587 -0700 +--- /dev/null ++++ git/nscd/nis_hash.c @@ -0,0 +1,3 @@ +/* If OPTION_EGLIBC_NIS is disabled, nscd can't get this from libnsl.so; + we need our own copy. */ +#include "../nis/nis_hash.c" Index: git/nss/fixed-nsswitch.conf =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/nss/fixed-nsswitch.conf 2014-08-29 20:01:15.216070587 -0700 +--- /dev/null ++++ git/nss/fixed-nsswitch.conf @@ -0,0 +1,22 @@ +# /etc/nsswitch.conf +# @@ -3172,8 +3240,8 @@ Index: git/nss/fixed-nsswitch.conf +netgroup: files Index: git/nss/fixed-nsswitch.functions =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/nss/fixed-nsswitch.functions 2014-08-29 20:01:15.216070587 -0700 +--- /dev/null ++++ git/nss/fixed-nsswitch.functions @@ -0,0 +1,121 @@ +/* List of functions defined for fixed NSS in GNU C Library. + Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc. @@ -3298,8 +3366,8 @@ Index: git/nss/fixed-nsswitch.functions +DEFINE_GET (shadow, files, spnam) Index: git/nss/gen-fixed-nsswitch.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/nss/gen-fixed-nsswitch.c 2014-08-29 20:01:15.216070587 -0700 +--- /dev/null ++++ git/nss/gen-fixed-nsswitch.c @@ -0,0 +1,803 @@ +/* gen-fixed-nsswitch.c --- generate fixed name service data structures + Copyright (C) 1996-1999, 2001-2006, 2007 Free Software Foundation, Inc. @@ -4106,8 +4174,8 @@ Index: git/nss/gen-fixed-nsswitch.c +} Index: git/nss/getent.c =================================================================== ---- git.orig/nss/getent.c 2014-08-29 20:00:52.976070587 -0700 -+++ git/nss/getent.c 2014-08-29 20:01:15.216070587 -0700 +--- git.orig/nss/getent.c ++++ git/nss/getent.c @@ -39,6 +39,7 @@ #include <netinet/ether.h> #include <netinet/in.h> @@ -4116,7 +4184,7 @@ Index: git/nss/getent.c /* Get libc version number. */ #include <version.h> -@@ -91,6 +92,7 @@ +@@ -91,6 +92,7 @@ warranty; not even for MERCHANTABILITY o fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk"); } @@ -4124,7 +4192,7 @@ Index: git/nss/getent.c /* This is for aliases */ static void print_aliases (struct aliasent *alias) -@@ -135,7 +137,9 @@ +@@ -135,7 +137,9 @@ aliases_keys (int number, char *key[]) return result; } @@ -4134,7 +4202,7 @@ Index: git/nss/getent.c /* This is for ethers */ static int ethers_keys (int number, char *key[]) -@@ -179,6 +183,7 @@ +@@ -179,6 +183,7 @@ ethers_keys (int number, char *key[]) return result; } @@ -4142,7 +4210,7 @@ Index: git/nss/getent.c /* This is for group */ static void -@@ -301,6 +306,7 @@ +@@ -301,6 +306,7 @@ gshadow_keys (int number, char *key[]) return result; } @@ -4150,7 +4218,7 @@ Index: git/nss/getent.c /* This is for hosts */ static void print_hosts (struct hostent *host) -@@ -598,6 +604,7 @@ +@@ -598,6 +604,7 @@ networks_keys (int number, char *key[]) return result; } @@ -4158,7 +4226,7 @@ Index: git/nss/getent.c /* Now is all for passwd */ static void -@@ -650,6 +657,7 @@ +@@ -650,6 +657,7 @@ passwd_keys (int number, char *key[]) return result; } @@ -4166,7 +4234,7 @@ Index: git/nss/getent.c /* This is for protocols */ static void print_protocols (struct protoent *proto) -@@ -805,6 +813,7 @@ +@@ -805,6 +813,7 @@ services_keys (int number, char *key[]) return result; } @@ -4174,7 +4242,7 @@ Index: git/nss/getent.c /* This is for shadow */ static void -@@ -871,21 +880,34 @@ +@@ -871,21 +880,34 @@ struct } databases[] = { #define D(name) { #name, name ## _keys }, @@ -4204,11 +4272,11 @@ Index: git/nss/getent.c D(group) D(gshadow) -D(hosts) -+DN(hosts) -D(initgroups) -+DN(initgroups) -D(netgroup) -D(networks) ++DN(hosts) ++DN(initgroups) +DN(netgroup) +DN(networks) D(passwd) @@ -4223,8 +4291,8 @@ Index: git/nss/getent.c { NULL, NULL } Index: git/nss/getnssent_r.c =================================================================== ---- git.orig/nss/getnssent_r.c 2014-08-29 20:00:52.976070587 -0700 -+++ git/nss/getnssent_r.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/nss/getnssent_r.c ++++ git/nss/getnssent_r.c @@ -16,6 +16,7 @@ <http://www.gnu.org/licenses/>. */ @@ -4233,7 +4301,7 @@ Index: git/nss/getnssent_r.c #include <netdb.h> #include "nsswitch.h" -@@ -59,11 +60,13 @@ +@@ -59,11 +60,13 @@ __nss_setent (const char *func_name, db_ } fct; int no_more; @@ -4247,7 +4315,7 @@ Index: git/nss/getnssent_r.c /* Cycle through the services and run their `setXXent' functions until we find an available service. */ -@@ -101,11 +104,13 @@ +@@ -101,11 +104,13 @@ __nss_endent (const char *func_name, db_ } fct; int no_more; @@ -4261,7 +4329,7 @@ Index: git/nss/getnssent_r.c /* Cycle through all the services and run their endXXent functions. */ no_more = setup (func_name, lookup_fct, &fct.ptr, nip, startp, 1); -@@ -141,12 +146,14 @@ +@@ -141,12 +146,14 @@ __nss_getent_r (const char *getent_func_ int no_more; enum nss_status status; @@ -4276,7 +4344,7 @@ Index: git/nss/getnssent_r.c /* Initialize status to return if no more functions are found. */ status = NSS_STATUS_NOTFOUND; -@@ -161,7 +168,7 @@ +@@ -161,7 +168,7 @@ __nss_getent_r (const char *getent_func_ int is_last_nip = *nip == *last_nip; status = DL_CALL_FCT (fct.f, @@ -4287,8 +4355,8 @@ Index: git/nss/getnssent_r.c provided buffer is too small. In this case we should give Index: git/nss/Makefile =================================================================== ---- git.orig/nss/Makefile 2014-08-29 20:00:52.972070587 -0700 -+++ git/nss/Makefile 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/nss/Makefile ++++ git/nss/Makefile @@ -18,29 +18,36 @@ # # Makefile for name service switch. @@ -4334,7 +4402,7 @@ Index: git/nss/Makefile # Specify rules for the nss_* modules. We have some services. services := files db -@@ -55,7 +62,7 @@ +@@ -55,7 +62,7 @@ subdir-dirs = $(services:%=nss_%) vpath %.c $(subdir-dirs) ../locale/programs ../intl @@ -4343,7 +4411,7 @@ Index: git/nss/Makefile files-initgroups files-have_o_cloexec files-init libnss_db-dbs := $(addprefix db-,\ -@@ -78,6 +85,45 @@ +@@ -78,6 +85,45 @@ tests-static = tst-nss-static tests += $(tests-static) endif @@ -4391,8 +4459,8 @@ Index: git/nss/Makefile ifeq (yes,$(have-selinux)) Index: git/nss/nsswitch.c =================================================================== ---- git.orig/nss/nsswitch.c 2014-08-29 20:00:53.004070587 -0700 -+++ git/nss/nsswitch.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/nss/nsswitch.c ++++ git/nss/nsswitch.c @@ -26,6 +26,7 @@ #include <stdio_ext.h> #include <stdlib.h> @@ -4417,7 +4485,7 @@ Index: git/nss/nsswitch.c /* Prototypes for the local functions. */ static name_database *nss_parse_file (const char *fname) internal_function; static name_database_entry *nss_getline (char *line) internal_function; -@@ -79,6 +89,9 @@ +@@ -79,6 +89,9 @@ bool __nss_database_custom[NSS_DBSIDX_ma __libc_lock_define_initialized (static, lock) @@ -4427,7 +4495,7 @@ Index: git/nss/nsswitch.c #if !defined DO_STATIC_NSS || defined SHARED /* String with revision number of the shared object files. */ static const char *const __nss_shlib_revision = LIBNSS_FILES_SO + 15; -@@ -93,6 +106,20 @@ +@@ -93,6 +106,20 @@ static name_database *service_table; __libc_freeres. */ static name_database_entry *defconfig_entries; @@ -4448,7 +4516,7 @@ Index: git/nss/nsswitch.c #ifdef USE_NSCD /* Nonzero if this is the nscd process. */ -@@ -109,20 +136,22 @@ +@@ -109,20 +136,22 @@ __nss_database_lookup (const char *datab const char *defconfig, service_user **ni) { /* Prevent multiple threads to change the service table. */ @@ -4473,7 +4541,7 @@ Index: git/nss/nsswitch.c /* Test whether configuration data is available. */ if (service_table != NULL) -@@ -144,6 +173,7 @@ +@@ -144,6 +173,7 @@ __nss_database_lookup (const char *datab *ni = entry->service; } @@ -4481,7 +4549,7 @@ Index: git/nss/nsswitch.c /* No configuration data is available, either because nsswitch.conf doesn't exist or because it doesn't have a line for this database. -@@ -166,13 +196,23 @@ +@@ -166,13 +196,23 @@ __nss_database_lookup (const char *datab { entry->next = defconfig_entries; entry->service = *ni; @@ -4507,7 +4575,7 @@ Index: git/nss/nsswitch.c return *ni != NULL ? 0 : -1; } -@@ -252,6 +292,7 @@ +@@ -252,6 +292,7 @@ __nss_next2 (service_user **ni, const ch libc_hidden_def (__nss_next2) @@ -4515,7 +4583,7 @@ Index: git/nss/nsswitch.c int attribute_compat_text_section __nss_next (service_user **ni, const char *fct_name, void **fctp, int status, -@@ -300,13 +341,13 @@ +@@ -300,13 +341,13 @@ __nss_configure_lookup (const char *dbna } /* Prevent multiple threads to change the service table. */ @@ -4531,7 +4599,7 @@ Index: git/nss/nsswitch.c return 0; } -@@ -402,7 +443,7 @@ +@@ -402,7 +443,7 @@ __nss_lookup_function (service_user *ni, void **found, *result; /* We now modify global data. Protect it. */ @@ -4540,7 +4608,7 @@ Index: git/nss/nsswitch.c /* Search the tree of functions previously requested. Data in the tree are `known_function' structures, whose first member is a -@@ -413,7 +454,7 @@ +@@ -413,7 +454,7 @@ __nss_lookup_function (service_user *ni, enough to a pointer to our structure to use as a lookup key that will be passed to `known_compare' (above). */ @@ -4549,7 +4617,7 @@ Index: git/nss/nsswitch.c if (found == NULL) /* This means out-of-memory. */ result = NULL; -@@ -440,7 +481,7 @@ +@@ -440,7 +481,7 @@ __nss_lookup_function (service_user *ni, #endif /* Oops. We can't instantiate this node properly. Remove it from the tree. */ @@ -4558,7 +4626,7 @@ Index: git/nss/nsswitch.c free (known); result = NULL; } -@@ -520,13 +561,43 @@ +@@ -520,13 +561,43 @@ __nss_lookup_function (service_user *ni, } /* Remove the lock. */ @@ -4603,7 +4671,7 @@ Index: git/nss/nsswitch.c static name_database * internal_function nss_parse_file (const char *fname) -@@ -632,8 +703,10 @@ +@@ -632,8 +703,10 @@ nss_parse_service_list (const char *line + (line - name + 1)); if (new_service == NULL) return result; @@ -4615,7 +4683,7 @@ Index: git/nss/nsswitch.c /* Set default actions. */ new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE; -@@ -642,7 +715,7 @@ +@@ -642,7 +715,7 @@ nss_parse_service_list (const char *line new_service->actions[2 + NSS_STATUS_SUCCESS] = NSS_ACTION_RETURN; new_service->actions[2 + NSS_STATUS_RETURN] = NSS_ACTION_RETURN; new_service->library = NULL; @@ -4624,7 +4692,7 @@ Index: git/nss/nsswitch.c new_service->next = NULL; while (isspace (line[0])) -@@ -778,9 +851,10 @@ +@@ -778,9 +851,10 @@ nss_getline (char *line) result = (name_database_entry *) malloc (sizeof (name_database_entry) + len); if (result == NULL) return NULL; @@ -4636,7 +4704,7 @@ Index: git/nss/nsswitch.c /* Parse the list of services. */ result->service = nss_parse_service_list (line); -@@ -816,6 +890,7 @@ +@@ -816,6 +890,7 @@ nss_new_service (name_database *database return *currentp; } #endif @@ -4644,7 +4712,7 @@ Index: git/nss/nsswitch.c #if defined SHARED && defined USE_NSCD -@@ -834,6 +909,7 @@ +@@ -834,6 +909,7 @@ nss_load_all_libraries (const char *serv } @@ -4652,7 +4720,7 @@ Index: git/nss/nsswitch.c /* Called by nscd and nscd alone. */ void __nss_disable_nscd (void (*cb) (size_t, struct traced_file *)) -@@ -857,8 +933,10 @@ +@@ -857,8 +933,10 @@ __nss_disable_nscd (void (*cb) (size_t, __nss_not_use_nscd_services = -1; __nss_not_use_nscd_netgroup = -1; } @@ -4663,7 +4731,7 @@ Index: git/nss/nsswitch.c static void free_database_entries (name_database_entry *entry) { -@@ -871,8 +949,8 @@ +@@ -871,8 +949,8 @@ free_database_entries (name_database_ent { service_user *olds = service; @@ -4674,16 +4742,16 @@ Index: git/nss/nsswitch.c service = service->next; free (olds); -@@ -926,3 +1004,4 @@ +@@ -926,3 +1004,4 @@ libc_freeres_fn (free_mem) free (top); } +#endif /* __OPTION_EGLIBC_NSSWITCH */ Index: git/nss/nsswitch.h =================================================================== ---- git.orig/nss/nsswitch.h 2014-08-29 20:00:53.012070587 -0700 -+++ git/nss/nsswitch.h 2014-08-29 20:01:15.220070587 -0700 -@@ -65,10 +65,20 @@ +--- git.orig/nss/nsswitch.h ++++ git/nss/nsswitch.h +@@ -65,10 +65,20 @@ typedef struct service_user lookup_actions actions[5]; /* Link to the underlying library object. */ service_library *library; @@ -4707,7 +4775,7 @@ Index: git/nss/nsswitch.h } service_user; /* To access the action based on the status value use this macro. */ -@@ -82,7 +92,7 @@ +@@ -82,7 +92,7 @@ typedef struct name_database_entry /* List of service to be used. */ service_user *service; /* Name of the database. */ @@ -4718,8 +4786,8 @@ Index: git/nss/nsswitch.h Index: git/posix/bug-regex1.c =================================================================== ---- git.orig/posix/bug-regex1.c 2014-08-29 20:00:53.184070587 -0700 -+++ git/posix/bug-regex1.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/bug-regex1.c ++++ git/posix/bug-regex1.c @@ -4,6 +4,7 @@ #include <string.h> #include <regex.h> @@ -4728,7 +4796,7 @@ Index: git/posix/bug-regex1.c int main (void) -@@ -17,7 +18,9 @@ +@@ -17,7 +18,9 @@ main (void) memset (®ex, '\0', sizeof (regex)); setlocale (LC_ALL, "de_DE.ISO-8859-1"); @@ -4740,8 +4808,8 @@ Index: git/posix/bug-regex1.c Index: git/posix/bug-regex6.c =================================================================== ---- git.orig/posix/bug-regex6.c 2014-08-29 20:00:53.204070587 -0700 -+++ git/posix/bug-regex6.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/bug-regex6.c ++++ git/posix/bug-regex6.c @@ -22,6 +22,7 @@ #include <string.h> #include <sys/types.h> @@ -4750,7 +4818,7 @@ Index: git/posix/bug-regex6.c int -@@ -30,7 +31,12 @@ +@@ -30,7 +31,12 @@ main (int argc, char *argv[]) regex_t re; regmatch_t mat[10]; int i, j, ret = 0; @@ -4766,8 +4834,8 @@ Index: git/posix/bug-regex6.c { 0, 48 }, { 0, 5 }, { 0, 4 }, { 5, 20 }, { 7, 20 }, { 20, 42 }, Index: git/posix/fnmatch.c =================================================================== ---- git.orig/posix/fnmatch.c 2014-08-29 20:00:53.208070587 -0700 -+++ git/posix/fnmatch.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/fnmatch.c ++++ git/posix/fnmatch.c @@ -30,6 +30,10 @@ #include <ctype.h> #include <string.h> @@ -4779,19 +4847,19 @@ Index: git/posix/fnmatch.c #if defined STDC_HEADERS || defined _LIBC # include <stdlib.h> #endif -@@ -131,7 +135,7 @@ +@@ -131,7 +135,7 @@ extern int fnmatch (const char *pattern, # define ISWCTYPE(WC, WT) iswctype (WC, WT) # endif -# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC -+# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || (_LIBC && __OPTION_EGLIBC_LOCALE_CODE) ++# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS && _LIBC && __OPTION_EGLIBC_LOCALE_CODE) /* In this case we are implementing the multibyte character handling. */ # define HANDLE_MULTIBYTE 1 # endif Index: git/posix/fnmatch_loop.c =================================================================== ---- git.orig/posix/fnmatch_loop.c 2014-08-29 20:00:53.220070587 -0700 -+++ git/posix/fnmatch_loop.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/fnmatch_loop.c ++++ git/posix/fnmatch_loop.c @@ -15,6 +15,8 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ @@ -4801,7 +4869,7 @@ Index: git/posix/fnmatch_loop.c #include <stdint.h> struct STRUCT -@@ -54,10 +56,15 @@ +@@ -54,10 +56,15 @@ FCT (pattern, string, string_end, no_lea const char *collseq = (const char *) _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC); # else @@ -4819,7 +4887,7 @@ Index: git/posix/fnmatch_loop.c while ((c = *p++) != L('\0')) { -@@ -277,7 +284,7 @@ +@@ -277,7 +284,7 @@ FCT (pattern, string, string_end, no_lea /* Leave room for the null. */ CHAR str[CHAR_CLASS_MAX_LENGTH + 1]; size_t c1 = 0; @@ -4828,7 +4896,7 @@ Index: git/posix/fnmatch_loop.c wctype_t wt; #endif const CHAR *startp = p; -@@ -307,7 +314,7 @@ +@@ -307,7 +314,7 @@ FCT (pattern, string, string_end, no_lea } str[c1] = L('\0'); @@ -4837,7 +4905,7 @@ Index: git/posix/fnmatch_loop.c wt = IS_CHAR_CLASS (str); if (wt == 0) /* Invalid character class name. */ -@@ -681,8 +688,10 @@ +@@ -680,8 +687,10 @@ FCT (pattern, string, string_end, no_lea else lcollseq = __collseq_table_lookup (collseq, cold); # else @@ -4850,7 +4918,7 @@ Index: git/posix/fnmatch_loop.c # endif is_seqval = 0; -@@ -858,7 +867,7 @@ +@@ -857,7 +866,7 @@ FCT (pattern, string, string_end, no_lea goto matched; } # else @@ -4861,8 +4929,8 @@ Index: git/posix/fnmatch_loop.c Index: git/posix/glob.c =================================================================== ---- git.orig/posix/glob.c 2014-08-29 20:00:53.232070587 -0700 -+++ git/posix/glob.c 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/glob.c ++++ git/posix/glob.c @@ -25,6 +25,9 @@ #include <sys/types.h> #include <sys/stat.h> @@ -4873,7 +4941,7 @@ Index: git/posix/glob.c /* Outcomment the following line for production quality code. */ /* #define NDEBUG 1 */ -@@ -607,6 +610,7 @@ +@@ -607,6 +610,7 @@ glob (pattern, flags, errfunc, pglob) if (home_dir == NULL || home_dir[0] == '\0') home_dir = "c:/users/default"; /* poor default */ # else @@ -4881,7 +4949,7 @@ Index: git/posix/glob.c if (home_dir == NULL || home_dir[0] == '\0') { int success; -@@ -623,19 +627,19 @@ +@@ -623,19 +627,19 @@ glob (pattern, flags, errfunc, pglob) if (success) { struct passwd *p; @@ -4904,7 +4972,7 @@ Index: git/posix/glob.c if (__libc_use_alloca (alloca_used + pwbuflen)) pwtmpbuf = alloca_account (pwbuflen, alloca_used); else -@@ -682,9 +686,9 @@ +@@ -682,9 +686,9 @@ glob (pattern, flags, errfunc, pglob) } __set_errno (save); } @@ -4916,7 +4984,7 @@ Index: git/posix/glob.c if (p != NULL) { if (!malloc_pwtmpbuf) -@@ -713,6 +717,7 @@ +@@ -713,6 +717,7 @@ glob (pattern, flags, errfunc, pglob) } } } @@ -4926,8 +4994,8 @@ Index: git/posix/glob.c if (flags & GLOB_TILDE_CHECK) Index: git/posix/Makefile =================================================================== ---- git.orig/posix/Makefile 2014-08-29 20:00:53.160070587 -0700 -+++ git/posix/Makefile 2014-08-29 20:01:15.220070587 -0700 +--- git.orig/posix/Makefile ++++ git/posix/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for POSIX portion of the library. @@ -4937,7 +5005,7 @@ Index: git/posix/Makefile subdir := posix include ../Makeconfig -@@ -43,13 +45,24 @@ +@@ -43,13 +45,24 @@ routines := \ getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \ getresuid getresgid setresuid setresgid \ pathconf sysconf fpathconf \ @@ -4964,19 +5032,15 @@ Index: git/posix/Makefile spawn_faction_init spawn_faction_destroy spawn_faction_addclose \ spawn_faction_addopen spawn_faction_adddup2 \ spawnattr_init spawnattr_destroy \ -@@ -57,41 +70,53 @@ - spawnattr_getflags spawnattr_setflags \ - spawnattr_getpgroup spawnattr_setpgroup spawn spawnp spawni \ - spawnattr_getsigmask spawnattr_getschedpolicy spawnattr_getschedparam \ -- spawnattr_setsigmask spawnattr_setschedpolicy spawnattr_setschedparam \ -- posix_madvise \ -- get_child_max sched_cpucount sched_cpualloc sched_cpufree -+ spawnattr_setsigmask spawnattr_setschedpolicy spawnattr_setschedparam -+routines-$(OPTION_EGLIBC_WORDEXP) += wordexp +@@ -61,37 +74,53 @@ routines := \ + posix_madvise \ + get_child_max sched_cpucount sched_cpualloc sched_cpufree ++routines-$(OPTION_EGLIBC_WORDEXP) += wordexp ++ aux := init-posix environ -tests := tstgetopt testfnm runtests runptests \ -+tests := tstgetopt testfnm runtests \ ++tests := tstgetopt testfnm runtests \ tst-preadwrite tst-preadwrite64 test-vfork regexbug1 \ - tst-getlogin tst-mmap tst-getaddrinfo tst-truncate \ - tst-truncate64 tst-fork tst-fnmatch tst-regexloc tst-dir \ @@ -4999,8 +5063,8 @@ Index: git/posix/Makefile + bug-regex8 bug-regex9 bug-regex10 bug-regex12 \ + bug-regex14 bug-regex15 \ + bug-regex21 bug-regex24 \ -+ bug-regex27 bug-regex28 bug-regex29 bug-regex30 \ -+ bug-regex31 \ ++ bug-regex27 bug-regex28 \ ++ bug-regex29 bug-regex30 bug-regex31 \ + tst-nice tst-nanosleep \ + transbug \ + tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \ @@ -5016,22 +5080,23 @@ Index: git/posix/Makefile bug-getopt1 bug-getopt2 bug-getopt3 bug-getopt4 \ bug-getopt5 tst-getopt_long1 bug-regex34 bug-regex35 \ tst-pathconf tst-getaddrinfo4 tst-rxspencer-no-utf8 \ - tst-fnmatch3 bug-regex36 + tst-fnmatch3 bug-regex36 tst-getaddrinfo5 -xtests := bug-ga2 -+tests-$(OPTION_EGLIBC_LOCALE_CODE) \ -+ += tst-fnmatch tst-regexloc bug-regex1 bug-regex5 \ -+ bug-regex23 bug-regex25 bug-regex32 bug-regex33 ++tests-$(OPTION_EGLIBC_LOCALE_CODE) \ ++ += tst-fnmatch tst-regexloc bug-regex1 bug-regex5 \ ++ bug-regex23 bug-regex25 bug-regex32 bug-regex33 +tests-$(OPTION_EGLIBC_INET) \ -+ += tst-getaddrinfo bug-ga1 tst-getaddrinfo2 \ -+ tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 tst-getaddrinfo3 ++ += tst-getaddrinfo bug-ga1 tst-getaddrinfo2 \ ++ tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 tst-getaddrinfo3 +tests-$(OPTION_POSIX_REGEXP_GLIBC) \ -+ += runptests bug-regex11 bug-regex13 bug-regex16 \ -+ tst-regex2 tst-rxspencer tst-pcre tst-boost ++ += runptests bug-regex11 bug-regex13 bug-regex16 \ ++ tst-regex2 tst-rxspencer tst-pcre tst-boost +ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_POSIX_REGEXP_GLIBC)) -+tests += tst-regex bug-regex17 bug-regex18 bug-regex19 bug-regex20 \ -+ bug-regex22 bug-regex26 ++tests += tst-regex bug-regex17 bug-regex18 bug-regex19 bug-regex20 \ ++ bug-regex22 bug-regex26 +endif +xtests-$(OPTION_EGLIBC_INET) += bug-ga2 ++ ifeq (yes,$(build-shared)) test-srcs := globtest -tests += wordexp-test tst-exec tst-spawn @@ -5041,7 +5106,7 @@ Index: git/posix/Makefile endif tests-static = tst-exec-static tst-spawn-static tests += $(tests-static) -@@ -117,7 +142,10 @@ +@@ -117,7 +146,10 @@ generated += $(addprefix wordexp-test-re ifeq ($(run-built-tests),yes) ifeq (yes,$(build-shared)) @@ -5053,7 +5118,7 @@ Index: git/posix/Makefile endif endif -@@ -125,12 +153,16 @@ +@@ -125,12 +157,16 @@ endif # XXX Please note that for now we ignore the result of this test. tests-special += $(objpfx)annexc.out ifeq ($(run-built-tests),yes) @@ -5066,14 +5131,14 @@ Index: git/posix/Makefile $(objpfx)bug-glob2-mem.out $(objpfx)tst-vfork3-mem.out \ $(objpfx)tst-fnmatch-mem.out $(objpfx)bug-regex36-mem.out +ifeq (y,$(OPTION_POSIX_REGEXP_GLIBC)) -+tests-special += $(objpfx)bug-regex14-mem $(objpfx)tst-rxspencer-no-utf8-mem \ -+ $(objpfx)tst-pcre-mem $(objpfx)tst-boost-mem ++tests-special += $(objpfx)bug-regex14-mem.out $(objpfx)tst-rxspencer-no-utf8-mem.out \ ++ $(objpfx)tst-pcre-mem.out $(objpfx)tst-boost-mem.out +endif + xtests-special += $(objpfx)bug-ga2-mem.out endif -@@ -143,6 +175,8 @@ +@@ -143,6 +179,8 @@ $(objpfx)globtest.out: globtest.sh $(obj $(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \ '$(test-program-prefix)' '$(test-wrapper-env)'; \ $(evaluate-test) @@ -5082,7 +5147,7 @@ Index: git/posix/Makefile $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \ '$(run-program-env)' '$(test-program-prefix-after-env)'; \ -@@ -205,7 +239,10 @@ +@@ -205,7 +243,10 @@ tst-dir-ARGS = `pwd` `cd $(common-objdir tst-chmod-ARGS = $(objdir) tst-vfork3-ARGS = --test-dir=$(objpfx) @@ -5096,17 +5161,17 @@ Index: git/posix/Makefile tst-boost-ARGS = BOOST.tests Index: git/posix/regcomp.c =================================================================== ---- git.orig/posix/regcomp.c 2014-08-29 20:00:53.264070587 -0700 -+++ git/posix/regcomp.c 2014-08-29 20:01:15.224070587 -0700 +--- git.orig/posix/regcomp.c ++++ git/posix/regcomp.c @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ #include <stdint.h> +#include <gnu/option-groups.h> - static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, - size_t length, reg_syntax_t syntax); -@@ -305,7 +306,7 @@ + #ifdef _LIBC + # include <locale/weight.h> +@@ -309,7 +310,7 @@ re_compile_fastmap_iter (regex_t *bufp, { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; int node_cnt; @@ -5115,7 +5180,7 @@ Index: git/posix/regcomp.c for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { int node = init_state->nodes.elems[node_cnt]; -@@ -315,9 +316,9 @@ +@@ -319,9 +320,9 @@ re_compile_fastmap_iter (regex_t *bufp, { re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); #ifdef RE_ENABLE_I18N @@ -5127,7 +5192,7 @@ Index: git/posix/regcomp.c wchar_t wc; mbstate_t state; -@@ -348,7 +349,11 @@ +@@ -352,7 +353,11 @@ re_compile_fastmap_iter (regex_t *bufp, re_set_fastmap (fastmap, icase, ch); } } @@ -5140,7 +5205,7 @@ Index: git/posix/regcomp.c else if (type == COMPLEX_BRACKET) { re_charset_t *cset = dfa->nodes[node].opr.mbcset; -@@ -376,7 +381,7 @@ +@@ -380,7 +385,7 @@ re_compile_fastmap_iter (regex_t *bufp, i.e. where we would not find an invalid sequence. This only applies to multibyte character sets; for single byte character sets, the SIMPLE_BRACKET again suffices. */ @@ -5149,7 +5214,7 @@ Index: git/posix/regcomp.c && (cset->nchar_classes || cset->non_match || cset->nranges # ifdef _LIBC || cset->nequiv_classes -@@ -404,7 +409,7 @@ +@@ -408,7 +413,7 @@ re_compile_fastmap_iter (regex_t *bufp, memset (&state, '\0', sizeof (state)); if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) re_set_fastmap (fastmap, icase, *(unsigned char *) buf); @@ -5158,7 +5223,7 @@ Index: git/posix/regcomp.c { if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) != (size_t) -1) -@@ -413,7 +418,7 @@ +@@ -417,7 +422,7 @@ re_compile_fastmap_iter (regex_t *bufp, } } } @@ -5167,7 +5232,7 @@ Index: git/posix/regcomp.c else if (type == OP_PERIOD #ifdef RE_ENABLE_I18N || type == OP_UTF8_PERIOD -@@ -856,11 +861,15 @@ +@@ -860,11 +865,15 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) dfa->mb_cur_max = MB_CUR_MAX; #ifdef _LIBC @@ -5184,7 +5249,7 @@ Index: git/posix/regcomp.c #else # ifdef HAVE_LANGINFO_CODESET codeset_name = nl_langinfo (CODESET); -@@ -886,7 +895,7 @@ +@@ -890,7 +899,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) #endif #ifdef RE_ENABLE_I18N @@ -5193,7 +5258,7 @@ Index: git/posix/regcomp.c { if (dfa->is_utf8) dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; -@@ -1784,7 +1793,7 @@ +@@ -1788,7 +1797,7 @@ peek_token (re_token_t *token, re_string token->word_char = 0; #ifdef RE_ENABLE_I18N token->mb_partial = 0; @@ -5202,7 +5267,7 @@ Index: git/posix/regcomp.c !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; -@@ -1805,7 +1814,7 @@ +@@ -1809,7 +1818,7 @@ peek_token (re_token_t *token, re_string token->opr.c = c2; token->type = CHARACTER; #ifdef RE_ENABLE_I18N @@ -5211,7 +5276,7 @@ Index: git/posix/regcomp.c { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input) + 1); -@@ -1919,7 +1928,7 @@ +@@ -1923,7 +1932,7 @@ peek_token (re_token_t *token, re_string token->type = CHARACTER; #ifdef RE_ENABLE_I18N @@ -5220,7 +5285,7 @@ Index: git/posix/regcomp.c { wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; -@@ -2019,7 +2028,7 @@ +@@ -2023,7 +2032,7 @@ peek_token_bracket (re_token_t *token, r token->opr.c = c; #ifdef RE_ENABLE_I18N @@ -5229,7 +5294,7 @@ Index: git/posix/regcomp.c !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; -@@ -2242,7 +2251,7 @@ +@@ -2246,7 +2255,7 @@ parse_expression (re_string_t *regexp, r return NULL; } #ifdef RE_ENABLE_I18N @@ -5238,7 +5303,7 @@ Index: git/posix/regcomp.c { while (!re_string_eoi (regexp) && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) -@@ -2380,7 +2389,7 @@ +@@ -2384,7 +2393,7 @@ parse_expression (re_string_t *regexp, r *err = REG_ESPACE; return NULL; } @@ -5247,7 +5312,7 @@ Index: git/posix/regcomp.c dfa->has_mb_node = 1; break; case OP_WORD: -@@ -2686,7 +2695,7 @@ +@@ -2690,7 +2699,7 @@ build_range_exp (bitset_t sbcset, bracke However, for !_LIBC we have no collation elements: if the character set is single byte, the single byte character set that we build below suffices. parse_bracket_exp passes @@ -5256,7 +5321,7 @@ Index: git/posix/regcomp.c if (mbcset) { /* Check the space of the arrays. */ -@@ -2782,7 +2791,13 @@ +@@ -2786,7 +2795,13 @@ parse_bracket_exp (re_string_t *regexp, reg_syntax_t syntax, reg_errcode_t *err) { #ifdef _LIBC @@ -5270,7 +5335,7 @@ Index: git/posix/regcomp.c const char *collseqwc; uint32_t nrules; int32_t table_size; -@@ -2830,18 +2845,20 @@ +@@ -2834,18 +2849,20 @@ parse_bracket_exp (re_string_t *regexp, if (MB_CUR_MAX == 1) */ if (nrules == 0) @@ -5292,7 +5357,7 @@ Index: git/posix/regcomp.c else if (br_elem->type == COLL_SYM) { size_t sym_name_len = strlen ((char *) br_elem->opr.name); -@@ -2872,11 +2889,11 @@ +@@ -2876,11 +2893,11 @@ parse_bracket_exp (re_string_t *regexp, { /* No valid character. Match it as a single byte character. */ @@ -5306,7 +5371,7 @@ Index: git/posix/regcomp.c } return UINT_MAX; } -@@ -2916,7 +2933,7 @@ +@@ -2920,7 +2937,7 @@ parse_bracket_exp (re_string_t *regexp, However, if we have no collation elements, and the character set is single byte, the single byte character set that we build below suffices. */ @@ -5315,7 +5380,7 @@ Index: git/posix/regcomp.c { /* Check the space of the arrays. */ if (BE (*range_alloc == mbcset->nranges, 0)) -@@ -2953,7 +2970,7 @@ +@@ -2957,7 +2974,7 @@ parse_bracket_exp (re_string_t *regexp, if (MB_CUR_MAX == 1) */ if (nrules == 0) @@ -5324,7 +5389,7 @@ Index: git/posix/regcomp.c else ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) -@@ -3031,7 +3048,10 @@ +@@ -3035,7 +3052,10 @@ parse_bracket_exp (re_string_t *regexp, re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; @@ -5336,7 +5401,7 @@ Index: git/posix/regcomp.c int equiv_class_alloc = 0, char_class_alloc = 0; #endif /* not RE_ENABLE_I18N */ int non_match = 0; -@@ -3039,9 +3059,15 @@ +@@ -3043,9 +3063,15 @@ parse_bracket_exp (re_string_t *regexp, int token_len; int first_round = 1; #ifdef _LIBC @@ -5352,7 +5417,7 @@ Index: git/posix/regcomp.c if (nrules) { /* -@@ -3169,7 +3195,7 @@ +@@ -3175,7 +3201,7 @@ parse_bracket_exp (re_string_t *regexp, #else # ifdef RE_ENABLE_I18N *err = build_range_exp (sbcset, @@ -5361,7 +5426,7 @@ Index: git/posix/regcomp.c &range_alloc, &start_elem, &end_elem); # else *err = build_range_exp (sbcset, &start_elem, &end_elem); -@@ -3185,7 +3211,7 @@ +@@ -3191,7 +3217,7 @@ parse_bracket_exp (re_string_t *regexp, case SB_CHAR: bitset_set (sbcset, start_elem.opr.ch); break; @@ -5370,7 +5435,7 @@ Index: git/posix/regcomp.c case MB_CHAR: /* Check whether the array has enough space. */ if (BE (mbchar_alloc == mbcset->nmbchars, 0)) -@@ -3203,7 +3229,7 @@ +@@ -3209,7 +3235,7 @@ parse_bracket_exp (re_string_t *regexp, } mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; break; @@ -5379,7 +5444,7 @@ Index: git/posix/regcomp.c case EQUIV_CLASS: *err = build_equiv_class (sbcset, #ifdef RE_ENABLE_I18N -@@ -3253,11 +3279,11 @@ +@@ -3259,11 +3285,11 @@ parse_bracket_exp (re_string_t *regexp, #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ @@ -5393,7 +5458,7 @@ Index: git/posix/regcomp.c || mbcset->non_match))) { bin_tree_t *mbc_tree; -@@ -3326,7 +3352,7 @@ +@@ -3332,7 +3358,7 @@ parse_bracket_element (bracket_elem_t *e re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax, int accept_hyphen) { @@ -5402,7 +5467,7 @@ Index: git/posix/regcomp.c int cur_char_size; cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); if (cur_char_size > 1) -@@ -3336,7 +3362,7 @@ +@@ -3342,7 +3368,7 @@ parse_bracket_element (bracket_elem_t *e re_string_skip_bytes (regexp, cur_char_size); return REG_NOERROR; } @@ -5411,7 +5476,7 @@ Index: git/posix/regcomp.c re_string_skip_bytes (regexp, token_len); /* Skip a token. */ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) -@@ -3416,7 +3442,9 @@ +@@ -3422,7 +3448,9 @@ build_equiv_class (bitset_t sbcset, re_c build_equiv_class (bitset_t sbcset, const unsigned char *name) #endif /* not RE_ENABLE_I18N */ { @@ -5422,7 +5487,7 @@ Index: git/posix/regcomp.c uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { -@@ -3488,7 +3516,7 @@ +@@ -3492,7 +3520,7 @@ build_equiv_class (bitset_t sbcset, cons mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; } else @@ -5431,7 +5496,7 @@ Index: git/posix/regcomp.c { if (BE (strlen ((const char *) name) != 1, 0)) return REG_ECOLLATE; -@@ -3522,7 +3550,7 @@ +@@ -3526,7 +3554,7 @@ build_charclass (RE_TRANSLATE_TYPE trans && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) name = "alpha"; @@ -5440,7 +5505,7 @@ Index: git/posix/regcomp.c /* Check the space of the arrays. */ if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) { -@@ -3538,7 +3566,7 @@ +@@ -3542,7 +3570,7 @@ build_charclass (RE_TRANSLATE_TYPE trans *char_class_alloc = new_char_class_alloc; } mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); @@ -5449,7 +5514,7 @@ Index: git/posix/regcomp.c #define BUILD_CHARCLASS_LOOP(ctype_func) \ do { \ -@@ -3649,7 +3677,7 @@ +@@ -3653,7 +3681,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TR #ifdef RE_ENABLE_I18N /* Ensure only single byte characters are set. */ @@ -5458,7 +5523,7 @@ Index: git/posix/regcomp.c bitset_mask (sbcset, dfa->sb_char); #endif -@@ -3661,7 +3689,7 @@ +@@ -3665,7 +3693,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TR goto build_word_op_espace; #ifdef RE_ENABLE_I18N @@ -5469,8 +5534,8 @@ Index: git/posix/regcomp.c /* Build a tree for complex bracket. */ Index: git/posix/regexec.c =================================================================== ---- git.orig/posix/regexec.c 2014-08-29 20:00:53.268070587 -0700 -+++ git/posix/regexec.c 2014-08-29 20:01:15.224070587 -0700 +--- git.orig/posix/regexec.c ++++ git/posix/regexec.c @@ -18,6 +18,7 @@ <http://www.gnu.org/licenses/>. */ @@ -5479,7 +5544,7 @@ Index: git/posix/regexec.c static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, int n) internal_function; -@@ -186,11 +187,11 @@ +@@ -186,11 +187,11 @@ static int build_trtable (const re_dfa_t static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, const re_string_t *input, int idx) internal_function; @@ -5493,7 +5558,7 @@ Index: git/posix/regexec.c #endif /* RE_ENABLE_I18N */ static int group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, -@@ -255,25 +256,9 @@ +@@ -255,25 +256,9 @@ regexec (preg, string, nmatch, pmatch, e return err != REG_NOERROR; } @@ -5522,7 +5587,7 @@ Index: git/posix/regexec.c /* Entry points for GNU code. */ -@@ -728,7 +713,7 @@ +@@ -728,7 +713,7 @@ re_search_internal (preg, string, length incr = (range < 0) ? -1 : 1; left_lim = (range < 0) ? start + range : start; right_lim = (range < 0) ? start : start + range; @@ -5531,7 +5596,7 @@ Index: git/posix/regexec.c match_kind = (fastmap ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) -@@ -3448,7 +3433,7 @@ +@@ -3448,7 +3433,7 @@ out_free: if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) goto out_free; @@ -5540,7 +5605,7 @@ Index: git/posix/regexec.c need_word_trtable = 1; dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, -@@ -3590,7 +3575,7 @@ +@@ -3590,7 +3575,7 @@ group_nodes_into_DFAstates (const re_dfa else if (type == OP_PERIOD) { #ifdef RE_ENABLE_I18N @@ -5549,7 +5614,7 @@ Index: git/posix/regexec.c bitset_merge (accepts, dfa->sb_char); else #endif -@@ -3641,7 +3626,7 @@ +@@ -3641,7 +3626,7 @@ group_nodes_into_DFAstates (const re_dfa continue; } #ifdef RE_ENABLE_I18N @@ -5558,7 +5623,7 @@ Index: git/posix/regexec.c for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); else -@@ -3660,7 +3645,7 @@ +@@ -3660,7 +3645,7 @@ group_nodes_into_DFAstates (const re_dfa continue; } #ifdef RE_ENABLE_I18N @@ -5567,7 +5632,7 @@ Index: git/posix/regexec.c for (j = 0; j < BITSET_WORDS; ++j) any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); else -@@ -3832,12 +3817,6 @@ +@@ -3836,12 +3821,6 @@ check_node_accept_bytes (const re_dfa_t if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; @@ -5580,7 +5645,7 @@ Index: git/posix/regexec.c int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) ? re_string_wchar_at (input, str_idx) : 0); -@@ -3849,6 +3828,7 @@ +@@ -3853,6 +3832,7 @@ check_node_accept_bytes (const re_dfa_t match_len = char_len; goto check_node_accept_bytes_match; } @@ -5588,7 +5653,7 @@ Index: git/posix/regexec.c /* match with character_class? */ for (i = 0; i < cset->nchar_classes; ++i) { -@@ -3859,8 +3839,16 @@ +@@ -3863,14 +3843,22 @@ check_node_accept_bytes (const re_dfa_t goto check_node_accept_bytes_match; } } @@ -5606,7 +5671,14 @@ Index: git/posix/regexec.c nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { -@@ -3953,8 +3941,12 @@ + unsigned int in_collseq = 0; + const int32_t *table, *indirect; +- const unsigned char *weights, *extra; ++ const unsigned char *weights, *extra = NULL; + const char *collseqwc; + + /* match with collating_symbol? */ +@@ -3955,8 +3943,12 @@ check_node_accept_bytes (const re_dfa_t } } else @@ -5620,7 +5692,7 @@ Index: git/posix/regexec.c /* match with range expression? */ #if __GNUC__ >= 2 wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; -@@ -3973,6 +3965,7 @@ +@@ -3975,6 +3967,7 @@ check_node_accept_bytes (const re_dfa_t goto check_node_accept_bytes_match; } } @@ -5628,7 +5700,7 @@ Index: git/posix/regexec.c } check_node_accept_bytes_match: if (!cset->non_match) -@@ -3988,7 +3981,7 @@ +@@ -3990,7 +3983,7 @@ check_node_accept_bytes (const re_dfa_t return 0; } @@ -5637,7 +5709,7 @@ Index: git/posix/regexec.c static unsigned int internal_function find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) -@@ -4046,7 +4039,7 @@ +@@ -4048,7 +4041,7 @@ find_collation_sequence_value (const uns return UINT_MAX; } } @@ -5646,7 +5718,7 @@ Index: git/posix/regexec.c #endif /* RE_ENABLE_I18N */ /* Check whether the node accepts the byte which is IDX-th -@@ -4137,7 +4130,7 @@ +@@ -4139,7 +4132,7 @@ extend_buffers (re_match_context_t *mctx if (pstr->icase) { #ifdef RE_ENABLE_I18N @@ -5655,7 +5727,7 @@ Index: git/posix/regexec.c { ret = build_wcs_upper_buffer (pstr); if (BE (ret != REG_NOERROR, 0)) -@@ -4150,7 +4143,7 @@ +@@ -4152,7 +4145,7 @@ extend_buffers (re_match_context_t *mctx else { #ifdef RE_ENABLE_I18N @@ -5666,8 +5738,8 @@ Index: git/posix/regexec.c #endif /* RE_ENABLE_I18N */ Index: git/posix/regexec-compat.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/posix/regexec-compat.c 2014-08-29 20:01:15.224070587 -0700 +--- /dev/null ++++ git/posix/regexec-compat.c @@ -0,0 +1,39 @@ +/* Extended regular expression matching and search library. + Copyright (C) 2008 Free Software Foundation, Inc. @@ -5710,8 +5782,8 @@ Index: git/posix/regexec-compat.c +#endif Index: git/posix/regex.h =================================================================== ---- git.orig/posix/regex.h 2014-08-29 20:00:53.264070587 -0700 -+++ git/posix/regex.h 2014-08-29 20:01:15.224070587 -0700 +--- git.orig/posix/regex.h ++++ git/posix/regex.h @@ -21,6 +21,7 @@ #define _REGEX_H 1 @@ -5720,7 +5792,7 @@ Index: git/posix/regex.h /* Allow the use in C++ code. */ #ifdef __cplusplus -@@ -156,6 +157,8 @@ +@@ -156,6 +157,8 @@ typedef unsigned long int reg_syntax_t; treated as 'a\{1'. */ # define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) @@ -5729,7 +5801,7 @@ Index: git/posix/regex.h /* If this bit is set, then ignore case when matching. If not set, then case is significant. */ # define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) -@@ -172,6 +175,7 @@ +@@ -172,6 +175,7 @@ typedef unsigned long int reg_syntax_t; /* If this bit is set, then no_sub will be set to 1 during re_compile_pattern. */ # define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) @@ -5737,7 +5809,7 @@ Index: git/posix/regex.h #endif /* This global variable defines the particular regexp syntax to use (for -@@ -231,8 +235,13 @@ +@@ -231,8 +235,13 @@ extern reg_syntax_t re_syntax_options; (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ | RE_INTERVALS | RE_NO_EMPTY_RANGES) @@ -5751,7 +5823,7 @@ Index: git/posix/regex.h /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this -@@ -298,9 +307,11 @@ +@@ -298,9 +307,11 @@ extern reg_syntax_t re_syntax_options; /* Like REG_NOTBOL, except for the end-of-line. */ #define REG_NOTEOL (1 << 1) @@ -5765,9 +5837,9 @@ Index: git/posix/regex.h /* If any error codes are removed, changed, or added, update the Index: git/posix/regex_internal.c =================================================================== ---- git.orig/posix/regex_internal.c 2014-08-29 20:00:53.264070587 -0700 -+++ git/posix/regex_internal.c 2014-08-29 20:01:15.224070587 -0700 -@@ -43,8 +43,8 @@ +--- git.orig/posix/regex_internal.c ++++ git/posix/regex_internal.c +@@ -43,8 +43,8 @@ re_string_allocate (re_string_t *pstr, c int init_buf_len; /* Ensure at least one character fits into the buffers. */ @@ -5778,7 +5850,7 @@ Index: git/posix/regex_internal.c init_buf_len = (len + 1 < init_len) ? len + 1: init_len; re_string_construct_common (str, len, pstr, trans, icase, dfa); -@@ -55,7 +55,7 @@ +@@ -55,7 +55,7 @@ re_string_allocate (re_string_t *pstr, c pstr->word_char = dfa->word_char; pstr->word_ops_used = dfa->word_ops_used; pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; @@ -5787,7 +5859,7 @@ Index: git/posix/regex_internal.c pstr->valid_raw_len = pstr->valid_len; return REG_NOERROR; } -@@ -82,7 +82,7 @@ +@@ -82,7 +82,7 @@ re_string_construct (re_string_t *pstr, if (icase) { #ifdef RE_ENABLE_I18N @@ -5796,7 +5868,7 @@ Index: git/posix/regex_internal.c { while (1) { -@@ -91,7 +91,7 @@ +@@ -91,7 +91,7 @@ re_string_construct (re_string_t *pstr, return ret; if (pstr->valid_raw_len >= len) break; @@ -5805,7 +5877,7 @@ Index: git/posix/regex_internal.c break; ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) -@@ -105,7 +105,7 @@ +@@ -105,7 +105,7 @@ re_string_construct (re_string_t *pstr, else { #ifdef RE_ENABLE_I18N @@ -5814,7 +5886,7 @@ Index: git/posix/regex_internal.c build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ -@@ -130,7 +130,7 @@ +@@ -130,7 +130,7 @@ internal_function __attribute_warn_unuse re_string_realloc_buffers (re_string_t *pstr, int new_buf_len) { #ifdef RE_ENABLE_I18N @@ -5823,7 +5895,7 @@ Index: git/posix/regex_internal.c { wint_t *new_wcs; -@@ -177,7 +177,7 @@ +@@ -177,7 +177,7 @@ re_string_construct_common (const char * pstr->trans = trans; pstr->icase = icase ? 1 : 0; pstr->mbs_allocated = (trans != NULL || icase); @@ -5832,7 +5904,7 @@ Index: git/posix/regex_internal.c pstr->is_utf8 = dfa->is_utf8; pstr->map_notascii = dfa->map_notascii; pstr->stop = pstr->len; -@@ -203,7 +203,7 @@ +@@ -203,7 +203,7 @@ build_wcs_buffer (re_string_t *pstr) { #ifdef _LIBC unsigned char buf[MB_LEN_MAX]; @@ -5841,7 +5913,7 @@ Index: git/posix/regex_internal.c #else unsigned char buf[64]; #endif -@@ -226,7 +226,7 @@ +@@ -226,7 +226,7 @@ build_wcs_buffer (re_string_t *pstr) { int i, ch; @@ -5850,7 +5922,7 @@ Index: git/posix/regex_internal.c { ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; -@@ -275,7 +275,7 @@ +@@ -275,7 +275,7 @@ build_wcs_upper_buffer (re_string_t *pst size_t mbclen; #ifdef _LIBC char buf[MB_LEN_MAX]; @@ -5859,7 +5931,7 @@ Index: git/posix/regex_internal.c #else char buf[64]; #endif -@@ -369,7 +369,7 @@ +@@ -369,7 +369,7 @@ build_wcs_upper_buffer (re_string_t *pst { int i, ch; @@ -5868,7 +5940,7 @@ Index: git/posix/regex_internal.c { ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; buf[i] = pstr->trans[ch]; -@@ -567,8 +567,9 @@ +@@ -567,8 +567,9 @@ re_string_translate_buffer (re_string_t } /* This function re-construct the buffers. @@ -5880,7 +5952,7 @@ Index: git/posix/regex_internal.c static reg_errcode_t internal_function __attribute_warn_unused_result__ -@@ -579,7 +580,7 @@ +@@ -579,7 +580,7 @@ re_string_reconstruct (re_string_t *pstr { /* Reset buffer. */ #ifdef RE_ENABLE_I18N @@ -5889,7 +5961,7 @@ Index: git/posix/regex_internal.c memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); #endif /* RE_ENABLE_I18N */ pstr->len = pstr->raw_len; -@@ -670,7 +671,7 @@ +@@ -670,7 +671,7 @@ re_string_reconstruct (re_string_t *pstr pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags); #ifdef RE_ENABLE_I18N @@ -5898,7 +5970,7 @@ Index: git/posix/regex_internal.c memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ -@@ -699,7 +700,7 @@ +@@ -699,7 +700,7 @@ re_string_reconstruct (re_string_t *pstr #endif pstr->valid_len = 0; #ifdef RE_ENABLE_I18N @@ -5907,7 +5979,7 @@ Index: git/posix/regex_internal.c { int wcs_idx; wint_t wc = WEOF; -@@ -711,7 +712,7 @@ +@@ -711,7 +712,7 @@ re_string_reconstruct (re_string_t *pstr /* Special case UTF-8. Multi-byte chars start with any byte other than 0x80 - 0xbf. */ raw = pstr->raw_mbs + pstr->raw_mbs_idx; @@ -5916,7 +5988,7 @@ Index: git/posix/regex_internal.c if (end < pstr->raw_mbs) end = pstr->raw_mbs; p = raw + offset - 1; -@@ -803,7 +804,7 @@ +@@ -803,7 +804,7 @@ re_string_reconstruct (re_string_t *pstr /* Then build the buffers. */ #ifdef RE_ENABLE_I18N @@ -5925,7 +5997,7 @@ Index: git/posix/regex_internal.c { if (pstr->icase) { -@@ -841,7 +842,7 @@ +@@ -841,7 +842,7 @@ re_string_peek_byte_case (const re_strin return re_string_peek_byte (pstr, idx); #ifdef RE_ENABLE_I18N @@ -5934,7 +6006,7 @@ Index: git/posix/regex_internal.c && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) return re_string_peek_byte (pstr, idx); #endif -@@ -930,7 +931,7 @@ +@@ -930,7 +931,7 @@ re_string_context_at (const re_string_t return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF : CONTEXT_NEWLINE | CONTEXT_ENDBUF); #ifdef RE_ENABLE_I18N @@ -5943,7 +6015,7 @@ Index: git/posix/regex_internal.c { wint_t wc; int wc_idx = idx; -@@ -1444,7 +1445,7 @@ +@@ -1444,7 +1445,7 @@ re_dfa_add_node (re_dfa_t *dfa, re_token dfa->nodes[dfa->nodes_len].constraint = 0; #ifdef RE_ENABLE_I18N dfa->nodes[dfa->nodes_len].accept_mb = @@ -5954,8 +6026,8 @@ Index: git/posix/regex_internal.c re_node_set_init_empty (dfa->edests + dfa->nodes_len); Index: git/posix/regex_internal.h =================================================================== ---- git.orig/posix/regex_internal.h 2014-08-29 20:00:53.264070587 -0700 -+++ git/posix/regex_internal.h 2014-08-29 20:01:15.224070587 -0700 +--- git.orig/posix/regex_internal.h ++++ git/posix/regex_internal.h @@ -26,6 +26,10 @@ #include <stdlib.h> #include <string.h> @@ -5967,7 +6039,7 @@ Index: git/posix/regex_internal.h #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC # include <langinfo.h> #endif -@@ -370,6 +374,13 @@ +@@ -369,6 +373,13 @@ struct re_string_t }; typedef struct re_string_t re_string_t; @@ -5981,7 +6053,7 @@ Index: git/posix/regex_internal.h struct re_dfa_t; typedef struct re_dfa_t re_dfa_t; -@@ -655,6 +666,14 @@ +@@ -654,6 +665,14 @@ struct re_dfa_t __libc_lock_define (, lock) }; @@ -5996,7 +6068,7 @@ Index: git/posix/regex_internal.h #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) #define re_node_set_remove(set,id) \ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) -@@ -715,7 +734,7 @@ +@@ -714,7 +733,7 @@ internal_function __attribute__ ((pure, re_string_char_size_at (const re_string_t *pstr, int idx) { int byte_idx; @@ -6005,7 +6077,7 @@ Index: git/posix/regex_internal.h return 1; for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) if (pstr->wcs[idx + byte_idx] != WEOF) -@@ -727,7 +746,7 @@ +@@ -726,7 +745,7 @@ static wint_t internal_function __attribute__ ((pure, unused)) re_string_wchar_at (const re_string_t *pstr, int idx) { @@ -6016,9 +6088,9 @@ Index: git/posix/regex_internal.h } Index: git/posix/xregex.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/posix/xregex.c 2014-08-29 20:01:15.228070587 -0700 -@@ -0,0 +1,8212 @@ +--- /dev/null ++++ git/posix/xregex.c +@@ -0,0 +1,8215 @@ +/* Extended regular expression matching and search library, + version 0.12. + (Implements POSIX draft P1003.2/D11.2, except for some of the @@ -6059,6 +6131,7 @@ Index: git/posix/xregex.c + +/*#include <ansidecl.h>*/ + ++ +#ifndef INSIDE_RECURSION + +# if defined STDC_HEADERS && !defined emacs @@ -6068,8 +6141,11 @@ Index: git/posix/xregex.c +# include <sys/types.h> +# endif + -+# define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC) -+ ++# if (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_BTOWC) ++# define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC) ++# else ++# define WIDE_CHAR_SUPPORT 0 ++# endif +/* For platform which support the ISO C amendement 1 functionality we + support user defined character classes. */ +# if WIDE_CHAR_SUPPORT @@ -6630,6 +6706,8 @@ Index: git/posix/xregex.c +# define PREFIX(name) byte_##name +# define ARG_PREFIX(name) name +# define PUT_CHAR(c) putchar (c) ++# include <locale/weight.h> ++# define FINDIDX findidx +#else +# ifdef WCHAR +# define CHAR_T wchar_t @@ -6643,6 +6721,10 @@ Index: git/posix/xregex.c +# define PUT_CHAR(c) printf ("%C", c); +# define TRUE 1 +# define FALSE 0 ++# define findidx findidxwc ++# include <locale/weightwc.h> ++# undef findidx ++# define FINDIDX findidxwc +# else +# ifdef MBS_SUPPORT +# define WCHAR @@ -8038,6 +8120,9 @@ Index: git/posix/xregex.c + reset the pointers that pointed into the old block to point to the + correct places in the new one. If extending the buffer results in it + being larger than MAX_BUF_SIZE, then flag memory exhausted. */ ++# ifndef __BOUNDED_POINTERS__ ++# define __BOUNDED_POINTERS__ 0 ++# endif +# if __BOUNDED_POINTERS__ +# define SET_HIGH_BOUND(P) (__ptrhigh (P) = __ptrlow (P) + bufp->allocated) +# define MOVE_BUFFER_POINTER(P) \ @@ -8943,9 +9028,6 @@ Index: git/posix/xregex.c + const int32_t *indirect; + wint_t *cp; + -+ /* This #include defines a local function! */ -+# include <locale/weightwc.h> -+ + if(delim == '=') + { + /* We push the index for equivalence class. */ @@ -8957,14 +9039,14 @@ Index: git/posix/xregex.c + weights = (const int32_t *) + _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_WEIGHTWC); -+ extra = (const int32_t *) ++ extra = (const wint_t *) + _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_EXTRAWC); + indirect = (const int32_t *) + _NL_CURRENT (LC_COLLATE, + _NL_COLLATE_INDIRECTWC); + -+ idx = findidx ((const wint_t**)&cp, c1); ++ idx = FINDIDX (table, indirect, extra, &cp, 1); + if (idx == 0 || cp < (wint_t*) str + c1) + /* This is no valid character. */ + FREE_STACK_RETURN (REG_ECOLLATE); @@ -9401,9 +9483,6 @@ Index: git/posix/xregex.c + const unsigned char *cp = str; + int ch; + -+ /* This #include defines a local function! */ -+# include <locale/weight.h> -+ + table = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); + weights = (const unsigned char *) @@ -9412,8 +9491,7 @@ Index: git/posix/xregex.c + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); + indirect = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); -+ -+ idx = findidx (&cp, c1); ++ idx = FINDIDX (table, indirect, extra, &cp, 1); + if (idx == 0 || cp < str + c1) + /* This is no valid character. */ + FREE_STACK_RETURN (REG_ECOLLATE); @@ -12356,9 +12434,6 @@ Index: git/posix/xregex.c + wint_t *cp; + size_t len; + -+ /* This #include defines a local function! */ -+# include <locale/weightwc.h> -+ + table = (const int32_t *) + _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC); + weights = (const wint_t *) @@ -12384,7 +12459,7 @@ Index: git/posix/xregex.c + } + str_buf[i] = TRANSLATE(*(d+i)); + str_buf[i+1] = '\0'; /* sentinel */ -+ idx2 = findidx ((const wint_t**)&cp, i); ++ idx2 = FINDIDX (table, indirect, extra, &cp, 1); + } + + /* Update d, however d will be incremented at @@ -13166,8 +13241,8 @@ Index: git/posix/xregex.c + register from the stack, since lowest will == highest in + `pop_failure_point'. */ + active_reg_t dummy_low_reg, dummy_high_reg; -+ UCHAR_T *pdummy = NULL; -+ const CHAR_T *sdummy = NULL; ++ UCHAR_T *pdummy __attribute__ ((unused)) = NULL; ++ const CHAR_T *sdummy __attribute__ ((unused)) = NULL; + + DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n"); + POP_FAILURE_POINT (sdummy, pdummy, @@ -14233,8 +14308,8 @@ Index: git/posix/xregex.c +# define DEFINED_ONCE Index: git/pwd/Makefile =================================================================== ---- git.orig/pwd/Makefile 2014-08-29 20:00:53.316070587 -0700 -+++ git/pwd/Makefile 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/pwd/Makefile ++++ git/pwd/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for pwd portion of the library. @@ -14246,8 +14321,8 @@ Index: git/pwd/Makefile include ../Makeconfig Index: git/resolv/Makefile =================================================================== ---- git.orig/resolv/Makefile 2014-08-29 20:00:53.320070587 -0700 -+++ git/resolv/Makefile 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/resolv/Makefile ++++ git/resolv/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for resolv portion of the library. @@ -14257,7 +14332,7 @@ Index: git/resolv/Makefile subdir := resolv include ../Makeconfig -@@ -27,20 +29,21 @@ +@@ -27,20 +29,21 @@ headers := resolv.h \ arpa/nameser.h arpa/nameser_compat.h \ sys/bitypes.h @@ -14287,7 +14362,7 @@ Index: git/resolv/Makefile libresolv-routines := gethnamaddr res_comp res_debug \ res_data res_mkquery res_query res_send \ inet_net_ntop inet_net_pton inet_neta base64 \ -@@ -60,7 +63,7 @@ +@@ -60,7 +63,7 @@ routines += $(libnss_dns- static-only-routines += $(libnss_dns-routines) $(libresolv-routines) endif @@ -14298,8 +14373,8 @@ Index: git/resolv/Makefile Index: git/stdio-common/fxprintf.c =================================================================== ---- git.orig/stdio-common/fxprintf.c 2014-08-29 20:00:53.544070587 -0700 -+++ git/stdio-common/fxprintf.c 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/fxprintf.c ++++ git/stdio-common/fxprintf.c @@ -23,6 +23,7 @@ #include <wchar.h> #include <string.h> @@ -14308,7 +14383,7 @@ Index: git/stdio-common/fxprintf.c int -@@ -37,6 +38,7 @@ +@@ -37,6 +38,7 @@ __fxprintf (FILE *fp, const char *fmt, . int res; if (_IO_fwide (fp, 0) > 0) { @@ -14316,7 +14391,7 @@ Index: git/stdio-common/fxprintf.c size_t len = strlen (fmt) + 1; wchar_t wfmt[len]; for (size_t i = 0; i < len; ++i) -@@ -45,6 +47,9 @@ +@@ -45,6 +47,9 @@ __fxprintf (FILE *fp, const char *fmt, . wfmt[i] = fmt[i]; } res = __vfwprintf (fp, wfmt, ap); @@ -14328,8 +14403,8 @@ Index: git/stdio-common/fxprintf.c res = _IO_vfprintf (fp, fmt, ap); Index: git/stdio-common/_i18n_number.h =================================================================== ---- git.orig/stdio-common/_i18n_number.h 2014-08-29 20:00:53.500070587 -0700 -+++ git/stdio-common/_i18n_number.h 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/_i18n_number.h ++++ git/stdio-common/_i18n_number.h @@ -19,10 +19,13 @@ #include <stdbool.h> #include <wchar.h> @@ -14344,7 +14419,7 @@ Index: git/stdio-common/_i18n_number.h static CHAR_T * _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end) { -@@ -115,3 +118,13 @@ +@@ -115,3 +118,13 @@ _i18n_number_rewrite (CHAR_T *w, CHAR_T return w; } @@ -14360,8 +14435,8 @@ Index: git/stdio-common/_i18n_number.h +#endif Index: git/stdio-common/Makefile =================================================================== ---- git.orig/stdio-common/Makefile 2014-08-29 20:00:53.500070587 -0700 -+++ git/stdio-common/Makefile 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/Makefile ++++ git/stdio-common/Makefile @@ -18,6 +18,8 @@ # # Specific makefile for stdio-common. @@ -14371,7 +14446,7 @@ Index: git/stdio-common/Makefile subdir := stdio-common include ../Makeconfig -@@ -30,7 +32,7 @@ +@@ -30,7 +32,7 @@ routines := \ vfprintf vprintf printf_fp reg-printf printf-prs printf_fphex \ reg-modifier reg-type \ printf_size fprintf printf snprintf sprintf asprintf dprintf \ @@ -14380,7 +14455,7 @@ Index: git/stdio-common/Makefile fscanf scanf sscanf \ perror psignal \ tmpfile tmpfile64 tmpnam tmpnam_r tempnam tempname \ -@@ -41,23 +43,37 @@ +@@ -41,23 +43,36 @@ routines := \ isoc99_vsscanf \ psiginfo @@ -14388,10 +14463,10 @@ Index: git/stdio-common/Makefile +# Ideally, _itowa and itowa-digits would be in this option group as +# well, but it is used unconditionally by printf_fp and printf_fphex, +# and it didn't seem straightforward to disentangle it. -+routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += \ -+ vfwprintf vfwscanf ++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ ++ += vfwprintf vfwscanf + -+aux := errlist siglist printf-parsemb fxprintf ++aux := errlist siglist printf-parsemb fxprintf +aux-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += printf-parsewc tests := tstscanf test_rdwr test-popen tstgetln test-fseek \ @@ -14405,7 +14480,6 @@ Index: git/stdio-common/Makefile - tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \ - tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 \ + scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf \ -+ scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf \ + tst-fseek tst-fmemopen tst-gets \ + tst-sprintf tst-rndseek tst-fdopen tst-fphex \ tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \ @@ -14413,25 +14487,24 @@ Index: git/stdio-common/Makefile - bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \ - scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \ - bug-vfprintf-nargs tst-long-dbl-fphex tst-fphex-wide tst-sprintf3 \ -- bug25 tst-printf-round bug26 + tst-fwrite bug16 bug17 tst-sprintf2 bug18 \ -+ bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \ -+ tst-setvbuf1 bug23 bug24 bug-vfprintf-nargs tst-sprintf3 bug25 \ -+ tst-printf-round bug26 -+ ++ bug19 tst-popen2 scanf14 scanf15 bug21 bug22 \ ++ scanf16 scanf17 tst-setvbuf1 bug23 bug24 \ ++ bug-vfprintf-nargs tst-sprintf3 \ + bug25 tst-printf-round bug23-2 bug23-3 bug23-4 bug26 +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ -+ += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping ++ += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping +tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ -+ += tst-perror bug19a bug20 tst-long-dbl-fphex tst-fphex-wide ++ += tst-perror bug19a bug20 tst-long-dbl-fphex tst-fphex-wide +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ -+ += bug18a tst-swscanf tst-wc-printf ++ += bug18a tst-swscanf tst-wc-printf test-srcs = tst-unbputc tst-printf Index: git/stdio-common/printf_fp.c =================================================================== ---- git.orig/stdio-common/printf_fp.c 2014-08-29 20:00:53.548070587 -0700 -+++ git/stdio-common/printf_fp.c 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/printf_fp.c ++++ git/stdio-common/printf_fp.c @@ -39,6 +39,7 @@ #include <unistd.h> #include <stdlib.h> @@ -14440,18 +14513,18 @@ Index: git/stdio-common/printf_fp.c #include <stdbool.h> #include <rounding-mode.h> -@@ -148,6 +149,10 @@ - wchar_t thousands_sep, int ngroups) - internal_function; +@@ -142,6 +143,10 @@ extern mp_size_t __mpn_extract_long_doub + extern unsigned int __guess_grouping (unsigned int intdig_max, + const char *grouping); +/* Ideally, when OPTION_EGLIBC_LOCALE_CODE is disabled, this should do + all its work in ordinary characters, rather than doing it in wide + characters and then converting at the end. But that is a challenge + for another day. */ - int - ___printf_fp (FILE *fp, -@@ -206,7 +211,14 @@ + static wchar_t *group_number (wchar_t *buf, wchar_t *bufend, + unsigned int intdig_no, const char *grouping, +@@ -251,7 +256,14 @@ ___printf_fp (FILE *fp, mp_limb_t cy; /* Nonzero if this is output on a wide character stream. */ @@ -14466,15 +14539,15 @@ Index: git/stdio-common/printf_fp.c /* Buffer in which we produce the output. */ wchar_t *wbuffer = NULL; -@@ -258,6 +270,7 @@ - +@@ -261,6 +273,7 @@ ___printf_fp (FILE *fp, + p.expsign = 0; /* Figure out the decimal point character. */ +#if __OPTION_EGLIBC_LOCALE_CODE if (info->extra == 0) { decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT); -@@ -277,7 +290,13 @@ +@@ -280,7 +293,13 @@ ___printf_fp (FILE *fp, /* The decimal point character must not be zero. */ assert (*decimal != '\0'); assert (decimalwc != L'\0'); @@ -14488,7 +14561,7 @@ Index: git/stdio-common/printf_fp.c if (info->group) { if (info->extra == 0) -@@ -321,6 +340,9 @@ +@@ -324,6 +343,9 @@ ___printf_fp (FILE *fp, } else grouping = NULL; @@ -14500,8 +14573,8 @@ Index: git/stdio-common/printf_fp.c #ifndef __NO_LONG_DOUBLE_MATH Index: git/stdio-common/printf_fphex.c =================================================================== ---- git.orig/stdio-common/printf_fphex.c 2014-08-29 20:00:53.548070587 -0700 -+++ git/stdio-common/printf_fphex.c 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/printf_fphex.c ++++ git/stdio-common/printf_fphex.c @@ -28,6 +28,7 @@ #include <_itoa.h> #include <_itowa.h> @@ -14510,7 +14583,7 @@ Index: git/stdio-common/printf_fphex.c #include <stdbool.h> #include <rounding-mode.h> -@@ -139,10 +140,18 @@ +@@ -139,10 +140,18 @@ __printf_fphex (FILE *fp, int done = 0; /* Nonzero if this is output on a wide character stream. */ @@ -14529,7 +14602,7 @@ Index: git/stdio-common/printf_fphex.c if (info->extra == 0) { decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT); -@@ -156,6 +165,10 @@ +@@ -156,6 +165,10 @@ __printf_fphex (FILE *fp, } /* The decimal point character must never be zero. */ assert (*decimal != '\0' && decimalwc != L'\0'); @@ -14542,8 +14615,8 @@ Index: git/stdio-common/printf_fphex.c /* Fetch the argument value. */ Index: git/stdio-common/printf_size.c =================================================================== ---- git.orig/stdio-common/printf_size.c 2014-08-29 20:00:53.548070587 -0700 -+++ git/stdio-common/printf_size.c 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/printf_size.c ++++ git/stdio-common/printf_size.c @@ -23,6 +23,7 @@ #include <math.h> #include <printf.h> @@ -14552,7 +14625,7 @@ Index: git/stdio-common/printf_size.c /* This defines make it possible to use the same code for GNU C library and -@@ -116,7 +117,14 @@ +@@ -116,7 +117,14 @@ __printf_size (FILE *fp, const struct pr struct printf_info fp_info; int done = 0; @@ -14569,25 +14642,25 @@ Index: git/stdio-common/printf_size.c /* Fetch the argument value. */ Index: git/stdio-common/scanf14.c =================================================================== ---- git.orig/stdio-common/scanf14.c 2014-08-29 20:00:53.548070587 -0700 -+++ git/stdio-common/scanf14.c 2014-08-29 20:01:15.232070587 -0700 -@@ -2,6 +2,7 @@ - #include <stdlib.h> +--- git.orig/stdio-common/scanf14.c ++++ git/stdio-common/scanf14.c +@@ -3,6 +3,7 @@ #include <string.h> #include <wchar.h> + #include <libc-internal.h> +#include <gnu/option-groups.h> #define FAIL() \ do { \ -@@ -36,6 +37,7 @@ - FAIL (); - else if (d != 2.25 || memcmp (c, " x", 2) != 0) - FAIL (); +@@ -48,6 +49,7 @@ main (void) + /* See explanation above. */ + DIAG_PUSH_NEEDS_COMMENT; + DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wformat"); +#if __OPTION_EGLIBC_LOCALE_CODE if (sscanf (" 3.25S x", "%4aS%3c", &lsp, c) != 2) FAIL (); else -@@ -45,6 +47,7 @@ +@@ -57,6 +59,7 @@ main (void) memset (lsp, 'x', sizeof L"3.25"); free (lsp); } @@ -14597,17 +14670,17 @@ Index: git/stdio-common/scanf14.c else Index: git/stdio-common/tstdiomisc.c =================================================================== ---- git.orig/stdio-common/tstdiomisc.c 2014-08-29 20:00:53.584070587 -0700 -+++ git/stdio-common/tstdiomisc.c 2014-08-29 20:01:15.232070587 -0700 -@@ -3,6 +3,7 @@ - #include <stdio.h> +--- git.orig/stdio-common/tstdiomisc.c ++++ git/stdio-common/tstdiomisc.c +@@ -4,6 +4,7 @@ #include <string.h> #include <wchar.h> + #include <libc-internal.h> +#include <gnu/option-groups.h> static int t1 (void) -@@ -125,6 +126,7 @@ +@@ -134,6 +135,7 @@ F (void) printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n", buf); @@ -14615,7 +14688,7 @@ Index: git/stdio-common/tstdiomisc.c swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%a %A %e %E %f %F %g %G", qnanval, qnanval, qnanval, qnanval, qnanval, qnanval, qnanval, qnanval); -@@ -162,6 +164,7 @@ +@@ -171,6 +173,7 @@ F (void) result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0; printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n", wbuf); @@ -14623,7 +14696,7 @@ Index: git/stdio-common/tstdiomisc.c lqnanval = NAN; -@@ -206,6 +209,7 @@ +@@ -215,6 +218,7 @@ F (void) printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n", buf); @@ -14631,7 +14704,7 @@ Index: git/stdio-common/tstdiomisc.c swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%La %LA %Le %LE %Lf %LF %Lg %LG", lqnanval, lqnanval, lqnanval, lqnanval, -@@ -250,6 +254,7 @@ +@@ -259,6 +263,7 @@ F (void) result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0; printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n", wbuf); @@ -14641,8 +14714,8 @@ Index: git/stdio-common/tstdiomisc.c } Index: git/stdio-common/tst-popen.c =================================================================== ---- git.orig/stdio-common/tst-popen.c 2014-08-29 20:00:53.576070587 -0700 -+++ git/stdio-common/tst-popen.c 2014-08-29 20:01:15.232070587 -0700 +--- git.orig/stdio-common/tst-popen.c ++++ git/stdio-common/tst-popen.c @@ -19,6 +19,7 @@ #include <stdio.h> #include <string.h> @@ -14651,7 +14724,7 @@ Index: git/stdio-common/tst-popen.c static int do_test (void) -@@ -34,12 +35,14 @@ +@@ -34,12 +35,14 @@ do_test (void) return 1; } @@ -14668,17 +14741,18 @@ Index: git/stdio-common/tst-popen.c { Index: git/stdio-common/tst-sprintf.c =================================================================== ---- git.orig/stdio-common/tst-sprintf.c 2014-08-29 20:00:53.580070587 -0700 -+++ git/stdio-common/tst-sprintf.c 2014-08-29 20:01:15.236070587 -0700 -@@ -2,6 +2,7 @@ - #include <stdlib.h> +--- git.orig/stdio-common/tst-sprintf.c ++++ git/stdio-common/tst-sprintf.c +@@ -3,7 +3,7 @@ #include <locale.h> #include <string.h> + #include <libc-internal.h> +- +#include <gnu/option-groups.h> - - int -@@ -10,12 +11,14 @@ + static int + do_test (void) +@@ -11,12 +11,14 @@ do_test (void) char buf[100]; int result = 0; @@ -14695,8 +14769,8 @@ Index: git/stdio-common/tst-sprintf.c #define STR(x) #x Index: git/stdio-common/vfprintf.c =================================================================== ---- git.orig/stdio-common/vfprintf.c 2014-08-29 20:00:53.588070587 -0700 -+++ git/stdio-common/vfprintf.c 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/stdio-common/vfprintf.c ++++ git/stdio-common/vfprintf.c @@ -29,6 +29,7 @@ #include <_itoa.h> #include <locale/localeinfo.h> @@ -14724,7 +14798,7 @@ Index: git/stdio-common/vfprintf.c #include "_i18n_number.h" /* Include the shared code for parsing the format string. */ -@@ -1123,8 +1136,11 @@ +@@ -1129,8 +1142,11 @@ vfprintf (FILE *s, const CHAR_T *format, # define process_string_arg(fspec) \ LABEL (form_character): \ /* Character. */ \ @@ -14738,7 +14812,7 @@ Index: git/stdio-common/vfprintf.c --width; /* Account for the character itself. */ \ if (!left) \ PAD (' '); \ -@@ -1137,6 +1153,7 @@ +@@ -1143,6 +1159,7 @@ vfprintf (FILE *s, const CHAR_T *format, break; \ \ LABEL (form_wcharacter): \ @@ -14746,7 +14820,7 @@ Index: git/stdio-common/vfprintf.c { \ /* Wide character. */ \ char buf[MB_CUR_MAX]; \ -@@ -1203,6 +1220,7 @@ +@@ -1209,6 +1226,7 @@ vfprintf (FILE *s, const CHAR_T *format, } \ else \ { \ @@ -14754,7 +14828,7 @@ Index: git/stdio-common/vfprintf.c const wchar_t *s2 = (const wchar_t *) string; \ mbstate_t mbstate; \ \ -@@ -1403,7 +1421,9 @@ +@@ -1409,7 +1427,9 @@ vfprintf (FILE *s, const CHAR_T *format, LABEL (flag_quote): group = 1; @@ -14765,7 +14839,7 @@ Index: git/stdio-common/vfprintf.c { #ifdef COMPILE_WPRINTF thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC, -@@ -1702,7 +1722,9 @@ +@@ -1708,7 +1728,9 @@ do_positional: free (workstart); workstart = NULL; @@ -14778,8 +14852,8 @@ Index: git/stdio-common/vfprintf.c thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC, Index: git/stdio-common/vfscanf.c =================================================================== ---- git.orig/stdio-common/vfscanf.c 2014-08-29 20:00:53.588070587 -0700 -+++ git/stdio-common/vfscanf.c 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/stdio-common/vfscanf.c ++++ git/stdio-common/vfscanf.c @@ -29,6 +29,7 @@ #include <wctype.h> #include <bits/libc-lock.h> @@ -14801,7 +14875,7 @@ Index: git/stdio-common/vfscanf.c #define encode_error() do { \ errval = 4; \ __set_errno (EILSEQ); \ -@@ -316,24 +323,35 @@ +@@ -316,24 +323,35 @@ _IO_vfscanf_internal (_IO_FILE *s, const ARGCHECK (s, format); { @@ -14844,7 +14918,7 @@ Index: git/stdio-common/vfscanf.c } /* Lock the stream. */ -@@ -385,6 +403,8 @@ +@@ -385,6 +403,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const #ifndef COMPILE_WSCANF if (!isascii ((unsigned char) *f)) { @@ -14853,7 +14927,7 @@ Index: git/stdio-common/vfscanf.c /* Non-ASCII, may be a multibyte. */ int len = __mbrlen (f, strlen (f), &state); if (len > 0) -@@ -830,6 +850,8 @@ +@@ -830,6 +850,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const } /* FALLTHROUGH */ case L_('C'): @@ -14862,7 +14936,7 @@ Index: git/stdio-common/vfscanf.c if (width == -1) width = 1; -@@ -1172,6 +1194,8 @@ +@@ -1172,6 +1194,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const /* FALLTHROUGH */ case L_('S'): @@ -14871,7 +14945,7 @@ Index: git/stdio-common/vfscanf.c { #ifndef COMPILE_WSCANF mbstate_t cstate; -@@ -1419,10 +1443,17 @@ +@@ -1419,10 +1443,17 @@ _IO_vfscanf_internal (_IO_FILE *s, const const char *mbdigits[10]; const char *mbdigits_extended[10]; #endif @@ -14889,7 +14963,7 @@ Index: git/stdio-common/vfscanf.c int n; from_level = 0; -@@ -2088,6 +2119,7 @@ +@@ -2088,6 +2119,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const --width; } @@ -14897,7 +14971,7 @@ Index: git/stdio-common/vfscanf.c wctrans_t map; if (__builtin_expect ((flags & I18N) != 0, 0) /* Hexadecimal floats make no sense, fixing localized -@@ -2304,6 +2336,7 @@ +@@ -2304,6 +2336,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const ; #endif } @@ -14905,7 +14979,7 @@ Index: git/stdio-common/vfscanf.c /* Have we read any character? If we try to read a number in hexadecimal notation and we have read only the `0x' -@@ -2343,7 +2376,10 @@ +@@ -2343,7 +2376,10 @@ _IO_vfscanf_internal (_IO_FILE *s, const case L_('['): /* Character class. */ if (flags & LONG) @@ -14917,7 +14991,7 @@ Index: git/stdio-common/vfscanf.c else STRING_ARG (str, char, 100); -@@ -2417,6 +2453,7 @@ +@@ -2417,6 +2453,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const if (flags & LONG) { size_t now = read_in; @@ -14927,8 +15001,8 @@ Index: git/stdio-common/vfscanf.c input_error (); Index: git/stdlib/Makefile =================================================================== ---- git.orig/stdlib/Makefile 2014-08-29 20:00:53.588070587 -0700 -+++ git/stdlib/Makefile 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/stdlib/Makefile ++++ git/stdlib/Makefile @@ -18,6 +18,8 @@ # # Makefile for stdlib routines @@ -14938,7 +15012,7 @@ Index: git/stdlib/Makefile subdir := stdlib include ../Makeconfig -@@ -30,7 +32,7 @@ +@@ -30,7 +32,7 @@ headers := stdlib.h bits/stdlib.h bits/s alloca.h fmtmsg.h \ bits/stdlib-bsearch.h @@ -14947,7 +15021,7 @@ Index: git/stdlib/Makefile atof atoi atol atoll \ abort \ bsearch qsort msort \ -@@ -39,7 +41,6 @@ +@@ -39,7 +41,6 @@ routines := \ quick_exit at_quick_exit cxa_at_quick_exit cxa_thread_atexit_impl \ abs labs llabs \ div ldiv lldiv \ @@ -14955,7 +15029,7 @@ Index: git/stdlib/Makefile random random_r rand rand_r \ drand48 erand48 lrand48 nrand48 mrand48 jrand48 \ srand48 seed48 lcong48 \ -@@ -52,9 +53,18 @@ +@@ -52,9 +53,18 @@ routines := \ strtof_l strtod_l strtold_l \ system canonicalize \ a64l l64a \ @@ -14976,7 +15050,7 @@ Index: git/stdlib/Makefile aux = grouping groupingwc tens_in_limb # These routines will be omitted from the libc shared object. -@@ -62,20 +72,22 @@ +@@ -62,20 +72,22 @@ aux = grouping groupingwc tens_in_limb # linked against when the shared library will be used. static-only-routines = atexit at_quick_exit @@ -15007,7 +15081,7 @@ Index: git/stdlib/Makefile modules-names = tst-tls-atexit-lib ifeq ($(build-shared),yes) -@@ -115,8 +127,10 @@ +@@ -115,8 +127,10 @@ CFLAGS-tst-makecontext2.c = $(stack-alig tests-special += $(objpfx)isomac.out ifeq ($(run-built-tests),yes) @@ -15020,8 +15094,8 @@ Index: git/stdlib/Makefile Index: git/stdlib/strtod_l.c =================================================================== ---- git.orig/stdlib/strtod_l.c 2014-08-29 20:00:53.648070587 -0700 -+++ git/stdlib/strtod_l.c 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/stdlib/strtod_l.c ++++ git/stdlib/strtod_l.c @@ -17,6 +17,7 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ @@ -15030,7 +15104,7 @@ Index: git/stdlib/strtod_l.c #include <xlocale.h> extern double ____strtod_l_internal (const char *, char **, int, __locale_t); -@@ -548,6 +549,7 @@ +@@ -548,6 +549,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group /* Used in several places. */ int cnt; @@ -15038,7 +15112,7 @@ Index: git/stdlib/strtod_l.c struct __locale_data *current = loc->__locales[LC_NUMERIC]; if (__glibc_unlikely (group)) -@@ -586,6 +588,17 @@ +@@ -586,6 +588,17 @@ ____STRTOF_INTERNAL (nptr, endptr, group decimal_len = strlen (decimal); assert (decimal_len > 0); #endif @@ -15058,8 +15132,8 @@ Index: git/stdlib/strtod_l.c exponent = 0; Index: git/stdlib/tst-strtod.c =================================================================== ---- git.orig/stdlib/tst-strtod.c 2014-08-29 20:00:53.700070587 -0700 -+++ git/stdlib/tst-strtod.c 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/stdlib/tst-strtod.c ++++ git/stdlib/tst-strtod.c @@ -23,6 +23,7 @@ #include <errno.h> #include <string.h> @@ -15068,7 +15142,7 @@ Index: git/stdlib/tst-strtod.c struct ltest { -@@ -176,7 +177,9 @@ +@@ -176,7 +177,9 @@ main (int argc, char ** argv) status |= long_dbl (); @@ -15078,7 +15152,7 @@ Index: git/stdlib/tst-strtod.c return status ? EXIT_FAILURE : EXIT_SUCCESS; } -@@ -219,6 +222,7 @@ +@@ -219,6 +222,7 @@ long_dbl (void) return 0; } @@ -15086,15 +15160,15 @@ Index: git/stdlib/tst-strtod.c /* Perform a few tests in a locale with thousands separators. */ static int locale_test (void) -@@ -276,3 +280,4 @@ +@@ -276,3 +280,4 @@ locale_test (void) return result; } +#endif /* __OPTION_EGLIBC_LOCALE_CODE */ Index: git/streams/Makefile =================================================================== ---- git.orig/streams/Makefile 2014-08-29 20:00:53.712070587 -0700 -+++ git/streams/Makefile 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/streams/Makefile ++++ git/streams/Makefile @@ -18,11 +18,14 @@ # # Makefile for streams. @@ -15113,8 +15187,8 @@ Index: git/streams/Makefile include ../Rules Index: git/string/Makefile =================================================================== ---- git.orig/string/Makefile 2014-08-29 20:00:53.716070587 -0700 -+++ git/string/Makefile 2014-08-29 20:01:15.236070587 -0700 +--- git.orig/string/Makefile ++++ git/string/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for string portion of library. @@ -15124,7 +15198,7 @@ Index: git/string/Makefile subdir := string include ../Makeconfig -@@ -39,10 +41,12 @@ +@@ -39,10 +41,12 @@ routines := strcat strchr strcmp strcoll $(addprefix argz-,append count create ctsep next \ delete extract insert stringify \ addsep replace) \ @@ -15138,7 +15212,7 @@ Index: git/string/Makefile strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \ stpcpy stpncpy strcat strchr strcmp strcpy strcspn \ strlen strncmp strncpy strpbrk strrchr strspn memmem \ -@@ -51,10 +55,12 @@ +@@ -51,10 +55,12 @@ strop-tests := memchr memcmp memcpy memm tests := tester inl-tester noinl-tester testcopy test-ffs \ tst-strlen stratcliff tst-svc tst-inlcall \ bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \ @@ -15156,17 +15230,17 @@ Index: git/string/Makefile Index: git/string/strcoll_l.c =================================================================== ---- git.orig/string/strcoll_l.c 2014-08-29 20:00:53.744070587 -0700 -+++ git/string/strcoll_l.c 2014-08-29 20:01:15.240070587 -0700 -@@ -25,6 +25,7 @@ - #include <stdlib.h> +--- git.orig/string/strcoll_l.c ++++ git/string/strcoll_l.c +@@ -24,6 +24,7 @@ + #include <stdint.h> #include <string.h> #include <sys/param.h> +#include <gnu/option-groups.h> #ifndef STRING_TYPE # define STRING_TYPE char -@@ -472,7 +473,11 @@ +@@ -247,7 +248,11 @@ int STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l) { struct __locale_data *current = l->__locales[LC_COLLATE]; @@ -15180,8 +15254,8 @@ Index: git/string/strcoll_l.c const unsigned char *rulesets; Index: git/string/strerror_l.c =================================================================== ---- git.orig/string/strerror_l.c 2014-08-29 20:00:53.744070587 -0700 -+++ git/string/strerror_l.c 2014-08-29 20:01:15.240070587 -0700 +--- git.orig/string/strerror_l.c ++++ git/string/strerror_l.c @@ -21,6 +21,7 @@ #include <stdlib.h> #include <string.h> @@ -15190,7 +15264,7 @@ Index: git/string/strerror_l.c static __thread char *last_value; -@@ -29,10 +30,14 @@ +@@ -29,10 +30,14 @@ static __thread char *last_value; static const char * translate (const char *str, locale_t loc) { @@ -15207,8 +15281,8 @@ Index: git/string/strerror_l.c Index: git/string/strxfrm_l.c =================================================================== ---- git.orig/string/strxfrm_l.c 2014-08-29 20:00:53.748070587 -0700 -+++ git/string/strxfrm_l.c 2014-08-29 20:01:15.240070587 -0700 +--- git.orig/string/strxfrm_l.c ++++ git/string/strxfrm_l.c @@ -24,6 +24,7 @@ #include <stdlib.h> #include <string.h> @@ -15217,23 +15291,23 @@ Index: git/string/strxfrm_l.c #ifndef STRING_TYPE # define STRING_TYPE char -@@ -85,7 +86,11 @@ - STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l) +@@ -670,7 +671,11 @@ STRXFRM (STRING_TYPE *dest, const STRING { + locale_data_t l_data; struct __locale_data *current = l->__locales[LC_COLLATE]; +#if __OPTION_EGLIBC_LOCALE_CODE - uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word; + l_data.nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word; +#else -+ const uint_fast32_t nrules = 0; ++ l_data.nrules = 0; +#endif - /* We don't assign the following values right away since it might be - unnecessary in case there are no rules. */ - const unsigned char *rulesets; + + /* Handle byte comparison case. */ + if (l_data.nrules == 0) Index: git/string/test-strcmp.c =================================================================== ---- git.orig/string/test-strcmp.c 2014-08-29 20:00:53.752070587 -0700 -+++ git/string/test-strcmp.c 2014-08-29 20:01:15.240070587 -0700 -@@ -329,34 +329,6 @@ +--- git.orig/string/test-strcmp.c ++++ git/string/test-strcmp.c +@@ -329,34 +329,6 @@ check (void) FOR_EACH_IMPL (impl, 0) check_result (impl, s1 + i1, s2 + i2, exp_result); } @@ -15270,8 +15344,8 @@ Index: git/string/test-strcmp.c Index: git/string/tst-strxfrm2.c =================================================================== ---- git.orig/string/tst-strxfrm2.c 2014-08-29 20:00:53.756070587 -0700 -+++ git/string/tst-strxfrm2.c 2014-08-29 20:01:15.240070587 -0700 +--- git.orig/string/tst-strxfrm2.c ++++ git/string/tst-strxfrm2.c @@ -1,6 +1,7 @@ #include <locale.h> #include <stdio.h> @@ -15280,7 +15354,7 @@ Index: git/string/tst-strxfrm2.c static int do_test (void) -@@ -38,6 +39,7 @@ +@@ -38,6 +39,7 @@ do_test (void) res = 1; } @@ -15288,7 +15362,7 @@ Index: git/string/tst-strxfrm2.c if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) { puts ("setlocale failed"); -@@ -75,6 +77,7 @@ +@@ -75,6 +77,7 @@ do_test (void) res = 1; } } @@ -15298,8 +15372,8 @@ Index: git/string/tst-strxfrm2.c } Index: git/string/tst-strxfrm.c =================================================================== ---- git.orig/string/tst-strxfrm.c 2014-08-29 20:00:53.756070587 -0700 -+++ git/string/tst-strxfrm.c 2014-08-29 20:01:15.240070587 -0700 +--- git.orig/string/tst-strxfrm.c ++++ git/string/tst-strxfrm.c @@ -3,6 +3,7 @@ #include <stdio.h> #include <stdlib.h> @@ -15308,7 +15382,7 @@ Index: git/string/tst-strxfrm.c char const string[] = ""; -@@ -64,8 +65,10 @@ +@@ -64,8 +65,10 @@ do_test (void) int result = 0; result |= test ("C"); @@ -15321,8 +15395,8 @@ Index: git/string/tst-strxfrm.c } Index: git/sunrpc/Makefile =================================================================== ---- git.orig/sunrpc/Makefile 2014-08-29 20:00:53.760070587 -0700 -+++ git/sunrpc/Makefile 2014-08-29 20:01:15.240070587 -0700 +--- git.orig/sunrpc/Makefile ++++ git/sunrpc/Makefile @@ -18,6 +18,8 @@ # # Sub-makefile for sunrpc portion of the library. @@ -15332,7 +15406,7 @@ Index: git/sunrpc/Makefile subdir := sunrpc include ../Makeconfig -@@ -55,7 +57,6 @@ +@@ -55,7 +57,6 @@ headers-in-tirpc = $(addprefix rpc/,auth headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \ $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h headers = rpc/netdb.h @@ -15340,7 +15414,7 @@ Index: git/sunrpc/Makefile generated += $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \ $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen generated-dirs += rpcsvc -@@ -65,18 +66,28 @@ +@@ -65,18 +66,28 @@ headers += $(headers-in-tirpc) $(headers endif ifeq ($(build-shared),yes) @@ -15374,7 +15448,7 @@ Index: git/sunrpc/Makefile ifneq ($(link-obsolete-rpc),yes) # We only add the RPC for compatibility to libc.so. shared-only-routines = $(routines) -@@ -85,25 +96,28 @@ +@@ -85,25 +96,28 @@ endif # We do not build rpcinfo anymore. It is not needed for a bootstrap # and not wanted on complete systems. @@ -15415,9 +15489,9 @@ Index: git/sunrpc/Makefile omit-deps = $(librpcsvc-routines) Index: git/sysdeps/generic/ldsodefs.h =================================================================== ---- git.orig/sysdeps/generic/ldsodefs.h 2014-08-29 20:00:53.904070587 -0700 -+++ git/sysdeps/generic/ldsodefs.h 2014-08-29 20:01:15.240070587 -0700 -@@ -425,6 +425,12 @@ +--- git.orig/sysdeps/generic/ldsodefs.h ++++ git/sysdeps/generic/ldsodefs.h +@@ -425,6 +425,12 @@ extern struct rtld_global _rtld_global _ # undef __rtld_global_attribute__ #endif @@ -15430,7 +15504,7 @@ Index: git/sysdeps/generic/ldsodefs.h #ifndef SHARED # define GLRO(name) _##name #else -@@ -437,8 +443,10 @@ +@@ -437,8 +443,10 @@ struct rtld_global_ro { #endif @@ -15443,9 +15517,9 @@ Index: git/sysdeps/generic/ldsodefs.h #define DL_DEBUG_BINDINGS (1 << 2) Index: git/sysdeps/gnu/Makefile =================================================================== ---- git.orig/sysdeps/gnu/Makefile 2014-08-29 20:00:53.924070587 -0700 -+++ git/sysdeps/gnu/Makefile 2014-08-29 20:01:15.240070587 -0700 -@@ -57,7 +57,8 @@ +--- git.orig/sysdeps/gnu/Makefile ++++ git/sysdeps/gnu/Makefile +@@ -59,7 +59,8 @@ $(foreach o,$(object-suffixes) $(object- endif ifeq ($(subdir),login) @@ -15457,9 +15531,9 @@ Index: git/sysdeps/gnu/Makefile sysdep_headers += utmpx.h bits/utmpx.h Index: git/sysdeps/ieee754/ldbl-opt/Makefile =================================================================== ---- git.orig/sysdeps/ieee754/ldbl-opt/Makefile 2014-08-29 20:00:54.452070587 -0700 -+++ git/sysdeps/ieee754/ldbl-opt/Makefile 2014-08-29 20:01:15.244070587 -0700 -@@ -11,19 +11,18 @@ +--- git.orig/sysdeps/ieee754/ldbl-opt/Makefile ++++ git/sysdeps/ieee754/ldbl-opt/Makefile +@@ -11,19 +11,18 @@ libm-routines += s_nexttowardfd routines += math_ldbl_opt nldbl-compat extra-libs += libnldbl @@ -15488,7 +15562,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/Makefile strtold strtold_l strtoldint wcstold wcstold_l wcstoldint \ qecvt qfcvt qgcvt qecvt_r qfcvt_r \ isinf isnan finite signbit scalb log2 lgamma_r ceil \ -@@ -38,9 +37,15 @@ +@@ -38,9 +37,15 @@ libnldbl-calls = asprintf dprintf fprint casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \ cabs carg cimag creal clog10 \ isoc99_scanf isoc99_fscanf isoc99_sscanf \ @@ -15507,8 +15581,8 @@ Index: git/sysdeps/ieee754/ldbl-opt/Makefile libnldbl-static-only-routines = $(libnldbl-routines) Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c =================================================================== ---- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.c 2014-08-29 20:00:54.468070587 -0700 -+++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.c ++++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c @@ -26,6 +26,7 @@ #include <locale/localeinfo.h> #include <sys/syslog.h> @@ -15517,7 +15591,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c #include "nldbl-compat.h" -@@ -33,20 +34,14 @@ +@@ -33,20 +34,14 @@ libc_hidden_proto (__nldbl_vfprintf) libc_hidden_proto (__nldbl_vsscanf) libc_hidden_proto (__nldbl_vsprintf) libc_hidden_proto (__nldbl_vfscanf) @@ -15538,7 +15612,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c libc_hidden_proto (__nldbl___vasprintf_chk) libc_hidden_proto (__nldbl___vdprintf_chk) libc_hidden_proto (__nldbl___obstack_vprintf_chk) -@@ -54,8 +49,17 @@ +@@ -54,8 +49,17 @@ libc_hidden_proto (__nldbl___vstrfmon) libc_hidden_proto (__nldbl___vstrfmon_l) libc_hidden_proto (__nldbl___isoc99_vsscanf) libc_hidden_proto (__nldbl___isoc99_vfscanf) @@ -15556,7 +15630,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c static void __nldbl_cleanup (void *arg) -@@ -117,6 +121,7 @@ +@@ -117,6 +121,7 @@ __nldbl_fprintf (FILE *stream, const cha } weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf) @@ -15564,7 +15638,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section weak_function __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...) -@@ -130,6 +135,7 @@ +@@ -130,6 +135,7 @@ __nldbl_fwprintf (FILE *stream, const wc return done; } @@ -15572,7 +15646,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -226,6 +232,7 @@ +@@ -226,6 +232,7 @@ __nldbl_snprintf (char *s, size_t maxlen return done; } @@ -15580,7 +15654,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...) -@@ -239,6 +246,7 @@ +@@ -239,6 +246,7 @@ __nldbl_swprintf (wchar_t *s, size_t n, return done; } @@ -15588,7 +15662,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section weak_function -@@ -264,6 +272,7 @@ +@@ -264,6 +272,7 @@ __nldbl_vdprintf (int d, const char *fmt } libc_hidden_def (__nldbl_vdprintf) @@ -15596,7 +15670,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section weak_function __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap) -@@ -275,6 +284,7 @@ +@@ -275,6 +284,7 @@ __nldbl_vfwprintf (FILE *s, const wchar_ return res; } libc_hidden_def (__nldbl_vfwprintf) @@ -15604,7 +15678,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -297,6 +307,7 @@ +@@ -297,6 +307,7 @@ __nldbl_vsnprintf (char *string, size_t libc_hidden_def (__nldbl_vsnprintf) weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf) @@ -15612,7 +15686,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section weak_function __nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt, -@@ -330,6 +341,7 @@ +@@ -330,6 +341,7 @@ __nldbl_wprintf (const wchar_t *fmt, ... return done; } @@ -15620,7 +15694,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -419,6 +431,7 @@ +@@ -419,6 +431,7 @@ __nldbl_scanf (const char *fmt, ...) return done; } @@ -15628,7 +15702,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) -@@ -491,6 +504,7 @@ +@@ -491,6 +504,7 @@ __nldbl_wscanf (const wchar_t *fmt, ...) return done; } @@ -15636,7 +15710,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -506,6 +520,7 @@ +@@ -506,6 +520,7 @@ __nldbl___fprintf_chk (FILE *stream, int return done; } @@ -15644,7 +15718,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...) -@@ -519,6 +534,7 @@ +@@ -519,6 +534,7 @@ __nldbl___fwprintf_chk (FILE *stream, in return done; } @@ -15652,7 +15726,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -563,6 +579,7 @@ +@@ -563,6 +579,7 @@ __nldbl___sprintf_chk (char *s, int flag return done; } @@ -15660,7 +15734,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen, -@@ -577,6 +594,7 @@ +@@ -577,6 +594,7 @@ __nldbl___swprintf_chk (wchar_t *s, size return done; } @@ -15668,7 +15742,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -590,6 +608,7 @@ +@@ -590,6 +608,7 @@ __nldbl___vfprintf_chk (FILE *s, int fla } libc_hidden_def (__nldbl___vfprintf_chk) @@ -15676,7 +15750,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap) -@@ -601,6 +620,7 @@ +@@ -601,6 +620,7 @@ __nldbl___vfwprintf_chk (FILE *s, int fl return res; } libc_hidden_def (__nldbl___vfwprintf_chk) @@ -15684,7 +15758,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -635,6 +655,7 @@ +@@ -635,6 +655,7 @@ __nldbl___vsprintf_chk (char *string, in } libc_hidden_def (__nldbl___vsprintf_chk) @@ -15692,7 +15766,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen, -@@ -668,6 +689,7 @@ +@@ -668,6 +689,7 @@ __nldbl___wprintf_chk (int flag, const w return done; } @@ -15700,7 +15774,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section -@@ -775,6 +797,7 @@ +@@ -775,6 +797,7 @@ __nldbl___printf_fp (FILE *fp, const str return ___printf_fp (fp, &info_no_ldbl, args); } @@ -15708,7 +15782,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c ssize_t attribute_compat_text_section __nldbl_strfmon (char *s, size_t maxsize, const char *format, ...) -@@ -829,6 +852,7 @@ +@@ -829,6 +852,7 @@ __nldbl___vstrfmon_l (char *s, size_t ma return res; } libc_hidden_def (__nldbl___vstrfmon_l) @@ -15716,7 +15790,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c void attribute_compat_text_section -@@ -941,6 +965,7 @@ +@@ -941,6 +965,7 @@ __nldbl___isoc99_scanf (const char *fmt, return done; } @@ -15724,7 +15798,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c int attribute_compat_text_section __nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) -@@ -1014,6 +1039,7 @@ +@@ -1014,6 +1039,7 @@ __nldbl___isoc99_wscanf (const wchar_t * return done; } @@ -15732,7 +15806,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0); -@@ -1057,6 +1083,7 @@ +@@ -1057,6 +1083,7 @@ compat_symbol (libc, __nldbl_printf_size compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1); #endif #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2) @@ -15740,7 +15814,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c compat_symbol (libc, __nldbl_swprintf, swprintf, GLIBC_2_2); compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2); compat_symbol (libc, __nldbl_wprintf, wprintf, GLIBC_2_2); -@@ -1069,6 +1096,7 @@ +@@ -1069,6 +1096,7 @@ compat_symbol (libc, __nldbl_vfwscanf, v compat_symbol (libc, __nldbl_vswscanf, vswscanf, GLIBC_2_2); compat_symbol (libc, __nldbl_vwscanf, vwscanf, GLIBC_2_2); compat_symbol (libc, __nldbl_wscanf, wscanf, GLIBC_2_2); @@ -15750,8 +15824,8 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.c compat_symbol (libc, __nldbl_strfmon_l, strfmon_l, GLIBC_2_3); Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h =================================================================== ---- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.h 2014-08-29 20:00:54.468070587 -0700 -+++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/sysdeps/ieee754/ldbl-opt/nldbl-compat.h ++++ git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h @@ -30,6 +30,7 @@ #include <math.h> #include <monetary.h> @@ -15780,7 +15854,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h NLDBL_DECL (__asprintf); NLDBL_DECL (asprintf); NLDBL_DECL (__printf_fp); -@@ -66,12 +63,18 @@ +@@ -66,12 +63,18 @@ NLDBL_DECL (__isoc99_sscanf); NLDBL_DECL (__isoc99_vscanf); NLDBL_DECL (__isoc99_vfscanf); NLDBL_DECL (__isoc99_vsscanf); @@ -15799,7 +15873,7 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h /* This one does not exist in the normal interface, only __nldbl___vstrfmon really exists. */ -@@ -82,22 +85,23 @@ +@@ -82,22 +85,23 @@ extern ssize_t __nldbl___vstrfmon (char since we don't compile with _FORTIFY_SOURCE. */ extern int __nldbl___vfprintf_chk (FILE *__restrict, int, const char *__restrict, _G_va_list); @@ -15831,8 +15905,8 @@ Index: git/sysdeps/ieee754/ldbl-opt/nldbl-compat.h #endif /* __NLDBL_COMPAT_H */ Index: git/sysdeps/unix/sysv/linux/gethostid.c =================================================================== ---- git.orig/sysdeps/unix/sysv/linux/gethostid.c 2014-08-29 20:00:58.840070587 -0700 -+++ git/sysdeps/unix/sysv/linux/gethostid.c 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/sysdeps/unix/sysv/linux/gethostid.c ++++ git/sysdeps/unix/sysv/linux/gethostid.c @@ -21,6 +21,7 @@ #include <unistd.h> #include <netdb.h> @@ -15841,7 +15915,7 @@ Index: git/sysdeps/unix/sysv/linux/gethostid.c #define HOSTIDFILE "/etc/hostid" -@@ -89,6 +90,7 @@ +@@ -89,6 +90,7 @@ gethostid (void) return id; } @@ -15849,7 +15923,7 @@ Index: git/sysdeps/unix/sysv/linux/gethostid.c /* Getting from the file was not successful. An intelligent guess for a unique number of a host is its IP address. Return this. */ if (__gethostname (hostname, MAXHOSTNAMELEN) < 0 || hostname[0] == '\0') -@@ -115,5 +117,9 @@ +@@ -115,5 +117,9 @@ gethostid (void) /* For the return value to be not exactly the IP address we do some bit fiddling. */ return (int32_t) (in.s_addr << 16 | in.s_addr >> 16); @@ -15861,8 +15935,8 @@ Index: git/sysdeps/unix/sysv/linux/gethostid.c #endif Index: git/sysdeps/unix/sysv/linux/libc_fatal.c =================================================================== ---- git.orig/sysdeps/unix/sysv/linux/libc_fatal.c 2014-08-29 20:00:58.980070587 -0700 -+++ git/sysdeps/unix/sysv/linux/libc_fatal.c 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/sysdeps/unix/sysv/linux/libc_fatal.c ++++ git/sysdeps/unix/sysv/linux/libc_fatal.c @@ -23,6 +23,7 @@ #include <string.h> #include <sys/mman.h> @@ -15871,7 +15945,7 @@ Index: git/sysdeps/unix/sysv/linux/libc_fatal.c static bool writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total) -@@ -40,6 +41,7 @@ +@@ -40,6 +41,7 @@ writev_for_fatal (int fd, const struct i static void backtrace_and_maps (int do_abort, bool written, int fd) { @@ -15879,7 +15953,7 @@ Index: git/sysdeps/unix/sysv/linux/libc_fatal.c if (do_abort > 1 && written) { void *addrs[64]; -@@ -62,6 +64,7 @@ +@@ -62,6 +64,7 @@ backtrace_and_maps (int do_abort, bool w close_not_cancel_no_status (fd2); } } @@ -15889,8 +15963,8 @@ Index: git/sysdeps/unix/sysv/linux/libc_fatal.c Index: git/time/Makefile =================================================================== ---- git.orig/time/Makefile 2014-08-29 20:00:59.504070587 -0700 -+++ git/time/Makefile 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/time/Makefile ++++ git/time/Makefile @@ -18,6 +18,8 @@ # # Makefile for time routines @@ -15900,7 +15974,7 @@ Index: git/time/Makefile subdir := time include ../Makeconfig -@@ -30,14 +32,20 @@ +@@ -30,15 +32,23 @@ routines := offtime asctime clock ctime tzfile getitimer setitimer \ stime dysize timegm ftime \ getdate strptime strptime_l \ @@ -15908,27 +15982,30 @@ Index: git/time/Makefile + strftime strftime_l \ timespec_get -aux := era alt_digit lc-time-cleanup -+routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ -+ := wcsftime wcsftime_l -+aux-$(OPTION_EGLIBC_LOCALE_CODE) += alt_digit era lc-time-cleanup -tests := test_time clocktest tst-posixtz tst-strptime tst_wcsftime \ - tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \ ++routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ ++ := wcsftime wcsftime_l ++aux-$(OPTION_EGLIBC_LOCALE_CODE) += alt_digit era lc-time-cleanup ++ +tests := test_time clocktest tst-posixtz \ + tst-getdate tst-mktime tst-mktime2 tst-strftime \ tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 \ - tst-strptime3 bug-getdate1 tst-strptime-whitespace + tst-strptime3 bug-getdate1 tst-strptime-whitespace tst-ftime + +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ -+ += tst-strptime tst-ftime_l ++ += tst-strptime tst-ftime_l +tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ -+ += tst_wcsftime - ++ += tst_wcsftime ++ include ../Rules + tz-cflags = -DTZDIR='"$(zonedir)"' \ Index: git/time/strftime_l.c =================================================================== ---- git.orig/time/strftime_l.c 2014-08-29 20:00:59.528070587 -0700 -+++ git/time/strftime_l.c 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/time/strftime_l.c ++++ git/time/strftime_l.c @@ -35,6 +35,10 @@ # include "../locale/localeinfo.h" #endif @@ -15940,7 +16017,7 @@ Index: git/time/strftime_l.c #if defined emacs && !defined HAVE_BCOPY # define HAVE_MEMCPY 1 #endif -@@ -882,7 +886,7 @@ +@@ -882,7 +886,7 @@ __strftime_internal (s, maxsize, format, case L_('C'): if (modifier == L_('E')) { @@ -15949,7 +16026,7 @@ Index: git/time/strftime_l.c struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { -@@ -955,7 +959,7 @@ +@@ -955,7 +959,7 @@ __strftime_internal (s, maxsize, format, if (modifier == L_('O') && 0 <= number_value) { @@ -15958,7 +16035,7 @@ Index: git/time/strftime_l.c /* Get the locale specific alternate representation of the number NUMBER_VALUE. If none exist NULL is returned. */ const CHAR_T *cp = nl_get_alt_digit (number_value -@@ -1260,7 +1264,7 @@ +@@ -1260,7 +1264,7 @@ __strftime_internal (s, maxsize, format, case L_('Y'): if (modifier == 'E') { @@ -15967,7 +16044,7 @@ Index: git/time/strftime_l.c struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { -@@ -1285,7 +1289,7 @@ +@@ -1285,7 +1289,7 @@ __strftime_internal (s, maxsize, format, case L_('y'): if (modifier == L_('E')) { @@ -15978,8 +16055,8 @@ Index: git/time/strftime_l.c { Index: git/time/strptime_l.c =================================================================== ---- git.orig/time/strptime_l.c 2014-08-29 20:00:59.528070587 -0700 -+++ git/time/strptime_l.c 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/time/strptime_l.c ++++ git/time/strptime_l.c @@ -29,6 +29,7 @@ #ifdef _LIBC @@ -15988,7 +16065,7 @@ Index: git/time/strptime_l.c # include "../locale/localeinfo.h" #endif -@@ -84,7 +85,7 @@ +@@ -84,7 +85,7 @@ localtime_r (t, tp) if (val < from || val > to) \ return NULL; \ } while (0) @@ -15997,7 +16074,18 @@ Index: git/time/strptime_l.c # define get_alt_number(from, to, n) \ ({ \ __label__ do_normal; \ -@@ -820,6 +821,7 @@ +@@ -257,8 +258,10 @@ __strptime_internal (rp, fmt, tmp, state + int cnt; + int cnt_longest; + size_t val; ++#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE + size_t num_eras; + struct era_entry *era = NULL; ++#endif + enum ptime_locale_status { not, loc, raw } decided_longest; + struct __strptime_state + { +@@ -820,6 +823,7 @@ __strptime_internal (rp, fmt, tmp, state s.want_xday = 1; break; case 'C': @@ -16005,7 +16093,7 @@ Index: git/time/strptime_l.c if (s.decided != raw) { if (s.era_cnt >= 0) -@@ -856,10 +858,12 @@ +@@ -856,10 +860,12 @@ __strptime_internal (rp, fmt, tmp, state s.decided = raw; } @@ -16018,7 +16106,7 @@ Index: git/time/strptime_l.c if (s.decided != raw) { get_number(0, 9999, 4); -@@ -918,9 +922,10 @@ +@@ -918,9 +924,10 @@ __strptime_internal (rp, fmt, tmp, state s.decided = raw; } @@ -16030,7 +16118,7 @@ Index: git/time/strptime_l.c if (s.decided != raw) { num_eras = _NL_CURRENT_WORD (LC_TIME, -@@ -948,6 +953,7 @@ +@@ -948,6 +955,7 @@ __strptime_internal (rp, fmt, tmp, state s.decided = raw; } @@ -16038,7 +16126,7 @@ Index: git/time/strptime_l.c get_number (0, 9999, 4); tm->tm_year = val - 1900; s.want_century = 0; -@@ -1118,6 +1124,7 @@ +@@ -1118,6 +1126,7 @@ __strptime_internal (rp, fmt, tmp, state tm->tm_year = (s.century - 19) * 100; } @@ -16046,7 +16134,7 @@ Index: git/time/strptime_l.c if (s.era_cnt != -1) { era = _nl_select_era_entry (s.era_cnt HELPER_LOCALE_ARG); -@@ -1132,6 +1139,7 @@ +@@ -1132,6 +1141,7 @@ __strptime_internal (rp, fmt, tmp, state tm->tm_year = era->start_date[0]; } else @@ -16056,9 +16144,9 @@ Index: git/time/strptime_l.c /* No era found but we have seen an E modifier. Rectify some Index: git/timezone/Makefile =================================================================== ---- git.orig/timezone/Makefile 2014-08-29 20:01:14.044070587 -0700 -+++ git/timezone/Makefile 2014-08-29 20:01:15.244070587 -0700 -@@ -115,7 +115,7 @@ +--- git.orig/timezone/Makefile ++++ git/timezone/Makefile +@@ -117,7 +117,7 @@ $(testdata)/Asia/Tokyo: asia $(zic-deps) $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make sed -e 's|/bin/bash|/bin/sh|' \ @@ -16069,8 +16157,8 @@ Index: git/timezone/Makefile -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \ Index: git/wcsmbs/Makefile =================================================================== ---- git.orig/wcsmbs/Makefile 2014-08-29 20:00:59.548070587 -0700 -+++ git/wcsmbs/Makefile 2014-08-29 20:01:15.244070587 -0700 +--- git.orig/wcsmbs/Makefile ++++ git/wcsmbs/Makefile @@ -18,15 +18,21 @@ # # Sub-makefile for wcsmbs portion of the library. @@ -16095,34 +16183,36 @@ Index: git/wcsmbs/Makefile btowc wctob mbsinit \ mbrlen mbrtowc wcrtomb mbsrtowcs wcsrtombs \ mbsnrtowcs wcsnrtombs wcsnlen wcschrnul \ -@@ -38,14 +44,19 @@ +@@ -38,14 +44,21 @@ routines := wcscat wcschr wcscmp wcscpy wcscoll_l wcsxfrm_l \ wcscasecmp wcsncase wcscasecmp_l wcsncase_l \ wcsmbsload mbsrtowcs_l \ - isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf \ isoc99_swscanf isoc99_vswscanf \ mbrtoc16 c16rtomb -+routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ -+ += isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf ++routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \ ++ += isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf ++ strop-tests := wcscmp wmemcmp wcslen wcschr wcsrchr wcscpy -tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \ - tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \ - tst-c16c32-1 wcsatcliff $(addprefix test-,$(strop-tests)) ++ +tests := tst-wchar-h +tests-$(OPTION_EGLIBC_LOCALE_CODE) \ -+ += tst-btowc tst-mbrtowc tst-mbrtowc2 tst-wcrtomb tst-c16c32-1 ++ += tst-btowc tst-mbrtowc tst-mbrtowc2 tst-wcrtomb tst-c16c32-1 +tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \ -+ += tst-wcstof wcsmbs-tst1 tst-wcsnlen \ ++ += tst-wcstof wcsmbs-tst1 tst-wcsnlen \ + tst-wcpncpy tst-mbsrtowcs \ + wcsatcliff $(addprefix test-,$(strop-tests)) - tests-ifunc := $(strop-tests:%=test-%-ifunc) - tests += $(tests-ifunc) + + include ../Rules Index: git/wcsmbs/wcsmbsload.c =================================================================== ---- git.orig/wcsmbs/wcsmbsload.c 2014-08-29 20:00:59.580070587 -0700 -+++ git/wcsmbs/wcsmbsload.c 2014-08-29 20:01:15.248070587 -0700 +--- git.orig/wcsmbs/wcsmbsload.c ++++ git/wcsmbs/wcsmbsload.c @@ -21,6 +21,7 @@ #include <limits.h> #include <stdlib.h> @@ -16131,7 +16221,7 @@ Index: git/wcsmbs/wcsmbsload.c #include <locale/localeinfo.h> #include <wcsmbsload.h> -@@ -143,6 +144,7 @@ +@@ -143,6 +144,7 @@ __wcsmbs_getfct (const char *to, const c }) @@ -16139,7 +16229,7 @@ Index: git/wcsmbs/wcsmbsload.c /* Some of the functions here must not be used while setlocale is called. */ __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden) -@@ -211,6 +213,17 @@ +@@ -211,6 +213,17 @@ __wcsmbs_load_conv (struct __locale_data __libc_rwlock_unlock (__libc_setlocale_lock); } @@ -16159,8 +16249,8 @@ Index: git/wcsmbs/wcsmbsload.c /* Clone the current conversion function set. */ Index: git/wctype/Makefile =================================================================== ---- git.orig/wctype/Makefile 2014-08-29 20:00:59.584070587 -0700 -+++ git/wctype/Makefile 2014-08-29 20:01:15.248070587 -0700 +--- git.orig/wctype/Makefile ++++ git/wctype/Makefile @@ -18,14 +18,20 @@ # # Sub-makefile for wctype portion of the library. @@ -16187,8 +16277,8 @@ Index: git/wctype/Makefile include ../Rules Index: git/sysdeps/nptl/Makefile =================================================================== ---- git.orig/sysdeps/nptl/Makefile 2014-08-29 20:00:58.036070587 -0700 -+++ git/sysdeps/nptl/Makefile 2014-08-29 20:01:15.248070587 -0700 +--- git.orig/sysdeps/nptl/Makefile ++++ git/sysdeps/nptl/Makefile @@ -18,6 +18,9 @@ ifeq ($(subdir),nptl) @@ -16201,8 +16291,8 @@ Index: git/sysdeps/nptl/Makefile ifeq ($(subdir),rt) Index: git/sysdeps/nptl/bits/libc-lock.h =================================================================== ---- git.orig/sysdeps/nptl/bits/libc-lock.h 2014-08-29 20:00:58.036070587 -0700 -+++ git/sysdeps/nptl/bits/libc-lock.h 2014-08-29 20:01:15.248070587 -0700 +--- git.orig/sysdeps/nptl/bits/libc-lock.h ++++ git/sysdeps/nptl/bits/libc-lock.h @@ -24,6 +24,14 @@ #include <stddef.h> @@ -16217,11 +16307,11 @@ Index: git/sysdeps/nptl/bits/libc-lock.h + /* Mutex type. */ #if defined _LIBC || defined _IO_MTSAFE_IO - # if (defined NOT_IN_libc && !defined IS_IN_libpthread) || !defined _LIBC -@@ -87,6 +95,14 @@ + # if (!IS_IN (libc) && !IS_IN (libpthread)) || !defined _LIBC +@@ -87,6 +95,15 @@ typedef struct __libc_lock_recursive_opa /* Lock the recursive named lock variable. */ - #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) + #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +# if __OPTION_EGLIBC_BIG_MACROS != 1 +/* EGLIBC: Declare wrapper function for a big macro if either + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from @@ -16230,10 +16320,11 @@ Index: git/sysdeps/nptl/bits/libc-lock.h +libc_hidden_proto (__libc_lock_lock_recursive_fn); +# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */ +# if __OPTION_EGLIBC_BIG_MACROS ++ # define __libc_lock_lock_recursive(NAME) \ do { \ void *self = THREAD_SELF; \ -@@ -97,6 +113,10 @@ +@@ -97,6 +114,10 @@ typedef struct __libc_lock_recursive_opa } \ ++(NAME).cnt; \ } while (0) @@ -16244,10 +16335,10 @@ Index: git/sysdeps/nptl/bits/libc-lock.h #else # define __libc_lock_lock_recursive(NAME) \ __libc_maybe_call (__pthread_mutex_lock, (&(NAME).mutex), 0) -@@ -104,6 +124,14 @@ +@@ -104,6 +125,14 @@ typedef struct __libc_lock_recursive_opa /* Try to lock the recursive named lock variable. */ - #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) + #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +# if __OPTION_EGLIBC_BIG_MACROS != 1 +/* EGLIBC: Declare wrapper function for a big macro if either + !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from @@ -16259,7 +16350,7 @@ Index: git/sysdeps/nptl/bits/libc-lock.h # define __libc_lock_trylock_recursive(NAME) \ ({ \ int result = 0; \ -@@ -122,6 +150,10 @@ +@@ -122,6 +151,10 @@ typedef struct __libc_lock_recursive_opa ++(NAME).cnt; \ result; \ }) @@ -16270,10 +16361,10 @@ Index: git/sysdeps/nptl/bits/libc-lock.h #else # define __libc_lock_trylock_recursive(NAME) \ __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0) -@@ -129,6 +161,14 @@ +@@ -129,6 +162,14 @@ typedef struct __libc_lock_recursive_opa /* Unlock the recursive named lock variable. */ - #if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread) + #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread)) +# if __OPTION_EGLIBC_BIG_MACROS != 1 +/* EGLIBC: Declare wrapper function for a big macro if either + !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from @@ -16285,7 +16376,7 @@ Index: git/sysdeps/nptl/bits/libc-lock.h /* We do no error checking here. */ # define __libc_lock_unlock_recursive(NAME) \ do { \ -@@ -138,6 +178,10 @@ +@@ -138,6 +179,10 @@ typedef struct __libc_lock_recursive_opa lll_unlock ((NAME).lock, LLL_PRIVATE); \ } \ } while (0) @@ -16298,8 +16389,8 @@ Index: git/sysdeps/nptl/bits/libc-lock.h __libc_maybe_call (__pthread_mutex_unlock, (&(NAME).mutex), 0) Index: git/sysdeps/nptl/bits/libc-lockP.h =================================================================== ---- git.orig/sysdeps/nptl/bits/libc-lockP.h 2014-08-29 20:00:58.044070587 -0700 -+++ git/sysdeps/nptl/bits/libc-lockP.h 2014-08-29 20:01:15.248070587 -0700 +--- git.orig/sysdeps/nptl/bits/libc-lockP.h ++++ git/sysdeps/nptl/bits/libc-lockP.h @@ -33,6 +33,8 @@ #include <lowlevellock.h> #include <tls.h> @@ -16307,12 +16398,12 @@ Index: git/sysdeps/nptl/bits/libc-lockP.h +#include <errno.h> /* For EBUSY. */ +#include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS. */ - /* Mutex type. */ - #if defined NOT_IN_libc && !defined IS_IN_libpthread -@@ -159,10 +161,22 @@ + #if IS_IN (libpthread) + /* This gets us the declarations of the __pthread_* internal names, +@@ -171,10 +173,22 @@ typedef pthread_key_t __libc_key_t; /* Lock the named lock variable. */ - #if !defined NOT_IN_libc || defined IS_IN_libpthread + #if IS_IN (libc) || IS_IN (libpthread) -# ifndef __libc_lock_lock -# define __libc_lock_lock(NAME) \ +# if __OPTION_EGLIBC_BIG_MACROS != 1 @@ -16329,16 +16420,16 @@ Index: git/sysdeps/nptl/bits/libc-lockP.h -# endif +# endif +# else -+# define __libc_lock_lock(NAME) \ ++# define __libc_lock_lock(NAME) \ + __libc_lock_lock_fn (&(NAME)) +# endif /* __OPTION_EGLIBC_BIG_MACROS */ #else # undef __libc_lock_lock # define __libc_lock_lock(NAME) \ -@@ -175,10 +189,22 @@ +@@ -187,10 +201,22 @@ typedef pthread_key_t __libc_key_t; /* Try to lock the named lock variable. */ - #if !defined NOT_IN_libc || defined IS_IN_libpthread + #if IS_IN (libc) || IS_IN (libpthread) -# ifndef __libc_lock_trylock -# define __libc_lock_trylock(NAME) \ +# if __OPTION_EGLIBC_BIG_MACROS != 1 @@ -16361,10 +16452,10 @@ Index: git/sysdeps/nptl/bits/libc-lockP.h #else # undef __libc_lock_trylock # define __libc_lock_trylock(NAME) \ -@@ -194,8 +220,20 @@ +@@ -206,8 +232,20 @@ typedef pthread_key_t __libc_key_t; /* Unlock the named lock variable. */ - #if !defined NOT_IN_libc || defined IS_IN_libpthread + #if IS_IN (libc) || IS_IN (libpthread) +# if __OPTION_EGLIBC_BIG_MACROS != 1 +/* EGLIBC: Declare wrapper function for a big macro if either + !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from @@ -16384,8 +16475,8 @@ Index: git/sysdeps/nptl/bits/libc-lockP.h __libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0) Index: git/sysdeps/nptl/small-macros-fns.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/nptl/small-macros-fns.c 2014-08-29 20:01:15.248070587 -0700 +--- /dev/null ++++ git/sysdeps/nptl/small-macros-fns.c @@ -0,0 +1,72 @@ +/* EGLIBC: function wrappers for big macros. + Copyright (C) 2009 Free Software Foundation, Inc. @@ -16459,28 +16550,10 @@ Index: git/sysdeps/nptl/small-macros-fns.c +libc_hidden_def (__libc_lock_unlock_recursive_fn); + +#endif /*defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)*/ -Index: git/include/libc-symbols.h -=================================================================== ---- git.orig/include/libc-symbols.h 2014-08-29 20:00:47.144070587 -0700 -+++ git/include/libc-symbols.h 2014-08-29 20:01:15.248070587 -0700 -@@ -60,8 +60,11 @@ - /* Define these macros for the benefit of portable GNU code that wants to check - them. Of course, STDC_HEADERS is never false when building libc! */ - #define STDC_HEADERS 1 --#define HAVE_MBSTATE_T 1 --#define HAVE_MBSRTOWCS 1 -+ -+#if __OPTION_EGLIBC_LOCALE_CODE -+# define HAVE_MBSTATE_T 1 -+# define HAVE_MBSRTOWCS 1 -+#endif - #define HAVE_LIBINTL_H 1 - #define HAVE_WCTYPE_H 1 - #define HAVE_ISWCTYPE 1 Index: git/crypt/crypt_common.c =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/crypt/crypt_common.c 2014-08-29 20:01:15.248070587 -0700 +--- /dev/null ++++ git/crypt/crypt_common.c @@ -0,0 +1,42 @@ +/* + * crypt: crypt(3) implementation @@ -16526,9 +16599,9 @@ Index: git/crypt/crypt_common.c +} Index: git/crypt/crypt_util.c =================================================================== ---- git.orig/crypt/crypt_util.c 2014-08-29 20:00:43.028070587 -0700 -+++ git/crypt/crypt_util.c 2014-08-29 20:01:15.248070587 -0700 -@@ -242,10 +242,6 @@ +--- git.orig/crypt/crypt_util.c ++++ git/crypt/crypt_util.c +@@ -242,10 +242,6 @@ static ufc_long eperm32tab[4][256][2]; */ static ufc_long efp[16][64][2]; @@ -16539,7 +16612,7 @@ Index: git/crypt/crypt_util.c /* * For use by the old, non-reentrant routines * (crypt/encrypt/setkey) -@@ -949,17 +945,3 @@ +@@ -949,17 +945,3 @@ setkey(__key) { __setkey_r(__key, &_ufc_foobar); } @@ -16559,9 +16632,9 @@ Index: git/crypt/crypt_util.c -} Index: git/sysdeps/arm/Makefile =================================================================== ---- git.orig/sysdeps/arm/Makefile 2014-08-29 20:29:37.000000000 -0700 -+++ git/sysdeps/arm/Makefile 2014-08-29 20:31:09.904070587 -0700 -@@ -37,10 +37,13 @@ +--- git.orig/sysdeps/arm/Makefile ++++ git/sysdeps/arm/Makefile +@@ -37,10 +37,13 @@ ifeq ($(subdir),csu) # get offset to rtld_global._dl_hwcap gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math diff --git a/meta/recipes-core/glibc/glibc/elf-Makefile-fix-a-typo.patch b/meta/recipes-core/glibc/glibc/elf-Makefile-fix-a-typo.patch new file mode 100644 index 0000000000..ec480067a8 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/elf-Makefile-fix-a-typo.patch @@ -0,0 +1,36 @@ +From 6207fb45553ee98f2f326883b7c21b76c8267343 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Tue, 31 Mar 2015 02:31:25 -0700 +Subject: [PATCH] elf/Makefile: fix a typo + +Fixed a typo: +name-target-directory -> make-target-directory + +There is no name-target-directory, it should be make-target-directory, +this fixed the error: +/bin/bash: /path/to/elf/runtime-linker.T: No such file or directory +Makefile:361: recipe for target '/path/to/elf/runtime-linker.st' failed + +Upstream-Status: Pending + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + elf/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/elf/Makefile b/elf/Makefile +index e5b142c..62fe245 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -358,7 +358,7 @@ $(objpfx)interp.os: $(elf-objpfx)runtime-linker.h + + $(elf-objpfx)runtime-linker.h: $(elf-objpfx)runtime-linker.st; @: + $(elf-objpfx)runtime-linker.st: $(common-objpfx)config.make +- $(name-target-directory) ++ $(make-target-directory) + echo '#define RUNTIME_LINKER "$(rtlddir)/$(rtld-installed-name)"' \ + > ${@:st=T} + $(move-if-change) ${@:st=T} ${@:st=h} +-- +1.7.9.5 + diff --git a/meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch b/meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch deleted file mode 100644 index f88eaf444e..0000000000 --- a/meta/recipes-core/glibc/glibc/fsl-ppc-no-fsqrt.patch +++ /dev/null @@ -1,100 +0,0 @@ -Create e5500 specific math_private.h and let it include when compiling for e5500/64bit core -We prefefine __CPU_HAS_FSQRT to 0 and then in general ppc64 math_private.h we check if its -already defined before redefining it. This way we can ensure that on e5500 builds it wont -emit fsqrt intructions - --Khem - -Upstream-Status: Pending - -Index: git/sysdeps/powerpc/fpu/math_private.h -=================================================================== ---- git.orig/sysdeps/powerpc/fpu/math_private.h 2014-08-29 10:31:30.224070587 -0700 -+++ git/sysdeps/powerpc/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700 -@@ -25,10 +25,12 @@ - #include <fenv_private.h> - #include_next <math_private.h> - --# if __WORDSIZE == 64 || defined _ARCH_PWR4 --# define __CPU_HAS_FSQRT 1 --# else --# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0) -+# ifndef __CPU_HAS_FSQRT -+# if __WORDSIZE == 64 || defined _ARCH_PWR4 -+# define __CPU_HAS_FSQRT 1 -+# else -+# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0) -+# endif - # endif - - extern double __slow_ieee754_sqrt (double); -Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/powerpc/powerpc64/e5500/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700 -@@ -0,0 +1,9 @@ -+#ifndef _E5500_MATH_PRIVATE_H_ -+#define _E5500_MATH_PRIVATE_H_ 1 -+/* E5500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next <math_private.h> -+ -+#endif /* _E5500_MATH_PRIVATE_H_ */ -Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/powerpc/powerpc64/e6500/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700 -@@ -0,0 +1,9 @@ -+#ifndef _E6500_MATH_PRIVATE_H_ -+#define _E6500_MATH_PRIVATE_H_ 1 -+/* E6500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next <math_private.h> -+ -+#endif /* _E6500_MATH_PRIVATE_H_ */ -Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/math_private.h 2014-08-29 10:31:30.212070587 -0700 -@@ -0,0 +1,9 @@ -+#ifndef _E500MC_MATH_PRIVATE_H_ -+#define _E500MC_MATH_PRIVATE_H_ 1 -+/* E500MC core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next <math_private.h> -+ -+#endif /* _E500MC_MATH_PRIVATE_H_ */ -Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/powerpc/powerpc32/e5500/fpu/math_private.h 2014-08-29 10:31:30.216070587 -0700 -@@ -0,0 +1,9 @@ -+#ifndef _E5500_MATH_PRIVATE_H_ -+#define _E5500_MATH_PRIVATE_H_ 1 -+/* E5500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next <math_private.h> -+ -+#endif /* _E5500_MATH_PRIVATE_H_ */ -Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysdeps/powerpc/powerpc32/e6500/fpu/math_private.h 2014-08-29 10:31:30.216070587 -0700 -@@ -0,0 +1,9 @@ -+#ifndef _E6500_MATH_PRIVATE_H_ -+#define _E6500_MATH_PRIVATE_H_ 1 -+/* E6500 core FPU does not implement -+ fsqrt */ -+ -+#define __CPU_HAS_FSQRT 0 -+#include_next <math_private.h> -+ -+#endif /* _E6500_MATH_PRIVATE_H_ */ diff --git a/meta/recipes-core/glibc/glibc/grok_gold.patch b/meta/recipes-core/glibc/glibc/grok_gold.patch index 26875c79d4..5151802ecf 100644 --- a/meta/recipes-core/glibc/glibc/grok_gold.patch +++ b/meta/recipes-core/glibc/glibc/grok_gold.patch @@ -8,9 +8,9 @@ Upstream-Status: Backport Index: git/configure =================================================================== ---- git.orig/configure 2014-08-29 10:32:34.464070587 -0700 -+++ git/configure 2014-08-29 10:32:34.456070587 -0700 -@@ -4592,7 +4592,7 @@ +--- git.orig/configure ++++ git/configure +@@ -4593,7 +4593,7 @@ else # Found it, now check the version. { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5 $as_echo_n "checking version of $LD... " >&6; } @@ -18,17 +18,17 @@ Index: git/configure + ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*) + 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) Index: git/configure.ac =================================================================== ---- git.orig/configure.ac 2014-08-29 10:32:34.464070587 -0700 -+++ git/configure.ac 2014-08-29 10:32:34.460070587 -0700 -@@ -930,7 +930,7 @@ - [GNU assembler.* \([0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as") +--- git.orig/configure.ac ++++ git/configure.ac +@@ -913,7 +913,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version, + [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], + AS=: critic_missing="$critic_missing as") AC_CHECK_PROG_VER(LD, $LD, --version, - [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)], + [GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], LD=: critic_missing="$critic_missing ld") + [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], + LD=: critic_missing="$critic_missing ld") - # These programs are version sensitive. diff --git a/meta/recipes-core/glibc/glibc_2.20.bb b/meta/recipes-core/glibc/glibc_2.21.bb index 8a8b296def..fcef4ff3e5 100644 --- a/meta/recipes-core/glibc/glibc_2.20.bb +++ b/meta/recipes-core/glibc/glibc_2.21.bb @@ -2,11 +2,11 @@ require glibc.inc DEPENDS += "gperf-native kconfig-frontends-native" -PV = "2.20" +SRCREV = "4e42b5b8f89f0e288e68be7ad70f9525aebc2cff" -SRCREV = "b8079dd0d360648e4e8de48656c5c38972621072" +BRANCH = "release/${PV}/master" -SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master \ +SRC_URI = "git://sourceware.org/git/glibc.git;branch=${BRANCH} \ file://IO-acquire-lock-fix.patch \ file://mips-rld-map-check.patch \ file://etc/ld.so.conf \ @@ -16,15 +16,17 @@ SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master \ file://ppc-sqrt_finite.patch \ file://ppc_slow_ieee754_sqrt.patch \ file://add_resource_h_to_wait_h.patch \ - file://fsl-ppc-no-fsqrt.patch \ file://0001-R_ARM_TLS_DTPOFF32.patch \ file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \ file://fix-tibetian-locales.patch \ file://ppce6500-32b_slow_ieee754_sqrt.patch \ file://grok_gold.patch \ file://fix_am_rootsbindir.patch \ + file://0001-Add-unused-attribute.patch \ + file://0001-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch \ + file://0001-yes-within-the-path-sets-wrong-config-variables.patch \ + file://elf-Makefile-fix-a-typo.patch \ ${EGLIBCPATCHES} \ - ${CVEPATCHES} \ " EGLIBCPATCHES = "\ file://timezone-re-written-tzselect-as-posix-sh.patch \ @@ -41,11 +43,6 @@ EGLIBCPATCHES = "\ # file://initgroups_keys.patch \ # -CVEPATCHES = "\ - file://CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch \ - file://CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch \ - file://CVE-2014-9402_endless-loop-in-getaddr_r.patch \ - " LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \ @@ -67,17 +64,13 @@ TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}" GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1" # -# For now, we will skip building of a gcc package if it is a uclibc one -# and our build is not a uclibc one, and we skip a glibc one if our build -# is a uclibc build. +# We will skip parsing glibc when system C library selection is not glibc +# this helps in easing out parsing for non-glibc system libraries # -# See the note in gcc/gcc_3.4.0.oe -# - python __anonymous () { import re - uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) - if uc_os: + notglibc = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None) or (re.match('.*musl$', d.getVar('TARGET_OS', True)) != None) + if notglibc: raise bb.parse.SkipPackage("incompatible with target %s" % d.getVar('TARGET_OS', True)) } diff --git a/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch index 931a151e20..6aecfe5268 100644 --- a/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch +++ b/meta/recipes-core/glibc/ldconfig-native-2.12.1/endian-ness_handling_fix.patch @@ -20,28 +20,28 @@ index 3f5b25b..0bf0de3 100644 + Elf64_Addr dynamic_addr; + Elf64_Xword dynamic_size; char *program_interpreter; - + Elf64_Ehdr *elf_header; @@ -311,7 +311,7 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag, - error (0, 0, _("more than one dynamic segment\n")); - - dynamic_addr = read64(segment->p_offset, be); + error (0, 0, _("more than one dynamic segment\n")); + + dynamic_addr = read64(segment->p_offset, be); - dynamic_size = read32(segment->p_filesz, be); + dynamic_size = read64(segment->p_filesz, be); - break; - - case PT_INTERP: + break; + + case PT_INTERP: @@ -329,11 +329,11 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag, - break; - - case PT_NOTE: + break; + + case PT_NOTE: - if (!*osversion && read32(segment->p_filesz, be) >= 32 && read32(segment->p_align, be) >= 4) + if (!*osversion && read64(segment->p_filesz, be) >= 32 && read64(segment->p_align, be) >= 4) - { - Elf64_Word *abi_note = (Elf64_Word *) (file_contents - + read64(segment->p_offset, be)); + { + Elf64_Word *abi_note = (Elf64_Word *) (file_contents + + read64(segment->p_offset, be)); - Elf64_Addr size = read32(segment->p_filesz, be); + Elf64_Xword size = read64(segment->p_filesz, be); - - while (read32(abi_note [0], be) != 4 || read32(abi_note [1], be) != 16 - || read32(abi_note [2], be) != 1 + + while (read32(abi_note [0], be) != 4 || read32(abi_note [1], be) != 16 + || read32(abi_note [2], be) != 1 diff --git a/meta/recipes-core/images/build-appliance-image_8.0.bb b/meta/recipes-core/images/build-appliance-image_12.0.1.bb index d65f085c9c..2a57e4845d 100644 --- a/meta/recipes-core/images/build-appliance-image_8.0.bb +++ b/meta/recipes-core/images/build-appliance-image_12.0.1.bb @@ -21,8 +21,8 @@ IMAGE_FSTYPES = "vmdk" inherit core-image -SRCREV ?= "b6e41cf7442c827ff3f53f6fccef194b313836e4" -SRC_URI = "git://git.yoctoproject.org/poky;branch=dizzy \ +SRCREV ?= "0db74ea8f414c88932b9028a6973f39851ad9e6e" +SRC_URI = "git://git.yoctoproject.org/poky;branch=fido \ file://Yocto_Build_Appliance.vmx \ file://Yocto_Build_Appliance.vmxf \ " diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm64/interfaces b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm64/interfaces new file mode 100644 index 0000000000..16967763e5 --- /dev/null +++ b/meta/recipes-core/init-ifupdown/init-ifupdown-1.0/qemuarm64/interfaces @@ -0,0 +1,5 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback diff --git a/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb index 3d88506c05..733ae41f20 100644 --- a/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb +++ b/meta/recipes-core/init-ifupdown/init-ifupdown_1.0.bb @@ -16,6 +16,8 @@ SRC_URI = "file://copyright \ file://interfaces \ file://nfsroot" +S = "${WORKDIR}" + do_install () { install -d ${D}${sysconfdir}/init.d \ ${D}${sysconfdir}/network/if-pre-up.d \ diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index 89d0750b09..329586d74d 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh @@ -199,11 +199,11 @@ if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then fi if [ -d /run/media/$1/loader ]; then - GUMMIBOOT_CFGS="/tgt_root/loader/entries/*.conf" + GUMMIBOOT_CFGS="/boot/loader/entries/*.conf" # copy config files for gummiboot - cp -dr /run/media/$1/loader /tgt_root + cp -dr /run/media/$1/loader /boot # delete the install entry - rm -f /tgt_root/loader/entries/install.conf + rm -f /boot/loader/entries/install.conf # delete the initrd lines sed -i "/initrd /d" $GUMMIBOOT_CFGS # delete any LABEL= strings diff --git a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb index 0ede20b15d..7ae7969f5e 100644 --- a/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-boot_1.0.bb @@ -5,6 +5,8 @@ SRC_URI = "file://init-boot.sh" PR = "r2" +S = "${WORKDIR}" + do_install() { install -m 0755 ${WORKDIR}/init-boot.sh ${D}/init } diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb index 403127be09..89b900dba9 100644 --- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb @@ -14,6 +14,8 @@ SRC_URI = "file://init \ file://e2fs \ file://debug" +S = "${WORKDIR}" + do_install() { install -d ${D}/init.d diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb index ac54902415..b54cb619f1 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb @@ -7,6 +7,8 @@ SRC_URI = "file://init-live.sh" PR = "r12" +S = "${WORKDIR}" + do_install() { install -m 0755 ${WORKDIR}/init-live.sh ${D}/init } diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb index a54960c596..c03bd2d765 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-install-efi-testfs_1.0.bb @@ -5,6 +5,8 @@ SRC_URI = "file://init-install-efi-testfs.sh" RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools" +S = "${WORKDIR}" + do_install() { install -m 0755 ${WORKDIR}/init-install-efi-testfs.sh ${D}/install-efi.sh } diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb index 7195dc2718..b0994d78c3 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bb @@ -7,6 +7,8 @@ PR = "r1" RDEPENDS_${PN} = "parted e2fsprogs-mke2fs dosfstools" +S = "${WORKDIR}" + do_install() { install -m 0755 ${WORKDIR}/init-install-efi.sh ${D}/install-efi.sh } diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb index db4cf544e8..937bfd4d38 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-install-testfs_1.0.bb @@ -5,6 +5,8 @@ SRC_URI = "file://init-install-testfs.sh" RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs" +S = "${WORKDIR}" + do_install() { install -m 0755 ${WORKDIR}/init-install-testfs.sh ${D}/install.sh } diff --git a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb index 7bf31c9cf8..6241a90e20 100644 --- a/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb +++ b/meta/recipes-core/initrdscripts/initramfs-live-install_1.0.bb @@ -5,6 +5,8 @@ SRC_URI = "file://init-install.sh" PR = "r9" +S = "${WORKDIR}" + RDEPENDS_${PN} = "grub parted e2fsprogs-mke2fs" do_install() { diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb index a665acf6e4..a086591b80 100644 --- a/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb @@ -35,6 +35,8 @@ SRC_URI = "file://functions \ file://logrotate-dmesg.conf \ " +S = "${WORKDIR}" + SRC_URI_append_arm = " file://alignment.sh" KERNEL_VERSION = "" @@ -161,4 +163,11 @@ pkg_postinst_${PN} () { systemctl $OPTS mask $SERVICE.service done fi + + # Delete any old volatile cache script, as directories may have moved + if [ -z "$D" ]; then + rm -f "/etc/volatile.cache" + fi } + +CONFFILES_${PN} += "${sysconfdir}/init.d/checkroot.sh" diff --git a/meta/recipes-core/libcgroup/libcgroup_0.41.bb b/meta/recipes-core/libcgroup/libcgroup_0.41.bb index 69f85666aa..52ba1d760f 100644 --- a/meta/recipes-core/libcgroup/libcgroup_0.41.bb +++ b/meta/recipes-core/libcgroup/libcgroup_0.41.bb @@ -17,9 +17,6 @@ SRC_URI[sha256sum] = "e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706 EXTRA_OECONF = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes', '--enable-pam=no', d)}" -# http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg21444.html -PARALLEL_MAKE = "" - PACKAGES =+ "cgroups-pam-plugin" FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*" FILES_${PN}-dbg += "${base_libdir}/security/.debug" diff --git a/meta/recipes-core/libxml/libxml2.inc b/meta/recipes-core/libxml/libxml2.inc index c729c199cf..1314bbfb8d 100644 --- a/meta/recipes-core/libxml/libxml2.inc +++ b/meta/recipes-core/libxml/libxml2.inc @@ -21,7 +21,7 @@ SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \ file://libxml2-CVE-2014-0191-fix.patch \ file://python-sitepackages-dir.patch \ file://libxml-m4-use-pkgconfig.patch \ - file://libxml2-CVE-2014-3660.patch \ + file://configure.ac-fix-cross-compiling-warning.patch \ " BINCONFIG = "${bindir}/xml2-config" @@ -34,7 +34,7 @@ RDEPENDS_${PN}-ptest_append_libc-glibc += "glibc-gconv-ebcdic-us glibc-gconv-ibm # We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header do_configure_prepend () { - sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.in + sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.ac } do_configure_prepend_class-nativesdk () { @@ -66,7 +66,7 @@ PACKAGES += "${PN}-utils ${PN}-python" FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug" FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" -FILES_${PN}-dev += "${libdir}/xml2Conf.sh" +FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*" FILES_${PN}-utils += "${bindir}/*" FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}" diff --git a/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch b/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch new file mode 100644 index 0000000000..2f8079b052 --- /dev/null +++ b/meta/recipes-core/libxml/libxml2/configure.ac-fix-cross-compiling-warning.patch @@ -0,0 +1,45 @@ +configure.ac: fix cross compiling warning + +There is a warning while cross compiling which triggered a +failure by do_qa_configure +... +|configure:12652: checking for gzread in -lz +|configure:12677: mips-poky-linux-gcc -meb -mabi=32 -mhard-float + -L/lib conftest.c -lz >&5 +|ld: warning: library search path "/lib" is unsafe for cross-compilation +... + +While do the lib checking, do not add '-L${Z_DIR}/lib' to LDFLAGS could fix it. + +Upstream-Status: Inappropriate [oe specific] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + configure.ac | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9a90600..0bac8a4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -391,8 +391,6 @@ if test "$with_zlib" = "no"; then + echo "Disabling compression support" + else + AC_CHECK_HEADERS(zlib.h, +- [SAVE_LDFLAGS="${LDFLAGS}" +- LDFLAGS="-L${Z_DIR}/lib" + AC_CHECK_LIB(z, gzread,[ + AC_DEFINE([HAVE_LIBZ], [1], [Have compression library]) + WITH_ZLIB=1 +@@ -406,8 +404,7 @@ else + esac] + else + Z_LIBS="-lz" +- fi]) +- LDFLAGS="${SAVE_LDFLAGS}"]) ++ fi])) + fi + + AC_SUBST(Z_CFLAGS) +-- +1.9.1 + diff --git a/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch b/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch index a697ddf873..e83c8325e5 100644 --- a/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch +++ b/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch @@ -4,12 +4,18 @@ The python binary used when building for nativesdk doesn't give us the correct path here so we need to be able to specify it ourselves. Upstream-Status: Inappropriate [config] - Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> ---- a/configure.in -+++ b/configure.in -@@ -743,7 +743,8 @@ dnl +Rebase to 2.9.2 +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -813,7 +813,8 @@ dnl PYTHON_VERSION= PYTHON_INCLUDES= @@ -19,3 +25,6 @@ Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> PYTHON_TESTS= pythondir= if test "$with_python" != "no" ; then +-- +1.9.1 + diff --git a/meta/recipes-core/libxml/libxml2_2.9.1.bb b/meta/recipes-core/libxml/libxml2_2.9.2.bb index e087324590..1affff12ae 100644 --- a/meta/recipes-core/libxml/libxml2_2.9.1.bb +++ b/meta/recipes-core/libxml/libxml2_2.9.2.bb @@ -3,7 +3,7 @@ require libxml2.inc SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \ file://72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch" -SRC_URI[libtar.md5sum] = "9c0cfef285d5c4a5c80d00904ddab380" -SRC_URI[libtar.sha256sum] = "fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb" +SRC_URI[libtar.md5sum] = "9e6a9aca9d155737868b3dc5fd82f788" +SRC_URI[libtar.sha256sum] = "5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc" SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a" SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7" diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb index 302510c798..6d4c8c8fe1 100644 --- a/meta/recipes-core/meta/buildtools-tarball.bb +++ b/meta/recipes-core/meta/buildtools-tarball.bb @@ -12,6 +12,7 @@ TOOLCHAIN_HOST_TASK ?= "\ nativesdk-python-modules \ nativesdk-python-misc \ nativesdk-python-git \ + nativesdk-python-pexpect \ nativesdk-ncurses-terminfo-base \ nativesdk-chrpath \ nativesdk-tar \ diff --git a/meta/recipes-core/meta/meta-environment-extsdk.bb b/meta/recipes-core/meta/meta-environment-extsdk.bb new file mode 100644 index 0000000000..d9e596143f --- /dev/null +++ b/meta/recipes-core/meta/meta-environment-extsdk.bb @@ -0,0 +1,12 @@ +# meta-environment for extensible SDK + +require meta-environment.bb + +PN = "meta-environment-extsdk-${MACHINE}" + +create_sdk_files_append() { + local sysroot=${SDKPATH}/${@os.path.relpath(d.getVar('STAGING_DIR_TARGET', True), d.getVar('TOPDIR', True))} + local sdkpathnative=${SDKPATH}/${@os.path.relpath(d.getVar('STAGING_DIR_NATIVE',True), d.getVar('TOPDIR', True))} + + toolchain_create_sdk_env_script '' '' $sysroot '' ${bindir_native} ${prefix_native} $sdkpathnative +} diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb index 90959b5fce..5d72e38e91 100644 --- a/meta/recipes-core/meta/meta-environment.bb +++ b/meta/recipes-core/meta/meta-environment.bb @@ -19,7 +19,6 @@ SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}" inherit cross-canadian -do_generate_content[nostamp] = "1" do_generate_content[cleandirs] = "${SDK_OUTPUT}" do_generate_content[dirs] = "${SDK_OUTPUT}/${SDKPATH}" python do_generate_content() { @@ -57,7 +56,6 @@ create_sdk_files() { toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${REAL_MULTIMACH_TARGET_SYS} } -do_install[nostamp] = "1" do_install() { install -d ${D}/${SDKPATH} install -m 0644 -t ${D}/${SDKPATH} ${SDK_OUTPUT}/${SDKPATH}/* diff --git a/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb index a3cf9d754a..d971c3ca3d 100644 --- a/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb +++ b/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb @@ -16,3 +16,4 @@ python populate_packages_prepend() { d.appendVar('RPROVIDES_${PN}', '${PERLPACKAGES}') d.appendVar('RCONFLICTS_${PN}', '${PERLPACKAGES}') } + diff --git a/meta/recipes-core/meta/uninative-tarball.bb b/meta/recipes-core/meta/uninative-tarball.bb index e17685a117..41f7927e19 100644 --- a/meta/recipes-core/meta/uninative-tarball.bb +++ b/meta/recipes-core/meta/uninative-tarball.bb @@ -11,7 +11,6 @@ TOOLCHAIN_HOST_TASK = "\ " INHIBIT_DEFAULT_DEPS = "1" -DEPENDS += "patchelf-native" TOOLCHAIN_OUTPUTNAME ?= "${BUILD_ARCH}-nativesdk-libc" @@ -24,6 +23,9 @@ inherit populate_sdk deltask install deltask package +deltask packagedata + +SDK_DEPENDS += "patchelf-native" SDK_PACKAGING_FUNC = "" @@ -44,5 +46,5 @@ fakeroot tar_sdk() { rm sysroots -rf patchelf --set-interpreter ${@''.join('a' for n in xrange(1024))} ./${BUILD_SYS}/usr/bin/patchelf mv ./${BUILD_SYS}/usr/bin/patchelf ./${BUILD_SYS}/usr/bin/patchelf-uninative - tar ${SDKTAROPTS} -c --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 . + tar ${SDKTAROPTS} -c -j --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 . } diff --git a/meta/recipes-core/netbase/netbase_5.2.bb b/meta/recipes-core/netbase/netbase_5.3.bb index ab7ae6527c..4ac0221c9e 100644 --- a/meta/recipes-core/netbase/netbase_5.2.bb +++ b/meta/recipes-core/netbase/netbase_5.3.bb @@ -6,11 +6,11 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://debian/copyright;md5=3dd6192d306f582dee7687da3d8748ab" PE = "1" -SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.gz \ +SRC_URI = "${DEBIAN_MIRROR}/main/n/netbase/netbase_${PV}.tar.xz \ file://hosts" -SRC_URI[md5sum] = "3a01bfce6a28e1743412198abd241262" -SRC_URI[sha256sum] = "d62ba56d62b9b121664828175c2a237a7014ef32df8a4116ea33cff332de3307" +SRC_URI[md5sum] = "2637a27fd3de02a278d2b5be7e6558c1" +SRC_URI[sha256sum] = "81f6c69795044d62b8ad959cf9daf049d0545fd466c52860ad3f933b1e97b88b" do_install () { install -d ${D}/${mandir}/man8 ${D}${sysconfdir} diff --git a/meta/recipes-core/os-release/os-release.bb b/meta/recipes-core/os-release/os-release.bb index 33e958137f..87fea6f04d 100644 --- a/meta/recipes-core/os-release/os-release.bb +++ b/meta/recipes-core/os-release/os-release.bb @@ -3,6 +3,7 @@ inherit allarch SUMMARY = "Operating system identification" DESCRIPTION = "The /etc/os-release file contains operating system identification data." LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" INHIBIT_DEFAULT_DEPS = "1" do_fetch[noexec] = "1" diff --git a/meta/recipes-core/packagegroups/packagegroup-base.bb b/meta/recipes-core/packagegroups/packagegroup-base.bb index f4b2cd574d..262d65f5dc 100644 --- a/meta/recipes-core/packagegroups/packagegroup-base.bb +++ b/meta/recipes-core/packagegroups/packagegroup-base.bb @@ -8,6 +8,7 @@ PR = "r83" PACKAGE_ARCH = "${MACHINE_ARCH}" inherit packagegroup +inherit bluetooth PROVIDES = "${PACKAGES}" PACKAGES = ' \ @@ -203,7 +204,7 @@ RRECOMMENDS_packagegroup-base-pcmcia = "\ SUMMARY_packagegroup-base-bluetooth = "Bluetooth support" RDEPENDS_packagegroup-base-bluetooth = "\ - bluez4 \ + ${BLUEZ} \ ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'libasound-module-bluez', '',d)} \ " @@ -346,8 +347,10 @@ RRECOMMENDS_packagegroup-base-nfs = "\ SUMMARY_packagegroup-base-zeroconf = "Zeroconf support" RDEPENDS_packagegroup-base-zeroconf = "\ - libnss-mdns \ avahi-daemon" +RDEPENDS_packagegroup-base-zeroconf_append_libc-glibc = "\ + libnss-mdns \ + " SUMMARY_packagegroup-base-ipv6 = "IPv6 support" RDEPENDS_packagegroup-base-ipv6 = "\ diff --git a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb index a544bbdbdb..a41eada5af 100644 --- a/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb +++ b/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb @@ -6,6 +6,8 @@ SUMMARY = "Software development tools" LICENSE = "MIT" PR = "r9" +PACKAGE_ARCH = "${MACHINE_ARCH}" + inherit packagegroup #PACKAGEFUNCS =+ 'generate_sdk_pkgs' @@ -26,9 +28,18 @@ RDEPENDS_packagegroup-core-sdk = "\ file \ tcl" +SANITIZERS = "libasan-dev libubsan-dev" +SANITIZERS_aarch64 = "" +SANITIZERS_mips = "" +SANITIZERS_mips64 = "" +SANITIZERS_mips64n32 = "" +SANITIZERS_powerpc64 = "" +SANITIZERS_sparc = "" + RRECOMMENDS_packagegroup-core-sdk = "\ libgomp \ - libgomp-dev" + libgomp-dev \ + ${SANITIZERS}" #python generate_sdk_pkgs () { # poky_pkgs = read_pkgdata('packagegroup-core', d)['PACKAGES'] diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb index 41d2548b70..6f4842f182 100644 --- a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb @@ -12,6 +12,8 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit packagegroup PROFILE_TOOLS_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'sysprof', '', d)}" +# sysprof doesn't support aarch64 +PROFILE_TOOLS_X_aarch64 = "" PROFILE_TOOLS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-analyze', '', d)}" RRECOMMENDS_${PN} = "\ @@ -36,6 +38,7 @@ SYSTEMTAP = "systemtap" SYSTEMTAP_libc-uclibc = "" SYSTEMTAP_mips = "" SYSTEMTAP_mips64 = "" +SYSTEMTAP_mips64n32 = "" SYSTEMTAP_aarch64 = "" # lttng-ust uses sched_getcpu() which is not there on uclibc @@ -53,7 +56,6 @@ LTTNGTOOLS_aarch64 = "" LTTNGMODULES = "lttng-modules" LTTNGMODULES_aarch64 = "" -LTTNGMODULES_arm = "" BABELTRACE = "babeltrace" BABELTRACE_aarch64 = "" @@ -64,6 +66,7 @@ VALGRIND = "valgrind" VALGRIND_libc-uclibc = "" VALGRIND_mips = "" VALGRIND_mips64 = "" +VALGRIND_mips64n32 = "" VALGRIND_arm = "" VALGRIND_aarch64 = "" diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb index 33a3eee258..4177c450aa 100644 --- a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb +++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb @@ -30,7 +30,7 @@ X11GLTOOLS = "\ X11TOOLS = "\ fstests \ - owl-video \ + gst-player-bin \ x11perf \ xrestop \ xwininfo \ diff --git a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb index af57fac0ad..47589b6ad6 100644 --- a/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb +++ b/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb @@ -7,7 +7,9 @@ DESCRIPTION = "Packages required to run the build system" PR = "r13" LICENSE = "MIT" -inherit packagegroup +inherit packagegroup distro_features_check +# rdepends on libx11-dev +REQUIRED_DISTRO_FEATURES = "x11" PACKAGES = "\ packagegroup-self-hosted \ @@ -29,6 +31,7 @@ RDEPENDS_packagegroup-self-hosted = "\ # midori depends on webkit-gtk which could not build for mips64 MIDORI = "midori" MIDORI_mips64 = "" +MIDORI_mips64n32 = "" RDEPENDS_packagegroup-self-hosted-host-tools = "\ connman \ diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb index 4e8f071a8e..7f0dc7859f 100644 --- a/meta/recipes-core/psplash/psplash_git.bb +++ b/meta/recipes-core/psplash/psplash_git.bb @@ -5,7 +5,7 @@ SECTION = "base" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=16;md5=840fb2356b10a85bed78dd09dc7745c6" -SRCREV = "afd4e228c606a9998feae44a3fed4474803240b7" +SRCREV = "14c8f7b705de944beb4de3f296506d80871e410f" PV = "0.1+git${SRCPV}" PR = "r15" diff --git a/meta/recipes-core/readline/readline.inc b/meta/recipes-core/readline/readline.inc index 0ce3b519e6..3f662c3070 100644 --- a/meta/recipes-core/readline/readline.inc +++ b/meta/recipes-core/readline/readline.inc @@ -16,8 +16,6 @@ SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz;name=archive \ file://config-dirent-symbols.patch \ file://norpath.patch" -S = "${WORKDIR}/${BPN}-${PV}" - inherit autotools texinfo EXTRA_AUTORECONF += "--exclude=autoheader" diff --git a/meta/recipes-core/readline/readline_5.2.bb b/meta/recipes-core/readline/readline_5.2.bb index fe610e3964..c1007a2311 100644 --- a/meta/recipes-core/readline/readline_5.2.bb +++ b/meta/recipes-core/readline/readline_5.2.bb @@ -63,8 +63,6 @@ SRC_URI[patch13.sha256sum] = "0cc649516a5bdfa61c5e56937407570288b6972d75aa1bd060 SRC_URI[patch14.md5sum] = "a1be30e1c6f1099bb5fcef00a2631fb8" SRC_URI[patch14.sha256sum] = "6f1a68320d01522ca1ea5a737124ecc8739f3dcbfea2dee21e3ccf839a21a817" -S = "${WORKDIR}/${BPN}-${PV}" - inherit autotools EXTRA_AUTORECONF += "--exclude=autoheader" diff --git a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service index 6dd335c0bc..182167befe 100644 --- a/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service +++ b/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service @@ -21,7 +21,7 @@ IgnoreOnIsolate=yes [Service] Environment="TERM=xterm" -ExecStart=-/sbin/agetty -8 --keep-baud %I @BAUDRATE@ $TERM +ExecStart=-/sbin/agetty -8 -L --keep-baud %I @BAUDRATE@ $TERM Type=idle Restart=always RestartSec=0 diff --git a/meta/recipes-core/systemd/systemd-systemctl-native.bb b/meta/recipes-core/systemd/systemd-systemctl-native.bb index 72bc77df4f..fbdc9c0a18 100644 --- a/meta/recipes-core/systemd/systemd-systemctl-native.bb +++ b/meta/recipes-core/systemd/systemd-systemctl-native.bb @@ -9,6 +9,8 @@ inherit native SRC_URI = "file://systemctl" +S = "${WORKDIR}" + do_install() { install -d ${D}${bindir} install -m 0755 ${WORKDIR}/systemctl ${D}${bindir} diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl index b37f27abfb..6e163bd5c2 100755 --- a/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl @@ -77,18 +77,31 @@ for service in $services; do exit 0 fi - echo "Try to find location of $service..." + service_base_file=`echo $service | sed 's/\(@\).*\(\.[^.]\+\)/\1\2/'` + if [ -z `echo $service | sed '/@/p;d'` ]; then + echo "Try to find location of $service..." + service_template=false + else + echo "Try to find location of template $service_base_file of instance $service..." + service_template=true + if [ -z `echo $service | sed 's/^.\+@\(.*\)\.[^.]\+/\1/'` ]; then + instance_specified=false + else + instance_specified=true + fi + fi + # find service file for p in $ROOT/etc/systemd/system \ $ROOT/lib/systemd/system \ $ROOT/usr/lib/systemd/system; do - if [ -e $p/$service ]; then - service_file=$p/$service + if [ -e $p/$service_base_file ]; then + service_file=$p/$service_base_file service_file=${service_file##$ROOT} fi done if [ -z "$service_file" ]; then - echo "'$service' couldn't be found; exiting with error" + echo "'$service_base_file' couldn't be found; exiting with error" exit 1 fi echo "Found $service in $service_file" @@ -115,13 +128,29 @@ for service in $services; do for r in $wanted_by; do echo "WantedBy=$r found in $service" if [ "$action" = "enable" ]; then + enable_service=$service + if [ "$service_template" = true -a "$instance_specified" = false ]; then + default_instance=$(sed '/^DefaultInstance[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file") + if [ -z $default_instance ]; then + echo "Template unit without instance or DefaultInstance directive, nothing to enable" + continue + else + echo "Found DefaultInstance $default_instance, enabling it" + enable_service=$(echo $service | sed "s/@/@$default_instance/") + fi + fi mkdir -p $ROOT/etc/systemd/system/$r.wants - ln -s $service_file $ROOT/etc/systemd/system/$r.wants - echo "Enabled $service for $wanted_by." + ln -s $service_file $ROOT/etc/systemd/system/$r.wants/$enable_service + echo "Enabled $enable_service for $wanted_by." else - rm -f $ROOT/etc/systemd/system/$r.wants/$service - rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.wants - echo "Disabled $service for $wanted_by." + if [ "$service_template" = true -a "$instance_specified" = false ]; then + disable_service="$ROOT/etc/systemd/system/$r.wants/`echo $service | sed 's/@/@*/'`" + else + disable_service="$ROOT/etc/systemd/system/$r.wants/$service" + fi + rm -f $disable_service + [ -d $ROOT/etc/systemd/system/$r.wants ] && rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.wants + echo "Disabled ${disable_service##$ROOT/etc/systemd/system/$r.wants/} for $wanted_by." fi done diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf b/meta/recipes-core/systemd/systemd/00-create-volatile.conf index 9ffa88e464..87cbe1e7d3 100644 --- a/meta/recipes-core/systemd/systemd/00-create-volatile.conf +++ b/meta/recipes-core/systemd/systemd/00-create-volatile.conf @@ -4,4 +4,4 @@ d /var/volatile/log - - - - -d /var/volatile/tmp - - - - +d /var/volatile/tmp 1777 - - diff --git a/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch b/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch deleted file mode 100644 index e0043597a2..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-build-sys-configure-the-list-of-system-users-files-a.patch +++ /dev/null @@ -1,176 +0,0 @@ -From 5a16bc264c32237e38a844d55e7a1820a31b8440 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <l.stelmach@samsung.com> -Date: Fri, 28 Nov 2014 15:59:59 +0100 -Subject: [PATCH] build-sys: configure the list of system users, files and - directories - -Choose which system users defined in sysusers.d/systemd.conf and files -or directories in tmpfiles.d/systemd.conf, should be provided depending -on comile-time configuration. - -Upstream-Status: Backport -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - Makefile.am | 4 ++++ - configure.ac | 2 ++ - sysusers.d/.gitignore | 1 + - sysusers.d/{systemd.conf => systemd.conf.m4} | 8 ++++++++ - tmpfiles.d/.gitignore | 3 ++- - tmpfiles.d/{systemd.conf => systemd.conf.m4} | 2 ++ - 6 files changed, 19 insertions(+), 1 deletion(-) - rename sysusers.d/{systemd.conf => systemd.conf.m4} (77%) - rename tmpfiles.d/{systemd.conf => systemd.conf.m4} (96%) - -Index: git/Makefile.am -=================================================================== ---- git.orig/Makefile.am 2015-01-23 21:23:04.000000000 +0000 -+++ git/Makefile.am 2015-01-23 21:23:04.000000000 +0000 -@@ -5698,6 +5698,10 @@ - $(AM_V_at)$(MKDIR_P) $(dir $@) - $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ - -+sysusers.d/%: sysusers.d/%.m4 -+ $(AM_V_at)$(MKDIR_P) $(dir $@) -+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ -+ - tmpfiles.d/%: tmpfiles.d/%.m4 - $(AM_V_at)$(MKDIR_P) $(dir $@) - $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac 2015-01-23 21:23:04.000000000 +0000 -+++ git/configure.ac 2015-01-23 21:23:04.000000000 +0000 -@@ -971,6 +971,7 @@ - AC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon])) - if test "x$enable_timesyncd" != "xno"; then - have_timesyncd=yes -+ M4_DEFINES="$M4_DEFINES -DENABLE_TIMESYNCD" - fi - AM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"]) - -@@ -1060,6 +1061,7 @@ - AS_IF([test "x$enable_networkd" != "xno"], [ - AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled]) - have_networkd=yes -+ M4_DEFINES="$M4_DEFINES -DENABLE_NETWORKD" - ]) - AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"]) - -Index: git/sysusers.d/systemd.conf -=================================================================== ---- git.orig/sysusers.d/systemd.conf 2015-01-23 21:23:02.000000000 +0000 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 -@@ -1,12 +0,0 @@ --# This file is part of systemd. --# --# systemd is free software; you can redistribute it and/or modify it --# under the terms of the GNU Lesser General Public License as published by --# the Free Software Foundation; either version 2.1 of the License, or --# (at your option) any later version. -- --g systemd-journal - - --u systemd-bus-proxy - "systemd Bus Proxy" --u systemd-network - "systemd Network Management" --u systemd-resolve - "systemd Resolver" --u systemd-timesync - "systemd Time Synchronization" -Index: git/sysusers.d/systemd.conf.m4 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/sysusers.d/systemd.conf.m4 2015-01-23 21:26:30.000000000 +0000 -@@ -0,0 +1,20 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+g systemd-journal - - -+m4_ifdef(`ENABLE_KDBUS', -+u systemd-bus-proxy - "systemd Bus Proxy" -+)m4_dnl -+m4_ifdef(`ENABLE_NETWORKD', -+u systemd-network - "systemd Network Management" -+)m4_dnl -+m4_ifdef(`ENABLE_RESOLVED', -+u systemd-resolve - "systemd Resolver" -+)m4_dnl -+m4_ifdef(`ENABLE_TIMESYNCD', -+u systemd-timesync - "systemd Time Synchronization" -+)m4_dnl -Index: git/tmpfiles.d/systemd.conf -=================================================================== ---- git.orig/tmpfiles.d/systemd.conf 2015-01-23 21:23:02.000000000 +0000 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 -@@ -1,32 +0,0 @@ --# This file is part of systemd. --# --# systemd is free software; you can redistribute it and/or modify it --# under the terms of the GNU Lesser General Public License as published by --# the Free Software Foundation; either version 2.1 of the License, or --# (at your option) any later version. -- --# See tmpfiles.d(5) for details -- --d /run/user 0755 root root - --F! /run/utmp 0664 root utmp - -- --d /run/systemd/ask-password 0755 root root - --d /run/systemd/seats 0755 root root - --d /run/systemd/sessions 0755 root root - --d /run/systemd/users 0755 root root - --d /run/systemd/machines 0755 root root - --d /run/systemd/shutdown 0755 root root - --d /run/systemd/netif 0755 systemd-network systemd-network - --d /run/systemd/netif/links 0755 systemd-network systemd-network - --d /run/systemd/netif/leases 0755 systemd-network systemd-network - -- --d /run/log 0755 root root - -- --z /run/log/journal 2755 root systemd-journal - - --Z /run/log/journal/%m ~2750 root systemd-journal - - -- --z /var/log/journal 2755 root systemd-journal - - --z /var/log/journal/%m 2755 root systemd-journal - - -- --d /var/lib/systemd 0755 root root - --d /var/lib/systemd/coredump 0755 root root 3d -Index: git/tmpfiles.d/systemd.conf.m4 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/tmpfiles.d/systemd.conf.m4 2015-01-23 21:26:46.000000000 +0000 -@@ -0,0 +1,34 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+# See tmpfiles.d(5) for details -+ -+d /run/user 0755 root root - -+F! /run/utmp 0664 root utmp - -+ -+d /run/systemd/ask-password 0755 root root - -+d /run/systemd/seats 0755 root root - -+d /run/systemd/sessions 0755 root root - -+d /run/systemd/users 0755 root root - -+d /run/systemd/machines 0755 root root - -+d /run/systemd/shutdown 0755 root root - -+m4_ifdef(`ENABLE_NETWORKD', -+d /run/systemd/netif 0755 systemd-network systemd-network - -+d /run/systemd/netif/links 0755 systemd-network systemd-network - -+d /run/systemd/netif/leases 0755 systemd-network systemd-network - -+)m4_dnl -+ -+d /run/log 0755 root root - -+ -+z /run/log/journal 2755 root systemd-journal - - -+Z /run/log/journal/%m ~2750 root systemd-journal - - -+ -+z /var/log/journal 2755 root systemd-journal - - -+z /var/log/journal/%m 2755 root systemd-journal - - -+ -+d /var/lib/systemd 0755 root root - -+d /var/lib/systemd/coredump 0755 root root 3d diff --git a/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch b/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch deleted file mode 100644 index 4795f8670f..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch +++ /dev/null @@ -1,56 +0,0 @@ -From bedd083aaedb3bbb14ef579a047bf4b4fed56d9b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <l.stelmach@samsung.com> -Date: Wed, 26 Nov 2014 09:17:50 +0100 -Subject: [PATCH] build-sys: do not install tmpfiles and sysusers files by - default - -Upstream-Status: Backport - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - Makefile.am | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index ddd0df1..65bb176 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -2039,7 +2039,6 @@ nodist_tmpfiles_DATA = \ - dist_tmpfiles_DATA = \ - tmpfiles.d/systemd.conf \ - tmpfiles.d/systemd-nologin.conf \ -- tmpfiles.d/systemd-remote.conf \ - tmpfiles.d/tmp.conf \ - tmpfiles.d/x11.conf \ - tmpfiles.d/var.conf -@@ -2094,8 +2093,7 @@ SYSINIT_TARGET_WANTS += \ - systemd-sysusers.service - - dist_sysusers_DATA = \ -- sysusers.d/systemd.conf \ -- sysusers.d/systemd-remote.conf -+ sysusers.d/systemd.conf - - nodist_sysusers_DATA = \ - sysusers.d/basic.conf -@@ -3839,6 +3837,16 @@ systemd_journal_remote_CFLAGS = \ - systemd_journal_remote_LDADD += \ - $(MICROHTTPD_LIBS) - -+if ENABLE_SYSUSERS -+dist_sysusers_DATA += \ -+ sysusers.d/systemd-remote.conf -+endif -+ -+if ENABLE_TMPFILES -+dist_tmpfiles_DATA += \ -+ tmpfiles.d/systemd-remote.conf -+endif -+ - if HAVE_GNUTLS - systemd_journal_remote_LDADD += \ - $(GNUTLS_LIBS) --- -1.9.1 - diff --git a/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch b/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch deleted file mode 100644 index 911e2ff1c1..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-journal-Fix-navigating-backwards-missing-entries.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2173cbf847fc53ca24950e77958c902edecfc207 Mon Sep 17 00:00:00 2001 -From: Olivier Brunel <jjk@jjacky.com> -Date: Fri, 5 Dec 2014 16:06:45 +0100 -Subject: [PATCH] journal: Fix navigating backwards missing entries - -With DIRECTION_UP (i.e. navigating backwards) in generic_array_bisect() when the -needle was found as the last item in the array, it wasn't actually processed as -match, resulting in entries being missed. - -https://bugs.freedesktop.org/show_bug.cgi?id=86855 - -Upstream-Status: Backport - -Signed-off-by: Jonathan Liu <net147@gmail.com> ---- - src/journal/journal-file.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c -index 7858435..c5d2d19 100644 ---- a/src/journal/journal-file.c -+++ b/src/journal/journal-file.c -@@ -1657,7 +1657,7 @@ static int generic_array_bisect( - } - } - -- if (k > n) { -+ if (k >= n) { - if (direction == DIRECTION_UP) { - i = n; - subtract_one = true; --- -2.1.3 diff --git a/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch b/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch deleted file mode 100644 index 448ef1a917..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch +++ /dev/null @@ -1,29 +0,0 @@ -Upstream-Status: Backport - -Subject: missing.h: add fake __NR_memfd_create for MIPS - -We don't have the correct __NR_memfd_create syscall number yet, so set it to -0xffffffff for now to prevent compile time errors. - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/shared/missing.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/shared/missing.h b/src/shared/missing.h -index 3ff1a21..3051cb5 100644 ---- a/src/shared/missing.h -+++ b/src/shared/missing.h -@@ -167,6 +167,9 @@ static inline int pivot_root(const char *new_root, const char *put_old) { - # define __NR_fanotify_mark 5296 - # endif - # endif -+# ifndef __NR_memfd_create -+# define __NR_memfd_create 0xffffffff /* FIXME */ -+# endif - #else - # ifndef __NR_fanotify_init - # define __NR_fanotify_init 338 --- -1.9.1 - diff --git a/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch b/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch deleted file mode 100644 index b5b0168149..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch +++ /dev/null @@ -1,142 +0,0 @@ -From aeb50ff0bd4bbbca74c4695072232348351d512d Mon Sep 17 00:00:00 2001 -From: Tom Gundersen <teg@jklm.no> -Date: Wed, 27 Aug 2014 17:45:41 +0200 -Subject: [PATCH] tmpfiles: make resolv.conf entry conditional on resolved - support - -Upstream-Status: Backport -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - Makefile.am | 15 +++++++++++++-- - TODO | 2 -- - configure.ac | 1 + - tmpfiles.d/.gitignore | 1 + - tmpfiles.d/{etc.conf => etc.conf.m4} | 2 ++ - 5 files changed, 17 insertions(+), 4 deletions(-) - create mode 100644 tmpfiles.d/.gitignore - rename tmpfiles.d/{etc.conf => etc.conf.m4} (95%) - -Index: git/Makefile.am -=================================================================== ---- git.orig/Makefile.am 2015-01-24 00:41:20.134716451 -0800 -+++ git/Makefile.am 2015-01-24 00:41:20.126716451 -0800 -@@ -1935,14 +1935,16 @@ - units/systemd-tmpfiles-setup.service \ - units/systemd-tmpfiles-clean.service - -+nodist_tmpfiles_DATA = \ -+ tmpfiles.d/etc.conf -+ - dist_tmpfiles_DATA = \ - tmpfiles.d/systemd.conf \ - tmpfiles.d/systemd-nologin.conf \ - tmpfiles.d/systemd-remote.conf \ - tmpfiles.d/tmp.conf \ - tmpfiles.d/x11.conf \ -- tmpfiles.d/var.conf \ -- tmpfiles.d/etc.conf -+ tmpfiles.d/var.conf - - if HAVE_SYSV_COMPAT - dist_tmpfiles_DATA += \ -@@ -1965,10 +1967,14 @@ - endif - - EXTRA_DIST += \ -+ tmpfiles.d/etc.conf.m4 \ - units/systemd-tmpfiles-setup-dev.service.in \ - units/systemd-tmpfiles-setup.service.in \ - units/systemd-tmpfiles-clean.service.in - -+CLEANFILES += \ -+ tmpfiles.d/etc.conf -+ - # ------------------------------------------------------------------------------ - if ENABLE_SYSUSERS - systemd_sysusers_SOURCES = \ -@@ -5684,6 +5690,11 @@ - $(AM_V_at)$(MKDIR_P) $(dir $@) - $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ - -+tmpfiles.d/%: tmpfiles.d/%.m4 -+ $(AM_V_at)$(MKDIR_P) $(dir $@) -+ $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@ -+ -+ - units/%: units/%.m4 - $(AM_V_at)$(MKDIR_P) $(dir $@) - $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@ -Index: git/TODO -=================================================================== ---- git.orig/TODO 2015-01-24 00:41:20.134716451 -0800 -+++ git/TODO 2015-01-24 00:41:20.126716451 -0800 -@@ -111,8 +111,6 @@ - - * Allow multiple ExecStart= for all Type= settings, so that we can cover rescue.service nicely - --* the resolv.conf tmpfiles line should be covered by ENABLE_NETWORKD... -- - * Add a new verb "systemctl top" - - * logind: allow users to kill or lock their own sessions -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac 2015-01-24 00:41:20.134716451 -0800 -+++ git/configure.ac 2015-01-24 00:41:20.126716451 -0800 -@@ -1041,6 +1041,7 @@ - AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon])) - if test "x$enable_resolved" != "xno"; then - have_resolved=yes -+ M4_DEFINES="$M4_DEFINES -DENABLE_RESOLVED" - fi - AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"]) - -Index: git/tmpfiles.d/.gitignore -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/tmpfiles.d/.gitignore 2015-01-24 00:41:20.126716451 -0800 -@@ -0,0 +1 @@ -+etc.conf -Index: git/tmpfiles.d/etc.conf -=================================================================== ---- git.orig/tmpfiles.d/etc.conf 2015-01-24 00:41:20.134716451 -0800 -+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 -@@ -1,15 +0,0 @@ --# This file is part of systemd. --# --# systemd is free software; you can redistribute it and/or modify it --# under the terms of the GNU Lesser General Public License as published by --# the Free Software Foundation; either version 2.1 of the License, or --# (at your option) any later version. -- --# See tmpfiles.d(5) for details -- --L /etc/os-release - - - - ../usr/lib/os-release --L /etc/localtime - - - - ../usr/share/zoneinfo/UTC --L+ /etc/mtab - - - - ../proc/self/mounts --L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf --C /etc/nsswitch.conf - - - - --C /etc/pam.d - - - - -Index: git/tmpfiles.d/etc.conf.m4 -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/tmpfiles.d/etc.conf.m4 2015-01-24 00:41:20.126716451 -0800 -@@ -0,0 +1,17 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU Lesser General Public License as published by -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+ -+# See tmpfiles.d(5) for details -+ -+L /etc/os-release - - - - ../usr/lib/os-release -+L /etc/localtime - - - - ../usr/share/zoneinfo/UTC -+L+ /etc/mtab - - - - ../proc/self/mounts -+m4_ifdef(`ENABLE_RESOLVED', -+L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf -+) -+C /etc/nsswitch.conf - - - - -+C /etc/pam.d - - - - diff --git a/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch b/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch new file mode 100644 index 0000000000..b6ab5effc2 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch @@ -0,0 +1,44 @@ +From 100e50604efc4032001a2de6a6b47853c0003817 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:29:15 +0000 +Subject: [PATCH 01/11] units: Prefer getty to agetty in console setup systemd + units + +Upstream-Status: Inappropriate [configuration specific] + +Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + units/getty@.service.m4 | 2 +- + units/serial-getty@.service.m4 | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/units/getty@.service.m4 b/units/getty@.service.m4 +index 46164ab..bdf6ec8 100644 +--- a/units/getty@.service.m4 ++++ b/units/getty@.service.m4 +@@ -27,7 +27,7 @@ ConditionPathExists=/dev/tty0 + + [Service] + # the VT is cleared by TTYVTDisallocate +-ExecStart=-/sbin/agetty --noclear %I $TERM ++ExecStart=-/sbin/getty -L %I $TERM + Type=idle + Restart=always + RestartSec=0 +diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 +index 4522d0d..e6d499d 100644 +--- a/units/serial-getty@.service.m4 ++++ b/units/serial-getty@.service.m4 +@@ -22,7 +22,7 @@ Before=getty.target + IgnoreOnIsolate=yes + + [Service] +-ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM ++ExecStart=-/sbin/getty -L 115200 %I $TERM + Type=idle + Restart=always + UtmpIdentifier=%I +-- +2.1.4 + diff --git a/meta/recipes-core/systemd/systemd/0002-shared-missing.h-fall-back-to-insecure-getenv.patch b/meta/recipes-core/systemd/systemd/0002-shared-missing.h-fall-back-to-insecure-getenv.patch new file mode 100644 index 0000000000..1cf7840976 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0002-shared-missing.h-fall-back-to-insecure-getenv.patch @@ -0,0 +1,25 @@ +From 03baade6db2cf83b44a157818ba827d725449bb0 Mon Sep 17 00:00:00 2001 +From: Emil Renner Berthing <systemd@esmil.dk> +Date: Thu, 18 Sep 2014 15:24:47 +0200 +Subject: [PATCH 02/11] shared/missing.h: fall back to insecure getenv + +--- + src/shared/missing.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/shared/missing.h b/src/shared/missing.h +index b33a70c..11cca04 100644 +--- a/src/shared/missing.h ++++ b/src/shared/missing.h +@@ -366,7 +366,7 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle + # ifdef HAVE___SECURE_GETENV + # define secure_getenv __secure_getenv + # else +-# error "neither secure_getenv nor __secure_getenv are available" ++# define secure_getenv getenv + # endif + #endif + +-- +2.1.4 + diff --git a/meta/recipes-core/systemd/systemd/binfmt-install.patch b/meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch index c2d5099f24..c14cc6fdd6 100644 --- a/meta/recipes-core/systemd/systemd/binfmt-install.patch +++ b/meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch @@ -1,19 +1,33 @@ -Don't install dependency links at install time for the binfmt services, use -[Install] blocks so that they get created when the service is enabled like a -traditional service. +From 184a89caacfa00f07e7275bca592bd7dda1b541e Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:03:44 +0000 +Subject: [PATCH 03/11] binfmt: Don't install dependency links at install time + for the binfmt services -The [Install] blocks were rejected upstream as they don't have a way to "enable" -it on install without static symlinks which can't be disabled, only masked. We +use [Install] blocks so that they get created when the service is enabled +like a traditional service. + +The [Install] blocks were rejected upstream as they don't have a way to +"enable" +it on install without static symlinks which can't be disabled, only +masked. We however can do that in a postinst. Upstream-Status: Denied + Signed-off-by: Ross Burton <ross.burton@intel.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile.am | 4 ---- + units/proc-sys-fs-binfmt_misc.automount | 3 +++ + units/systemd-binfmt.service.in | 5 +++++ + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am -index 7933de6..78acb6f 100644 +index ba63f68..0fb3f9f 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -3133,10 +3133,6 @@ INSTALL_DIRS += \ +@@ -4838,10 +4838,6 @@ INSTALL_DIRS += \ $(prefix)/lib/binfmt.d \ $(sysconfdir)/binfmt.d @@ -36,21 +50,25 @@ index 6be3893..709adef 100644 +[Install] +WantedBy=sysinit.target diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in -index 02dfe77..86d3481 100644 +index 34a5d52..617462b 100644 --- a/units/systemd-binfmt.service.in +++ b/units/systemd-binfmt.service.in -@@ -11,6 +11,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5) +@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5) Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt DefaultDependencies=no Conflicts=shutdown.target +Wants=proc-sys-fs-binfmt_misc.automount - After=systemd-readahead-collect.service systemd-readahead-replay.service proc-sys-fs-binfmt_misc.automount ++ + After=proc-sys-fs-binfmt_misc.automount Before=sysinit.target shutdown.target ConditionPathIsReadWrite=/proc/sys/ -@@ -24,3 +25,6 @@ ConditionDirectoryNotEmpty=|/run/binfmt.d +@@ -24,3 +26,6 @@ ConditionDirectoryNotEmpty=|/run/binfmt.d Type=oneshot RemainAfterExit=yes ExecStart=@rootlibexecdir@/systemd-binfmt + +[Install] +WantedBy=sysinit.target +-- +2.1.4 + diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch b/meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch index 4639532236..dddb7da690 100644 --- a/meta/recipes-core/systemd/systemd/systemd-pam-configure-check-uclibc.patch +++ b/meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch @@ -1,11 +1,24 @@ +From 4e2e8dbf3f23ab7dca32286cc0f37bff6ac49e22 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:05:45 +0000 +Subject: [PATCH 04/11] configure: Check for additional features that uclibc + doesnt support + +This helps in supporting uclibc which does not have all features that +glibc might have + Upstream-Status: Denied [no desire for uclibc support] + Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac 2014-03-15 17:53:51.756340454 -0700 -+++ git/configure.ac 2014-03-15 18:07:34.888355897 -0700 -@@ -78,6 +78,24 @@ +diff --git a/configure.ac b/configure.ac +index 9a2235b..a5b2e6e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -103,6 +103,24 @@ AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't s M4_DEFINES= @@ -30,3 +43,6 @@ Index: git/configure.ac # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line m4_ifdef([GTK_DOC_CHECK], [ GTK_DOC_CHECK([1.18],[--flavour no-tmpl])], +-- +2.1.4 + diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch b/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch index 7170a38af3..85279d68c2 100644 --- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-execvpe.patch +++ b/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch @@ -1,20 +1,29 @@ +From a7417c2e6950d55c22c1b0d15783898b8ff229ef Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:10:37 +0000 +Subject: [PATCH 05/11] nspawn: Use execvpe only when libc supports it + Upstream-Status: Denied [no desire for uclibc support] + Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/nspawn/nspawn.c | 7 +++++++ + 1 file changed, 7 insertions(+) -Index: systemd-209/src/nspawn/nspawn.c -=================================================================== ---- systemd-209.orig/src/nspawn/nspawn.c 2014-02-19 15:03:09.000000000 -0800 -+++ systemd-209/src/nspawn/nspawn.c 2014-02-19 23:20:38.720628627 -0800 -@@ -91,6 +91,8 @@ - LINK_GUEST - } LinkJournal; +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index 0d8d199..b597edb 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -129,6 +129,8 @@ typedef enum Volatile { + VOLATILE_STATE, + } Volatile; +#include "config.h" + static char *arg_directory = NULL; + static char *arg_template = NULL; static char *arg_user = NULL; - static sd_id128_t arg_uuid = {}; -@@ -2045,7 +2047,12 @@ +@@ -4257,7 +4259,12 @@ int main(int argc, char *argv[]) { a[0] = (char*) "/sbin/init"; execve(a[0], a, env_use); } else if (argc > optind) @@ -23,7 +32,10 @@ Index: systemd-209/src/nspawn/nspawn.c +#else + environ = env_use; + execvp(argv[optind], argv + optind); -+#endif /* HAVE_EXECVPE */ ++#endif /* HAVE_EXECVPE */ else { chdir(home ? home : "/root"); execle("/bin/bash", "-bash", NULL, env_use); +-- +2.1.4 + diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch b/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch index f8e19ce172..631dd77465 100644 --- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-fallocate.patch +++ b/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch @@ -1,19 +1,24 @@ -Upstream-Status: Denied [no desire for uclibc support] +From 34a61b6c9eed3fad360066fb63132ebc7e0aaaa6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:12:48 +0000 +Subject: [PATCH 06/11] journal: Use posix fallocate only if available + +Some architecture ports in uclibc did not support it in past -This patch is uclibc specific, thus not suitable for upstream. +Upstream-Status: Denied [no desire for uclibc support] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- - src/journal/journal-file.c | 16 +++++++++++++++- - src/journal/journald-kmsg.c | 16 ++++++++++++++-- - 2 files changed, 29 insertions(+), 3 deletions(-) + src/journal/journal-file.c | 16 +++++++++++++++- + src/journal/journald-kmsg.c | 15 ++++++++++++++- + 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c -index f2f1f35..092f87b 100644 +index 2845e05..9431171 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c -@@ -38,6 +38,8 @@ +@@ -36,6 +36,8 @@ #include "compress.h" #include "fsprg.h" @@ -22,7 +27,7 @@ index f2f1f35..092f87b 100644 #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem)) #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem)) -@@ -314,7 +316,7 @@ static int journal_file_verify_header(JournalFile *f) { +@@ -354,7 +356,7 @@ static int journal_file_fstat(JournalFile *f) { static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) { uint64_t old_size, new_size; @@ -31,7 +36,7 @@ index f2f1f35..092f87b 100644 assert(f); -@@ -362,9 +364,21 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) +@@ -418,9 +420,21 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) /* Note that the glibc fallocate() fallback is very inefficient, hence we try to minimize the allocation area as we can. */ @@ -51,13 +56,13 @@ index f2f1f35..092f87b 100644 + +#endif /* HAVE_POSIX_FALLOCATE */ - if (fstat(f->fd, &f->last_stat) < 0) - return -errno; + f->header->arena_size = htole64(new_size - le64toh(f->header->header_size)); + diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c -index 12992e7..dc4fa93 100644 +index c4216c4..a998ed5 100644 --- a/src/journal/journald-kmsg.c +++ b/src/journal/journald-kmsg.c -@@ -437,6 +437,7 @@ fail: +@@ -436,6 +436,7 @@ fail: int server_open_kernel_seqnum(Server *s) { _cleanup_close_ int fd; uint64_t *p; @@ -65,28 +70,27 @@ index 12992e7..dc4fa93 100644 assert(s); -@@ -449,8 +450,19 @@ int server_open_kernel_seqnum(Server *s) { - log_error("Failed to open /run/systemd/journal/kernel-seqnum, ignoring: %m"); +@@ -449,7 +450,19 @@ int server_open_kernel_seqnum(Server *s) { return 0; } -- + - if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) { +#ifdef HAVE_POSIX_FALLOCATE + r = posix_fallocate(fd, 0, sizeof(uint64_t)); +#else -+ /* Use good old method to write zeros into the journal file -+ perhaps very inefficient yet working. */ -+ char *buf = alloca(sizeof(uint64_t)); -+ off_t oldpos = lseek(fd, 0, SEEK_CUR); -+ bzero(buf, sizeof(uint64_t)); -+ lseek(fd, 0, SEEK_SET); -+ r = write(fd, buf, sizeof(uint64_t)); -+ lseek(fd, oldpos, SEEK_SET); ++ /* Use good old method to write zeros into the journal file ++ perhaps very inefficient yet working. */ ++ char *buf = alloca(sizeof(uint64_t)); ++ off_t oldpos = lseek(fd, 0, SEEK_CUR); ++ bzero(buf, sizeof(uint64_t)); ++ lseek(fd, 0, SEEK_SET); ++ r = write(fd, buf, sizeof(uint64_t)); ++ lseek(fd, oldpos, SEEK_SET); +#endif /* HAVE_POSIX_FALLOCATE */ -+ if (r < 0) { - log_error("Failed to allocate sequential number file, ignoring: %m"); ++ if (r < 0) { + log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m"); return 0; } -- -1.7.9.5 +2.1.4 diff --git a/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch b/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch new file mode 100644 index 0000000000..29c20c010f --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch @@ -0,0 +1,42 @@ +From f771407d3e0288ca0c06a894194d3ddad69b9a8e Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:17:05 +0000 +Subject: [PATCH 07/11] util: Use mkostemp only if libc supports it + +Upstream-Status: Denied [no desire for uclibc support] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/shared/util.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/shared/util.c b/src/shared/util.c +index dc65280..72f4665 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -97,6 +97,8 @@ + #include "def.h" + #include "sparse-endian.h" + ++#include "config.h" ++ + int saved_argc = 0; + char **saved_argv = NULL; + +@@ -6682,7 +6684,13 @@ int mkostemp_safe(char *pattern, int flags) { + + u = umask(077); + ++#ifdef HAVE_MKOSTEMP + fd = mkostemp(pattern, flags); ++#else ++ fd = mkstemp(pattern); ++ if (fd >= 0) fcntl(fd, F_SETFD, flags); ++#endif /* HAVE_MKOSTEMP */ ++ + if (fd < 0) + return -errno; + +-- +2.1.4 + diff --git a/meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch b/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch index 39dfc9e2ea..5297625c93 100644 --- a/meta/recipes-core/systemd/systemd/uclibc-get-physmem.patch +++ b/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch @@ -1,18 +1,24 @@ -bypass unimplemented _SC_PHYS_PAGES system configuration API in uclibc +From b45ea3bfd6635744c8a6b74d0ac701b44bb1d294 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:19:37 +0000 +Subject: [PATCH 08/11] util: bypass unimplemented _SC_PHYS_PAGES system + configuration API on uclibc Upstream-Status: Inappropriate [uclibc-specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/shared/util.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) -Index: git/src/shared/util.c -=================================================================== ---- git.orig/src/shared/util.c 2014-03-15 18:09:34.796358146 -0700 -+++ git/src/shared/util.c 2014-03-15 20:16:33.836501084 -0700 -@@ -6332,11 +6332,24 @@ - +diff --git a/src/shared/util.c b/src/shared/util.c +index 72f4665..cbbe3b1 100644 +--- a/src/shared/util.c ++++ b/src/shared/util.c +@@ -6793,10 +6793,25 @@ uint64_t physical_memory(void) { /* We return this as uint64_t in case we are running as 32bit * process on a 64bit kernel with huge amounts of memory */ -- + +#ifdef __UCLIBC__ + char line[128]; + FILE *f = fopen("/proc/meminfo", "r"); @@ -29,9 +35,12 @@ Index: git/src/shared/util.c +#else mem = sysconf(_SC_PHYS_PAGES); assert(mem > 0); -- + return (uint64_t) mem * (uint64_t) page_size(); +#endif } - char* mount_test_option(const char *haystack, const char *needle) { + void hexdump(FILE *f, const void *p, size_t s) { +-- +2.1.4 + diff --git a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch b/meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch index 9aa07c1b10..9ea3e83e52 100644 --- a/meta/recipes-core/systemd/systemd/0001-add-support-for-executing-scripts-under-etc-rcS.d.patch +++ b/meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch @@ -1,20 +1,25 @@ -Upstream-Status: Inappropriate [OE specific] - -Subject: add support for executing scripts under /etc/rcS.d/ +From 8791b5b3934c55694872b6915a67340683ead91b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:22:52 +0000 +Subject: [PATCH 09/11] sysv-generator: add support for executing scripts under + /etc/rcS.d/ To be compatible, all services translated from scripts under /etc/rcS.d would run before services translated from scripts under /etc/rcN.d. +Upstream-Status: Inappropriate [OE specific] + Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> --- src/sysv-generator/sysv-generator.c | 50 ++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c -index 9a869ba..10c55c0 100644 +index bd67f32..6756cc6 100644 --- a/src/sysv-generator/sysv-generator.c +++ b/src/sysv-generator/sysv-generator.c -@@ -43,7 +43,8 @@ +@@ -42,7 +42,8 @@ typedef enum RunlevelType { RUNLEVEL_UP, @@ -24,9 +29,9 @@ index 9a869ba..10c55c0 100644 } RunlevelType; static const struct { -@@ -58,6 +59,9 @@ static const struct { - { "rc4.d", SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP }, - { "rc5.d", SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP }, +@@ -57,6 +58,9 @@ static const struct { + { "rc4.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP }, + { "rc5.d", SPECIAL_GRAPHICAL_TARGET, RUNLEVEL_UP }, + /* Debian style rcS.d, also adopted by OE */ + { "rcS.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT}, @@ -34,7 +39,7 @@ index 9a869ba..10c55c0 100644 /* Standard SysV runlevels for shutdown */ { "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN }, { "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN } -@@ -66,7 +70,7 @@ static const struct { +@@ -65,7 +69,7 @@ static const struct { directories in this order, and we want to make sure that sysv_start_priority is known when we first load the unit. And that value we only know from S links. Hence @@ -43,7 +48,7 @@ index 9a869ba..10c55c0 100644 }; typedef struct SysvStub { -@@ -82,6 +86,8 @@ typedef struct SysvStub { +@@ -81,6 +85,8 @@ typedef struct SysvStub { char **conflicts; bool has_lsb; bool reload; @@ -52,7 +57,7 @@ index 9a869ba..10c55c0 100644 } SysvStub; const char *arg_dest = "/tmp"; -@@ -156,6 +162,9 @@ static int generate_unit_file(SysvStub *s) { +@@ -183,6 +189,9 @@ static int generate_unit_file(SysvStub *s) { "Description=%s\n", s->path, s->description); @@ -62,7 +67,7 @@ index 9a869ba..10c55c0 100644 if (!isempty(before)) fprintf(f, "Before=%s\n", before); if (!isempty(after)) -@@ -661,18 +670,30 @@ static int fix_order(SysvStub *s, Hashmap *all_services) { +@@ -704,18 +713,30 @@ static int fix_order(SysvStub *s, Hashmap *all_services) { if (s->has_lsb && other->has_lsb) continue; @@ -101,7 +106,7 @@ index 9a869ba..10c55c0 100644 /* FIXME: Maybe we should compare the name here lexicographically? */ } -@@ -725,6 +746,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) { +@@ -778,6 +799,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) { return log_oom(); service->sysv_start_priority = -1; @@ -110,7 +115,7 @@ index 9a869ba..10c55c0 100644 service->name = name; service->path = fpath; -@@ -810,9 +833,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { +@@ -864,9 +887,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { if (de->d_name[0] == 'S') { @@ -122,8 +127,8 @@ index 9a869ba..10c55c0 100644 + service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false; } - r = set_ensure_allocated(&runlevel_services[i], -@@ -825,7 +850,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { + r = set_ensure_allocated(&runlevel_services[i], NULL); +@@ -878,7 +903,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) { goto finish; } else if (de->d_name[0] == 'K' && @@ -131,8 +136,8 @@ index 9a869ba..10c55c0 100644 + (rcnd_table[i].type == RUNLEVEL_DOWN || + rcnd_table[i].type == RUNLEVEL_SYSINIT)) { - r = set_ensure_allocated(&shutdown_services, - trivial_hash_func, trivial_compare_func); + r = set_ensure_allocated(&shutdown_services, NULL); + if (r < 0) -- -1.9.1 +2.1.4 diff --git a/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch b/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch index c5ad29174c..b65fe423a5 100644 --- a/meta/recipes-core/systemd/systemd/0001-Make-root-s-home-directory-configurable.patch +++ b/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch @@ -1,7 +1,7 @@ -From 4dc8dee0435bb63cbe474004b0a8df0363fe94dd Mon Sep 17 00:00:00 2001 -From: Dan McGregor <dan.mcgregor@usask.ca> -Date: Fri, 5 Sep 2014 06:28:58 -0600 -Subject: [PATCH] Make root's home directory configurable. +From 3dc731c1d270e2e143de621db9bd898299fd849d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:24:49 +0000 +Subject: [PATCH 10/11] Make root's home directory configurable OpenEmbedded has a configurable home directory for root. Allow systemd to be built using its idea of what root's home directory @@ -10,6 +10,7 @@ should be. Upstream-Status: Pending Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> +Signed-off-by: Khem Raj <raj.khem@gmail.com> --- Makefile.am | 2 ++ configure.ac | 7 +++++++ @@ -18,22 +19,23 @@ Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> src/shared/util.c | 4 ++-- units/console-shell.service.m4.in | 4 ++-- units/emergency.service.in | 4 ++-- - units/rescue.service.m4.in | 4 ++-- + units/rescue.service.in | 4 ++-- 8 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Makefile.am b/Makefile.am -index 4028112..5d18f5c 100644 +index 0fb3f9f..4623963 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -191,6 +191,7 @@ AM_CPPFLAGS = \ +@@ -199,7 +199,8 @@ AM_CPPFLAGS = \ -DKEXEC=\"$(KEXEC)\" \ -DLIBDIR=\"$(libdir)\" \ -DROOTLIBDIR=\"$(rootlibdir)\" \ + -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \ + -DROOTHOMEDIR=\"$(roothomedir)\" \ -DTEST_DIR=\"$(abs_top_srcdir)/test\" \ -I $(top_srcdir)/src \ -I $(top_builddir)/src/shared \ -@@ -5584,6 +5585,7 @@ EXTRA_DIST += \ +@@ -6342,6 +6343,7 @@ EXTRA_DIST += \ substitutions = \ '|rootlibexecdir=$(rootlibexecdir)|' \ '|rootbindir=$(rootbindir)|' \ @@ -42,13 +44,13 @@ index 4028112..5d18f5c 100644 '|SYSTEMCTL=$(rootbindir)/systemctl|' \ '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \ diff --git a/configure.ac b/configure.ac -index 18b7198..365bc73 100644 +index a5b2e6e..55bb7d8 100644 --- a/configure.ac +++ b/configure.ac -@@ -1272,6 +1272,11 @@ AC_ARG_WITH([rootlibdir], +@@ -1428,6 +1428,11 @@ AC_ARG_WITH([rootlibdir], [], [with_rootlibdir=${libdir}]) - + +AC_ARG_WITH([roothomedir], + AS_HELP_STRING([--with-roothomedir=DIR], [Home directory for the root user]), + [], @@ -57,15 +59,15 @@ index 18b7198..365bc73 100644 AC_ARG_WITH([pamlibdir], AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), [], -@@ -1317,6 +1322,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir]) +@@ -1518,6 +1523,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir]) AC_SUBST([pamconfdir], [$with_pamconfdir]) AC_SUBST([rootprefix], [$with_rootprefix]) AC_SUBST([rootlibdir], [$with_rootlibdir]) +AC_SUBST([roothomedir], [$with_roothomedir]) - + AC_CONFIG_FILES([ Makefile po/Makefile.in -@@ -1400,6 +1406,7 @@ AC_MSG_RESULT([ +@@ -1617,6 +1623,7 @@ AC_MSG_RESULT([ include_prefix: ${INCLUDE_PREFIX} lib dir: ${libdir} rootlib dir: ${with_rootlibdir} @@ -74,34 +76,34 @@ index 18b7198..365bc73 100644 SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH} Build Python: ${PYTHON} diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c -index 62599d0..852d34c 100644 +index 97135db..14d12f1 100644 --- a/src/core/unit-printf.c +++ b/src/core/unit-printf.c @@ -259,7 +259,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char * best of it if we can, but fail if we can't */ - + if (!c->user || streq(c->user, "root") || streq(c->user, "0")) - n = strdup("/root"); + n = strdup(ROOTHOMEDIR); else return -ENOTSUP; - + diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index d01da45..3e876d5 100644 +index b597edb..0b32673 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c -@@ -3312,7 +3312,7 @@ int main(int argc, char *argv[]) { +@@ -4192,7 +4192,7 @@ int main(int argc, char *argv[]) { if (r < 0) _exit(EXIT_FAILURE); - + - if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) || + if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) || (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) || (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0)) { log_oom(); -@@ -3402,7 +3402,7 @@ int main(int argc, char *argv[]) { - } else if (argc > optind) - execvpe(argv[optind], argv + optind, env_use); +@@ -4266,7 +4266,7 @@ int main(int argc, char *argv[]) { + execvp(argv[optind], argv + optind); + #endif /* HAVE_EXECVPE */ else { - chdir(home ? home : "/root"); + chdir(home ? home : ROOTHOMEDIR); @@ -109,19 +111,19 @@ index d01da45..3e876d5 100644 execle("/bin/sh", "-sh", NULL, env_use); } diff --git a/src/shared/util.c b/src/shared/util.c -index 85a570a..aef6033 100644 +index cbbe3b1..a0e3cc5 100644 --- a/src/shared/util.c +++ b/src/shared/util.c -@@ -4377,7 +4377,7 @@ int get_user_creds( +@@ -4609,7 +4609,7 @@ int get_user_creds( *gid = 0; - + if (home) - *home = "/root"; + *home = ROOTHOMEDIR; - + if (shell) *shell = "/bin/sh"; -@@ -5363,7 +5363,7 @@ int get_home_dir(char **_h) { +@@ -5611,7 +5611,7 @@ int get_home_dir(char **_h) { /* Hardcode home directory for root to avoid NSS */ u = getuid(); if (u == 0) { @@ -129,52 +131,52 @@ index 85a570a..aef6033 100644 + h = strdup(ROOTHOMEDIR); if (!h) return -ENOMEM; - + diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in -index 3f4904a..e2af652 100644 +index 5c80722..efde5f0 100644 --- a/units/console-shell.service.m4.in +++ b/units/console-shell.service.m4.in @@ -15,8 +15,8 @@ After=rc-local.service Before=getty.target - + [Service] -Environment=HOME=/root -WorkingDirectory=/root +Environment=HOME=@roothomedir@ +WorkingDirectory=@roothomedir@ - ExecStart=-/sbin/sulogin + ExecStart=-@SULOGIN@ ExecStopPost=-@SYSTEMCTL@ poweroff Type=idle diff --git a/units/emergency.service.in b/units/emergency.service.in -index 91fc1bb..659547e 100644 +index 2695d7b..7f47b73 100644 --- a/units/emergency.service.in +++ b/units/emergency.service.in -@@ -13,8 +13,8 @@ Conflicts=shutdown.target +@@ -14,8 +14,8 @@ Conflicts=rescue.service Before=shutdown.target - + [Service] -Environment=HOME=/root -WorkingDirectory=/root +Environment=HOME=@roothomedir@ +WorkingDirectory=@roothomedir@ ExecStartPre=-/bin/plymouth quit - ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.' - ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default" -diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in -index ef54369..7aad86f 100644 ---- a/units/rescue.service.m4.in -+++ b/units/rescue.service.m4.in + ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.' + ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default" +diff --git a/units/rescue.service.in b/units/rescue.service.in +index de73fee..47f3593 100644 +--- a/units/rescue.service.in ++++ b/units/rescue.service.in @@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service Before=shutdown.target - + [Service] -Environment=HOME=/root -WorkingDirectory=/root +Environment=HOME=@roothomedir@ +WorkingDirectory=@roothomedir@ ExecStartPre=-/bin/plymouth quit - ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.' - ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default" + ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.' + ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default" -- -1.9.3 +2.1.4 diff --git a/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch b/meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch index fbde13f077..e562bca100 100644 --- a/meta/recipes-core/systemd/systemd/0001-systemd-user-avoid-using-system-auth.patch +++ b/meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch @@ -1,11 +1,15 @@ -Upstream-Status: Inappropriate [oe specific] - -Subject: systemd-user: avoid using system-auth +From 7e202f71785bf5a67c8a4f6b58d3585608fbfdc4 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 20 Feb 2015 05:26:25 +0000 +Subject: [PATCH 11/11] systemd-user: avoid using system-auth In OE, we don't provide system-auth, instead, we use common-* files. So modify systemd-user file to use common-* files. +Upstream-Status: Inappropriate [oe specific] + Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> --- src/login/systemd-user | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) @@ -17,10 +21,11 @@ index 8112d74..99635af 100644 @@ -2,5 +2,5 @@ # # Used by systemd --user instances. - + -account include system-auth -session include system-auth +account include common-account +session include common-session --- -1.9.1 +-- +2.1.4 + diff --git a/meta/recipes-core/systemd/systemd/0012-systemd-tmpfiles.c-Honor-ordering-within-files-as-th.patch b/meta/recipes-core/systemd/systemd/0012-systemd-tmpfiles.c-Honor-ordering-within-files-as-th.patch new file mode 100644 index 0000000000..ccd675798c --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0012-systemd-tmpfiles.c-Honor-ordering-within-files-as-th.patch @@ -0,0 +1,185 @@ +From 2abf886295b979bce6d3f0a240f6f5ecfd70ba37 Mon Sep 17 00:00:00 2001 +From: Randy Witt <randy.e.witt@linux.intel.com> +Date: Wed, 4 Mar 2015 18:32:40 -0800 +Subject: [PATCH] tmpfiles.c: Honor ordering within files as the docs say. + +Previously, globs would always get processed first followed by any other +items in arbitrary order. This is contrary to the documentation which +states "Otherwise, the files/directories are processed in the order they +are listed." + +To fix this, remove the separate "globs" hashmap, and instead use only one +marking each entry as a glob or not. There should be little overhead +from doing this, considering the only time nested processing will occur +is for processing of globs which are not of type "X". + +Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> +--- + src/tmpfiles/tmpfiles.c | 53 ++++++++++++++++++++++--------------------------- + 1 file changed, 24 insertions(+), 29 deletions(-) + +diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c +index 917bb3c..0b6d226 100644 +--- a/src/tmpfiles/tmpfiles.c ++++ b/src/tmpfiles/tmpfiles.c +@@ -116,6 +116,7 @@ typedef struct Item { + bool force:1; + + bool done:1; ++ bool glob:1; + } Item; + + typedef struct ItemArray { +@@ -137,7 +138,7 @@ static const char conf_file_dirs[] = CONF_DIRS_NULSTR("tmpfiles"); + + #define MAX_DEPTH 256 + +-static Hashmap *items = NULL, *globs = NULL; ++static OrderedHashmap *items = NULL; + static Set *unix_sockets = NULL; + + static bool needs_glob(ItemType t) { +@@ -176,17 +177,17 @@ static bool takes_ownership(ItemType t) { + RECURSIVE_REMOVE_PATH); + } + +-static struct Item* find_glob(Hashmap *h, const char *match) { ++static struct Item* find_glob(OrderedHashmap *h, const char *match) { + ItemArray *j; + Iterator i; + +- HASHMAP_FOREACH(j, h, i) { ++ ORDERED_HASHMAP_FOREACH(j, h, i) { + unsigned n; + + for (n = 0; n < j->count; n++) { + Item *item = j->items + n; + +- if (fnmatch(item->path, match, FNM_PATHNAME|FNM_PERIOD) == 0) ++ if (item->glob && fnmatch(item->path, match, FNM_PATHNAME|FNM_PERIOD) == 0) + return item; + } + } +@@ -391,12 +392,12 @@ static int dir_cleanup( + } + + /* Is there an item configured for this path? */ +- if (hashmap_get(items, sub_path)) { ++ if (ordered_hashmap_get(items, sub_path)) { + log_debug("Ignoring \"%s\": a separate entry exists.", sub_path); + continue; + } + +- if (find_glob(globs, sub_path)) { ++ if (find_glob(items, sub_path)) { + log_debug("Ignoring \"%s\": a separate glob exists.", sub_path); + continue; + } +@@ -1378,7 +1379,7 @@ static int process_item(Item *i) { + PATH_FOREACH_PREFIX(prefix, i->path) { + ItemArray *j; + +- j = hashmap_get(items, prefix); ++ j = ordered_hashmap_get(items, prefix); + if (j) { + int s; + +@@ -1505,7 +1506,6 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { + _cleanup_free_ char *action = NULL, *mode = NULL, *user = NULL, *group = NULL, *age = NULL, *path = NULL; + _cleanup_(item_free_contents) Item i = {}; + ItemArray *existing; +- Hashmap *h; + int r, c = -1, pos; + bool force = false, boot = false; + +@@ -1739,9 +1739,9 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { + i.age_set = true; + } + +- h = needs_glob(i.type) ? globs : items; ++ i.glob = needs_glob(i.type); + +- existing = hashmap_get(h, i.path); ++ existing = ordered_hashmap_get(items, i.path); + if (existing) { + unsigned n; + +@@ -1752,7 +1752,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { + } + } else { + existing = new0(ItemArray, 1); +- r = hashmap_put(h, i.path, existing); ++ r = ordered_hashmap_put(items, i.path, existing); + if (r < 0) + return log_oom(); + } +@@ -1911,14 +1911,20 @@ static int read_config_file(const char *fn, bool ignore_enoent) { + } + + /* we have to determine age parameter for each entry of type X */ +- HASHMAP_FOREACH(i, globs, iterator) { ++ ORDERED_HASHMAP_FOREACH(i, items, iterator) { + Iterator iter; + Item *j, *candidate_item = NULL; ++ int number = 0; + ++ if (!i->glob) ++ continue; + if (i->type != IGNORE_DIRECTORY_PATH) + continue; + +- HASHMAP_FOREACH(j, items, iter) { ++ ORDERED_HASHMAP_FOREACH(j, items, iter) { ++ number++; ++ if (j == i) ++ continue; + if (j->type != CREATE_DIRECTORY && j->type != TRUNCATE_DIRECTORY && j->type != CREATE_SUBVOLUME) + continue; + +@@ -1964,10 +1970,9 @@ int main(int argc, char *argv[]) { + + mac_selinux_init(NULL); + +- items = hashmap_new(&string_hash_ops); +- globs = hashmap_new(&string_hash_ops); ++ items = ordered_hashmap_new(&string_hash_ops); + +- if (!items || !globs) { ++ if (!items) { + r = log_oom(); + goto finish; + } +@@ -2000,27 +2005,17 @@ int main(int argc, char *argv[]) { + } + } + +- HASHMAP_FOREACH(a, globs, iterator) { +- k = process_item_array(a); +- if (k < 0 && r == 0) +- r = k; +- } +- +- HASHMAP_FOREACH(a, items, iterator) { ++ ORDERED_HASHMAP_FOREACH(a, items, iterator) { + k = process_item_array(a); + if (k < 0 && r == 0) + r = k; + } + + finish: +- while ((a = hashmap_steal_first(items))) +- item_array_free(a); +- +- while ((a = hashmap_steal_first(globs))) ++ while ((a = ordered_hashmap_steal_first(items))) + item_array_free(a); + +- hashmap_free(items); +- hashmap_free(globs); ++ ordered_hashmap_free(items); + + free(arg_include_prefixes); + free(arg_exclude_prefixes); +-- +1.9.3 + diff --git a/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch b/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch new file mode 100644 index 0000000000..fe2ba5328d --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch @@ -0,0 +1,28 @@ +From 4f0a722489154da99e7f6b3051afde984eed2f74 Mon Sep 17 00:00:00 2001 +From: Jonathan Liu <net147@gmail.com> +Date: Thu, 19 Mar 2015 15:01:29 +1100 +Subject: [PATCH] Revert "rules: remove firmware loading rules" + +This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19. +Userspace firmware loading support is needed for Linux < 3.7. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Jonathan Liu <net147@gmail.com> +--- + rules/50-firmware.rules | 3 +++ + 1 file changed, 3 insertions(+) + create mode 100644 rules/50-firmware.rules + +diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules +new file mode 100644 +index 0000000..f0ae684 +--- /dev/null ++++ b/rules/50-firmware.rules +@@ -0,0 +1,3 @@ ++# do not edit this file, it will be overwritten on update ++ ++SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware" +-- +2.3.3 + diff --git a/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch new file mode 100644 index 0000000000..3e3aa278bd --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch @@ -0,0 +1,367 @@ +From 7f074def4e32045353ba4336d703e17b8de7ec4e Mon Sep 17 00:00:00 2001 +From: Jonathan Liu <net147@gmail.com> +Date: Thu, 19 Mar 2015 15:01:33 +1100 +Subject: [PATCH] Revert "udev: remove userspace firmware loading support" + +This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca. +Userspace firmware loading support is needed for Linux < 3.7. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Jonathan Liu <net147@gmail.com> +--- + Makefile.am | 12 +++ + README | 9 ++- + TODO | 1 + + configure.ac | 20 +++++ + src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++ + src/udev/udev-builtin.c | 3 + + src/udev/udev.h | 6 ++ + src/udev/udevd.c | 13 ++++ + 8 files changed, 214 insertions(+), 4 deletions(-) + create mode 100644 src/udev/udev-builtin-firmware.c + +diff --git a/Makefile.am b/Makefile.am +index bf04d31..9394700 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -3678,6 +3678,18 @@ libudev_core_la_LIBADD = \ + $(BLKID_LIBS) \ + $(KMOD_LIBS) + ++libudev_core_la_CPPFLAGS = \ ++ $(AM_CPPFLAGS) \ ++ -DFIRMWARE_PATH="$(FIRMWARE_PATH)" ++ ++if ENABLE_FIRMWARE ++libudev_core_la_SOURCES += \ ++ src/udev/udev-builtin-firmware.c ++ ++dist_udevrules_DATA += \ ++ rules/50-firmware.rules ++endif ++ + if HAVE_KMOD + libudev_core_la_SOURCES += \ + src/udev/udev-builtin-kmod.c +diff --git a/README b/README +index c722092..db382d2 100644 +--- a/README ++++ b/README +@@ -36,7 +36,8 @@ LICENSE: + - except src/udev/* which is (currently still) GPLv2, GPLv2+ + + REQUIREMENTS: +- Linux kernel >= 3.7 ++ Linux kernel >= 3.0 ++ Linux kernel >= 3.3 for loop device partition support features with nspawn + Linux kernel >= 3.8 for Smack support + + Kernel Config Options: +@@ -51,14 +52,14 @@ REQUIREMENTS: + CONFIG_PROC_FS + CONFIG_FHANDLE (libudev, mount and bind mount handling) + +- udev will fail to work with the legacy sysfs layout: ++ Udev will fail to work with the legacy layout: + CONFIG_SYSFS_DEPRECATED=n + + Legacy hotplug slows down the system and confuses udev: + CONFIG_UEVENT_HELPER_PATH="" + +- Userspace firmware loading is not supported and should +- be disabled in the kernel: ++ Userspace firmware loading is deprecated, will go away, and ++ sometimes causes problems: + CONFIG_FW_LOADER_USER_HELPER=n + + Some udev rules and virtualization detection relies on it: +diff --git a/TODO b/TODO +index 255a4f2..407bdd0 100644 +--- a/TODO ++++ b/TODO +@@ -727,6 +727,7 @@ Features: + * ExecOnFailure=/usr/bin/foo + + * udev: ++ - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n) + - move to LGPL + - kill scsi_id + - add trigger --subsystem-match=usb/usb_device device +diff --git a/configure.ac b/configure.ac +index 97a29d6..13b80ce 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1245,6 +1245,25 @@ fi + AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"]) + + # ------------------------------------------------------------------------------ ++AC_ARG_WITH(firmware-path, ++ AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], ++ [Firmware search path (default="")]), ++ [], [with_firmware_path=""]) ++OLD_IFS=$IFS ++IFS=: ++for i in $with_firmware_path; do ++ if test "x${FIRMWARE_PATH}" = "x"; then ++ FIRMWARE_PATH="\\\"${i}/\\\"" ++ else ++ FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\"" ++ fi ++done ++IFS=$OLD_IFS ++AC_SUBST(FIRMWARE_PATH) ++AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ]) ++AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"]) ++ ++# ------------------------------------------------------------------------------ + AC_ARG_ENABLE([gudev], + AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]), + [], [enable_gudev=yes]) +@@ -1533,6 +1552,7 @@ AC_MSG_RESULT([ + Build Python: ${PYTHON} + Installation Python: ${PYTHON_BINARY} + sphinx binary: ${SPHINX_BUILD} ++ firmware path: ${FIRMWARE_PATH} + PAM modules dir: ${with_pamlibdir} + PAM configuration dir: ${with_pamconfdir} + D-Bus policy dir: ${with_dbuspolicydir} +diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c +new file mode 100644 +index 0000000..bd8c2fb +--- /dev/null ++++ b/src/udev/udev-builtin-firmware.c +@@ -0,0 +1,154 @@ ++/* ++ * firmware - Kernel firmware loader ++ * ++ * Copyright (C) 2009 Piter Punk <piterpunk@slackware.com> ++ * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org> ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details:* ++ */ ++ ++#include <unistd.h> ++#include <stdlib.h> ++#include <string.h> ++#include <stdio.h> ++#include <getopt.h> ++#include <errno.h> ++#include <stdbool.h> ++#include <sys/utsname.h> ++#include <sys/stat.h> ++ ++#include "udev.h" ++ ++static bool set_loading(struct udev *udev, char *loadpath, const char *state) { ++ FILE *ldfile; ++ ++ ldfile = fopen(loadpath, "we"); ++ if (ldfile == NULL) { ++ log_error("error: can not open '%s'", loadpath); ++ return false; ++ }; ++ fprintf(ldfile, "%s\n", state); ++ fclose(ldfile); ++ return true; ++} ++ ++static bool copy_firmware(struct udev *udev, const char *source, const char *target, size_t size) { ++ char *buf; ++ FILE *fsource = NULL, *ftarget = NULL; ++ bool ret = false; ++ ++ buf = malloc(size); ++ if (buf == NULL) { ++ log_error("No memory available to load firmware file"); ++ return false; ++ } ++ ++ log_debug("writing '%s' (%zi) to '%s'", source, size, target); ++ ++ fsource = fopen(source, "re"); ++ if (fsource == NULL) ++ goto exit; ++ ftarget = fopen(target, "we"); ++ if (ftarget == NULL) ++ goto exit; ++ if (fread(buf, size, 1, fsource) != 1) ++ goto exit; ++ if (fwrite(buf, size, 1, ftarget) == 1) ++ ret = true; ++exit: ++ if (ftarget != NULL) ++ fclose(ftarget); ++ if (fsource != NULL) ++ fclose(fsource); ++ free(buf); ++ return ret; ++} ++ ++static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], bool test) { ++ struct udev *udev = udev_device_get_udev(dev); ++ static const char *searchpath[] = { FIRMWARE_PATH }; ++ char loadpath[UTIL_PATH_SIZE]; ++ char datapath[UTIL_PATH_SIZE]; ++ char fwpath[UTIL_PATH_SIZE]; ++ const char *firmware; ++ FILE *fwfile = NULL; ++ struct utsname kernel; ++ struct stat statbuf; ++ unsigned int i; ++ int rc = EXIT_SUCCESS; ++ ++ firmware = udev_device_get_property_value(dev, "FIRMWARE"); ++ if (firmware == NULL) { ++ log_error("firmware parameter missing"); ++ rc = EXIT_FAILURE; ++ goto exit; ++ } ++ ++ /* lookup firmware file */ ++ uname(&kernel); ++ for (i = 0; i < ELEMENTSOF(searchpath); i++) { ++ strscpyl(fwpath, sizeof(fwpath), searchpath[i], kernel.release, "/", firmware, NULL); ++ fwfile = fopen(fwpath, "re"); ++ if (fwfile != NULL) ++ break; ++ ++ strscpyl(fwpath, sizeof(fwpath), searchpath[i], firmware, NULL); ++ fwfile = fopen(fwpath, "re"); ++ if (fwfile != NULL) ++ break; ++ } ++ ++ strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL); ++ ++ if (fwfile == NULL) { ++ log_debug("did not find firmware file '%s'", firmware); ++ rc = EXIT_FAILURE; ++ /* ++ * Do not cancel the request in the initrd, the real root might have ++ * the firmware file and the 'coldplug' run in the real root will find ++ * this pending request and fulfill or cancel it. ++ * */ ++ if (!in_initrd()) ++ set_loading(udev, loadpath, "-1"); ++ goto exit; ++ } ++ ++ if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) { ++ if (!in_initrd()) ++ set_loading(udev, loadpath, "-1"); ++ rc = EXIT_FAILURE; ++ goto exit; ++ } ++ ++ if (!set_loading(udev, loadpath, "1")) ++ goto exit; ++ ++ strscpyl(datapath, sizeof(datapath), udev_device_get_syspath(dev), "/data", NULL); ++ if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) { ++ log_error("error sending firmware '%s' to device", firmware); ++ set_loading(udev, loadpath, "-1"); ++ rc = EXIT_FAILURE; ++ goto exit; ++ }; ++ ++ set_loading(udev, loadpath, "0"); ++exit: ++ if (fwfile) ++ fclose(fwfile); ++ return rc; ++} ++ ++const struct udev_builtin udev_builtin_firmware = { ++ .name = "firmware", ++ .cmd = builtin_firmware, ++ .help = "kernel firmware loader", ++ .run_once = true, ++}; +diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c +index 1950ec2..f21c0b6 100644 +--- a/src/udev/udev-builtin.c ++++ b/src/udev/udev-builtin.c +@@ -34,6 +34,9 @@ static const struct udev_builtin *builtins[] = { + [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid, + #endif + [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs, ++#ifdef HAVE_FIRMWARE ++ [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware, ++#endif + [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb, + [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id, + [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard, +diff --git a/src/udev/udev.h b/src/udev/udev.h +index dece6ec..f7ee1e7 100644 +--- a/src/udev/udev.h ++++ b/src/udev/udev.h +@@ -151,6 +151,9 @@ enum udev_builtin_cmd { + UDEV_BUILTIN_BLKID, + #endif + UDEV_BUILTIN_BTRFS, ++#ifdef HAVE_FIRMWARE ++ UDEV_BUILTIN_FIRMWARE, ++#endif + UDEV_BUILTIN_HWDB, + UDEV_BUILTIN_INPUT_ID, + UDEV_BUILTIN_KEYBOARD, +@@ -179,6 +182,9 @@ struct udev_builtin { + extern const struct udev_builtin udev_builtin_blkid; + #endif + extern const struct udev_builtin udev_builtin_btrfs; ++#ifdef HAVE_FIRMWARE ++extern const struct udev_builtin udev_builtin_firmware; ++#endif + extern const struct udev_builtin udev_builtin_hwdb; + extern const struct udev_builtin udev_builtin_input_id; + extern const struct udev_builtin udev_builtin_keyboard; +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index 99d4c89..71af1e1 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -99,6 +99,9 @@ struct event { + dev_t devnum; + int ifindex; + bool is_block; ++#ifdef HAVE_FIRMWARE ++ bool nodelay; ++#endif + }; + + static inline struct event *node_to_event(struct udev_list_node *node) { +@@ -472,6 +475,10 @@ static int event_queue_insert(struct udev_device *dev) { + event->devnum = udev_device_get_devnum(dev); + event->is_block = streq("block", udev_device_get_subsystem(dev)); + event->ifindex = udev_device_get_ifindex(dev); ++#ifdef HAVE_FIRMWARE ++ if (streq(udev_device_get_subsystem(dev), "firmware")) ++ event->nodelay = true; ++#endif + + log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev), + udev_device_get_action(dev), udev_device_get_subsystem(dev)); +@@ -548,6 +555,12 @@ static bool is_devpath_busy(struct event *event) { + return true; + } + ++#ifdef HAVE_FIRMWARE ++ /* allow to bypass the dependency tracking */ ++ if (event->nodelay) ++ continue; ++#endif ++ + /* parent device event found */ + if (event->devpath[common] == '/') { + event->delaying_seqnum = loop_event->seqnum; +-- +2.3.3 + diff --git a/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch b/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch deleted file mode 100644 index 2063268246..0000000000 --- a/meta/recipes-core/systemd/systemd/optional_secure_getenv.patch +++ /dev/null @@ -1,19 +0,0 @@ -on uclibc secure_getenv is not available -therefore default to using getenv instead - -Upstream-Status: Denied [no desire for uclibc support] -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: git/src/shared/missing.h -=================================================================== ---- git.orig/src/shared/missing.h 2012-09-22 18:46:44.141282145 -0700 -+++ git/src/shared/missing.h 2012-09-22 18:48:44.081276570 -0700 -@@ -233,6 +233,8 @@ - #ifndef HAVE_SECURE_GETENV - # ifdef HAVE___SECURE_GETENV - # define secure_getenv __secure_getenv -+# elif defined __UCLIBC__ -+# define secure_getenv getenv - # else - # error neither secure_getenv nor __secure_getenv are available - # endif diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch deleted file mode 100644 index 9b4c940984..0000000000 --- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-getty-unit.patch +++ /dev/null @@ -1,35 +0,0 @@ -Prefer getty to agetty in console setup systemd units - -Upstream-Status: Inappropriate [configuration specific] -Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> ---- - units/getty@.service.m4 | 2 +- - units/serial-getty@.service.m4 | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -Index: git/units/getty@.service.m4 -=================================================================== ---- git.orig/units/getty@.service.m4 2014-03-15 08:16:17.000000000 -0700 -+++ git/units/getty@.service.m4 2014-03-15 08:21:11.007695825 -0700 -@@ -27,7 +27,7 @@ - - [Service] - # the VT is cleared by TTYVTDisallocate --ExecStart=-/sbin/agetty --noclear %I $TERM -+ExecStart=-/sbin/getty -L %I $TERM - Type=idle - Restart=always - RestartSec=0 -Index: git/units/serial-getty@.service.m4 -=================================================================== ---- git.orig/units/serial-getty@.service.m4 2014-03-15 08:16:17.000000000 -0700 -+++ git/units/serial-getty@.service.m4 2014-03-15 08:22:31.291697331 -0700 -@@ -22,7 +22,7 @@ - IgnoreOnIsolate=yes - - [Service] --ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM -+ExecStart=-/sbin/getty -L 115200 %I $TERM - Type=idle - Restart=always - RestartSec=0 diff --git a/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch b/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch deleted file mode 100644 index 8c7aa072da..0000000000 --- a/meta/recipes-core/systemd/systemd/systemd-pam-fix-mkostemp.patch +++ /dev/null @@ -1,30 +0,0 @@ -Upstream-Status: Denied [no desire for uclibc support] -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: git/src/shared/util.c -=================================================================== ---- git.orig/src/shared/util.c 2014-03-15 15:14:21.368160908 -0700 -+++ git/src/shared/util.c 2014-03-15 15:44:21.988194688 -0700 -@@ -85,6 +85,8 @@ - #include "def.h" - #include "missing.h" - -+#include "config.h" -+ - int saved_argc = 0; - char **saved_argv = NULL; - -@@ -6222,7 +6224,13 @@ - - u = umask(077); - -+#ifdef HAVE_MKOSTEMP - fd = mkostemp(pattern, flags); -+#else -+ fd = mkstemp(pattern); -+ if (fd >= 0) fcntl(fd, F_SETFD, flags); -+#endif /* HAVE_MKOSTEMP */ -+ - if (fd < 0) - return -errno; - diff --git a/meta/recipes-core/systemd/systemd/tmpfiles-pam.patch b/meta/recipes-core/systemd/systemd/tmpfiles-pam.patch new file mode 100644 index 0000000000..a40b1b9d3f --- /dev/null +++ b/meta/recipes-core/systemd/systemd/tmpfiles-pam.patch @@ -0,0 +1,30 @@ +Upstream-Status: Submitted +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 0802aaaa9784813d318d045c79533a044eedf542 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@intel.com> +Date: Tue, 3 Mar 2015 11:32:29 +0000 +Subject: [PATCH] tmpfiles.d: only copy /etc/pam.d if PAM is present + +If HAVE_PAM isn't set then don't attempt to copy /etc/pam.d from the factory, as +it doesn't get installed. + +Signed-off-by: Ross Burton <ross.burton@intel.com> +--- + tmpfiles.d/etc.conf.m4 | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tmpfiles.d/etc.conf.m4 b/tmpfiles.d/etc.conf.m4 +index 9b0e080..ab5cd16 100644 +--- a/tmpfiles.d/etc.conf.m4 ++++ b/tmpfiles.d/etc.conf.m4 +@@ -14,4 +14,6 @@ m4_ifdef(`ENABLE_RESOLVED', + L /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf + )m4_dnl + C /etc/nsswitch.conf - - - - ++m4_ifdef(`HAVE_PAM', + C /etc/pam.d - - - - ++)m4_dnl +-- +1.7.10.4 + diff --git a/meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch b/meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch deleted file mode 100644 index 15645dee11..0000000000 --- a/meta/recipes-core/systemd/systemd/uclibc-sysinfo_h.patch +++ /dev/null @@ -1,19 +0,0 @@ -Dont include sys/sysinfo.h on uclibc it conflicts with linux/sysinfo.h - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Upstream-Status: Inappropriate [uclibc specific] - -Index: systemd-209/src/readahead/readahead-common.c -=================================================================== ---- systemd-209.orig/src/readahead/readahead-common.c 2014-02-12 18:42:33.810685053 -0800 -+++ systemd-209/src/readahead/readahead-common.c 2014-02-19 23:49:31.856661142 -0800 -@@ -22,7 +22,9 @@ - #include <errno.h> - #include <stdlib.h> - #include <string.h> -+#ifndef __UCLIBC__ - #include <sys/sysinfo.h> -+#endif - #include <sys/inotify.h> - #include <fcntl.h> - #include <sys/mman.h> diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_219.bb index 1eb401988e..c196017e1e 100644 --- a/meta/recipes-core/systemd/systemd_216.bb +++ b/meta/recipes-core/systemd/systemd_219.bb @@ -1,6 +1,15 @@ -SUMMARY = "System and service manager for Linux, replacing SysVinit" +SUMMARY = "A System and service manager" HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd" +DESCRIPTION = "systemd is a system and service manager for Linux, compatible with \ +SysV and LSB init scripts. systemd provides aggressive parallelization \ +capabilities, uses socket and D-Bus activation for starting services, \ +offers on-demand starting of daemons, keeps track of processes using \ +Linux cgroups, supports snapshotting and restoring of the system \ +state, maintains mount and automount points and implements an \ +elaborate transactional dependency-based service control logic. It can \ +work as a drop-in replacement for sysvinit." + LICENSE = "GPLv2 & LGPLv2.1 & MIT" LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c \ @@ -11,33 +20,30 @@ PROVIDES = "udev" PE = "1" DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup glib-2.0 qemu-native util-linux" -DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" SECTION = "base/shell" inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext -SRCREV = "5d0ae62c665262c4c55536457e84e278c252cc0b" - -PV = "216+git${SRCPV}" - -SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol=git \ - file://binfmt-install.patch \ - file://systemd-pam-configure-check-uclibc.patch \ - file://systemd-pam-fix-execvpe.patch \ - file://systemd-pam-fix-fallocate.patch \ - file://systemd-pam-fix-mkostemp.patch \ - file://optional_secure_getenv.patch \ - file://uclibc-sysinfo_h.patch \ - file://uclibc-get-physmem.patch \ - file://0001-add-support-for-executing-scripts-under-etc-rcS.d.patch \ - file://0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch \ - file://0001-Make-root-s-home-directory-configurable.patch \ - file://0001-systemd-user-avoid-using-system-auth.patch \ - file://0001-journal-Fix-navigating-backwards-missing-entries.patch \ - file://0001-tmpfiles-make-resolv.conf-entry-conditional-on-resol.patch \ - file://0001-build-sys-do-not-install-tmpfiles-and-sysusers-files.patch \ - file://0001-build-sys-configure-the-list-of-system-users-files-a.patch \ +SRCREV = "85a6fabdd3e43cfab0fc6359e9f2a9e368d4a3ed" + +PV = "219-stable+git${SRCPV}" + +SRC_URI = "git://anongit.freedesktop.org/systemd/systemd-stable;branch=v219-stable;protocol=git \ + file://0002-shared-missing.h-fall-back-to-insecure-getenv.patch \ + file://0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ + file://0004-configure-Check-for-additional-features-that-uclibc-.patch \ + file://0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch \ + file://0006-journal-Use-posix-fallocate-only-if-available.patch \ + file://0007-util-Use-mkostemp-only-if-libc-supports-it.patch \ + file://0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \ + file://0009-sysv-generator-add-support-for-executing-scripts-und.patch \ + file://0010-Make-root-s-home-directory-configurable.patch \ + file://0011-systemd-user-avoid-using-system-auth.patch \ + file://0012-systemd-tmpfiles.c-Honor-ordering-within-files-as-th.patch \ + file://0014-Revert-rules-remove-firmware-loading-rules.patch \ + file://0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch \ + file://tmpfiles-pam.patch \ file://touchscreen.rules \ file://00-create-volatile.conf \ file://init \ @@ -47,13 +53,16 @@ SRC_URI = "git://anongit.freedesktop.org/systemd/systemd;branch=master;protocol= S = "${WORKDIR}/git" SRC_URI_append_libc-uclibc = "\ - file://systemd-pam-fix-getty-unit.patch \ - " + file://0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch \ + " LDFLAGS_append_libc-uclibc = " -lrt" GTKDOC_DOCDIR = "${S}/docs/" -PACKAGECONFIG ??= "xz" +PACKAGECONFIG ??= "xz ldconfig \ + ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)}" + PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl" # Sign the journal for anti-tampering PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt" @@ -69,8 +78,19 @@ PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved" PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd" PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn" PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit" - -CACHED_CONFIGUREVARS = "ac_cv_path_KILL=${base_bindir}/kill" +PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" +PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam" +# Verify keymaps on locale change +PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon" +# Update NAT firewall rules +PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables" +PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,," + +CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill" +CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod" +CACHED_CONFIGUREVARS += "ac_cv_path_QUOTACHECK=${sbindir}/quotacheck" +CACHED_CONFIGUREVARS += "ac_cv_path_QUOTAON=${sbindir}/quotaon" +CACHED_CONFIGUREVARS += "ac_cv_path_SULOGIN=${base_sbindir}/sulogin" # Helper variables to clarify locations. This mirrors the logic in systemd's # build system. @@ -82,8 +102,6 @@ rootlibexecdir = "${rootprefix}/lib" EXTRA_OECONF = " --with-rootprefix=${rootprefix} \ --with-rootlibdir=${rootlibdir} \ --with-roothomedir=${ROOT_HOME} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \ - --disable-manpages \ --disable-coredump \ --disable-introspection \ --disable-kdbus \ @@ -91,7 +109,6 @@ EXTRA_OECONF = " --with-rootprefix=${rootprefix} \ --without-python \ --with-sysvrcnd-path=${sysconfdir} \ --with-firmware-path=/lib/firmware \ - ac_cv_path_KILL=${base_bindir}/kill \ " # uclibc does not have NSS EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname " @@ -126,6 +143,9 @@ do_install() { # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable touch ${D}${sysconfdir}/machine-id + + install -d ${D}${sysconfdir}/udev/rules.d/ + install -d ${D}${sysconfdir}/tmpfiles.d install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/ install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ @@ -160,7 +180,9 @@ do_install() { sed -i -e 's/ remote-fs.target$//' ${D}${systemd_unitdir}/system/systemd-journal-flush.service # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it # for existence else it fails - ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)} + if [ -s ${D}${libdir}/tmpfiles.d/systemd.conf ]; then + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${libdir}/tmpfiles.d/systemd.conf', d)} + fi } do_install_ptest () { @@ -248,6 +270,7 @@ FILES_${PN} = " ${base_bindir}/* \ ${sysconfdir}/dbus-1/ \ ${sysconfdir}/machine-id \ ${sysconfdir}/modules-load.d/ \ + ${sysconfdir}/pam.d/ \ ${sysconfdir}/sysctl.d/ \ ${sysconfdir}/systemd/ \ ${sysconfdir}/tmpfiles.d/ \ @@ -275,7 +298,6 @@ FILES_${PN} = " ${base_bindir}/* \ /lib/udev/rules.d/71-seat.rules \ /lib/udev/rules.d/73-seat-late.rules \ /lib/udev/rules.d/99-systemd.rules \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d', '', d)} \ " FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" @@ -311,14 +333,7 @@ FILES_udev += "${base_sbindir}/udevd \ ${rootlibexecdir}/udev/scsi_id \ ${rootlibexecdir}/udev/v4l_id \ ${rootlibexecdir}/udev/keymaps \ - ${rootlibexecdir}/udev/rules.d/4*.rules \ - ${rootlibexecdir}/udev/rules.d/5*.rules \ - ${rootlibexecdir}/udev/rules.d/6*.rules \ - ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \ - ${rootlibexecdir}/udev/rules.d/75*.rules \ - ${rootlibexecdir}/udev/rules.d/78*.rules \ - ${rootlibexecdir}/udev/rules.d/8*.rules \ - ${rootlibexecdir}/udev/rules.d/95*.rules \ + ${rootlibexecdir}/udev/rules.d/*.rules \ ${sysconfdir}/udev \ ${sysconfdir}/init.d/systemd-udevd \ ${systemd_unitdir}/system/*udev* \ diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb index 657ef02204..e087f0ff86 100644 --- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb +++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb @@ -6,7 +6,7 @@ PR = "r10" SRC_URI = "file://inittab" -S = "${WORKDIR}/sysvinit-${PV}" +S = "${WORKDIR}" INHIBIT_DEFAULT_DEPS = "1" @@ -41,7 +41,7 @@ EOF for n in ${SYSVINIT_ENABLED_GETTYS} do - echo "$n:2345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab + echo "$n:12345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab done echo "" >> ${D}${sysconfdir}/inittab fi diff --git a/meta/recipes-core/uclibc/uclibc-git.inc b/meta/recipes-core/uclibc/uclibc-git.inc index a2b2353c5a..8308e603cc 100644 --- a/meta/recipes-core/uclibc/uclibc-git.inc +++ b/meta/recipes-core/uclibc/uclibc-git.inc @@ -15,7 +15,7 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master \ file://argp-headers.patch \ file://remove_attribute_optimize_Os.patch \ file://compile-arm-fork-with-O2.patch \ - file://orign_path.patch \ + file://0001-ldso-limited-support-for-ORIGIN-in-rpath.patch \ file://0001-atexit_old-Do-not-add-it-to-shared-libc.patch \ file://0001-nptl-arm-Move-aeabi_read_tp-to-uclibc_nonshared.a.patch \ file://0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch \ diff --git a/meta/recipes-core/uclibc/uclibc-git/orign_path.patch b/meta/recipes-core/uclibc/uclibc-git/0001-ldso-limited-support-for-ORIGIN-in-rpath.patch index 81bb8f8459..7479ec35e1 100644 --- a/meta/recipes-core/uclibc/uclibc-git/orign_path.patch +++ b/meta/recipes-core/uclibc/uclibc-git/0001-ldso-limited-support-for-ORIGIN-in-rpath.patch @@ -1,13 +1,56 @@ -Patch is backported from +From 32eaf738faafad2b16e1f3f5beb91736b3c27a3b Mon Sep 17 00:00:00 2001 +From: Junling Zheng <zhengjunling@huawei.com> +Date: Fri, 3 Apr 2015 05:02:27 +0000 +Subject: [PATCH] ldso: limited support for $ORIGIN in rpath +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Derived from: http://lists.busybox.net/pipermail/uclibc/2011-March/045003.html -Upstream-Status: Pending +However, the above patch introduced '_dl_strchr' in ldso/ldso/dl-elf.c, +and caused the following undefined referencing compiling error: + + | .../libdl.a(libdl.os): In function `search_for_named_library': + | .../dl-elf.c:156: undefined reference to `_dl_strchr' + | collect2: error: ld returned 1 exit status + +This problem would be reproduced through compiling gdb in static mode +using uclibc. + +So, add the definition of '_dl_strchr' to fix it. The '_dl_strstr' is +added as well. -Index: git/ldso/ldso/dl-elf.c -=================================================================== ---- git.orig/ldso/ldso/dl-elf.c 2012-06-19 18:29:08.629931662 -0700 -+++ git/ldso/ldso/dl-elf.c 2012-06-19 21:21:14.798431393 -0700 -@@ -133,56 +133,60 @@ +Upstream-Status: Submitted + +Signed-off-by: Timo Teräs <timo.teras at iki.fi> +Signed-off-by: Junling Zheng <zhengjunling@huawei.com> +--- + ldso/include/dl-string.h | 2 ++ + ldso/ldso/dl-elf.c | 79 +++++++++++++++++++++++++----------------------- + ldso/ldso/ldso.c | 18 +++++++++-- + 3 files changed, 59 insertions(+), 40 deletions(-) + +diff --git a/ldso/include/dl-string.h b/ldso/include/dl-string.h +index aacad10..14ae617 100644 +--- a/ldso/include/dl-string.h ++++ b/ldso/include/dl-string.h +@@ -204,7 +204,9 @@ static __always_inline char * _dl_get_last_path_component(char *path) + # define _dl_strcat strcat + # define _dl_strcpy strcpy + # define _dl_strcmp strcmp ++# define _dl_strchr strchr + # define _dl_strrchr strrchr ++# define _dl_strstr strstr + # define _dl_memcpy memcpy + # define _dl_memcmp memcmp + # define _dl_memset memset +diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c +index 1b06bc1..b323c90 100644 +--- a/ldso/ldso/dl-elf.c ++++ b/ldso/ldso/dl-elf.c +@@ -133,56 +133,60 @@ _dl_protect_relro (struct elf_resolve *l) * in uClibc/ldso/util/ldd.c */ static struct elf_resolve * search_for_named_library(const char *name, unsigned rflags, const char *path_list, @@ -16,9 +59,9 @@ Index: git/ldso/ldso/dl-elf.c { - char *path, *path_n, *mylibname; + char *mylibname; ++ const char *p, *pn; struct elf_resolve *tpnt; - int done; -+ const char *p, *pn; + int plen; if (path_list==NULL) @@ -100,7 +143,7 @@ Index: git/ldso/ldso/dl-elf.c return NULL; } -@@ -234,8 +238,10 @@ +@@ -234,7 +238,8 @@ struct elf_resolve *_dl_load_shared_library(unsigned rflags, struct dyn_elf **rp if (pnt) { pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB]; _dl_if_debug_dprint("\tsearching RPATH='%s'\n", pnt); @@ -108,11 +151,9 @@ Index: git/ldso/ldso/dl-elf.c + if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt, + tpnt->libname)) != NULL) return tpnt1; -+ } #endif - -@@ -243,7 +249,7 @@ +@@ -243,7 +248,7 @@ struct elf_resolve *_dl_load_shared_library(unsigned rflags, struct dyn_elf **rp /* Check in LD_{ELF_}LIBRARY_PATH, if specified and allowed */ if (_dl_library_path) { _dl_if_debug_dprint("\tsearching LD_LIBRARY_PATH='%s'\n", _dl_library_path); @@ -121,7 +162,7 @@ Index: git/ldso/ldso/dl-elf.c { return tpnt1; } -@@ -257,7 +263,7 @@ +@@ -257,7 +262,7 @@ struct elf_resolve *_dl_load_shared_library(unsigned rflags, struct dyn_elf **rp if (pnt) { pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB]; _dl_if_debug_dprint("\tsearching RUNPATH='%s'\n", pnt); @@ -130,7 +171,7 @@ Index: git/ldso/ldso/dl-elf.c return tpnt1; } #endif -@@ -291,7 +297,7 @@ +@@ -291,7 +296,7 @@ struct elf_resolve *_dl_load_shared_library(unsigned rflags, struct dyn_elf **rp /* Look for libraries wherever the shared library loader * was installed */ _dl_if_debug_dprint("\tsearching ldso dir='%s'\n", _dl_ldsopath); @@ -139,7 +180,7 @@ Index: git/ldso/ldso/dl-elf.c if (tpnt1 != NULL) return tpnt1; #endif -@@ -304,7 +310,7 @@ +@@ -304,7 +309,7 @@ struct elf_resolve *_dl_load_shared_library(unsigned rflags, struct dyn_elf **rp #ifndef __LDSO_CACHE_SUPPORT__ ":" UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib" #endif @@ -148,14 +189,15 @@ Index: git/ldso/ldso/dl-elf.c if (tpnt1 != NULL) return tpnt1; -Index: git/ldso/ldso/ldso.c -=================================================================== ---- git.orig/ldso/ldso/ldso.c 2012-06-19 18:29:08.633931663 -0700 -+++ git/ldso/ldso/ldso.c 2012-06-19 18:29:10.197931738 -0700 -@@ -403,6 +403,20 @@ +diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c +index 5619629..73bcc41 100644 +--- a/ldso/ldso/ldso.c ++++ b/ldso/ldso/ldso.c +@@ -402,6 +402,20 @@ static ptrdiff_t _dl_build_local_scope (struct elf_resolve **list, + p += _dl_build_local_scope (p, q->tpnt); return p - list; } - ++ +static void _dl_setup_progname(const char *argv0) +{ + char image[PATH_MAX]; @@ -169,11 +211,10 @@ Index: git/ldso/ldso/ldso.c + _dl_progname = argv0; + } +} -+ + void *_dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr, ElfW(auxv_t) auxvt[AT_EGID + 1], char **envp, char **argv - DL_GET_READY_TO_RUN_EXTRA_PARMS) -@@ -454,9 +468,7 @@ +@@ -454,9 +468,7 @@ void *_dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr, * been fixed up by now. Still no function calls outside of this * library, since the dynamic resolver is not yet ready. */ @@ -184,3 +225,6 @@ Index: git/ldso/ldso/ldso.c #ifdef __DSBT__ _dl_ldso_dsbt = (void *)tpnt->dynamic_info[DT_DSBT_BASE_IDX]; +-- +1.8.3.4 + diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index d69056dd76..6fbd92548a 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb @@ -13,6 +13,8 @@ SRC_URI = " \ file://localextra.rules \ " +S = "${WORKDIR}" + do_install() { install -d ${D}${sysconfdir}/udev/rules.d diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc index 24463b1d71..19e0e86506 100644 --- a/meta/recipes-core/udev/udev.inc +++ b/meta/recipes-core/udev/udev.inc @@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ LDFLAGS += "-lrt" -DEPENDS = "acl glib-2.0 libusb usbutils pciutils gperf-native libxslt-native util-linux" +DEPENDS = "glib-2.0 libusb usbutils pciutils glib-2.0-native gperf-native libxslt-native util-linux" RPROVIDES_${PN} = "hotplug" SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init index d26cbfca96..0ab028b391 100644 --- a/meta/recipes-core/udev/udev/init +++ b/meta/recipes-core/udev/udev/init @@ -16,21 +16,26 @@ export TZ=/etc/localtime [ -x @UDEVD@ ] || exit 1 SYSCONF_CACHED="/etc/udev/cache.data" SYSCONF_TMP="/dev/shm/udev.cache" +DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen + +# A list of files which are used as a criteria to judge whether the udev cache could be reused. +CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" +[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" + +# List of files whose metadata (size/mtime/name) will be included in cached +# system state. +META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*" + +# Command to compute system configuration. +sysconf_cmd () { + cat -- $CMP_FILE_LIST + stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}' +} + [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf [ -f /etc/default/rcS ] && . /etc/default/rcS -readfiles () { - READDATA="" - for filename in $@; do - if [ -r $filename ]; then - while read line; do - READDATA="$READDATA$line" - done < $filename - fi - done -} - kill_udevd () { pid=`pidof -x udevd` [ -n "$pid" ] && kill $pid @@ -62,35 +67,32 @@ case "$1" in mkdir -m 1777 -p /var/volatile/tmp # Cache handling. - # A list of files which are used as a criteria to judge whether the udev cache could be reused. - CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices /proc/atags" if [ "$DEVCACHE" != "" ]; then if [ -e $DEVCACHE ]; then - readfiles $CMP_FILE_LIST - NEWDATA="$READDATA" - readfiles "$SYSCONF_CACHED" - OLDDATA="$READDATA" - if [ "$OLDDATA" = "$NEWDATA" ]; then + sysconf_cmd > "$SYSCONF_TMP" + if cmp $SYSCONF_CACHED $SYSCONF_TMP >/dev/null; then tar xmf $DEVCACHE -C / -m not_first_boot=1 [ "$VERBOSE" != "no" ] && echo "udev: using cache file $DEVCACHE" [ -e $SYSCONF_TMP ] && rm -f "$SYSCONF_TMP" + [ -e "$DEVCACHE_REGEN" ] && rm -f "$DEVCACHE_REGEN" else # Output detailed reason why the cached /dev is not used - if [ "$VERBOSE" != "no" ]; then - echo "udev: udev cache not used" - echo "udev: we use $CMP_FILE_LIST as criteria to judge whether the cache /dev could be resued" - echo "udev: olddata: $OLDDATA" - echo "udev: newdata: $NEWDATA" - fi - echo "$NEWDATA" > "$SYSCONF_TMP" + cat <<EOF +udev: Not using udev cache because of changes detected in the following files: +udev: $CMP_FILE_LIST +udev: $META_FILE_LIST +udev: The udev cache will be regenerated. To identify the detected changes, +udev: compare the cached sysconf at $SYSCONF_CACHED +udev: against the current sysconf at $SYSCONF_TMP +EOF + touch "$DEVCACHE_REGEN" fi else if [ "$ROOTFS_READ_ONLY" != "yes" ]; then # If rootfs is not read-only, it's possible that a new udev cache would be generated; # otherwise, we do not bother to read files. - readfiles $CMP_FILE_LIST - echo "$READDATA" > "$SYSCONF_TMP" + touch "$DEVCACHE_REGEN" fi fi fi diff --git a/meta/recipes-core/udev/udev/local.rules b/meta/recipes-core/udev/udev/local.rules index 9d4da493f7..d502cdd6ba 100644 --- a/meta/recipes-core/udev/udev/local.rules +++ b/meta/recipes-core/udev/udev/local.rules @@ -13,9 +13,6 @@ # %% the '%' char itself # -# Try and modprobe for drivers for new hardware -ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" - # Create a symlink to any touchscreen input device # Trigger based on input type, that the evbit (-e) has EV_SYN and EV_ABS, # has an EV_ABS value (-a) which is used for touchscreen type devices. diff --git a/meta/recipes-core/udev/udev/udev-cache b/meta/recipes-core/udev/udev/udev-cache index 497d257397..dcfff1cb45 100644 --- a/meta/recipes-core/udev/udev/udev-cache +++ b/meta/recipes-core/udev/udev/udev-cache @@ -19,6 +19,22 @@ export TZ=/etc/localtime DEVCACHE_TMP="/dev/shm/udev-cache-tmp.tar" SYSCONF_CACHED="/etc/udev/cache.data" SYSCONF_TMP="/dev/shm/udev.cache" +DEVCACHE_REGEN="/dev/shm/udev-regen" # create to request cache regen + +# A list of files which are used as a criteria to judge whether the udev cache could be reused. +CMP_FILE_LIST="/proc/version /proc/cmdline /proc/devices" +[ -f /proc/atags ] && CMP_FILE_LIST="$CMP_FILE_LIST /proc/atags" + +# List of files whose metadata (size/mtime/name) will be included in cached +# system state. +META_FILE_LIST="lib/udev/rules.d/* etc/udev/rules.d/*" + +# Command to compute system configuration. +sysconf_cmd () { + cat -- $CMP_FILE_LIST + stat -c '%s %Y %n' -- $META_FILE_LIST | awk -F/ '{print $1 " " $NF;}' +} + [ -f /etc/default/udev-cache ] && . /etc/default/udev-cache if [ "$ROOTFS_READ_ONLY" = "yes" ]; then @@ -26,13 +42,34 @@ if [ "$ROOTFS_READ_ONLY" = "yes" ]; then exit 0 fi -if [ "$DEVCACHE" != "" -a -e "$SYSCONF_TMP" ]; then - echo "Populating dev cache" +[ "$DEVCACHE" != "" ] || exit 0 +[ "${VERBOSE}" == "no" ] || echo -n "udev-cache: checking for ${DEVCACHE_REGEN}... " +if ! [ -e "$DEVCACHE_REGEN" ]; then + [ "${VERBOSE}" == "no" ] || echo "not found." + exit 0 +fi +[ "${VERBOSE}" == "no" ] || echo "found." +echo "Populating dev cache" + +err_cleanup () { + echo "udev-cache: update failed!" + udevadm control --start-exec-queue + rm -f -- "$SYSCONF_TMP" "$DEVCACHE_TMP" "$DEVCACHE" "$SYSCONF_CACHED" +} + +( + set -e + trap 'err_cleanup' EXIT + udevadm control --stop-exec-queue + sysconf_cmd > "$SYSCONF_TMP" find /dev -xdev \( -type b -o -type c -o -type l \) | cut -c 2- \ - | xargs tar cf "${DEVCACHE_TMP}" -T- + | xargs tar cf "${DEVCACHE_TMP}" gzip < "${DEVCACHE_TMP}" > "$DEVCACHE" rm -f "${DEVCACHE_TMP}" mv "$SYSCONF_TMP" "$SYSCONF_CACHED" -fi + udevadm control --start-exec-queue + rm -f "$DEVCACHE_REGEN" + trap - EXIT +) & exit 0 diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 2c299e8588..60309a51c9 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc @@ -17,27 +17,25 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \ file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16" -inherit autotools gettext pkgconfig systemd +inherit autotools gettext pkgconfig systemd update-alternatives python-dir DEPENDS = "zlib ncurses" DEPENDS_append_class-native = " lzo-native" DEPENDS_append_class-nativesdk = " lzo-native" SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \ - file://MCONFIG \ - file://defines.h \ - file://make_include \ - file://swapargs.h \ " PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfdisk \ util-linux-swaponoff util-linux-losetup util-linux-umount \ - util-linux-mount util-linux-readprofile util-linux-libblkid \ - util-linux-libmount util-linux-libuuid util-linux-uuidd \ + util-linux-mount util-linux-readprofile util-linux-uuidd \ util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \ util-linux-mkfs util-linux-mcookie util-linux-reset \ util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \ util-linux-partx ${PN}-bash-completion util-linux-hwclock \ - util-linux-findfs" + util-linux-findfs util-linux-getopt util-linux-sulogin" +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}" + +PACKAGES_DYNAMIC = "^util-linux-lib.*" SHARED_EXTRA_OECONF = "--disable-use-tty-group \ --disable-makeinstall-chown \ @@ -51,19 +49,24 @@ SHARED_EXTRA_OECONF = "--disable-use-tty-group \ EXTRA_OECONF = "${SHARED_EXTRA_OECONF} --libdir=${base_libdir}" -PACKAGECONFIG_class-target ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} " +PACKAGECONFIG_class-target ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam," # Respect the systemd feature for uuidd -PACKAGECONFIG[systemd] = "--enable-socket-activation --with-systemdsystemunitdir=${systemd_unitdir}/system/, --disable-socket-activation --without-systemdsystemunitdir" +PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/, --without-systemd --without-systemdsystemunitdir,systemd" # Build setpriv requires libcap-ng PACKAGECONFIG[libcap-ng] = "--enable-setpriv,--disable-setpriv,libcap-ng," +# Build python bindings for libmount +PACKAGECONFIG[pylibmount] = "--with-python --enable-pylibmount,--without-python --disable-pylibmount,python" + FILES_${PN}-bash-completion += "${datadir}/bash-completion" FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*" +FILES_${PN}-dev += "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.la" +FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/libmount/.debug/" + FILES_util-linux-agetty = "${base_sbindir}/agetty" FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${BPN}" FILES_util-linux-fstrim = "${base_sbindir}/fstrim" @@ -74,17 +77,17 @@ FILES_util-linux-losetup = "${base_sbindir}/losetup.${BPN}" FILES_util-linux-mount = "${base_bindir}/mount.${BPN}" FILES_util-linux-mcookie = "${bindir}/mcookie" FILES_util-linux-umount = "${base_bindir}/umount.${BPN}" -FILES_util-linux-readprofile = "${base_sbindir}/readprofile.${BPN}" +FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}" FILES_util-linux-uuidgen = "${bindir}/uuidgen" FILES_util-linux-uuidd = "${sbindir}/uuidd" FILES_util-linux-reset = "${base_bindir}/reset" FILES_util-linux-partx = "${sbindir}/partx" FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}" FILES_util-linux-findfs = "${sbindir}/findfs" +FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}" -FILES_util-linux-libblkid = "${base_libdir}/libblkid.so.*" -FILES_util-linux-libmount = "${base_libdir}/libmount.so.*" -FILES_util-linux-libuuid = "${base_libdir}/libuuid.so.*" +FILES_util-linux-pylibmount = "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.so \ + ${libdir}/${PYTHON_DIR}/dist-packages/libmount/__init__.*" FILES_util-linux-lscpu = "${bindir}/lscpu" FILES_util-linux-fsck = "${base_sbindir}/fsck*" @@ -93,6 +96,7 @@ FILES_util-linux-mkfs = "${sbindir}/mkfs" FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs" FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs" +FILES_util-linux-sulogin = "${base_sbindir}/sulogin*" # Util-linux' blkid replaces the e2fsprogs one FILES_util-linux-blkid = "${base_sbindir}/blkid*" @@ -102,7 +106,7 @@ RREPLACES_util-linux-blkid = "e2fsprogs-blkid" # reset calls 'tput' RDEPENDS_util-linux-reset += "ncurses" -RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup" +RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin" RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs " RRECOMMENDS_${PN}_class-native = "" @@ -112,15 +116,14 @@ RDEPENDS_${PN}_class-nativesdk = "" RPROVIDES_${PN}-dev = "util-linux-libblkid-dev util-linux-libmount-dev util-linux-libuuid-dev" -SYSTEMD_PACKAGES = "${PN}-uuidd" -SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.service" +#SYSTEMD_PACKAGES = "${PN}-uuidd ${PN}-fstrim" +SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.socket uuidd.service" +SYSTEMD_AUTO_ENABLE_${PN}-uuidd = "disable" +SYSTEMD_SERVICE_${PN}-fstrim = "fstrim.timer fstrim.service" +SYSTEMD_AUTO_ENABLE_${PN}-fstrim = "disable" do_compile () { set -e - install ${WORKDIR}/MCONFIG ${S}/MCONFIG - install ${WORKDIR}/make_include ${S}/make_include - install ${WORKDIR}/swapargs.h ${S}/mount-deprecated/swapargs.h - install ${WORKDIR}/defines.h ${S}/defines.h oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}' } @@ -135,9 +138,8 @@ do_install () { mkdir -p ${D}${base_bindir} sbinprogs="agetty ctrlaltdel cfdisk vipw vigr" - sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk readprofile fsck blkid blockdev fstrim sulogin switch_root" - usrbinprogs_a="chfn chsh hexdump last logger mesg newgrp renice utmpdump wall setsid chrt flock getopt" - binprogs_a="dmesg kill more umount mount login reset su" + sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root" + binprogs_a="dmesg getopt kill more umount mount login reset su" if [ "${base_sbindir}" != "${sbindir}" ]; then mkdir -p ${D}${base_sbindir} @@ -163,13 +165,17 @@ do_install () { rm -f ${D}${bindir}/chkdupexe } -inherit update-alternatives +# reset and nologin causes a conflict with ncurses-native and shadow-native +do_install_append_class-native () { + rm -f ${D}${base_bindir}/reset + rm -f ${D}${base_sbindir}/nologin +} ALTERNATIVE_PRIORITY = "100" ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root switch_root" -ALTERNATIVE_${PN} += "mkfs.minix hexdump last logger mesg renice wall" -ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject getopt sulogin" +ALTERNATIVE_${PN} += "mkfs.minix hexdump last lastb logger mesg renice wall" +ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject" ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg" ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill" @@ -180,15 +186,14 @@ ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root" ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root" ALTERNATIVE_LINK_NAME[mkfs.minix] = "${base_sbindir}/mkfs.minix" ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject" -ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" -ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" -ALTERNATIVE_TARGET[getopt] = "${bindir}/getopt" -ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1 reset.1" +ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 reset.1" ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" +ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" +ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8" ALTERNATIVE_LINK_NAME[reset.1] = "${mandir}/man1/reset.1" ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" @@ -214,7 +219,7 @@ ALTERNATIVE_util-linux-umount = "umount" ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" ALTERNATIVE_util-linux-readprofile = "readprofile" -ALTERNATIVE_LINK_NAME[readprofile] = "${base_sbindir}/readprofile" +ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile" ALTERNATIVE_util-linux-losetup = "losetup" ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup" @@ -234,6 +239,12 @@ ALTERNATIVE_util-linux-reset = "reset" ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset" ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset" +ALTERNATIVE_util-linux-getopt = "getopt" +ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" + +ALTERNATIVE_util-linux-sulogin = "sulogin" +ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" + BBCLASSEXTEND = "native nativesdk" python do_package_prepend () { @@ -242,3 +253,10 @@ python do_package_prepend () { d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('base_bindir', True), alt_name)) d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name) } + +python populate_packages_prepend() { + do_split_packages(d, '${base_libdir}', '^lib(.*)\.so\..*$', + output_pattern='util-linux-lib%s', + description='util-linux lib%s', + extra_depends='', prepend=True, allow_links=True) +} 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..5eaa08df63 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/CVE-2014-9114.patch @@ -0,0 +1,174 @@ +Upstream-Status: Backport + +This patch is for CVE-2014-9114. +This patch should be removed once util-linux is upgraded to 2.26. + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> + +From 89e90ae7b2826110ea28c1c0eb8e7c56c3907bdc Mon Sep 17 00:00:00 2001 +From: Karel Zak <kzak@redhat.com> +Date: Thu, 27 Nov 2014 13:39:35 +0100 +Subject: [PATCH] libblkid: care about unsafe chars in cache + +The high-level libblkid API uses /run/blkid/blkid.tab cache to +store probing results. The cache format is + + <device NAME="value" ...>devname</device> + +and unfortunately the cache code does not escape quotation marks: + + # mkfs.ext4 -L 'AAA"BBB' + + # cat /run/blkid/blkid.tab + ... + <device ... LABEL="AAA"BBB" ...>/dev/sdb1</device> + +such string is later incorrectly parsed and blkid(8) returns +nonsenses. And for use-cases like + + # eval $(blkid -o export /dev/sdb1) + +it's also insecure. + +Note that mount, udevd and blkid -p are based on low-level libblkid +API, it bypass the cache and directly read data from the devices. + +The current udevd upstream does not depend on blkid(8) output at all, +it's directly linked with the library and all unsafe chars are encoded by +\x<hex> notation. + + # mkfs.ext4 -L 'X"`/tmp/foo` "' /dev/sdb1 + # udevadm info --export-db | grep LABEL + ... + E: ID_FS_LABEL=X__/tmp/foo___ + E: ID_FS_LABEL_ENC=X\x22\x60\x2ftmp\x2ffoo\x60\x20\x22 + +Signed-off-by: Karel Zak <kzak@redhat.com> +--- + libblkid/src/read.c | 21 ++++++++++++++++++--- + libblkid/src/save.c | 22 +++++++++++++++++++++- + misc-utils/blkid.8 | 5 ++++- + misc-utils/blkid.c | 4 ++-- + 4 files changed, 45 insertions(+), 7 deletions(-) + +diff --git a/libblkid/src/read.c b/libblkid/src/read.c +index 0e91c9c..81ab0df 100644 +--- a/libblkid/src/read.c ++++ b/libblkid/src/read.c +@@ -252,15 +252,30 @@ static int parse_token(char **name, char **value, char **cp) + *value = skip_over_blank(*value + 1); + + if (**value == '"') { +- end = strchr(*value + 1, '"'); +- if (!end) { ++ char *p = end = *value + 1; ++ ++ /* convert 'foo\"bar' to 'foo"bar' */ ++ while (*p) { ++ if (*p == '\\') { ++ p++; ++ *end = *p; ++ } else { ++ *end = *p; ++ if (*p == '"') ++ break; ++ } ++ p++; ++ end++; ++ } ++ ++ if (*end != '"') { + DBG(READ, ul_debug("unbalanced quotes at: %s", *value)); + *cp = *value; + return -BLKID_ERR_CACHE; + } + (*value)++; + *end = '\0'; +- end++; ++ end = ++p; + } else { + end = skip_over_word(*value); + if (*end) { +diff --git a/libblkid/src/save.c b/libblkid/src/save.c +index 8216f09..5e8bbee 100644 +--- a/libblkid/src/save.c ++++ b/libblkid/src/save.c +@@ -26,6 +26,21 @@ + + #include "blkidP.h" + ++ ++static void save_quoted(const char *data, FILE *file) ++{ ++ const char *p; ++ ++ fputc('"', file); ++ for (p = data; p && *p; p++) { ++ if ((unsigned char) *p == 0x22 || /* " */ ++ (unsigned char) *p == 0x5c) /* \ */ ++ fputc('\\', file); ++ ++ fputc(*p, file); ++ } ++ fputc('"', file); ++} + static int save_dev(blkid_dev dev, FILE *file) + { + struct list_head *p; +@@ -43,9 +58,14 @@ static int save_dev(blkid_dev dev, FILE *file) + + if (dev->bid_pri) + fprintf(file, " PRI=\"%d\"", dev->bid_pri); ++ + list_for_each(p, &dev->bid_tags) { + blkid_tag tag = list_entry(p, struct blkid_struct_tag, bit_tags); +- fprintf(file, " %s=\"%s\"", tag->bit_name,tag->bit_val); ++ ++ fputc(' ', file); /* space between tags */ ++ fputs(tag->bit_name, file); /* tag NAME */ ++ fputc('=', file); /* separator between NAME and VALUE */ ++ save_quoted(tag->bit_val, file); /* tag "VALUE" */ + } + fprintf(file, ">%s</device>\n", dev->bid_name); + +diff --git a/misc-utils/blkid.8 b/misc-utils/blkid.8 +index 156a14b..c95b833 100644 +--- a/misc-utils/blkid.8 ++++ b/misc-utils/blkid.8 +@@ -200,7 +200,10 @@ partitions. This output format is \fBDEPRECATED\fR. + .TP + .B export + print key=value pairs for easy import into the environment; this output format +-is automatically enabled when I/O Limits (\fB-i\fR option) are requested ++is automatically enabled when I/O Limits (\fB-i\fR option) are requested. ++ ++The non-printing characters are encoded by ^ and M- notation and all ++potentially unsafe characters are escaped. + .RE + .TP + .BI \-O " offset" +diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c +index a6ca660..1bd8646 100644 +--- a/misc-utils/blkid.c ++++ b/misc-utils/blkid.c +@@ -306,7 +306,7 @@ static void print_value(int output, int num, const char *devname, + printf("DEVNAME=%s\n", devname); + fputs(name, stdout); + fputs("=", stdout); +- safe_print(value, valsz, NULL); ++ safe_print(value, valsz, " \\\"'$`<>"); + fputs("\n", stdout); + + } else { +@@ -315,7 +315,7 @@ static void print_value(int output, int num, const char *devname, + fputs(" ", stdout); + fputs(name, stdout); + fputs("=\"", stdout); +- safe_print(value, valsz, "\""); ++ safe_print(value, valsz, "\"\\"); + fputs("\"", stdout); + } + } +-- +1.9.1 + diff --git a/meta/recipes-core/util-linux/util-linux/MCONFIG b/meta/recipes-core/util-linux/util-linux/MCONFIG deleted file mode 100644 index 3fea2c02d7..0000000000 --- a/meta/recipes-core/util-linux/util-linux/MCONFIG +++ /dev/null @@ -1,223 +0,0 @@ -# MCONFIG -- Configuration stuff for util-linux -# Created: Sat Feb 4 15:50:30 1995 -# Copyright 1995 Rickard E. Faith (faith@cs.unc.edu) - -# For a user-mode install, make (at least) three changes: -# - remove the `-o root' part in INSTALLSUID -# - set USE_TTY_GROUP=no -# - define DESTDIR - -# Select for ARCH one of intel, alpha, sparc, arm, m68k, mips -# Select for CPU i386 if the binaries must be able to run on an intel 386 -# (by default i486 code is generated, see below) -CPU=$(shell uname -m) -ARCH=$(shell echo $(CPU) | sed 's/i.86/intel/;s/arm.*/arm/') - -# If HAVE_PAM is set to "yes", then login, chfn, chsh, and newgrp -# will use PAM for authentication. Additionally, passwd will not be -# installed as it is not PAM aware. -HAVE_PAM=no - -# If HAVE_SHADOW is set to "yes", then login, chfn, chsh, newgrp, passwd, -# and vipw will not be built or installed from the login-utils -# subdirectory. -HAVE_SHADOW=yes - -# If HAVE_PASSWD is set to "yes", then passwd will not be built or -# installed from the login-utils subdirectory (but login, chfn, chsh, -# newgrp, and vipw *will* be installed). -HAVE_PASSWD=no - -# If you use chfn and chsh from this package, REQUIRE_PASSWORD will require -# non-root users to enter the account password before updating /etc/passwd. -REQUIRE_PASSWORD=yes -#REQUIRE_PASSWORD=no - -# If you use chsh from this package, ONLY_LISTED_SHELLS will require that -# the selected shell be listed in /etc/shells -- otherwise only a warning is -# printed. This prevents someone from setting their shell to /bin/false. -ONLY_LISTED_SHELLS=yes -#ONLY_LISTED_SHELLS=no - - -# If HAVE_SYSVINIT is set to "yes", then simpleinit and shutdown will not -# be built or installed from the login-utils subdirectory. (The shutdown -# and halt that come with the SysVinit package should be used with the init -# found in that package.) -HAVE_SYSVINIT=no - -# If HAVE_SYSVINIT_UTILS is set to "yes", then last, mesg, and wall will -# not be built or installed from the login-utils subdirectory. (The -# shutdown and init from the SysVinit package do not depend on the last, -# mesg, and wall from that package.) -HAVE_SYSVINIT_UTILS=no - -# If HAVE_WRITE is set to "yes", then write will not be built or -# installed from the misc-utils subdirectory. -# (There is a network aware write in netwrite from NetKit 0.16 or later.) -HAVE_WRITE=no - -# If HAVE_GETTY is set to "yes", then agetty will not be built or -# installed from the login-utils subdirectory. Note that agetty can -# co-exist with other gettys, so this option should never be used. -HAVE_GETTY=no - -# If USE_TTY_GROUP is set to "yes", then wall and write will be installed -# setgid to the "tty" group, and mesg will only set the group write bit. -# Note that this is only useful if login/xterm/etc. change the group of the -# user's tty to "tty" [The login in util-linux does this correctly, and -# xterm will do it correctly if X is compiled with USE_TTY_GROUP set -# properly.] -USE_TTY_GROUP=no - -# If HAVE_KILL is set to "yes", then kill will not be built or -# installed from the misc-utils subdirectory. -# (There is also a kill in the procps package.) -HAVE_KILL=no - -# If ALLOW_VCS_USE is set to "yes", then login will chown /dev/vcsN -# to the current user, allowing her to make a screendump and do other -# nifty things on the console, but also allowing him to keep an open -# file descriptor after logging out to trick the next user. -ALLOW_VCS_USE=yes - -# If HAVE_RESET is set to "yes", then reset won't be installed. The version -# of reset that comes with the ncurses package is less aggressive. -HAVE_RESET=yes - -# If HAVE_SLN is set to "yes", then sln won't be installed -# (but the man page sln.8 will be installed anyway). -# sln also comes with libc and glibc. -HAVE_SLN=no - -# If HAVE_FDUTILS is set to "yes", then setfdprm won't be installed. -HAVE_FDUTILS=no - -# If SILENT_PG is set to "yes", then pg will not ring the bell -# when an invalid key is pressed -SILENT_PG=no - -# If configure decides that Native Language Support (NLS) is available, -# it sets MAY_ENABLE_NLS in defines.h. If you don't want NLS, set -# DISABLE_NLS to "yes". -DISABLE_NLS=no - -# Different optimizations for different cpus. -# gcc 3.0 likes options -mcpu=i486 instead of -m486 -ifeq "$(ARCH)" "intel" - ifeq "$(HAVE_OLD_GCC)" "yes" - CPUHEAD=-m - else - CPUHEAD=-mcpu=i - endif - ifeq "$(CPU)" "i386" - CPUTAIL=386 - else - CPUTAIL=486 - endif - CPUOPT= $(CPUHEAD)$(CPUTAIL) - OPT= -pipe -O2 $(CPUOPT) -fomit-frame-pointer -else - ifeq "$(ARCH)" "arm" - OPT= -pipe -O2 -fsigned-char -fomit-frame-pointer - else - OPT= -O2 -fomit-frame-pointer - endif -endif - -WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes - -LIB=../lib - -ERR_O=$(LIB)/err.o - -# Set HAVE_SLANG to yes if you have slang (and prefer to use that for cfdisk) -# (If neither HAVE_NCURSES nor HAVE_SLANG is defined, cfdisk is not made.) -# HAVE_SLANG=yes -# There is a subdirectory /usr/include/slang containing slcurses.h -# SLANGFLAGS=-I/usr/include/slang -# No such subdirectory - slcurses.h lives in /usr/include -# (no extra definition required). -LIBSLANG=-lslang - -# -# Paths used for compilation (not all are actually used, see CFLAGS below) -# -DEV_DIR= /dev -ETC_DIR= /etc -SBIN_DIR= /sbin -USRSBIN_DIR= /usr/sbin -USRLIB_DIR= /usr/lib -USRBIN_DIR= /usr/bin -USRGAMES_DIR= /usr/games -USRSHAREMISC_DIR=/usr/share/misc -LOCALE_DIR= /usr/share/locale -BIN_DIR= /bin -VAR_PATH= /var -LOG_DIR= /var/log -MAN_DIR= /usr/share/man -INFO_DIR= /usr/share/info - -# -# Paths used for install -# -DEVDIR= $(DESTDIR)$(DEV_DIR) -ETCDIR= $(DESTDIR)$(ETC_DIR) -SBINDIR= $(DESTDIR)$(SBIN_DIR) -USRSBINDIR= $(DESTDIR)$(USRSBIN_DIR) -USRLIBDIR= $(DESTDIR)$(USRLIB_DIR) -USRBINDIR= $(DESTDIR)$(USRBIN_DIR) -USRGAMESDIR= $(DESTDIR)$(USRGAMES_DIR) -USRSHAREMISCDIR=$(DESTDIR)$(USRSHAREMISC_DIR) -LOCALEDIR= $(DESTDIR)$(LOCALE_DIR) -BINDIR= $(DESTDIR)$(BIN_DIR) -VARPATH= $(DESTDIR)$(VAR_PATH) -LOGDIR= $(DESTDIR)$(LOG_DIR) -MANDIR= $(DESTDIR)$(MAN_DIR) -MAN1DIR= $(MANDIR)/man1 -MAN3DIR= $(MANDIR)/man3 -MAN5DIR= $(MANDIR)/man5 -MAN6DIR= $(MANDIR)/man6 -MAN8DIR= $(MANDIR)/man8 -INFODIR= $(DESTDIR)$(INFO_DIR) - -# Directory for shutdown, halt, reboot, etc. -SHUTDOWNDIR= $(SBINDIR) - -# Modes -DIRMODE= 755 -BINMODE= 755 -MANMODE= 644 -DATMODE= 644 -INFOMODE= 644 -SUIDMODE= 4755 - -CHMOD= chmod -INSTALL= install -INSTALLDIR= $(INSTALL) -d -m $(DIRMODE) -INSTALLBIN= $(INSTALL) -m $(BINMODE) -INSTALLMAN= $(INSTALL) -m $(MANMODE) -INSTALLDAT= $(INSTALL) -m $(DATMODE) -INSTALLSUID= $(INSTALL) -m $(SUIDMODE) - -ifeq "$(DISABLE_NLS)" "yes" -NLSFLAGS = -DDISABLE_NLS -endif - -CFLAGS := $(OPT) -I$(LIB) $(WARNFLAGS) \ - $(CURSESFLAGS) $(SLANGFLAGS) $(NLSFLAGS) \ - -D_FILE_OFFSET_BITS=64 \ - -DSBINDIR=\"$(SBIN_DIR)\" \ - -DUSRSBINDIR=\"$(USRSBIN_DIR)\" \ - -DLOGDIR=\"$(LOG_DIR)\" \ - -DVARPATH=\"$(VAR_PATH)\" \ - -DLOCALEDIR=\"$(LOCALE_DIR)\" \ - $(CFLAGS) - - -%.o: %.c - $(CC) -c $(CFLAGS) $< -o $@ - -%: %.cc - $(CXX) $(CFLAGS) $< -o $@ - diff --git a/meta/recipes-core/util-linux/util-linux/defines.h b/meta/recipes-core/util-linux/util-linux/defines.h deleted file mode 100644 index 6ce6b86df5..0000000000 --- a/meta/recipes-core/util-linux/util-linux/defines.h +++ /dev/null @@ -1,10 +0,0 @@ -#define UTIL_LINUX_VERSION "2.12" -#define util_linux_version "util-linux-2.12" - -#define HAVE_blkpg_h -#define HAVE_kd_h -#define HAVE_locale_h -#define HAVE_langinfo_h -#define HAVE_sys_user_h -#define HAVE_asm_types_h -//#define NEED_tqueue_h diff --git a/meta/recipes-core/util-linux/util-linux/fix-configure.patch b/meta/recipes-core/util-linux/util-linux/fix-configure.patch deleted file mode 100644 index cefae97e9c..0000000000 --- a/meta/recipes-core/util-linux/util-linux/fix-configure.patch +++ /dev/null @@ -1,20 +0,0 @@ -The userlib_execdir was not getting set correctly, the quoting -was wrong as these quoted items were not getting expanded correctly. - -Upstream-Status: Pending - -Signed-off-by: Saul Wold <sgw@linux.intel.com> - -Index: util-linux-2.24.1/configure.ac -=================================================================== ---- util-linux-2.24.1.orig/configure.ac -+++ util-linux-2.24.1/configure.ac -@@ -76,7 +76,7 @@ fi - AC_SUBST([usrsbin_execdir]) - - AS_CASE([$libdir], -- ['${exec_prefix}/'* | '${prefix}/'* | /usr/*], -+ [${exec_prefix}/* | ${prefix}/* | /usr/*], - [usrlib_execdir=$libdir], - [usrlib_execdir='${exec_prefix}'$libdir] - ) diff --git a/meta/recipes-core/util-linux/util-linux/make_include b/meta/recipes-core/util-linux/util-linux/make_include deleted file mode 100644 index e6abcd91f7..0000000000 --- a/meta/recipes-core/util-linux/util-linux/make_include +++ /dev/null @@ -1,17 +0,0 @@ -VERSION=2.12 -CC=gcc -CFLAGS= -LDFLAGS= -HAVE_OLD_GCC=yes -HAVE_RAW_H=yes -HAVE_NCURSES=yes -CURSESFLAGS=-DNCH=1 -LIBCURSES=-lncurses -HAVE_TERMCAP=no -NEED_LIBCRYPT=yes -FOREIGN = --foreign-user -HAVE_XGETTEXT=yes -HAVE_OPENPTY=yes -HAVE_PIVOT_ROOT=yes -HAVE_GOOD_RPC=yes -HAVE_ZLIB=yes diff --git a/meta/recipes-core/util-linux/util-linux/swapargs.h b/meta/recipes-core/util-linux/util-linux/swapargs.h deleted file mode 100644 index e960eef05f..0000000000 --- a/meta/recipes-core/util-linux/util-linux/swapargs.h +++ /dev/null @@ -1,3 +0,0 @@ -#define SWAPON_HAS_TWO_ARGS -#include <asm/page.h> -#include <sys/swap.h> 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 deleted file mode 100644 index 8f26451aa8..0000000000 --- a/meta/recipes-core/util-linux/util-linux/util-linux-ensure-the-existence-of-directory-for-PAT.patch +++ /dev/null @@ -1,34 +0,0 @@ -Upstream-Status: Pending - -util-linux: ensure the existence of directory for PATHFILES - -When compiling util-linux, it's possible to encounter the following error. - /bin/sh: line 2:: misc-utils/uuidd.8.tmp: No such file or directory - -This is because that the misc-utils directory doesn't exist when trying to write to -misc-utils/uuidd.8.tmp. - -When generating misc-utils/uuidd.8 (or anything in PATHFILES), its directory -may not have been created yet. So we need to ensure the existence of the directory -to avoid the compilation error. - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile.am b/Makefile.am -index 17f4c33..ca3dc0f 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -123,6 +123,7 @@ EXTRA_DIST += $(PATHFILES:=.in) - - $(PATHFILES): Makefile - @ rm -f $@ $@.tmp -+ @ mkdir -p `dirname $@` - $(AM_V_GEN) srcdir=''; \ - test -f ./$@.in || srcdir=$(srcdir)/; \ - $(edit_cmd) $${srcdir}$@.in >$@.tmp --- -1.7.9.5 - 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 index afe543c6e8..1f496dee21 100644 --- a/meta/recipes-core/util-linux/util-linux/util-linux-native.patch +++ b/meta/recipes-core/util-linux/util-linux/util-linux-native.patch @@ -16,24 +16,29 @@ Patches revert upstream changes in order to support older machines. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + configure.ac | 1 + + include/c.h | 7 +++++++ + 2 files changed, 8 insertions(+) -Index: util-linux-2.24.1/configure.ac -=================================================================== ---- util-linux-2.24.1.orig/configure.ac -+++ util-linux-2.24.1/configure.ac -@@ -302,6 +302,7 @@ AC_CHECK_FUNCS([ \ +diff --git a/configure.ac b/configure.ac +index eb3680b..93e015f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -318,6 +318,7 @@ AC_CHECK_FUNCS([ \ llseek \ lseek64 \ mempcpy \ + mkostemp \ nanosleep \ + open_memstream \ personality \ - posix_fadvise \ -Index: util-linux-2.24.1/include/c.h -=================================================================== ---- util-linux-2.24.1.orig/include/c.h -+++ util-linux-2.24.1/include/c.h -@@ -236,6 +236,13 @@ static inline int dirfd(DIR *d) +diff --git a/include/c.h b/include/c.h +index e423e8b..cf33b94 100644 +--- a/include/c.h ++++ b/include/c.h +@@ -233,6 +233,13 @@ static inline int dirfd(DIR *d) #endif /* @@ -47,27 +52,6 @@ Index: util-linux-2.24.1/include/c.h * MAXHOSTNAMELEN replacement */ static inline size_t get_hostname_max(void) -Index: util-linux-2.24.1/lib/randutils.c -=================================================================== ---- util-linux-2.24.1.orig/lib/randutils.c -+++ util-linux-2.24.1/lib/randutils.c -@@ -16,6 +16,7 @@ - #include <sys/syscall.h> - - #include "randutils.h" -+#include "c.h" - - #ifdef HAVE_TLS - #define THREAD_LOCAL static __thread -Index: util-linux-2.24.1/lib/wholedisk.c -=================================================================== ---- util-linux-2.24.1.orig/lib/wholedisk.c -+++ util-linux-2.24.1/lib/wholedisk.c -@@ -10,6 +10,7 @@ - - #include "blkdev.h" - #include "wholedisk.h" -+#include "c.h" - - int is_whole_disk_fd(int fd, const char *name) - { +-- +1.9.1 + 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 index f131b763ca..6717a75a90 100644 --- 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 @@ -1,27 +1,33 @@ Upstream-Status: Pending -Index: util-linux-2.22.1/login-utils/login.c -=================================================================== ---- util-linux-2.22.1.orig/login-utils/login.c -+++ util-linux-2.22.1/login-utils/login.c -@@ -1239,6 +1239,8 @@ int main(int argc, char **argv) +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + login-utils/login.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/login-utils/login.c b/login-utils/login.c +index ebb76f5..38c881b 100644 +--- a/login-utils/login.c ++++ b/login-utils/login.c +@@ -1110,6 +1110,7 @@ int main(int argc, char **argv) char *buff; int childArgc = 0; int retcode; + struct sigaction act; -+ char *pwdbuf = NULL; struct passwd *pwd = NULL, _pwd; -@@ -1252,7 +1254,10 @@ int main(int argc, char **argv) +@@ -1123,7 +1124,9 @@ int main(int argc, char **argv) timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT); signal(SIGALRM, timedout); -- siginterrupt(SIGALRM, 1); /* we have to interrupt syscalls like ioclt() */ +- siginterrupt(SIGALRM, 1); /* we have to interrupt syscalls like ioctl() */ + (void) sigaction(SIGALRM, NULL, &act); + act.sa_flags &= ~SA_RESTART; + sigaction(SIGALRM, &act, NULL); -+ alarm(timeout); signal(SIGQUIT, SIG_IGN); signal(SIGINT, SIG_IGN); +-- +1.9.1 + diff --git a/meta/recipes-core/util-linux/util-linux_2.24.2.bb b/meta/recipes-core/util-linux/util-linux_2.25.2.bb index ed753e48b3..0ff1e7cc64 100644 --- a/meta/recipes-core/util-linux/util-linux_2.24.2.bb +++ b/meta/recipes-core/util-linux/util-linux_2.25.2.bb @@ -1,4 +1,4 @@ -MAJOR_VERSION = "2.24" +MAJOR_VERSION = "2.25" require util-linux.inc PR = "r1" @@ -13,14 +13,13 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \ file://util-linux-ng-2.16-mount_lock_path.patch \ file://uclibc-__progname-conflict.patch \ file://configure-sbindir.patch \ - file://fix-configure.patch \ file://fix-parallel-build.patch \ - file://util-linux-ensure-the-existence-of-directory-for-PAT.patch \ + file://CVE-2014-9114.patch \ ${OLDHOST} \ " -SRC_URI[md5sum] = "3f191727a0d28f7204b755cf1b6ea0aa" -SRC_URI[sha256sum] = "1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0" +SRC_URI[md5sum] = "cab3d7be354000f629bc601238b629b3" +SRC_URI[sha256sum] = "e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6" CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms" |