1.1.6 build fails on FC30

Udo van den Heuvel udovdh at xs4all.nl
Fri Aug 2 04:31:34 UTC 2019


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 <udovdh at xs4all.nl> 1.1.1-0
- Bump to 1.1.1
* Thu Mar 15 2018 Udo van den Heuvel <udovdh at xs4all.nl> 1.1.0-0
- Bump to 1.1.0
* Wed Mar 07 2018 Udo van den Heuvel <udovdh at xs4all.nl> 1.0.1-2
- Fresh git pull
* Sat Mar 03 2018 Udo van den Heuvel <udovdh at xs4all.nl> 1.0.1-1
- Bump to 1.0.1, include configs, service files, etc
* Tue Nov 14 2017 Udo van den Heuvel <udovdh at xs4all.nl> 1.0.0-0
- Create 1.0.0 package.



More information about the devel mailing list