diff --git a/.gitignore b/.gitignore index 061155d..9e44e92 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /pmdk-1.9.1.tar.gz /pmdk-1.9.2.tar.gz /pmdk-1.10.tar.gz +/pmdk-1.10-man.tar.gz diff --git a/makedocs.sh b/makedocs.sh new file mode 100755 index 0000000..dbd391d --- /dev/null +++ b/makedocs.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# makedocs.sh: Build man pages tarball for the nvml rpm. Must be run +# for each rebase. +# +# RHEL 9 does not include pandoc, which is used by pmdk to generate man +# pages. Run this script on a system that does include pandoc, such as +# fedora or RHEL 8. + +# The package is named nvml, but the upstream tarball is pmdk. +TOPDIR=${PWD} +ver=$(rhpkg --release rhel-9 verrel | cut -d- -f -2 | cut -d- -f 2) +source_dir=pmdk-${ver} +tarfile=pmdk-${ver}-man.tar.gz + +rhpkg --release rhel-9 prep +pushd $source_dir +make doc +mkdir man +make -C doc install mandir=$PWD/man +cd man +tar czf ${TOPDIR}/${tarfile} . +popd + +echo +echo "Don't forget to upload ${tarfile} to the lookaside repo." +echo -e "\trhpkg upload ${tarfile}" +echo "Remember to commit the sources file." diff --git a/nvml.spec b/nvml.spec index 46096fd..e946c16 100644 --- a/nvml.spec +++ b/nvml.spec @@ -29,12 +29,16 @@ Name: nvml Version: 1.10 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Persistent Memory Development Kit (formerly NVML) License: BSD URL: http://pmem.io/pmdk Source0: https://github.com/pmem/pmdk/releases/download/%{upstreamversion}/pmdk-%{upstreamversion}.tar.gz +# RHEL 9 does not ship pandoc, so the man pages have to be generated +# on another operating system (such as fedora or RHEL 8). To do that, +# run the included makedocs.sh script on a system with pandoc. +Source1: pmdk-%{version}-man.tar.gz # do_open passes "attr" to util_pool_open which potentially reads that object # but do_open never initializes "attr" @@ -50,7 +54,6 @@ BuildRequires: automake BuildRequires: man BuildRequires: pkgconfig BuildRequires: python3 -BuildRequires: pandoc BuildRequires: groff %if %{with ndctl} @@ -606,12 +609,13 @@ provided in the command line options to check whether files are in a consistent # optimizations. CFLAGS="%{optflags}" \ LDFLAGS="%{?__global_ldflags}" \ -make %{?_smp_mflags} NORPATH=1 +make %{?_smp_mflags} NORPATH=1 DOC=n # Override LIB_AR with empty string to skip installation of static libraries %install make install DESTDIR=%{buildroot} \ + DOC=n \ LIB_AR= \ prefix=%{_prefix} \ libdir=%{_libdir} \ @@ -622,7 +626,8 @@ make install DESTDIR=%{buildroot} \ docdir=%{_docdir} mkdir -p %{buildroot}%{_datadir}/pmdk cp utils/pmdk.magic %{buildroot}%{_datadir}/pmdk/ - +mkdir -p %{buildroot}%{_mandir} +(cd %{buildroot}%{_mandir}; tar xzvf %{SOURCE1}) %check @@ -678,6 +683,10 @@ cp utils/pmdk.magic %{buildroot}%{_datadir}/pmdk/ %changelog +* Wed Jun 16 2021 Jeff Moyer - 1.10-6.el9 +- Build man pages outside of the rpm. +- Resolves: rhbz#1943530 + * Mon Apr 26 2021 Jeff Moyer - 1.10-5 - Don't run %check on the build infrastructure. - Resolves: rhbz#1951273 diff --git a/sources b/sources index cfbac7f..5fce9eb 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (pmdk-1.10.tar.gz) = 1b284703bc51240b854c48b008ef00b12ac270db8a9ba64980bce626574d2b813a6e0ed6bfe858ac91e8afb9d72fee24545b5004ff2c3cb25344af4e42908beb +SHA512 (pmdk-1.10-man.tar.gz) = 80b6a781aab1d4a60c17fe4e32a34de68c5b8544bddb1978c97c5197ec4a788bb762ea062644d8cf1db680e7e871d2f7d94fcb6b04d8bf9f554578f09a47e61a