From dda0c7cb2caa520d7b2c8068b91b8c5dbc7ca80f Mon Sep 17 00:00:00 2001 From: root Date: Mon, 1 Jun 2026 00:02:27 -0500 Subject: Adding metadata --- net-libs/pjproject/Manifest | 5 +- .../files/pjproject-2.13.1-r1-config_site.h | 86 +++++ net-libs/pjproject/metadata.xml | 2 +- net-libs/pjproject/pjproject-2.14.1.ebuild | 122 ------ net-libs/pjproject/pjproject-2.15.1.ebuild | 122 ------ net-libs/pjproject/pjproject-2.15.ebuild | 122 ------ net-libs/pjproject/pjproject-2.16.ebuild | 140 +++++++ net-libs/pjproject/pjproject-2.17.ebuild | 140 +++++++ net-misc/dhcp/Manifest | 2 +- net-misc/dhcp/dhcp-4.4.3.ebuild | 270 ------------- net-misc/dhcp/dhcp-4.4.3_p1-r6.ebuild | 305 +++++++++++++++ net-misc/dhcp/dhcp-4.4.3_p1.ebuild | 297 --------------- net-misc/dhcp/files/dhclient.init | 16 - net-misc/dhcp/files/dhcp-3.0-fix-perms.patch | 15 - .../files/dhcp-4.2.2-dhclient-stdin-conf.patch | 113 ------ .../dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch | 19 - .../files/dhcp-4.3.3-ldap-ipv6-client-id.patch | 81 ---- net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch | 210 ---------- .../files/dhcp-4.3.6-dhclient-resolvconf.patch | 422 --------------------- net-misc/dhcp/files/dhcp-4.3.6-iproute2-path.patch | 11 - net-misc/dhcp/files/dhcp-4.3.6-nogateway.patch | 66 ---- net-misc/dhcp/files/dhcp-4.3.6-quieter-ping.patch | 66 ---- .../dhcp/files/dhcp-4.4.0-always-accept-4.patch | 29 -- net-misc/dhcp/files/dhcp-4.4.0-bind-disable.patch | 22 -- net-misc/dhcp/files/dhcp-4.4.2-fno-common.patch | 34 -- net-misc/dhcp/files/dhcp-4.4.2-variable-name.patch | 25 -- .../dhcp/files/dhcp-4.4.3-always-accept-4.patch | 29 ++ .../dhcp/files/dhcp-4.4.3-bindtodevice-inet6.patch | 18 + .../dhcp/files/dhcp-4.4.3-configure-clang16.patch | 143 +++++++ net-misc/dhcp/files/dhcp-4.4.3-dhclient-ntp.patch | 210 ++++++++++ .../files/dhcp-4.4.3-dhclient-resolvconf.patch | 422 +++++++++++++++++++++ .../files/dhcp-4.4.3-dhclient-stdin-conf.patch | 113 ++++++ net-misc/dhcp/files/dhcp-4.4.3-fix-perms.patch | 15 + net-misc/dhcp/files/dhcp-4.4.3-iproute2-path.patch | 11 + .../files/dhcp-4.4.3-ldap-ipv6-client-id.patch | 81 ++++ net-misc/dhcp/files/dhcp-4.4.3-nogateway.patch | 66 ++++ net-misc/dhcp/files/dhcp-4.4.3-quieter-ping.patch | 66 ++++ net-misc/dhcp/files/dhcp.tmpfiles | 2 + net-misc/dhcp/files/dhcpd.conf2 | 4 +- net-misc/dhcp/files/dhcpd.init5 | 7 +- net-misc/dhcp/files/dhcpd.tmpfiles | 2 - net-misc/dhcp/metadata.xml | 31 +- sys-apps/hexyl/hexyl-0.17.0.ebuild | 26 +- sys-apps/hexyl/metadata.xml | 16 +- sys-apps/shadow/Manifest | 4 +- sys-apps/shadow/metadata.xml | 2 +- sys-apps/shadow/shadow-4.17.4.ebuild | 262 ------------- sys-apps/shadow/shadow-4.18.0.ebuild | 262 ------------- sys-apps/shadow/shadow-4.19.3.ebuild | 264 +++++++++++++ sys-apps/shadow/shadow-4.19.4.ebuild | 264 +++++++++++++ sys-apps/sysvinit/Manifest | 4 +- .../files/sysvinit-2.94_beta-shutdown-single.patch | 39 -- sys-apps/sysvinit/metadata.xml | 2 +- sys-apps/sysvinit/sysvinit-3.13.ebuild | 190 ---------- sys-apps/sysvinit/sysvinit-3.14.ebuild | 190 ---------- sys-apps/sysvinit/sysvinit-3.16.ebuild | 190 ++++++++++ sys-apps/sysvinit/sysvinit-3.18.ebuild | 190 ++++++++++ virtual/libudev/libudev-232-r8.ebuild | 20 - virtual/libudev/libudev-251-r1.ebuild | 23 -- virtual/libudev/libudev-251-r2.ebuild | 17 + virtual/libudev/metadata.xml | 25 +- virtual/service-manager/metadata.xml | 19 +- virtual/service-manager/service-manager-0.ebuild | 19 - virtual/service-manager/service-manager-1.ebuild | 10 - .../service-manager/service-manager-2-r1.ebuild | 24 ++ virtual/service-manager/service-manager-2.ebuild | 24 ++ 66 files changed, 2875 insertions(+), 3173 deletions(-) create mode 100644 net-libs/pjproject/files/pjproject-2.13.1-r1-config_site.h delete mode 100644 net-libs/pjproject/pjproject-2.14.1.ebuild delete mode 100644 net-libs/pjproject/pjproject-2.15.1.ebuild delete mode 100644 net-libs/pjproject/pjproject-2.15.ebuild create mode 100644 net-libs/pjproject/pjproject-2.16.ebuild create mode 100644 net-libs/pjproject/pjproject-2.17.ebuild delete mode 100644 net-misc/dhcp/dhcp-4.4.3.ebuild create mode 100644 net-misc/dhcp/dhcp-4.4.3_p1-r6.ebuild delete mode 100644 net-misc/dhcp/dhcp-4.4.3_p1.ebuild delete mode 100644 net-misc/dhcp/files/dhclient.init delete mode 100644 net-misc/dhcp/files/dhcp-3.0-fix-perms.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.2.2-dhclient-stdin-conf.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.3.3-ldap-ipv6-client-id.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.3.6-dhclient-resolvconf.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.3.6-iproute2-path.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.3.6-nogateway.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.3.6-quieter-ping.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.4.0-always-accept-4.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.4.0-bind-disable.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.4.2-fno-common.patch delete mode 100644 net-misc/dhcp/files/dhcp-4.4.2-variable-name.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.3-always-accept-4.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.3-bindtodevice-inet6.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.3-configure-clang16.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.3-dhclient-ntp.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.3-dhclient-resolvconf.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.3-dhclient-stdin-conf.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.3-fix-perms.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.3-iproute2-path.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.3-ldap-ipv6-client-id.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.3-nogateway.patch create mode 100644 net-misc/dhcp/files/dhcp-4.4.3-quieter-ping.patch create mode 100644 net-misc/dhcp/files/dhcp.tmpfiles delete mode 100644 net-misc/dhcp/files/dhcpd.tmpfiles delete mode 100644 sys-apps/shadow/shadow-4.17.4.ebuild delete mode 100644 sys-apps/shadow/shadow-4.18.0.ebuild create mode 100644 sys-apps/shadow/shadow-4.19.3.ebuild create mode 100644 sys-apps/shadow/shadow-4.19.4.ebuild delete mode 100644 sys-apps/sysvinit/files/sysvinit-2.94_beta-shutdown-single.patch delete mode 100644 sys-apps/sysvinit/sysvinit-3.13.ebuild delete mode 100644 sys-apps/sysvinit/sysvinit-3.14.ebuild create mode 100644 sys-apps/sysvinit/sysvinit-3.16.ebuild create mode 100644 sys-apps/sysvinit/sysvinit-3.18.ebuild delete mode 100644 virtual/libudev/libudev-232-r8.ebuild delete mode 100644 virtual/libudev/libudev-251-r1.ebuild create mode 100644 virtual/libudev/libudev-251-r2.ebuild delete mode 100644 virtual/service-manager/service-manager-0.ebuild delete mode 100644 virtual/service-manager/service-manager-1.ebuild create mode 100644 virtual/service-manager/service-manager-2-r1.ebuild create mode 100644 virtual/service-manager/service-manager-2.ebuild diff --git a/net-libs/pjproject/Manifest b/net-libs/pjproject/Manifest index da36a6ba8f25..15888ac6598b 100644 --- a/net-libs/pjproject/Manifest +++ b/net-libs/pjproject/Manifest @@ -1,3 +1,2 @@ -DIST pjproject-2.14.1.tar.gz 10322231 BLAKE2B c692de30d08958a93d1ba67d92a95e62c8e7f7cd7ff45baf111bc05fa82850aba85a04e354c0adaf562700796b6c7186b14295bd9311b914a8cc27fbdb9ce9d3 SHA512 fd026af39e588f9646af1cfed176dadb4c9675943499c18866175f732630003965913960108efde192e4dc7968838850a4b3f5a31981482ae7b41497f5b58b97 -DIST pjproject-2.15.1.tar.gz 10425868 BLAKE2B cb4fdeca8559460f5335ffa7723e58fea3cb3f81cb55170ab7694b7828e3179c39c0fc376bebed566a212ec2b102349fc78593e414cb03864e4b111cdbf8b77c SHA512 2f83ed32f16c27808d3b9cc8f3b364c68fe88caae9765012b385a0fea70ba8ef4dcfebe3b130156047546720351a527e17d6a1e967877d6a44a6ff3a1f695599 -DIST pjproject-2.15.tar.gz 10426653 BLAKE2B e8b691e9e0f3add7b58c23bf4d0e9153fc5de6f30cd8b3cdf2cdb371828094d96bbaa848ec037ec705d67e74b89f22327dd4642d608a7c6c3c8c9c248a97864f SHA512 61757e3493d0ebc68a6254f256605f1108b757f01a47c70eb810bc55db1866947c3a78f787081d68131e62c48b7b79e40806ee17d6b25dcf50b072d7bd336e12 +DIST pjproject-2.16.tar.gz 10794360 BLAKE2B 1c0a8ee1911bde22581d04b57b2eab5ececb1cf35625be18cdea326304eb87e0d4bc66c51c1c43e92f32aaed619d4a27de32a85ccb8e2abd14848e6cbd51fc0c SHA512 c6f08ea07abeee3a39675d3985bdbf390e0e95fa6051533a3e7d289c191a3fd40208d69e3e46d702bce6d8837abe9329f39faaa11b716406e929af2d03ee7989 +DIST pjproject-2.17.tar.gz 10996639 BLAKE2B 36f36ef6a1c02a28da51f558a114e35f54dad0854b950b4f083d5b5ce82cce488358833d5fd492a73cdcd8a96726345d42cd7ae2ac20bd53944ecf28f37ec8a4 SHA512 1c5b950c01ee013a48ae4a0f6e6a630d14bf68e515d59f971ee1dfe5fec90c5d8719e6cc819159149231445d17d1df01a24ef987d94336ddd754527c4e1fc8b5 diff --git a/net-libs/pjproject/files/pjproject-2.13.1-r1-config_site.h b/net-libs/pjproject/files/pjproject-2.13.1-r1-config_site.h new file mode 100644 index 000000000000..c2dd59149e9f --- /dev/null +++ b/net-libs/pjproject/files/pjproject-2.13.1-r1-config_site.h @@ -0,0 +1,86 @@ +/* + * Based off of the Asterisk config_site.h file. + * + * In general it's the same with some removals due to being ebuild-managed. + */ + +#include + +#define GENTOO_INVALID (Gentoo compile failure - please report a bug on bugs.gentoo.org) + +/* asterisk_malloc_debug.h is not required ... most of the operations are no-ops regardless + * and I can't see why asterisk is looking to compile this directly into pjproject */ + +/* Ability to change this has ABI implications, force it on */ +/* Can be reconsidered in future: https://bugs.gentoo.org/680496 */ +#define PJ_HAS_IPV6 1 + +#define PJ_MAX_HOSTNAME (256) +#define PJSIP_MAX_URL_SIZE (512) +#ifdef PJ_HAS_LINUX_EPOLL +#define PJ_IOQUEUE_MAX_HANDLES (5000) +#else +#define PJ_IOQUEUE_MAX_HANDLES (FD_SETSIZE) +#endif +#define PJ_IOQUEUE_HAS_SAFE_UNREG 1 +#define PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL (16) + +#define PJ_SCANNER_USE_BITWISE 0 +#define PJ_OS_HAS_CHECK_STACK 0 + +#ifndef PJ_LOG_MAX_LEVEL +#define PJ_LOG_MAX_LEVEL 6 +#endif + +#define PJ_ENABLE_EXTRA_CHECK 1 +#define PJSIP_MAX_TSX_COUNT ((64*1024)-1) +#define PJSIP_MAX_DIALOG_COUNT ((64*1024)-1) +#define PJSIP_UDP_SO_SNDBUF_SIZE (512*1024) +#define PJSIP_UDP_SO_RCVBUF_SIZE (512*1024) +#define PJ_DEBUG 0 +#define PJSIP_SAFE_MODULE 0 +#define PJ_HAS_STRICMP_ALNUM 0 + +/* + * Do not ever enable PJ_HASH_USE_OWN_TOLOWER because the algorithm is + * inconsistently used when calculating the hash value and doesn't + * convert the same characters as pj_tolower()/tolower(). Thus you + * can get different hash values if the string hashed has certain + * characters in it. (ASCII '@', '[', '\\', ']', '^', and '_') + */ +#undef PJ_HASH_USE_OWN_TOLOWER + +/* + It is imperative that PJSIP_UNESCAPE_IN_PLACE remain 0 or undefined. + Enabling it will result in SEGFAULTS when URIs containing escape sequences are encountered. +*/ +#undef PJSIP_UNESCAPE_IN_PLACE +#define PJSIP_MAX_PKT_LEN 65535 + +#undef PJ_TODO +#define PJ_TODO(x) + +/* Defaults too low for WebRTC */ +#define PJ_ICE_MAX_CAND 64 +#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND) + +/* Increase limits to allow more formats */ +#define PJMEDIA_MAX_SDP_FMT 64 +#define PJMEDIA_MAX_SDP_BANDW 4 +#define PJMEDIA_MAX_SDP_ATTR (PJMEDIA_MAX_SDP_FMT*3 + 4) +#define PJMEDIA_MAX_SDP_MEDIA 16 + +/* + * Turn off the periodic sending of CRLNCRLN. Default is on (90 seconds), + * which conflicts with the global section's keep_alive_interval option in + * pjsip.conf. + */ +#define PJSIP_TCP_KEEP_ALIVE_INTERVAL 0 +#define PJSIP_TLS_KEEP_ALIVE_INTERVAL 0 + +#define PJSIP_TSX_UAS_CONTINUE_ON_TP_ERROR 0 +#define PJ_SSL_SOCK_OSSL_USE_THREAD_CB 0 +#define PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER 1 + +/* Required to enable things like USE=video. */ +#define PJMEDIA_HAS_VIDEO GENTOO_INVALID diff --git a/net-libs/pjproject/metadata.xml b/net-libs/pjproject/metadata.xml index c0c4d137603d..6e7ebbb51c51 100644 --- a/net-libs/pjproject/metadata.xml +++ b/net-libs/pjproject/metadata.xml @@ -28,5 +28,5 @@ Include Video4Linux v2 support in the build Enable WebRTC support - kit-fixups + ports \ No newline at end of file diff --git a/net-libs/pjproject/pjproject-2.14.1.ebuild b/net-libs/pjproject/pjproject-2.14.1.ebuild deleted file mode 100644 index 6ac78e571ba6..000000000000 --- a/net-libs/pjproject/pjproject-2.14.1.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 2020-2024 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -inherit autotools flag-o-matic toolchain-funcs - -DESCRIPTION="Open source SIP, Media, and NAT Traversal Library" -HOMEPAGE="https://www.pjsip.org/" -SRC_URI="https://github.com/pjsip/pjproject/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" - -LICENSE="GPL-2" -SLOT="0" - -# g729 not included due to special bcg729 handling. -CODEC_FLAGS="g711 g722 g7221 gsm ilbc speex l16" -VIDEO_FLAGS="sdl ffmpeg v4l2 openh264 libyuv vpx" -SOUND_FLAGS="alsa portaudio" -IUSE="amr debug epoll examples ipv6 libressl opus resample silk ssl static-libs webrtc - ${CODEC_FLAGS} g729 - ${VIDEO_FLAGS} - ${SOUND_FLAGS}" - -RDEPEND="net-libs/libsrtp:= - - alsa? ( media-libs/alsa-lib ) - amr? ( media-libs/opencore-amr ) - ffmpeg? ( media-video/ffmpeg:= ) - g729? ( media-libs/bcg729 ) - gsm? ( media-sound/gsm ) - ilbc? ( media-libs/libilbc ) - openh264? ( media-libs/openh264 ) - opus? ( media-libs/opus ) - portaudio? ( media-libs/portaudio ) - resample? ( media-libs/libsamplerate ) - sdl? ( media-libs/libsdl ) - speex? ( - media-libs/speex - media-libs/speexdsp - ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( >=dev-libs/libressl-3.5.0:0= ) - ) -" -DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig" - -src_prepare() { - default - rm configure || die "Unable to remove unwanted wrapper" - mv aconfigure.ac configure.ac || die "Unable to rename configure script source" - eautoreconf - - cp "${FILESDIR}/pjproject-2.9-config_site.h" "${S}/pjlib/include/pj/config_site.h" || die "Unable to create config_site.h" -} - -src_configure() { - local myconf=() - local videnable="--disable-video" - local t - - use debug || append-cflags -DNDEBUG=1 - use ipv6 && append-cflags -DPJ_HAS_IPV6=1 - append-cflags -DPJMEDIA_HAS_SRTP=1 - - for t in ${CODEC_FLAGS}; do - myconf+=( $(use_enable ${t} ${t}-codec) ) - done - myconf+=( $(use_enable g729 bcg729) ) - - for t in ${VIDEO_FLAGS}; do - myconf+=( $(use_enable ${t}) ) - use "${t}" && videnable="--enable-video" - done - - [ "${videnable}" = "--enable-video" ] && append-cflags -DPJMEDIA_HAS_VIDEO=1 - - LD="$(tc-getCC)" econf \ - --enable-shared \ - --with-external-srtp \ - ${videnable} \ - $(use_enable alsa sound) \ - $(use_enable amr opencore-amr) \ - $(use_enable epoll) \ - $(use_enable opus) \ - $(use_enable portaudio ext-sound) \ - $(use_enable resample libsamplerate) \ - $(use_enable resample resample-dll) \ - $(use_enable resample) \ - $(use_enable silk) \ - $(use_enable speex speex-aec) \ - $(use_enable ssl) \ - $(use_with gsm external-gsm) \ - $(use_with portaudio external-pa) \ - $(use_with speex external-speex) \ - $(usex webrtc '' --disable-libwebrtc) \ - "${myconf[@]}" -} - -src_compile() { - emake dep LD="$(tc-getCC)" - emake LD="$(tc-getCC)" -} - -src_install() { - default - - newbin pjsip-apps/bin/pjsua-${CHOST} pjsua - newbin pjsip-apps/bin/pjsystest-${CHOST} pjsystest - - dolib.so pjsip/lib/libpjsua2.so.2 - dosym libpjsua2.so.2 "/usr/$(get_libdir)/libpjsua2.so" - - if use examples; then - insinto "/usr/share/doc/${PF}/examples" - doins -r pjsip-apps/src/samples - fi - - use static-libs || rm "${ED}/usr/$(get_libdir)"/*.a || die "Error removing static archives" - fperms 0644 /usr/include/pj/config_site.h -} diff --git a/net-libs/pjproject/pjproject-2.15.1.ebuild b/net-libs/pjproject/pjproject-2.15.1.ebuild deleted file mode 100644 index 6ac78e571ba6..000000000000 --- a/net-libs/pjproject/pjproject-2.15.1.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 2020-2024 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -inherit autotools flag-o-matic toolchain-funcs - -DESCRIPTION="Open source SIP, Media, and NAT Traversal Library" -HOMEPAGE="https://www.pjsip.org/" -SRC_URI="https://github.com/pjsip/pjproject/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" - -LICENSE="GPL-2" -SLOT="0" - -# g729 not included due to special bcg729 handling. -CODEC_FLAGS="g711 g722 g7221 gsm ilbc speex l16" -VIDEO_FLAGS="sdl ffmpeg v4l2 openh264 libyuv vpx" -SOUND_FLAGS="alsa portaudio" -IUSE="amr debug epoll examples ipv6 libressl opus resample silk ssl static-libs webrtc - ${CODEC_FLAGS} g729 - ${VIDEO_FLAGS} - ${SOUND_FLAGS}" - -RDEPEND="net-libs/libsrtp:= - - alsa? ( media-libs/alsa-lib ) - amr? ( media-libs/opencore-amr ) - ffmpeg? ( media-video/ffmpeg:= ) - g729? ( media-libs/bcg729 ) - gsm? ( media-sound/gsm ) - ilbc? ( media-libs/libilbc ) - openh264? ( media-libs/openh264 ) - opus? ( media-libs/opus ) - portaudio? ( media-libs/portaudio ) - resample? ( media-libs/libsamplerate ) - sdl? ( media-libs/libsdl ) - speex? ( - media-libs/speex - media-libs/speexdsp - ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( >=dev-libs/libressl-3.5.0:0= ) - ) -" -DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig" - -src_prepare() { - default - rm configure || die "Unable to remove unwanted wrapper" - mv aconfigure.ac configure.ac || die "Unable to rename configure script source" - eautoreconf - - cp "${FILESDIR}/pjproject-2.9-config_site.h" "${S}/pjlib/include/pj/config_site.h" || die "Unable to create config_site.h" -} - -src_configure() { - local myconf=() - local videnable="--disable-video" - local t - - use debug || append-cflags -DNDEBUG=1 - use ipv6 && append-cflags -DPJ_HAS_IPV6=1 - append-cflags -DPJMEDIA_HAS_SRTP=1 - - for t in ${CODEC_FLAGS}; do - myconf+=( $(use_enable ${t} ${t}-codec) ) - done - myconf+=( $(use_enable g729 bcg729) ) - - for t in ${VIDEO_FLAGS}; do - myconf+=( $(use_enable ${t}) ) - use "${t}" && videnable="--enable-video" - done - - [ "${videnable}" = "--enable-video" ] && append-cflags -DPJMEDIA_HAS_VIDEO=1 - - LD="$(tc-getCC)" econf \ - --enable-shared \ - --with-external-srtp \ - ${videnable} \ - $(use_enable alsa sound) \ - $(use_enable amr opencore-amr) \ - $(use_enable epoll) \ - $(use_enable opus) \ - $(use_enable portaudio ext-sound) \ - $(use_enable resample libsamplerate) \ - $(use_enable resample resample-dll) \ - $(use_enable resample) \ - $(use_enable silk) \ - $(use_enable speex speex-aec) \ - $(use_enable ssl) \ - $(use_with gsm external-gsm) \ - $(use_with portaudio external-pa) \ - $(use_with speex external-speex) \ - $(usex webrtc '' --disable-libwebrtc) \ - "${myconf[@]}" -} - -src_compile() { - emake dep LD="$(tc-getCC)" - emake LD="$(tc-getCC)" -} - -src_install() { - default - - newbin pjsip-apps/bin/pjsua-${CHOST} pjsua - newbin pjsip-apps/bin/pjsystest-${CHOST} pjsystest - - dolib.so pjsip/lib/libpjsua2.so.2 - dosym libpjsua2.so.2 "/usr/$(get_libdir)/libpjsua2.so" - - if use examples; then - insinto "/usr/share/doc/${PF}/examples" - doins -r pjsip-apps/src/samples - fi - - use static-libs || rm "${ED}/usr/$(get_libdir)"/*.a || die "Error removing static archives" - fperms 0644 /usr/include/pj/config_site.h -} diff --git a/net-libs/pjproject/pjproject-2.15.ebuild b/net-libs/pjproject/pjproject-2.15.ebuild deleted file mode 100644 index 6ac78e571ba6..000000000000 --- a/net-libs/pjproject/pjproject-2.15.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 2020-2024 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -inherit autotools flag-o-matic toolchain-funcs - -DESCRIPTION="Open source SIP, Media, and NAT Traversal Library" -HOMEPAGE="https://www.pjsip.org/" -SRC_URI="https://github.com/pjsip/pjproject/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" - -LICENSE="GPL-2" -SLOT="0" - -# g729 not included due to special bcg729 handling. -CODEC_FLAGS="g711 g722 g7221 gsm ilbc speex l16" -VIDEO_FLAGS="sdl ffmpeg v4l2 openh264 libyuv vpx" -SOUND_FLAGS="alsa portaudio" -IUSE="amr debug epoll examples ipv6 libressl opus resample silk ssl static-libs webrtc - ${CODEC_FLAGS} g729 - ${VIDEO_FLAGS} - ${SOUND_FLAGS}" - -RDEPEND="net-libs/libsrtp:= - - alsa? ( media-libs/alsa-lib ) - amr? ( media-libs/opencore-amr ) - ffmpeg? ( media-video/ffmpeg:= ) - g729? ( media-libs/bcg729 ) - gsm? ( media-sound/gsm ) - ilbc? ( media-libs/libilbc ) - openh264? ( media-libs/openh264 ) - opus? ( media-libs/opus ) - portaudio? ( media-libs/portaudio ) - resample? ( media-libs/libsamplerate ) - sdl? ( media-libs/libsdl ) - speex? ( - media-libs/speex - media-libs/speexdsp - ) - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( >=dev-libs/libressl-3.5.0:0= ) - ) -" -DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig" - -src_prepare() { - default - rm configure || die "Unable to remove unwanted wrapper" - mv aconfigure.ac configure.ac || die "Unable to rename configure script source" - eautoreconf - - cp "${FILESDIR}/pjproject-2.9-config_site.h" "${S}/pjlib/include/pj/config_site.h" || die "Unable to create config_site.h" -} - -src_configure() { - local myconf=() - local videnable="--disable-video" - local t - - use debug || append-cflags -DNDEBUG=1 - use ipv6 && append-cflags -DPJ_HAS_IPV6=1 - append-cflags -DPJMEDIA_HAS_SRTP=1 - - for t in ${CODEC_FLAGS}; do - myconf+=( $(use_enable ${t} ${t}-codec) ) - done - myconf+=( $(use_enable g729 bcg729) ) - - for t in ${VIDEO_FLAGS}; do - myconf+=( $(use_enable ${t}) ) - use "${t}" && videnable="--enable-video" - done - - [ "${videnable}" = "--enable-video" ] && append-cflags -DPJMEDIA_HAS_VIDEO=1 - - LD="$(tc-getCC)" econf \ - --enable-shared \ - --with-external-srtp \ - ${videnable} \ - $(use_enable alsa sound) \ - $(use_enable amr opencore-amr) \ - $(use_enable epoll) \ - $(use_enable opus) \ - $(use_enable portaudio ext-sound) \ - $(use_enable resample libsamplerate) \ - $(use_enable resample resample-dll) \ - $(use_enable resample) \ - $(use_enable silk) \ - $(use_enable speex speex-aec) \ - $(use_enable ssl) \ - $(use_with gsm external-gsm) \ - $(use_with portaudio external-pa) \ - $(use_with speex external-speex) \ - $(usex webrtc '' --disable-libwebrtc) \ - "${myconf[@]}" -} - -src_compile() { - emake dep LD="$(tc-getCC)" - emake LD="$(tc-getCC)" -} - -src_install() { - default - - newbin pjsip-apps/bin/pjsua-${CHOST} pjsua - newbin pjsip-apps/bin/pjsystest-${CHOST} pjsystest - - dolib.so pjsip/lib/libpjsua2.so.2 - dosym libpjsua2.so.2 "/usr/$(get_libdir)/libpjsua2.so" - - if use examples; then - insinto "/usr/share/doc/${PF}/examples" - doins -r pjsip-apps/src/samples - fi - - use static-libs || rm "${ED}/usr/$(get_libdir)"/*.a || die "Error removing static archives" - fperms 0644 /usr/include/pj/config_site.h -} diff --git a/net-libs/pjproject/pjproject-2.16.ebuild b/net-libs/pjproject/pjproject-2.16.ebuild new file mode 100644 index 000000000000..57869b44355d --- /dev/null +++ b/net-libs/pjproject/pjproject-2.16.ebuild @@ -0,0 +1,140 @@ +# Copyright 2020-2024 Liguros Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +inherit autotools flag-o-matic toolchain-funcs + +DESCRIPTION="Open source SIP, Media, and NAT Traversal Library" +HOMEPAGE="https://www.pjsip.org/" +SRC_URI="https://github.com/pjsip/pjproject/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" + +LICENSE="GPL-2" +SLOT="0" + +# g729 not included due to special bcg729 handling. +CODEC_FLAGS="g711 g722 g7221 gsm ilbc speex l16" +VIDEO_FLAGS="sdl ffmpeg v4l2 openh264 libyuv vpx" +SOUND_FLAGS="alsa portaudio" +IUSE="amr debug epoll examples libressl opus resample silk srtp ssl static-libs webrtc + ${CODEC_FLAGS} g729 + ${VIDEO_FLAGS} + ${SOUND_FLAGS}" + +RDEPEND=" + sys-apps/util-linux + + alsa? ( media-libs/alsa-lib ) + amr? ( media-libs/opencore-amr ) + ffmpeg? ( media-video/ffmpeg:= ) + g729? ( media-libs/bcg729 ) + gsm? ( media-sound/gsm ) + ilbc? ( media-libs/libilbc ) + libyuv? ( media-libs/libyuv:= ) + openh264? ( media-libs/openh264 ) + opus? ( media-libs/opus ) + portaudio? ( media-libs/portaudio ) + resample? ( media-libs/libsamplerate ) + sdl? ( media-libs/libsdl ) + speex? ( + media-libs/speex + media-libs/speexdsp + ) + srtp? ( >=net-libs/libsrtp-2.3.0:= ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( >=dev-libs/libressl-3.5.0:0= ) + ) + vpx? ( media-libs/libvpx:= ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + rm configure || die "Unable to remove unwanted wrapper" + mv aconfigure.ac configure.ac || die "Unable to rename configure script source" + eautoreconf + + cp "${FILESDIR}/pjproject-2.13.1-r1-config_site.h" "${S}/pjlib/include/pj/config_site.h" || die "Unable to create config_site.h" +} + +_pj_enable() { + usex "$1" '' "--disable-${2:-$1}" +} + +_pj_get_define() { + local r="$(sed -nre "s/^#define[[:space:]]+$1[[:space:]]+//p" "${S}/pjlib/include/pj/config_site.h")" + [[ -z "${r}" ]] && die "Unable to fine #define $1 in config_site.h" + echo "$r" +} + +_pj_set_define() { + local c=$(_pj_get_define "$1") + [[ "$c" = "$2" ]] && return 0 + sed -re "s/^#define[[:space:]]+$1[[:space:]].*/#define $1 $2/" -i "${S}/pjlib/include/pj/config_site.h" \ + || die "sed failed updating $1 to $2." + [[ "$(_pj_get_define "$1")" != "$2" ]] && die "sed failed to perform update for $1 to $2." +} + +_pj_use_set_define() { + _pj_set_define "$2" $(usex "$1" 1 0) +} + +src_configure() { + local myconf=() + local videnable="--disable-video" + local t + + use debug || append-cflags -DNDEBUG=1 + + for t in ${CODEC_FLAGS}; do + myconf+=( $(use_enable ${t} ${t}-codec) ) + done + myconf+=( $(use_enable g729 bcg729) ) + + for t in ${VIDEO_FLAGS}; do + myconf+=( $(use_enable ${t}) ) + use "${t}" && videnable="--enable-video" + done + + [ "${videnable}" = "--enable-video" ] && _pj_set_define PJMEDIA_HAS_VIDEO 1 || _pj_set_define PJMEDIA_HAS_VIDEO 0 + + # bug 955077 and bug 955129 + use libyuv && myconf+=( --with-external-yuv ) + + LD="$(tc-getCXX)" econf \ + --enable-shared \ + ${videnable} \ + $(_pj_enable alsa sound) \ + $(_pj_enable amr opencore-amr) \ + $(_pj_enable epoll) \ + $(_pj_enable opus) \ + $(_pj_enable portaudio ext-sound) \ + $(_pj_enable resample libsamplerate) \ + $(_pj_enable resample resample-dll) \ + $(_pj_enable resample) \ + $(_pj_enable silk) \ + $(_pj_enable speex speex-aec) \ + $(_pj_enable ssl) \ + $(_pj_enable webrtc libwebrtc) \ + $(use_with gsm external-gsm) \ + $(use_with portaudio external-pa) \ + $(use_with speex external-speex) \ + $(usex srtp --with-external-srtp --disable-libsrtp) \ + "${myconf[@]}" +} + +src_install() { + default + + newbin pjsip-apps/bin/pjsua-${CHOST} pjsua + newbin pjsip-apps/bin/pjsystest-${CHOST} pjsystest + + if use examples; then + insinto "/usr/share/doc/${PF}/examples" + doins -r pjsip-apps/src/samples + fi + + use static-libs || rm "${ED}/usr/$(get_libdir)"/*.a || die "Error removing static archives" +} diff --git a/net-libs/pjproject/pjproject-2.17.ebuild b/net-libs/pjproject/pjproject-2.17.ebuild new file mode 100644 index 000000000000..b1a9cd4b8612 --- /dev/null +++ b/net-libs/pjproject/pjproject-2.17.ebuild @@ -0,0 +1,140 @@ +# Copyright 2020-2026 Liguros Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +inherit autotools flag-o-matic toolchain-funcs + +DESCRIPTION="Open source SIP, Media, and NAT Traversal Library" +HOMEPAGE="https://www.pjsip.org/" +SRC_URI="https://github.com/pjsip/pjproject/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" + +LICENSE="GPL-2" +SLOT="0" + +# g729 not included due to special bcg729 handling. +CODEC_FLAGS="g711 g722 g7221 gsm ilbc speex l16" +VIDEO_FLAGS="sdl ffmpeg v4l2 openh264 libyuv vpx" +SOUND_FLAGS="alsa portaudio" +IUSE="amr debug epoll examples libressl opus resample silk srtp ssl static-libs webrtc + ${CODEC_FLAGS} g729 + ${VIDEO_FLAGS} + ${SOUND_FLAGS}" + +RDEPEND=" + sys-apps/util-linux + + alsa? ( media-libs/alsa-lib ) + amr? ( media-libs/opencore-amr ) + ffmpeg? ( media-video/ffmpeg:= ) + g729? ( media-libs/bcg729 ) + gsm? ( media-sound/gsm ) + ilbc? ( media-libs/libilbc ) + libyuv? ( media-libs/libyuv:= ) + openh264? ( media-libs/openh264 ) + opus? ( media-libs/opus ) + portaudio? ( media-libs/portaudio ) + resample? ( media-libs/libsamplerate ) + sdl? ( media-libs/libsdl ) + speex? ( + media-libs/speex + media-libs/speexdsp + ) + srtp? ( >=net-libs/libsrtp-2.3.0:= ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( >=dev-libs/libressl-3.5.0:0= ) + ) + vpx? ( media-libs/libvpx:= ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + rm configure || die "Unable to remove unwanted wrapper" + mv aconfigure.ac configure.ac || die "Unable to rename configure script source" + eautoreconf + + cp "${FILESDIR}/pjproject-2.13.1-r1-config_site.h" "${S}/pjlib/include/pj/config_site.h" || die "Unable to create config_site.h" +} + +_pj_enable() { + usex "$1" '' "--disable-${2:-$1}" +} + +_pj_get_define() { + local r="$(sed -nre "s/^#define[[:space:]]+$1[[:space:]]+//p" "${S}/pjlib/include/pj/config_site.h")" + [[ -z "${r}" ]] && die "Unable to fine #define $1 in config_site.h" + echo "$r" +} + +_pj_set_define() { + local c=$(_pj_get_define "$1") + [[ "$c" = "$2" ]] && return 0 + sed -re "s/^#define[[:space:]]+$1[[:space:]].*/#define $1 $2/" -i "${S}/pjlib/include/pj/config_site.h" \ + || die "sed failed updating $1 to $2." + [[ "$(_pj_get_define "$1")" != "$2" ]] && die "sed failed to perform update for $1 to $2." +} + +_pj_use_set_define() { + _pj_set_define "$2" $(usex "$1" 1 0) +} + +src_configure() { + local myconf=() + local videnable="--disable-video" + local t + + use debug || append-cflags -DNDEBUG=1 + + for t in ${CODEC_FLAGS}; do + myconf+=( $(use_enable ${t} ${t}-codec) ) + done + myconf+=( $(use_enable g729 bcg729) ) + + for t in ${VIDEO_FLAGS}; do + myconf+=( $(use_enable ${t}) ) + use "${t}" && videnable="--enable-video" + done + + [ "${videnable}" = "--enable-video" ] && _pj_set_define PJMEDIA_HAS_VIDEO 1 || _pj_set_define PJMEDIA_HAS_VIDEO 0 + + # bug 955077 and bug 955129 + use libyuv && myconf+=( --with-external-yuv ) + + LD="$(tc-getCXX)" econf \ + --enable-shared \ + ${videnable} \ + $(_pj_enable alsa sound) \ + $(_pj_enable amr opencore-amr) \ + $(_pj_enable epoll) \ + $(_pj_enable opus) \ + $(_pj_enable portaudio ext-sound) \ + $(_pj_enable resample libsamplerate) \ + $(_pj_enable resample resample-dll) \ + $(_pj_enable resample) \ + $(_pj_enable silk) \ + $(_pj_enable speex speex-aec) \ + $(_pj_enable ssl) \ + $(_pj_enable webrtc libwebrtc) \ + $(use_with gsm external-gsm) \ + $(use_with portaudio external-pa) \ + $(use_with speex external-speex) \ + $(usex srtp --with-external-srtp --disable-libsrtp) \ + "${myconf[@]}" +} + +src_install() { + default + + newbin pjsip-apps/bin/pjsua-${CHOST} pjsua + newbin pjsip-apps/bin/pjsystest-${CHOST} pjsystest + + if use examples; then + insinto "/usr/share/doc/${PF}/examples" + doins -r pjsip-apps/src/samples + fi + + use static-libs || rm "${ED}/usr/$(get_libdir)"/*.a || die "Error removing static archives" +} diff --git a/net-misc/dhcp/Manifest b/net-misc/dhcp/Manifest index 65c238b649e3..47b71db74f8f 100644 --- a/net-misc/dhcp/Manifest +++ b/net-misc/dhcp/Manifest @@ -1,2 +1,2 @@ DIST dhcp-4.4.3-P1.tar.gz 10081055 BLAKE2B 6cc16f7472efb1e1f6b7a83cafd9a81a16f10af7361da079c48a5eff0d9e310f475dcc82e984c20936c64867183402d00d26e5366e75bf7463ec2aea4a6f68a4 SHA512 d14dc44d1c015780ae19769816cb01015959927a1ad7a3e84b89e0463253aaf46451af88e3260347196373906d5b438c7c616fee45ec3f128aa82af6702b7154 -DIST dhcp-4.4.3.tar.gz 10078953 BLAKE2B d88570760cc00bd72d1e9c2e76c7a7b9f07cadfbe044220a43ee33fc201c217725c3909a386ae11f28346920dacb0313d78193a9e3d7eac9757384b4fe762597 SHA512 4472d6794af80b482560956cee6895889cc1aca39980f851faf56824627e95731f2983cf7c7454bc3decb0a12c874fcbd29bd6c5a9695412def6bc14c6df17e0 +DIST dhcp-4.4.3-patches.tar.xz 15276 BLAKE2B 4750833f986eccdc60b63de55f0b0633039806d75e1bbb79ea6974990399f2ec33836fd22ec3a0981aaeffc3fcfd914deff96d139f4ea3c2ad1b9010ec737d06 SHA512 c8071f48e4074a7a83e74706868a782c7dc4bcb6df4b9035411e419a95bf90de66ece2b2aacc8f8f3ca517287599cb178704402ff276a4620c941733ce03c57b diff --git a/net-misc/dhcp/dhcp-4.4.3.ebuild b/net-misc/dhcp/dhcp-4.4.3.ebuild deleted file mode 100644 index c048db840e81..000000000000 --- a/net-misc/dhcp/dhcp-4.4.3.ebuild +++ /dev/null @@ -1,270 +0,0 @@ -# Copyright 2021-2022 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -inherit systemd toolchain-funcs flag-o-matic - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" - -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="https://www.isc.org/dhcp" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" - -LICENSE="MPL-2.0 BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" -IUSE="+client ipv6 kernel_linux ldap libressl selinux +server ssl vim-syntax" - -DEPEND=" - acct-group/dhcp - acct-user/dhcp - sys-apps/iproute2 - sys-apps/net-tools - ldap? ( - net-nds/openldap - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl ) - ) - )" -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-dhcp ) - vim-syntax? ( app-vim/dhcpd-syntax )" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -PATCHES=( - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - "${FILESDIR}/${PN}-3.0-fix-perms.patch" - - # Enable dhclient to equery NTP servers - "${FILESDIR}/${PN}-4.3.6-dhclient-ntp.patch" - "${FILESDIR}/${PN}-4.3.6-dhclient-resolvconf.patch" - - # Enable dhclient to get extra configuration from stdin - "${FILESDIR}/${PN}-4.2.2-dhclient-stdin-conf.patch" - "${FILESDIR}/${PN}-4.3.6-nogateway.patch" #265531 - "${FILESDIR}/${PN}-4.3.6-quieter-ping.patch" #296921 - "${FILESDIR}/${PN}-4.4.0-always-accept-4.patch" #437108 - "${FILESDIR}/${PN}-4.3.6-iproute2-path.patch" #480636 - "${FILESDIR}/${PN}-4.3.3-ldap-ipv6-client-id.patch" #559832 -) - -src_prepare() { - default - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash #158540 - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i -r \ - -e "/(script|host-name|domain-name) /d" \ - client/dhclient.conf.example || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\::' \ - Makefile.in || die - fi - - # Only install different man pages if we don't have en - if [[ " ${LINGUAS} " != *" en "* ]]; then - # Install Japanese man pages - if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then - einfo "Installing Japanese documention" - cp doc/ja_JP.eucJP/dhclient* client || die - cp doc/ja_JP.eucJP/dhcp* common || die - fi - fi - # Now remove the non-english docs so there are no errors later - rm -r doc/ja_JP.eucJP || die - - # make the bind build work - do NOT make "binddir" local! - binddir="${S}/bind" - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - # Only use the relevant subdirs now that ISC - #removed the lib/export structure in bind. - sed '/^SUBDIRS/s@=.*$@= isc dns isccfg irs samples@' \ - -i bind-*/lib/Makefile.in || die -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - # this is tested for by the bind build system, and can cause trouble - # when cross-building; since dhcp itself doesn't make use of libcap, - # simply disable it. - export ac_cv_lib_cap_cap_set_proc=no - - # Use FHS sane paths ... some of these have configure options, - # but not all, so just do it all here. - local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" - cat <<-EOF >> includes/site.h - #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" - #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" - #define _PATH_DHCPD_DB "${l}/dhcpd.leases" - #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" - #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" - #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" - #define _PATH_DHCPD_PID "${r}/dhcpd.pid" - #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" - #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" - #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" - #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" - #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" - EOF - - # https://bugs.gentoo.org/720806 - if use ppc || use arm || use hppa; then - append-libs -latomic - fi - - local myeconfargs=( - --enable-paranoia - --enable-early-chroot - --sysconfdir=${e} - --with-randomdev=/dev/random - $(use_enable ipv6 dhcpv6) - $(use_with ldap) - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - LIBS="${LIBS}" - ) - econf "${myeconfargs[@]}" - - # configure local bind cruft. symtable option requires - # perl and we don't want to require that #383837. - cd bind/bind-*/ || die - local el - eval econf \ - $(for el in $(awk '/^bindconfig/,/^$/ {print}' ../Makefile.in) ; do if [[ ${el} =~ ^-- ]] ; then printf ' %s' ${el//\\} ; fi ; done | sed 's,@\([[:alpha:]]\+\)dir@,${binddir}/\1,g') \ - --with-randomdev=/dev/random \ - --disable-symtable \ - --without-make-clean -} - -src_compile() { - # build local bind cruft first - emake -C bind/bind-*/lib install - # then build standard dhcp code - emake AR="$(tc-getAR)" -} - -src_install() { - default - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - docinto html - dodoc doc/References.html - - if [[ -e client/dhclient ]] ; then - # move the client to / - dodir /sbin - mv "${ED}"/usr/sbin/dhclient "${ED}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script - else - newexe "${S}"/client/scripts/freebsd dhclient-script - fi - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* - dosbin contrib/ldap/dhcpd-conf-to-ldap - fi - - newinitd "${FILESDIR}"/dhclient.init dhclient - newinitd "${FILESDIR}"/dhcpd.init5 dhcpd - newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 - newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 - - systemd_newtmpfilesd "${FILESDIR}"/dhcpd.tmpfiles dhcpd.conf - systemd_dounit "${FILESDIR}"/dhcpd4.service - systemd_dounit "${FILESDIR}"/dhcpd6.service - systemd_dounit "${FILESDIR}"/dhcrelay4.service - systemd_dounit "${FILESDIR}"/dhcrelay6.service - systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf - systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf - - sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560 - fi - - # the default config files aren't terribly useful #384087 - local f - for f in "${ED}"/etc/dhcp/*.conf.example ; do - mv "${f}" "${f%.example}" || die - done - sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die - - diropts -m0750 -o dhcp -g dhcp - keepdir /var/lib/dhcp -} - -pkg_preinst() { - # Keep the user files over the sample ones. The - # hashing is to ignore the crappy defaults #384087. - local f h - for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do - h=${f#*:} - f="/etc/dhcp/${f%:*}.conf" - if [ -e "${EROOT}"${f} ] ; then - case $(md5sum "${EROOT}"${f}) in - ${h}*) ;; - *) cp -p "${EROOT}"${f} "${ED}"${f};; - esac - fi - done -} - -pkg_postinst() { - if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then - ewarn - ewarn "WARNING: The dhcp init script has been renamed to dhcpd" - ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and" - ewarn "and dhcp should be removed from the default runlevel" - ewarn - fi -} diff --git a/net-misc/dhcp/dhcp-4.4.3_p1-r6.ebuild b/net-misc/dhcp/dhcp-4.4.3_p1-r6.ebuild new file mode 100644 index 000000000000..75b5684d3911 --- /dev/null +++ b/net-misc/dhcp/dhcp-4.4.3_p1-r6.ebuild @@ -0,0 +1,305 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit dot-a systemd toolchain-funcs flag-o-matic tmpfiles + +MY_PV="${PV//_alpha/a}" +MY_PV="${MY_PV//_beta/b}" +MY_PV="${MY_PV//_rc/rc}" +MY_PV="${MY_PV//_p/-P}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" +HOMEPAGE="https://www.isc.org/dhcp" +SRC_URI=" + https://downloads.isc.org/isc/dhcp/${MY_P}.tar.gz + https://downloads.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/dhcp-4.4.3-patches.tar.xz +" +S="${WORKDIR}/${MY_P}" + +LICENSE="MPL-2.0 BSD SSLeay GPL-2" # GPL-2 only for init script +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" +IUSE="+client ipv6 ldap selinux +server ssl vim-syntax" + +DEPEND=" + virtual/zlib:= + client? ( + kernel_linux? ( + ipv6? ( sys-apps/iproute2 ) + sys-apps/net-tools + ) + ) + ldap? ( + net-nds/openldap:= + ssl? ( dev-libs/openssl:= ) + )" +RDEPEND=" + acct-group/dhcp + acct-user/dhcp + ${DEPEND} + selinux? ( sec-policy/selinux-dhcp ) + vim-syntax? ( app-vim/dhcpd-syntax ) +" + +PATCHES=( + # Gentoo patches - these will probably never be accepted upstream + # Fix some permission issues + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-fix-perms.patch" + + # Enable dhclient to equery NTP servers + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-dhclient-ntp.patch" + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-dhclient-resolvconf.patch" + + # Enable dhclient to get extra configuration from stdin + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-dhclient-stdin-conf.patch" + # bug #265531 + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-nogateway.patch" + # bug #296921 + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-quieter-ping.patch" + # bug #437108 + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-always-accept-4.patch" + # bug #480636 + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-iproute2-path.patch" + # bug #471142 + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-bindtodevice-inet6.patch" + # bug #559832 + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-ldap-ipv6-client-id.patch" + # bug #908986 + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-infiniband.patch" + + # Possible upstream candidates + "${WORKDIR}/dhcp-4.4.3-patches/${PN}-4.4.3-configure-clang16.patch" +) + +src_unpack() { + unpack ${A} + # handle local bind hell + cd "${S}"/bind || die + unpack ./bind.tar.gz +} + +src_prepare() { + default + + # Brand the version with Gentoo + sed -i \ + -e "/VERSION=/s:'$: Gentoo-${PR}':" \ + configure || die + + # Change the hook script locations of the scripts + sed -i \ + -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ + -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ + client/scripts/* || die + + # No need for the linux script to force bash #158540 + sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die + + # Quiet the freebsd logger a little + sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die + + # Remove these options from the sample config + sed -i -r \ + -e "/(script|host-name|domain-name) /d" \ + client/dhclient.conf.example || die + + if use client && ! use server ; then + sed -i -r \ + -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ + Makefile.in || die + elif ! use client && use server ; then + sed -i -r \ + -e '/^SUBDIRS/s:\::' \ + Makefile.in || die + fi + + # Only install different man pages if we don't have en + if [[ " ${LINGUAS} " != *" en "* ]]; then + # Install Japanese man pages + if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then + einfo "Installing Japanese documention" + cp doc/ja_JP.eucJP/dhclient* client || die + cp doc/ja_JP.eucJP/dhcp* common || die + fi + fi + # Now remove the non-english docs so there are no errors later + rm -r doc/ja_JP.eucJP || die + + # make the bind build work - do NOT make "binddir" local! + binddir="${S}/bind" + cd "${binddir}" || die + cat <<-EOF > bindvar.tmp + binddir=${binddir} + GMAKE=${MAKE:-gmake} + EOF + eapply -p2 "${WORKDIR}"/dhcp-4.4.3-patches/${PN}-4.4.3-bind-disable.patch + # Only use the relevant subdirs now that ISC + #removed the lib/export structure in bind. + sed '/^SUBDIRS/s@=.*$@= isc dns isccfg irs samples@' \ + -i bind-*/lib/Makefile.in || die +} + +src_configure() { + # bug #944907 + append-cflags -std=gnu17 + + lto-guarantee-fat + + # bind defaults to stupid `/usr/bin/ar` + tc-export AR BUILD_CC + export ac_cv_path_AR=${AR} + + # this is tested for by the bind build system, and can cause trouble + # when cross-building; since dhcp itself doesn't make use of libcap, + # simply disable it. + export ac_cv_lib_cap_cap_set_proc=no + + # Use FHS sane paths ... some of these have configure options, + # but not all, so just do it all here. + local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" + cat <<-EOF >> includes/site.h + #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" + #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" + #define _PATH_DHCPD_DB "${l}/dhcpd.leases" + #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" + #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" + #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" + #define _PATH_DHCPD_PID "${r}/dhcpd.pid" + #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" + #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" + #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" + #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" + #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" + EOF + + # Breaks with -O3 because of reliance on undefined behaviour + # bug #787935 + append-flags -fno-strict-aliasing + + # bug #720806, bug #801592 + append-atomic-flags + + local myeconfargs=( + --enable-paranoia + --enable-early-chroot + --sysconfdir=${e} + --with-randomdev=/dev/random + $(use_enable ipv6 dhcpv6) + $(use_with ldap) + $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) + LIBS="${LIBS}" + ) + econf "${myeconfargs[@]}" + + # configure local bind cruft. symtable option requires + # perl and we don't want to require that. bug #383837. + cd bind/bind-*/ || die + local el + eval econf \ + $(for el in $(awk '/^bindconfig/,/^$/ {print}' ../Makefile.in) ; do if [[ ${el} =~ ^-- ]] ; then printf ' %s' ${el//\\} ; fi ; done | sed 's,@\([[:alpha:]]\+\)dir@,${binddir}/\1,g') \ + --with-randomdev=/dev/random \ + --disable-symtable \ + --without-make-clean +} + +src_compile() { + # Build local bind cruft first + emake -C bind/bind-*/lib install + # then build standard dhcp code + emake AR="$(tc-getAR)" + emake -C keama AR="$(tc-getAR)" +} + +src_install() { + default + + emake -C keama DESTDIR="${D}" install + + strip-lto-bytecode + + dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} + docinto html + dodoc doc/References.html + newtmpfiles "${FILESDIR}"/dhcp.tmpfiles dhcp.conf + + if [[ -e client/dhclient ]] ; then + # Move the client to / + dodir /sbin + mv "${ED}"/usr/sbin/dhclient "${ED}"/sbin/ || die + + exeinto /sbin + if use kernel_linux ; then + newexe "${S}"/client/scripts/linux dhclient-script + else + newexe "${S}"/client/scripts/freebsd dhclient-script + fi + fi + + if [[ -e server/dhcpd ]] ; then + if use ldap ; then + insinto /etc/openldap/schema + doins contrib/ldap/dhcp.* + dosbin contrib/ldap/dhcpd-conf-to-ldap + fi + + newinitd "${FILESDIR}"/dhcpd.init5 dhcpd + newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd + newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay + newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay + newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 + newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 + + systemd_dounit "${FILESDIR}"/dhcpd4.service + systemd_dounit "${FILESDIR}"/dhcpd6.service + systemd_dounit "${FILESDIR}"/dhcrelay4.service + systemd_dounit "${FILESDIR}"/dhcrelay6.service + systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf + systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf + + sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560 + fi + + # the default config files aren't terribly useful #384087 + local f + for f in "${ED}"/etc/dhcp/*.conf.example ; do + mv "${f}" "${f%.example}" || die + done + sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die +} + +pkg_preinst() { + # Keep the user files over the sample ones. The + # hashing is to ignore the crappy defaults #384087. + local f h + for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do + h=${f#*:} + f="/etc/dhcp/${f%:*}.conf" + if [ -e "${EROOT}"${f} ] ; then + case $(md5sum "${EROOT}"${f}) in + ${h}*) ;; + *) cp -p "${EROOT}"${f} "${ED}"${f};; + esac + fi + done +} + +pkg_postinst() { + tmpfiles_process dhcp.conf + + if use client ; then + ewarn "The client and relay functionality will be removed in the next release!" + ewarn "Upstream have decided to discontinue this functionality." + fi + + if [[ -e "${EROOT}"/etc/init.d/dhcp ]] ; then + ewarn + ewarn "WARNING: The dhcp init script has been renamed to dhcpd" + ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and" + ewarn "and dhcp should be removed from the default runlevel" + ewarn + fi +} diff --git a/net-misc/dhcp/dhcp-4.4.3_p1.ebuild b/net-misc/dhcp/dhcp-4.4.3_p1.ebuild deleted file mode 100644 index 43ffa52672bf..000000000000 --- a/net-misc/dhcp/dhcp-4.4.3_p1.ebuild +++ /dev/null @@ -1,297 +0,0 @@ -# Copyright 2021-2022 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -inherit systemd tmpfiles toolchain-funcs flag-o-matic - -MY_PV="${PV//_alpha/a}" -MY_PV="${MY_PV//_beta/b}" -MY_PV="${MY_PV//_rc/rc}" -MY_PV="${MY_PV//_p/-P}" -MY_P="${PN}-${MY_PV}" - -DESCRIPTION="ISC Dynamic Host Configuration Protocol (DHCP) client/server" -HOMEPAGE="https://www.isc.org/dhcp" -SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz - ftp://ftp.isc.org/isc/dhcp/${MY_PV}/${MY_P}.tar.gz" - -LICENSE="MPL-2.0 BSD SSLeay GPL-2" # GPL-2 only for init script -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86" -IUSE="+client ipv6 kernel_linux ldap libressl selinux +server ssl vim-syntax" - -DEPEND=" - acct-group/dhcp - acct-user/dhcp - client? ( - kernel_linux? ( - ipv6? ( sys-apps/iproute2 ) - sys-apps/net-tools - ) - ) - ldap? ( - net-nds/openldap - ssl? ( - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl ) - ) - )" -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-dhcp ) - vim-syntax? ( app-vim/dhcpd-syntax )" - -S="${WORKDIR}/${MY_P}" - -src_unpack() { - unpack ${A} - # handle local bind hell - cd "${S}"/bind - unpack ./bind.tar.gz -} - -PATCHES=( - # Gentoo patches - these will probably never be accepted upstream - # Fix some permission issues - "${FILESDIR}/${PN}-3.0-fix-perms.patch" - - # Enable dhclient to equery NTP servers - "${FILESDIR}/${PN}-4.3.6-dhclient-ntp.patch" - "${FILESDIR}/${PN}-4.3.6-dhclient-resolvconf.patch" - - # Enable dhclient to get extra configuration from stdin - "${FILESDIR}/${PN}-4.2.2-dhclient-stdin-conf.patch" - # bug #265531 - "${FILESDIR}/${PN}-4.3.6-nogateway.patch" - # bug #296921 - "${FILESDIR}/${PN}-4.3.6-quieter-ping.patch" - # bug #437108 - "${FILESDIR}/${PN}-4.4.0-always-accept-4.patch" - # bug #480636 - "${FILESDIR}/${PN}-4.3.6-iproute2-path.patch" - # bug #471142 - "${FILESDIR}/${PN}-4.2.5-bindtodevice-inet6.patch" - # bug #559832 - "${FILESDIR}/${PN}-4.3.3-ldap-ipv6-client-id.patch" - - # Possible upstream candidates -) - -src_prepare() { - default - - # Brand the version with Gentoo - sed -i \ - -e "/VERSION=/s:'$: Gentoo-${PR}':" \ - configure || die - - # Change the hook script locations of the scripts - sed -i \ - -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \ - -e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \ - client/scripts/* || die - - # No need for the linux script to force bash #158540 - sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die - - # Quiet the freebsd logger a little - sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die - - # Remove these options from the sample config - sed -i -r \ - -e "/(script|host-name|domain-name) /d" \ - client/dhclient.conf.example || die - - if use client && ! use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\<(dhcpctl|relay|server)\>::g' \ - Makefile.in || die - elif ! use client && use server ; then - sed -i -r \ - -e '/^SUBDIRS/s:\::' \ - Makefile.in || die - fi - - # Only install different man pages if we don't have en - if [[ " ${LINGUAS} " != *" en "* ]]; then - # Install Japanese man pages - if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then - einfo "Installing Japanese documention" - cp doc/ja_JP.eucJP/dhclient* client || die - cp doc/ja_JP.eucJP/dhcp* common || die - fi - fi - # Now remove the non-english docs so there are no errors later - rm -r doc/ja_JP.eucJP || die - - # make the bind build work - do NOT make "binddir" local! - binddir="${S}/bind" - cd "${binddir}" || die - cat <<-EOF > bindvar.tmp - binddir=${binddir} - GMAKE=${MAKE:-gmake} - EOF - eapply -p2 "${FILESDIR}"/${PN}-4.4.3-bind-disable.patch - # Only use the relevant subdirs now that ISC - #removed the lib/export structure in bind. - sed '/^SUBDIRS/s@=.*$@= isc dns isccfg irs samples@' \ - -i bind-*/lib/Makefile.in || die -} - -src_configure() { - # bind defaults to stupid `/usr/bin/ar` - tc-export AR BUILD_CC - export ac_cv_path_AR=${AR} - - # this is tested for by the bind build system, and can cause trouble - # when cross-building; since dhcp itself doesn't make use of libcap, - # simply disable it. - export ac_cv_lib_cap_cap_set_proc=no - - # Use FHS sane paths ... some of these have configure options, - # but not all, so just do it all here. - local e="/etc/dhcp" r="/var/run/dhcp" l="/var/lib/dhcp" - cat <<-EOF >> includes/site.h - #define _PATH_DHCPD_CONF "${e}/dhcpd.conf" - #define _PATH_DHCLIENT_CONF "${e}/dhclient.conf" - #define _PATH_DHCPD_DB "${l}/dhcpd.leases" - #define _PATH_DHCPD6_DB "${l}/dhcpd6.leases" - #define _PATH_DHCLIENT_DB "${l}/dhclient.leases" - #define _PATH_DHCLIENT6_DB "${l}/dhclient6.leases" - #define _PATH_DHCPD_PID "${r}/dhcpd.pid" - #define _PATH_DHCPD6_PID "${r}/dhcpd6.pid" - #define _PATH_DHCLIENT_PID "${r}/dhcpclient.pid" - #define _PATH_DHCLIENT6_PID "${r}/dhcpclient6.pid" - #define _PATH_DHCRELAY_PID "${r}/dhcrelay.pid" - #define _PATH_DHCRELAY6_PID "${r}/dhcrelay6.pid" - EOF - - # Breaks with -O3 because of reliance on undefined behaviour - # bug #787935 - append-flags -fno-strict-aliasing - - # bug #720806, bug #801592 - if use ppc || use arm || use hppa || [[ ${CHOST} == i486* ]] ; then - append-libs -latomic - fi - - local myeconfargs=( - --enable-paranoia - --enable-early-chroot - --sysconfdir=${e} - --with-randomdev=/dev/random - $(use_enable ipv6 dhcpv6) - $(use_with ldap) - $(use ldap && use_with ssl ldapcrypto || echo --without-ldapcrypto) - LIBS="${LIBS}" - ) - econf "${myeconfargs[@]}" - - # configure local bind cruft. symtable option requires - # perl and we don't want to require that. bug #383837. - cd bind/bind-*/ || die - local el - eval econf \ - $(for el in $(awk '/^bindconfig/,/^$/ {print}' ../Makefile.in) ; do if [[ ${el} =~ ^-- ]] ; then printf ' %s' ${el//\\} ; fi ; done | sed 's,@\([[:alpha:]]\+\)dir@,${binddir}/\1,g') \ - --with-randomdev=/dev/random \ - --disable-symtable \ - --without-make-clean -} - -src_compile() { - # Build local bind cruft first - emake -C bind/bind-*/lib install - # then build standard dhcp code - emake AR="$(tc-getAR)" -} - -src_install() { - default - - dodoc README RELNOTES doc/{api+protocol,IANA-arp-parameters} - docinto html - dodoc doc/References.html - - if [[ -e client/dhclient ]] ; then - # Move the client to / - dodir /sbin - mv "${ED}"/usr/sbin/dhclient "${ED}"/sbin/ || die - - exeinto /sbin - if use kernel_linux ; then - newexe "${S}"/client/scripts/linux dhclient-script - else - newexe "${S}"/client/scripts/freebsd dhclient-script - fi - fi - - if [[ -e server/dhcpd ]] ; then - if use ldap ; then - insinto /etc/openldap/schema - doins contrib/ldap/dhcp.* - dosbin contrib/ldap/dhcpd-conf-to-ldap - fi - - newinitd "${FILESDIR}"/dhclient.init dhclient - newinitd "${FILESDIR}"/dhcpd.init5 dhcpd - newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay - newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay - newinitd "${FILESDIR}"/dhcrelay.init3 dhcrelay6 - newconfd "${FILESDIR}"/dhcrelay6.conf dhcrelay6 - - newtmpfiles "${FILESDIR}"/dhcpd.tmpfiles dhcpd.conf - systemd_dounit "${FILESDIR}"/dhcpd4.service - systemd_dounit "${FILESDIR}"/dhcpd6.service - systemd_dounit "${FILESDIR}"/dhcrelay4.service - systemd_dounit "${FILESDIR}"/dhcrelay6.service - systemd_install_serviced "${FILESDIR}"/dhcrelay4.service.conf - systemd_install_serviced "${FILESDIR}"/dhcrelay6.service.conf - - sed -i "s:#@slapd@:$(usex ldap slapd ''):" "${ED}"/etc/init.d/* || die #442560 - fi - - # the default config files aren't terribly useful #384087 - local f - for f in "${ED}"/etc/dhcp/*.conf.example ; do - mv "${f}" "${f%.example}" || die - done - sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die - - diropts -m0750 -o dhcp -g dhcp - keepdir /var/lib/dhcp -} - -pkg_preinst() { - # Keep the user files over the sample ones. The - # hashing is to ignore the crappy defaults #384087. - local f h - for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do - h=${f#*:} - f="/etc/dhcp/${f%:*}.conf" - if [ -e "${EROOT}"${f} ] ; then - case $(md5sum "${EROOT}"${f}) in - ${h}*) ;; - *) cp -p "${EROOT}"${f} "${ED}"${f};; - esac - fi - done -} - -pkg_postinst() { - if use server ; then - tmpfiles_process dhcpd.conf - fi - - if use client ; then - ewarn "The client and relay functionality will be removed in the next release!" - ewarn "Upstream have decided to discontinue this functionality." - fi - - if [[ -e "${EROOT}"/etc/init.d/dhcp ]] ; then - ewarn - ewarn "WARNING: The dhcp init script has been renamed to dhcpd" - ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and" - ewarn "and dhcp should be removed from the default runlevel" - ewarn - fi -} diff --git a/net-misc/dhcp/files/dhclient.init b/net-misc/dhcp/files/dhclient.init deleted file mode 100644 index ad86f9b20e25..000000000000 --- a/net-misc/dhcp/files/dhclient.init +++ /dev/null @@ -1,16 +0,0 @@ -#!/sbin/openrc-run -# Distributed under the terms of the GNU General Public License v2 - -command=${RC_PREFIX}/sbin/dhclient -pidfile=${RC_PREFIX}/var/run/${RC_SVCNAME}.pid -command_args="-pf ${pidfile} -q" -name="DHCP Client Daemon" - -depend() -{ - provide net - need localmount - use logger network - after bootmisc modules - before dns -} diff --git a/net-misc/dhcp/files/dhcp-3.0-fix-perms.patch b/net-misc/dhcp/files/dhcp-3.0-fix-perms.patch deleted file mode 100644 index f4b3fd18e167..000000000000 --- a/net-misc/dhcp/files/dhcp-3.0-fix-perms.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/server/dhcpd.c -+++ b/server/dhcpd.c -@@ -602,6 +602,12 @@ - if (lftest) - exit (0); - -+#if defined (PARANOIA) -+ /* Set proper permissions... */ -+ if (lchown (path_dhcpd_db, set_uid, set_gid)) -+ log_fatal ("lchown(%s, %d, %d): %m", path_dhcpd_db, (int) set_uid, (int) set_gid); -+#endif /* PARANOIA */ -+ - /* Discover all the network interfaces and initialize them. */ - discover_interfaces (DISCOVER_SERVER); - diff --git a/net-misc/dhcp/files/dhcp-4.2.2-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-4.2.2-dhclient-stdin-conf.patch deleted file mode 100644 index bf5a54c32153..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.2-dhclient-stdin-conf.patch +++ /dev/null @@ -1,113 +0,0 @@ ---- dhcp-4.2.2/client/clparse.c -+++ dhcp-4.2.2/client/clparse.c -@@ -182,6 +182,10 @@ isc_result_t read_client_conf () - #endif - } - -+ /* Read any extra configuration from stdin */ -+ extern int read_client_conf_stdin (struct interface_info *ip, struct client_config *client); -+ read_client_conf_stdin (NULL, &top_level_config); -+ - /* Set up state and config structures for clients that don't - have per-interface configuration statements. */ - config = (struct client_config *)0; -@@ -211,23 +215,13 @@ isc_result_t read_client_conf () - return status; - } - --int read_client_conf_file (const char *name, struct interface_info *ip, -+int read_client_conf_actual (struct parse *cfile, struct interface_info *ip, - struct client_config *client) - { -- int file; -- struct parse *cfile; - const char *val; - int token; - isc_result_t status; - -- if ((file = open (name, O_RDONLY)) < 0) -- return uerr2isc (errno); -- -- cfile = NULL; -- status = new_parse(&cfile, file, NULL, 0, path_dhclient_conf, 0); -- if (status != ISC_R_SUCCESS || cfile == NULL) -- return status; -- - do { - token = peek_token (&val, (unsigned *)0, cfile); - if (token == END_OF_FILE) -@@ -238,10 +232,74 @@ int read_client_conf_file (const char *name, struct interface_info *ip, - status = (cfile -> warnings_occurred - ? DHCP_R_BADPARSE - : ISC_R_SUCCESS); -+ return status; -+} -+ -+int read_client_conf_file (const char *name, struct interface_info *ip, -+ struct client_config *client) -+{ -+ int file; -+ struct parse *cfile; -+ isc_result_t status; -+ -+ if ((file = open (name, O_RDONLY)) < 0) -+ return uerr2isc (errno); -+ -+ cfile = (struct parse *)0; -+ new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); -+ status = read_client_conf_actual(cfile, ip, client); - end_parse (&cfile); - return status; - } - -+int read_client_conf_stdin (struct interface_info *ip, -+ struct client_config *client) -+{ -+ int file; -+ char *buffer = NULL, *p; -+ unsigned buflen, len = 0; -+ struct parse *cfile; -+ size_t bytes; -+ isc_result_t status; -+ -+ file = fileno(stdin); -+ if (isatty (file)) -+ return ISC_R_NOTFOUND; -+ if (fcntl (file, F_SETFL, O_NONBLOCK) < 0) -+ log_fatal ("could not set stdin to non blocking!"); -+ -+ buflen = BUFSIZ; -+ buffer = malloc (BUFSIZ + 1); -+ p = buffer; -+ do { -+ bytes = read (file, p, BUFSIZ); -+ if (bytes == 0) -+ break; -+ if (bytes == -1) -+ log_fatal ("failed to read stdin!"); -+ if (bytes >= BUFSIZ) { -+ buflen += BUFSIZ; -+ len += BUFSIZ; -+ buffer = realloc (buffer, buflen + 1); -+ if (!buffer) -+ log_fatal ("not enough buffer to read stdin!"); -+ p = buffer + len; -+ } else { -+ len += bytes; -+ break; -+ } -+ } while(1); -+ buffer[len] = '\0'; -+ -+ cfile = (struct parse *)0; -+ status = new_parse (&cfile, -1, buffer, len, "stdin", 0); -+ if (status == ISC_R_SUCCESS) { -+ status = read_client_conf_actual (cfile, ip, client); -+ end_parse (&cfile); -+ } -+ free(buffer); -+ return status; -+} - - /* lease-file :== client-lease-statements END_OF_FILE - client-lease-statements :== diff --git a/net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch b/net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch deleted file mode 100644 index 77254c32e2b0..000000000000 --- a/net-misc/dhcp/files/dhcp-4.2.5-bindtodevice-inet6.patch +++ /dev/null @@ -1,19 +0,0 @@ -https://bugs.gentoo.org/471142 - -snipped from fedora - -# dhclient -6: bind socket to interface (#1001742) -# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #34784]) - -diff -up dhcp-4.2.5/common/socket.c.bindtodevice_inet6 dhcp-4.2.5/common/socket.c ---- dhcp-4.2.5/common/socket.c.bindtodevice_inet6 2013-09-17 16:47:05.000000000 +0200 -+++ dhcp-4.2.5/common/socket.c 2013-09-17 16:48:18.975997842 +0200 -@@ -245,7 +245,7 @@ if_register_socket(struct interface_info - - #if defined(SO_BINDTODEVICE) - /* Bind this socket to this interface. */ -- if ((local_family != AF_INET6) && (info->ifp != NULL) && -+ if (((do_multicast == 0)||(*do_multicast == 0)) && (info->ifp != NULL) && - setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, - (char *)(info -> ifp), sizeof(*(info -> ifp))) < 0) { - log_fatal("setsockopt: SO_BINDTODEVICE: %m"); diff --git a/net-misc/dhcp/files/dhcp-4.3.3-ldap-ipv6-client-id.patch b/net-misc/dhcp/files/dhcp-4.3.3-ldap-ipv6-client-id.patch deleted file mode 100644 index 2a7f8183d4e0..000000000000 --- a/net-misc/dhcp/files/dhcp-4.3.3-ldap-ipv6-client-id.patch +++ /dev/null @@ -1,81 +0,0 @@ -https://bugs.gentoo.org/559832 - -the get_client_id func is used outside of IPv6 code, so don't store it in the -IPv6-specific dhcpv6.c file. otherwise, building w/out IPv6 & w/ldap yields: -dhcpd-ldap.o: In function 'find_client_in_ldap': -ldap.c:(.text+0x4774): undefined reference to 'get_client_id' - ---- a/server/dhcpleasequery.c -+++ b/server/dhcpleasequery.c -@@ -33,6 +33,34 @@ - * DoS'ed by DHCPLEASEQUERY message. - */ - -+/* -+ * Get the client identifier from the packet. -+ */ -+isc_result_t -+get_client_id(struct packet *packet, struct data_string *client_id) { -+ struct option_cache *oc; -+ -+ /* -+ * Verify our client_id structure is empty. -+ */ -+ if ((client_id->data != NULL) || (client_id->len != 0)) { -+ return DHCP_R_INVALIDARG; -+ } -+ -+ oc = lookup_option(&dhcpv6_universe, packet->options, D6O_CLIENTID); -+ if (oc == NULL) { -+ return ISC_R_NOTFOUND; -+ } -+ -+ if (!evaluate_option_cache(client_id, packet, NULL, NULL, -+ packet->options, NULL, -+ &global_scope, oc, MDL)) { -+ return ISC_R_FAILURE; -+ } -+ -+ return ISC_R_SUCCESS; -+} -+ - /* - * If you query by hardware address or by client ID, then you may have - * more than one IP address for your query argument. We need to do two ---- a/server/dhcpv6.c -+++ b/server/dhcpv6.c -@@ -392,34 +392,6 @@ generate_new_server_duid(void) { - } - - /* -- * Get the client identifier from the packet. -- */ --isc_result_t --get_client_id(struct packet *packet, struct data_string *client_id) { -- struct option_cache *oc; -- -- /* -- * Verify our client_id structure is empty. -- */ -- if ((client_id->data != NULL) || (client_id->len != 0)) { -- return DHCP_R_INVALIDARG; -- } -- -- oc = lookup_option(&dhcpv6_universe, packet->options, D6O_CLIENTID); -- if (oc == NULL) { -- return ISC_R_NOTFOUND; -- } -- -- if (!evaluate_option_cache(client_id, packet, NULL, NULL, -- packet->options, NULL, -- &global_scope, oc, MDL)) { -- return ISC_R_FAILURE; -- } -- -- return ISC_R_SUCCESS; --} -- --/* - * Message validation, defined in RFC 3315, sections 15.2, 15.5, 15.7: - * - * Servers MUST discard any Solicit messages that do not include a diff --git a/net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch b/net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch deleted file mode 100644 index a504840dd5ab..000000000000 --- a/net-misc/dhcp/files/dhcp-4.3.6-dhclient-ntp.patch +++ /dev/null @@ -1,210 +0,0 @@ ---- dhcp-4.3.6/client/clparse.c -+++ dhcp-4.3.6/client/clparse.c -@@ -31,7 +31,7 @@ - - struct client_config top_level_config; - --#define NUM_DEFAULT_REQUESTED_OPTS 9 -+#define NUM_DEFAULT_REQUESTED_OPTS 10 - /* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */ - struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 + 1]; - -@@ -107,15 +107,20 @@ - dhcp_universe.code_hash, &code, 0, MDL); - - /* 8 */ -- code = D6O_NAME_SERVERS; -+ code = DHO_NTP_SERVERS; - option_code_hash_lookup(&default_requested_options[7], -- dhcpv6_universe.code_hash, &code, 0, MDL); -+ dhcp_universe.code_hash, &code, 0, MDL); - - /* 9 */ -- code = D6O_DOMAIN_SEARCH; -+ code = D6O_NAME_SERVERS; - option_code_hash_lookup(&default_requested_options[8], - dhcpv6_universe.code_hash, &code, 0, MDL); - -+ /* 10 */ -+ code = D6O_DOMAIN_SEARCH; -+ option_code_hash_lookup(&default_requested_options[9], -+ dhcpv6_universe.code_hash, &code, 0, MDL); -+ - for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) { - if (default_requested_options[code] == NULL) - log_fatal("Unable to find option definition for " ---- dhcp-4.3.6/client/scripts/bsdos -+++ dhcp-4.3.6/client/scripts/bsdos -@@ -36,6 +36,26 @@ - - mv /etc/resolv.conf.dhclient6 /etc/resolv.conf - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ x$new_ntp_servers != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- dhcp-4.3.6/client/scripts/freebsd -+++ dhcp-4.3.6/client/scripts/freebsd -@@ -80,6 +80,26 @@ - fi - fi - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- dhcp-4.3.6/client/scripts/linux -+++ dhcp-4.3.6/client/scripts/linux -@@ -106,6 +106,27 @@ - fi - mv -f $new_resolv_conf /etc/resolv.conf - fi -+ -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # set host name ---- dhcp-4.3.6/client/scripts/netbsd -+++ dhcp-4.3.6/client/scripts/netbsd -@@ -36,6 +36,26 @@ - - mv /etc/resolv.conf.dhclient6 /etc/resolv.conf - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- dhcp-4.3.6/client/scripts/openbsd -+++ dhcp-4.3.6/client/scripts/openbsd -@@ -36,6 +36,26 @@ - - mv /etc/resolv.conf.dhclient6 /etc/resolv.conf - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. ---- dhcp-4.3.6/client/scripts/solaris -+++ dhcp-4.3.6/client/scripts/solaris -@@ -17,6 +17,26 @@ - - mv /etc/resolv.conf.dhclient /etc/resolv.conf - fi -+ # If we're making confs, may as well make an ntp.conf too -+ make_ntp_conf -+} -+ -+make_ntp_conf() { -+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then -+ if [ "x$new_ntp_servers" != x ]; then -+ conf="# Generated by dhclient for interface $interface\n" -+ conf="${conf}restrict default noquery notrust nomodify\n" -+ conf="${conf}restrict 127.0.0.1\n" -+ for ntpserver in $new_ntp_servers; do -+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" -+ conf="${conf}server $ntpserver\n" -+ done -+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" -+ conf="${conf}logfile /var/log/ntp.log\n" -+ printf "${conf}" > /etc/ntp.conf -+ chmod 644 /etc/ntp.conf -+ fi -+ fi - } - - # Must be used on exit. Invokes the local dhcp client exit hooks, if any. diff --git a/net-misc/dhcp/files/dhcp-4.3.6-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-4.3.6-dhclient-resolvconf.patch deleted file mode 100644 index ccfdbcf4a206..000000000000 --- a/net-misc/dhcp/files/dhcp-4.3.6-dhclient-resolvconf.patch +++ /dev/null @@ -1,422 +0,0 @@ ---- dhcp-4.3.6/client/scripts/bsdos -+++ dhcp-4.3.6/client/scripts/bsdos -@@ -1,27 +1,25 @@ - #!/bin/sh - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient - if [ "x$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_search}\n" - elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >> /etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do - # If the nameserver has a link-local address -@@ -31,10 +29,18 @@ - FE80:*) zone_id="%$interface";; - *) zone_id="";; - esac -- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}$zone_id\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi - } - ---- dhcp-4.3.6/client/scripts/freebsd -+++ dhcp-4.3.6/client/scripts/freebsd -@@ -11,54 +11,23 @@ - fi - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- ( cat /dev/null > /etc/resolv.conf.dhclient ) -- exit_status=$? -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status" -- else -- if [ "x$new_domain_search" != x ]; then -- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient ) -- exit_status=$? -- elif [ "x$new_domain_name" != x ]; then -- # Note that the DHCP 'Domain Name Option' is really just a domain -- # name, and that this practice of using the domain name option as -- # a search path is both nonstandard and deprecated. -- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient ) -- exit_status=$? -- fi -- for nameserver in $new_domain_name_servers; do -- if [ $exit_status -ne 0 ]; then -- break -- fi -- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient ) -- exit_status=$? -- done -- -- # If there were no errors, attempt to mv the new file into place. -- if [ $exit_status -eq 0 ]; then -- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf ) -- exit_status=$? -- fi -- -- if [ $exit_status -ne 0 ]; then -- $LOGGER "Error while writing new /etc/resolv.conf." -- fi -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then -+ # Note that the DHCP 'Domain Name Option' is really just a domain -+ # name, and that this practice of using the domain name option as -+ # a search path is both nonstandard and deprecated. -+ conf="${conf}search ${new_domain_name}\n" - fi -+ for nameserver in $new_domain_name_servers; do -+ conf="${conf}nameserver ${nameserver}\n" -+ done - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- ( cat /dev/null > /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- if [ $exit_status -ne 0 ] ; then -- $LOGGER "Unable to create /etc/resolv.conf.dhclient6: Error $exit_status" -- else -- if [ "x${new_dhcp6_domain_search}" != x ] ; then -- ( echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- fi -- for nameserver in ${new_dhcp6_name_servers} ; do -- if [ $exit_status -ne 0 ] ; then -- break -- fi - # If the nameserver has a link-local address - # add a (interface name) to it. - case $nameserver in -@@ -66,18 +35,21 @@ - FE80:*) zone_id="%$interface";; - *) zone_id="";; - esac -- ( echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 ) -- exit_status=$? -- done -- -- if [ $exit_status -eq 0 ] ; then -- ( mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ) -- exit_status=$? -- fi -+ if [ "x${new_dhcp6_domain_search}" != x ] ; then -+ conf="${conf}search ${new_dhcp6_domain_search}\n" -+ fi -+ for nameserver in ${new_dhcp6_name_servers} ; do -+ conf="${conf}nameserver ${nameserver}$zone_id\n" -+ done -+ fi - -- if [ $exit_status -ne 0 ] ; then -- $LOGGER "Error while writing new /etc/resolv.conf." -- fi -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf - fi - fi - } ---- dhcp-4.3.6/client/scripts/linux -+++ dhcp-4.3.6/client/scripts/linux -@@ -35,16 +35,16 @@ - # update /etc/resolv.conf based on received values - # This updated version mostly follows Debian script by Andrew Pollock et al. - make_resolv_conf() { -- local new_resolv_conf -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf - - # DHCPv4 - if [ -n "$new_domain_search" ] || [ -n "$new_domain_name" ] || - [ -n "$new_domain_name_servers" ]; then -- new_resolv_conf=/etc/resolv.conf.dhclient-new -- rm -f $new_resolv_conf -- - if [ -n "$new_domain_name" ]; then -- echo domain ${new_domain_name%% *} >>$new_resolv_conf -+ conf="${conf}domain ${new_domain_name%% *}\n" - fi - - if [ -n "$new_domain_search" ]; then -@@ -60,31 +60,23 @@ - new_domain_search="$new_domain_name $new_domain_search" - fi - fi -- echo "search ${new_domain_search}" >> $new_resolv_conf -+ conf="${conf}search ${new_domain_search}\n" - elif [ -n "$new_domain_name" ]; then -- echo "search ${new_domain_name}" >> $new_resolv_conf -+ conf="${conf}search ${new_domain_name}\n" - fi - - if [ -n "$new_domain_name_servers" ]; then - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>$new_resolv_conf -+ conf="${conf}nameserver $nameserver\n" - done - else # keep 'old' nameservers -- sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf -+ conf="${conf}$(sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf)\n" - fi - -- if [ -f /etc/resolv.conf ]; then -- chown --reference=/etc/resolv.conf $new_resolv_conf -- chmod --reference=/etc/resolv.conf $new_resolv_conf -- fi -- mv -f $new_resolv_conf /etc/resolv.conf - # DHCPv6 - elif [ -n "$new_dhcp6_domain_search" ] || [ -n "$new_dhcp6_name_servers" ]; then -- new_resolv_conf=/etc/resolv.conf.dhclient-new -- rm -f $new_resolv_conf -- - if [ -n "$new_dhcp6_domain_search" ]; then -- echo "search ${new_dhcp6_domain_search}" >> $new_resolv_conf -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - - if [ -n "$new_dhcp6_name_servers" ]; then -@@ -94,17 +86,21 @@ - [ "${nameserver##FE80::}" != "$nameserver" ]; then - nameserver="${nameserver}%${interface}" - fi -- echo nameserver $nameserver >>$new_resolv_conf -+ conf="${conf}nameserver $nameserver\n" - done - else # keep 'old' nameservers -- sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf -+ conf="${conf}$(sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf)\n" - fi -+ fi - -- if [ -f /etc/resolv.conf ]; then -- chown --reference=/etc/resolv.conf $new_resolv_conf -- chmod --reference=/etc/resolv.conf $new_resolv_conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf - fi -- mv -f $new_resolv_conf /etc/resolv.conf - fi - } - ---- dhcp-4.3.6/client/scripts/netbsd -+++ dhcp-4.3.6/client/scripts/netbsd -@@ -1,27 +1,25 @@ - #!/bin/sh - - make_resolv_conf() { -- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= -+ if [ x"$new_domain_name_servers" != x ]; then - if [ "x$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_search}\n" - elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do - # If the nameserver has a link-local address -@@ -31,10 +29,18 @@ - FE80:*) zone_id="%$interface";; - *) zone_id="";; - esac -- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}$zone_id\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi - } - ---- dhcp-4.3.6/client/scripts/openbsd -+++ dhcp-4.3.6/client/scripts/openbsd -@@ -1,27 +1,25 @@ - #!/bin/sh - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" - done -- -- mv /etc/resolv.conf.dhclient /etc/resolv.conf - elif [ "x${new_dhcp6_name_servers}" != x ] ; then -- cat /dev/null > /etc/resolv.conf.dhclient6 -- chmod 644 /etc/resolv.conf.dhclient6 -- - if [ "x${new_dhcp6_domain_search}" != x ] ; then -- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 -+ conf="${conf}search ${new_dhcp6_domain_search}\n" - fi - for nameserver in ${new_dhcp6_name_servers} ; do - # If the nameserver has a link-local address -@@ -31,10 +29,18 @@ - FE80:*) zone_id="%$interface";; - *) zone_id="";; - esac -- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 -+ conf="${conf}nameserver ${nameserver}$zone_id\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi - } - ---- dhcp-4.3.6/client/scripts/solaris -+++ dhcp-4.3.6/client/scripts/solaris -@@ -1,21 +1,39 @@ - #!/bin/sh - - make_resolv_conf() { -+ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then -+ return 0 -+ fi -+ local conf= - if [ x"$new_domain_name_servers" != x ]; then -- cat /dev/null > /etc/resolv.conf.dhclient -- if [ x"$new_domain_search" != x ]; then -- echo search $new_domain_search >> /etc/resolv.conf.dhclient -- elif [ x"$new_domain_name" != x ]; then -+ if [ "x$new_domain_search" != x ]; then -+ conf="${conf}search ${new_domain_search}\n" -+ elif [ "x$new_domain_name" != x ]; then - # Note that the DHCP 'Domain Name Option' is really just a domain - # name, and that this practice of using the domain name option as - # a search path is both nonstandard and deprecated. -- echo search $new_domain_name >> /etc/resolv.conf.dhclient -+ conf="${conf}search ${new_domain_name}\n" - fi - for nameserver in $new_domain_name_servers; do -- echo nameserver $nameserver >>/etc/resolv.conf.dhclient -+ conf="${conf}nameserver ${nameserver}\n" -+ done -+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then -+ if [ "x${new_dhcp6_domain_search}" != x ] ; then -+ conf="${conf}search ${new_dhcp6_domain_search}\n" -+ fi -+ for nameserver in ${new_dhcp6_name_servers} ; do -+ conf="${conf}nameserver ${nameserver}\n" - done -+ fi - -- mv /etc/resolv.conf.dhclient /etc/resolv.conf -+ if [ x"$conf" != x ]; then -+ conf="# Generated by dhclient or interface $interface\n${conf}" -+ if type resolvconf >/dev/null 2>&1; then -+ printf "${conf}" | resolvconf -a $interface -+ else -+ printf "${conf}" > /etc/resolv.conf -+ chmod 644 /etc/resolv.conf -+ fi - fi - } - diff --git a/net-misc/dhcp/files/dhcp-4.3.6-iproute2-path.patch b/net-misc/dhcp/files/dhcp-4.3.6-iproute2-path.patch deleted file mode 100644 index 18b04e620c14..000000000000 --- a/net-misc/dhcp/files/dhcp-4.3.6-iproute2-path.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- dhcp-4.3.6/client/scripts/linux -+++ dhcp-4.3.6/client/scripts/linux -@@ -30,7 +30,7 @@ - # 'ip' just looks too weird. Also, we now have unit-tests! Those unit-tests - # overwirte this line to use a fake ip-echo tool. It's also convenient - # if your system holds ip tool in a non-standard location. --ip=/sbin/ip -+ip=ip - - # update /etc/resolv.conf based on received values - # This updated version mostly follows Debian script by Andrew Pollock et al. diff --git a/net-misc/dhcp/files/dhcp-4.3.6-nogateway.patch b/net-misc/dhcp/files/dhcp-4.3.6-nogateway.patch deleted file mode 100644 index d299cc503f60..000000000000 --- a/net-misc/dhcp/files/dhcp-4.3.6-nogateway.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- dhcp-4.3.6/client/scripts/linux -+++ dhcp-4.3.6/client/scripts/linux -@@ -242,20 +242,22 @@ - if_metric=${if_metric:-1} - fi - -- for router in $new_routers; do -- if [ "$new_subnet_mask" = "255.255.255.255" ]; then -- # point-to-point connection => set explicit route -- ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1 -- fi -- -- # set default route -- ${ip} -4 route add default via ${router} dev ${interface} \ -- ${if_metric:+metric $if_metric} >/dev/null 2>&1 -- -- if [ -n "$if_metric" ]; then -- if_metric=$((if_metric+1)) -- fi -- done -+ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then -+ for router in $new_routers; do -+ if [ "$new_subnet_mask" = "255.255.255.255" ]; then -+ # point-to-point connection => set explicit route -+ ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1 -+ fi -+ -+ # set default route -+ ${ip} -4 route add default via ${router} dev ${interface} \ -+ ${if_metric:+metric $if_metric} >/dev/null 2>&1 -+ -+ if [ -n "$if_metric" ]; then -+ if_metric=$((if_metric+1)) -+ fi -+ done -+ fi - fi - fi - -@@ -330,15 +332,17 @@ - if_metric=${if_metric:-1} - fi - -- # set default route -- for router in $new_routers; do -- ${ip} -4 route add default via ${router} dev ${interface} \ -- ${if_metric:+metric $if_metric} >/dev/null 2>&1 -- -- if [ -n "$if_metric" ]; then -- if_metric=$((if_metric+1)) -- fi -- done -+ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then -+ # set default route -+ for router in $new_routers; do -+ ${ip} -4 route add default via ${router} dev ${interface} \ -+ ${if_metric:+metric $if_metric} >/dev/null 2>&1 -+ -+ if [ -n "$if_metric" ]; then -+ if_metric=$((if_metric+1)) -+ fi -+ done -+ fi - fi - - # update /etc/resolv.conf diff --git a/net-misc/dhcp/files/dhcp-4.3.6-quieter-ping.patch b/net-misc/dhcp/files/dhcp-4.3.6-quieter-ping.patch deleted file mode 100644 index 3efb6459ebf9..000000000000 --- a/net-misc/dhcp/files/dhcp-4.3.6-quieter-ping.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- dhcp-4.3.6/client/scripts/bsdos -+++ dhcp-4.3.6/client/scripts/bsdos -@@ -220,7 +220,7 @@ - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers -- if ping -q -c 1 -w 1 $1; then -+ if ping -q -c 1 -w 1 $1 >/dev/null; then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg ---- dhcp-4.3.6/client/scripts/freebsd -+++ dhcp-4.3.6/client/scripts/freebsd -@@ -287,7 +287,7 @@ - if [ -n "$new_routers" ]; then - $LOGGER "New Routers: $new_routers" - set -- $new_routers -- if ping -q -c 1 $1; then -+ if ping -q -c 1 $1 >/dev/null; then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg ---- dhcp-4.3.6/client/scripts/linux -+++ dhcp-4.3.6/client/scripts/linux -@@ -311,7 +311,7 @@ - fi - - # if there is no router recorded in the lease or the 1st router answers pings -- if [ -z "$new_routers" ] || ping -q -c 1 "${new_routers%% *}"; then -+ if [ -z "$new_routers" ] || ping -q -c 1 "${new_routers%% *}" >/dev/null; then - # if we have $new_rfc3442_classless_static_routes then we have to - # ignore $new_routers entirely - if [ ! "$new_rfc3442_classless_static_routes" ]; then ---- dhcp-4.3.6/client/scripts/netbsd -+++ dhcp-4.3.6/client/scripts/netbsd -@@ -220,7 +220,7 @@ - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers -- if ping -q -c 1 -w 1 $1; then -+ if ping -q -c 1 -w 1 $1 >/dev/null; then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg ---- dhcp-4.3.6/client/scripts/openbsd -+++ dhcp-4.3.6/client/scripts/openbsd -@@ -214,7 +214,7 @@ - sleep 1 - if [ "$new_routers" != "" ]; then - set $new_routers -- if ping -q -c 1 -w 1 $1; then -+ if ping -q -c 1 -w 1 $1 >/dev/null; then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg ---- dhcp-4.3.6/client/scripts/openwrt -+++ dhcp-4.3.6/client/scripts/openwrt -@@ -190,7 +190,7 @@ - ifconfig $interface $new_ip_address $new_subnet_arg \ - $new_broadcast_arg $mtu_arg - set $new_routers -- if ping -q -c 1 $1; then -+ if ping -q -c 1 $1 >/dev/null; then - if [ x$new_ip_address != x$alias_ip_address ] && \ - [ x$alias_ip_address != x ]; then - ifconfig $interface:0 $alias_ip_address $alias_subnet_arg diff --git a/net-misc/dhcp/files/dhcp-4.4.0-always-accept-4.patch b/net-misc/dhcp/files/dhcp-4.4.0-always-accept-4.patch deleted file mode 100644 index bbb25eb194bd..000000000000 --- a/net-misc/dhcp/files/dhcp-4.4.0-always-accept-4.patch +++ /dev/null @@ -1,29 +0,0 @@ -https://bugs.gentoo.org/437108 - -Always accept the -4 option even if we don't have IPv6 support enabled. -The relay code does this already. - ---- dhcp-4.4.0/client/dhclient.c -+++ dhcp-4.4.0/client/dhclient.c -@@ -353,8 +353,8 @@ - if (!strcmp(argv[i], "-r")) { - release_mode = 1; - /* no_daemon = 1; */ --#ifdef DHCPv6 - } else if (!strcmp(argv[i], "-4")) { -+#ifdef DHCPv6 - if (local_family_set && local_family != AF_INET) - log_fatal("Client can only do v4 or v6, not " - "both."); ---- dhcp-4.4.0/server/dhcpd.c -+++ dhcp-4.4.0/server/dhcpd.c -@@ -495,8 +495,8 @@ - } else if (!strcmp (argv [i], "-q")) { - quiet = 1; - quiet_interface_discovery = 1; --#ifdef DHCPv6 - } else if (!strcmp(argv[i], "-4")) { -+#ifdef DHCPv6 - if (local_family_set && (local_family != AF_INET)) { - log_fatal("Server cannot run in both IPv4 and " - "IPv6 mode at the same time."); diff --git a/net-misc/dhcp/files/dhcp-4.4.0-bind-disable.patch b/net-misc/dhcp/files/dhcp-4.4.0-bind-disable.patch deleted file mode 100644 index b74255ca4e97..000000000000 --- a/net-misc/dhcp/files/dhcp-4.4.0-bind-disable.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- dhcp-4.4.0/bind/Makefile.in -+++ dhcp-4.4.0/bind/Makefile.in -@@ -37,6 +37,7 @@ - @BIND_ATF_TRUE@all: bind1 atf bind2 - - bind1: -+disable: - # Extract the source from the tarball, if it hasn't been already. - @if test -d ${bindsrcdir} ; then \ - echo ${bindsrcdir} already unpacked... ; \ -@@ -60,6 +61,7 @@ - fi - - atf: -+disable: - # Build and copy the ATF support if not yet installed. - @if test -d ./atf ; then \ - echo ATF support already installed ; \ ---- dhcp-4.4.0/bind/test -+++ dhcp-4.4.0/bind/test -@@ -0,0 +1 @@ -+--disable-kqueue --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --with-gssapi=no --enable-threads=no @BINDCONFIG@ --includedir=${binddir}/include --libdir=${binddir}/lib diff --git a/net-misc/dhcp/files/dhcp-4.4.2-fno-common.patch b/net-misc/dhcp/files/dhcp-4.4.2-fno-common.patch deleted file mode 100644 index 5d0b7bdd5352..000000000000 --- a/net-misc/dhcp/files/dhcp-4.4.2-fno-common.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/client/dhclient.c -+++ b/client/dhclient.c -@@ -83,8 +83,6 @@ - static const char url [] = "For info, please visit https://www.isc.org/software/dhcp/"; - #endif /* UNIT_TEST */ - --u_int16_t local_port = 0; --u_int16_t remote_port = 0; - #if defined(DHCPv6) && defined(DHCP4o6) - int dhcp4o6_state = -1; /* -1 = stopped, 0 = polling, 1 = started */ - #endif ---- a/relay/dhcrelay.c -+++ b/relay/dhcrelay.c -@@ -95,9 +95,6 @@ - forward_untouched, /* Forward without changes. */ - discard } agent_relay_mode = forward_and_replace; - --u_int16_t local_port; --u_int16_t remote_port; -- - /* Relay agent server list. */ - struct server_list { - struct server_list *next; ---- a/server/mdb.c -+++ b/server/mdb.c -@@ -67,8 +67,6 @@ - - int numclasseswritten; - --omapi_object_type_t *dhcp_type_host; -- - isc_result_t enter_class(cd, dynamicp, commit) - struct class *cd; - int dynamicp; diff --git a/net-misc/dhcp/files/dhcp-4.4.2-variable-name.patch b/net-misc/dhcp/files/dhcp-4.4.2-variable-name.patch deleted file mode 100644 index 9f5085dd5e23..000000000000 --- a/net-misc/dhcp/files/dhcp-4.4.2-variable-name.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 261c84d91d1b4581df9f7f0ec031908299de7726 Mon Sep 17 00:00:00 2001 -From: Mark Andrews -Date: Thu, 19 Dec 2019 09:27:44 +1100 -Subject: [PATCH] fix variable name in conditional block - ---- - lib/isc/stats.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/isc/stats.c b/lib/isc/stats.c -index 5bce3c1100..a7ab97ce53 100644 ---- a/bind/bind-9.11.14/lib/isc/stats.c -+++ b/bind/bind-9.11.14/lib/isc/stats.c -@@ -297,7 +297,7 @@ setcounter(isc_stats_t *stats, - isc_atomic_store((int32_t *)&stats->counters[counter].lo, - (uint32_t)(value & 0xffffffff)); - # else -- stats->counters[counter] = val; -+ stats->counters[counter] = value; - # endif - #endif - } --- -GitLab - diff --git a/net-misc/dhcp/files/dhcp-4.4.3-always-accept-4.patch b/net-misc/dhcp/files/dhcp-4.4.3-always-accept-4.patch new file mode 100644 index 000000000000..bbb25eb194bd --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.3-always-accept-4.patch @@ -0,0 +1,29 @@ +https://bugs.gentoo.org/437108 + +Always accept the -4 option even if we don't have IPv6 support enabled. +The relay code does this already. + +--- dhcp-4.4.0/client/dhclient.c ++++ dhcp-4.4.0/client/dhclient.c +@@ -353,8 +353,8 @@ + if (!strcmp(argv[i], "-r")) { + release_mode = 1; + /* no_daemon = 1; */ +-#ifdef DHCPv6 + } else if (!strcmp(argv[i], "-4")) { ++#ifdef DHCPv6 + if (local_family_set && local_family != AF_INET) + log_fatal("Client can only do v4 or v6, not " + "both."); +--- dhcp-4.4.0/server/dhcpd.c ++++ dhcp-4.4.0/server/dhcpd.c +@@ -495,8 +495,8 @@ + } else if (!strcmp (argv [i], "-q")) { + quiet = 1; + quiet_interface_discovery = 1; +-#ifdef DHCPv6 + } else if (!strcmp(argv[i], "-4")) { ++#ifdef DHCPv6 + if (local_family_set && (local_family != AF_INET)) { + log_fatal("Server cannot run in both IPv4 and " + "IPv6 mode at the same time."); diff --git a/net-misc/dhcp/files/dhcp-4.4.3-bindtodevice-inet6.patch b/net-misc/dhcp/files/dhcp-4.4.3-bindtodevice-inet6.patch new file mode 100644 index 000000000000..f6ea0f858c6d --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.3-bindtodevice-inet6.patch @@ -0,0 +1,18 @@ +https://bugs.gentoo.org/471142 + +snipped from fedora + +# dhclient -6: bind socket to interface (#1001742) +# (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #34784]) + +--- a/common/socket.c ++++ b/common/socket.c +@@ -266,7 +266,7 @@ + + #if defined(SO_BINDTODEVICE) + /* Bind this socket to this interface. */ +- if ((local_family != AF_INET6) && (info->ifp != NULL) && ++ if (((do_multicast == 0)||(*do_multicast == 0)) && (info->ifp != NULL) && + setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, + (char *)(info -> ifp), sizeof(*(info -> ifp))) < 0) { + log_fatal("Can't set SO_BINDTODEVICE on dhcp socket for" diff --git a/net-misc/dhcp/files/dhcp-4.4.3-configure-clang16.patch b/net-misc/dhcp/files/dhcp-4.4.3-configure-clang16.patch new file mode 100644 index 000000000000..38c24ff9f2bb --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.3-configure-clang16.patch @@ -0,0 +1,143 @@ +https://src.fedoraproject.org/rpms/dhcp/blob/5a0c1922defd9dbb94fa7d9fd3294031ffe72df9/f/0030-bind-configure-c99.patch + +Downstream-only patch. +Upstream bind9 development has changed configure significantly: +https://gitlab.isc.org/isc-projects/bind9 + +From 035224d94d4cf93257cf5440a2e4e129540e81e8 Mon Sep 17 00:00:00 2001 +From: Arjun Shankar +Date: Thu, 20 Apr 2023 15:34:01 +0200 +Subject: [PATCH] Port to C99 + +--- a/bind/bind-9.11.36/configure ++++ b/bind/bind-9.11.36/configure +@@ -20016,7 +20016,7 @@ else + #include + #include + #include +-main() { ++int main() { + char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +@@ -20056,7 +20056,7 @@ else + #include + #include + #include +-main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : ++int main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : + inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : + (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); } + _ACEOF +@@ -21346,7 +21346,7 @@ else + #include + #include + #include +-main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));} ++int main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5 +@@ -21363,7 +21363,7 @@ else + #include + #include + #include +-main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));} ++int main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: long int" >&5 +@@ -21380,7 +21380,7 @@ else + #include + #include + #include +-main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));} ++int main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));} + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: long long int" >&5 +@@ -21759,7 +21759,7 @@ int + main () + { + +- main() { asm("ics"); exit(0); } ++ int main() { asm("ics"); exit(0); } + + ; + return 0; +@@ -21782,7 +21782,7 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +- main() { asm("ics"); exit(0); } ++ int main() { asm("ics"); exit(0); } + + _ACEOF + if ac_fn_c_try_run "$LINENO"; then : +--- a/bind/bind-9.11.36/configure.ac ++++ b/bind/bind-9.11.36/configure.ac +@@ -3274,7 +3274,7 @@ AC_TRY_RUN([ + #include + #include + #include +-main() { ++int main() { + char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}], + [AC_MSG_RESULT(yes) + ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"], +@@ -3297,7 +3297,7 @@ AC_TRY_RUN([ + #include + #include + #include +-main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : ++int main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : + inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : + (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }], + [AC_MSG_RESULT(yes) +@@ -3901,7 +3901,7 @@ AC_TRY_RUN([ + #include + #include + #include +-main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}], ++int main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}], + [AC_MSG_RESULT(int) + ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"], + [ +@@ -3909,7 +3909,7 @@ AC_TRY_RUN([ + #include + #include + #include +-main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}], ++int main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}], + [AC_MSG_RESULT(long int) + ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"], + [ +@@ -3917,7 +3917,7 @@ AC_TRY_RUN([ + #include + #include + #include +-main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}], ++int main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}], + [AC_MSG_RESULT(long long int) + ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"], + [AC_MSG_ERROR([unable to determine sizeof rlim_cur]) +@@ -4117,7 +4117,7 @@ case "$enable_atomic" in + if test "X$GCC" = "Xyes"; then + AC_MSG_CHECKING([if asm("ics"); works]) + AC_TRY_COMPILE(,[ +- main() { asm("ics"); exit(0); } ++ int main() { asm("ics"); exit(0); } + ], + [AC_MSG_RESULT(yes) + use_atomic=yes], +@@ -4125,7 +4125,7 @@ case "$enable_atomic" in + saved_cflags="$CFLAGS" + CFLAGS="$CFLAGS -Wa,-many" + AC_TRY_RUN([ +- main() { asm("ics"); exit(0); } ++ int main() { asm("ics"); exit(0); } + ], + [AC_MSG_RESULT([yes, required -Wa,-many]) + use_atomic=yes], +-- +2.40.0 diff --git a/net-misc/dhcp/files/dhcp-4.4.3-dhclient-ntp.patch b/net-misc/dhcp/files/dhcp-4.4.3-dhclient-ntp.patch new file mode 100644 index 000000000000..a504840dd5ab --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.3-dhclient-ntp.patch @@ -0,0 +1,210 @@ +--- dhcp-4.3.6/client/clparse.c ++++ dhcp-4.3.6/client/clparse.c +@@ -31,7 +31,7 @@ + + struct client_config top_level_config; + +-#define NUM_DEFAULT_REQUESTED_OPTS 9 ++#define NUM_DEFAULT_REQUESTED_OPTS 10 + /* There can be 2 extra requested options for DHCPv4-over-DHCPv6. */ + struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 2 + 1]; + +@@ -107,15 +107,20 @@ + dhcp_universe.code_hash, &code, 0, MDL); + + /* 8 */ +- code = D6O_NAME_SERVERS; ++ code = DHO_NTP_SERVERS; + option_code_hash_lookup(&default_requested_options[7], +- dhcpv6_universe.code_hash, &code, 0, MDL); ++ dhcp_universe.code_hash, &code, 0, MDL); + + /* 9 */ +- code = D6O_DOMAIN_SEARCH; ++ code = D6O_NAME_SERVERS; + option_code_hash_lookup(&default_requested_options[8], + dhcpv6_universe.code_hash, &code, 0, MDL); + ++ /* 10 */ ++ code = D6O_DOMAIN_SEARCH; ++ option_code_hash_lookup(&default_requested_options[9], ++ dhcpv6_universe.code_hash, &code, 0, MDL); ++ + for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) { + if (default_requested_options[code] == NULL) + log_fatal("Unable to find option definition for " +--- dhcp-4.3.6/client/scripts/bsdos ++++ dhcp-4.3.6/client/scripts/bsdos +@@ -36,6 +36,26 @@ + + mv /etc/resolv.conf.dhclient6 /etc/resolv.conf + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ x$new_ntp_servers != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +--- dhcp-4.3.6/client/scripts/freebsd ++++ dhcp-4.3.6/client/scripts/freebsd +@@ -80,6 +80,26 @@ + fi + fi + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +--- dhcp-4.3.6/client/scripts/linux ++++ dhcp-4.3.6/client/scripts/linux +@@ -106,6 +106,27 @@ + fi + mv -f $new_resolv_conf /etc/resolv.conf + fi ++ ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # set host name +--- dhcp-4.3.6/client/scripts/netbsd ++++ dhcp-4.3.6/client/scripts/netbsd +@@ -36,6 +36,26 @@ + + mv /etc/resolv.conf.dhclient6 /etc/resolv.conf + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +--- dhcp-4.3.6/client/scripts/openbsd ++++ dhcp-4.3.6/client/scripts/openbsd +@@ -36,6 +36,26 @@ + + mv /etc/resolv.conf.dhclient6 /etc/resolv.conf + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. +--- dhcp-4.3.6/client/scripts/solaris ++++ dhcp-4.3.6/client/scripts/solaris +@@ -17,6 +17,26 @@ + + mv /etc/resolv.conf.dhclient /etc/resolv.conf + fi ++ # If we're making confs, may as well make an ntp.conf too ++ make_ntp_conf ++} ++ ++make_ntp_conf() { ++ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then ++ if [ "x$new_ntp_servers" != x ]; then ++ conf="# Generated by dhclient for interface $interface\n" ++ conf="${conf}restrict default noquery notrust nomodify\n" ++ conf="${conf}restrict 127.0.0.1\n" ++ for ntpserver in $new_ntp_servers; do ++ conf="${conf}restrict $ntpserver nomodify notrap noquery\n" ++ conf="${conf}server $ntpserver\n" ++ done ++ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n" ++ conf="${conf}logfile /var/log/ntp.log\n" ++ printf "${conf}" > /etc/ntp.conf ++ chmod 644 /etc/ntp.conf ++ fi ++ fi + } + + # Must be used on exit. Invokes the local dhcp client exit hooks, if any. diff --git a/net-misc/dhcp/files/dhcp-4.4.3-dhclient-resolvconf.patch b/net-misc/dhcp/files/dhcp-4.4.3-dhclient-resolvconf.patch new file mode 100644 index 000000000000..63a67b7b1151 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.3-dhclient-resolvconf.patch @@ -0,0 +1,422 @@ +--- a/client/scripts/bsdos ++++ b/client/scripts/bsdos +@@ -1,27 +1,25 @@ + #!/bin/sh + + make_resolv_conf() { ++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf= + if [ x"$new_domain_name_servers" != x ]; then +- cat /dev/null > /etc/resolv.conf.dhclient + if [ "x$new_domain_search" != x ]; then +- echo search $new_domain_search >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_search}\n" + elif [ "x$new_domain_name" != x ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. +- echo search $new_domain_name >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_name}\n" + fi + for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >> /etc/resolv.conf.dhclient ++ conf="${conf}nameserver ${nameserver}\n" + done +- +- mv /etc/resolv.conf.dhclient /etc/resolv.conf + elif [ "x${new_dhcp6_name_servers}" != x ] ; then +- cat /dev/null > /etc/resolv.conf.dhclient6 +- chmod 644 /etc/resolv.conf.dhclient6 +- + if [ "x${new_dhcp6_domain_search}" != x ] ; then +- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ++ conf="${conf}search ${new_dhcp6_domain_search}\n" + fi + for nameserver in ${new_dhcp6_name_servers} ; do + # If the nameserver has a link-local address +@@ -31,10 +29,18 @@ + FE80:*) zone_id="%$interface";; + *) zone_id="";; + esac +- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 ++ conf="${conf}nameserver ${nameserver}$zone_id\n" + done ++ fi + +- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi + fi + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf +--- a/client/scripts/freebsd ++++ b/client/scripts/freebsd +@@ -11,54 +11,23 @@ + fi + + make_resolv_conf() { ++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf= + if [ x"$new_domain_name_servers" != x ]; then +- ( cat /dev/null > /etc/resolv.conf.dhclient ) +- exit_status=$? +- if [ $exit_status -ne 0 ]; then +- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status" +- else +- if [ "x$new_domain_search" != x ]; then +- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient ) +- exit_status=$? +- elif [ "x$new_domain_name" != x ]; then +- # Note that the DHCP 'Domain Name Option' is really just a domain +- # name, and that this practice of using the domain name option as +- # a search path is both nonstandard and deprecated. +- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient ) +- exit_status=$? +- fi +- for nameserver in $new_domain_name_servers; do +- if [ $exit_status -ne 0 ]; then +- break +- fi +- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient ) +- exit_status=$? +- done +- +- # If there were no errors, attempt to mv the new file into place. +- if [ $exit_status -eq 0 ]; then +- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf ) +- exit_status=$? +- fi +- +- if [ $exit_status -ne 0 ]; then +- $LOGGER "Error while writing new /etc/resolv.conf." +- fi ++ if [ "x$new_domain_search" != x ]; then ++ conf="${conf}search ${new_domain_search}\n" ++ elif [ "x$new_domain_name" != x ]; then ++ # Note that the DHCP 'Domain Name Option' is really just a domain ++ # name, and that this practice of using the domain name option as ++ # a search path is both nonstandard and deprecated. ++ conf="${conf}search ${new_domain_name}\n" + fi ++ for nameserver in $new_domain_name_servers; do ++ conf="${conf}nameserver ${nameserver}\n" ++ done + elif [ "x${new_dhcp6_name_servers}" != x ] ; then +- ( cat /dev/null > /etc/resolv.conf.dhclient6 ) +- exit_status=$? +- if [ $exit_status -ne 0 ] ; then +- $LOGGER "Unable to create /etc/resolv.conf.dhclient6: Error $exit_status" +- else +- if [ "x${new_dhcp6_domain_search}" != x ] ; then +- ( echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ) +- exit_status=$? +- fi +- for nameserver in ${new_dhcp6_name_servers} ; do +- if [ $exit_status -ne 0 ] ; then +- break +- fi + # If the nameserver has a link-local address + # add a (interface name) to it. + case $nameserver in +@@ -66,18 +35,21 @@ + FE80:*) zone_id="%$interface";; + *) zone_id="";; + esac +- ( echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 ) +- exit_status=$? +- done +- +- if [ $exit_status -eq 0 ] ; then +- ( mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ) +- exit_status=$? +- fi ++ if [ "x${new_dhcp6_domain_search}" != x ] ; then ++ conf="${conf}search ${new_dhcp6_domain_search}\n" ++ fi ++ for nameserver in ${new_dhcp6_name_servers} ; do ++ conf="${conf}nameserver ${nameserver}$zone_id\n" ++ done ++ fi + +- if [ $exit_status -ne 0 ] ; then +- $LOGGER "Error while writing new /etc/resolv.conf." +- fi ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf + fi + fi + # If we're making confs, may as well make an ntp.conf too +--- a/client/scripts/linux ++++ b/client/scripts/linux +@@ -35,16 +35,16 @@ + # update /etc/resolv.conf based on received values + # This updated version mostly follows Debian script by Andrew Pollock et al. + make_resolv_conf() { +- local new_resolv_conf ++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf + + # DHCPv4 + if [ -n "$new_domain_search" ] || [ -n "$new_domain_name" ] || + [ -n "$new_domain_name_servers" ]; then +- new_resolv_conf=/etc/resolv.conf.dhclient-new +- rm -f $new_resolv_conf +- + if [ -n "$new_domain_name" ]; then +- echo domain ${new_domain_name%% *} >>$new_resolv_conf ++ conf="${conf}domain ${new_domain_name%% *}\n" + fi + + if [ -n "$new_domain_search" ]; then +@@ -60,31 +60,23 @@ + new_domain_search="$new_domain_name $new_domain_search" + fi + fi +- echo "search ${new_domain_search}" >> $new_resolv_conf ++ conf="${conf}search ${new_domain_search}\n" + elif [ -n "$new_domain_name" ]; then +- echo "search ${new_domain_name}" >> $new_resolv_conf ++ conf="${conf}search ${new_domain_name}\n" + fi + + if [ -n "$new_domain_name_servers" ]; then + for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>$new_resolv_conf ++ conf="${conf}nameserver $nameserver\n" + done + else # keep 'old' nameservers +- sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf ++ conf="${conf}$(sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf)\n" + fi + +- if [ -f /etc/resolv.conf ]; then +- chown --reference=/etc/resolv.conf $new_resolv_conf +- chmod --reference=/etc/resolv.conf $new_resolv_conf +- fi +- mv -f $new_resolv_conf /etc/resolv.conf + # DHCPv6 + elif [ -n "$new_dhcp6_domain_search" ] || [ -n "$new_dhcp6_name_servers" ]; then +- new_resolv_conf=/etc/resolv.conf.dhclient-new +- rm -f $new_resolv_conf +- + if [ -n "$new_dhcp6_domain_search" ]; then +- echo "search ${new_dhcp6_domain_search}" >> $new_resolv_conf ++ conf="${conf}search ${new_dhcp6_domain_search}\n" + fi + + if [ -n "$new_dhcp6_name_servers" ]; then +@@ -94,17 +86,21 @@ + [ "${nameserver##FE80::}" != "$nameserver" ]; then + nameserver="${nameserver}%${interface}" + fi +- echo nameserver $nameserver >>$new_resolv_conf ++ conf="${conf}nameserver $nameserver\n" + done + else # keep 'old' nameservers +- sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf ++ conf="${conf}$(sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf)\n" + fi ++ fi + +- if [ -f /etc/resolv.conf ]; then +- chown --reference=/etc/resolv.conf $new_resolv_conf +- chmod --reference=/etc/resolv.conf $new_resolv_conf ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf + fi +- mv -f $new_resolv_conf /etc/resolv.conf + fi + + # If we're making confs, may as well make an ntp.conf too +--- a/client/scripts/netbsd ++++ b/client/scripts/netbsd +@@ -1,27 +1,25 @@ + #!/bin/sh + + make_resolv_conf() { +- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then +- cat /dev/null > /etc/resolv.conf.dhclient ++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf= ++ if [ x"$new_domain_name_servers" != x ]; then + if [ "x$new_domain_search" != x ]; then +- echo search $new_domain_search >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_search}\n" + elif [ "x$new_domain_name" != x ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. +- echo search $new_domain_name >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_name}\n" + fi + for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>/etc/resolv.conf.dhclient ++ conf="${conf}nameserver ${nameserver}\n" + done +- +- mv /etc/resolv.conf.dhclient /etc/resolv.conf + elif [ "x${new_dhcp6_name_servers}" != x ] ; then +- cat /dev/null > /etc/resolv.conf.dhclient6 +- chmod 644 /etc/resolv.conf.dhclient6 +- + if [ "x${new_dhcp6_domain_search}" != x ] ; then +- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ++ conf="${conf}search ${new_dhcp6_domain_search}\n" + fi + for nameserver in ${new_dhcp6_name_servers} ; do + # If the nameserver has a link-local address +@@ -31,10 +29,18 @@ + FE80:*) zone_id="%$interface";; + *) zone_id="";; + esac +- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 ++ conf="${conf}nameserver ${nameserver}$zone_id\n" + done ++ fi + +- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi + fi + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf +--- a/client/scripts/openbsd ++++ b/client/scripts/openbsd +@@ -1,27 +1,25 @@ + #!/bin/sh + + make_resolv_conf() { ++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf= + if [ x"$new_domain_name_servers" != x ]; then +- cat /dev/null > /etc/resolv.conf.dhclient +- if [ x"$new_domain_search" != x ]; then +- echo search $new_domain_search >> /etc/resolv.conf.dhclient +- elif [ x"$new_domain_name" != x ]; then ++ if [ "x$new_domain_search" != x ]; then ++ conf="${conf}search ${new_domain_search}\n" ++ elif [ "x$new_domain_name" != x ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. +- echo search $new_domain_name >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_name}\n" + fi + for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>/etc/resolv.conf.dhclient ++ conf="${conf}nameserver ${nameserver}\n" + done +- +- mv /etc/resolv.conf.dhclient /etc/resolv.conf + elif [ "x${new_dhcp6_name_servers}" != x ] ; then +- cat /dev/null > /etc/resolv.conf.dhclient6 +- chmod 644 /etc/resolv.conf.dhclient6 +- + if [ "x${new_dhcp6_domain_search}" != x ] ; then +- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 ++ conf="${conf}search ${new_dhcp6_domain_search}\n" + fi + for nameserver in ${new_dhcp6_name_servers} ; do + # If the nameserver has a link-local address +@@ -31,10 +29,18 @@ + FE80:*) zone_id="%$interface";; + *) zone_id="";; + esac +- echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 ++ conf="${conf}nameserver ${nameserver}$zone_id\n" + done ++ fi + +- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi + fi + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf +--- a/client/scripts/solaris ++++ b/client/scripts/solaris +@@ -1,21 +1,39 @@ + #!/bin/sh + + make_resolv_conf() { ++ if [ x"$PEER_DNS" != x ] && [ x"$PEER_DNS" != xyes ]; then ++ return 0 ++ fi ++ local conf= + if [ x"$new_domain_name_servers" != x ]; then +- cat /dev/null > /etc/resolv.conf.dhclient +- if [ x"$new_domain_search" != x ]; then +- echo search $new_domain_search >> /etc/resolv.conf.dhclient +- elif [ x"$new_domain_name" != x ]; then ++ if [ "x$new_domain_search" != x ]; then ++ conf="${conf}search ${new_domain_search}\n" ++ elif [ "x$new_domain_name" != x ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. +- echo search $new_domain_name >> /etc/resolv.conf.dhclient ++ conf="${conf}search ${new_domain_name}\n" + fi + for nameserver in $new_domain_name_servers; do +- echo nameserver $nameserver >>/etc/resolv.conf.dhclient ++ conf="${conf}nameserver ${nameserver}\n" ++ done ++ elif [ "x${new_dhcp6_name_servers}" != x ] ; then ++ if [ "x${new_dhcp6_domain_search}" != x ] ; then ++ conf="${conf}search ${new_dhcp6_domain_search}\n" ++ fi ++ for nameserver in ${new_dhcp6_name_servers} ; do ++ conf="${conf}nameserver ${nameserver}\n" + done ++ fi + +- mv /etc/resolv.conf.dhclient /etc/resolv.conf ++ if [ x"$conf" != x ]; then ++ conf="# Generated by dhclient or interface $interface\n${conf}" ++ if type resolvconf >/dev/null 2>&1; then ++ printf "${conf}" | resolvconf -a $interface ++ else ++ printf "${conf}" > /etc/resolv.conf ++ chmod 644 /etc/resolv.conf ++ fi + fi + # If we're making confs, may as well make an ntp.conf too + make_ntp_conf diff --git a/net-misc/dhcp/files/dhcp-4.4.3-dhclient-stdin-conf.patch b/net-misc/dhcp/files/dhcp-4.4.3-dhclient-stdin-conf.patch new file mode 100644 index 000000000000..bf5a54c32153 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.3-dhclient-stdin-conf.patch @@ -0,0 +1,113 @@ +--- dhcp-4.2.2/client/clparse.c ++++ dhcp-4.2.2/client/clparse.c +@@ -182,6 +182,10 @@ isc_result_t read_client_conf () + #endif + } + ++ /* Read any extra configuration from stdin */ ++ extern int read_client_conf_stdin (struct interface_info *ip, struct client_config *client); ++ read_client_conf_stdin (NULL, &top_level_config); ++ + /* Set up state and config structures for clients that don't + have per-interface configuration statements. */ + config = (struct client_config *)0; +@@ -211,23 +215,13 @@ isc_result_t read_client_conf () + return status; + } + +-int read_client_conf_file (const char *name, struct interface_info *ip, ++int read_client_conf_actual (struct parse *cfile, struct interface_info *ip, + struct client_config *client) + { +- int file; +- struct parse *cfile; + const char *val; + int token; + isc_result_t status; + +- if ((file = open (name, O_RDONLY)) < 0) +- return uerr2isc (errno); +- +- cfile = NULL; +- status = new_parse(&cfile, file, NULL, 0, path_dhclient_conf, 0); +- if (status != ISC_R_SUCCESS || cfile == NULL) +- return status; +- + do { + token = peek_token (&val, (unsigned *)0, cfile); + if (token == END_OF_FILE) +@@ -238,10 +232,74 @@ int read_client_conf_file (const char *name, struct interface_info *ip, + status = (cfile -> warnings_occurred + ? DHCP_R_BADPARSE + : ISC_R_SUCCESS); ++ return status; ++} ++ ++int read_client_conf_file (const char *name, struct interface_info *ip, ++ struct client_config *client) ++{ ++ int file; ++ struct parse *cfile; ++ isc_result_t status; ++ ++ if ((file = open (name, O_RDONLY)) < 0) ++ return uerr2isc (errno); ++ ++ cfile = (struct parse *)0; ++ new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); ++ status = read_client_conf_actual(cfile, ip, client); + end_parse (&cfile); + return status; + } + ++int read_client_conf_stdin (struct interface_info *ip, ++ struct client_config *client) ++{ ++ int file; ++ char *buffer = NULL, *p; ++ unsigned buflen, len = 0; ++ struct parse *cfile; ++ size_t bytes; ++ isc_result_t status; ++ ++ file = fileno(stdin); ++ if (isatty (file)) ++ return ISC_R_NOTFOUND; ++ if (fcntl (file, F_SETFL, O_NONBLOCK) < 0) ++ log_fatal ("could not set stdin to non blocking!"); ++ ++ buflen = BUFSIZ; ++ buffer = malloc (BUFSIZ + 1); ++ p = buffer; ++ do { ++ bytes = read (file, p, BUFSIZ); ++ if (bytes == 0) ++ break; ++ if (bytes == -1) ++ log_fatal ("failed to read stdin!"); ++ if (bytes >= BUFSIZ) { ++ buflen += BUFSIZ; ++ len += BUFSIZ; ++ buffer = realloc (buffer, buflen + 1); ++ if (!buffer) ++ log_fatal ("not enough buffer to read stdin!"); ++ p = buffer + len; ++ } else { ++ len += bytes; ++ break; ++ } ++ } while(1); ++ buffer[len] = '\0'; ++ ++ cfile = (struct parse *)0; ++ status = new_parse (&cfile, -1, buffer, len, "stdin", 0); ++ if (status == ISC_R_SUCCESS) { ++ status = read_client_conf_actual (cfile, ip, client); ++ end_parse (&cfile); ++ } ++ free(buffer); ++ return status; ++} + + /* lease-file :== client-lease-statements END_OF_FILE + client-lease-statements :== diff --git a/net-misc/dhcp/files/dhcp-4.4.3-fix-perms.patch b/net-misc/dhcp/files/dhcp-4.4.3-fix-perms.patch new file mode 100644 index 000000000000..5b3a8ab2c20a --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.3-fix-perms.patch @@ -0,0 +1,15 @@ +--- a/server/dhcpd.c ++++ b/server/dhcpd.c +@@ -892,6 +892,12 @@ + if (lftest) + exit (0); + ++#if defined (PARANOIA) ++ /* Set proper permissions... */ ++ if (lchown (path_dhcpd_db, set_uid, set_gid)) ++ log_fatal ("lchown(%s, %d, %d): %m", path_dhcpd_db, (int) set_uid, (int) set_gid); ++#endif /* PARANOIA */ ++ + /* Discover all the network interfaces and initialize them. */ + #if defined(DHCPv6) && defined(DHCP4o6) + if (dhcpv4_over_dhcpv6) { diff --git a/net-misc/dhcp/files/dhcp-4.4.3-iproute2-path.patch b/net-misc/dhcp/files/dhcp-4.4.3-iproute2-path.patch new file mode 100644 index 000000000000..18b04e620c14 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.3-iproute2-path.patch @@ -0,0 +1,11 @@ +--- dhcp-4.3.6/client/scripts/linux ++++ dhcp-4.3.6/client/scripts/linux +@@ -30,7 +30,7 @@ + # 'ip' just looks too weird. Also, we now have unit-tests! Those unit-tests + # overwirte this line to use a fake ip-echo tool. It's also convenient + # if your system holds ip tool in a non-standard location. +-ip=/sbin/ip ++ip=ip + + # update /etc/resolv.conf based on received values + # This updated version mostly follows Debian script by Andrew Pollock et al. diff --git a/net-misc/dhcp/files/dhcp-4.4.3-ldap-ipv6-client-id.patch b/net-misc/dhcp/files/dhcp-4.4.3-ldap-ipv6-client-id.patch new file mode 100644 index 000000000000..2a7f8183d4e0 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.3-ldap-ipv6-client-id.patch @@ -0,0 +1,81 @@ +https://bugs.gentoo.org/559832 + +the get_client_id func is used outside of IPv6 code, so don't store it in the +IPv6-specific dhcpv6.c file. otherwise, building w/out IPv6 & w/ldap yields: +dhcpd-ldap.o: In function 'find_client_in_ldap': +ldap.c:(.text+0x4774): undefined reference to 'get_client_id' + +--- a/server/dhcpleasequery.c ++++ b/server/dhcpleasequery.c +@@ -33,6 +33,34 @@ + * DoS'ed by DHCPLEASEQUERY message. + */ + ++/* ++ * Get the client identifier from the packet. ++ */ ++isc_result_t ++get_client_id(struct packet *packet, struct data_string *client_id) { ++ struct option_cache *oc; ++ ++ /* ++ * Verify our client_id structure is empty. ++ */ ++ if ((client_id->data != NULL) || (client_id->len != 0)) { ++ return DHCP_R_INVALIDARG; ++ } ++ ++ oc = lookup_option(&dhcpv6_universe, packet->options, D6O_CLIENTID); ++ if (oc == NULL) { ++ return ISC_R_NOTFOUND; ++ } ++ ++ if (!evaluate_option_cache(client_id, packet, NULL, NULL, ++ packet->options, NULL, ++ &global_scope, oc, MDL)) { ++ return ISC_R_FAILURE; ++ } ++ ++ return ISC_R_SUCCESS; ++} ++ + /* + * If you query by hardware address or by client ID, then you may have + * more than one IP address for your query argument. We need to do two +--- a/server/dhcpv6.c ++++ b/server/dhcpv6.c +@@ -392,34 +392,6 @@ generate_new_server_duid(void) { + } + + /* +- * Get the client identifier from the packet. +- */ +-isc_result_t +-get_client_id(struct packet *packet, struct data_string *client_id) { +- struct option_cache *oc; +- +- /* +- * Verify our client_id structure is empty. +- */ +- if ((client_id->data != NULL) || (client_id->len != 0)) { +- return DHCP_R_INVALIDARG; +- } +- +- oc = lookup_option(&dhcpv6_universe, packet->options, D6O_CLIENTID); +- if (oc == NULL) { +- return ISC_R_NOTFOUND; +- } +- +- if (!evaluate_option_cache(client_id, packet, NULL, NULL, +- packet->options, NULL, +- &global_scope, oc, MDL)) { +- return ISC_R_FAILURE; +- } +- +- return ISC_R_SUCCESS; +-} +- +-/* + * Message validation, defined in RFC 3315, sections 15.2, 15.5, 15.7: + * + * Servers MUST discard any Solicit messages that do not include a diff --git a/net-misc/dhcp/files/dhcp-4.4.3-nogateway.patch b/net-misc/dhcp/files/dhcp-4.4.3-nogateway.patch new file mode 100644 index 000000000000..d299cc503f60 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.3-nogateway.patch @@ -0,0 +1,66 @@ +--- dhcp-4.3.6/client/scripts/linux ++++ dhcp-4.3.6/client/scripts/linux +@@ -242,20 +242,22 @@ + if_metric=${if_metric:-1} + fi + +- for router in $new_routers; do +- if [ "$new_subnet_mask" = "255.255.255.255" ]; then +- # point-to-point connection => set explicit route +- ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1 +- fi +- +- # set default route +- ${ip} -4 route add default via ${router} dev ${interface} \ +- ${if_metric:+metric $if_metric} >/dev/null 2>&1 +- +- if [ -n "$if_metric" ]; then +- if_metric=$((if_metric+1)) +- fi +- done ++ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then ++ for router in $new_routers; do ++ if [ "$new_subnet_mask" = "255.255.255.255" ]; then ++ # point-to-point connection => set explicit route ++ ${ip} -4 route add ${router} dev $interface >/dev/null 2>&1 ++ fi ++ ++ # set default route ++ ${ip} -4 route add default via ${router} dev ${interface} \ ++ ${if_metric:+metric $if_metric} >/dev/null 2>&1 ++ ++ if [ -n "$if_metric" ]; then ++ if_metric=$((if_metric+1)) ++ fi ++ done ++ fi + fi + fi + +@@ -330,15 +332,17 @@ + if_metric=${if_metric:-1} + fi + +- # set default route +- for router in $new_routers; do +- ${ip} -4 route add default via ${router} dev ${interface} \ +- ${if_metric:+metric $if_metric} >/dev/null 2>&1 +- +- if [ -n "$if_metric" ]; then +- if_metric=$((if_metric+1)) +- fi +- done ++ if [ x$PEER_ROUTERS = x ] || [ x$PEER_ROUTERS = xyes ]; then ++ # set default route ++ for router in $new_routers; do ++ ${ip} -4 route add default via ${router} dev ${interface} \ ++ ${if_metric:+metric $if_metric} >/dev/null 2>&1 ++ ++ if [ -n "$if_metric" ]; then ++ if_metric=$((if_metric+1)) ++ fi ++ done ++ fi + fi + + # update /etc/resolv.conf diff --git a/net-misc/dhcp/files/dhcp-4.4.3-quieter-ping.patch b/net-misc/dhcp/files/dhcp-4.4.3-quieter-ping.patch new file mode 100644 index 000000000000..3efb6459ebf9 --- /dev/null +++ b/net-misc/dhcp/files/dhcp-4.4.3-quieter-ping.patch @@ -0,0 +1,66 @@ +--- dhcp-4.3.6/client/scripts/bsdos ++++ dhcp-4.3.6/client/scripts/bsdos +@@ -220,7 +220,7 @@ + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers +- if ping -q -c 1 -w 1 $1; then ++ if ping -q -c 1 -w 1 $1 >/dev/null; then + if [ x$new_ip_address != x$alias_ip_address ] && \ + [ x$alias_ip_address != x ]; then + ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg +--- dhcp-4.3.6/client/scripts/freebsd ++++ dhcp-4.3.6/client/scripts/freebsd +@@ -287,7 +287,7 @@ + if [ -n "$new_routers" ]; then + $LOGGER "New Routers: $new_routers" + set -- $new_routers +- if ping -q -c 1 $1; then ++ if ping -q -c 1 $1 >/dev/null; then + if [ x$new_ip_address != x$alias_ip_address ] && \ + [ x$alias_ip_address != x ]; then + ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg +--- dhcp-4.3.6/client/scripts/linux ++++ dhcp-4.3.6/client/scripts/linux +@@ -311,7 +311,7 @@ + fi + + # if there is no router recorded in the lease or the 1st router answers pings +- if [ -z "$new_routers" ] || ping -q -c 1 "${new_routers%% *}"; then ++ if [ -z "$new_routers" ] || ping -q -c 1 "${new_routers%% *}" >/dev/null; then + # if we have $new_rfc3442_classless_static_routes then we have to + # ignore $new_routers entirely + if [ ! "$new_rfc3442_classless_static_routes" ]; then +--- dhcp-4.3.6/client/scripts/netbsd ++++ dhcp-4.3.6/client/scripts/netbsd +@@ -220,7 +220,7 @@ + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers +- if ping -q -c 1 -w 1 $1; then ++ if ping -q -c 1 -w 1 $1 >/dev/null; then + if [ x$new_ip_address != x$alias_ip_address ] && \ + [ x$alias_ip_address != x ]; then + ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg +--- dhcp-4.3.6/client/scripts/openbsd ++++ dhcp-4.3.6/client/scripts/openbsd +@@ -214,7 +214,7 @@ + sleep 1 + if [ "$new_routers" != "" ]; then + set $new_routers +- if ping -q -c 1 -w 1 $1; then ++ if ping -q -c 1 -w 1 $1 >/dev/null; then + if [ x$new_ip_address != x$alias_ip_address ] && \ + [ x$alias_ip_address != x ]; then + ifconfig $interface inet alias $alias_ip_address $alias_subnet_arg +--- dhcp-4.3.6/client/scripts/openwrt ++++ dhcp-4.3.6/client/scripts/openwrt +@@ -190,7 +190,7 @@ + ifconfig $interface $new_ip_address $new_subnet_arg \ + $new_broadcast_arg $mtu_arg + set $new_routers +- if ping -q -c 1 $1; then ++ if ping -q -c 1 $1 >/dev/null; then + if [ x$new_ip_address != x$alias_ip_address ] && \ + [ x$alias_ip_address != x ]; then + ifconfig $interface:0 $alias_ip_address $alias_subnet_arg diff --git a/net-misc/dhcp/files/dhcp.tmpfiles b/net-misc/dhcp/files/dhcp.tmpfiles new file mode 100644 index 000000000000..c5b18352eda4 --- /dev/null +++ b/net-misc/dhcp/files/dhcp.tmpfiles @@ -0,0 +1,2 @@ +d /var/lib/dhcp 0750 dhcp dhcp +f /var/lib/dhcp/dhcpd.leases 0640 dhcp dhcp diff --git a/net-misc/dhcp/files/dhcpd.conf2 b/net-misc/dhcp/files/dhcpd.conf2 index 5cd2eeca3f71..ac173f8a3576 100644 --- a/net-misc/dhcp/files/dhcpd.conf2 +++ b/net-misc/dhcp/files/dhcpd.conf2 @@ -16,7 +16,9 @@ # All file paths below are relative to the chroot. # You can specify a different chroot directory but MAKE SURE it's empty. -# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf +# Specify a configuration file - the default is based on the service name, +# so dhcpd would use /etc/dhcp/dhcpd.conf and dhcpd.foo would use +# /etc/dhcp/dhcpd.foo.conf # DHCPD_CONF="/etc/dhcp/dhcpd.conf" # Configure which interface or interfaces to for dhcpd to listen on. diff --git a/net-misc/dhcp/files/dhcpd.init5 b/net-misc/dhcp/files/dhcpd.init5 index f0ea9b0c7904..8e05625e6345 100644 --- a/net-misc/dhcp/files/dhcpd.init5 +++ b/net-misc/dhcp/files/dhcpd.init5 @@ -1,8 +1,11 @@ #!/sbin/openrc-run -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +description="ISC DHCP server" + extra_commands="configtest" +description_configtest="Test the syntax of the configuration file" : ${DHCPD_CONF:=/etc/dhcp/${SVCNAME}.conf} @@ -77,11 +80,9 @@ start() { local leasefile="$(get_var lease-file-name /var/lib/dhcp/${SVCNAME}.leases)" checkpath -f -o dhcp:dhcp "${chroot}${leasefile}" - # Setup LD_PRELOAD so name resolution works in our chroot. if [ -n "${chroot}" ] ; then checkpath -d -o root:root -m 755 "${chroot}"/dev "${chroot}"/etc "${chroot}"/proc cp -pP /etc/localtime /etc/resolv.conf "${chroot}"/etc/ - export LD_PRELOAD="${LD_PRELOAD} libresolv.so libnss_dns.so" if ! mountinfo -q "${chroot}/proc" ; then mount --bind /proc "${chroot}/proc" fi diff --git a/net-misc/dhcp/files/dhcpd.tmpfiles b/net-misc/dhcp/files/dhcpd.tmpfiles deleted file mode 100644 index ee2f4deeaadf..000000000000 --- a/net-misc/dhcp/files/dhcpd.tmpfiles +++ /dev/null @@ -1,2 +0,0 @@ -d /var/lib/dhcp/ 0755 dhcp dhcp -f /var/lib/dhcp/dhcpd.leases 0644 dhcp dhcp \ No newline at end of file diff --git a/net-misc/dhcp/metadata.xml b/net-misc/dhcp/metadata.xml index 210dad323ffb..ebcdd6b8d4e3 100644 --- a/net-misc/dhcp/metadata.xml +++ b/net-misc/dhcp/metadata.xml @@ -1,20 +1,15 @@ - + - - dev@liguros.net - Development - - - base-system@gentoo.org - Gentoo Base System - - - cpe:/a:isc:dhcp - - - Install the dhclient program - Install the dhcpd and dhcrelay programs - - kit-fixups - \ No newline at end of file + + base-system@gentoo.org + Gentoo Base System + + + Install the dhclient program + Install the dhcpd and dhcrelay programs + + + cpe:/a:isc:dhcp + + diff --git a/sys-apps/hexyl/hexyl-0.17.0.ebuild b/sys-apps/hexyl/hexyl-0.17.0.ebuild index 0225cbb7eace..ac667b6697fb 100644 --- a/sys-apps/hexyl/hexyl-0.17.0.ebuild +++ b/sys-apps/hexyl/hexyl-0.17.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 2017-2026 Gentoo Authors +# Copyright 2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -75,12 +75,12 @@ CRATES=" yansi@1.0.1 " -inherit cargo shell-completion +inherit cargo DESCRIPTION="A command-line hex viewer" HOMEPAGE="https://github.com/sharkdp/hexyl" SRC_URI=" - https://github.com/sharkdp/hexyl/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/sharkdp/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz ${CARGO_CRATE_URIS} " @@ -89,28 +89,10 @@ LICENSE="|| ( Apache-2.0 MIT )" LICENSE+=" Apache-2.0 ISC MIT Unicode-DFS-2016 ZLIB" SLOT="0" KEYWORDS="~amd64" -QA_FLAGS_IGNORED="usr/bin/hexyl" -RESTRICT="mirror" - -BDEPEND=" - virtual/pandoc -" - -src_compile() { - cargo_src_compile - pandoc -s -f markdown -t man -o "doc/${PN}.1" "doc/${PN}.1.md" -} +DOCS=( README.md CHANGELOG.md ) src_install() { cargo_src_install einstalldocs - doman "doc/${PN}.1" - - "target/release/${PN}" --completion bash > "${PN}" - dobashcomp "${PN}" - "target/release/${PN}" --completion zsh > "_${PN}" - dozshcomp "_${PN}" - "target/release/${PN}" --completion fish > "${PN}.fish" - dofishcomp "${PN}.fish" } diff --git a/sys-apps/hexyl/metadata.xml b/sys-apps/hexyl/metadata.xml index b18cf0a9a253..8a6c08190a71 100644 --- a/sys-apps/hexyl/metadata.xml +++ b/sys-apps/hexyl/metadata.xml @@ -1,11 +1,11 @@ - + - - Wuzy01@qq.com - Wu, Zhenyu - - - sharkdp/hexyl - + + thomas@binaryden.de + Thomas Kemmer + + + sharkdp/hexyl + diff --git a/sys-apps/shadow/Manifest b/sys-apps/shadow/Manifest index 6b96816c585b..5cc7181704da 100644 --- a/sys-apps/shadow/Manifest +++ b/sys-apps/shadow/Manifest @@ -1,2 +1,2 @@ -DIST shadow-4.17.4.tar.gz 3855379 BLAKE2B 178b84f59a6f2d97d7c6741c93a8f16896561702bbed054eb8a46044b2968cccfcefcc5d3c45ddab996543f4d958f01b789796044c9116f6217f652611d466ca SHA512 b75c47677c1cda502fd730b2ac605e347e3648326c94a659393a68c300a542a54276c575bb667324537e21598791b1647bdfe72ad5dbf2da768166678798d101 -DIST shadow-4.18.0.tar.gz 3844324 BLAKE2B 13ba960fce14091ff347c5a02c10974bf12c60e912e108529bc7350d76e75fcab20f2e67a1506c60cc77d8b910712dade16418edb212c66c4e34ad52ef1d5e7f SHA512 188f720a8fc98a898b61b69aadc942c66687cd5f96a627a629dc675a93f91e9856e7d59314553477765c9322678244d4a37920d1c8fd336eec3d7dd512115e00 +DIST shadow-4.19.3.tar.gz 3873890 BLAKE2B 4e775d02d7b5040615009f791db6fc4fd2eb158edd7477f85f6aeef69138a6e90c0662ef247cf2475fa7cbbfd5e66f80fff07a0c71d51b5ff11d8858f29807d5 SHA512 909f9858ef897984f1b8e3fa726f7c53603d480be439f338422ce54491bf2ed653ee755cad2c25fba967b126707716fffe7fdfb4c927c4874d57237fb9b3e119 +DIST shadow-4.19.4.tar.gz 3874200 BLAKE2B 013e894b00eb2a1505ef0300bfd0a67ec2dc82c46fcbdfd9c8b51745f903ecf67531b7f2570f6fbd44ede6f13fd55dcbef17fc6590ef7d7538ddc9caf24c490f SHA512 9ea6618737be4b19cde29aa0360df6339fb16ca0e20dc0f2538d64d4bfb7ee6ecf6ced044b738c429dc6f9d75a125279e9bfb9e1a31e94b4064edd96e31b1b55 diff --git a/sys-apps/shadow/metadata.xml b/sys-apps/shadow/metadata.xml index 5a2513bd579d..0b5fd749493a 100644 --- a/sys-apps/shadow/metadata.xml +++ b/sys-apps/shadow/metadata.xml @@ -17,5 +17,5 @@ build the su program use libbsd support - kit-fixups + ports \ No newline at end of file diff --git a/sys-apps/shadow/shadow-4.17.4.ebuild b/sys-apps/shadow/shadow-4.17.4.ebuild deleted file mode 100644 index 23d2128071da..000000000000 --- a/sys-apps/shadow/shadow-4.17.4.ebuild +++ /dev/null @@ -1,262 +0,0 @@ -# Copyright 2021-2025 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -inherit autotools libtool pam - -DESCRIPTION="Utilities to deal with user accounts" -HOMEPAGE="https://github.com/shadow-maint/shadow" -SRC_URI="https://github.com/shadow-maint/shadow/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="BSD GPL-2" -# Subslot is for libsubid's SONAME. -SLOT="0/4" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -# su now is provided by util-linux -IUSE="acl audit bcrypt cracklib libbsd nls pam selinux skey split-usr su xattr" -# Taken from the man/Makefile.am file. -LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW ) - -REQUIRED_USE="?? ( cracklib pam )" - -BDEPEND=" - app-arch/xz-utils - sys-devel/gettext -" -COMMON_DEPEND=" - virtual/libcrypt:= - acl? ( sys-apps/acl:0= ) - audit? ( >=sys-process/audit-2.6:0= ) - cracklib? ( >=sys-libs/cracklib-2.7-r3:0= ) - nls? ( virtual/libintl ) - pam? ( sys-libs/pam:0= ) - skey? ( sys-auth/skey:0= ) - selinux? ( - >=sys-libs/libselinux-1.28:0= - sys-libs/libsemanage:0= - ) - xattr? ( sys-apps/attr:0= ) - libbsd? ( dev-libs/libbsd ) - !libbsd? ( >=sys-libs/glibc-2.38 ) -" -DEPEND="${COMMON_DEPEND} - >=sys-kernel/linux-headers-4.14 - dev-util/itstool - dev-libs/libxslt - >=app-text/docbook-xml-dtd-4.5-r2 -" -RDEPEND="${COMMON_DEPEND} - !=sys-auth/pambase-20150213 ) - su? ( !sys-apps/util-linux[su(-)] ) -" - -PATCHES=( - "${FILESDIR}/${PN}-4.7-disable-subids-useradd.patch" -) - -src_prepare() { - default - - eautoreconf -} - -src_configure() { - local myeconfargs=( - --disable-account-tools-setuid - --disable-static - --with-btrfs - --without-group-name-max-length - --without-tcb - --enable-man - $(use_enable nls) - $(use_with acl) - $(use_with audit) - $(use_with bcrypt) - $(use_with cracklib libcrack) - $(use_with elibc_glibc nscd) - $(use_with pam libpam) - $(use_with selinux) - $(use_with skey) - $(use_with libbsd) - $(use_with su) - $(use_with xattr attr) - ) - econf "${myeconfargs[@]}" - - if use nls ; then - local l langs="po" # These are the pot files. - for l in ${LANGS[*]} ; do - has ${l} ${LINGUAS-${l}} && langs+=" ${l}" - done - sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die - fi -} - -set_login_opt() { - local comment="" opt=${1} val=${2} - if [[ -z ${val} ]]; then - comment="#" - sed -i \ - -e "/^${opt}\>/s:^:#:" \ - "${ED}"/etc/login.defs || die - else - sed -i -r \ - -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \ - "${ED}"/etc/login.defs - fi - local res=$(grep "^${comment}${opt}\>" "${ED}"/etc/login.defs) - einfo "${res:-Unable to find ${opt} in /etc/login.defs}" -} - -src_install() { - emake DESTDIR="${D}" suidperms=4711 install - - # 4.9 regression: https://github.com/shadow-maint/shadow/issues/389 - emake DESTDIR="${D}" -C man install - - find "${ED}" -name '*.la' -type f -delete || die - - insinto /etc - if ! use pam ; then - insopts -m0600 - doins etc/login.access etc/limits - fi - - # needed for 'useradd -D' - insinto /etc/default - insopts -m0600 - doins "${FILESDIR}"/default/useradd - - if use split-usr ; then - # move passwd to / to help recover broke systems #64441 - # We cannot simply remove this or else net-misc/scponly - # and other tools will break because of hardcoded passwd - # location - dodir /bin - mv "${ED}"/usr/bin/passwd "${ED}"/bin/ || die - dosym ../../bin/passwd /usr/bin/passwd - fi - - cd "${S}" || die - insinto /etc - insopts -m0644 - newins etc/login.defs login.defs - - set_login_opt CREATE_HOME yes - if ! use pam ; then - set_login_opt MAIL_CHECK_ENAB no - set_login_opt SU_WHEEL_ONLY yes - set_login_opt CRACKLIB_DICTPATH /usr/lib/cracklib_dict - set_login_opt LOGIN_RETRIES 3 - set_login_opt ENCRYPT_METHOD SHA512 - set_login_opt CONSOLE - else - dopamd "${FILESDIR}"/pam.d-include/shadow - - for x in chsh shfn ; do - newpamd "${FILESDIR}"/pam.d-include/passwd ${x} - done - - for x in chpasswd newusers ; do - newpamd "${FILESDIR}"/pam.d-include/chpasswd ${x} - done - - newpamd "${FILESDIR}"/pam.d-include/shadow-r1 groupmems - - # Comment out login.defs options that pam hates - local opt sed_args=() - for opt in \ - CHFN_AUTH \ - CONSOLE \ - CRACKLIB_DICTPATH \ - ENV_HZ \ - ENVIRON_FILE \ - FAILLOG_ENAB \ - FTMP_FILE \ - LASTLOG_ENAB \ - MAIL_CHECK_ENAB \ - MOTD_FILE \ - NOLOGINS_FILE \ - OBSCURE_CHECKS_ENAB \ - PASS_ALWAYS_WARN \ - PASS_CHANGE_TRIES \ - PASS_MIN_LEN \ - PORTTIME_CHECKS_ENAB \ - QUOTAS_ENAB \ - SU_WHEEL_ONLY - do - set_login_opt ${opt} - sed_args+=( -e "/^#${opt}\>/b pamnote" ) - done - sed -i "${sed_args[@]}" \ - -e 'b exit' \ - -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \ - -e ': exit' \ - "${ED}"/etc/login.defs || die - - # Remove manpages that pam will install for us - # and/or don't apply when using pam - find "${ED}"/usr/share/man -type f \ - '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ - -delete - - # Remove pam.d files provided by pambase. - rm "${ED}"/etc/pam.d/{login,passwd} || die - if use su ; then - rm "${ED}"/etc/pam.d/su || die - fi - fi - - # Remove manpages that are handled by other packages - find "${ED}"/usr/share/man -type f \ - '(' -name id.1 -o -name getspnam.3 ')' \ - -delete || die - - if ! use su ; then - find "${ED}"/usr/share/man -type f -name su.1 -delete || die - fi - - cd "${S}" || die - dodoc ChangeLog NEWS - newdoc README README.download - cd doc || die - dodoc HOWTO README* -} - -pkg_preinst() { - rm -f "${EROOT}"/etc/pam.d/system-auth.new \ - "${EROOT}/etc/login.defs.new" -} - -pkg_postinst() { - # Missing entries from /etc/passwd can cause odd system blips. - # See bug #829872. - if ! pwck -r -q -R "${EROOT:-/}" &>/dev/null ; then - ewarn "Running 'pwck' returned errors. Please run it manually to fix any errors." - fi - - # Enable shadow groups. - if [[ ! -f "${EROOT}"/etc/gshadow ]] ; then - if grpck -r -R "${EROOT:-/}" 2>/dev/null ; then - grpconv -R "${EROOT:-/}" - else - ewarn "Running 'grpck' returned errors. Please run it by hand, and then" - ewarn "run 'grpconv' afterwards!" - fi - fi - - [[ ! -f "${EROOT}"/etc/subgid ]] && - touch "${EROOT}"/etc/subgid - [[ ! -f "${EROOT}"/etc/subuid ]] && - touch "${EROOT}"/etc/subuid - - einfo "The 'adduser' symlink to 'useradd' has been dropped." -} diff --git a/sys-apps/shadow/shadow-4.18.0.ebuild b/sys-apps/shadow/shadow-4.18.0.ebuild deleted file mode 100644 index 23d2128071da..000000000000 --- a/sys-apps/shadow/shadow-4.18.0.ebuild +++ /dev/null @@ -1,262 +0,0 @@ -# Copyright 2021-2025 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -inherit autotools libtool pam - -DESCRIPTION="Utilities to deal with user accounts" -HOMEPAGE="https://github.com/shadow-maint/shadow" -SRC_URI="https://github.com/shadow-maint/shadow/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="BSD GPL-2" -# Subslot is for libsubid's SONAME. -SLOT="0/4" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -# su now is provided by util-linux -IUSE="acl audit bcrypt cracklib libbsd nls pam selinux skey split-usr su xattr" -# Taken from the man/Makefile.am file. -LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW ) - -REQUIRED_USE="?? ( cracklib pam )" - -BDEPEND=" - app-arch/xz-utils - sys-devel/gettext -" -COMMON_DEPEND=" - virtual/libcrypt:= - acl? ( sys-apps/acl:0= ) - audit? ( >=sys-process/audit-2.6:0= ) - cracklib? ( >=sys-libs/cracklib-2.7-r3:0= ) - nls? ( virtual/libintl ) - pam? ( sys-libs/pam:0= ) - skey? ( sys-auth/skey:0= ) - selinux? ( - >=sys-libs/libselinux-1.28:0= - sys-libs/libsemanage:0= - ) - xattr? ( sys-apps/attr:0= ) - libbsd? ( dev-libs/libbsd ) - !libbsd? ( >=sys-libs/glibc-2.38 ) -" -DEPEND="${COMMON_DEPEND} - >=sys-kernel/linux-headers-4.14 - dev-util/itstool - dev-libs/libxslt - >=app-text/docbook-xml-dtd-4.5-r2 -" -RDEPEND="${COMMON_DEPEND} - !=sys-auth/pambase-20150213 ) - su? ( !sys-apps/util-linux[su(-)] ) -" - -PATCHES=( - "${FILESDIR}/${PN}-4.7-disable-subids-useradd.patch" -) - -src_prepare() { - default - - eautoreconf -} - -src_configure() { - local myeconfargs=( - --disable-account-tools-setuid - --disable-static - --with-btrfs - --without-group-name-max-length - --without-tcb - --enable-man - $(use_enable nls) - $(use_with acl) - $(use_with audit) - $(use_with bcrypt) - $(use_with cracklib libcrack) - $(use_with elibc_glibc nscd) - $(use_with pam libpam) - $(use_with selinux) - $(use_with skey) - $(use_with libbsd) - $(use_with su) - $(use_with xattr attr) - ) - econf "${myeconfargs[@]}" - - if use nls ; then - local l langs="po" # These are the pot files. - for l in ${LANGS[*]} ; do - has ${l} ${LINGUAS-${l}} && langs+=" ${l}" - done - sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die - fi -} - -set_login_opt() { - local comment="" opt=${1} val=${2} - if [[ -z ${val} ]]; then - comment="#" - sed -i \ - -e "/^${opt}\>/s:^:#:" \ - "${ED}"/etc/login.defs || die - else - sed -i -r \ - -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \ - "${ED}"/etc/login.defs - fi - local res=$(grep "^${comment}${opt}\>" "${ED}"/etc/login.defs) - einfo "${res:-Unable to find ${opt} in /etc/login.defs}" -} - -src_install() { - emake DESTDIR="${D}" suidperms=4711 install - - # 4.9 regression: https://github.com/shadow-maint/shadow/issues/389 - emake DESTDIR="${D}" -C man install - - find "${ED}" -name '*.la' -type f -delete || die - - insinto /etc - if ! use pam ; then - insopts -m0600 - doins etc/login.access etc/limits - fi - - # needed for 'useradd -D' - insinto /etc/default - insopts -m0600 - doins "${FILESDIR}"/default/useradd - - if use split-usr ; then - # move passwd to / to help recover broke systems #64441 - # We cannot simply remove this or else net-misc/scponly - # and other tools will break because of hardcoded passwd - # location - dodir /bin - mv "${ED}"/usr/bin/passwd "${ED}"/bin/ || die - dosym ../../bin/passwd /usr/bin/passwd - fi - - cd "${S}" || die - insinto /etc - insopts -m0644 - newins etc/login.defs login.defs - - set_login_opt CREATE_HOME yes - if ! use pam ; then - set_login_opt MAIL_CHECK_ENAB no - set_login_opt SU_WHEEL_ONLY yes - set_login_opt CRACKLIB_DICTPATH /usr/lib/cracklib_dict - set_login_opt LOGIN_RETRIES 3 - set_login_opt ENCRYPT_METHOD SHA512 - set_login_opt CONSOLE - else - dopamd "${FILESDIR}"/pam.d-include/shadow - - for x in chsh shfn ; do - newpamd "${FILESDIR}"/pam.d-include/passwd ${x} - done - - for x in chpasswd newusers ; do - newpamd "${FILESDIR}"/pam.d-include/chpasswd ${x} - done - - newpamd "${FILESDIR}"/pam.d-include/shadow-r1 groupmems - - # Comment out login.defs options that pam hates - local opt sed_args=() - for opt in \ - CHFN_AUTH \ - CONSOLE \ - CRACKLIB_DICTPATH \ - ENV_HZ \ - ENVIRON_FILE \ - FAILLOG_ENAB \ - FTMP_FILE \ - LASTLOG_ENAB \ - MAIL_CHECK_ENAB \ - MOTD_FILE \ - NOLOGINS_FILE \ - OBSCURE_CHECKS_ENAB \ - PASS_ALWAYS_WARN \ - PASS_CHANGE_TRIES \ - PASS_MIN_LEN \ - PORTTIME_CHECKS_ENAB \ - QUOTAS_ENAB \ - SU_WHEEL_ONLY - do - set_login_opt ${opt} - sed_args+=( -e "/^#${opt}\>/b pamnote" ) - done - sed -i "${sed_args[@]}" \ - -e 'b exit' \ - -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \ - -e ': exit' \ - "${ED}"/etc/login.defs || die - - # Remove manpages that pam will install for us - # and/or don't apply when using pam - find "${ED}"/usr/share/man -type f \ - '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ - -delete - - # Remove pam.d files provided by pambase. - rm "${ED}"/etc/pam.d/{login,passwd} || die - if use su ; then - rm "${ED}"/etc/pam.d/su || die - fi - fi - - # Remove manpages that are handled by other packages - find "${ED}"/usr/share/man -type f \ - '(' -name id.1 -o -name getspnam.3 ')' \ - -delete || die - - if ! use su ; then - find "${ED}"/usr/share/man -type f -name su.1 -delete || die - fi - - cd "${S}" || die - dodoc ChangeLog NEWS - newdoc README README.download - cd doc || die - dodoc HOWTO README* -} - -pkg_preinst() { - rm -f "${EROOT}"/etc/pam.d/system-auth.new \ - "${EROOT}/etc/login.defs.new" -} - -pkg_postinst() { - # Missing entries from /etc/passwd can cause odd system blips. - # See bug #829872. - if ! pwck -r -q -R "${EROOT:-/}" &>/dev/null ; then - ewarn "Running 'pwck' returned errors. Please run it manually to fix any errors." - fi - - # Enable shadow groups. - if [[ ! -f "${EROOT}"/etc/gshadow ]] ; then - if grpck -r -R "${EROOT:-/}" 2>/dev/null ; then - grpconv -R "${EROOT:-/}" - else - ewarn "Running 'grpck' returned errors. Please run it by hand, and then" - ewarn "run 'grpconv' afterwards!" - fi - fi - - [[ ! -f "${EROOT}"/etc/subgid ]] && - touch "${EROOT}"/etc/subgid - [[ ! -f "${EROOT}"/etc/subuid ]] && - touch "${EROOT}"/etc/subuid - - einfo "The 'adduser' symlink to 'useradd' has been dropped." -} diff --git a/sys-apps/shadow/shadow-4.19.3.ebuild b/sys-apps/shadow/shadow-4.19.3.ebuild new file mode 100644 index 000000000000..bb4e49b52fe9 --- /dev/null +++ b/sys-apps/shadow/shadow-4.19.3.ebuild @@ -0,0 +1,264 @@ +# Copyright 2021-2026 Liguros Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +inherit autotools libtool pam + +DESCRIPTION="Utilities to deal with user accounts" +HOMEPAGE="https://github.com/shadow-maint/shadow" +SRC_URI="https://github.com/shadow-maint/shadow/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD GPL-2" +# Subslot is for libsubid's SONAME. +SLOT="0/4" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +# su now is provided by util-linux +IUSE="acl audit bcrypt cracklib libbsd nls pam selinux skey split-usr su systemd xattr" +# Taken from the man/Makefile.am file. +LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW ) + +REQUIRED_USE="?? ( cracklib pam )" + +BDEPEND=" + app-arch/xz-utils + sys-devel/gettext +" +COMMON_DEPEND=" + virtual/libcrypt:= + acl? ( sys-apps/acl:0= ) + audit? ( >=sys-process/audit-2.6:0= ) + cracklib? ( >=sys-libs/cracklib-2.7-r3:0= ) + nls? ( virtual/libintl ) + pam? ( sys-libs/pam:0= ) + skey? ( sys-auth/skey:0= ) + selinux? ( + >=sys-libs/libselinux-1.28:0= + sys-libs/libsemanage:0= + ) + systemd? ( sys-apps/systemd:= ) + xattr? ( sys-apps/attr:0= ) + libbsd? ( dev-libs/libbsd ) + !libbsd? ( >=sys-libs/glibc-2.38 ) +" +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-4.14 + dev-util/itstool + dev-libs/libxslt + >=app-text/docbook-xml-dtd-4.5-r2 +" +RDEPEND="${COMMON_DEPEND} + !=sys-auth/pambase-20150213 ) + su? ( !sys-apps/util-linux[su(-)] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-4.7-disable-subids-useradd.patch" +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + local myeconfargs=( + --disable-account-tools-setuid + --disable-static + --with-btrfs + --without-group-name-max-length + --without-tcb + --enable-man + $(use_enable nls) + $(use_enable systemd logind) + $(use_with acl) + $(use_with audit) + $(use_with bcrypt) + $(use_with cracklib libcrack) + $(use_with elibc_glibc nscd) + $(use_with pam libpam) + $(use_with selinux) + $(use_with skey) + $(use_with libbsd) + $(use_with su) + $(use_with xattr attr) + ) + econf "${myeconfargs[@]}" + + if use nls ; then + local l langs="po" # These are the pot files. + for l in ${LANGS[*]} ; do + has ${l} ${LINGUAS-${l}} && langs+=" ${l}" + done + sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die + fi +} + +set_login_opt() { + local comment="" opt=${1} val=${2} + if [[ -z ${val} ]]; then + comment="#" + sed -i \ + -e "/^${opt}\>/s:^:#:" \ + "${ED}"/etc/login.defs || die + else + sed -i -r \ + -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \ + "${ED}"/etc/login.defs + fi + local res=$(grep "^${comment}${opt}\>" "${ED}"/etc/login.defs) + einfo "${res:-Unable to find ${opt} in /etc/login.defs}" +} + +src_install() { + emake DESTDIR="${D}" suidperms=4711 install + + # 4.9 regression: https://github.com/shadow-maint/shadow/issues/389 + emake DESTDIR="${D}" -C man install + + find "${ED}" -name '*.la' -type f -delete || die + + insinto /etc + if ! use pam ; then + insopts -m0600 + doins etc/login.access etc/limits + fi + + # needed for 'useradd -D' + insinto /etc/default + insopts -m0600 + doins "${FILESDIR}"/default/useradd + + if use split-usr ; then + # move passwd to / to help recover broke systems #64441 + # We cannot simply remove this or else net-misc/scponly + # and other tools will break because of hardcoded passwd + # location + dodir /bin + mv "${ED}"/usr/bin/passwd "${ED}"/bin/ || die + dosym ../../bin/passwd /usr/bin/passwd + fi + + cd "${S}" || die + insinto /etc + insopts -m0644 + newins etc/login.defs login.defs + + set_login_opt CREATE_HOME yes + if ! use pam ; then + set_login_opt MAIL_CHECK_ENAB no + set_login_opt SU_WHEEL_ONLY yes + set_login_opt CRACKLIB_DICTPATH /usr/lib/cracklib_dict + set_login_opt LOGIN_RETRIES 3 + set_login_opt ENCRYPT_METHOD SHA512 + set_login_opt CONSOLE + else + dopamd "${FILESDIR}"/pam.d-include/shadow + + for x in chsh shfn ; do + newpamd "${FILESDIR}"/pam.d-include/passwd ${x} + done + + for x in chpasswd newusers ; do + newpamd "${FILESDIR}"/pam.d-include/chpasswd ${x} + done + + newpamd "${FILESDIR}"/pam.d-include/shadow-r1 groupmems + + # Comment out login.defs options that pam hates + local opt sed_args=() + for opt in \ + CHFN_AUTH \ + CONSOLE \ + CRACKLIB_DICTPATH \ + ENV_HZ \ + ENVIRON_FILE \ + FAILLOG_ENAB \ + FTMP_FILE \ + LASTLOG_ENAB \ + MAIL_CHECK_ENAB \ + MOTD_FILE \ + NOLOGINS_FILE \ + OBSCURE_CHECKS_ENAB \ + PASS_ALWAYS_WARN \ + PASS_CHANGE_TRIES \ + PASS_MIN_LEN \ + PORTTIME_CHECKS_ENAB \ + QUOTAS_ENAB \ + SU_WHEEL_ONLY + do + set_login_opt ${opt} + sed_args+=( -e "/^#${opt}\>/b pamnote" ) + done + sed -i "${sed_args[@]}" \ + -e 'b exit' \ + -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \ + -e ': exit' \ + "${ED}"/etc/login.defs || die + + # Remove manpages that pam will install for us + # and/or don't apply when using pam + find "${ED}"/usr/share/man -type f \ + '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ + -delete + + # Remove pam.d files provided by pambase. + rm "${ED}"/etc/pam.d/{login,passwd} || die + if use su ; then + rm "${ED}"/etc/pam.d/su || die + fi + fi + + # Remove manpages that are handled by other packages + find "${ED}"/usr/share/man -type f \ + '(' -name id.1 -o -name getspnam.3 ')' \ + -delete || die + + if ! use su ; then + find "${ED}"/usr/share/man -type f -name su.1 -delete || die + fi + + cd "${S}" || die + dodoc ChangeLog NEWS + newdoc README README.download + cd doc || die + dodoc HOWTO README* +} + +pkg_preinst() { + rm -f "${EROOT}"/etc/pam.d/system-auth.new \ + "${EROOT}/etc/login.defs.new" +} + +pkg_postinst() { + # Missing entries from /etc/passwd can cause odd system blips. + # See bug #829872. + if ! pwck -r -q -R "${EROOT:-/}" &>/dev/null ; then + ewarn "Running 'pwck' returned errors. Please run it manually to fix any errors." + fi + + # Enable shadow groups. + if [[ ! -f "${EROOT}"/etc/gshadow ]] ; then + if grpck -r -R "${EROOT:-/}" 2>/dev/null ; then + grpconv -R "${EROOT:-/}" + else + ewarn "Running 'grpck' returned errors. Please run it by hand, and then" + ewarn "run 'grpconv' afterwards!" + fi + fi + + [[ ! -f "${EROOT}"/etc/subgid ]] && + touch "${EROOT}"/etc/subgid + [[ ! -f "${EROOT}"/etc/subuid ]] && + touch "${EROOT}"/etc/subuid + + einfo "The 'adduser' symlink to 'useradd' has been dropped." +} diff --git a/sys-apps/shadow/shadow-4.19.4.ebuild b/sys-apps/shadow/shadow-4.19.4.ebuild new file mode 100644 index 000000000000..bb4e49b52fe9 --- /dev/null +++ b/sys-apps/shadow/shadow-4.19.4.ebuild @@ -0,0 +1,264 @@ +# Copyright 2021-2026 Liguros Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +inherit autotools libtool pam + +DESCRIPTION="Utilities to deal with user accounts" +HOMEPAGE="https://github.com/shadow-maint/shadow" +SRC_URI="https://github.com/shadow-maint/shadow/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD GPL-2" +# Subslot is for libsubid's SONAME. +SLOT="0/4" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +# su now is provided by util-linux +IUSE="acl audit bcrypt cracklib libbsd nls pam selinux skey split-usr su systemd xattr" +# Taken from the man/Makefile.am file. +LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW ) + +REQUIRED_USE="?? ( cracklib pam )" + +BDEPEND=" + app-arch/xz-utils + sys-devel/gettext +" +COMMON_DEPEND=" + virtual/libcrypt:= + acl? ( sys-apps/acl:0= ) + audit? ( >=sys-process/audit-2.6:0= ) + cracklib? ( >=sys-libs/cracklib-2.7-r3:0= ) + nls? ( virtual/libintl ) + pam? ( sys-libs/pam:0= ) + skey? ( sys-auth/skey:0= ) + selinux? ( + >=sys-libs/libselinux-1.28:0= + sys-libs/libsemanage:0= + ) + systemd? ( sys-apps/systemd:= ) + xattr? ( sys-apps/attr:0= ) + libbsd? ( dev-libs/libbsd ) + !libbsd? ( >=sys-libs/glibc-2.38 ) +" +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-4.14 + dev-util/itstool + dev-libs/libxslt + >=app-text/docbook-xml-dtd-4.5-r2 +" +RDEPEND="${COMMON_DEPEND} + !=sys-auth/pambase-20150213 ) + su? ( !sys-apps/util-linux[su(-)] ) +" + +PATCHES=( + "${FILESDIR}/${PN}-4.7-disable-subids-useradd.patch" +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + local myeconfargs=( + --disable-account-tools-setuid + --disable-static + --with-btrfs + --without-group-name-max-length + --without-tcb + --enable-man + $(use_enable nls) + $(use_enable systemd logind) + $(use_with acl) + $(use_with audit) + $(use_with bcrypt) + $(use_with cracklib libcrack) + $(use_with elibc_glibc nscd) + $(use_with pam libpam) + $(use_with selinux) + $(use_with skey) + $(use_with libbsd) + $(use_with su) + $(use_with xattr attr) + ) + econf "${myeconfargs[@]}" + + if use nls ; then + local l langs="po" # These are the pot files. + for l in ${LANGS[*]} ; do + has ${l} ${LINGUAS-${l}} && langs+=" ${l}" + done + sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die + fi +} + +set_login_opt() { + local comment="" opt=${1} val=${2} + if [[ -z ${val} ]]; then + comment="#" + sed -i \ + -e "/^${opt}\>/s:^:#:" \ + "${ED}"/etc/login.defs || die + else + sed -i -r \ + -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \ + "${ED}"/etc/login.defs + fi + local res=$(grep "^${comment}${opt}\>" "${ED}"/etc/login.defs) + einfo "${res:-Unable to find ${opt} in /etc/login.defs}" +} + +src_install() { + emake DESTDIR="${D}" suidperms=4711 install + + # 4.9 regression: https://github.com/shadow-maint/shadow/issues/389 + emake DESTDIR="${D}" -C man install + + find "${ED}" -name '*.la' -type f -delete || die + + insinto /etc + if ! use pam ; then + insopts -m0600 + doins etc/login.access etc/limits + fi + + # needed for 'useradd -D' + insinto /etc/default + insopts -m0600 + doins "${FILESDIR}"/default/useradd + + if use split-usr ; then + # move passwd to / to help recover broke systems #64441 + # We cannot simply remove this or else net-misc/scponly + # and other tools will break because of hardcoded passwd + # location + dodir /bin + mv "${ED}"/usr/bin/passwd "${ED}"/bin/ || die + dosym ../../bin/passwd /usr/bin/passwd + fi + + cd "${S}" || die + insinto /etc + insopts -m0644 + newins etc/login.defs login.defs + + set_login_opt CREATE_HOME yes + if ! use pam ; then + set_login_opt MAIL_CHECK_ENAB no + set_login_opt SU_WHEEL_ONLY yes + set_login_opt CRACKLIB_DICTPATH /usr/lib/cracklib_dict + set_login_opt LOGIN_RETRIES 3 + set_login_opt ENCRYPT_METHOD SHA512 + set_login_opt CONSOLE + else + dopamd "${FILESDIR}"/pam.d-include/shadow + + for x in chsh shfn ; do + newpamd "${FILESDIR}"/pam.d-include/passwd ${x} + done + + for x in chpasswd newusers ; do + newpamd "${FILESDIR}"/pam.d-include/chpasswd ${x} + done + + newpamd "${FILESDIR}"/pam.d-include/shadow-r1 groupmems + + # Comment out login.defs options that pam hates + local opt sed_args=() + for opt in \ + CHFN_AUTH \ + CONSOLE \ + CRACKLIB_DICTPATH \ + ENV_HZ \ + ENVIRON_FILE \ + FAILLOG_ENAB \ + FTMP_FILE \ + LASTLOG_ENAB \ + MAIL_CHECK_ENAB \ + MOTD_FILE \ + NOLOGINS_FILE \ + OBSCURE_CHECKS_ENAB \ + PASS_ALWAYS_WARN \ + PASS_CHANGE_TRIES \ + PASS_MIN_LEN \ + PORTTIME_CHECKS_ENAB \ + QUOTAS_ENAB \ + SU_WHEEL_ONLY + do + set_login_opt ${opt} + sed_args+=( -e "/^#${opt}\>/b pamnote" ) + done + sed -i "${sed_args[@]}" \ + -e 'b exit' \ + -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \ + -e ': exit' \ + "${ED}"/etc/login.defs || die + + # Remove manpages that pam will install for us + # and/or don't apply when using pam + find "${ED}"/usr/share/man -type f \ + '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ + -delete + + # Remove pam.d files provided by pambase. + rm "${ED}"/etc/pam.d/{login,passwd} || die + if use su ; then + rm "${ED}"/etc/pam.d/su || die + fi + fi + + # Remove manpages that are handled by other packages + find "${ED}"/usr/share/man -type f \ + '(' -name id.1 -o -name getspnam.3 ')' \ + -delete || die + + if ! use su ; then + find "${ED}"/usr/share/man -type f -name su.1 -delete || die + fi + + cd "${S}" || die + dodoc ChangeLog NEWS + newdoc README README.download + cd doc || die + dodoc HOWTO README* +} + +pkg_preinst() { + rm -f "${EROOT}"/etc/pam.d/system-auth.new \ + "${EROOT}/etc/login.defs.new" +} + +pkg_postinst() { + # Missing entries from /etc/passwd can cause odd system blips. + # See bug #829872. + if ! pwck -r -q -R "${EROOT:-/}" &>/dev/null ; then + ewarn "Running 'pwck' returned errors. Please run it manually to fix any errors." + fi + + # Enable shadow groups. + if [[ ! -f "${EROOT}"/etc/gshadow ]] ; then + if grpck -r -R "${EROOT:-/}" 2>/dev/null ; then + grpconv -R "${EROOT:-/}" + else + ewarn "Running 'grpck' returned errors. Please run it by hand, and then" + ewarn "run 'grpconv' afterwards!" + fi + fi + + [[ ! -f "${EROOT}"/etc/subgid ]] && + touch "${EROOT}"/etc/subgid + [[ ! -f "${EROOT}"/etc/subuid ]] && + touch "${EROOT}"/etc/subuid + + einfo "The 'adduser' symlink to 'useradd' has been dropped." +} diff --git a/sys-apps/sysvinit/Manifest b/sys-apps/sysvinit/Manifest index f2e11b26fd90..d8e540c988b0 100644 --- a/sys-apps/sysvinit/Manifest +++ b/sys-apps/sysvinit/Manifest @@ -1,2 +1,2 @@ -DIST sysvinit-3.13.tar.gz 515591 BLAKE2B 0b0d1212a8063e2ad4815ba71faa33d4bed01c88b50c93c8c3c845598e0d18a881a75c1c9e589c8e4a6ee89510fe581aa2c28ca97028f17ba9becc949f7ae7e3 SHA512 8b090043b6d04edca6fbb5d09124bbab45a1199f4a4c4f913ac9f161a195bb7823b54348a61d9dd78b3d782e46fe63148b436fe7efbadae8c5d4ef008c1a123e -DIST sysvinit-3.14.tar.gz 516373 BLAKE2B 80fbc4189da0df2687fd1bc8b5d0a4e12320b179a4c14baeafabf592f2273896df2dd247f7ee3a95e541285a204bce7a568bbc28f73aadd80465e189611c9af7 SHA512 5bbaf2ad7e4e0d479b4f32653f22fb6cb066a8107c33548d53842789f96f9439cf9915d1ad877a05e87298d515b83e39c71e5a33dff1ff83d73b2323e23499a7 +DIST sysvinit-3.16.tar.gz 522936 BLAKE2B 36e9e61042419e60416ae5be25842967aaa66676d1fbe1191abb2e9c3d07630556f7ccbf3d189c02b48f3bd65b3bb5d974dfd5ab93cdb8e9d2f6870ae5a747ce SHA512 c9aa22a7aa102b9c07e683f26afad97256f4db8ca350f98ffa18b972169bae646c03d73924e92bb047b8e15ddfa9a7f28c75a5a755a7da6584e219bbadc81287 +DIST sysvinit-3.18.tar.gz 512421 BLAKE2B 8a792386904ae5e1484a99eff3ceaa87ef4d188021b80fbc2699ed0f995b6370e6946abd7cff1ba8a81a6b38a56246877629bcf2052617cbe0d36fb64fc82585 SHA512 3e8fa2a178341b019e956ec4d3e6fda53984675ef65db96ea166481fbe663cff49a47e0318849d57e38a30161f16480ae26c4f8b96e6c7076ade4413c3cba39a diff --git a/sys-apps/sysvinit/files/sysvinit-2.94_beta-shutdown-single.patch b/sys-apps/sysvinit/files/sysvinit-2.94_beta-shutdown-single.patch deleted file mode 100644 index 9aa85229eee1..000000000000 --- a/sys-apps/sysvinit/files/sysvinit-2.94_beta-shutdown-single.patch +++ /dev/null @@ -1,39 +0,0 @@ -This patch makes shutdown use the Single User runlevel by default so -the gettys are shutdown too. - -Roy Marples - -Forward-ported from v2.86 to v2.94_beta -Lars Wendler - ---- sysvinit-2.94/man/shutdown.8 -+++ sysvinit-2.94/man/shutdown.8 -@@ -44,7 +44,7 @@ - \fBshutdown\fP does its job by signalling the \fBinit\fP process, - asking it to change the runlevel. - Runlevel \fB0\fP is used to halt the system, runlevel \fB6\fP is used --to reboot the system, and runlevel \fB1\fP is used to put to system into -+to reboot the system, and runlevel \fBS\fP is used to put to system into - a state where administrative tasks can be performed; this is the default - if neither the \fI-h\fP or \fI-r\fP flag is given to \fBshutdown\fP. - To see which actions are taken on halt or reboot see the appropriate ---- sysvinit-2.94/src/shutdown.c -+++ sysvinit-2.94/src/shutdown.c -@@ -547,7 +547,7 @@ - usage(); - exit(1); - } -- strcpy(down_level, "1"); -+ strcpy(down_level, "S"); - halttype = NULL; - memset(when, '\0', WHEN_SIZE); - -@@ -734,6 +734,8 @@ - strncpy(newstate, "for reboot", STATELEN); - break; - case '1': -+ case 'S': -+ case 's': - strncpy(newstate, "to maintenance mode", STATELEN); - break; - default: diff --git a/sys-apps/sysvinit/metadata.xml b/sys-apps/sysvinit/metadata.xml index e0d9447cfa99..082e41e2ca4f 100644 --- a/sys-apps/sysvinit/metadata.xml +++ b/sys-apps/sysvinit/metadata.xml @@ -14,5 +14,5 @@ Gentoo Base System - kit-fixups + ports \ No newline at end of file diff --git a/sys-apps/sysvinit/sysvinit-3.13.ebuild b/sys-apps/sysvinit/sysvinit-3.13.ebuild deleted file mode 100644 index 85cec5094264..000000000000 --- a/sys-apps/sysvinit/sysvinit-3.13.ebuild +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright 2021-2025 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -PLOCALES="de es fr pl" -inherit toolchain-funcs flag-o-matic plocale - -DESCRIPTION="/sbin/init - parent of all processes" -HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit" -SRC_URI="https://github.com/slicer69/sysvinit/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -[[ "${PV}" == *beta* ]] || \ -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="selinux ibm nls static" - -COMMON_DEPEND=" - acct-group/root - selinux? ( - >=sys-libs/libselinux-1.28 - ) -" -DEPEND=" - ${COMMON_DEPEND} - virtual/os-headers -" -RDEPEND=" - ${COMMON_DEPEND} - !::g' \ - -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \ - src/Makefile || die - - # pidof has moved to >=procps-3.3.9 - sed -i -r \ - -e '/\/bin\/pidof/d' \ - -e '/^MAN8/s:\::g' \ - src/Makefile || die - - # logsave is already in e2fsprogs - sed -i -r \ - -e '/^(USR)?S?BIN/s:\::g' \ - -e '/^MAN8/s:\::g' \ - src/Makefile || die - - # Munge inittab for specific architectures - cd "${WORKDIR}" || die - cp "${FILESDIR}"/inittab-2.98-r2 inittab || die "cp inittab" - local insert=() - use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' ) - use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' ) - use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' ) - use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' ) - use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' ) - if use ibm ; then - insert+=( - '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0' - '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0' - ) - fi - (use arm || use mips || use sparc) && sed -i '/ttyS0/s:#::' inittab - if use x86 || use amd64 ; then - sed -i \ - -e '/ttyS[01]/s:9600:115200:' \ - inittab - fi - - if [[ ${#insert[@]} -gt 0 ]] ; then - printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab - fi - - delete_unused_locale() { - local locale=${1} - - einfo "Deleting non-requested man page translations for locale=${locale}" - rm "${S}"/man/po/${locale}.po || die - - sed -i -e "/^\[po4a_langs\]/ s:${locale}::" "${S}"/man/po/po4a.cfg || die - } - - plocale_for_each_disabled_locale delete_unused_locale -} - -src_compile() { - tc-export CC - - append-lfs-flags - - # bug #381311 - export DISTRO= - export VERSION="${PV}" - - use static && append-ldflags -static - emake -C src $(usex selinux 'WITH_SELINUX=yes' '') - - if use nls && [[ -n "$(plocale_get_locales)" ]] ; then - cd man/po || die - po4a po4a.cfg || die - fi -} - -src_install() { - emake -C src install ROOT="${D}" - dodoc README doc/* - - insinto /etc - doins "${WORKDIR}"/inittab - - newinitd "${FILESDIR}"/bootlogd.initd bootlogd - newconfd "${FILESDIR}"/bootlogd.confd bootlogd - - into / - dosbin "${FILESDIR}"/halt.sh - - keepdir /etc/inittab.d - - if use nls && [[ -n "$(plocale_get_locales)" ]] ; then - install_locale_man_pages() { - doman -i18n=${1} man/po/${1}/* - } - - plocale_for_each_locale install_locale_man_pages - fi - - # Dead symlink - find "${ED}" -xtype l -delete || die - - find "${ED}" -type d -empty -delete || die -} - -pkg_postinst() { - # Reload init to fix unmounting problems of / on next reboot. - # This is really needed, as without the new version of init cause init - # not to quit properly on reboot, and causes a fsck of / on next reboot. - if [[ -z ${ROOT} ]] ; then - if [[ -e /dev/initctl ]] && [[ ! -e /run/initctl ]] ; then - ln -s /dev/initctl /run/initctl \ - || ewarn "Failed to set /run/initctl symlink!" - fi - # Do not return an error if this fails - /sbin/telinit U &>/dev/null - fi - - elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to" - elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps." - - # Required for new bootlogd service - if [[ ! -e "${EROOT}/var/log/boot" ]] ; then - touch "${EROOT}/var/log/boot" - fi - - local ver - for ver in ${REPLACING_VERSIONS}; do - ver_test ${ver} -ge 3.07-r2 && continue - ewarn "Previously, the 'halt' command caused the system to power off" - ewarn "even if option -p was not given. This long-standing bug has" - ewarn "been fixed, and the command now behaves as documented." - break - done -} diff --git a/sys-apps/sysvinit/sysvinit-3.14.ebuild b/sys-apps/sysvinit/sysvinit-3.14.ebuild deleted file mode 100644 index 85cec5094264..000000000000 --- a/sys-apps/sysvinit/sysvinit-3.14.ebuild +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright 2021-2025 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -PLOCALES="de es fr pl" -inherit toolchain-funcs flag-o-matic plocale - -DESCRIPTION="/sbin/init - parent of all processes" -HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit" -SRC_URI="https://github.com/slicer69/sysvinit/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -[[ "${PV}" == *beta* ]] || \ -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" -IUSE="selinux ibm nls static" - -COMMON_DEPEND=" - acct-group/root - selinux? ( - >=sys-libs/libselinux-1.28 - ) -" -DEPEND=" - ${COMMON_DEPEND} - virtual/os-headers -" -RDEPEND=" - ${COMMON_DEPEND} - !::g' \ - -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \ - src/Makefile || die - - # pidof has moved to >=procps-3.3.9 - sed -i -r \ - -e '/\/bin\/pidof/d' \ - -e '/^MAN8/s:\::g' \ - src/Makefile || die - - # logsave is already in e2fsprogs - sed -i -r \ - -e '/^(USR)?S?BIN/s:\::g' \ - -e '/^MAN8/s:\::g' \ - src/Makefile || die - - # Munge inittab for specific architectures - cd "${WORKDIR}" || die - cp "${FILESDIR}"/inittab-2.98-r2 inittab || die "cp inittab" - local insert=() - use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' ) - use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' ) - use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' ) - use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' ) - use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' ) - if use ibm ; then - insert+=( - '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0' - '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0' - ) - fi - (use arm || use mips || use sparc) && sed -i '/ttyS0/s:#::' inittab - if use x86 || use amd64 ; then - sed -i \ - -e '/ttyS[01]/s:9600:115200:' \ - inittab - fi - - if [[ ${#insert[@]} -gt 0 ]] ; then - printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab - fi - - delete_unused_locale() { - local locale=${1} - - einfo "Deleting non-requested man page translations for locale=${locale}" - rm "${S}"/man/po/${locale}.po || die - - sed -i -e "/^\[po4a_langs\]/ s:${locale}::" "${S}"/man/po/po4a.cfg || die - } - - plocale_for_each_disabled_locale delete_unused_locale -} - -src_compile() { - tc-export CC - - append-lfs-flags - - # bug #381311 - export DISTRO= - export VERSION="${PV}" - - use static && append-ldflags -static - emake -C src $(usex selinux 'WITH_SELINUX=yes' '') - - if use nls && [[ -n "$(plocale_get_locales)" ]] ; then - cd man/po || die - po4a po4a.cfg || die - fi -} - -src_install() { - emake -C src install ROOT="${D}" - dodoc README doc/* - - insinto /etc - doins "${WORKDIR}"/inittab - - newinitd "${FILESDIR}"/bootlogd.initd bootlogd - newconfd "${FILESDIR}"/bootlogd.confd bootlogd - - into / - dosbin "${FILESDIR}"/halt.sh - - keepdir /etc/inittab.d - - if use nls && [[ -n "$(plocale_get_locales)" ]] ; then - install_locale_man_pages() { - doman -i18n=${1} man/po/${1}/* - } - - plocale_for_each_locale install_locale_man_pages - fi - - # Dead symlink - find "${ED}" -xtype l -delete || die - - find "${ED}" -type d -empty -delete || die -} - -pkg_postinst() { - # Reload init to fix unmounting problems of / on next reboot. - # This is really needed, as without the new version of init cause init - # not to quit properly on reboot, and causes a fsck of / on next reboot. - if [[ -z ${ROOT} ]] ; then - if [[ -e /dev/initctl ]] && [[ ! -e /run/initctl ]] ; then - ln -s /dev/initctl /run/initctl \ - || ewarn "Failed to set /run/initctl symlink!" - fi - # Do not return an error if this fails - /sbin/telinit U &>/dev/null - fi - - elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to" - elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps." - - # Required for new bootlogd service - if [[ ! -e "${EROOT}/var/log/boot" ]] ; then - touch "${EROOT}/var/log/boot" - fi - - local ver - for ver in ${REPLACING_VERSIONS}; do - ver_test ${ver} -ge 3.07-r2 && continue - ewarn "Previously, the 'halt' command caused the system to power off" - ewarn "even if option -p was not given. This long-standing bug has" - ewarn "been fixed, and the command now behaves as documented." - break - done -} diff --git a/sys-apps/sysvinit/sysvinit-3.16.ebuild b/sys-apps/sysvinit/sysvinit-3.16.ebuild new file mode 100644 index 000000000000..8819cd056d73 --- /dev/null +++ b/sys-apps/sysvinit/sysvinit-3.16.ebuild @@ -0,0 +1,190 @@ +# Copyright 2021-2026 Liguros Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +PLOCALES="de es fr pl" +inherit toolchain-funcs flag-o-matic plocale + +DESCRIPTION="/sbin/init - parent of all processes" +HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit" +SRC_URI="https://codeberg.org/thejessesmith/sysvinit/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +[[ "${PV}" == *beta* ]] || \ +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="selinux ibm nls static" + +COMMON_DEPEND=" + acct-group/root + selinux? ( + >=sys-libs/libselinux-1.28 + ) +" +DEPEND=" + ${COMMON_DEPEND} + virtual/os-headers +" +RDEPEND=" + ${COMMON_DEPEND} + !::g' \ + -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \ + src/Makefile || die + + # pidof has moved to >=procps-3.3.9 + sed -i -r \ + -e '/\/bin\/pidof/d' \ + -e '/^MAN8/s:\::g' \ + src/Makefile || die + + # logsave is already in e2fsprogs + sed -i -r \ + -e '/^(USR)?S?BIN/s:\::g' \ + -e '/^MAN8/s:\::g' \ + src/Makefile || die + + # Munge inittab for specific architectures + cd "${WORKDIR}" || die + cp "${FILESDIR}"/inittab-2.98-r2 inittab || die "cp inittab" + local insert=() + use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' ) + use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' ) + use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' ) + use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' ) + use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' ) + if use ibm ; then + insert+=( + '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0' + '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0' + ) + fi + (use arm || use mips || use sparc) && sed -i '/ttyS0/s:#::' inittab + if use x86 || use amd64 ; then + sed -i \ + -e '/ttyS[01]/s:9600:115200:' \ + inittab + fi + + if [[ ${#insert[@]} -gt 0 ]] ; then + printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab + fi + + delete_unused_locale() { + local locale=${1} + + einfo "Deleting non-requested man page translations for locale=${locale}" + rm "${S}"/man/po/${locale}.po || die + + sed -i -e "/^\[po4a_langs\]/ s:${locale}::" "${S}"/man/po/po4a.cfg || die + } + + plocale_for_each_disabled_locale delete_unused_locale +} + +src_compile() { + tc-export CC + + append-lfs-flags + + # bug #381311 + export DISTRO= + export VERSION="${PV}" + + use static && append-ldflags -static + emake -C src $(usex selinux 'WITH_SELINUX=yes' '') + + if use nls && [[ -n "$(plocale_get_locales)" ]] ; then + cd man/po || die + po4a po4a.cfg || die + fi +} + +src_install() { + emake -C src install ROOT="${D}" + dodoc README doc/* + + insinto /etc + doins "${WORKDIR}"/inittab + + newinitd "${FILESDIR}"/bootlogd.initd bootlogd + newconfd "${FILESDIR}"/bootlogd.confd bootlogd + + into / + dosbin "${FILESDIR}"/halt.sh + + keepdir /etc/inittab.d + + if use nls && [[ -n "$(plocale_get_locales)" ]] ; then + install_locale_man_pages() { + doman -i18n=${1} man/po/${1}/* + } + + plocale_for_each_locale install_locale_man_pages + fi + + # Dead symlink + find "${ED}" -xtype l -delete || die + + find "${ED}" -type d -empty -delete || die +} + +pkg_postinst() { + # Reload init to fix unmounting problems of / on next reboot. + # This is really needed, as without the new version of init cause init + # not to quit properly on reboot, and causes a fsck of / on next reboot. + if [[ -z ${ROOT} ]] ; then + if [[ -e /dev/initctl ]] && [[ ! -e /run/initctl ]] ; then + ln -s /dev/initctl /run/initctl \ + || ewarn "Failed to set /run/initctl symlink!" + fi + # Do not return an error if this fails + /sbin/telinit U &>/dev/null + fi + + elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to" + elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps." + + # Required for new bootlogd service + if [[ ! -e "${EROOT}/var/log/boot" ]] ; then + touch "${EROOT}/var/log/boot" + fi + + local ver + for ver in ${REPLACING_VERSIONS}; do + ver_test ${ver} -ge 3.07-r2 && continue + ewarn "Previously, the 'halt' command caused the system to power off" + ewarn "even if option -p was not given. This long-standing bug has" + ewarn "been fixed, and the command now behaves as documented." + break + done +} diff --git a/sys-apps/sysvinit/sysvinit-3.18.ebuild b/sys-apps/sysvinit/sysvinit-3.18.ebuild new file mode 100644 index 000000000000..8819cd056d73 --- /dev/null +++ b/sys-apps/sysvinit/sysvinit-3.18.ebuild @@ -0,0 +1,190 @@ +# Copyright 2021-2026 Liguros Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +PLOCALES="de es fr pl" +inherit toolchain-funcs flag-o-matic plocale + +DESCRIPTION="/sbin/init - parent of all processes" +HOMEPAGE="https://savannah.nongnu.org/projects/sysvinit" +SRC_URI="https://codeberg.org/thejessesmith/sysvinit/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +[[ "${PV}" == *beta* ]] || \ +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="selinux ibm nls static" + +COMMON_DEPEND=" + acct-group/root + selinux? ( + >=sys-libs/libselinux-1.28 + ) +" +DEPEND=" + ${COMMON_DEPEND} + virtual/os-headers +" +RDEPEND=" + ${COMMON_DEPEND} + !::g' \ + -e '/^MAN[18]/s:\<(last|lastb|mesg|mountpoint|sulogin|utmpdump|wall)[.][18]\>::g' \ + src/Makefile || die + + # pidof has moved to >=procps-3.3.9 + sed -i -r \ + -e '/\/bin\/pidof/d' \ + -e '/^MAN8/s:\::g' \ + src/Makefile || die + + # logsave is already in e2fsprogs + sed -i -r \ + -e '/^(USR)?S?BIN/s:\::g' \ + -e '/^MAN8/s:\::g' \ + src/Makefile || die + + # Munge inittab for specific architectures + cd "${WORKDIR}" || die + cp "${FILESDIR}"/inittab-2.98-r2 inittab || die "cp inittab" + local insert=() + use ppc && insert=( '#psc0:12345:respawn:/sbin/agetty 115200 ttyPSC0 linux' ) + use arm && insert=( '#f0:12345:respawn:/sbin/agetty 9600 ttyFB0 vt100' ) + use arm64 && insert=( 'f0:12345:respawn:/sbin/agetty 9600 ttyAMA0 vt100' ) + use hppa && insert=( 'b0:12345:respawn:/sbin/agetty 9600 ttyB0 vt100' ) + use s390 && insert=( 's0:12345:respawn:/sbin/agetty 38400 console dumb' ) + if use ibm ; then + insert+=( + '#hvc0:2345:respawn:/sbin/agetty -L 9600 hvc0' + '#hvsi:2345:respawn:/sbin/agetty -L 19200 hvsi0' + ) + fi + (use arm || use mips || use sparc) && sed -i '/ttyS0/s:#::' inittab + if use x86 || use amd64 ; then + sed -i \ + -e '/ttyS[01]/s:9600:115200:' \ + inittab + fi + + if [[ ${#insert[@]} -gt 0 ]] ; then + printf '%s\n' '' '# Architecture specific features' "${insert[@]}" >> inittab + fi + + delete_unused_locale() { + local locale=${1} + + einfo "Deleting non-requested man page translations for locale=${locale}" + rm "${S}"/man/po/${locale}.po || die + + sed -i -e "/^\[po4a_langs\]/ s:${locale}::" "${S}"/man/po/po4a.cfg || die + } + + plocale_for_each_disabled_locale delete_unused_locale +} + +src_compile() { + tc-export CC + + append-lfs-flags + + # bug #381311 + export DISTRO= + export VERSION="${PV}" + + use static && append-ldflags -static + emake -C src $(usex selinux 'WITH_SELINUX=yes' '') + + if use nls && [[ -n "$(plocale_get_locales)" ]] ; then + cd man/po || die + po4a po4a.cfg || die + fi +} + +src_install() { + emake -C src install ROOT="${D}" + dodoc README doc/* + + insinto /etc + doins "${WORKDIR}"/inittab + + newinitd "${FILESDIR}"/bootlogd.initd bootlogd + newconfd "${FILESDIR}"/bootlogd.confd bootlogd + + into / + dosbin "${FILESDIR}"/halt.sh + + keepdir /etc/inittab.d + + if use nls && [[ -n "$(plocale_get_locales)" ]] ; then + install_locale_man_pages() { + doman -i18n=${1} man/po/${1}/* + } + + plocale_for_each_locale install_locale_man_pages + fi + + # Dead symlink + find "${ED}" -xtype l -delete || die + + find "${ED}" -type d -empty -delete || die +} + +pkg_postinst() { + # Reload init to fix unmounting problems of / on next reboot. + # This is really needed, as without the new version of init cause init + # not to quit properly on reboot, and causes a fsck of / on next reboot. + if [[ -z ${ROOT} ]] ; then + if [[ -e /dev/initctl ]] && [[ ! -e /run/initctl ]] ; then + ln -s /dev/initctl /run/initctl \ + || ewarn "Failed to set /run/initctl symlink!" + fi + # Do not return an error if this fails + /sbin/telinit U &>/dev/null + fi + + elog "The last/lastb/mesg/mountpoint/sulogin/utmpdump/wall tools have been moved to" + elog "sys-apps/util-linux. The pidof tool has been moved to sys-process/procps." + + # Required for new bootlogd service + if [[ ! -e "${EROOT}/var/log/boot" ]] ; then + touch "${EROOT}/var/log/boot" + fi + + local ver + for ver in ${REPLACING_VERSIONS}; do + ver_test ${ver} -ge 3.07-r2 && continue + ewarn "Previously, the 'halt' command caused the system to power off" + ewarn "even if option -p was not given. This long-standing bug has" + ewarn "been fixed, and the command now behaves as documented." + break + done +} diff --git a/virtual/libudev/libudev-232-r8.ebuild b/virtual/libudev/libudev-232-r8.ebuild deleted file mode 100644 index 2bf61cd4815c..000000000000 --- a/virtual/libudev/libudev-232-r8.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit multilib-build - -DESCRIPTION="Virtual for libudev providers" - -SLOT="0/1" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="systemd" - -RDEPEND=" - !systemd? ( || ( - sys-apps/systemd-utils[udev,${MULTILIB_USEDEP}] - >=sys-fs/eudev-3.2.9:0/0[${MULTILIB_USEDEP}] - ) ) - systemd? ( >=sys-apps/systemd-232:0/2[${MULTILIB_USEDEP}] ) -" diff --git a/virtual/libudev/libudev-251-r1.ebuild b/virtual/libudev/libudev-251-r1.ebuild deleted file mode 100644 index d76276374ab6..000000000000 --- a/virtual/libudev/libudev-251-r1.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2023 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -inherit multilib-build - -DESCRIPTION="Virtual for libudev providers" - -SLOT="0/1" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="eudev +sticky-tags systemd" -REQUIRED_USE=" - ?? ( eudev systemd ) - eudev? ( !sticky-tags ) -" - -RDEPEND=" - !systemd? ( - eudev? ( sys-fs/eudev[${MULTILIB_USEDEP}] ) - !eudev? ( >=sys-apps/systemd-utils-251[udev,${MULTILIB_USEDEP}] ) - ) - systemd? ( >=sys-apps/systemd-251:0/2[${MULTILIB_USEDEP}] ) -" diff --git a/virtual/libudev/libudev-251-r2.ebuild b/virtual/libudev/libudev-251-r2.ebuild new file mode 100644 index 000000000000..77e8c397971c --- /dev/null +++ b/virtual/libudev/libudev-251-r2.ebuild @@ -0,0 +1,17 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-build + +DESCRIPTION="Virtual for libudev providers" + +SLOT="0/1" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" +IUSE="systemd" + +RDEPEND=" + !systemd? ( >=sys-apps/systemd-utils-251[udev,${MULTILIB_USEDEP}] ) + systemd? ( >=sys-apps/systemd-251:0/2[${MULTILIB_USEDEP}] ) +" diff --git a/virtual/libudev/metadata.xml b/virtual/libudev/metadata.xml index 350537a946b6..c10e48286b50 100644 --- a/virtual/libudev/metadata.xml +++ b/virtual/libudev/metadata.xml @@ -1,21 +1,8 @@ - + - - dev@liguros.net - Development - - - eudev@gentoo.org - - - systemd@gentoo.org - - - - Depend on sys-fs/eudev - Enable API support for sticky tags - - kit-fixups - - \ No newline at end of file + + systemd@gentoo.org + + + diff --git a/virtual/service-manager/metadata.xml b/virtual/service-manager/metadata.xml index 0a5f734c3b24..de9d78424186 100644 --- a/virtual/service-manager/metadata.xml +++ b/virtual/service-manager/metadata.xml @@ -1,14 +1,9 @@ - + - - dev@liguros.net - Development - - - base-system@gentoo.org - Gentoo Base System - - - kit-fixups - \ No newline at end of file + + base-system@gentoo.org + Gentoo Base System + + + diff --git a/virtual/service-manager/service-manager-0.ebuild b/virtual/service-manager/service-manager-0.ebuild deleted file mode 100644 index d7730f1cfbf7..000000000000 --- a/virtual/service-manager/service-manager-0.ebuild +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2020-2021 LiGurOs Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=5 - -DESCRIPTION="Virtual for various service managers" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -IUSE="kernel_linux prefix" - -RDEPEND=" - prefix? ( >=sys-apps/baselayout-prefix-2.2 ) - !prefix? ( - || ( - sys-apps/openrc - kernel_linux? ( || ( - sys-apps/systemd - sys-process/runit - virtual/daemontools - ) ) ) )" diff --git a/virtual/service-manager/service-manager-1.ebuild b/virtual/service-manager/service-manager-1.ebuild deleted file mode 100644 index 9b4b78408031..000000000000 --- a/virtual/service-manager/service-manager-1.ebuild +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 2020-2021 LiGurOs Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=5 - -DESCRIPTION="Virtual for various service managers" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" -IUSE="kernel_linux prefix" - -RDEPEND="sys-apps/openrc" diff --git a/virtual/service-manager/service-manager-2-r1.ebuild b/virtual/service-manager/service-manager-2-r1.ebuild new file mode 100644 index 000000000000..5856d2ce7e65 --- /dev/null +++ b/virtual/service-manager/service-manager-2-r1.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Virtual for various service managers" + +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" +IUSE="systemd" + +RDEPEND=" + !prefix-guest? ( + systemd? ( sys-apps/systemd ) + !systemd? ( || ( + sys-apps/openrc + kernel_linux? ( || ( + sys-apps/s6-rc[system-init(-)] + sys-process/runit[system-init(-)] + ) ) + ) + ) + ) +" diff --git a/virtual/service-manager/service-manager-2.ebuild b/virtual/service-manager/service-manager-2.ebuild new file mode 100644 index 000000000000..0cdac3d427ef --- /dev/null +++ b/virtual/service-manager/service-manager-2.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Virtual for various service managers" + +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" +IUSE="systemd" + +RDEPEND=" + !prefix-guest? ( + systemd? ( sys-apps/systemd ) + !systemd? ( || ( + sys-apps/openrc + kernel_linux? ( || ( + sys-apps/s6-rc + sys-process/runit + ) ) + ) + ) + ) +" -- cgit v1.3.1