- 0.81.
- Improve Fedora license check (Todd Zullinger). - Sync Fedora license list with Wiki rev 87.
This commit is contained in:
parent
ebc9da965b
commit
0eee47514c
@ -1 +1 @@
|
||||
rpmlint-0.80.tar.bz2
|
||||
rpmlint-0.81.tar.bz2
|
||||
|
@ -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 '<license> 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
|
47
rpmlint-0.81-fedoralicensing.patch
Normal file
47
rpmlint-0.81-fedoralicensing.patch
Normal file
@ -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 '<license> 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
|
@ -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(/|$)")
|
||||
|
11
rpmlint.spec
11
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ä <ville.skytta at iki.fi> - 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ä <ville.skytta at iki.fi>
|
||||
- Sync Fedora license list with Wiki rev 84 (Todd Zullinger).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user