From 43fef6164335b38422953bad18d311b9751a1796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 25 Jan 2010 23:11:37 +0000 Subject: [PATCH] - Apply upstream patch to fix spec file check with rpm >= 4.8.0. --- rpmlint-0.93-rpm-4.8.patch | 19 +++++++++++++++++++ rpmlint.spec | 8 +++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 rpmlint-0.93-rpm-4.8.patch diff --git a/rpmlint-0.93-rpm-4.8.patch b/rpmlint-0.93-rpm-4.8.patch new file mode 100644 index 0000000..1896e1f --- /dev/null +++ b/rpmlint-0.93-rpm-4.8.patch @@ -0,0 +1,19 @@ +Index: SpecCheck.py +=================================================================== +--- SpecCheck.py (revision 1719) ++++ SpecCheck.py (working copy) +@@ -526,7 +526,13 @@ + # errors logged above already + pass + if spec_obj: +- for src in spec_obj.sources(): ++ try: ++ # rpm < 4.8.0 ++ sources = spec_obj.sources() ++ except TypeError: ++ # rpm >= 4.8.0 ++ sources = spec_obj.sources ++ for src in sources: + (url, num, flags) = src + (scheme, netloc) = urlparse(url)[0:2] + if flags & 1: # rpmspec.h, rpm.org ticket #123 diff --git a/rpmlint.spec b/rpmlint.spec index 3b3534e..c04a5d7 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -1,6 +1,6 @@ Name: rpmlint Version: 0.93 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tool for checking common errors in RPM packages Group: Development/Tools @@ -10,6 +10,8 @@ Source0: http://rpmlint.zarb.org/download/%{name}-%{version}.tar.bz2 Source1: %{name}.config Source2: %{name}-CHANGES.package.old Source3: %{name}-etc.config +# Upstream post-0.93 +Patch0: %{name}-0.93-rpm-4.8.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -39,6 +41,7 @@ and source packages as well as spec files can be checked. %prep %setup -q +%patch0 sed -i -e /MenuCheck/d Config.py cp -p config config.example install -pm 644 %{SOURCE2} CHANGES.package.old @@ -78,6 +81,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jan 26 2010 Ville Skyttä - 0.93-2 +- Apply upstream patch to fix spec file check with rpm >= 4.8.0. + * Mon Jan 25 2010 Ville Skyttä - 0.93-1 - Update to 0.93; fixes #531102 and #555284. - Enable checks requiring network access in default config.