diff options
| author | Changqing Li <changqing.li@windriver.com> | 2022-04-22 10:06:55 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2022-04-22 11:08:00 -0700 |
| commit | b932a20f26ea444b256fb0adf72e0d0982ade20b (patch) | |
| tree | b3aef72e62d99d5da10a93d74aba179d591550a2 | |
| parent | 35f0d19d4f3326c094a9c065d5511fd35fde43a7 (diff) | |
| download | meta-openembedded-b932a20f26ea444b256fb0adf72e0d0982ade20b.tar.gz | |
drbd-utils: fix for usrmerge
* fix following error:
systemd-analyze --man=false verify /lib/systemd/system/drbd.service
drbd.service: Command /lib/drbd/scripts/drbd is not executable: No such file or directory
* enhancement for usrmerge
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch | 119 | ||||
| -rw-r--r-- | meta-networking/recipes-support/drbd/drbd-utils_9.20.2.bb | 12 |
2 files changed, 114 insertions, 17 deletions
diff --git a/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch b/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch index d976680e3b..84e3ad0968 100644 --- a/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch +++ b/meta-networking/recipes-support/drbd/drbd-utils/0001-drbd-utils-support-usrmerge.patch | |||
| @@ -1,18 +1,24 @@ | |||
| 1 | From 83764f5d57b3370e0b04a70f814ca49237a66eea Mon Sep 17 00:00:00 2001 | 1 | From 69011c7227ad1aaf08d5ab28e46f85dac951c597 Mon Sep 17 00:00:00 2001 |
| 2 | From: Changqing Li <changqing.li@windriver.com> | 2 | From: Changqing Li <changqing.li@windriver.com> |
| 3 | Date: Thu, 5 Sep 2019 18:57:39 +0800 | 3 | Date: Thu, 21 Apr 2022 17:22:35 +0800 |
| 4 | Subject: [PATCH] drbd-utils: support usrmerge | 4 | Subject: [PATCH] drbd-utils: support usermerge |
| 5 | 5 | ||
| 6 | Upstream-Status: Inappropriate[oe-specific] | 6 | Upstream-Status: Inappropriate[oe-specific] |
| 7 | 7 | ||
| 8 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | 8 | Signed-off-by: Changqing Li <changqing.li@windriver.com> |
| 9 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | 9 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> |
| 10 | --- | 10 | --- |
| 11 | configure.ac | 2 +- | 11 | configure.ac | 2 +- |
| 12 | scripts/Makefile.in | 10 +++++----- | 12 | scripts/Makefile.in | 10 +++++----- |
| 13 | user/v83/Makefile.in | 14 +++++++------- | 13 | scripts/drbd-demote-or-escalate@.service | 2 +- |
| 14 | user/v84/Makefile.in | 14 +++++++------- | 14 | scripts/drbd-promote@.service | 4 ++-- |
| 15 | 4 files changed, 20 insertions(+), 20 deletions(-) | 15 | scripts/drbd-wait-promotable@.service | 2 +- |
| 16 | scripts/drbd.service | 6 +++--- | ||
| 17 | scripts/drbd@.service | 6 +++--- | ||
| 18 | scripts/ocf.ra@.service | 4 ++-- | ||
| 19 | user/v83/Makefile.in | 14 +++++++------- | ||
| 20 | user/v84/Makefile.in | 14 +++++++------- | ||
| 21 | 10 files changed, 32 insertions(+), 32 deletions(-) | ||
| 16 | 22 | ||
| 17 | diff --git a/configure.ac b/configure.ac | 23 | diff --git a/configure.ac b/configure.ac |
| 18 | index ae575586..3d7deeae 100644 | 24 | index ae575586..3d7deeae 100644 |
| @@ -28,7 +34,7 @@ index ae575586..3d7deeae 100644 | |||
| 28 | test x"$with_udev" = xyes ; then | 34 | test x"$with_udev" = xyes ; then |
| 29 | if test x"$PKG_CONFIG" != x; then | 35 | if test x"$PKG_CONFIG" != x; then |
| 30 | diff --git a/scripts/Makefile.in b/scripts/Makefile.in | 36 | diff --git a/scripts/Makefile.in b/scripts/Makefile.in |
| 31 | index fcd298e9..2521fb08 100644 | 37 | index fcd298e9..bab441a5 100644 |
| 32 | --- a/scripts/Makefile.in | 38 | --- a/scripts/Makefile.in |
| 33 | +++ b/scripts/Makefile.in | 39 | +++ b/scripts/Makefile.in |
| 34 | @@ -88,11 +88,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd) | 40 | @@ -88,11 +88,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd) |
| @@ -40,14 +46,97 @@ index fcd298e9..2521fb08 100644 | |||
| 40 | - install -m 755 drbd-service-shim.sh $(DESTDIR)/lib/drbd/scripts | 46 | - install -m 755 drbd-service-shim.sh $(DESTDIR)/lib/drbd/scripts |
| 41 | - install -m 755 drbd-wait-promotable.sh $(DESTDIR)/lib/drbd/scripts | 47 | - install -m 755 drbd-wait-promotable.sh $(DESTDIR)/lib/drbd/scripts |
| 42 | - install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/lib/drbd/scripts | 48 | - install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/lib/drbd/scripts |
| 43 | + install -d $(DESTDIR)/${nonarch_libdir}/drbdscripts | 49 | + install -d $(DESTDIR)/${nonarch_libdir}/drbd/scripts |
| 44 | + install -m 755 drbd $(DESTDIR)/${nonarch_libdir}/drbdscripts | 50 | + install -m 755 drbd $(DESTDIR)/${nonarch_libdir}/drbd/scripts |
| 45 | + install -m 755 drbd-service-shim.sh $(DESTDIR)/${nonarch_libdir}/drbdscripts | 51 | + install -m 755 drbd-service-shim.sh $(DESTDIR)/${nonarch_libdir}/drbd/scripts |
| 46 | + install -m 755 drbd-wait-promotable.sh $(DESTDIR)/${nonarch_libdir}/drbdscripts | 52 | + install -m 755 drbd-wait-promotable.sh $(DESTDIR)/${nonarch_libdir}/drbd/scripts |
| 47 | + install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/${nonarch_libdir}/drbdscripts | 53 | + install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/${nonarch_libdir}/drbd/scripts |
| 48 | install -d $(DESTDIR)$(tmpfilesdir)/ | 54 | install -d $(DESTDIR)$(tmpfilesdir)/ |
| 49 | install -m 444 drbd.tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/drbd.conf | 55 | install -m 444 drbd.tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/drbd.conf |
| 50 | endif | 56 | endif |
| 57 | diff --git a/scripts/drbd-demote-or-escalate@.service b/scripts/drbd-demote-or-escalate@.service | ||
| 58 | index 20932238..8b5ce4a2 100644 | ||
| 59 | --- a/scripts/drbd-demote-or-escalate@.service | ||
| 60 | +++ b/scripts/drbd-demote-or-escalate@.service | ||
| 61 | @@ -28,5 +28,5 @@ TimeoutSec=60 | ||
| 62 | # "Type=forking" would be an option to have it retry a number of times, | ||
| 63 | # and then only escalate to FailureAction if that did not help. | ||
| 64 | Type=oneshot | ||
| 65 | -ExecStart=/lib/drbd/scripts/drbd-service-shim.sh secondary-or-escalate %I | ||
| 66 | +ExecStart=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh secondary-or-escalate %I | ||
| 67 | ExecStopPost=-/bin/journalctl --sync | ||
| 68 | diff --git a/scripts/drbd-promote@.service b/scripts/drbd-promote@.service | ||
| 69 | index 71345d9b..678e0703 100644 | ||
| 70 | --- a/scripts/drbd-promote@.service | ||
| 71 | +++ b/scripts/drbd-promote@.service | ||
| 72 | @@ -24,5 +24,5 @@ RemainAfterExit=yes | ||
| 73 | # (ab)using systemd features | ||
| 74 | # if we cannot configure and promote, that's a condition, not a failure | ||
| 75 | # See the comment above wrt. FailureAction vs OnFailure | ||
| 76 | -ExecCondition=/lib/drbd/scripts/drbd-service-shim.sh primary %I | ||
| 77 | -ExecStop=/lib/drbd/scripts/drbd-service-shim.sh secondary %I | ||
| 78 | +ExecCondition=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh primary %I | ||
| 79 | +ExecStop=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh secondary %I | ||
| 80 | diff --git a/scripts/drbd-wait-promotable@.service b/scripts/drbd-wait-promotable@.service | ||
| 81 | index 81c3789f..3416abc6 100644 | ||
| 82 | --- a/scripts/drbd-wait-promotable@.service | ||
| 83 | +++ b/scripts/drbd-wait-promotable@.service | ||
| 84 | @@ -10,7 +10,7 @@ Type=oneshot | ||
| 85 | |||
| 86 | # on first start, wait for access to "good data" | ||
| 87 | # let systemd handle timeouts | ||
| 88 | -ExecStart=/lib/drbd/scripts/drbd-wait-promotable.sh %I | ||
| 89 | +ExecStart=@nonarch_libdir@/drbd/scripts/drbd-wait-promotable.sh %I | ||
| 90 | RemainAfterExit=yes | ||
| 91 | |||
| 92 | [Install] | ||
| 93 | diff --git a/scripts/drbd.service b/scripts/drbd.service | ||
| 94 | index 96c599e7..c81e95a6 100644 | ||
| 95 | --- a/scripts/drbd.service | ||
| 96 | +++ b/scripts/drbd.service | ||
| 97 | @@ -12,11 +12,11 @@ RemainAfterExit=yes | ||
| 98 | # A check for INIT_VERSION already exists, just set it to something. | ||
| 99 | Environment=INIT_VERSION=systemd | ||
| 100 | |||
| 101 | -ExecStart=/lib/drbd/scripts/drbd start | ||
| 102 | -ExecStop=/lib/drbd/scripts/drbd stop | ||
| 103 | +ExecStart=@nonarch_libdir@/drbd/scripts/drbd start | ||
| 104 | +ExecStop=@nonarch_libdir@/drbd/scripts/drbd stop | ||
| 105 | |||
| 106 | # Re-adjust everything on reload | ||
| 107 | -ExecReload=/lib/drbd/scripts/drbd reload | ||
| 108 | +ExecReload=@nonarch_libdir@/drbd/scripts/drbd reload | ||
| 109 | |||
| 110 | [Install] | ||
| 111 | WantedBy=multi-user.target | ||
| 112 | diff --git a/scripts/drbd@.service b/scripts/drbd@.service | ||
| 113 | index 76514c5b..e2e500ba 100644 | ||
| 114 | --- a/scripts/drbd@.service | ||
| 115 | +++ b/scripts/drbd@.service | ||
| 116 | @@ -35,8 +35,8 @@ RemainAfterExit=yes | ||
| 117 | |||
| 118 | # depends... do we want this as ExecCondition or as ExecStart | ||
| 119 | # failed start is "failed", failed condition is just "not startable yet" | ||
| 120 | -ExecStart=/lib/drbd/scripts/drbd-service-shim.sh adjust %I | ||
| 121 | -ExecReload=/lib/drbd/scripts/drbd-service-shim.sh adjust %I | ||
| 122 | +ExecStart=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh adjust %I | ||
| 123 | +ExecReload=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh adjust %I | ||
| 124 | |||
| 125 | # can only succeed, if you first stop all depending services | ||
| 126 | -ExecStopPost=/lib/drbd/scripts/drbd-service-shim.sh down %I | ||
| 127 | +ExecStopPost=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh down %I | ||
| 128 | diff --git a/scripts/ocf.ra@.service b/scripts/ocf.ra@.service | ||
| 129 | index 9c2268a6..1666c482 100644 | ||
| 130 | --- a/scripts/ocf.ra@.service | ||
| 131 | +++ b/scripts/ocf.ra@.service | ||
| 132 | @@ -22,5 +22,5 @@ Environment=monitor_inverval=30 | ||
| 133 | # Only the first argument is used by the wrapper, | ||
| 134 | # the %n is just to identify which is which in the process list. | ||
| 135 | # All parameterization is done via Environment= in per instance override.conf | ||
| 136 | -ExecStart=/lib/drbd/scripts/ocf.ra.wrapper.sh start-and-monitor %n | ||
| 137 | -ExecStopPost=/lib/drbd/scripts/ocf.ra.wrapper.sh stop %n | ||
| 138 | +ExecStart=@nonarch_libdir@/drbd/scripts/ocf.ra.wrapper.sh start-and-monitor %n | ||
| 139 | +ExecStopPost=@nonarch_libdir@/drbd/scripts/ocf.ra.wrapper.sh stop %n | ||
| 51 | diff --git a/user/v83/Makefile.in b/user/v83/Makefile.in | 140 | diff --git a/user/v83/Makefile.in b/user/v83/Makefile.in |
| 52 | index 08cfe574..4c4971b6 100644 | 141 | index 08cfe574..4c4971b6 100644 |
| 53 | --- a/user/v83/Makefile.in | 142 | --- a/user/v83/Makefile.in |
| @@ -111,5 +200,5 @@ index 0fcefc5f..81f7d5ec 100644 | |||
| 111 | spell: | 200 | spell: |
| 112 | for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \ | 201 | for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \ |
| 113 | -- | 202 | -- |
| 114 | 2.33.0 | 203 | 2.25.1 |
| 115 | 204 | ||
diff --git a/meta-networking/recipes-support/drbd/drbd-utils_9.20.2.bb b/meta-networking/recipes-support/drbd/drbd-utils_9.20.2.bb index 640e4e7858..deaab641e2 100644 --- a/meta-networking/recipes-support/drbd/drbd-utils_9.20.2.bb +++ b/meta-networking/recipes-support/drbd/drbd-utils_9.20.2.bb | |||
| @@ -10,9 +10,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018" | |||
| 10 | 10 | ||
| 11 | SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=${PV};protocol=https \ | 11 | SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=${PV};protocol=https \ |
| 12 | git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \ | 12 | git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \ |
| 13 | ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \ | ||
| 14 | file://0001-drbdmon-add-LDFLAGS-when-linking.patch \ | 13 | file://0001-drbdmon-add-LDFLAGS-when-linking.patch \ |
| 15 | " | 14 | ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \ |
| 15 | " | ||
| 16 | |||
| 16 | SRCREV_drbd-utils = "087ee6b4961ca154d76e4211223b03149373bed8" | 17 | SRCREV_drbd-utils = "087ee6b4961ca154d76e4211223b03149373bed8" |
| 17 | SRCREV_drbd-headers = "f1529aa84e9d2f66c96ad283a1bbb708aabf03f7" | 18 | SRCREV_drbd-headers = "f1529aa84e9d2f66c96ad283a1bbb708aabf03f7" |
| 18 | 19 | ||
| @@ -47,6 +48,13 @@ do_install:append() { | |||
| 47 | # don't install empty /var/lock and /var/run to avoid conflict with base-files | 48 | # don't install empty /var/lock and /var/run to avoid conflict with base-files |
| 48 | rm -rf ${D}${localstatedir}/lock | 49 | rm -rf ${D}${localstatedir}/lock |
| 49 | rm -rf ${D}${localstatedir}/run | 50 | rm -rf ${D}${localstatedir}/run |
| 51 | |||
| 52 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-demote-or-escalate@.service | ||
| 53 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-promote@.service | ||
| 54 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-wait-promotable@.service | ||
| 55 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd.service | ||
| 56 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd@.service | ||
| 57 | sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/ocf.ra@.service | ||
| 50 | } | 58 | } |
| 51 | 59 | ||
| 52 | RDEPENDS:${PN} += "bash perl-module-getopt-long perl-module-exporter perl-module-constant perl-module-overloading perl-module-exporter-heavy" | 60 | RDEPENDS:${PN} += "bash perl-module-getopt-long perl-module-exporter perl-module-constant perl-module-overloading perl-module-exporter-heavy" |
