Fix pidl installation.

This commit is contained in:
Andreas Schneider 2014-03-11 20:10:21 +01:00
parent a9fedb2b70
commit bad2639ae2

View File

@ -85,6 +85,8 @@ Source6: samba.pamd
Source200: README.dc Source200: README.dc
Source201: README.downgrade Source201: README.downgrade
Patch0: samba-4.1.7-fix_pidl_install.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/groupadd
@ -141,6 +143,9 @@ BuildRequires: glusterfs-api-devel >= 3.4.0.16
BuildRequires: glusterfs-devel >= 3.4.0.16 BuildRequires: glusterfs-devel >= 3.4.0.16
%endif %endif
# pidl requirements
BuildRequires: perl(Parse::Yapp)
%if ! %with_internal_talloc %if ! %with_internal_talloc
%global libtalloc_version 2.0.7 %global libtalloc_version 2.0.7
@ -364,12 +369,13 @@ Summary: Perl IDL compiler
Group: Development/Tools Group: Development/Tools
Requires: perl(Parse::Yapp) Requires: perl(Parse::Yapp)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildArch: noarch
Provides: samba4-pidl = %{samba_depver} Provides: samba4-pidl = %{samba_depver}
Obsoletes: samba4-pidl < %{samba_depver} Obsoletes: samba4-pidl < %{samba_depver}
%description pidl %description pidl
The samba4-pidl package contains the Perl IDL compiler used by Samba The %{name}-pidl package contains the Perl IDL compiler used by Samba
and Wireshark to parse IDL and similar protocols and Wireshark to parse IDL and similar protocols
### TEST ### TEST
@ -485,6 +491,8 @@ module necessary to communicate to the Winbind Daemon
%prep %prep
%setup -q -n samba-%{version}%{pre_release} %setup -q -n samba-%{version}%{pre_release}
%patch0 -p1 -b .samba-4.1.7-fix_pidl_install.patch
%build %build
%global _talloc_lib ,talloc,pytalloc,pytalloc-util %global _talloc_lib ,talloc,pytalloc,pytalloc-util
%global _tevent_lib ,tevent,pytevent %global _tevent_lib ,tevent,pytevent
@ -537,6 +545,7 @@ LDFLAGS="-Wl,-z,relro,-z,now" \
--with-pammodulesdir=%{_libdir}/security \ --with-pammodulesdir=%{_libdir}/security \
--with-lockdir=/var/lib/samba \ --with-lockdir=/var/lib/samba \
--with-cachedir=/var/lib/samba \ --with-cachedir=/var/lib/samba \
--with-perl-vendorlib=%{perl_vendorlib} \
--disable-gnutls \ --disable-gnutls \
--disable-rpath-install \ --disable-rpath-install \
--with-shared-modules=%{_samba4_modules} \ --with-shared-modules=%{_samba4_modules} \
@ -571,10 +580,6 @@ LDFLAGS="-Wl,-z,relro,-z,now" \
make %{?_smp_mflags} make %{?_smp_mflags}
# Build PIDL for installation into vendor directories before
# 'make proto' gets to it.
(cd pidl && %{__perl} Makefile.PL INSTALLDIRS=vendor )
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
make install DESTDIR=%{buildroot} make install DESTDIR=%{buildroot}
@ -593,13 +598,6 @@ install -d -m 0755 %{buildroot}/var/run/winbindd
install -d -m 0755 %{buildroot}/%{_libdir}/samba install -d -m 0755 %{buildroot}/%{_libdir}/samba
install -d -m 0755 %{buildroot}/%{_libdir}/pkgconfig install -d -m 0755 %{buildroot}/%{_libdir}/pkgconfig
# Undo the PIDL install, we want to try again with the right options.
rm -rf %{buildroot}/%{_libdir}/perl5
rm -rf %{buildroot}/%{_datadir}/perl5
# Install PIDL.
( cd pidl && make install PERL_INSTALL_ROOT=%{buildroot} )
# Install other stuff # Install other stuff
install -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d install -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/samba install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/samba
@ -647,18 +645,10 @@ install -m 0755 packaging/NetworkManager/30-winbind-systemd \
install -d -m 0755 %{buildroot}%{_libdir}/krb5/plugins/libkrb5 install -d -m 0755 %{buildroot}%{_libdir}/krb5/plugins/libkrb5
touch %{buildroot}%{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so touch %{buildroot}%{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so
# Clean out crap left behind by the PIDL install.
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
rm -f %{buildroot}%{perl_vendorlib}/wscript_build
rm -rf %{buildroot}%{perl_vendorlib}/Parse/Yapp
# This makes the right links, as rpmlint requires that # This makes the right links, as rpmlint requires that
# the ldconfig-created links be recorded in the RPM. # the ldconfig-created links be recorded in the RPM.
/sbin/ldconfig -N -n %{buildroot}%{_libdir} /sbin/ldconfig -N -n %{buildroot}%{_libdir}
# Fix up permission on perl install.
%{_fixperms} %{buildroot}%{perl_vendorlib}
%if %{with testsuite} %if %{with testsuite}
%check %check
TDB_NO_FSYNC=1 make %{?_smp_mflags} test TDB_NO_FSYNC=1 make %{?_smp_mflags} test
@ -1449,10 +1439,41 @@ rm -rf %{buildroot}
### PIDL ### PIDL
%files pidl %files pidl
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{perl_vendorlib}/Parse/Pidl* %attr(755,root,root) %{_bindir}/pidl
%dir %{perl_vendorlib}/Parse
%{perl_vendorlib}/Parse/Pidl.pm
%dir %{perl_vendorlib}/Parse/Pidl
%{perl_vendorlib}/Parse/Pidl/CUtil.pm
%{perl_vendorlib}/Parse/Pidl/Samba4.pm
%{perl_vendorlib}/Parse/Pidl/Expr.pm
%{perl_vendorlib}/Parse/Pidl/ODL.pm
%{perl_vendorlib}/Parse/Pidl/Typelist.pm
%{perl_vendorlib}/Parse/Pidl/IDL.pm
%{perl_vendorlib}/Parse/Pidl/Compat.pm
%dir %{perl_vendorlib}/Parse/Pidl/Wireshark
%{perl_vendorlib}/Parse/Pidl/Wireshark/Conformance.pm
%{perl_vendorlib}/Parse/Pidl/Wireshark/NDR.pm
%{perl_vendorlib}/Parse/Pidl/Dump.pm
%dir %{perl_vendorlib}/Parse/Pidl/Samba3
%{perl_vendorlib}/Parse/Pidl/Samba3/ServerNDR.pm
%{perl_vendorlib}/Parse/Pidl/Samba3/ClientNDR.pm
%dir %{perl_vendorlib}/Parse/Pidl/Samba4
%{perl_vendorlib}/Parse/Pidl/Samba4/Header.pm
%dir %{perl_vendorlib}/Parse/Pidl/Samba4/COM
%{perl_vendorlib}/Parse/Pidl/Samba4/COM/Header.pm
%{perl_vendorlib}/Parse/Pidl/Samba4/COM/Proxy.pm
%{perl_vendorlib}/Parse/Pidl/Samba4/COM/Stub.pm
%{perl_vendorlib}/Parse/Pidl/Samba4/Python.pm
%{perl_vendorlib}/Parse/Pidl/Samba4/Template.pm
%dir %{perl_vendorlib}/Parse/Pidl/Samba4/NDR
%{perl_vendorlib}/Parse/Pidl/Samba4/NDR/Server.pm
%{perl_vendorlib}/Parse/Pidl/Samba4/NDR/Client.pm
%{perl_vendorlib}/Parse/Pidl/Samba4/NDR/Parser.pm
%{perl_vendorlib}/Parse/Pidl/Samba4/TDR.pm
%{perl_vendorlib}/Parse/Pidl/NDR.pm
%{perl_vendorlib}/Parse/Pidl/Util.pm
%{_mandir}/man1/pidl* %{_mandir}/man1/pidl*
%{_mandir}/man3/Parse::Pidl* %{_mandir}/man3/Parse::Pidl*
%attr(755,root,root) %{_bindir}/pidl
### PYTHON ### PYTHON
%files python %files python
@ -1536,6 +1557,9 @@ rm -rf %{buildroot}
%{_mandir}/man8/pam_winbind.8* %{_mandir}/man8/pam_winbind.8*
%changelog %changelog
* Tue Mar 11 2014 - Andreas Schneider <asn@redhat.com> - 4.1.6-1
- Fix installation of pidl.
* Fri Feb 21 2014 - Andreas Schneider <asn@redhat.com> - 4.1.5-1 * Fri Feb 21 2014 - Andreas Schneider <asn@redhat.com> - 4.1.5-1
- Update to Samba 4.1.5. - Update to Samba 4.1.5.