Skip to contentSkip to conversation

nagios-core/nagios-nrpe: use update-alternatives for /var/nagios

PATCH In review [email protected] 2 participants 2 messages Aug 6, 2019 – Aug 7, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nagios-core/nagios-nrpe: use update-alternatives for /var/nagios

From: Changqing Li <[email protected]>

fix below error:
Error: Transaction check error:
file /var/nagios from install of nagios-core-4.4.3-r0.core2_64 conflicts with file from package nagios-nrpe-daemon-3.2.1-r0.core2_64

---
 recipes-extended/nagios/nagios-core_4.4.3.bb | 6 +++++-
 recipes-extended/nagios/nagios-nrpe_3.2.1.bb | 5 ++++-
 2 files changed, 9 insertions(+), 2 deletions(-)
recipes-extended/nagios/nagios-core_4.4.3.bb +5 -1
index fcf04e9..7a86653 100644
@@ -25,7 +25,7 @@ SRC_URI[sha256sum] = "bba8f0e8dc8cf72f7a7ae4e8ce9c60f5bd315629421b9ec34818a28b8d
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-inherit autotools-brokensep update-rc.d systemd
+inherit autotools-brokensep update-rc.d systemd update-alternatives
 
 DEPENDS = "gd unzip-native"
 
@@ -151,3 +151,7 @@ INITSCRIPT_NAME = "nagios"
 INITSCRIPT_PARAMS = "defaults"
 
 CVE_PRODUCT = "nagios_core"
+
+ALTERNATIVE_PRIORITY_${PN} = '20'
+ALTERNATIVE_${PN} = "nagios"
+ALTERNATIVE_LINK_NAME[nagios] = "${localstatedir}/nagios"
recipes-extended/nagios/nagios-nrpe_3.2.1.bb +4 -1
index 3afa5dd..04917f7 100644
@@ -20,7 +20,7 @@ SRC_URI[sha256sum] = "8ad2d1846ab9011fdd2942b8fc0c99dfad9a97e57f4a3e6e394a4ead99
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-inherit autotools-brokensep update-rc.d systemd
+inherit autotools-brokensep update-rc.d systemd update-alternatives
 
 # IP address of server which proxy should connect to
 MONITORING_PROXY_SERVER_IP ??= "192.168.7.2"
@@ -97,3 +97,6 @@ SYSTEMD_AUTO_ENABLE_${PN}-daemon = "enable"
 INITSCRIPT_PACKAGES = "${PN}-daemon"
 INITSCRIPT_NAME_${PN}-daemon = "nrpe"
 INITSCRIPT_PARAMS_${PN}-daemon = "defaults"
+
+ALTERNATIVE_${PN}-daemon = "nagios"
+ALTERNATIVE_LINK_NAME[nagios] = "${localstatedir}/nagios"
Signature · 1 line
2.7.4
#1 lore raw

merged

Bruce

Quoted 67 lines · On Tue, Aug 6, 2019 at 3:54 AM <[email protected]> wrote:

From: Changqing Li <[email protected]>

fix below error:
Error: Transaction check error:
file /var/nagios from install of nagios-core-4.4.3-r0.core2_64 conflicts
with file from package nagios-nrpe-daemon-3.2.1-r0.core2_64

---
 recipes-extended/nagios/nagios-core_4.4.3.bb | 6 +++++-
 recipes-extended/nagios/nagios-nrpe_3.2.1.bb | 5 ++++-
 2 files changed, 9 insertions(+), 2 deletions(-)
recipes-extended/nagios/nagios-core_4.4.3.bb +0 -0
index fcf04e9..7a86653 100644
@@ -25,7 +25,7 @@ SRC_URI[sha256sum] =

"bba8f0e8dc8cf72f7a7ae4e8ce9c60f5bd315629421b9ec34818a28b8d

S = "${WORKDIR}/${SRCNAME}-${PV}"

recipes-extended/nagios/nagios-core_4.4.3.bb +5 -1
-inherit autotools-brokensep update-rc.d systemd
+inherit autotools-brokensep update-rc.d systemd update-alternatives
 
 DEPENDS = "gd unzip-native"
@@ -151,3 +151,7 @@ INITSCRIPT_NAME = "nagios"
 INITSCRIPT_PARAMS = "defaults"
 
 CVE_PRODUCT = "nagios_core"
+
+ALTERNATIVE_PRIORITY_${PN} = '20'
+ALTERNATIVE_${PN} = "nagios"
+ALTERNATIVE_LINK_NAME[nagios] = "${localstatedir}/nagios"
recipes-extended/nagios/nagios-nrpe_3.2.1.bb +0 -0
index 3afa5dd..04917f7 100644
@@ -20,7 +20,7 @@ SRC_URI[sha256sum] =

"8ad2d1846ab9011fdd2942b8fc0c99dfad9a97e57f4a3e6e394a4ead99

S = "${WORKDIR}/${SRCNAME}-${PV}"

recipes-extended/nagios/nagios-nrpe_3.2.1.bb +4 -2
-inherit autotools-brokensep update-rc.d systemd
+inherit autotools-brokensep update-rc.d systemd update-alternatives
 
 # IP address of server which proxy should connect to
 MONITORING_PROXY_SERVER_IP ??= "192.168.7.2"
@@ -97,3 +97,6 @@ SYSTEMD_AUTO_ENABLE_${PN}-daemon = "enable"
 INITSCRIPT_PACKAGES = "${PN}-daemon"
 INITSCRIPT_NAME_${PN}-daemon = "nrpe"
 INITSCRIPT_PARAMS_${PN}-daemon = "defaults"
+
+ALTERNATIVE_${PN}-daemon = "nagios"
+ALTERNATIVE_LINK_NAME[nagios] = "${localstatedir}/nagios"
--

2.7.4

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end
- "Use the force Harry" - Gandalf, Star Trek II