我正在构建一个自定义RPM修补程序" nfs-utils-lib-1.0.8"包括最新的' librpcsecgss-0.19'补丁。以下是我的步骤:
Summary: Network File System Support Library
Name: nfs-utils-lib
Version: 1.0.9
Release: 8.0%{?dist}
URL: http://www.citi.umich.edu/projects/nfsv4/linux/
License: GPL
%define idmapvers 0.21
%define libnfsidmap libnfsidmap
%define rpcsecgssvers 0.19
%define librpcsecgss librpcsecgss
%define libs %{librpcsecgss} %{libnfsidmap}
Source0: http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/%{libnfsidmap}-%{idmapvers}.tar.gz
Source1: http://www.citi.umich.edu/projects/nfsv4/linux/librpcsecgss/%{librpcsecgss}-%{rpcsecgssvers}.tar.gz
Patch0: librpcsecgss-0.13-compile.patch
Patch1: libnfsidmap-0.21-compile.patch
Patch2: librpcsecgss-0.14-bufoverflow.patch
Patch3: nfs-utils-lib-changelicensetoBSD.patch
Patch4: libnfsidmap-0.21-idmapdconf-man.patch
Patch5: libnfsidmap-0.21-idmapdconf.patch
Patch6: librpcsecgss-0.19-bufoverflow.patch
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: pkgconfig, gettext, autoconf, automake, libtool
BuildRequires: libgssapi-devel >= 0.10, openldap-devel
Requires(postun): /sbin/ldconfig
Requires(pre): /sbin/ldconfig
Requires: libgssapi >= 0.10, openldap, nfs-utils >= 1.0.9-45
%description
Support libraries that are needed by the commands and
daemons the nfs-utils rpm.
%package devel
Summary: Development files for the nfs-utils-lib library
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
%description devel
This package includes header files and libraries necessary for
developing programs which use the nfs-utils-lib library.
%prep
%setup -c -q -a1
mv %{libnfsidmap}-%{idmapvers} %{libnfsidmap}
mv %{librpcsecgss}-%{rpcsecgssvers} %{librpcsecgss}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%build
top=`pwd`
for dir in %{libs} ; do
pushd $dir
[ -f ./autogen.sh ] && sh ./autogen.sh
autoconf -I "$top"
popd
done
for dir in %{libs} ; do
pushd $dir
%configure --prefix=$RPM_BUILD_ROOT
popd
done
for dir in %{libs} ; do
pushd $dir
make all
popd
done
%install
rm -rf %{buildroot}
for dir in %{libs} ; do
pushd $dir
DESTDIR=%{buildroot} make install
popd
done
for dir in %{libs} ; do
mkdir -p $RPM_BUILD_ROOT/%{_usr}/share/doc/$dir
pushd $dir
for file in AUTHORS ChangeLog NEWS README ; do
install -m 755 $file $RPM_BUILD_ROOT%{_usr}/share/doc/$dir
done
popd
done
mkdir -p ${RPM_BUILD_ROOT}/etc
rm ${RPM_BUILD_ROOT}%{_usr}/share/man/man5/idmapd.conf.5
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_libdir}/librpcsecgss.so.*
%{_libdir}/librpcsecgss.la
%{_libdir}/libnfsidmap*.so.*
%{_libdir}/libnfsidmap*.so
%{_defaultdocdir}/%{librpcsecgss}/AUTHORS
%{_defaultdocdir}/%{librpcsecgss}/ChangeLog
%{_defaultdocdir}/%{librpcsecgss}/NEWS
%{_defaultdocdir}/%{librpcsecgss}/README
%{_libdir}/pkgconfig/librpcsecgss.pc
%{_defaultdocdir}/%{libnfsidmap}/AUTHORS
%{_defaultdocdir}/%{libnfsidmap}/ChangeLog
%{_defaultdocdir}/%{libnfsidmap}/NEWS
%{_defaultdocdir}/%{libnfsidmap}/README
%{_libdir}/pkgconfig/libnfsidmap.pc
%{_mandir}/man3/nfs4_uid_to_name.3.gz
%files devel
%defattr(0644,root,root,755)
%{_libdir}/librpcsecgss.a
%{_libdir}/librpcsecgss.so
%{_includedir}/rpcsecgss/rpc/auth.h
%{_includedir}/rpcsecgss/rpc/auth_gss.h
%{_includedir}/rpcsecgss/rpc/svc.h
%{_includedir}/rpcsecgss/rpc/svc_auth.h
%{_includedir}/rpcsecgss/rpc/rpc.h
%{_includedir}/rpcsecgss/rpc/rpcsecgss_rename.h
%{_includedir}/nfsidmap.h
%{_libdir}/libnfsidmap*.a
%{_libdir}/libnfsidmap*.la
%changelog
* Mon Jan 16 2012 Steve Dickson <steved@redhat.com> 1.0.8-7.9
- Remove installation of man page and idmapd.conf (bz 782153)
* Wed Mar 10 2010 Steve Dickson <steved@redhat.com> 1.0.8-7.8
- Added the installation of the updated idmapd.conf file
its man page (bz 502707)
* Wed Feb 10 2010 Steve Dickson <steved@redhat.com> 1.0.8-7.7
- Updated libnfsidmap to 0.21 (bz 502707)
* Tue Mar 3 2009 Jeff Layton <jlayton@redhat.com> 1.0.8-7.6
- libnfsidmap patch to handle ERANGE error on getgrnam_r (bz 453804)
* Wed Sep 26 2007 Steve Dickson <steved@redhat.com> 1.0.8-7.5
- Updated libnfsidmap to -17 to fix a security issue (bz 254042)
* Tue Sep 25 2007 Steve Dickson <steved@redhat.com> 1.0.8-7.4
- Fixed RPC library buffer overflow (bz 265061)
* Fri Dec 1 2006 Steve Dickson <steved@redhat.com> 1.0.8-7.3
- Fixed typo in the package description (bz 218111)
* Wed Aug 30 2006 Steve Dickson <steved@redhat.com> 1.0.8-7.2
- added automake to BuildRequires:
* Wed Aug 30 2006 Steve Dickson <steved@redhat.com> 1.0.8-7.1
- rebuild
* Wed Aug 2 2006 Steve Dickson <steved@redhat.com> 1.0.8-7
- Updated librpcsecgss to -0.14
* Wed Jul 26 2006 Steve Dickson <steved@redhat.com> 1.0.8-6
- Added GSSLIBS to the linking of librpcsecgss (bz 198238)
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0.8-5.1
- rebuild
* Tue Jun 20 2006 Steve Dickson <steved@redhat.com> 1.0.8-3.1
- Updated libnfsidmap and librpcsecgss to latest upstream version
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.0.8-3.1
- bump again for double-long bug on ppc(64)
* Thu Feb 09 2006 Florian La Roche <laroche@redhat.com> 1.0.8-3
- remove empty scripts
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.0.8-2.1
- rebuilt for new gcc4.1 snapshot and glibc changes
* Thu Jan 19 2006 Steve Dickson <steved@redhat.com> 1.0.8-2
- Added debugging routines to libnfsidmap
* Fri Jan 6 2006 Steve Dickson <steved@redhat.com> 1.0.8-1
- Initial commit
我的最后一步是构建RPM rpmbuild -ba nfs-utils-lib.spec
但是下面的信息总是会失败,任何想法,我做错了什么?
**
**Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.98968
+ umask 022
+ cd /home/rpmbuild/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/rpmbuild/rpmbuild/BUILD
+ rm -rf nfs-utils-lib-1.0.9
+ /bin/mkdir -p nfs-utils-lib-1.0.9
+ cd nfs-utils-lib-1.0.9
+ /bin/gzip -dc /home/rpmbuild/rpmbuild/SOURCES/libnfsidmap-0.21.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ /bin/gzip -dc /home/rpmbuild/rpmbuild/SOURCES/librpcsecgss-0.19.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
++ /usr/bin/id -u
+ '[' 525 = 0 ']'
++ /usr/bin/id -u
+ '[' 525 = 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ mv libnfsidmap-0.21 libnfsidmap
+ mv librpcsecgss-0.19 librpcsecgss
+ echo 'Patch #0 (librpcsecgss-0.13-compile.patch):'
Patch #0 (librpcsecgss-0.13-compile.patch):
+ patch -p1 -s
1 out of 1 hunk FAILED -- saving rejects to file librpcsecgss/src/Makefile.am.rej
error: Bad exit status from /var/tmp/rpm-tmp.98968 (%prep)**
**
答案 0 :(得分:0)
您正尝试将Makefile.am
中librpcsecgss-0.13
的修补程序应用于版本0.19
。它失败了。