From 5f26b009643d8a1a73aecb3aa0b7c5873943e7a1 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Sat, 13 Apr 2013 13:49:05 +0200 Subject: yp-tools, ypbind-mt: move systemd support from meta-systemd back to meta-networking Signed-off-by: Martin Jansa --- .../nis/yp-tools/domainname.service | 12 +++++++++++ .../recipes-support/nis/yp-tools_2.12.bb | 18 +++++++++++++++-- .../recipes-support/nis/ypbind-mt/ypbind.service | 14 +++++++++++++ .../recipes-support/nis/ypbind-mt_1.36.bb | 23 +++++++++++++++++----- .../recipes-support/nis/files/domainname.service | 12 ----------- .../recipes-support/nis/files/ypbind.service | 14 ------------- .../recipes-support/nis/yp-tools_2.12.bbappend | 19 ------------------ .../recipes-support/nis/ypbind-mt_1.36.bbappend | 17 ---------------- 8 files changed, 60 insertions(+), 69 deletions(-) create mode 100644 meta-networking/recipes-support/nis/yp-tools/domainname.service create mode 100644 meta-networking/recipes-support/nis/ypbind-mt/ypbind.service delete mode 100644 meta-systemd/meta-networking/recipes-support/nis/files/domainname.service delete mode 100644 meta-systemd/meta-networking/recipes-support/nis/files/ypbind.service delete mode 100644 meta-systemd/meta-networking/recipes-support/nis/yp-tools_2.12.bbappend delete mode 100644 meta-systemd/meta-networking/recipes-support/nis/ypbind-mt_1.36.bbappend diff --git a/meta-networking/recipes-support/nis/yp-tools/domainname.service b/meta-networking/recipes-support/nis/yp-tools/domainname.service new file mode 100644 index 0000000000..21aa92cb36 --- /dev/null +++ b/meta-networking/recipes-support/nis/yp-tools/domainname.service @@ -0,0 +1,12 @@ +[Unit] +Description=NIS Domainname + +[Service] +Type=oneshot +EnvironmentFile=/etc/nisdomainname +ExecStart=/usr/bin/domainname $NISDOMAINNAME +RemainAfterExit=true + +[Install] +WantedBy=multi-user.target + diff --git a/meta-networking/recipes-support/nis/yp-tools_2.12.bb b/meta-networking/recipes-support/nis/yp-tools_2.12.bb index fb7ebc2308..8593c6ba43 100644 --- a/meta-networking/recipes-support/nis/yp-tools_2.12.bb +++ b/meta-networking/recipes-support/nis/yp-tools_2.12.bb @@ -1,7 +1,7 @@ # This package builds tools to manage NIS # The source package is utils/net/NIS/yp-tools # -PR = "r0" +PR = "r3" DESCRIPTION="\ Network Information Service tools. \ This package contains ypcat, ypmatch, ypset, \ @@ -9,9 +9,23 @@ ypwhich, yppasswd, domainname, nisdomainname \ and ypdomainname." require nis.inc -SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2" +SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \ + file://domainname.service \ +" SRC_URI[md5sum] = "ce1e06d86caa285fa8cd76fdf103f51e" SRC_URI[sha256sum] = "6ae8321666eea7837da343eea90ea30273fb74943ad111d5a4befd2afb252063" CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true" + +inherit systemd + +RPROVIDES_${PN} += "${PN}-systemd" +RREPLACES_${PN} += "${PN}-systemd" +RCONFLICTS_${PN} += "${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "domainname.service" + +do_install_append() { + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system +} diff --git a/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service b/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service new file mode 100644 index 0000000000..1f8df42af5 --- /dev/null +++ b/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service @@ -0,0 +1,14 @@ +[Unit] +Description=YP Bind +Requires=domainname.service +After=domainname.service network.target +Before=systemd-user-sessions.service + +[Service] +Type=forking +PIDFile=/var/run/ypbind.pid +ExecStart=/usr/sbin/ypbind + +[Install] +WantedBy=multi-user.target + diff --git a/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb b/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb index e2f654c61d..35ef16a89a 100644 --- a/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb +++ b/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb @@ -1,7 +1,7 @@ # This package builds the NIS ypbind daemon # The source package is utils/net/NIS/ypbind-mt # -PR = "r0" +PR = "r3" DESCRIPTION="\ Multithreaded NIS bind service (ypbind-mt). \ ypbind-mt is a complete new implementation of a NIS \ @@ -16,10 +16,13 @@ HOMEPAGE="http://www.linux-nis.org/nis/ypbind-mt/index.html" require nis.inc -SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2" -SRC_URI[md5sum] = "135834db97d78ff6d79fdee2810b4056" - LIC_FILES_CHKSUM = "file://COPYING;md5=082c9a0886c7c3db1bc862b5b62ffe08" + +SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \ + file://ypbind-yocto.init \ + file://ypbind.service \ +" +SRC_URI[md5sum] = "135834db97d78ff6d79fdee2810b4056" SRC_URI[sha256sum] = "0eff76c1849f4b38ea1a60280d8397c4240369c641fe5402ce57edf1a90958c7" # ypbind-mt now provides all the functionality of ypbind @@ -27,7 +30,6 @@ SRC_URI[sha256sum] = "0eff76c1849f4b38ea1a60280d8397c4240369c641fe5402ce57edf1a9 PROVIDES += "ypbind" CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true" -SRC_URI += "file://ypbind-yocto.init" do_install_append () { install -d ${D}${sysconfdir}/init.d @@ -35,5 +37,16 @@ do_install_append () { install -m 0755 ${WORKDIR}/ypbind-yocto.init ${D}${sysconfdir}/init.d/ypbind + # TODO, use update-rc.d ln -s ../init.d/ypbind ${D}${sysconfdir}/rcS.d/S44ypbind + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system } + +inherit systemd + +RPROVIDES_${PN} += "${PN}-systemd" +RREPLACES_${PN} += "${PN}-systemd" +RCONFLICTS_${PN} += "${PN}-systemd" +SYSTEMD_SERVICE_${PN} = "ypbind.service" diff --git a/meta-systemd/meta-networking/recipes-support/nis/files/domainname.service b/meta-systemd/meta-networking/recipes-support/nis/files/domainname.service deleted file mode 100644 index 21aa92cb36..0000000000 --- a/meta-systemd/meta-networking/recipes-support/nis/files/domainname.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=NIS Domainname - -[Service] -Type=oneshot -EnvironmentFile=/etc/nisdomainname -ExecStart=/usr/bin/domainname $NISDOMAINNAME -RemainAfterExit=true - -[Install] -WantedBy=multi-user.target - diff --git a/meta-systemd/meta-networking/recipes-support/nis/files/ypbind.service b/meta-systemd/meta-networking/recipes-support/nis/files/ypbind.service deleted file mode 100644 index 1f8df42af5..0000000000 --- a/meta-systemd/meta-networking/recipes-support/nis/files/ypbind.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=YP Bind -Requires=domainname.service -After=domainname.service network.target -Before=systemd-user-sessions.service - -[Service] -Type=forking -PIDFile=/var/run/ypbind.pid -ExecStart=/usr/sbin/ypbind - -[Install] -WantedBy=multi-user.target - diff --git a/meta-systemd/meta-networking/recipes-support/nis/yp-tools_2.12.bbappend b/meta-systemd/meta-networking/recipes-support/nis/yp-tools_2.12.bbappend deleted file mode 100644 index d5ea1ca0b6..0000000000 --- a/meta-systemd/meta-networking/recipes-support/nis/yp-tools_2.12.bbappend +++ /dev/null @@ -1,19 +0,0 @@ -inherit systemd - -PRINC := "${@int(PRINC) + 2}" - -# look for files in the layer first -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI += "file://domainname.service" - -RPROVIDES_${PN} += "${PN}-systemd" -RREPLACES_${PN} += "${PN}-systemd" -RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "domainname.service" - -do_install_append() { - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system -} - diff --git a/meta-systemd/meta-networking/recipes-support/nis/ypbind-mt_1.36.bbappend b/meta-systemd/meta-networking/recipes-support/nis/ypbind-mt_1.36.bbappend deleted file mode 100644 index 8f11247a0f..0000000000 --- a/meta-systemd/meta-networking/recipes-support/nis/ypbind-mt_1.36.bbappend +++ /dev/null @@ -1,17 +0,0 @@ -inherit systemd - -PRINC := "${@int(PRINC) + 2}" - -# look for files in the layer first -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI += "file://ypbind.service" - -RPROVIDES_${PN} += "${PN}-systemd" -RREPLACES_${PN} += "${PN}-systemd" -RCONFLICTS_${PN} += "${PN}-systemd" -SYSTEMD_SERVICE_${PN} = "ypbind.service" -do_install_append() { - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system -} -- cgit v1.2.3-54-g00ecf