commit 7168ad8
hovercats
·
2024-06-09 06:20:46 +0000 UTC
parent ef0f218
openntpd: import from oasis
11 files changed,
+186,
-0
M
sets.lua
+1,
-0
1@@ -37,6 +37,7 @@ subgen 'nasm'
2 subgen 'netbsd-curses'
3 subgen 'oksh'
4 subgen 'openbsd'
5+subgen 'openntpd'
6 subgen 'openssh'
7 subgen 'pigz'
8 subgen 'qbe'
+2,
-0
1@@ -0,0 +1,2 @@
2+/openntpd-6.8p1.tar.gz
3+/src
+10,
-0
1@@ -0,0 +1,10 @@
2+# openntpd
3+
4+## config.h
5+Generated with
6+
7+ ./configure \
8+ --with-privsep-user=ntpd \
9+ CPPFLAGS='-I/src/oasis/out/pkg/libtls-bearssl/include' \
10+ LDFLAGS='-L/src/oasis/out/pkg/libtls-bearssl -L/src/oasis/out/pkg/openbsd' \
11+ LIBS='-ltls -lbearssl -lbsd'
+72,
-0
1@@ -0,0 +1,72 @@
2+/* #undef BROKEN_SETREGID */
3+/* #undef BROKEN_SETREUID */
4+#define CONSTRAINT_CA "/etc/ssl/cert.pem"
5+/* #undef HAVE_ADJFREQ */
6+#define HAVE_ADJTIMEX 1
7+#define HAVE_ARC4RANDOM 1
8+#define HAVE_ARC4RANDOM_BUF 1
9+#define HAVE_ARC4RANDOM_UNIFORM 1
10+#define HAVE_ASPRINTF 1
11+/* #undef HAVE_ATTRIBUTE__BOUNDED__ */
12+/* #undef HAVE_ATTRIBUTE__DEAD */
13+/* #undef HAVE_ATTRIBUTE__PACKED */
14+#define HAVE_CLOCK_GETRES 1
15+#define HAVE_CLOCK_GETTIME 1
16+/* #undef HAVE_CLOSEFROM */
17+#define HAVE_DAEMON 1
18+#define HAVE_DLFCN_H 1
19+#define HAVE_ERR_H 1
20+#define HAVE_EXPLICIT_BZERO 1
21+#define HAVE_FREEZERO 1
22+#define HAVE_GETAUXVAL 1
23+/* #undef HAVE_IBUF_OPEN */
24+#define HAVE_IFADDRS_H 1
25+#define HAVE_INTTYPES_H 1
26+#define HAVE_LIBTLS yes
27+#define HAVE_MEMMEM 1
28+#define HAVE_MEMORY_H 1
29+/* #undef HAVE_NTP_ADJTIME */
30+#define HAVE_PATHS_H 1
31+#define HAVE_POLL 1
32+#define HAVE_REALLOCARRAY 1
33+#define HAVE_RECALLOCARRAY 1
34+#define HAVE_SETGROUPS 1
35+/* #undef HAVE_SETPROCTITLE */
36+#define HAVE_SETREGID 1
37+#define HAVE_SETRESGID 1
38+#define HAVE_SETRESUID 1
39+#define HAVE_SETREUID 1
40+#define HAVE_STDINT_H 1
41+#define HAVE_STDLIB_H 1
42+#define HAVE_STRINGS_H 1
43+#define HAVE_STRING_H 1
44+#define HAVE_STRLCAT 1
45+#define HAVE_STRLCPY 1
46+#define HAVE_STRTONUM 1
47+/* #undef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
48+#define HAVE_SYSCONF 1
49+/* #undef HAVE_SYS_SENSORS_H */
50+#define HAVE_SYS_STAT_H 1
51+/* #undef HAVE_SYS_SYSCTL_H */
52+#define HAVE_SYS_TYPES_H 1
53+#define HAVE_TIMINGSAFE_BCMP 1
54+#define HAVE_TIMINGSAFE_MEMCMP 1
55+#define HAVE_TLS_CONFIG_SET_CA_MEM 1
56+#define HAVE_UNISTD_H 1
57+#define HAVE_VA_COPY 1
58+#define HAVE___PROGNAME 1
59+/* #undef HAVE___VA_COPY */
60+#define LT_OBJDIR ".libs/"
61+#define NTPD_USER "ntpd"
62+#define PACKAGE "openntpd"
63+#define PACKAGE_BUGREPORT ""
64+#define PACKAGE_NAME "OpenNTPD"
65+#define PACKAGE_STRING "OpenNTPD 6.8p1"
66+#define PACKAGE_TARNAME "openntpd"
67+#define PACKAGE_URL ""
68+#define PACKAGE_VERSION "6.8p1"
69+/* #undef SETEUID_BREAKS_SETUID */
70+#define SPT_TYPE SPT_REUSEARGV
71+#define STDC_HEADERS 1
72+#define VERSION "6.8p1"
73+/* #undef YYSTYPE_IS_DECLARED */
+48,
-0
1@@ -0,0 +1,48 @@
2+cflags{
3+ '-D _GNU_SOURCE',
4+ '-include $dir/config.h',
5+ '-I $srcdir/src',
6+ '-I $srcdir/include',
7+ '-isystem $basedir/pkg/openbsd/include',
8+ '-isystem $builddir/pkg/libtls-bearssl/include',
9+}
10+
11+pkg.deps = {
12+ 'pkg/libtls-bearssl/headers',
13+}
14+
15+yacc('parse', '$srcdir/src/parse.y')
16+exe('ntpd', [[
17+ src/(
18+ client.c
19+ config.c
20+ constraint.c
21+ control.c
22+ fake-sensors.c
23+ log.c
24+ ntp.c
25+ ntp_dns.c
26+ ntp_msg.c
27+ ntpd.c
28+ server.c
29+ util.c
30+ )
31+ compat/(
32+ adjfreq_linux.c
33+ closefrom.c
34+ freezero.c
35+ imsg.c
36+ imsg-buffer.c
37+ md5.c
38+ progname.c
39+ setproctitle.c
40+ )
41+ $outdir/parse.tab.c
42+ $builddir/pkg/libtls-bearssl/libtls.a.d
43+ $builddir/pkg/openbsd/libbsd.a
44+]])
45+file('bin/ntpd', '755', '$outdir/ntpd')
46+sym('bin/ntpctl', 'ntpd')
47+man{'src/ntpd.conf.5', 'src/ntpd.8', 'src/ntpctl.8'}
48+
49+fetch 'curl'
1@@ -0,0 +1,25 @@
2+From 2760ceff5d4817963fb7882bfaf8852c8dc4460c Mon Sep 17 00:00:00 2001
3+From: Michael Forney <mforney@mforney.org>
4+Date: Fri, 11 Aug 2017 23:08:10 -0700
5+Subject: [PATCH] Set CTLSOCKET to /run/ntpd.sock
6+
7+---
8+ src/ntpd.h | 2 +-
9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/src/ntpd.h b/src/ntpd.h
12+index ced81b9ff..7364c5aa8 100644
13+--- a/src/ntpd.h
14++++ b/src/ntpd.h
15+@@ -49,7 +49,7 @@
16+ #define LOCALSTATEDIR "/var"
17+ #endif
18+ #define DRIFTFILE LOCALSTATEDIR "/db/ntpd.drift"
19+-#define CTLSOCKET LOCALSTATEDIR "/run/ntpd.sock"
20++#define CTLSOCKET "/run/ntpd.sock"
21+
22+ #define INTERVAL_QUERY_NORMAL 30 /* sync to peers every n secs */
23+ #define INTERVAL_QUERY_PATHETIC 60
24+--
25+2.29.2
26+
1@@ -0,0 +1,24 @@
2+From 10b2b1ed0b275a0594033872104a53645c8b245c Mon Sep 17 00:00:00 2001
3+From: Michael Forney <mforney@mforney.org>
4+Date: Wed, 15 Apr 2020 20:10:16 -0700
5+Subject: [PATCH] Fix build with old bison versions
6+
7+---
8+ src/parse.y | 1 +
9+ 1 file changed, 1 insertion(+)
10+
11+diff --git a/src/parse.y b/src/parse.y
12+index 4a101bcd6..742108c51 100644
13+--- a/src/parse.y
14++++ b/src/parse.y
15+@@ -80,6 +80,7 @@ typedef struct {
16+ } v;
17+ int lineno;
18+ } YYSTYPE;
19++#define YYSTYPE_IS_DECLARED 1
20+
21+ %}
22+
23+--
24+2.29.2
25+
+1,
-0
1@@ -0,0 +1 @@
2+8582db838a399153d4a17f2a76518b638cc3020f58028575bf54127518f55a46 openntpd-6.8p1.tar.gz
+1,
-0
1@@ -0,0 +1 @@
2+url = "https://cdn.openbsd.org/pub/OpenBSD/OpenNTPD/openntpd-6.8p1.tar.gz"
+1,
-0
1@@ -0,0 +1 @@
2+6.8p1 r0
M
sets.lua
+1,
-0
1@@ -28,6 +28,7 @@ return {
2 'less',
3 'mandoc',
4 'netbsd-curses',
5+ 'openntpd',
6 'openssh',
7 'tz',
8 'util-linux',