Re: 1.1.6 build fails on FC30
On 02-08-19 07:12, Matthew Selsky wrote: > You can likely remove python-devel and python-devel. Did so. > Are your RPM packages published anywhere? Not currently. On one machine I see something weird: # ntpq -pn remote refid st t when poll reach delay offset jitter === NMEA(0) .GPS.0 l 38 64 377 0. 0. 0.0019 192.168.10.98 .GPS.1 u3 16 377 0.5049 0.4519 0.0468 fd00:c0a8:a00:1 .GPS.1 u 11 64 377 0.3664 0.4386 0.1500 2001:888:0:7::2 193.67.79.2022 u 18 64 377 15.2859 4.6559 0.1818 2001:888:0:7::2 193.79.237.142 u 20 64 377 15.2148 4.1001 0.2219 193.67.79.202 .DNS. 16 u- 10240 0. 0. 0.0019 193.79.237.14 .DNS. 16 u- 10240 0. 0. 0.0019 185.31.230.94 .DNS. 16 u- 10240 0. 0. 0.0019 134.221.205.12 .DNS. 16 u- 10240 0. 0. 0.0019 No preferred clock. Any ideas? (this is the 1.1.6 code) Udo ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On Fri, Aug 02, 2019 at 06:31:34AM +0200, Udo van den Heuvel wrote: > Builds successfully after adapting the directories in the %files section. Excellent! > URL: http://www.ntpsec.org > Requires(post): systemd-units > Requires(preun): systemd-units > Requires(postun): systemd-units > BuildRequires: systemd-units > BuildRequires: bison gcc openssl-devel > BuildRequires:libcap-devel libseccomp-devel > BuildRequires: pps-tools-devel > BuildRequires: avahi-compat-libdns_sd-devel > BuildRequires: libcap openssl-libs pps-tools > BuildRequires: python-devel libxslt asciidoc m4 > BuildRequires: python-psutil asciidoc docbook-style-xsl wget > BuildRequires: /usr/bin/pathfix.py > BuildRequires: python3-devel python3-psutil You can likely remove python-devel and python-devel. Are your RPM packages published anywhere? Thanks, -Matt ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On 01-08-19 20:33, Matthew Selsky wrote: > To: > %{__python3} ./waf configure \ > %{__python3} ./waf build > DESTDIR=$RPM_BUILD_ROOT %{__python3} ./waf install > > Let's see if that helps. Builds successfully after adapting the directories in the %files section. > Is there a git repo for your spec file work? No, just vi, but feel free to use. Kind regards, Udo # cat SPECS/ntpsec.spec |grep -v ^# %global debug_package %{nil} Summary: The NTPsec daemon and utilities Name: ntpsec Version: 1.1.6 Release: 0%{?dist} License: BSD Group: System Environment/Daemons Source: ftp://ftp.ntpsec.org/pub/releases/ntpsec-%{version}.tgz URL: http://www.ntpsec.org Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units BuildRequires: systemd-units BuildRequires: bison gcc openssl-devel BuildRequires:libcap-devel libseccomp-devel BuildRequires: pps-tools-devel BuildRequires: avahi-compat-libdns_sd-devel BuildRequires: libcap openssl-libs pps-tools BuildRequires: python-devel libxslt asciidoc m4 BuildRequires: python-psutil asciidoc docbook-style-xsl wget BuildRequires: /usr/bin/pathfix.py BuildRequires: python3-devel python3-psutil %description The NTPsec project - a secure, hardened, and improved implementation of Network Time Protocol derived from NTP Classic, Dave Mills’s original. The Network Time Protocol (NTP) is used to synchronize a computer's time with another reference time source. This package includes ntpd (a daemon which continuously adjusts system time) and utilities used to query and configure the ntpd daemon. Perl scripts ntp-wait and ntptrace are in the ntp-perl package, ntpdate is in the ntpdate package and sntp is in the sntp package. The documentation is in the ntp-doc package. %package doc Summary: NTP documentation Group: Documentation Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc This package contains NTP documentation in HTML format. %prep %setup -q pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . %build CFLAGS="-O2" %{__python3} ./waf configure \ --prefix=/usr\ --enable-early-droproot\ --refclock=nmea,generic\ --libdir=%{_libdir}\ --docdir=%{_docdir}/ntpsec\ --enable-doc CFLAGS="-O2" %{__python3} ./waf build %install DESTDIR=$RPM_BUILD_ROOT %{__python3} ./waf install pushd $RPM_BUILD_ROOT mkdir -p .%{_sysconfdir}/{ntp/crypto,sysconfig,dhcp/dhclient.d} .%{_libexecdir} mkdir -p .%{_sysconfdir}/ntp.d mkdir -p .%{_localstatedir}/{lib/{s,}ntp,log/ntpstats} .%{_unitdir} mkdir -p .%{_unitdir} mkdir -p .%{_docdir}/ntpsec mkdir -p .%{_docdir}/ntpsec/icons mkdir -p .%{_docdir}/ntpsec/includes mkdir -p .%{_docdir}/ntpsec/pic mkdir -p .%{_sysconfdir}/ntp/crypto/ mv .%{_bindir}/ntpdig .%{_sbindir} install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/default.conf .%{_sysconfdir}/ntp.conf install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-gpsd-json .%{_sysconfdir}/ntp.d/ install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-gpsd-shm .%{_sysconfdir}/ntp.d/ install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-minimal-logging .%{_sysconfdir}/ntp.d/ install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-no-remote-configuration .%{_sysconfdir}/ntp.d/ install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-performance-logging .%{_sysconfdir}/ntp.d/ install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-pool .%{_sysconfdir}/ntp.d/ popd %post %systemd_post ntpd.service %preun %systemd_preun ntpd.service %postun %systemd_postun_with_restart ntpd.service %files %{_sbindir}/* %{_bindir}/* %{_libdir}/python3.7/site-packages/ntp/* %{_libdir}/python3.7/site-packages/ntp*info %dir %attr(-,ntp,ntp) %{_sysconfdir}/ntp.d %config(noreplace) %attr(644,ntp,ntp) %{_sysconfdir}/ntp.d/* %{_unitdir}/* %{_mandir}/* %config(noreplace) %verify(not md5 size mtime) %attr(644,ntp,ntp) %{_sysconfdir}/ntp.conf %dir %attr(750,root,ntp) %{_sysconfdir}/ntp/crypto %dir %attr(-,ntp,ntp) %{_localstatedir}/lib/ntp %dir %attr(-,ntp,ntp) %{_localstatedir}/log/ntpstats %ghost %attr(644,ntp,ntp) %{_localstatedir}/lib/ntp/drift %files doc %{_docdir}/ntpsec/* %changelog * Fri Jun 15 2018 Udo van den Heuvel 1.1.1-0 - Bump to 1.1.1 * Thu Mar 15 2018 Udo van den Heuvel 1.1.0-0 - Bump to 1.1.0 * Wed Mar 07 2018 Udo van den Heuvel 1.0.1-2 - Fresh git pull * Sat Mar 03 2018 Udo van den Heuvel 1.0.1-1 - Bump to 1.0.1, include configs, service files, etc * Tue Nov 14 2017 Udo van den Heuvel 1.0.0-0 - Create 1.0.0 package. ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On Thu, Aug 01, 2019 at 07:19:02PM +0200, Udo van den Heuvel wrote: > On 01-08-19 19:00, Matthew Selsky wrote: > > You may need to specifically use %{__python3} when you call "waf" in the 2 > > places in the %build section. > > So maybe not use --python=%{__python3} for waf? "--python" should not need to be passed to waf. > Without this the rpm builds OK. Please change these: CFLAGS="-O2" ./waf configure \ CFLAGS="-O2" ./waf build DESTDIR=$RPM_BUILD_ROOT ./waf install To: %{__python3} ./waf configure \ %{__python3} ./waf build DESTDIR=$RPM_BUILD_ROOT %{__python3} ./waf install Let's see if that helps. waf sets a reasonable CFLAGS already. Is there a git repo for your spec file work? Thanks, -Matt ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On 01-08-19 19:00, Matthew Selsky wrote: > You may need to specifically use %{__python3} when you call "waf" in the 2 > places in the %build section. When I do these things I get: Waf: Leaving directory `/usr/src/redhat/BUILD/ntpsec-1.1.6/build/main' Traceback (most recent call last): File "/usr/src/redhat/BUILD/ntpsec-1.1.6/.waf-1.9.15-7481b2b5d90177d4bb747dbff06bef90/waflib/Scripting.py", line 122, in waf_entry_point run_commands() File "/usr/src/redhat/BUILD/ntpsec-1.1.6/.waf-1.9.15-7481b2b5d90177d4bb747dbff06bef90/waflib/Scripting.py", line 183, in run_commands ctx=run_command(cmd_name) File "/usr/src/redhat/BUILD/ntpsec-1.1.6/.waf-1.9.15-7481b2b5d90177d4bb747dbff06bef90/waflib/Scripting.py", line 174, in run_command ctx.execute() File "/usr/src/redhat/BUILD/ntpsec-1.1.6/.waf-1.9.15-7481b2b5d90177d4bb747dbff06bef90/waflib/Scripting.py", line 377, in execute return execute_method(self) File "/usr/src/redhat/BUILD/ntpsec-1.1.6/.waf-1.9.15-7481b2b5d90177d4bb747dbff06bef90/waflib/Context.py", line 88, in execute self.recurse([os.path.dirname(g_module.root_path)]) File "/usr/src/redhat/BUILD/ntpsec-1.1.6/.waf-1.9.15-7481b2b5d90177d4bb747dbff06bef90/waflib/Context.py", line 129, in recurse user_function(self) File "/usr/src/redhat/BUILD/ntpsec-1.1.6/wscript", line 962, in init_handler obj.execute() File "/usr/src/redhat/BUILD/ntpsec-1.1.6/.waf-1.9.15-7481b2b5d90177d4bb747dbff06bef90/waflib/Scripting.py", line 377, in execute return execute_method(self) File "/usr/src/redhat/BUILD/ntpsec-1.1.6/.waf-1.9.15-7481b2b5d90177d4bb747dbff06bef90/waflib/Build.py", line 104, in execute self.execute_build() File "/usr/src/redhat/BUILD/ntpsec-1.1.6/.waf-1.9.15-7481b2b5d90177d4bb747dbff06bef90/waflib/Build.py", line 123, in execute_build self.post_build() File "/usr/src/redhat/BUILD/ntpsec-1.1.6/.waf-1.9.15-7481b2b5d90177d4bb747dbff06bef90/waflib/Build.py", line 280, in post_build m(self) File "/usr/src/redhat/BUILD/ntpsec-1.1.6/wscript", line 917, in bin_test from wafhelpers.bin_test import cmd_bin_test File "/usr/src/redhat/BUILD/ntpsec-1.1.6/wafhelpers/bin_test.py", line 11, in import ntp.util File "/usr/src/redhat/BUILD/ntpsec-1.1.6/build/main/tests/pylib/ntp/util.py", line 16, in import ntp.ntpc ImportError: No module named ntpc error: Bad exit status from /var/tmp/rpm-tmp.3EkTlR (%build) RPM build errors: Macro expanded in comment on line 119: %{_sysconfdir}/sysconfig/ntpd Macro expanded in comment on line 126: %{_sysconfdir}/ntp/crypto/pw Macro expanded in comment on line 127: %{_sysconfdir}/dhcp/dhclient.d Macro expanded in comment on line 128: %{_sysconfdir}/dhcp/dhclient.d/ntp.sh Bad exit status from /var/tmp/rpm-tmp.3EkTlR (%build) So maybe not use --python=%{__python3} for waf? Without this the rpm builds OK. Kind regards, Udo ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On Thu, Aug 01, 2019 at 05:02:58PM +0200, Udo van den Heuvel wrote: > On 01-08-19 16:39, Udo van den Heuvel via devel wrote: > > The 1.1.6 code does not. > > The workaround now works when I use the pathfix.py line with this > addition: %{buildroot}%{_sbindir}/* > > The whole SPEC then looks like the stuff below. Awesome. Can you change the BuildRequires to "python3-devel" and "python3-psutil"? > > How can we explain the existing shebangs? And can you change the pathfix line to: --snip-- pathfix.py -pni "%{__python3} %{py3_shbang_opts}" . --snip-- And move it to the %prep section instead of the %install section. You may need to specifically use %{__python3} when you call "waf" in the 2 places in the %build section. Thanks, -Matt ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On 01-08-19 16:39, Udo van den Heuvel via devel wrote: > The 1.1.6 code does not. The workaround now works when I use the pathfix.py line with this addition: %{buildroot}%{_sbindir}/* The whole SPEC then looks like the stuff below. How can we explain the existing shebangs? Kind regards, Udo # cat SPECS/ntpsec.spec |grep -v ^# %global debug_package %{nil} Summary: The NTPsec daemon and utilities Name: ntpsec Version: 1.1.6 Release: 0%{?dist} License: BSD Group: System Environment/Daemons Source: ftp://ftp.ntpsec.org/pub/releases/ntpsec-%{version}.tgz URL: http://www.ntpsec.org Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units BuildRequires: systemd-units BuildRequires: bison gcc openssl-devel BuildRequires:libcap-devel libseccomp-devel BuildRequires: pps-tools-devel BuildRequires: avahi-compat-libdns_sd-devel BuildRequires: libcap openssl-libs pps-tools BuildRequires: python-devel libxslt asciidoc m4 BuildRequires: python-psutil asciidoc docbook-style-xsl wget BuildRequires: /usr/bin/pathfix.py %description The NTPsec project - a secure, hardened, and improved implementation of Network Time Protocol derived from NTP Classic, Dave Mills’s original. The Network Time Protocol (NTP) is used to synchronize a computer's time with another reference time source. This package includes ntpd (a daemon which continuously adjusts system time) and utilities used to query and configure the ntpd daemon. Perl scripts ntp-wait and ntptrace are in the ntp-perl package, ntpdate is in the ntpdate package and sntp is in the sntp package. The documentation is in the ntp-doc package. %package doc Summary: NTP documentation Group: Documentation Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc This package contains NTP documentation in HTML format. %prep %setup -q %build CFLAGS="-O2" ./waf configure \ --prefix=/usr\ --enable-early-droproot\ --refclock=nmea,generic\ --libdir=%{_libdir}\ --docdir=%{_docdir}/ntpsec\ --enable-doc CFLAGS="-O2" ./waf build %install DESTDIR=$RPM_BUILD_ROOT ./waf install pushd $RPM_BUILD_ROOT mkdir -p .%{_sysconfdir}/{ntp/crypto,sysconfig,dhcp/dhclient.d} .%{_libexecdir} mkdir -p .%{_sysconfdir}/ntp.d mkdir -p .%{_localstatedir}/{lib/{s,}ntp,log/ntpstats} .%{_unitdir} mkdir -p .%{_unitdir} mkdir -p .%{_docdir}/ntpsec mkdir -p .%{_docdir}/ntpsec/icons mkdir -p .%{_docdir}/ntpsec/includes mkdir -p .%{_docdir}/ntpsec/pic mkdir -p .%{_sysconfdir}/ntp/crypto/ mv .%{_bindir}/ntpdig .%{_sbindir} install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/default.conf .%{_sysconfdir}/ntp.conf install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-gpsd-json .%{_sysconfdir}/ntp.d/ install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-gpsd-shm .%{_sysconfdir}/ntp.d/ install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-minimal-logging .%{_sysconfdir}/ntp.d/ install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-no-remote-configuration .%{_sysconfdir}/ntp.d/ install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-performance-logging .%{_sysconfdir}/ntp.d/ install -p -m644 %{_builddir}/%{name}-%{version}/etc/ntp.d/use-pool .%{_sysconfdir}/ntp.d/ pathfix.py -pni "%{__python2} %{py2_shbang_opts}" %{buildroot}%{python2_sitearch} %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/* popd %post %systemd_post ntpd.service %preun %systemd_preun ntpd.service %postun %systemd_postun_with_restart ntpd.service %files %{_sbindir}/* %{_bindir}/* %{_libdir}/python2.7/site-packages/ntp/* %{_libdir}/python2.7/site-packages/ntp*info %dir %attr(-,ntp,ntp) %{_sysconfdir}/ntp.d %config(noreplace) %attr(644,ntp,ntp) %{_sysconfdir}/ntp.d/* %{_unitdir}/* %{_mandir}/* %config(noreplace) %verify(not md5 size mtime) %attr(644,ntp,ntp) %{_sysconfdir}/ntp.conf %dir %attr(750,root,ntp) %{_sysconfdir}/ntp/crypto %dir %attr(-,ntp,ntp) %{_localstatedir}/lib/ntp %dir %attr(-,ntp,ntp) %{_localstatedir}/log/ntpstats %ghost %attr(644,ntp,ntp) %{_localstatedir}/lib/ntp/drift %files doc %{_docdir}/ntpsec/* %changelog * Fri Jun 15 2018 Udo van den Heuvel 1.1.1-0 - Bump to 1.1.1 * Thu Mar 15 2018 Udo van den Heuvel 1.1.0-0 - Bump to 1.1.0 * Wed Mar 07 2018 Udo van den Heuvel 1.0.1-2 - Fresh git pull * Sat Mar 03 2018 Udo van den Heuvel 1.0.1-1 - Bump to 1.0.1, include configs, service files, etc * Tue Nov 14 2017 Udo van den Heuvel 1.0.0-0 - Create 1.0.0 package. ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On 01-08-19 16:27, Matthew Selsky wrote: > See > https://gitlab.com/NTPsec/ntpsec/commit/3ee8e4c3c3cf4b2d6f010874e7f447a23a1710cf > for the change that we made to our CI targets. Sure. 1.1.3 that is on my system has the correct shebangs. The 1.1.6 code does not. (...) + /usr/lib/rpm/redhat/brp-mangle-shebangs *** ERROR: ambiguous python shebang in /usr/bin/ntpwait: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntplogtemp: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntpsweep: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. mangling shebang in /usr/bin/ntpleapfetch from /bin/sh to #!/usr/bin/sh *** ERROR: ambiguous python shebang in /usr/bin/ntpviz: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntpsnmpd: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntpkeygen: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntptrace: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntpq: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntpmon: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/sbin/ntpdig: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. error: Bad exit status from /var/tmp/rpm-tmp.3GaOm3 (%install) RPM build errors: Macro expanded in comment on line 117: %{_sysconfdir}/sysconfig/ntpd Macro expanded in comment on line 124: %{_sysconfdir}/ntp/crypto/pw Macro expanded in comment on line 125: %{_sysconfdir}/dhcp/dhclient.d Macro expanded in comment on line 126: %{_sysconfdir}/dhcp/dhclient.d/ntp.sh Bad exit status from /var/tmp/rpm-tmp.3GaOm3 (%install) [root@surfplank2 redhat]# cd /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64 [root@surfplank2 ntpsec-1.1.6-0.fc30.x86_64]# head usr/bin/ntpmon #!/usr/bin/env python # -*- coding: utf-8 -*- # SPDX-License-Identifier: BSD-2-Clause '''\ Any keystroke causes a poll and update. Keystroke commands: 'a': Change peer display to apeers mode, showing association IDs. 'd': Toggle detail mode (some peer will be reverse-video highlighted when on). 'h': Display helpscreen. # Kind regards, Udo ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On Thu, Aug 01, 2019 at 04:31:52PM +0200, Udo van den Heuvel wrote: > On 01-08-19 16:27, Matthew Selsky wrote: > > On Thu, Aug 01, 2019 at 04:18:30PM +0200, Udo van den Heuvel wrote: > > > > See > > https://gitlab.com/NTPsec/ntpsec/commit/3ee8e4c3c3cf4b2d6f010874e7f447a23a1710cf > > for the change that we made to our CI targets. > > Sure, but why then is there a complaint from the Redhat Fedora tool(s)? I don't think the Fedora tools use anything related to our CI targets so our change should have neither helped, not harmed. > > The debian package replaces the shebangs. You can see how at > > https://sources.debian.org/patches/ntpsec/1.1.3+dfsg1-2/hardcode-python3-path.patch/ > > > > You likely want to use the RPM macro that does the equivalent. I'm not > > familiar enough with RPM packaging to give more specific advice. > > > We have a tool OK, cool. I'd be happy to review what you come up with if you want. And if you have suggestions for improving packaging/packaging.adoc, I'd be happy to hear them. Thanks, -Matt ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On 01-08-19 16:27, Matthew Selsky wrote: > On Thu, Aug 01, 2019 at 04:18:30PM +0200, Udo van den Heuvel wrote: > >> The build shows otherwise, else there would not be an error. >> Or did I miss a step in the build process? > > See > https://gitlab.com/NTPsec/ntpsec/commit/3ee8e4c3c3cf4b2d6f010874e7f447a23a1710cf > for the change that we made to our CI targets. Sure, but why then is there a complaint from the Redhat Fedora tool(s)? > The debian package replaces the shebangs. You can see how at > https://sources.debian.org/patches/ntpsec/1.1.3+dfsg1-2/hardcode-python3-path.patch/ > > You likely want to use the RPM macro that does the equivalent. I'm not > familiar enough with RPM packaging to give more specific advice. We have a tool Udo ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On Thu, Aug 01, 2019 at 04:18:30PM +0200, Udo van den Heuvel wrote: > The build shows otherwise, else there would not be an error. > Or did I miss a step in the build process? See https://gitlab.com/NTPsec/ntpsec/commit/3ee8e4c3c3cf4b2d6f010874e7f447a23a1710cf for the change that we made to our CI targets. > Because the shebangs are not explicit the build fails. > At least that is what I understand from the errors. The debian package replaces the shebangs. You can see how at https://sources.debian.org/patches/ntpsec/1.1.3+dfsg1-2/hardcode-python3-path.patch/ You likely want to use the RPM macro that does the equivalent. I'm not familiar enough with RPM packaging to give more specific advice. Thanks, -Matt ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On 01-08-19 16:15, Matthew Selsky wrote: >> Can someone please fix the /usr/sbin/ntpdig error? it makes the >> workround fail... > > Our code works on both Python2 and Python3. Given F30's recent changes, we > switched our CI targets to explicitly point at python3. The build shows otherwise, else there would not be an error. Or did I miss a step in the build process? > We're going to leave the shebangs alone in the source for maximum > compatibility with upstream PEP recommendations. See also > packaging/packaging.adoc in the repo. Because the shebangs are not explicit the build fails. At least that is what I understand from the errors. Kind regards, Udo ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On Thu, Aug 01, 2019 at 03:32:40PM +0200, Udo van den Heuvel via devel wrote: > On 01-08-19 15:24, Udo van den Heuvel via devel wrote: > > The script will exit with nonzero exit code, rendering the build failed. > > When trying to work around this in my spec file, I use: > pathfix.py -pni "%{__python2} %{py2_shbang_opts}" > %{buildroot}%{python2_sitearch} %{buildroot}%{_bindir}/* [..] > QUESTION: > > > Can someone please fix the /usr/sbin/ntpdig error? it makes the > workround fail... Our code works on both Python2 and Python3. Given F30's recent changes, we switched our CI targets to explicitly point at python3. If you're going to mangle the shebang as a package maintainer, feel free to change all of the shebangs to explicit python3 on Fedora. We're going to leave the shebangs alone in the source for maximum compatibility with upstream PEP recommendations. See also packaging/packaging.adoc in the repo. Thanks, -Matt ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On 01-08-19 15:24, Udo van den Heuvel via devel wrote: > The script will exit with nonzero exit code, rendering the build failed. When trying to work around this in my spec file, I use: pathfix.py -pni "%{__python2} %{py2_shbang_opts}" %{buildroot}%{python2_sitearch} %{buildroot}%{_bindir}/* Result: (...) + pathfix.py -pni '/usr/bin/python2 -s' /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpfrob /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpkeygen /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpleapfetch /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntplogtemp /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpmon /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpq /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpsnmpd /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpsweep /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntptime /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntptrace /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpviz /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpwait recursedown('/root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages') recursedown('/root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages/ntp') /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages/ntp/__init__.py: no change /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages/ntp/agentx.py: updating /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages/ntp/agentx_packet.py: no change /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages/ntp/control.py: no change /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages/ntp/magic.py: no change /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages/ntp/packet.py: no change /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages/ntp/poly.py: updating /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages/ntp/statfiles.py: no change /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7/site-packages/ntp/util.py: no change /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpfrob: no change /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpkeygen: updating /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpleapfetch: no change /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntplogtemp: updating /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpmon: updating /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpq: updating /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpsnmpd: updating /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpsweep: updating /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntptime: no change /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntptrace: updating /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpviz: updating /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/bin/ntpwait: updating + popd ~/rpmbuild/BUILD/ntpsec-1.1.6 + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 0 Bytecompiling .py files below /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7 using /usr/bin/python2.7 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-mangle-shebangs mangling shebang in /usr/bin/ntpleapfetch from /bin/sh to #!/usr/bin/sh *** ERROR: ambiguous python shebang in /usr/sbin/ntpdig: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. error: Bad exit status from /var/tmp/rpm-tmp.2SXyXF (%install) RPM build errors: Macro expanded in comment on line 117: %{_sysconfdir}/sysconfig/ntpd Macro expanded in comment on line 124: %{_sysconfdir}/ntp/crypto/pw Macro expanded in comment on line 125: %{_sysconfdir}/dhcp/dhclient.d Macro expanded in comment on line 126: %{_sysconfdir}/dhcp/dhclient.d/ntp.sh Bad exit status from /var/tmp/rpm-tmp.2SXyXF (%install) QUESTION: Can someone please fix the /usr/sbin/ntpdig error? it makes the workround fail... Kind regards, Udo ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
Re: 1.1.6 build fails on FC30
On 01-08-19 15:09, Udo van den Heuvel via devel wrote: > Hello, > > The compile on Fedora 30 fails at the very end: > > (...) > + /usr/lib/rpm/brp-python-hardlink > + /usr/lib/rpm/redhat/brp-mangle-shebangs > *** ERROR: ambiguous python shebang in /usr/bin/ntpwait: #!/usr/bin/env > python. Change it to python3 (or python2) explicitly. > *** ERROR: ambiguous python shebang in /usr/bin/ntplogtemp: > #!/usr/bin/env python. Change it to python3 (or python2) explicitly. > *** ERROR: ambiguous python shebang in /usr/bin/ntpsweep: #!/usr/bin/env > python. Change it to python3 (or python2) explicitly. > mangling shebang in /usr/bin/ntpleapfetch from /bin/sh to #!/usr/bin/sh > *** ERROR: ambiguous python shebang in /usr/bin/ntpviz: #!/usr/bin/env > python. Change it to python3 (or python2) explicitly. > *** ERROR: ambiguous python shebang in /usr/bin/ntpsnmpd: #!/usr/bin/env > python. Change it to python3 (or python2) explicitly. > *** ERROR: ambiguous python shebang in /usr/bin/ntpkeygen: > #!/usr/bin/env python. Change it to python3 (or python2) explicitly. > *** ERROR: ambiguous python shebang in /usr/bin/ntptrace: #!/usr/bin/env > python. Change it to python3 (or python2) explicitly. > *** ERROR: ambiguous python shebang in /usr/bin/ntpq: #!/usr/bin/env > python. Change it to python3 (or python2) explicitly. > *** ERROR: ambiguous python shebang in /usr/bin/ntpmon: #!/usr/bin/env > python. Change it to python3 (or python2) explicitly. > *** ERROR: ambiguous python shebang in /usr/sbin/ntpdig: #!/usr/bin/env > python. Change it to python3 (or python2) explicitly. > error: Bad exit status from /var/tmp/rpm-tmp.AKqksQ (%install) > > > RPM build errors: > Macro expanded in comment on line 107: %{_sysconfdir}/sysconfig/ntpd > > Macro expanded in comment on line 114: %{_sysconfdir}/ntp/crypto/pw > > Macro expanded in comment on line 115: %{_sysconfdir}/dhcp/dhclient.d > > Macro expanded in comment on line 116: > %{_sysconfdir}/dhcp/dhclient.d/ntp.sh > > Bad exit status from /var/tmp/rpm-tmp.AKqksQ (%install) Probably has to do with the info at https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error The buildroot policy script in /usr/lib/rpm/redhat/brp-mangle-shebangs currently changes all python shebangs to python2 with a message like: *** WARNING: mangling shebang in /usr/bin/taskotron_result from #!/usr/bin/python to #!/usr/bin/python2. This will become an ERROR, fix it manually! We will change it to: *** ERROR: ambiguous python shebang in /usr/bin/taskotron_result: #!/usr/bin/python. Change it to python3 (or python2) explicitly. The script will exit with nonzero exit code, rendering the build failed. Of course I can (try to) work around this in my spec file but I guess the project also has to choose python2 or pyhton3... Kind regards, Udo ___ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel
1.1.6 build fails on FC30
Hello, The compile on Fedora 30 fails at the very end: (...) + pushd /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64 ~/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64 ~/rpmbuild/BUILD/ntpsec-1.1.6 + mkdir -p ./etc/ntp/crypto ./etc/sysconfig ./etc/dhcp/dhclient.d ./usr/libexec + mkdir -p ./etc/ntp.d + mkdir -p ./var/lib/sntp ./var/lib/ntp ./var/log/ntpstats ./usr/lib/systemd/system + mkdir -p ./usr/lib/systemd/system + mkdir -p ./usr/share/doc/ntpsec + mkdir -p ./usr/share/doc/ntpsec/icons + mkdir -p ./usr/share/doc/ntpsec/includes + mkdir -p ./usr/share/doc/ntpsec/pic + mkdir -p ./etc/ntp/crypto/ + mv ./usr/bin/ntpdig ./usr/sbin + install -p -m644 /root/rpmbuild/BUILD/ntpsec-1.1.6/etc/ntp.d/default.conf ./etc/ntp.conf + install -p -m644 /root/rpmbuild/BUILD/ntpsec-1.1.6/etc/ntp.d/use-gpsd-json ./etc/ntp.d/ + install -p -m644 /root/rpmbuild/BUILD/ntpsec-1.1.6/etc/ntp.d/use-gpsd-shm ./etc/ntp.d/ + install -p -m644 /root/rpmbuild/BUILD/ntpsec-1.1.6/etc/ntp.d/use-minimal-logging ./etc/ntp.d/ + install -p -m644 /root/rpmbuild/BUILD/ntpsec-1.1.6/etc/ntp.d/use-no-remote-configuration ./etc/ntp.d/ + install -p -m644 /root/rpmbuild/BUILD/ntpsec-1.1.6/etc/ntp.d/use-performance-logging ./etc/ntp.d/ + install -p -m644 /root/rpmbuild/BUILD/ntpsec-1.1.6/etc/ntp.d/use-pool ./etc/ntp.d/ + popd ~/rpmbuild/BUILD/ntpsec-1.1.6 + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 0 Bytecompiling .py files below /root/rpmbuild/BUILDROOT/ntpsec-1.1.6-0.fc30.x86_64/usr/lib64/python2.7 using /usr/bin/python2.7 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-mangle-shebangs *** ERROR: ambiguous python shebang in /usr/bin/ntpwait: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntplogtemp: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntpsweep: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. mangling shebang in /usr/bin/ntpleapfetch from /bin/sh to #!/usr/bin/sh *** ERROR: ambiguous python shebang in /usr/bin/ntpviz: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntpsnmpd: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntpkeygen: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntptrace: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntpq: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/bin/ntpmon: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. *** ERROR: ambiguous python shebang in /usr/sbin/ntpdig: #!/usr/bin/env python. Change it to python3 (or python2) explicitly. error: Bad exit status from /var/tmp/rpm-tmp.AKqksQ (%install) RPM build errors: Macro expanded in comment on line 107: %{_sysconfdir}/sysconfig/ntpd Macro expanded in comment on line 114: %{_sysconfdir}/ntp/crypto/pw Macro expanded in comment on line 115: %{_sysconfdir}/dhcp/dhclient.d Macro expanded in comment on line 116: %{_sysconfdir}/dhcp/dhclient.d/ntp.sh Bad exit status from /var/tmp/rpm-tmp.AKqksQ (%install) How can we fix this? Below is the spec file used. Kind regards, Udo # cat SPECS/ntpsec.spec |grep -v ^# %global debug_package %{nil} Summary: The NTPsec daemon and utilities Name: ntpsec Version: 1.1.6 Release: 0%{?dist} License: BSD Group: System Environment/Daemons Source: ftp://ftp.ntpsec.org/pub/releases/ntpsec-%{version}.tgz URL: http://www.ntpsec.org Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units BuildRequires: systemd-units BuildRequires: bison gcc openssl-devel BuildRequires:libcap-devel libseccomp-devel BuildRequires: pps-tools-devel BuildRequires: avahi-compat-libdns_sd-devel BuildRequires: libcap openssl-libs pps-tools BuildRequires: python-devel libxslt asciidoc m4 BuildRequires: python-psutil asciidoc docbook-style-xsl wget %description The NTPsec project - a secure, hardened, and improved implementation of Network Time Protocol derived from NTP Classic, Dave Mills’s original. The Network Time Protocol (NTP) is used to synchronize a computer's time with another reference time source. This package includes ntpd (a daemon which continuously adjusts system time) and utilities used to query and configure the ntpd daemon. Perl scripts ntp-wait and ntptrace are in the ntp-perl package, ntpdate is in the ntpdate package and sntp is in the sntp package. The documentation is in