file: avoid to handle special character
PATCH 1/5 file: avoid to handle special character
From: Li Wang <[email protected]>
avoid to handle special character '@' in filename and directory.
--- .../file/file/avoid_handle_special_character.patch | 36 ++++++++++++++++++++ meta/recipes-devtools/file/file_5.15.bb | 1 + 2 files changed, 37 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-devtools/file/file/avoid_handle_special_character.patch
meta/recipes-devtools/file/file/avoid_handle_special_character.patch new file +36 -0
@@ -0,0 +1,36 @@ +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -12,21 +12,21 @@ + + file.1: Makefile file.man + @rm -f $@ +- sed -e s@__CSECTION__@1@g \ +- -e s@__FSECTION__@${fsect}@g \ +- -e s@__VERSION__@${VERSION}@g \ +- -e s@__MAGIC__@${MAGIC}@g $(srcdir)/file.man > $@ ++ sed -e s#__CSECTION__#1#g \ ++ -e s#__FSECTION__#${fsect}#g \ ++ -e s#__VERSION__#${VERSION}#g \ ++ -e s#__MAGIC__#${MAGIC}#g $(srcdir)/file.man > $@ + + magic.${fsect}: Makefile magic.man + @rm -f $@ +- sed -e s@__CSECTION__@1@g \ +- -e s@__FSECTION__@${fsect}@g \ +- -e s@__VERSION__@${VERSION}@g \ +- -e s@__MAGIC__@${MAGIC}@g $(srcdir)/magic.man > $@ ++ sed -e s#__CSECTION__#1#g \ ++ -e s#__FSECTION__#${fsect}#g \ ++ -e s#__VERSION__#${VERSION}#g \ ++ -e s#__MAGIC__#${MAGIC}#g $(srcdir)/magic.man > $@ + + libmagic.3: Makefile libmagic.man + @rm -f $@ +- sed -e s@__CSECTION__@1@g \ +- -e s@__FSECTION__@${fsect}@g \ +- -e s@__VERSION__@${VERSION}@g \ +- -e s@__MAGIC__@${MAGIC}@g $(srcdir)/libmagic.man > $@ ++ sed -e s#__CSECTION__#1#g \ ++ -e s#__FSECTION__#${fsect}#g \ ++ -e s#__VERSION__#${VERSION}#g \ ++ -e s#__MAGIC__#${MAGIC}#g $(srcdir)/libmagic.man > $@
meta/recipes-devtools/file/file_5.15.bb +1 -0
@@ -12,6 +12,7 @@ DEPENDS = "zlib file-native" DEPENDS_class-native = "zlib-native" SRC_URI = "ftp://ftp.astron.com/pub/file/file-${PV}.tar.gz \ + file://avoid_handle_special_character.patch \ file://dump \ file://filesystems"
Signature · 1 line
1.7.5.4
PATCH 2/5 eglibc: add support for /etc/ld.so.conf.d/*.conf
From: Ming Liu <[email protected]>
There are advantages in changing the contents of ld.so.conf to "include /etc/ld.so.conf.d/*.conf" instead of directly listing directories in it, just like most distributions are doing the same.
--- meta/recipes-core/eglibc/eglibc-package.inc | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
meta/recipes-core/eglibc/eglibc-package.inc +6 -1
@@ -33,7 +33,7 @@ RPROVIDES_${PN}-pcprofile = "glibc-pcprofile" RPROVIDES_${PN}-dbg = "glibc-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" -FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}" +FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf ${sysconfdir}/ld.so.conf.d', '', d)}" FILES_ldd = "${bindir}/ldd" FILES_libsegfault = "${base_libdir}/libSegFault*" FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
@@ -97,6 +97,11 @@ do_install_append () { if [ -d ${D}${sysconfdir} ]; then rmdir ${D}${sysconfdir} fi + else + if [ -f ${D}${sysconfdir}/ld.so.conf ]; then + echo 'include ld.so.conf.d/*.conf' > ${D}${sysconfdir}/ld.so.conf + mkdir -p ${D}${sysconfdir}/ld.so.conf.d + fi fi }
Signature · 1 line
1.7.5.4
Re: [PATCH 2/5] eglibc: add support for /etc/ld.so.conf.d/*.conf
meta/recipes-core/eglibc/eglibc-package.inc do_install_append () { · line 104
Quoted 5 lines · Yue Tao
meta/recipes-core/eglibc/eglibc-package.inc +5
-0+ else + if [ -f ${D}${sysconfdir}/ld.so.conf ]; then + echo 'include ld.so.conf.d/*.conf' > ${D}${sysconfdir}/ld.so.conf + mkdir -p ${D}${sysconfdir}/ld.so.conf.d + fi
This will cause the existing contents of ld.so.conf to be obliterated if the file wasn't empty to begin with. (I know that it is empty in oe-core, but a distro layer might be overlaying this file with its own.)
Also, it seems as though the choice of whether to use an "ld.so.conf.d" arrangement or not is one that the distro should be making. Is there a strong reason why this needs to be done in oe-core?
p.
Re: [PATCH 2/5] eglibc: add support for /etc/ld.so.conf.d/*.conf
In reply to Yue TaoQuoted 25 lines · Yue Tao
From: Ming Liu <[email protected]>
There are advantages in changing the contents of ld.so.conf to "include
/etc/ld.so.conf.d/*.conf" instead of directly listing directories in it, just like most distributions are doing the same.Signed-off-by Ming Liu <[email protected]>--- meta/recipes-core/eglibc/eglibc-package.inc | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)meta/recipes-core/eglibc/eglibc-package.inc +1
-1@@ -33,7 +33,7 @@ RPROVIDES_${PN}-pcprofile = "glibc-pcprofile" RPROVIDES_${PN}-dbg = "glibc-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" -FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}" +FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf ${sysconfdir}/ld.so.conf.d', '', d)}" FILES_ldd = "${bindir}/ldd" FILES_libsegfault = "${base_libdir}/libSegFault*" FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
meta/recipes-core/eglibc/eglibc-package.inc do_install_append () { · line 104
Quoted 8 lines
meta/recipes-core/eglibc/eglibc-package.inc +5
-0@@ -97,6 +97,11 @@ do_install_append () { if [ -d ${D}${sysconfdir} ]; then rmdir ${D}${sysconfdir} fi + else + if [ -f ${D}${sysconfdir}/ld.so.conf ]; then + echo 'include ld.so.conf.d/*.conf' > ${D}${sysconfdir}/ld.so.conf + mkdir -p ${D}${sysconfdir}/ld.so.conf.d + fi
I think that to make this feature really useful this would need to be executed in runtime (before ldconfig is executed).
I would like to different components to add their own conf files to ${D}${sysconfdir}/ld.so.conf.d and let ldconfig executed in do_rootfs to find them, but they won't be there when eglibc.do_install is executed.
Quoted 10 lines
meta/recipes-core/eglibc/eglibc-package.inc +0
-0fi }Signature · 6 lines
1.7.5.4 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
PATCH 3/5 bind: add init.d/bind status command
In reply to Yue Tao--- .../bind-add-init-bind-status-command.patch | 45 ++++++++++++++++++++ meta/recipes-connectivity/bind/bind_9.8.1.bb | 3 +- 2 files changed, 47 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-connectivity/bind/bind-9.8.1/bind-add-init-bind-status-command.patch
meta/recipes-connectivity/bind/bind-9.8.1/bind-add-init-bind-status-command.patch new file +45 -0
@@ -0,0 +1,45 @@ +--- a/init.d ++++ b/init.d +@@ -2,6 +2,8 @@ + + PATH=/sbin:/bin:/usr/sbin:/usr/bin + ++. /etc/init.d/functions ++ + # for a chrooted server: "-u bind -t /var/lib/named" + # Don't modify this line, change or create /etc/default/bind9. + OPTIONS="" +@@ -104,6 +106,12 @@ umount_chroot_conf() { + fi + } + ++rhstatus() { ++ [ -x /usr/sbin/rndc ] && /usr/sbin/rndc status; ++ status /usr/sbin/named; ++ return $? ++} ++ + case "$1" in + start) + echo -n "Starting domain name service: named" +@@ -172,6 +180,11 @@ case "$1" in + echo "." + ;; + ++ status) ++ rhstatus; ++ exit $? ++ ;; ++ + reload) + /usr/sbin/rndc reload + ;; +@@ -183,7 +196,7 @@ case "$1" in + ;; + + *) +- echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2 ++ echo "Usage: /etc/init.d/bind {start|stop|reload|restart|status|force-reload}" >&2 + exit 1 + ;; + esac
meta/recipes-connectivity/bind/bind_9.8.1.bb +2 -1
@@ -6,7 +6,7 @@ LICENSE = "ISC & BSD" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=0fbe2a3ab3c68ac3fea3cad13093877c" DEPENDS = "openssl libcap" -PR = "r5" +PR = "r6" SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \ file://conf.patch \
@@ -19,6 +19,7 @@ SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \ file://bind-CVE-2013-2266.patch \ file://bind-Fix-CVE-2012-4244.patch \ file://mips1-not-support-opcode.diff \ + file://bind-add-init-bind-status-command.patch \ " SRC_URI[md5sum] = "cf31117c5d35af34d4c0702970ad9fb7"
Signature · 1 line
1.7.5.4
Re: [PATCH 3/5] bind: add init.d/bind status command
Quoted 13 lines · Yue Tao
Signed-off-by Yue Tao <[email protected]>--- .../bind-add-init-bind-status-command.patch | 45 ++++++++++++++++++++ meta/recipes-connectivity/bind/bind_9.8.1.bb | 3 +- 2 files changed, 47 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-connectivity/bind/bind-9.8.1/bind-add-init-bind-status-command.patchmeta/recipes-connectivity/bind/bind-9.8.1/bind-add-init-bind-status-command.patch new file +0
-0
meta/recipes-connectivity/bind/bind-9.8.1/bind-add-init-bind-status-command.patch line 3
Quoted 3 lines
meta/recipes-connectivity/bind/bind-9.8.1/bind-add-init-bind-status-command.patch new file +3
-0@@ -0,0 +1,45 @@ +--- a/init.d ++++ b/init.d +@@ -2,6 +2,8 @@
No patch header...
Cheers,
Richard
PATCH 4/5 cronie: fix init.d/crond status return value
In reply to Yue Tao--- meta/recipes-extended/cronie/cronie/crond.init | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-)
meta/recipes-extended/cronie/cronie/crond.init +2 -5
@@ -43,11 +43,8 @@ case "$1" in fi ;; status) - if [ -n "`/bin/pidof $CROND`" ] ; then - echo "crond is running." - else - echo "crond is not running." - fi + status crond + exit $? ;; restart) $0 stop && sleep 1 && $0 start
Signature · 1 line
1.7.5.4
PATCH 5/5 tcf-agent: add init.d/tcf-agent status command
In reply to Yue TaoFrom: Li Wang <[email protected]>
--- .../tcf-agent/tcf-agent/tcf-agent.init | 75 ++++++++++++++++++++ meta/recipes-devtools/tcf-agent/tcf-agent_git.bb | 4 +- 2 files changed, 78 insertions(+), 1 deletions(-) create mode 100755 meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init new file +75 -0
@@ -0,0 +1,75 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: tcf-agent +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Target Communication Framework agent +### END INIT INFO + +DAEMON_PATH=/usr/sbin/tcf-agent +DAEMON_NAME=`basename $DAEMON_PATH` + +. /etc/init.d/functions + +test -x $DAEMON_PATH || exit 0 + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +export PATH + +RETVAL=0 + +case "$1" in + start) + echo -n "Starting $DAEMON_NAME: " + $DAEMON_PATH -d -L- -l0 + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + echo "OK" + touch /var/lock/subsys/$DAEMON_NAME + else + echo "FAIL" + fi + ;; + + stop) + echo -n "Stopping $DAEMON_NAME: " + count=0 + while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do + killproc $DAEMON_PATH >& /dev/null + sleep 1 + RETVAL=$? + if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then + sleep 3 + fi + count=`expr $count + 1` + done + rm -f /var/lock/subsys/$DAEMON_NAME + if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then + echo "FAIL" + else + echo "OK" + fi + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + status $DAEMON_NAME + RETVAL=$? + ;; + + condrestart) + [ -f /var/lock/subsys/$DAEMON_NAME ] && $0 restart + ;; + + *) + echo "usage: $0 { start | stop | status | restart | condrestart | status }" + ;; +esac + +exit $RETVAL +
meta/recipes-devtools/tcf-agent/tcf-agent_git.bb +3 -1
@@ -11,7 +11,7 @@ PR = "r2" SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git \ file://fix_ranlib.patch \ - file://fix_tcf-agent.init.patch \ + file://tcf-agent.init \ " DEPENDS = "util-linux openssl"
@@ -42,5 +42,7 @@ do_compile() { do_install() { oe_runmake install INSTALLROOT=${D} + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/tcf-agent.init ${D}${sysconfdir}/init.d/tcf-agent }
Signature · 1 line
1.7.5.4
Quoted 10 lines · Yue Tao
From: Li Wang <[email protected]>
avoid to handle special character '@' in filename and directory.
Signed-off-by Li Wang <[email protected]>--- .../file/file/avoid_handle_special_character.patch | 36 ++++++++++++++++++++ meta/recipes-devtools/file/file_5.15.bb | 1 + 2 files changed, 37 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-devtools/file/file/avoid_handle_special_character.patch
No patch header and do we support "@" in directory names for builds? Doesn't this break '#' instead?
Cheers,
Richard
Quoted 54 lines
meta/recipes-devtools/file/file/avoid_handle_special_character.patch new file +36
-0@@ -0,0 +1,36 @@ +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -12,21 +12,21 @@ + + file.1: Makefile file.man + @rm -f $@ +- sed -e s@__CSECTION__@1@g \ +- -e s@__FSECTION__@${fsect}@g \ +- -e s@__VERSION__@${VERSION}@g \ +- -e s@__MAGIC__@${MAGIC}@g $(srcdir)/file.man > $@ ++ sed -e s#__CSECTION__#1#g \ ++ -e s#__FSECTION__#${fsect}#g \ ++ -e s#__VERSION__#${VERSION}#g \ ++ -e s#__MAGIC__#${MAGIC}#g $(srcdir)/file.man > $@ + + magic.${fsect}: Makefile magic.man + @rm -f $@ +- sed -e s@__CSECTION__@1@g \ +- -e s@__FSECTION__@${fsect}@g \ +- -e s@__VERSION__@${VERSION}@g \ +- -e s@__MAGIC__@${MAGIC}@g $(srcdir)/magic.man > $@ ++ sed -e s#__CSECTION__#1#g \ ++ -e s#__FSECTION__#${fsect}#g \ ++ -e s#__VERSION__#${VERSION}#g \ ++ -e s#__MAGIC__#${MAGIC}#g $(srcdir)/magic.man > $@ + + libmagic.3: Makefile libmagic.man + @rm -f $@ +- sed -e s@__CSECTION__@1@g \ +- -e s@__FSECTION__@${fsect}@g \ +- -e s@__VERSION__@${VERSION}@g \ +- -e s@__MAGIC__@${MAGIC}@g $(srcdir)/libmagic.man > $@ ++ sed -e s#__CSECTION__#1#g \ ++ -e s#__FSECTION__#${fsect}#g \ ++ -e s#__VERSION__#${VERSION}#g \ ++ -e s#__MAGIC__#${MAGIC}#g $(srcdir)/libmagic.man > $@meta/recipes-devtools/file/file_5.15.bb +1
-0@@ -12,6 +12,7 @@ DEPENDS = "zlib file-native" DEPENDS_class-native = "zlib-native" SRC_URI = "ftp://ftp.astron.com/pub/file/file-${PV}.tar.gz \ + file://avoid_handle_special_character.patch \ file://dump \ file://filesystems"
Quoted 1 line · Yue Tao
avoid to handle special character '@' in filename and directory.
Please explain the problem more accurately. From looking I presume the situation here is that the sed breaks when building file-native and the build directory contains @, as ${MAGIC} is $pkgdatadir/magic.
Clearly we need a well-defined character that isn't supported in build paths, but I'm also not convinced that # is it.
Ross