[oe-commits] [meta-openembedded] 16/18: ctdb: Fix rootfs creation errors

git at git.openembedded.org git at git.openembedded.org
Tue Jan 26 23:15:20 UTC 2016


joe_macdonald pushed a commit to branch master
in repository meta-openembedded.

commit e4dc2a3641b61649bb92511d5c8b52f3e86f6b8e
Author: Mark Asselstine <mark.asselstine at windriver.com>
AuthorDate: Wed Jan 13 16:23:57 2016 -0500

    ctdb: Fix rootfs creation errors
    
    While building an image I was getting an error during rootfs creation
    that ctdb was conflicting with base-files as both were creating
    '/var/run':
    
        warning: Removing ctdb-2.5.1-r0 at core2_64 due to file /var/run \
          conflicting with base-files-3.0.14-r89 at genericx86_64
    
    This is normally a volatile directory so we have no need
    to include this in the ctdb package, so revert the actions of the
    Makefile by deleting the directory.
    
    Although /run and $localstatedir/run are linked to be consistent we
    update the .service file to use the latter. To ensure the 'ctdb'
    subdir exists we patch the use of RuntimeDirectory= in to the .service
    file. This will compensate for our removal of this directory creation
    from the Makefile.
    
    Signed-off-by: Mark Asselstine <mark.asselstine at windriver.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Joe MacDonald <joe_macdonald at mentor.com>
---
 ...rvice-ensure-the-PID-directory-is-created.patch | 25 ++++++++++++++++++++++
 meta-networking/recipes-support/ctdb/ctdb_2.5.1.bb |  6 ++++--
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch b/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch
new file mode 100644
index 0000000..a7e987b
--- /dev/null
+++ b/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch
@@ -0,0 +1,25 @@
+From f02ff7383f1cc0c118732352ccbae476c7b3b3ba Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine at windriver.com>
+Date: Tue, 17 Nov 2015 16:17:00 -0500
+Subject: [PATCH] service: ensure the PID directory is created
+
+Signed-off-by: Mark Asselstine <mark.asselstine at windriver.com>
+---
+ config/ctdb.service | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/config/ctdb.service b/config/ctdb.service
+index ea37c30..8537105 100644
+--- a/config/ctdb.service
++++ b/config/ctdb.service
+@@ -5,6 +5,7 @@ After=network.target
+ [Service]
+ Type=forking
+ LimitCORE=infinity
++RuntimeDirectory=/run/ctdb
+ PIDFile=/run/ctdb/ctdbd.pid
+ ExecStart=/usr/sbin/ctdbd_wrapper /run/ctdb/ctdbd.pid start
+ ExecStop=/usr/sbin/ctdbd_wrapper /run/ctdb/ctdbd.pid stop
+-- 
+2.1.4
+
diff --git a/meta-networking/recipes-support/ctdb/ctdb_2.5.1.bb b/meta-networking/recipes-support/ctdb/ctdb_2.5.1.bb
index 0cc7aad..ba9c4e5 100644
--- a/meta-networking/recipes-support/ctdb/ctdb_2.5.1.bb
+++ b/meta-networking/recipes-support/ctdb/ctdb_2.5.1.bb
@@ -17,6 +17,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
 SRC_URI = "https://ftp.samba.org/pub/${PN}/${BP}.tar.gz \
            file://01-support-cross-compile-for-linux-os.patch \
            file://02-link-rep_snprintf-for-ltdbtool.patch \
+           file://service-ensure-the-PID-directory-is-created.patch \
           "
 
 SRC_URI[md5sum] = "d0cd91726ff4ca2229e1b21859c94717"
@@ -36,11 +37,12 @@ do_install_append() {
     install -d ${D}${systemd_unitdir}/system
     install -m 0644 ${S}/config/ctdb.service ${D}${systemd_unitdir}/system
     sed -i -e 's,/usr/sbin/,${sbindir}/,' ${D}${systemd_unitdir}/system/ctdb.service
+    sed -i -e 's,\([=\ ]\)/run/,\1${localstatedir}/run/,' ${D}${systemd_unitdir}/system/ctdb.service
+
+    rm -r ${D}/${localstatedir}/run
 }
 
 SYSTEMD_SERVICE_${PN} = "ctdb.service"
 
-FILES_${PN} += "/run"
-
 # onnode is a shell script with bashisms and bash #!
 RDEPENDS_${PN} += "bash"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list