From 4340aec870449889ae633d9c32555c48e722c87b Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Tue, 5 Jun 2018 19:28:09 -0400 Subject: [PATCH] Add ebuilds for ypbind. I have no idea why Gentoo thought this package was unmaintainable. --- net-nds/ypbind/Manifest | 9 +++ .../files/ypbind-1.38-avoid-autopoint.patch | 23 +++++++ ...pbind-1.38-fix-systemd-configuration.patch | 46 +++++++++++++ .../ypbind-1.38-flexible-bindingdir.patch | 24 +++++++ ...ypbind-2.4-fix-systemd-configuration.patch | 35 ++++++++++ net-nds/ypbind/files/ypbind.initd | 26 ++++++++ net-nds/ypbind/ypbind-1.38.ebuild | 65 +++++++++++++++++++ net-nds/ypbind/ypbind-2.4.ebuild | 63 ++++++++++++++++++ 8 files changed, 291 insertions(+) create mode 100644 net-nds/ypbind/Manifest create mode 100644 net-nds/ypbind/files/ypbind-1.38-avoid-autopoint.patch create mode 100644 net-nds/ypbind/files/ypbind-1.38-fix-systemd-configuration.patch create mode 100644 net-nds/ypbind/files/ypbind-1.38-flexible-bindingdir.patch create mode 100644 net-nds/ypbind/files/ypbind-2.4-fix-systemd-configuration.patch create mode 100644 net-nds/ypbind/files/ypbind.initd create mode 100644 net-nds/ypbind/ypbind-1.38.ebuild create mode 100644 net-nds/ypbind/ypbind-2.4.ebuild diff --git a/net-nds/ypbind/Manifest b/net-nds/ypbind/Manifest new file mode 100644 index 0000000..53e6b2f --- /dev/null +++ b/net-nds/ypbind/Manifest @@ -0,0 +1,9 @@ +AUX ypbind-1.38-avoid-autopoint.patch 667 BLAKE2B 7f81fc4840a461afca4dc66b27d7e1a3e50b247d4095d53094edfb30934f8d49d956156ca9717bd647e9387d6070c14ae5cfcef9332ff7adf2a0bf0a23488cab SHA512 897f6be5d942369c81bc71df28155bfd6ef9c94afab02221b90c72615b6c44595063b47a1b865cf3a09baa5b7425a03893ed306ec248d31e63ecdfb17e0fc188 +AUX ypbind-1.38-fix-systemd-configuration.patch 1418 BLAKE2B 2b6eae7a36cec34e87450d3e5980209197b8c4e0202a3c5a967c936c2bc3486d04a2eeee2cc59f38a052261ac2d6497a602ed26d3722fe262593d18b9cbd72b8 SHA512 f45998f4b3fb3cd72a97cfb5f67824e2fc0c365d10ebd9583230363fe18a6ea10e9e3be9e5f789abd19ea6f30a0b0b2611ea1b66980cf455b2819367248e6944 +AUX ypbind-1.38-flexible-bindingdir.patch 474 BLAKE2B ffb24888aff994cb231c7151e1c0cd5bb5ab229e76b933426a908560e95b365ef418491c8293f5d57d963c6d27ce248baf29013cce91f461027c02aaa7ff5bf0 SHA512 19bcb479f2a7ad1e03d31c233cd71e6052a43ded712260eb62d1efaf6a804c93379a7a2699be779e0d7cd62846e8ef7ca990986be1e99bb6d74add4734a72d76 +AUX ypbind-2.4-fix-systemd-configuration.patch 1238 BLAKE2B 315afc4d68ed9a368f8f897d3bbe2e313e123f1003d0840235a3416f1f207dc23224bbaec3724e0cdd2b9c9f129edcd2477448d26d6bc1073b72a434096c2871 SHA512 04788d2a8f98c3d36c2aab2ecf4434baa17dfb904b13fcbbea5b902b6e6f828e5a6d38a527e4716c8ca6f68fe7589a61eda5ecc9cd52dbe4e224cb080515cede +AUX ypbind.initd 483 BLAKE2B df8aff4bab9101767008c03e9537791d73335677784e5f073ec1aead9dfeaaaa108f196b454f53688f04518fd8c7d42e5ef9233fc41620855656e3824289e71b SHA512 f2fffaca11ca6d268c02cde9f1e8531cdf3d824aa8afcafaa2213a19fe996dafa6a9d5379c486d0aced621577e4d7799afa83f13cfc45df1a30437e88dd4eaff +DIST ypbind-mt-1.38.tar.bz2 202314 BLAKE2B dc80a68477a2aebdc502dc0d4e02928c97ac2993d51ea1ac2cc204f6c1b1969224c51e68e782d719482cb4c211fc447b95b681bbc924db6f1794ff122ec30d24 SHA512 c0d592dba9cb3757f1baa3a1c62dc8c0741832f10cbf957814c11bf1491f7b81438d7873f13127dfcb6f1480c1bd8d709819d6f7379fd50cce2879bbc6763f7c +DIST ypbind-mt-2.4.tar.bz2 188275 BLAKE2B e51647d8646dee9286f4008affc08629d15ad0ed5fda2f70a863c76ee5be5e9c11cde07b55ba8d828b4129a1cf7513fbdb1e7b1eec3c19bed36b9afd5b496d6a SHA512 0a06af8b171912408ebca615af65736e3408f80c5355f09e87b9fca8186cee5a0d8d721c21c2c273cf1b5126c63c6264f7247956e7ecbcf55b670c61d739f2fd +EBUILD ypbind-1.38.ebuild 1463 BLAKE2B 02c9bab73c9754486f264c4fae29680fe2e95ee2eb72d9d0e7a73ae51ccd09a9c972d88b835e452f65aab2f89b161c1c2360d5851f07e63d43c37dd7d2d124d9 SHA512 5985c78c0b1fb582fbf6f4bc52dd760b68262153d4990a3ce417ae6c1dce102ef0a87f4f8122a781084785784b6487890d052724c68b35b3df06659bb4f0c7d3 +EBUILD ypbind-2.4.ebuild 1373 BLAKE2B cad9eb4201d127760d7355d5678642f318bedf506c0afe616e747b441ebfd9dfb703a9933b8e50a92815557f24aa6cf778f5e267c3978e5e61f469269e0dfee2 SHA512 0cb4667a561dcf7e49f22b68b8ec20b39e1511c2096af8072612093227cbcb3cd404ab73654886445e2ec495bcebbf9b9a05173f8287c2698615da6e3ee5b1a9 diff --git a/net-nds/ypbind/files/ypbind-1.38-avoid-autopoint.patch b/net-nds/ypbind/files/ypbind-1.38-avoid-autopoint.patch new file mode 100644 index 0000000..9e7796f --- /dev/null +++ b/net-nds/ypbind/files/ypbind-1.38-avoid-autopoint.patch @@ -0,0 +1,23 @@ +From 2c9a2e9b470477b4a02878406c4aa6f0d6c842ec Mon Sep 17 00:00:00 2001 +From: Nick Bowler + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 6d909ce861fb..665db23c151d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -112,7 +112,7 @@ JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpage + AM_CONDITIONAL(ENABLE_REGENERATE_MAN, test x$enable_man != xno) + + dnl internationalization macros +-AM_GNU_GETTEXT_VERSION ++m4_traceoff([AM_GNU_GETTEXT]) + AM_GNU_GETTEXT([external]) + + dnl By default, don't send a ping to all server at the same time +-- +2.16.4 + diff --git a/net-nds/ypbind/files/ypbind-1.38-fix-systemd-configuration.patch b/net-nds/ypbind/files/ypbind-1.38-fix-systemd-configuration.patch new file mode 100644 index 0000000..089c557 --- /dev/null +++ b/net-nds/ypbind/files/ypbind-1.38-fix-systemd-configuration.patch @@ -0,0 +1,46 @@ +From 2b4c5d43eaf14b93f2cf0fc7959926606f811f37 Mon Sep 17 00:00:00 2001 +From: Nick Bowler + +--- + configure.ac | 11 +++++++++-- + src/ypbind-mt.c | 2 +- + 2 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 47ff5db30a54..6d909ce861fb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -44,8 +44,15 @@ AC_CHECK_LIB(nsl, yp_get_default_domain) + AC_CHECK_LIB(socket, bind) + AC_CHECK_LIB(pthread, pthread_create) + +-PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0]) +-AC_SUBST(USE_SD_NOTIFY) ++AC_ARG_WITH([systemd], [AS_HELP_STRING([--with-systemd], [build against libsystemd])]) ++ ++USE_SD_NOTIFY=0 ++AS_IF([test x"$with_systemd" != x"no"], ++ [PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], ++ [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0])]) ++AS_IF([test x"$with_systemd" = x"yes" && test x"$USE_SD_NOTIFY" = x"0"], ++ [AC_MSG_ERROR([systemd requested but libsystemd not found])]) ++AC_SUBST([USE_SD_NOTIFY]) + + AC_ARG_ENABLE([dbus-nm], + AC_HELP_STRING([--enable-dbus-nm],[Enable DBUS/NetworkManager support]), +diff --git a/src/ypbind-mt.c b/src/ypbind-mt.c +index 2012eb8e8642..79f25eb3ea22 100644 +--- a/src/ypbind-mt.c ++++ b/src/ypbind-mt.c +@@ -49,7 +49,7 @@ + #if defined(HAVE_NSS_H) + #include + #endif +-#if defined(HAVE_SYSTEMD_SD_DAEMON_H) ++#if USE_SD_NOTIFY + #include + #endif + +-- +2.16.4 + diff --git a/net-nds/ypbind/files/ypbind-1.38-flexible-bindingdir.patch b/net-nds/ypbind/files/ypbind-1.38-flexible-bindingdir.patch new file mode 100644 index 0000000..c21a3af --- /dev/null +++ b/net-nds/ypbind/files/ypbind-1.38-flexible-bindingdir.patch @@ -0,0 +1,24 @@ +From 3c58ce7fbca6cbd9934015a32ca4ddf918c1186f Mon Sep 17 00:00:00 2001 +From: Nick Bowler + +--- + src/local.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/local.h b/src/local.h +index 29db8505b1e8..74528d0d8e01 100644 +--- a/src/local.h ++++ b/src/local.h +@@ -1,7 +1,9 @@ + #ifndef _LOCAL_H + #define _LOCAL_H 1 + ++#ifndef BINDINGDIR + #define BINDINGDIR "/var/yp/binding" ++#endif + + extern int broken_server; + extern int ping_interval; +-- +2.16.4 + diff --git a/net-nds/ypbind/files/ypbind-2.4-fix-systemd-configuration.patch b/net-nds/ypbind/files/ypbind-2.4-fix-systemd-configuration.patch new file mode 100644 index 0000000..46bce77 --- /dev/null +++ b/net-nds/ypbind/files/ypbind-2.4-fix-systemd-configuration.patch @@ -0,0 +1,35 @@ +From e6c29b08a141cb6c8967b6cdfc9283b6aef9dda7 Mon Sep 17 00:00:00 2001 +From: Nick Bowler + +--- + configure.ac | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2856c5e8f854..69d97dae0577 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -24,9 +24,17 @@ dnl Checks for libraries. + dnl AC_CHECK_LIB(nsl, yp_get_default_domain) + AC_CHECK_LIB(pthread, pthread_create) + +-PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0]) +-AC_SUBST(USE_SD_NOTIFY) +-#PKG_CHECK_MODULES([NSL], [libnsl], [], [AC_CHECK_LIB([nsl],[yp_match],[LIBNSL_LIBS="-lnsl"],[LIBNSL_LIBS=""])]) ++AC_ARG_WITH([systemd], ++ [AS_HELP_STRING([--with-systemd], [build against libsystemd])]) ++ ++USE_SD_NOTIFY=0 ++AS_IF([test x"$with_systemd" != x"no"], ++ [PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], ++ [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0])]) ++AS_IF([test x"$with_systemd" = x"yes" && test x"$USE_SD_NOTIFY" = x"0"], ++ [AC_MSG_ERROR([systemd requested but libsystemd not found])]) ++AC_SUBST([USE_SD_NOTIFY]) ++ + PKG_CHECK_MODULES([NSL], [libnsl]) + PKG_CHECK_MODULES([TIRPC], [libtirpc], [], [TIRPC_LIBS=""]) + if test -n "$TIRPC_LIBS"; then +-- +2.16.4 + diff --git a/net-nds/ypbind/files/ypbind.initd b/net-nds/ypbind/files/ypbind.initd new file mode 100644 index 0000000..860bbf2 --- /dev/null +++ b/net-nds/ypbind/files/ypbind.initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# +# Copyright © 2018 Nick Bowler +# License GPLv3+: GNU General Public License version 3 or later. +# There is NO WARRANTY, to the extent permitted by law. + +prefix=/ +command=/usr/sbin/ypbind +pidfile=${prefix%/}/run/ypbind.pid + +depend() { + need net portmap +} + +start_post() { + for i in a b c d e; do + ypwhich >/dev/null 2>/dev/null && return + sleep 1 + done + + ewarn "timeout waiting for NIS binding" +} + +stop_post() { + rm -f "${prefix%/}"/var/yp/binding/* +} diff --git a/net-nds/ypbind/ypbind-1.38.ebuild b/net-nds/ypbind/ypbind-1.38.ebuild new file mode 100644 index 0000000..7964195 --- /dev/null +++ b/net-nds/ypbind/ypbind-1.38.ebuild @@ -0,0 +1,65 @@ +# Copyright © 2018 Nick Bowler +# License GPLv3+: GNU General Public License version 3 or later. +# There is NO WARRANTY, to the extent permitted by law. + +EAPI=6 + +inherit autotools + +MY_PN=ypbind-mt +MY_P=$MY_PN-$PV + +DESCRIPTION="NIS binding service (ypbind-mt)" +HOMEPAGE="https://www.thkukuk.de/nis/nis/ypbind-mt/" +SRC_URI="http://www.thkukuk.de/nis/download/$MY_PN/$MY_P.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="dbus nls slp systemd" + +LIBDEPEND="slp? ( net-libs/openslp ) + dbus? ( dev-libs/dbus-glib ) + systemd? ( sys-apps/systemd:= )" +DEPEND="virtual/pkgconfig + ypbind.initd <ypbind.initd <