[oe] [meta-networking][PATCH] Fixed an install error in Samba with LSB distros

Pablo Saavedra psaavedra at igalia.com
Wed May 30 21:51:50 UTC 2018


An error in the Samba installation occurs with distros LSB:

    install: cannot stat 'packaging/LSB/samba.sh': No such
    file or directory
    exit 1 from 'install -m 0755 packaging/LSB/samba.sh

LSB packaging directory was removed in Samba 4.7:

  commit 0a23cde8efea06f81c6d34227b71dab627cc87b9
  Author: Andreas Schneider <asn at samba.org>
  Date:   Tue May 9 15:48:09 2017 +0200

      packaging: Remove LSB packaging

      This hasn't been touched since 2001.

      Signed-off-by: Andreas Schneider <asn at samba.org>
      Reviewed-by: David Disseldorp <ddiss at samba.org>

This patch removes the conditional 'if' and uses always
compatible sysv script.

Signed-off-by: Pablo Saavedra <psaavedra at igalia.com>
---
 .../recipes-connectivity/samba/samba_4.7.6.bb       | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb b/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb
index a8517c541..e711e58d0 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb
@@ -150,19 +150,14 @@ do_install_append() {
     install -m644 packaging/systemd/samba.conf.tmp ${D}${sysconfdir}/tmpfiles.d/samba.conf
     echo "d ${localstatedir}/log/samba 0755 root root -" \
         >> ${D}${sysconfdir}/tmpfiles.d/samba.conf
-    if [ "${LSB}" = "lsb" ]; then
-        install -d ${D}${sysconfdir}/init.d
-        install -m 0755 packaging/LSB/samba.sh ${D}${sysconfdir}/init.d/samba
-    else
-        install -d ${D}${sysconfdir}/init.d
-        install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba
-        sed -e 's,/opt/samba/bin,${sbindir},g' \
-            -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \
-            -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \
-            -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba,g' \
-            -e 's,/usr/bin,${base_bindir},g' \
-            -i ${D}${sysconfdir}/init.d/samba
-    fi
+    install -d ${D}${sysconfdir}/init.d
+    install -m 0755 packaging/sysv/samba.init ${D}${sysconfdir}/init.d/samba
+    sed -e 's,/opt/samba/bin,${sbindir},g' \
+        -e 's,/opt/samba/smb.conf,${sysconfdir}/samba/smb.conf,g' \
+        -e 's,/opt/samba/log,${localstatedir}/log/samba,g' \
+        -e 's,/etc/init.d/samba.server,${sysconfdir}/init.d/samba,g' \
+        -e 's,/usr/bin,${base_bindir},g' \
+        -i ${D}${sysconfdir}/init.d/samba
 
     install -d ${D}${sysconfdir}/samba
     echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts
-- 
2.11.0




More information about the Openembedded-devel mailing list