summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/openntpd')
-rw-r--r--net-misc/openntpd/files/0001-fix-incompatible-check-for-libc-compat.patch30
-rw-r--r--net-misc/openntpd/openntpd-6.2_p3-r2.ebuild4
-rw-r--r--net-misc/openntpd/openntpd-6.2_p3-r3.ebuild (renamed from net-misc/openntpd/openntpd-6.8_p1.ebuild)21
-rw-r--r--net-misc/openntpd/openntpd-6.8_p1-r2.ebuild (renamed from net-misc/openntpd/openntpd-6.8_p1-r1.ebuild)14
4 files changed, 57 insertions, 12 deletions
diff --git a/net-misc/openntpd/files/0001-fix-incompatible-check-for-libc-compat.patch b/net-misc/openntpd/files/0001-fix-incompatible-check-for-libc-compat.patch
new file mode 100644
index 000000000000..ee676d6f9935
--- /dev/null
+++ b/net-misc/openntpd/files/0001-fix-incompatible-check-for-libc-compat.patch
@@ -0,0 +1,30 @@
+From 8e4fdc1c2794e861cd026864607fa6b04c5237cb Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Tue, 21 May 2024 16:10:45 -0400
+Subject: [PATCH] fix incompatible check for libc compat
+
+It relied on implicit function declarations, which are banned starting
+in c99. Result: the check always failed.
+
+See: https://wiki.gentoo.org/wiki/Modern_C_porting#How_do_I_reproduce_these_bugs.3F
+Bug: https://bugs.gentoo.org/900296
+Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
+---
+ m4/check-libc-compat.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/check-libc-compat.m4 b/m4/check-libc-compat.m4
+index a806cbe..3bb859a 100644
+--- a/m4/check-libc-compat.m4
++++ b/m4/check-libc-compat.m4
+@@ -1,6 +1,6 @@
+ AC_DEFUN([CHECK_PROGNAME], [
+ AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+ [[ extern char *__progname; printf("%s", __progname); ]])],
+ [ ac_cv_libc_defines___progname="yes" ],
+ [ ac_cv_libc_defines___progname="no"
+--
+2.44.1
+
diff --git a/net-misc/openntpd/openntpd-6.2_p3-r2.ebuild b/net-misc/openntpd/openntpd-6.2_p3-r2.ebuild
index 23529b8fd7d4..a4562387dfad 100644
--- a/net-misc/openntpd/openntpd-6.2_p3-r2.ebuild
+++ b/net-misc/openntpd/openntpd-6.2_p3-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -8,7 +8,7 @@ inherit systemd
MY_P="${P/_p/p}"
DESCRIPTION="Lightweight NTP server ported from OpenBSD"
-HOMEPAGE="http://www.openntpd.org/"
+HOMEPAGE="https://www.openntpd.org/"
SRC_URI="mirror://openbsd/OpenNTPD/${MY_P}.tar.gz"
LICENSE="BSD GPL-2"
diff --git a/net-misc/openntpd/openntpd-6.8_p1.ebuild b/net-misc/openntpd/openntpd-6.2_p3-r3.ebuild
index ee0f69ce5392..77e63f5456df 100644
--- a/net-misc/openntpd/openntpd-6.8_p1.ebuild
+++ b/net-misc/openntpd/openntpd-6.2_p3-r3.ebuild
@@ -1,23 +1,24 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit systemd
+inherit autotools systemd
MY_P="${P/_p/p}"
DESCRIPTION="Lightweight NTP server ported from OpenBSD"
-HOMEPAGE="http://www.openntpd.org/"
+HOMEPAGE="https://www.openntpd.org/"
SRC_URI="mirror://openbsd/OpenNTPD/${MY_P}.tar.gz"
LICENSE="BSD GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="selinux"
DEPEND="
!net-misc/ntp[-openntpd]"
+
RDEPEND="
${DEPEND}
acct-group/openntpd
@@ -26,8 +27,15 @@ RDEPEND="
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/openntpd-6.2p3-fno-common.patch"
+ # https://github.com/openntpd-portable/openntpd-portable/pull/75
+ "${FILESDIR}"/0001-fix-incompatible-check-for-libc-compat.patch
+)
+
src_prepare() {
default
+ eautoreconf
# fix /run path
sed -i 's:/var/run/ntpd:/run/ntpd:g' src/ntpctl.8 src/ntpd.8 || die
@@ -38,7 +46,7 @@ src_prepare() {
sed -i 's:"/db/ntpd.drift":"/openntpd/ntpd.drift":' src/ntpd.h || die
# fix default config to use gentoo pool
- sed -i 's:^server:#server:g' ntpd.conf || die
+ sed -i 's:servers pool.ntp.org:#servers pool.ntp.org:' ntpd.conf || die
printf "\n# Choose servers announced from Gentoo NTP Pool\nservers 0.gentoo.pool.ntp.org\nservers 1.gentoo.pool.ntp.org\nservers 2.gentoo.pool.ntp.org\nservers 3.gentoo.pool.ntp.org\n" >> ntpd.conf || die
sed -ie 's/^constraints/#constraints/g' ntpd.conf || die
@@ -47,6 +55,7 @@ src_prepare() {
src_configure() {
econf \
--with-privsep-user=openntpd \
+ --with-privsep-path=/var/lib/openntpd/chroot \
--disable-https-constraint
}
diff --git a/net-misc/openntpd/openntpd-6.8_p1-r1.ebuild b/net-misc/openntpd/openntpd-6.8_p1-r2.ebuild
index c203e2a4f687..1b00a44a6fdf 100644
--- a/net-misc/openntpd/openntpd-6.8_p1-r1.ebuild
+++ b/net-misc/openntpd/openntpd-6.8_p1-r2.ebuild
@@ -1,14 +1,14 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit systemd
+inherit autotools systemd
MY_P="${P/_p/p}"
DESCRIPTION="Lightweight NTP server ported from OpenBSD"
-HOMEPAGE="http://www.openntpd.org/"
+HOMEPAGE="https://www.openntpd.org/"
SRC_URI="mirror://openbsd/OpenNTPD/${MY_P}.tar.gz"
LICENSE="BSD GPL-2"
@@ -28,8 +28,14 @@ RDEPEND="
S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ # https://github.com/openntpd-portable/openntpd-portable/pull/75
+ "${FILESDIR}"/0001-fix-incompatible-check-for-libc-compat.patch
+)
+
src_prepare() {
default
+ eautoreconf
# fix /run path
sed -i 's:/var/run/ntpd:/run/ntpd:g' src/ntpctl.8 src/ntpd.8 || die