diff options
Diffstat (limited to 'yocto-poky/meta/recipes-core/util-linux')
9 files changed, 538 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux.inc b/yocto-poky/meta/recipes-core/util-linux/util-linux.inc new file mode 100644 index 000000000..a4072bc6c --- /dev/null +++ b/yocto-poky/meta/recipes-core/util-linux/util-linux.inc @@ -0,0 +1,268 @@ +SUMMARY = "A suite of basic system administration utilities" +DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \ +commonly found on most Linux systems. Some of the more important utilities include \ +disk partitioning, kernel message management, filesystem creation, and system login." + +SECTION = "base" + +LICENSE = "GPLv2+ & LGPLv2.1+ & BSD" + +LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c \ + file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Documentation/licenses/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://Documentation/licenses/COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \ + file://Documentation/licenses/COPYING.BSD-3;md5=58dcd8452651fc8b07d1f65ce07ca8af \ + file://Documentation/licenses/COPYING.UCB;md5=263860f8968d8bafa5392cab74285262 \ + file://libuuid/COPYING;md5=b442ffb762cf8d3e9df1b99e0bb4af70 \ + file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \ + file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16" + +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 \ + " + +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-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-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 \ + --enable-kill --enable-last --enable-mesg --enable-partx \ + --enable-raw --enable-reset --disable-login \ + --disable-vipw --disable-newgrp --disable-chfn-chsh \ + --enable-write --enable-mount \ + --enable-libuuid --enable-libblkid --enable-fsck --without-udev \ + usrsbin_execdir='${sbindir}' \ +" + +EXTRA_OECONF = "${SHARED_EXTRA_OECONF} --libdir=${base_libdir}" + +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] = "--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" +FILES_util-linux-cfdisk = "${base_sbindir}/cfdisk" +FILES_util-linux-sfdisk = "${sbindir}/sfdisk" +FILES_util-linux-swaponoff = "${base_sbindir}/swapon.${BPN} ${base_sbindir}/swapoff.${BPN}" +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 = "${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-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*" +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*" +RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid" +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 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 = "" +RRECOMMENDS_${PN}_class-nativesdk = "" +RDEPENDS_${PN}_class-native = "" +RDEPENDS_${PN}_class-nativesdk = "" + +RPROVIDES_${PN}-dev = "util-linux-libblkid-dev util-linux-libmount-dev util-linux-libuuid-dev" + +#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 + oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}' +} + +do_install () { + # with ccache the timestamps on compiled files may + # end up earlier than on their inputs, this allows + # for the resultant compilation in the install step. + oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \ + 'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \ + 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' 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 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} + for p in $sbinprogs $sbinprogs_a; do + if [ -f "${D}${sbindir}/$p" ]; then + mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p" + fi + done + fi + + if [ "${base_bindir}" != "${bindir}" ]; then + mkdir -p ${D}${base_bindir} + for p in $binprogs_a; do + if [ -f "${D}${bindir}/$p" ]; then + mv "${D}${bindir}/$p" "${D}${base_bindir}/$p" + fi + done + fi + + install -d ${D}${sysconfdir}/default/ + echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall + + rm -f ${D}${bindir}/chkdupexe +} + +# 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 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" +ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more" +ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap" +ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev" +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_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 reset.1 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3" + +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" +ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" +ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" +ALTERNATIVE_LINK_NAME[libblkid.3] = "${mandir}/man3/libblkid.3" +ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" +ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8" +ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" +ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3" + +ALTERNATIVE_util-linux-hwclock = "hwclock" +# There seems to be problem, atleast on nslu2, with these, untill they are +# fixed the busybox ones have higher priority +ALTERNATIVE_PRIORITY[hwclock] = "10" +ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock" + +ALTERNATIVE_util-linux-fdisk = "fdisk" +ALTERNATIVE_LINK_NAME[fdisk] = "${base_sbindir}/fdisk" + +ALTERNATIVE_util-linux-agetty = "getty" +ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" +ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty" + +ALTERNATIVE_util-linux-mount = "mount" +ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount" + +ALTERNATIVE_util-linux-umount = "umount" +ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" + +ALTERNATIVE_util-linux-readprofile = "readprofile" +ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile" + +ALTERNATIVE_util-linux-losetup = "losetup" +ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup" + +ALTERNATIVE_util-linux-swaponoff = "swapoff swapon" +ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff" +ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon" + +ALTERNATIVE_util-linux-fsck = "fsck.minix fsck" +ALTERNATIVE_LINK_NAME[fsck.minix] = "${base_sbindir}/fsck.minix" +ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck" + +ALTERNATIVE_util-linux-blkid = "blkid" +ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" + +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 () { + if '--enable-su' in d.getVar('EXTRA_OECONF', True).split(): + alt_name = "su" + 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/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch new file mode 100644 index 000000000..a5b1ff12e --- /dev/null +++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch @@ -0,0 +1,23 @@ +util-linux: take ${sbindir} from the environment if it is set there +fix the test, the [ ] syntax was getting eaten by autoconf + +Signed-off-by: Phil Blundell <pb@pbcl.net> +Signed-off-by: Saul Wold <sgw@linux.intel.com +Upstream-Status: Inappropriate [configuration] + +Index: util-linux-2.22.1/configure.ac +=================================================================== +--- util-linux-2.22.1.orig/configure.ac ++++ util-linux-2.22.1/configure.ac +@@ -73,7 +73,10 @@ AC_SUBST([localstatedir]) + usrbin_execdir='${exec_prefix}/bin' + AC_SUBST([usrbin_execdir]) + +-usrsbin_execdir='${exec_prefix}/sbin' ++if test -z "$usrsbin_execdir" ; ++then ++ usrsbin_execdir='${exec_prefix}/sbin' ++fi + AC_SUBST([usrsbin_execdir]) + + case $libdir in diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/fix-parallel-build.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/fix-parallel-build.patch new file mode 100644 index 000000000..adb271ce0 --- /dev/null +++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/fix-parallel-build.patch @@ -0,0 +1,35 @@ +From 774f55f9dd22c01e4041a183d8dff14811f29114 Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Fri, 4 Apr 2014 17:33:04 +0800 +Subject: [PATCH] sys-utils/Makemodule.am: fix parallel build issue + +The rule SETARCH_MAN_LINKS is used for the files under the sys-utils +dir, for example: + +echo ".so man8/setarch.8" > sys-utils/linux32.8 + +but it depends on nothing so that the sys-utils dir may not exist, we +can create the sys-utils dir to fix problem. + +Upstream-Status: Pending + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + sys-utils/Makemodule.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am +index 6265282..62ead37 100644 +--- a/sys-utils/Makemodule.am ++++ b/sys-utils/Makemodule.am +@@ -124,6 +124,7 @@ man_MANS += $(SETARCH_MAN_LINKS) + CLEANFILES += $(SETARCH_MAN_LINKS) + + $(SETARCH_MAN_LINKS): ++ $(MKDIR_P) sys-utils + $(AM_V_GEN)echo ".so man8/setarch.8" > $@ + + install-exec-hook-setarch: +-- +1.8.2.1 + diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch new file mode 100644 index 000000000..5031a7313 --- /dev/null +++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch @@ -0,0 +1,32 @@ +configure should include errno.h instead of argp.h when +checking for presence of program_invocation_short_name +uclibc defines this to be const char* unlike util-linux-ng +which defines this to be char* so this error goes unnoticed +on glibc/eglibc systems. + +here is the error it fixes + +in file included from mountP.h:14:0, + from cache.c:29: +/home/kraj/work/slugos/build/tmp-slugos-uclibc/sysroots/nslu2le/usr/include/errno.h:55:46: error: conflicting types for '__progname' +../../../include/c.h:118:14: note: previous declaration of '__progname' was here +make[3]: *** [cache.lo] Error 1 + + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Jonathan Liu <net147@gmail.com> + +Upstream-Status: Pending +Index: util-linux-2.22.1/configure.ac +=================================================================== +--- util-linux-2.22.1.orig/configure.ac ++++ util-linux-2.22.1/configure.ac +@@ -372,7 +372,7 @@ esac + + AC_MSG_CHECKING([whether program_invocation_short_name is defined]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +- #include <argp.h> ++ #include <errno.h> + ]], [[ + program_invocation_short_name = "test"; + ]])], [ diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch new file mode 100644 index 000000000..68bf22de8 --- /dev/null +++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native-qsort.patch @@ -0,0 +1,33 @@ +From f220d809be1baa654503bf6ff52f3630b0d7015c Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Wed, 26 Mar 2014 01:30:29 +0000 +Subject: [PATCH] sun.c: use qsort() to instead of qsort_r() + +qsort_r() was added to glibc in version 2.8, so there is no qsort_r() on +the host like CentOS 5.x. + +Upstream-Status: Inappropriate [Other] + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + libfdisk/src/sun.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +Index: util-linux-2.24.2/libfdisk/src/sun.c +=================================================================== +--- util-linux-2.24.2.orig/libfdisk/src/sun.c ++++ util-linux-2.24.2/libfdisk/src/sun.c +@@ -431,10 +431,9 @@ static int sun_verify_disklabel(struct f + } + verify_sun_starts = starts; + +- qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]), +- (int (*)(const void *,const void *,void *)) verify_sun_cmp, +- verify_sun_starts); +- ++ qsort(array,ARRAY_SIZE(array),sizeof(array[0]), ++ (int (*)(const void *,const void *)) verify_sun_cmp); ++ + if (array[0] == -1) { + fdisk_info(cxt, _("No partitions defined.")); + return 0; diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native.patch new file mode 100644 index 000000000..1f496dee2 --- /dev/null +++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-native.patch @@ -0,0 +1,57 @@ +Support older hosts with latest util-linux-native + +mkostemp is not defined on older machines. So we detect this and +provide a define that uses mkstemp instead. + +O_CLOEXEC is not defined on older machines. It is however defined +in the 'c.h' header. Fix up the users to include 'c.h'. + +fdisks/fdisksunlabel.c was modified to use qsort_r, however +this is not defined on older hosts. Revert: + commit c69bbca9c1f6645097bd20fe3a21f5a99a2a0698 + fdisk: (sun): use ask API, remove global variable + +Upstream-Status: Inappropriate [other] +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(+) + +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 \ +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 + + /* ++ * mkostemp replacement ++ */ ++#ifndef HAVE_MKOSTEMP ++#define mkostemp(template, flags) mkstemp(template) ++#endif ++ ++/* + * MAXHOSTNAMELEN replacement + */ + static inline size_t get_hostname_max(void) +-- +1.9.1 + diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch new file mode 100644 index 000000000..5773d7ea1 --- /dev/null +++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-2.16-mount_lock_path.patch @@ -0,0 +1,27 @@ +Upstream-Status: Inappropriate [embedded specific] + +The FHS indicates that /etc must be capable of being mounted R/O. + +The FHS also indicates that lock files belong in /var/lock, and /var must +be R/W as soon as possible during boot. + +This patch moves the mtab lock file from the potentially R/O /etc, to the +R/W /var/lock area. This lock file is used when mounting disks and making +other mount adjustments. The _PATH_MOUNTED_TMP is not adjusted, as failing +to write to this file does not cause any functional limitations. + +(Note, if /etc is R/O, then /etc/mtab should be a symlink to /proc/mounts) + +Signed-off-by: Mark Hatle <mark.hatle@windriver.com> + +--- util-linux-ng-2.16/include/pathnames.h.orig ++++ util-linux-ng-2.16/include/pathnames.h +@@ -90,7 +90,7 @@ + # endif + #endif + +-#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~" ++#define _PATH_MOUNTED_LOCK "/var/lock/mtab~" + #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp" + + #ifndef _PATH_DEV diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch new file mode 100644 index 000000000..6717a75a9 --- /dev/null +++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch @@ -0,0 +1,33 @@ +Upstream-Status: Pending + +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; +@@ -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 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/yocto-poky/meta/recipes-core/util-linux/util-linux_2.26.2.bb b/yocto-poky/meta/recipes-core/util-linux/util-linux_2.26.2.bb new file mode 100644 index 000000000..fc7dc6e09 --- /dev/null +++ b/yocto-poky/meta/recipes-core/util-linux/util-linux_2.26.2.bb @@ -0,0 +1,30 @@ +MAJOR_VERSION = "2.26" +require util-linux.inc + +# To support older hosts, we need to patch and/or revert +# some upstream changes. Only do this for native packages. +OLDHOST = "" +OLDHOST_class-native = "file://util-linux-native.patch \ + file://util-linux-native-qsort.patch \ + " + +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-parallel-build.patch \ + ${OLDHOST} \ +" +SRC_URI[md5sum] = "9bdf368c395f1b70325d0eb22c7f48fb" +SRC_URI[sha256sum] = "0e29bda142528a48a0a953c39ff63093651a4809042e1790fbd6aa8663fd9666" + +CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms" + +EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \ + --disable-fallocate \ + --disable-use-tty-group \ +" +EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \ + --disable-fallocate \ + --disable-use-tty-group \ +" |