Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] V2: Some fixes for LSB tests
@ 2015-03-10  3:26 Kai Kang
  2015-03-10  3:26 ` [PATCH 1/3] systemd: correct permission mode of /var/volatile/tmp Kai Kang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kai Kang @ 2015-03-10  3:26 UTC (permalink / raw)
  To: openembedded-core

V2 doesn't use alternative to handle /usr/lib/sendmail either. Because the link target is alway
${sbindir}/sendmail, update-alternative can't handle this kind of case.

So check whether /usr/lib/sendmail exists and is a link file, otherwise create it during pkg_postinst
of packages such as msmtp postfix and esmtp which provide ${sbindir}/sendmail.

Only one flaw is when all these packages are removed, broken link file /usr/lib/sendmail left.


The following changes since commit 8ce2f2c3549248b2aa1259ceb28ed03be166ac6f:

  maintainers.inc: Became maintainer of python2 and python3 (2015-03-09 16:01:08 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib kangkai/lsb-20150310
  http://git.yoctoproject.org/cgit.cgi//log/?h=kangkai/lsb-20150310

Kai Kang (3):
  systemd: correct permission mode of /var/volatile/tmp
  lsb: update init-functions and remove sendmail
  msmtp: add link file /usr/lib/sendmail

 .../recipes-core/systemd/systemd/00-create-volatile.conf |  2 +-
 meta/recipes-extended/lsb/lsb_4.1.bb                     | 16 +++-------------
 meta/recipes-extended/msmtp/msmtp_1.6.1.bb               |  5 +++++
 3 files changed, 9 insertions(+), 14 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] systemd: correct permission mode of /var/volatile/tmp
  2015-03-10  3:26 [PATCH 0/3] V2: Some fixes for LSB tests Kai Kang
@ 2015-03-10  3:26 ` Kai Kang
  2015-03-10  3:26 ` [PATCH 2/3] lsb: update init-functions and remove sendmail Kai Kang
  2015-03-10  3:26 ` [PATCH 3/3] msmtp: add link file /usr/lib/sendmail Kai Kang
  2 siblings, 0 replies; 4+ messages in thread
From: Kai Kang @ 2015-03-10  3:26 UTC (permalink / raw)
  To: openembedded-core

Permission mode of directory /var/volatile/tmp should be 1777,
correct it.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-core/systemd/systemd/00-create-volatile.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd/00-create-volatile.conf b/meta/recipes-core/systemd/systemd/00-create-volatile.conf
index 9ffa88e..87cbe1e 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	-	-
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] lsb: update init-functions and remove sendmail
  2015-03-10  3:26 [PATCH 0/3] V2: Some fixes for LSB tests Kai Kang
  2015-03-10  3:26 ` [PATCH 1/3] systemd: correct permission mode of /var/volatile/tmp Kai Kang
@ 2015-03-10  3:26 ` Kai Kang
  2015-03-10  3:26 ` [PATCH 3/3] msmtp: add link file /usr/lib/sendmail Kai Kang
  2 siblings, 0 replies; 4+ messages in thread
From: Kai Kang @ 2015-03-10  3:26 UTC (permalink / raw)
  To: openembedded-core

According to LSB specification Ref1, LSB checks file
/lib/lsb/init-functions. But for 64 bits system it is installed in
/lib64. Install init-functions to /lib/lsb to conform with LSB
specification.

Link file /usr/lib/sendmail which points to /usr/sbin/sendmail is
required by LSB according to Linux FHS[Ref 2]. But it should be done by
packages which provides command sendmail such as msmtp, postfix and
esmtp etc.

Refs:
1 http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
2 http://www.pathname.com/fhs/pub/fhs-2.3.html#SPECIFICOPTIONS13

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-extended/lsb/lsb_4.1.bb | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb b/meta/recipes-extended/lsb/lsb_4.1.bb
index b4ef98e..f05c30c 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -72,19 +72,18 @@ do_install(){
 
 do_install_append(){
        install -d ${D}${sysconfdir}/core-lsb
-       install -d ${D}/${baselib}/lsb
        for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
        do
            install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb
        done
-       install -m 0755 ${WORKDIR}/init-functions ${D}/${baselib}/lsb
+
+       install -d ${D}/lib/lsb
+       install -m 0755 ${WORKDIR}/init-functions ${D}/lib/lsb
 
        # creat links for LSB test
        install -d ${D}/usr/lib/lsb
        ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd
        ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd
-       install -d ${D}/${libdir}
-       ln -sf ${sbindir}/sendmail ${D}/${libdir}/sendmail
 
        if [ "${TARGET_ARCH}" = "x86_64" ];then
 	       cd ${D}
@@ -119,13 +118,4 @@ do_install_append(){
 FILES_${PN} += "/lib64 \
 		/usr/lib/lsb \
                 ${base_libdir}/lsb/* \
-		${libdir}/sendmail \
                "
-
-# The sysroot/${libdir}/sendmail conflicts with esmtp's, and it's a
-# symlink to ${sbindir}/sendmail which is meaningless for sysroot, so
-# remove it.
-SYSROOT_PREPROCESS_FUNCS += "remove_sysroot_sendmail"
-remove_sysroot_sendmail() {
-    rm -r "${SYSROOT_DESTDIR}${libdir}/sendmail"
-}
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] msmtp: add link file /usr/lib/sendmail
  2015-03-10  3:26 [PATCH 0/3] V2: Some fixes for LSB tests Kai Kang
  2015-03-10  3:26 ` [PATCH 1/3] systemd: correct permission mode of /var/volatile/tmp Kai Kang
  2015-03-10  3:26 ` [PATCH 2/3] lsb: update init-functions and remove sendmail Kai Kang
@ 2015-03-10  3:26 ` Kai Kang
  2 siblings, 0 replies; 4+ messages in thread
From: Kai Kang @ 2015-03-10  3:26 UTC (permalink / raw)
  To: openembedded-core

Link file /usr/lib/sendmail points to /usr/sbin/sendmail is required by
LSB core test according to Linux FHS: "For historical reasons,
/usr/lib/sendmail must be a symbolic link to /usr/sbin/sendmail if the
latter exists."

Create the link file /usr/lib/sendmail if it doesn't exist.

Refs:
1 http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/normativerefs.html#STD.LSB
2 http://www.pathname.com/fhs/pub/fhs-2.3.html#SPECIFICOPTIONS13

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-extended/msmtp/msmtp_1.6.1.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-extended/msmtp/msmtp_1.6.1.bb b/meta/recipes-extended/msmtp/msmtp_1.6.1.bb
index c9ad1da..d6f3a15 100644
--- a/meta/recipes-extended/msmtp/msmtp_1.6.1.bb
+++ b/meta/recipes-extended/msmtp/msmtp_1.6.1.bb
@@ -23,3 +23,8 @@ ALTERNATIVE_${PN} = "sendmail"
 ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
 ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
 ALTERNATIVE_PRIORITY = "100"
+
+pkg_postinst_${PN}_linuxstdbase () {
+	# /usr/lib/sendmial is required by LSB core test
+	[ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
+}
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-10  3:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-10  3:26 [PATCH 0/3] V2: Some fixes for LSB tests Kai Kang
2015-03-10  3:26 ` [PATCH 1/3] systemd: correct permission mode of /var/volatile/tmp Kai Kang
2015-03-10  3:26 ` [PATCH 2/3] lsb: update init-functions and remove sendmail Kai Kang
2015-03-10  3:26 ` [PATCH 3/3] msmtp: add link file /usr/lib/sendmail Kai Kang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox