Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 831352 | Differences between
and this patch

Collapse All | Expand All

(-)a/net-misc/ntpsec/files/ntpsec-1.2.1-build-notests.patch (+48 lines)
Line 0 Link Here
1
From 1a7bb2e3a2749bd709ea4cf10b66b6f6d05aaf9d Mon Sep 17 00:00:00 2001
2
From: James Browning <jamesb.fe80@gmail.com>
3
Date: Sun, 10 Apr 2022 07:53:37 -0700
4
Subject: [PATCH] I: NTPsec build does not repect --notests
5
6
STR: (run the following)
7
- git clone https://gitlab.com/NTPsec/ntpsec
8
- cd ntpsec
9
- ./waf configure build --notests -p
10
11
AR: NTPsec runs tests despite having a parameter telling it not to
12
ER: NTPsec should not run tests when it has been told not to
13
---
14
 wscript | 4 +++-
15
 1 file changed, 3 insertions(+), 1 deletion(-)
16
17
diff --git a/wscript b/wscript
18
index c1d765046..d8a20b82e 100644
19
--- a/wscript
20
+++ b/wscript
21
@@ -1131,6 +1131,7 @@ def build(ctx):
22
     ctx.manpage(8, "ntpclients/ntpsnmpd-man.adoc")
23
 
24
     # Skip running unit tests on a cross compile build
25
+    from waflib import Options
26
     if not ctx.env.ENABLE_CROSS:
27
         # Force re-running of tests.  Same as 'waf --alltests'
28
         if ctx.cmd == "check":
29
@@ -1139,6 +1140,8 @@ def build(ctx):
30
             # Print log if -v is supplied
31
             if verbose > 0:
32
                 ctx.add_post_fun(test_print_log)
33
+        elif Options.options.no_tests:
34
+            return
35
 
36
         # Test binaries
37
         ctx.add_post_fun(bin_test)
38
@@ -1152,7 +1155,6 @@ def build(ctx):
39
         ctx.add_post_fun(bin_test_summary)
40
     else:
41
         pprint("YELLOW", "Unit test runner skipped on a cross-compiled build.")
42
-        from waflib import Options
43
         Options.options.no_tests = True
44
 
45
     if ctx.cmd == "build":
46
-- 
47
2.32.0
48
(-)a/net-misc/ntpsec/files/ntpsec-py3-test-clarify (+34 lines)
Line 0 Link Here
1
From f360741dec76a9c9d831f0b547596891ea321599 Mon Sep 17 00:00:00 2001
2
From: James Browning <jamesb.fe80@gmail.com>
3
Date: Sun, 10 Apr 2022 16:23:34 -0700
4
Subject: [PATCH] clean test output up in Python 3
5
6
---
7
 wafhelpers/test.py | 9 +++++----
8
 1 file changed, 5 insertions(+), 4 deletions(-)
9
10
diff --git a/wafhelpers/test.py b/wafhelpers/test.py
11
index 9351a5675..6bba34881 100644
12
--- a/wafhelpers/test.py
13
+++ b/wafhelpers/test.py
14
@@ -31,12 +31,13 @@ def test_print_log(ctx):
15
         pprint("YELLOW", "RETURN VALUE:", retval)
16
         print("")
17
 
18
-        if retval or error:
19
+        if retval:
20
             pprint("RED", "****** ERROR ******\n")
21
 
22
-            print(error or lines)
23
+            print(polystr(error) or polystr(lines))
24
 
25
-        if (not retval) and (not error):
26
-            pprint("GREEN", "****** LOG ******\n", lines)
27
+        else:
28
+            pprint("GREEN", "****** LOG ******\n",
29
+                   polystr(lines), polystr(error))
30
 
31
         print("")
32
-- 
33
2.32.0
34
(-)a/net-misc/ntpsec/metadata.xml (-1 lines)
Lines 31-36 NTPsec project - a secure, hardened, and improved implementation of Network Time Link Here
31
		<flag name="rclock_modem">NIST/USNO/PTB Modem Time Services</flag>
31
		<flag name="rclock_modem">NIST/USNO/PTB Modem Time Services</flag>
32
		<flag name="rclock_local">Support for undisciplined local clock (not recommended)</flag>
32
		<flag name="rclock_local">Support for undisciplined local clock (not recommended)</flag>
33
		<flag name="smear">Specify the interval over which a leap second is applied (experimental)</flag>
33
		<flag name="smear">Specify the interval over which a leap second is applied (experimental)</flag>
34
		<flag name="tests">Enable tests</flag>
35
	</use>
34
	</use>
36
</pkgmetadata>
35
</pkgmetadata>
(-)a/net-misc/ntpsec/ntpsec-1.2.1-r2.ebuild (-3 / +13 lines)
Lines 30-36 IUSE_NTPSEC_REFCLOCK=${NTPSEC_REFCLOCK[@]/#/rclock_} Link Here
30
30
31
LICENSE="HPND MIT BSD-2 BSD CC-BY-SA-4.0"
31
LICENSE="HPND MIT BSD-2 BSD CC-BY-SA-4.0"
32
SLOT="0"
32
SLOT="0"
33
IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early gdb heat libbsd nist ntpviz samba seccomp smear tests" #ionice
33
IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early gdb heat libbsd nist ntpviz samba seccomp smear" #ionice
34
REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
34
REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
35
35
36
# net-misc/pps-tools oncore,pps
36
# net-misc/pps-tools oncore,pps
Lines 61-66 PATCHES=( Link Here
61
	"${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
61
	"${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
62
	"${FILESDIR}/${PN}-1.2.1-seccomp-rollup.patch"
62
	"${FILESDIR}/${PN}-1.2.1-seccomp-rollup.patch"
63
	"${FILESDIR}/${PN}-1.2.1-seccomp-rseq-glibc-2.35.patch"
63
	"${FILESDIR}/${PN}-1.2.1-seccomp-rseq-glibc-2.35.patch"
64
	"${FILESDIR}/${PN}-1.2.1-build-notests.patch"
65
	"${FILESDIR}/${PN}-py3-test-clarify.patch"
64
)
66
)
65
67
66
WAF_BINARY="${S}/waf"
68
WAF_BINARY="${S}/waf"
Lines 94-99 src_configure() { Link Here
94
	CLOCKSTRING="`echo ${string_127}|sed 's|,$||'`"
96
	CLOCKSTRING="`echo ${string_127}|sed 's|,$||'`"
95
97
96
	local myconf=(
98
	local myconf=(
99
		--notests
97
		--nopyc
100
		--nopyc
98
		--nopyo
101
		--nopyo
99
		--enable-pylib ext
102
		--enable-pylib ext
Lines 105-111 src_configure() { Link Here
105
		$(use samba	&& echo "--enable-mssntp")
108
		$(use samba	&& echo "--enable-mssntp")
106
		$(use seccomp	&& echo "--enable-seccomp")
109
		$(use seccomp	&& echo "--enable-seccomp")
107
		$(use smear	&& echo "--enable-leap-smear")
110
		$(use smear	&& echo "--enable-leap-smear")
108
		$(use tests	&& echo "--alltests")
109
		$(use debug	&& echo "--enable-debug")
111
		$(use debug	&& echo "--enable-debug")
110
	)
112
	)
111
113
Lines 118-124 src_configure() { Link Here
118
src_compile() {
120
src_compile() {
119
	unset MAKEOPTS
121
	unset MAKEOPTS
120
	python_compile() {
122
	python_compile() {
121
		waf-utils_src_compile
123
		waf-utils_src_compile --notests
124
	}
125
	python_foreach_impl run_in_build_dir python_compile
126
}
127
128
src_test() {
129
	debug-print-function ${FUNCNAME} "$@"
130
	python_compile() {
131
		waf-utils_src_compile check
122
	}
132
	}
123
	python_foreach_impl run_in_build_dir python_compile
133
	python_foreach_impl run_in_build_dir python_compile
124
}
134
}
(-)a/net-misc/ntpsec/ntpsec-9999.ebuild (-4 / +12 lines)
Lines 30-36 IUSE_NTPSEC_REFCLOCK=${NTPSEC_REFCLOCK[@]/#/rclock_} Link Here
30
30
31
LICENSE="HPND MIT BSD-2 BSD CC-BY-SA-4.0"
31
LICENSE="HPND MIT BSD-2 BSD CC-BY-SA-4.0"
32
SLOT="0"
32
SLOT="0"
33
IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early gdb heat libbsd nist ntpviz samba seccomp smear tests" #ionice
33
IUSE="${IUSE_NTPSEC_REFCLOCK} debug doc early gdb heat libbsd nist ntpviz samba seccomp smear" #ionice
34
REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
34
REQUIRED_USE="${PYTHON_REQUIRED_USE} nist? ( rclock_local )"
35
35
36
# net-misc/pps-tools oncore,pps
36
# net-misc/pps-tools oncore,pps
Lines 59-64 DEPEND="${CDEPEND} Link Here
59
59
60
PATCHES=(
60
PATCHES=(
61
	"${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
61
	"${FILESDIR}/${PN}-1.1.9-remove-asciidoctor-from-config.patch"
62
	"${FILESDIR}/${PN}-py3-test-clarify.patch"
62
)
63
)
63
64
64
WAF_BINARY="${S}/waf"
65
WAF_BINARY="${S}/waf"
Lines 92-97 src_configure() { Link Here
92
	CLOCKSTRING="`echo ${string_127}|sed 's|,$||'`"
93
	CLOCKSTRING="`echo ${string_127}|sed 's|,$||'`"
93
94
94
	local myconf=(
95
	local myconf=(
96
		--notests
95
		--nopyc
97
		--nopyc
96
		--nopyo
98
		--nopyo
97
		--enable-pylib ext
99
		--enable-pylib ext
Lines 103-109 src_configure() { Link Here
103
		$(use samba	&& echo "--enable-mssntp")
105
		$(use samba	&& echo "--enable-mssntp")
104
		$(use seccomp	&& echo "--enable-seccomp")
106
		$(use seccomp	&& echo "--enable-seccomp")
105
		$(use smear	&& echo "--enable-leap-smear")
107
		$(use smear	&& echo "--enable-leap-smear")
106
		$(use tests	&& echo "--alltests")
107
		$(use debug	&& echo "--enable-debug")
108
		$(use debug	&& echo "--enable-debug")
108
	)
109
	)
109
110
Lines 116-122 src_configure() { Link Here
116
src_compile() {
117
src_compile() {
117
	unset MAKEOPTS
118
	unset MAKEOPTS
118
	python_compile() {
119
	python_compile() {
119
		waf-utils_src_compile
120
		waf-utils_src_compile --notests
121
	}
122
	python_foreach_impl run_in_build_dir python_compile
123
}
124
125
src_test() {
126
	debug-print-function ${FUNCNAME} "$@"
127
	python_compile() {
128
		waf-utils_src_compile check
120
	}
129
	}
121
	python_foreach_impl run_in_build_dir python_compile
130
	python_foreach_impl run_in_build_dir python_compile
122
}
131
}
123
- 

Return to bug 831352