1.1.6 build fails on FC30

Udo van den Heuvel udovdh at xs4all.nl
Thu Aug 1 13:09:34 UTC 2019


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 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/

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/*



More information about the devel mailing list