redhat: package libuafs perl bindings 19/12919/2
authorMichael Meffie <mmeffie@sinenomine.net>
Wed, 21 Feb 2018 01:31:11 +0000 (20:31 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 21 Feb 2018 04:59:49 +0000 (23:59 -0500)
Require the swig package as a build dependency. Build and package the
libuafs perl bindings.  Place these libraries in the openafs-devel
package, along with the man page (moved from the openfs-client package).

This fixes an rpm build error when the swig package is present on the
build system,

    RPM build errors:
    Installed (but unpackaged) file(s) found:
    /usr/lib64/perl/AFS/ukernel.pm
    /usr/lib64/perl/ukernel.so

FIXES 134470

Change-Id: Ifa8a0938f0c16e6099cd2923a71dd6466052a4d8
Reviewed-on: https://gerrit.openafs.org/12919
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/packaging/RedHat/openafs.spec.in

index 74e706d..7559923 100644 (file)
@@ -96,7 +96,7 @@ BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
 BuildRequires: systemd-units
 %endif
 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 6
-BuildRequires: perl-devel
+BuildRequires: perl-devel, swig
 %endif
 BuildRequires: perl(ExtUtils::Embed)
 %if %{krb5support}
@@ -611,6 +611,11 @@ export KRB5_CONFIG
 %if %{krb5support}
        --with-krb5 \
 %endif
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 6
+    --with-swig \
+%else
+    --without-swig \
+%endif
        $config_opts \
        || exit 1
 
@@ -810,6 +815,9 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man1/tokens.krb.1
 rm -f $RPM_BUILD_ROOT%{_mandir}/man5/AuthLog.5
 rm -f $RPM_BUILD_ROOT%{_mandir}/man5/AuthLog.dir.5
 %endif
+%if !(0%{?fedora} >= 15 || 0%{?rhel} >= 6)
+rm -f %{_mandir}/man3/AFS::ukernel.3
+%endif
 
 #-----------------------------------------------------------------------------
 # Install client and server initscripts/systemd files
@@ -1209,7 +1217,6 @@ dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
 %endif
 %{_mandir}/man1/cmdebug.1.gz
 %{_mandir}/man1/up.1.gz
-%{_mandir}/man3/AFS::ukernel.3.gz
 %{_mandir}/man5/afs.5.gz
 %{_mandir}/man5/afs_cache.5.gz
 %{_mandir}/man5/afs_volume_header.5.gz
@@ -1355,6 +1362,11 @@ dkms remove -m %{name} -v %{dkms_version} --rpm_safe_upgrade --all ||:
 %{_libdir}/libubik.a
 %{_mandir}/man1/rxgen.1.gz
 %{_mandir}/man1/afs_compile_et.1.gz
+%if 0%{?fedora} >= 15 || 0%{?rhel} >= 6
+%{_libdir}/perl/AFS/ukernel.pm
+%{_libdir}/perl/ukernel.so
+%{_mandir}/man3/AFS::ukernel.3.gz
+%endif
 
 %if %{build_dkmspkg}
 %files -n dkms-%{name}