* [meta-networking][PATCH 1/2] quagga: add subpkgs to RDEPENDS
@ 2014-09-29 1:19 Chong Lu
2014-09-29 1:19 ` [meta-networking][PATCH 2/2] quagga: add systemd service file Chong Lu
2014-09-29 5:51 ` [meta-networking][PATCH 1/2] quagga: add subpkgs to RDEPENDS Roman Khimov
0 siblings, 2 replies; 4+ messages in thread
From: Chong Lu @ 2014-09-29 1:19 UTC (permalink / raw)
To: openembedded-devel
We need subpkgs to start quagga, so add them to RDEPENDS.
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
meta-networking/recipes-protocols/quagga/quagga.inc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta-networking/recipes-protocols/quagga/quagga.inc b/meta-networking/recipes-protocols/quagga/quagga.inc
index 7d4211a..04ec051 100644
--- a/meta-networking/recipes-protocols/quagga/quagga.inc
+++ b/meta-networking/recipes-protocols/quagga/quagga.inc
@@ -115,6 +115,8 @@ PACKAGE_BEFORE_PN = "${PN}-ospfd ${PN}-ospf6d ${PN}-babeld ${PN}-bgpd \
${PN}-ripd ${PN}-ripngd ${PN}-isisd \
${PN}-ospfclient ${PN}-watchquagga"
+RDEPENDS_${PN} += "${PN}-babeld ${PN}-bgpd ${PN}-isisd ${PN}-ospf6d ${PN}-ospfd ${PN}-ripd ${PN}-ripngd"
+
FILES_${PN}-ospfd = "${sbindir}/ospfd ${libdir}/libospf.so.*"
FILES_${PN}-ospf6d = "${sbindir}/ospf6d"
FILES_${PN}-babeld = "${sbindir}/babeld"
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [meta-networking][PATCH 2/2] quagga: add systemd service file
2014-09-29 1:19 [meta-networking][PATCH 1/2] quagga: add subpkgs to RDEPENDS Chong Lu
@ 2014-09-29 1:19 ` Chong Lu
2014-09-29 5:51 ` [meta-networking][PATCH 1/2] quagga: add subpkgs to RDEPENDS Roman Khimov
1 sibling, 0 replies; 4+ messages in thread
From: Chong Lu @ 2014-09-29 1:19 UTC (permalink / raw)
To: openembedded-devel
Add systemd service for quagga.
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
.../recipes-protocols/quagga/files/babeld.service | 14 +++++++
.../recipes-protocols/quagga/files/bgpd.service | 14 +++++++
.../recipes-protocols/quagga/files/isisd.service | 14 +++++++
.../recipes-protocols/quagga/files/ospf6d.service | 14 +++++++
.../recipes-protocols/quagga/files/ospfd.service | 14 +++++++
.../recipes-protocols/quagga/files/ripd.service | 14 +++++++
.../recipes-protocols/quagga/files/ripngd.service | 14 +++++++
.../recipes-protocols/quagga/files/zebra.service | 15 +++++++
.../recipes-protocols/quagga/quagga.inc | 49 +++++++++++++++++++++-
9 files changed, 161 insertions(+), 1 deletion(-)
create mode 100644 meta-networking/recipes-protocols/quagga/files/babeld.service
create mode 100644 meta-networking/recipes-protocols/quagga/files/bgpd.service
create mode 100644 meta-networking/recipes-protocols/quagga/files/isisd.service
create mode 100644 meta-networking/recipes-protocols/quagga/files/ospf6d.service
create mode 100644 meta-networking/recipes-protocols/quagga/files/ospfd.service
create mode 100644 meta-networking/recipes-protocols/quagga/files/ripd.service
create mode 100644 meta-networking/recipes-protocols/quagga/files/ripngd.service
create mode 100644 meta-networking/recipes-protocols/quagga/files/zebra.service
diff --git a/meta-networking/recipes-protocols/quagga/files/babeld.service b/meta-networking/recipes-protocols/quagga/files/babeld.service
new file mode 100644
index 0000000..dd344b0
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/babeld.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Babel routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/babeld.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+ExecStart=@SBINDIR@/babeld -d $babeld_options -f /etc/quagga/babeld.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/bgpd.service b/meta-networking/recipes-protocols/quagga/files/bgpd.service
new file mode 100644
index 0000000..164c817
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/bgpd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=BGP routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/bgpd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+ExecStart=@SBINDIR@/bgpd -d $bgpd_options -f /etc/quagga/bgpd.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/isisd.service b/meta-networking/recipes-protocols/quagga/files/isisd.service
new file mode 100644
index 0000000..9bfe7b6
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/isisd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=IS-IS routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/isisd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+ExecStart=@SBINDIR@/isisd -d $isisd_options -f /etc/quagga/isisd.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/ospf6d.service b/meta-networking/recipes-protocols/quagga/files/ospf6d.service
new file mode 100644
index 0000000..4b8ebf8
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/ospf6d.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=OSPF routing daemon for IPv6
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ospf6d.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+ExecStart=@SBINDIR@/ospf6d -d $ospf6d_options -f /etc/quagga/ospf6d.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/ospfd.service b/meta-networking/recipes-protocols/quagga/files/ospfd.service
new file mode 100644
index 0000000..f9f5031
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/ospfd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=OSPF routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ospfd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+ExecStart=@SBINDIR@/ospfd -d $ospfd_options -f /etc/quagga/ospfd.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/ripd.service b/meta-networking/recipes-protocols/quagga/files/ripd.service
new file mode 100644
index 0000000..5dfd28b
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/ripd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=RIP routing daemon
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ripd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+ExecStart=@SBINDIR@/ripd -d $ripd_options -f /etc/quagga/ripd.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/ripngd.service b/meta-networking/recipes-protocols/quagga/files/ripngd.service
new file mode 100644
index 0000000..936b81f
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/ripngd.service
@@ -0,0 +1,14 @@
+i[Unit]
+Description=RIP routing daemon for IPv6
+BindTo=zebra.service
+After=zebra.service
+ConditionPathExists=@SYSCONFDIR@/quagga/ripngd.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+ExecStart=@SBINDIR@/ripngd -d $ripngd_options -f /etc/quagga/ripngd.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/zebra.service b/meta-networking/recipes-protocols/quagga/files/zebra.service
new file mode 100644
index 0000000..afdd9e5
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/zebra.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=GNU Zebra routing manager
+Wants=network.target
+Before=network.target
+ConditionPathExists=@SYSCONFDIR@/quagga/zebra.conf
+
+[Service]
+Type=forking
+EnvironmentFile=-@SYSCONFDIR@/default/quagga
+ExecStartPre=@BASE_SBINDIR@/ip route flush proto zebra
+ExecStart=@SBINDIR@/zebra -d $zebra_options -f /etc/quagga/zebra.conf
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/quagga.inc b/meta-networking/recipes-protocols/quagga/quagga.inc
index 04ec051..9bdd4d5 100644
--- a/meta-networking/recipes-protocols/quagga/quagga.inc
+++ b/meta-networking/recipes-protocols/quagga/quagga.inc
@@ -31,13 +31,31 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quagga${QUAGGASUBDIR}/quagga-${PV}.tar.gz; \
file://quagga.pam \
file://ripd-fix-two-bugs-after-received-SIGHUP.patch \
file://quagga-Avoid-duplicate-connected-address.patch \
+ file://babeld.service \
+ file://bgpd.service \
+ file://isisd.service \
+ file://ospf6d.service \
+ file://ospfd.service \
+ file://ripd.service \
+ file://ripngd.service \
+ file://zebra.service \
"
PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap"
PACKAGECONFIG[pam] = "--with-libpam, --without-libpam, libpam"
-inherit autotools update-rc.d useradd
+inherit autotools update-rc.d useradd systemd
+
+SYSTEMD_PACKAGES = "${PN} ${PN}-babeld ${PN}-bgpd ${PN}-isisd ${PN}-ospf6d ${PN}-ospfd ${PN}-ripd ${PN}-ripngd"
+SYSTEMD_SERVICE_${PN}-babeld = "babeld.service"
+SYSTEMD_SERVICE_${PN}-bgpd = "bgpd.service"
+SYSTEMD_SERVICE_${PN}-isisd = "isisd.service"
+SYSTEMD_SERVICE_${PN}-ospf6d = "ospf6d.service"
+SYSTEMD_SERVICE_${PN}-ospfd = "ospfd.service"
+SYSTEMD_SERVICE_${PN}-ripd = "ripd.service"
+SYSTEMD_SERVICE_${PN}-ripngd = "ripngd.service"
+SYSTEMD_SERVICE_${PN} = "zebra.service"
EXTRA_OECONF = "--sysconfdir=${sysconfdir}/quagga \
--localstatedir=${localstatedir}/run/quagga \
@@ -108,6 +126,35 @@ do_install () {
fi
done
+ if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d /var/run/quagga 0755 quagga quagga -" \
+ > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
+ fi
+
+ # Remove sysinit script if sysvinit is not in DISTRO_FEATURES
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
+ rm -rf ${D}${sysconfdir}/init.d/
+ fi
+
+ install -d ${D}${systemd_unitdir}/system
+ for i in babeld bgpd isisd ospf6d ospfd ripd ripngd zebra; do
+ install -m 0644 ${WORKDIR}/$i.service ${D}${systemd_unitdir}/system
+ done
+ sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
+ -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@SBINDIR@,${sbindir},g' \
+ -i ${D}${systemd_unitdir}/system/*.service
+}
+
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-systemctl-native', '', d)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd sysvinit', 'true', 'false', d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask quagga.service
+ fi
}
# Split into a main package and separate per-protocol packages
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [meta-networking][PATCH 1/2] quagga: add subpkgs to RDEPENDS
2014-09-29 1:19 [meta-networking][PATCH 1/2] quagga: add subpkgs to RDEPENDS Chong Lu
2014-09-29 1:19 ` [meta-networking][PATCH 2/2] quagga: add systemd service file Chong Lu
@ 2014-09-29 5:51 ` Roman Khimov
2014-09-29 7:01 ` Chong Lu
1 sibling, 1 reply; 4+ messages in thread
From: Roman Khimov @ 2014-09-29 5:51 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 450 bytes --]
В письме от 29 сентября 2014 09:19:52 пользователь Chong Lu написал:
> +RDEPENDS_${PN} += "${PN}-babeld ${PN}-bgpd ${PN}-isisd ${PN}-ospf6d
> ${PN}-ospfd ${PN}-ripd ${PN}-ripngd" +
IMO the whole point of split daemon packaging was to be able to choose which
protocols you want and which you don't. So forcing an RDEPENDS is wrong if you
want to stay with per-daemon packages. I think RRECOMMENDS is better here.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 3778 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [meta-networking][PATCH 1/2] quagga: add subpkgs to RDEPENDS
2014-09-29 5:51 ` [meta-networking][PATCH 1/2] quagga: add subpkgs to RDEPENDS Roman Khimov
@ 2014-09-29 7:01 ` Chong Lu
0 siblings, 0 replies; 4+ messages in thread
From: Chong Lu @ 2014-09-29 7:01 UTC (permalink / raw)
To: openembedded-devel
On 09/29/2014 01:51 PM, Roman Khimov wrote:
> В письме от 29 сентября 2014 09:19:52 пользователь Chong Lu написал:
>> +RDEPENDS_${PN} += "${PN}-babeld ${PN}-bgpd ${PN}-isisd ${PN}-ospf6d
>> ${PN}-ospfd ${PN}-ripd ${PN}-ripngd" +
> IMO the whole point of split daemon packaging was to be able to choose which
> protocols you want and which you don't. So forcing an RDEPENDS is wrong if you
> want to stay with per-daemon packages. I think RRECOMMENDS is better here.
OK. Thanks. I will resend a V2.
Best Regards
Chong
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-29 7:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29 1:19 [meta-networking][PATCH 1/2] quagga: add subpkgs to RDEPENDS Chong Lu
2014-09-29 1:19 ` [meta-networking][PATCH 2/2] quagga: add systemd service file Chong Lu
2014-09-29 5:51 ` [meta-networking][PATCH 1/2] quagga: add subpkgs to RDEPENDS Roman Khimov
2014-09-29 7:01 ` Chong Lu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.