From 0eee47514cf6cb5842835164eb37fbe64d437031 Mon Sep 17 00:00:00 2001 From: Ville Skyttä Date: Sep 03 2007 17:30:14 +0000 Subject: - 0.81. - Improve Fedora license check (Todd Zullinger). - Sync Fedora license list with Wiki rev 87. --- diff --git a/.cvsignore b/.cvsignore index 23b2b17..cedb225 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -rpmlint-0.80.tar.bz2 +rpmlint-0.81.tar.bz2 diff --git a/rpmlint-0.80-fedoralicensing.patch b/rpmlint-0.80-fedoralicensing.patch deleted file mode 100644 index 8bf62a8..0000000 --- a/rpmlint-0.80-fedoralicensing.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- TagsCheck.py~ 2007-03-26 23:01:49.000000000 +0300 -+++ TagsCheck.py 2007-07-31 23:23:08.000000000 +0300 -@@ -629,11 +629,11 @@ - printError(pkg, 'no-license') - else: - if rpm_license not in VALID_LICENSES: -- licenses = re.split('(?:[- ]like|/|ish|[- ]style|[- ]Style|and|or|&|\s|-)+', rpm_license) -+ licenses = re.split('\s(?:and|or)\s|[()]', rpm_license) - for l in licenses: -+ l = l.strip() - if l != '' and not l in VALID_LICENSES: -- printWarning(pkg, 'invalid-license', rpm_license) -- break -+ printWarning(pkg, 'invalid-license', l) - - url=pkg[rpm.RPMTAG_URL] - if url and url != 'none': -@@ -800,9 +800,7 @@ - - 'invalid-license', - '''The value of the License tag was not recognized. Known values are: --%s --If the license is close to an existing one, you can use ' style'.''' \ --% fill('"' + '", "'.join(VALID_LICENSES) + '".', 78), -+%s''' % fill('"' + '", "'.join(VALID_LICENSES) + '".', 78), - - 'invalid-url', - '''Your URL is not valid. It must begin with http, https or ftp and must no diff --git a/rpmlint-0.81-fedoralicensing.patch b/rpmlint-0.81-fedoralicensing.patch new file mode 100644 index 0000000..6168639 --- /dev/null +++ b/rpmlint-0.81-fedoralicensing.patch @@ -0,0 +1,47 @@ +--- TagsCheck.py~ 2007-08-29 23:46:39.000000000 +0300 ++++ TagsCheck.py 2007-09-03 19:54:09.000000000 +0300 +@@ -403,6 +403,7 @@ + invalid_url_regex=re.compile(Config.getOption('InvalidURL'), re.IGNORECASE) + lib_regex=re.compile('^lib.*?(\.so.*)?$') + leading_space_regex=re.compile('^\s+') ++license_regex=re.compile('\(([^)]+)\)|\s(?:and|or)\s') + invalid_version_regex=re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE) + # () are here for grouping purpose in the regexp + forbidden_words_regex=re.compile('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE) +@@ -628,16 +629,20 @@ + # printWarning(pkg, 'package-provides-itself') + # break + ++ def split_license(license): ++ return map(string.strip, [l for l in license_regex.split(license) if l]) ++ + rpm_license = pkg[rpm.RPMTAG_LICENSE] + if not rpm_license: + printError(pkg, 'no-license') + else: + if rpm_license not in VALID_LICENSES: +- licenses = re.split('(?:[- ]like|/|ish|[- ]style|[- ]Style|and|or|&|\s|-)+', rpm_license) +- for l in licenses: +- if l != '' and not l in VALID_LICENSES: +- printWarning(pkg, 'invalid-license', rpm_license) +- break ++ for l1 in split_license(rpm_license): ++ if l1 in VALID_LICENSES: ++ continue ++ for l2 in split_license(l1): ++ if l2 not in VALID_LICENSES: ++ printWarning(pkg, 'invalid-license', l2) + + url=pkg[rpm.RPMTAG_URL] + if url and url != 'none': +@@ -808,9 +813,7 @@ + + 'invalid-license', + '''The value of the License tag was not recognized. Known values are: +-%s +-If the license is close to an existing one, you can use ' style'.''' \ +-% fill('"' + '", "'.join(VALID_LICENSES) + '".', 78), ++%s''' % fill('"' + '", "'.join(VALID_LICENSES) + '".', 78), + + 'invalid-url', + '''Your URL is not valid. It must begin with http, https or ftp and must no diff --git a/rpmlint.config b/rpmlint.config index 2cae57f..cde6c99 100644 --- a/rpmlint.config +++ b/rpmlint.config @@ -28,7 +28,7 @@ setOption("DanglingSymlinkExceptions", ( setOption("ValidLicenses", ( # These are the short names for all of the Fedora approved licenses. # The master list is kept here: http://fedoraproject.org/wiki/Licensing - # Last synced with Wiki revision 84 of that page. + # Last synced with Wiki revision 87 of that page. 'Adobe', 'Affero GPL', 'AFL', @@ -98,6 +98,7 @@ setOption("ValidLicenses", ( 'Netscape', 'Nokia', 'OpenLDAP', + 'OpenPBS', 'OSL 1.0', 'OSL 1.0+', 'OSL 1.1', @@ -153,6 +154,7 @@ setOption("ValidLicenses", ( 'mplus', 'OFL', 'Utopia', + 'XANO', # Others 'Redistributable, no modification permitted', 'Freely redistributable without restriction', @@ -187,9 +189,9 @@ addFilter("requires-on-release") addFilter("jar-not-indexed") addFilter("invalid-(lc-messages|locale-man)-dir") addFilter("outside-libdir-files") -addFilter("-debuginfo no-documentation") -addFilter("-debuginfo [^ ]+ /usr/lib/debug/") +addFilter("-debuginfo.* no-documentation") +addFilter("-debuginfo.* /usr/lib/debug/") addFilter("non-standard-dir-in-usr libexec") -addFilter(" gpg-pubkey ") +addFilter("^gpg-pubkey:") addFilter(" doc-file-dependency .* /bin/sh$") addFilter("hardcoded-library-path .*/lib/udev(/|$)") diff --git a/rpmlint.spec b/rpmlint.spec index 197e7f0..1a8effa 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -1,6 +1,6 @@ Name: rpmlint -Version: 0.80 -Release: 3%{?dist} +Version: 0.81 +Release: 1%{?dist} Summary: Tool for checking common errors in RPM packages Group: Development/Tools @@ -11,7 +11,7 @@ Source1: %{name}.config Source2: %{name}-CHANGES.package.old Patch0: %{name}-0.78-distregex.patch Patch1: %{name}-0.77-compile.patch -Patch2: %{name}-0.80-fedoralicensing.patch +Patch2: %{name}-0.81-fedoralicensing.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -70,6 +70,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Sep 3 2007 Ville Skyttä - 0.81-1 +- 0.81. +- Improve Fedora license check (Todd Zullinger). +- Sync Fedora license list with Wiki rev 87. + * Wed Aug 29 2007 Ville Skyttä - Sync Fedora license list with Wiki rev 84 (Todd Zullinger). diff --git a/sources b/sources index ef07119..4819a7e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -31e1bda0b4e19188a7a5b075dc1a203f rpmlint-0.80.tar.bz2 +1f4b9bde98f270d196bb9f0364d376e8 rpmlint-0.81.tar.bz2