Gentoo Archives: gentoo-commits

From: Samuel Bernardo <samuelbernardo.mail@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/user/ssnb:master commit in: dev-util/rpmlint/, dev-util/rpmlint/files/
Date: Thu, 03 Jan 2019 22:11:35
Message-Id: 1546553426.91c074a40b6a538d3ea8bc9986eda7c82d943046.samuelbernardo@gentoo
1 commit: 91c074a40b6a538d3ea8bc9986eda7c82d943046
2 Author: Samuel Bernardo <samuelbernardo <AT> tecnico <DOT> ulisboa <DOT> pt>
3 AuthorDate: Thu Jan 3 16:49:47 2019 +0000
4 Commit: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
5 CommitDate: Thu Jan 3 22:10:26 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=91c074a4
7
8 add rpmlint ebuild
9
10 Signed-off-by: Samuel Bernardo <samuelbernardo.mail <AT> gmail.com>
11
12 dev-util/rpmlint/Manifest | 4 +
13 dev-util/rpmlint/files/fedora.config | 419 +++++++++++++++++++++++++++++++++++
14 dev-util/rpmlint/rpmlint-1.10.ebuild | 1 +
15 dev-util/rpmlint/rpmlint-1.5.ebuild | 1 +
16 dev-util/rpmlint/rpmlint-9999.ebuild | 43 ++++
17 5 files changed, 468 insertions(+)
18
19 diff --git a/dev-util/rpmlint/Manifest b/dev-util/rpmlint/Manifest
20 new file mode 100644
21 index 0000000..941d284
22 --- /dev/null
23 +++ b/dev-util/rpmlint/Manifest
24 @@ -0,0 +1,4 @@
25 +AUX fedora.config 9778 BLAKE2B 18ec007c92cea5ee444f18f15e94ac5e8d682cd4d475a97a7f362a16665b85bd5a5a94cdaf0b77b4f309f0dbf36e3d9cc80adae3619bc8aa30b63894facf4c00 SHA512 999d646d8df3fc4ebbcd67017673408b1d35ce7807054b0f4f025415d8611ca26a87cb4b41b011f1e6f0ac2916aca69d90f3f754065453d61f23ef1a1e281bfa
26 +EBUILD rpmlint-1.10.ebuild 1010 BLAKE2B 4fe53a0e355d1cd0cf96d4e396e0bc8c54ed5fe11124747d4cd759a6d8fe970c42f5fc0fbd6053d499041e67eba9f2696d77aeeb616bc5d583d1fbc84f033e9d SHA512 e4c0c8b2c60abd4aa629043e7b906347d778a0ed7e4e9557e3a854b25397b55ea669245f0cea212eb4808e3bee6841240196b9a35664f50c9edc205ba0440989
27 +EBUILD rpmlint-1.5.ebuild 1010 BLAKE2B 4fe53a0e355d1cd0cf96d4e396e0bc8c54ed5fe11124747d4cd759a6d8fe970c42f5fc0fbd6053d499041e67eba9f2696d77aeeb616bc5d583d1fbc84f033e9d SHA512 e4c0c8b2c60abd4aa629043e7b906347d778a0ed7e4e9557e3a854b25397b55ea669245f0cea212eb4808e3bee6841240196b9a35664f50c9edc205ba0440989
28 +EBUILD rpmlint-9999.ebuild 1010 BLAKE2B 4fe53a0e355d1cd0cf96d4e396e0bc8c54ed5fe11124747d4cd759a6d8fe970c42f5fc0fbd6053d499041e67eba9f2696d77aeeb616bc5d583d1fbc84f033e9d SHA512 e4c0c8b2c60abd4aa629043e7b906347d778a0ed7e4e9557e3a854b25397b55ea669245f0cea212eb4808e3bee6841240196b9a35664f50c9edc205ba0440989
29
30 diff --git a/dev-util/rpmlint/files/fedora.config b/dev-util/rpmlint/files/fedora.config
31 new file mode 100644
32 index 0000000..cf6c52b
33 --- /dev/null
34 +++ b/dev-util/rpmlint/files/fedora.config
35 @@ -0,0 +1,419 @@
36 +# -*- python -*-
37 +
38 +# System wide rpmlint default configuration. Do not modify, override/add
39 +# options in /etc/rpmlint/config and/or ~/.rpmlintrc as needed.
40 +
41 +import os.path
42 +import re
43 +import sys
44 +
45 +from Config import *
46 +import Pkg
47 +
48 +
49 +setOption("CompressExtension", "gz")
50 +setOption("DefaultPythonVersion", sys.version[:3])
51 +setOption("KernelModuleRPMsOK", False)
52 +setOption("MaxLineLength", 80)
53 +setOption("NetworkEnabled", True)
54 +setOption("ReleaseExtension", '\.(fc|rhe?l|el)\d+(?=\.|$)')
55 +setOption("UseDefaultRunlevels", False)
56 +setOption("UseEpoch", False)
57 +setOption("UseUTF8", True)
58 +setOption("UseVersionInChangeLog", True)
59 +setOption("ValidSrcPerms", (int("664",8), int("644",8), ))
60 +
61 +setOption("ValidShells", (
62 + "<lua>",
63 + "/bin/sh",
64 + "/bin/bash",
65 + "/sbin/ldconfig",
66 + "/usr/bin/perl",
67 + "/usr/bin/python",
68 +))
69 +
70 +setOption("DanglingSymlinkExceptions", (
71 + ['consolehelper$', 'usermode'],
72 + ['consolehelper-gtk$', 'usermode-gtk'],
73 +))
74 +
75 +setOption("ValidLicenses", (
76 + # These are the short names for all of the Fedora approved licenses.
77 + # The master list is kept here: http://fedoraproject.org/wiki/Licensing
78 + # Last synced with revision "2.20, 9 February 2014" of that page.
79 + 'AAL',
80 + 'Abstyles',
81 + 'Adobe',
82 + 'ADSL',
83 + 'AFL',
84 + 'Afmparse',
85 + 'AGPLv1',
86 + 'AGPLv3',
87 + 'AGPLv3+',
88 + 'AGPLv3 with exceptions',
89 + 'AMDPLPA',
90 + 'AML',
91 + 'AMPAS BSD',
92 + 'APAFML',
93 + 'APSL 2.0',
94 + 'APSL 2.0+',
95 + 'ARL',
96 + 'Artistic 2.0',
97 + 'Artistic clarified',
98 + 'ASL 1.0',
99 + 'ASL 1.0+',
100 + 'ASL 1.1',
101 + 'ASL 1.1+',
102 + 'ASL 2.0',
103 + 'ASL 2.0+',
104 + 'Bahyph',
105 + 'Barr',
106 + 'Beerware',
107 + 'BeOpen',
108 + 'Bibtex',
109 + 'BitTorrent',
110 + 'Boost',
111 + 'Borceux',
112 + 'BSD',
113 + 'BSD Protection',
114 + 'BSD with advertising',
115 + 'BSD with attribution',
116 + 'CATOSL',
117 + 'CC0',
118 + 'CeCILL',
119 + 'CeCILL-B',
120 + 'CeCILL-C',
121 + 'CDDL',
122 + 'CNRI',
123 + 'Condor',
124 + 'Copyright only',
125 + 'CPAL',
126 + 'CPL',
127 + 'Crossword',
128 + 'Crystal Stacker',
129 + 'Cube',
130 + 'diffmark',
131 + 'DMIT',
132 + 'DOC',
133 + 'Dotseqn',
134 + 'DSDP',
135 + 'dvipdfm',
136 + 'ECL 1.0',
137 + 'ECL 2.0',
138 + 'eCos',
139 + 'EFL 2.0',
140 + 'EFL 2.0+',
141 + 'eGenix',
142 + 'Entessa',
143 + 'EPL',
144 + 'ERPL',
145 + 'EU Datagrid',
146 + 'EUPL 1.1',
147 + 'Eurosym',
148 + 'Fair',
149 + 'FSFUL',
150 + 'FSFULLR',
151 + 'FTL',
152 + 'Giftware',
153 + 'GL2PS',
154 + 'Glide',
155 + 'Glulxe',
156 + 'gnuplot',
157 + 'GPL+',
158 + 'GPL+ or Artistic',
159 + 'GPL+ with exceptions',
160 + 'GPLv1',
161 + 'GPLv2 or Artistic',
162 + 'GPLv2+ or Artistic',
163 + 'GPLv2',
164 + 'GPLv2 with exceptions',
165 + 'GPLv2+',
166 + 'GPLv2+ with exceptions',
167 + 'GPLv3',
168 + 'GPLv3 with exceptions',
169 + 'GPLv3+',
170 + 'GPLv3+ with exceptions',
171 + 'HaskellReport',
172 + 'IBM',
173 + 'IJG',
174 + 'ImageMagick',
175 + 'iMatix',
176 + 'Imlib2',
177 + 'Intel ACPI',
178 + 'Interbase',
179 + 'ISC',
180 + 'Jabber',
181 + 'JasPer',
182 + 'JPython',
183 + 'Julius',
184 + 'Knuth',
185 + 'Latex2e',
186 + 'LBNL BSD',
187 + 'Leptonica',
188 + 'LGPLv2',
189 + 'LGPLv2 with exceptions',
190 + 'LGPLv2+',
191 + 'LGPLv2+ or Artistic',
192 + 'LGPLv2+ with exceptions',
193 + 'LGPLv3',
194 + 'LGPLv3 with exceptions',
195 + 'LGPLv3+',
196 + 'LGPLv3+ with exceptions',
197 + 'Lhcyr',
198 + 'libtiff',
199 + 'LLGPL',
200 + 'Logica',
201 + 'LOSLA',
202 + 'LPL',
203 + 'LPPL',
204 + 'MakeIndex',
205 + 'mecab-ipadic',
206 + 'midnight',
207 + 'MirOS',
208 + 'MIT',
209 + 'MITNFA',
210 + 'MIT with advertising',
211 + 'mod_macro',
212 + 'Motosoto',
213 + 'MPLv1.0',
214 + 'MPLv1.0+',
215 + 'MPLv1.1',
216 + 'MPLv1.1+',
217 + 'MPLv2.0',
218 + 'MS-PL',
219 + 'MS-RL',
220 + 'MTLL',
221 + 'Mup',
222 + 'Naumen',
223 + 'NCSA',
224 + 'NetCDF',
225 + 'Netscape',
226 + 'Newmat',
227 + 'Newsletr',
228 + 'NGPL',
229 + 'NLPL',
230 + 'Nmap',
231 + 'Nokia',
232 + 'NOSL',
233 + 'Noweb',
234 + 'OML',
235 + 'OpenLDAP',
236 + 'OpenPBS',
237 + 'OpenSSL',
238 + 'OReilly',
239 + 'OSL 1.0',
240 + 'OSL 1.0+',
241 + 'OSL 1.1',
242 + 'OSL 1.1+',
243 + 'OSL 2.0',
244 + 'OSL 2.0+',
245 + 'OSL 2.1',
246 + 'OSL 2.1+',
247 + 'OSL 3.0',
248 + 'OSL 3.0+',
249 + 'Par',
250 + 'Phorum',
251 + 'PHP',
252 + 'PlainTeX',
253 + 'Plexus',
254 + 'PostgreSQL',
255 + 'psfrag',
256 + 'psutils',
257 + 'Public Domain',
258 + 'Python',
259 + 'Qhull',
260 + 'QPL',
261 + 'Rdisc',
262 + 'REX',
263 + 'RiceBSD',
264 + 'Romio',
265 + 'RPSL',
266 + 'Rsfs',
267 + 'Ruby',
268 + 'Saxpath',
269 + 'SCEA',
270 + 'SCRIP',
271 + 'Sendmail',
272 + 'Sleepycat',
273 + 'SISSL',
274 + 'SLIB',
275 + 'SNIA',
276 + 'softSurfer',
277 + 'SPL',
278 + 'STMPL',
279 + 'SWL',
280 + 'TCL',
281 + 'Teeworlds',
282 + 'Threeparttable',
283 + 'TMate',
284 + 'Tolua',
285 + 'TORQUEv1.1',
286 + 'TOSL',
287 + 'TPDL',
288 + 'TPL',
289 + 'UCD',
290 + 'Vim',
291 + 'VNLSL',
292 + 'VOSTROM',
293 + 'VSL',
294 + 'W3C',
295 + 'Webmin',
296 + 'Wsuipa',
297 + 'WTFPL',
298 + 'wxWidgets',
299 + 'Xerox',
300 + 'xinetd',
301 + 'xpp',
302 + 'XSkat',
303 + 'YPLv1.1',
304 + 'Zed',
305 + 'Zend',
306 + 'zlib',
307 + 'zlib with acknowledgement',
308 + 'ZPLv1.0',
309 + 'ZPLv1.0+',
310 + 'ZPLv2.0',
311 + 'ZPLv2.0+',
312 + 'ZPLv2.1',
313 + 'ZPLv2.1+',
314 + # Documentation licenses
315 + 'CDL',
316 + 'FBSDDL',
317 + 'GFDL',
318 + 'IEEE',
319 + 'LDPL',
320 + 'OFSFDL',
321 + 'Open Publication',
322 + 'Public Use',
323 + 'Verbatim',
324 + # Content licenses
325 + 'CC-BY',
326 + 'CC-BY-ND',
327 + 'CC-BY-SA',
328 + 'DMTF',
329 + 'DSL',
330 + 'EFML',
331 + 'Free Art',
332 + 'GeoGratis',
333 + 'Green OpenMusic',
334 + 'OAL',
335 + # Font licenses
336 + 'AMS',
337 + 'Arphic',
338 + 'Baekmuk',
339 + 'Bitstream Vera',
340 + 'DoubleStroke',
341 + 'Hershey',
342 + 'IPA',
343 + 'Liberation',
344 + 'Lucida',
345 + 'MgOpen',
346 + 'mplus',
347 + 'OFL',
348 + 'PTFL',
349 + 'STIX',
350 + 'Utopia',
351 + 'Wadalab',
352 + 'XANO',
353 + # Others
354 + 'Redistributable, no modification permitted',
355 + 'Freely redistributable without restriction',
356 +))
357 +
358 +setOption('SystemLibPaths', ('/lib', '/lib64', '/usr/lib', '/usr/lib64'))
359 +
360 +# Get standard users and groups from the setup package's uidgid file
361 +setOption('StandardUsers', [])
362 +setOption('StandardGroups', [])
363 +setup_pkg = None
364 +try:
365 + setup_pkg = Pkg.InstalledPkg('setup')
366 +except:
367 + pass
368 +if setup_pkg:
369 + users = set()
370 + groups = set()
371 + uidgid_regex = re.compile(r'^\s*(\S+)\s+(-|\d+)\s+(-|\d+|\(\d+\))\s')
372 + for uidgid_file in [x for x in setup_pkg.files() if x.endswith('/uidgid')]:
373 + if os.path.exists(uidgid_file):
374 + fobj = open(uidgid_file)
375 + try:
376 + for line in fobj.read().strip().splitlines():
377 + res = uidgid_regex.search(line)
378 + if res:
379 + name = res.group(1)
380 + if res.group(2) != '-':
381 + users.add(name)
382 + if res.group(3) != '-' and not '(' in res.group(3):
383 + groups.add(name)
384 + del res
385 + del line
386 + finally:
387 + fobj.close()
388 + del fobj
389 + setOption('StandardUsers', sorted(users))
390 + setOption('StandardGroups', sorted(groups))
391 + del uidgid_regex, uidgid_file, users, groups
392 +del setup_pkg
393 +
394 +# Output filters
395 +addFilter("source-or-patch-not-compressed")
396 +addFilter("%mklibname")
397 +addFilter("no-dependency-on (perl|python)-base")
398 +addFilter("no-dependency-on locales-")
399 +addFilter("(python|perl5)-naming-policy-not-applied")
400 +addFilter("no-(packager-tag|signature)")
401 +addFilter("incoherent-version-in-name")
402 +addFilter("invalid-build-requires")
403 +addFilter("ghost-files-without-postin")
404 +addFilter("postin-without-ghost-file-creation")
405 +addFilter("no-major-in-name")
406 +addFilter("no-provides")
407 +addFilter("executable-in-library-package")
408 +addFilter("non-versioned-file-in-library-package")
409 +addFilter("requires-on-release")
410 +addFilter("jar-not-indexed")
411 +addFilter("outside-libdir-files")
412 +addFilter("-debuginfo.* no-documentation")
413 +addFilter("-debuginfo.* /usr/lib/debug/")
414 +addFilter("non-standard-dir-in-usr libexec")
415 +addFilter("^gpg-pubkey:")
416 +addFilter(" doc-file-dependency .* /bin/sh$")
417 +addFilter("hardcoded-library-path .*/lib/udev(/|$)")
418 +addFilter("not-standard-release-extension")
419 +addFilter("explicit-lib-dependency (liberation-fonts|libertas-.*-firmware|libvirt$|.*-(java|python)$)")
420 +addFilter("filename-too-long-for-joliet")
421 +addFilter("symlink-should-be-")
422 +addFilter("dangling-\S*symlink /usr/share/doc/HTML/\S+/common .+/common$")
423 +addFilter("hidden-file-or-dir .*/man5/\.k5login\.5[^/]+$")
424 +addFilter("blender.+ (wrong-script-interpreter|non-executable-script) .+/blender/.+\.py.*BPY.*")
425 +# Fedora 12 and newer no longer need a buildroot defined, to have the buildroot cleaned at the beginning
426 +# of %install, and do not need to define a %clean section unless the default is invalid.
427 +addFilter("no-cleaning-of-buildroot")
428 +addFilter("no-buildroot-tag")
429 +addFilter("no-%clean-section")
430 +# Only EL4 needs the files-attr-not-set check, because rpm 4.4 and newer no longer need a %defattr line
431 +# (it automatically provides one).
432 +addFilter("files-attr-not-set")
433 +# Don't bother with the non-ghost-in-var-(lock|run) checks on Fedora 15 or newer
434 +# since they have tmpfs /var/lock and /var/run.
435 +addFilter("non-ghost-in-var-lock")
436 +addFilter("non-ghost-in-var-run")
437 +# Someone thought it was a good idea to make .desktop files executable. They were wrong.
438 +# Nevertheless, I do not yet control the universe, so we squelch the error here.
439 +addFilter("script-without-shebang .*\.desktop$")
440 +# Some files in /etc/ are not meant to be modified by the sysadmin
441 +addFilter("non-conffile-in-etc /etc/rpm/.*$")
442 +addFilter("non-conffile-in-etc /etc/rc.d/init.d/.*$")
443 +# Fixed in rpm >= 4.7.1
444 +addFilter("broken-syntax-in-scriptlet-requires")
445 +
446 +# https://bugzilla.redhat.com/496737, https://bugzilla.redhat.com/646455
447 +for pkg, exe in (("coreutils", "/bin/su"),
448 + ("krb5-workstation", "/usr/kerberos/bin/ksu"),
449 + ("passwd", "/usr/bin/passwd"),
450 + ("sudo", "/usr/bin/sudo(edit)?"),
451 + ("upstart", "/sbin/initctl"),
452 + ("usermode", "/usr/sbin/userhelper")):
453 + addFilter("%s.* (setuid-binary|non-standard-executable-perm) %s (root )?04"
454 + % (pkg, exe))
455
456 diff --git a/dev-util/rpmlint/rpmlint-1.10.ebuild b/dev-util/rpmlint/rpmlint-1.10.ebuild
457 new file mode 120000
458 index 0000000..dc1570b
459 --- /dev/null
460 +++ b/dev-util/rpmlint/rpmlint-1.10.ebuild
461 @@ -0,0 +1 @@
462 +rpmlint-9999.ebuild
463 \ No newline at end of file
464
465 diff --git a/dev-util/rpmlint/rpmlint-1.5.ebuild b/dev-util/rpmlint/rpmlint-1.5.ebuild
466 new file mode 120000
467 index 0000000..dc1570b
468 --- /dev/null
469 +++ b/dev-util/rpmlint/rpmlint-1.5.ebuild
470 @@ -0,0 +1 @@
471 +rpmlint-9999.ebuild
472 \ No newline at end of file
473
474 diff --git a/dev-util/rpmlint/rpmlint-9999.ebuild b/dev-util/rpmlint/rpmlint-9999.ebuild
475 new file mode 100644
476 index 0000000..cad98b1
477 --- /dev/null
478 +++ b/dev-util/rpmlint/rpmlint-9999.ebuild
479 @@ -0,0 +1,43 @@
480 +# Copyright 1999-2019 Gentoo Foundation
481 +# Distributed under the terms of the GNU General Public License v2
482 +
483 +EAPI=6
484 +PYTHON_COMPAT=( python2_7 )
485 +
486 +inherit python-single-r1 git-r3
487 +#inherit python-single-r1
488 +#[ "${PV}" = 9999 ] && inherit git-r3
489 +
490 +DESCRIPTION="Tool for checking common errors in RPM packages"
491 +HOMEPAGE="http://rpmlint.zarb.org/"
492 +if [ "${PV}" = 9999 ]; then
493 + EGIT_REPO_URI="git://git.code.sf.net/p/rpmlint/code"
494 +else
495 + #[ "${PV}" = 9999 ] || SRC_URI="mirror://sourceforge/rpmlint/${P}.tar.xz"
496 + EGIT_REPO_URI="https://github.com/rpm-software-management/rpmlint.git"
497 + EGIT_COMMIT="${P}"
498 +fi
499 +
500 +LICENSE="GPL-2"
501 +SLOT="0"
502 +[ "${PV}" = 9999 ] || KEYWORDS="~amd64 ~x86"
503 +
504 +COMMON_DEPEND="
505 + ${PYTHON_DEPS}
506 + app-arch/rpm[python]
507 +"
508 +DEPEND="
509 + ${COMMON_DEPEND}
510 +"
511 +RDEPEND="
512 + ${COMMON_DEPEND}
513 + || ( dev-python/python-magic[${PYTHON_USEDEP}] sys-apps/file[${PYTHON_USEDEP}] )
514 + dev-python/pyenchant[${PYTHON_USEDEP}]
515 +"
516 +
517 +src_install() {
518 + default
519 +
520 + insinto /usr/share/rmplint/config
521 + newins ${FILESDIR}/fedora.config config
522 +}