summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2016-01-13 16:23:57 -0500
committerMartin Jansa <Martin.Jansa@gmail.com>2016-02-10 15:08:19 +0100
commit9ab08d7b9ca47d85c07780b5c000abb21a9402ca (patch)
tree70a5e48df5827d4e64a8c8f3aa244ab09f7fe847
parente0a67654175d3c9ef26e53509bf4dd5a6a8f6ba1 (diff)
downloadmeta-openembedded-9ab08d7b9ca47d85c07780b5c000abb21a9402ca.tar.gz
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@core2_64 due to file /var/run \ conflicting with base-files-3.0.14-r89@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@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch25
-rw-r--r--meta-networking/recipes-support/ctdb/ctdb_2.5.1.bb6
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 000000000..a7e987b85
--- /dev/null
+++ b/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch
@@ -0,0 +1,25 @@
1From f02ff7383f1cc0c118732352ccbae476c7b3b3ba Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Tue, 17 Nov 2015 16:17:00 -0500
4Subject: [PATCH] service: ensure the PID directory is created
5
6Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
7---
8 config/ctdb.service | 1 +
9 1 file changed, 1 insertion(+)
10
11diff --git a/config/ctdb.service b/config/ctdb.service
12index ea37c30..8537105 100644
13--- a/config/ctdb.service
14+++ b/config/ctdb.service
15@@ -5,6 +5,7 @@ After=network.target
16 [Service]
17 Type=forking
18 LimitCORE=infinity
19+RuntimeDirectory=/run/ctdb
20 PIDFile=/run/ctdb/ctdbd.pid
21 ExecStart=/usr/sbin/ctdbd_wrapper /run/ctdb/ctdbd.pid start
22 ExecStop=/usr/sbin/ctdbd_wrapper /run/ctdb/ctdbd.pid stop
23--
242.1.4
25
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 40c3ad1c2..6acfed0e2 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 \
17SRC_URI = "https://ftp.samba.org/pub/${PN}/${BP}.tar.gz \ 17SRC_URI = "https://ftp.samba.org/pub/${PN}/${BP}.tar.gz \
18 file://01-support-cross-compile-for-linux-os.patch \ 18 file://01-support-cross-compile-for-linux-os.patch \
19 file://02-link-rep_snprintf-for-ltdbtool.patch \ 19 file://02-link-rep_snprintf-for-ltdbtool.patch \
20 file://service-ensure-the-PID-directory-is-created.patch \
20 " 21 "
21 22
22SRC_URI[md5sum] = "d0cd91726ff4ca2229e1b21859c94717" 23SRC_URI[md5sum] = "d0cd91726ff4ca2229e1b21859c94717"
@@ -39,11 +40,12 @@ do_install_append() {
39 install -d ${D}${systemd_unitdir}/system 40 install -d ${D}${systemd_unitdir}/system
40 install -m 0644 ${S}/config/ctdb.service ${D}${systemd_unitdir}/system 41 install -m 0644 ${S}/config/ctdb.service ${D}${systemd_unitdir}/system
41 sed -i -e 's,/usr/sbin/,${sbindir}/,' ${D}${systemd_unitdir}/system/ctdb.service 42 sed -i -e 's,/usr/sbin/,${sbindir}/,' ${D}${systemd_unitdir}/system/ctdb.service
43 sed -i -e 's,\([=\ ]\)/run/,\1${localstatedir}/run/,' ${D}${systemd_unitdir}/system/ctdb.service
44
45 rm -r ${D}/${localstatedir}/run
42} 46}
43 47
44SYSTEMD_SERVICE_${PN} = "ctdb.service" 48SYSTEMD_SERVICE_${PN} = "ctdb.service"
45 49
46FILES_${PN} += "/run"
47
48# onnode is a shell script with bashisms and bash #! 50# onnode is a shell script with bashisms and bash #!
49RDEPENDS_${PN} += "bash" 51RDEPENDS_${PN} += "bash"