1 |
from Config import * |
2 |
|
3 |
#TODO add a loop for theses errors |
4 |
# forbidden-selinux-command-in- |
5 |
# incorrect-i18n-tag- |
6 |
# incorrect-locale- |
7 |
# invalid-shell-in- |
8 |
# non-empty- |
9 |
# perl-syntax-error-in- |
10 |
# shell-syntax-error-in- |
11 |
# update-menus-without-menu-file-in- |
12 |
# use-of-home-in- |
13 |
# use-tmp-in- |
14 |
|
15 |
|
16 |
valid_groups=( |
17 |
'Accessibility', |
18 |
'Archiving/Backup', |
19 |
'Archiving/Cd burning', |
20 |
'Archiving/Compression', |
21 |
'Archiving/Other', |
22 |
'Communications/Bluetooth', |
23 |
'Communications/Dial-Up', |
24 |
'Communications/Fax', |
25 |
'Communications/Mobile', |
26 |
'Communications/Radio', |
27 |
'Communications/Serial', |
28 |
'Communications/Telephony', |
29 |
'Databases', |
30 |
'Development/Basic', |
31 |
'Development/C', |
32 |
'Development/C++', |
33 |
'Development/C#', |
34 |
'Development/Databases', |
35 |
'Development/Erlang', |
36 |
'Development/GNOME and GTK+', |
37 |
'Development/Java', |
38 |
'Development/KDE and Qt', |
39 |
'Development/Kernel', |
40 |
'Development/OCaml', |
41 |
'Development/Other', |
42 |
'Development/Perl', |
43 |
'Development/PHP', |
44 |
'Development/Python', |
45 |
'Development/Ruby', |
46 |
'Development/Tools', |
47 |
'Development/X11', |
48 |
'Documentation', |
49 |
'Editors', |
50 |
'Education', |
51 |
'Emulators', |
52 |
'File tools', |
53 |
'Games/Adventure', |
54 |
'Games/Arcade', |
55 |
'Games/Boards', |
56 |
'Games/Cards', |
57 |
'Games/Other', |
58 |
'Games/Puzzles', |
59 |
'Games/Shooter', |
60 |
'Games/Simulation', |
61 |
'Games/Sports', |
62 |
'Games/Strategy', |
63 |
'Geography', |
64 |
'Graphical desktop/Cinnamon', |
65 |
'Graphical desktop/Enlightenment', |
66 |
'Graphical desktop/FVWM based', |
67 |
'Graphical desktop/GNOME', |
68 |
'Graphical desktop/Icewm', |
69 |
'Graphical desktop/KDE', |
70 |
'Graphical desktop/MATE', |
71 |
'Graphical desktop/Other', |
72 |
'Graphical desktop/Sawfish', |
73 |
'Graphical desktop/WindowMaker', |
74 |
'Graphical desktop/Xfce', |
75 |
'Graphics/3D', |
76 |
'Graphics/Editors and Converters', |
77 |
'Graphics/Utilities', |
78 |
'Graphics/Photography', |
79 |
'Graphics/Scanning', |
80 |
'Graphics/Viewers', |
81 |
'Monitoring', |
82 |
'Networking/Chat', |
83 |
'Networking/File transfer', |
84 |
'Networking/IRC', |
85 |
'Networking/Instant messaging', |
86 |
'Networking/Mail', |
87 |
'Networking/News', |
88 |
'Networking/Other', |
89 |
'Networking/Remote access', |
90 |
'Networking/WWW', |
91 |
'Office/Dictionary', |
92 |
'Office/Finance', |
93 |
'Office/Management', |
94 |
'Office/Organizer', |
95 |
'Office/Utilities', |
96 |
'Office/Spreadsheet', |
97 |
'Office/Suite', |
98 |
'Office/Word processor', |
99 |
'Publishing', |
100 |
'Sciences/Astronomy', |
101 |
'Sciences/Biology', |
102 |
'Sciences/Chemistry', |
103 |
'Sciences/Computer science', |
104 |
'Sciences/Geosciences', |
105 |
'Sciences/Mathematics', |
106 |
'Sciences/Other', |
107 |
'Sciences/Physics', |
108 |
'Security', |
109 |
'Shells', |
110 |
'Sound/Editors and Converters', |
111 |
'Sound/Midi', |
112 |
'Sound/Mixers', |
113 |
'Sound/Players', |
114 |
'Sound/Utilities', |
115 |
'System/Base', |
116 |
'System/Boot and Init', |
117 |
'System/Cluster', |
118 |
'System/Configuration', |
119 |
'System/Fonts/Console', |
120 |
'System/Fonts/True type', |
121 |
'System/Fonts/Type1', |
122 |
'System/Fonts/X11 bitmap', |
123 |
'System/Internationalization', |
124 |
'System/Kernel and hardware', |
125 |
'System/Libraries', |
126 |
'System/Networking', |
127 |
'System/Packaging', |
128 |
'System/Printing', |
129 |
'System/Servers', |
130 |
'System/X11', |
131 |
'Terminals', |
132 |
'Text tools', |
133 |
'Toys', |
134 |
'Video/Editors and Converters', |
135 |
'Video/Players', |
136 |
'Video/Television', |
137 |
'Video/Utilities', |
138 |
) |
139 |
|
140 |
setOption('ValidGroups',valid_groups) |
141 |
|
142 |
setOption('UseLzma', True) |
143 |
setOption('UseBzip2', False) |
144 |
|
145 |
setOption('CompressExtension','xz') |
146 |
setOption('NetworkEnabled',False) |
147 |
|
148 |
# no longer needed in cooker, we use file trigger |
149 |
addFilter('library-without-ldconfig-postin') |
150 |
addFilter('library-without-ldconfig-postun') |
151 |
|
152 |
addFilter('.* hardcoded-library-path in \$RPM_BUILD_ROOT/lib/udev/rules.d/.*') |
153 |
addFilter('.* hardcoded-library-path in /lib/udev/rules.d/.*') |
154 |
|
155 |
# we no longer compress patch and source when this is not needed |
156 |
addFilter('source-or-patch-not-compressed') |
157 |
|
158 |
# we do not check url in Source for the moment |
159 |
addFilter('invalid-url') |
160 |
|
161 |
# BuildRoot is optional now in our version of rpm |
162 |
addFilter('no-buildroot-tag') |
163 |
|
164 |
# false positive, as it has a number in the name |
165 |
addFilter('.* invalid-build-requires libxml2-devel') |
166 |
|
167 |
# false positive nowadays, may need a bug rpmlint side |
168 |
addFilter('.* no-dependency-on python-base') |
169 |
|
170 |
# done by default |
171 |
addFilter('no-cleaning-of-buildroot') |
172 |
# %clean is now optional, and set by default to a proper value |
173 |
addFilter('no-%clean-section') |
174 |
|
175 |
# no longer needed in cauldron ( and in fact, before ) |
176 |
addFilter('files-attr-not-set') |
177 |
|
178 |
# avoid problem like |
179 |
# https://bugs.mageia.org/show_bug.cgi?id=369 |
180 |
addFilter('.*-debug\..* non-standard-group Development/Debug') |
181 |
addFilter('.*-debug\..* dangling-relative-symlink') |
182 |
addFilter('.*-debug\..* shared-lib-without-dependency-information') |
183 |
addFilter('.*-debug\..* statically-linked-binary') |
184 |
addFilter('.*-debug\..* unstripped-binary-or-object') |
185 |
addFilter('.*-debug\..* no-documentation') |
186 |
addFilter('.*-debug\..* hidden-file-or-dir /usr/lib/debug/.build-id') |
187 |
|
188 |
addFilter('.*-debuginfo\..* non-standard-group Development/Debug') |
189 |
addFilter('.*-debugsource\..* non-standard-group Development/Debug') |
190 |
|
191 |
# for kppp-provider |
192 |
addFilter('unexpanded-macro /usr/share/apps/kppp/Provider') |
193 |
# for various perl packages |
194 |
addFilter('unexpanded-macro.*%INC') |
195 |
addFilter('unexpanded-macro.*%ENV') |
196 |
|
197 |
# for jruby |
198 |
addFilter('unexpanded-macro /usr/lib64/jruby') |
199 |
addFilter('unexpanded-macro /usr/lib/jruby') |
200 |
|
201 |
# for gdm |
202 |
addFilter('unexpanded-macro /var/lib/gdm/.gconf.mandatory/%gconf-tree.xml') |
203 |
addFilter('unexpanded-macro /var/lib/gdm/.gconf.defaults/%gconf-tree.xml') |
204 |
# for various ruby packages |
205 |
addFilter('unexpanded-macro /usr/share/ruby/gems/.*/doc/') |
206 |
addFilter('unexpanded-macro /usr/share/ruby/gems/doc/') |
207 |
addFilter('unexpanded-macro /usr/share/ruby/gems/gems/railties-.*/templates') |
208 |
# mypaint brushes |
209 |
addFilter('unexpanded-macro /usr/share/mypaint/brushes/ramon/100%.* %_Opaque.*') |
210 |
|
211 |
# for ocaml-camomile-data |
212 |
addFilter('unexpanded-macro /usr/share/camomile/charmaps/') |
213 |
# skychart documentation, a wget of a wiki with url |
214 |
addFilter('unexpanded-macro /usr/share/skychart/doc/wiki_doc/lib/exe/fetch.php') |
215 |
# for scilab, where several macro and diagram files look like unexpanded macros |
216 |
addFilter('unexpanded-macro /usr/share/scilab/.*/macros/.* %.*') |
217 |
addFilter('unexpanded-macro /usr/share/scilab/modules/xcos/tests/unit_tests/%diagram_xcos.* %diagram_xcos') |
218 |
# ruby documentation |
219 |
addFilter('unexpanded-macro /usr/share/ri/') |
220 |
# several perl module. no risk of breaking anything |
221 |
addFilter('unexpanded-macro %description ') |
222 |
# for plt |
223 |
addFilter('unexpanded-macro /usr/lib/plt/collects/srfi/%*') |
224 |
addFilter('unexpanded-macro /usr/lib/plt/collects/srfi/compiled/%*') |
225 |
addFilter('unexpanded-macro /usr/lib64/plt/collects/srfi/%*') |
226 |
addFilter('unexpanded-macro /usr/lib64/plt/collects/srfi/compiled/%*') |
227 |
# for racket |
228 |
addFilter('unexpanded-macro /usr/lib/racket/collects/srfi/%*') |
229 |
addFilter('unexpanded-macro /usr/lib/racket/collects/srfi/compiled/%*') |
230 |
addFilter('unexpanded-macro /usr/lib64/racket/collects/srfi/%*') |
231 |
addFilter('unexpanded-macro /usr/lib64/racket/collects/srfi/compiled/%*') |
232 |
# for metasploit |
233 |
addFilter('unexpanded-macro /usr/share/metasploit/lib/gemcache/ruby/1.9.1/gems') |
234 |
# for libreoffice |
235 |
addFilter('unexpanded-macro /usr/lib/libreoffice/share/extensions/.*/help') |
236 |
addFilter('unexpanded-macro /usr/lib64/libreoffice/share/extensions/.*/help') |
237 |
# for opencpn |
238 |
addFilter('unexpanded-macro /usr/share/opencpn/doc/OpenCPN User Manual_files/') |
239 |
|
240 |
addFilter('x11-server-common.* standard-dir-owned-by-package') |
241 |
addFilter('filesystem.* standard-dir-owned-by-package') |
242 |
addFilter('filesystem.* dir-or-file-in-usr-local') |
243 |
addFilter('rpm.* standard-dir-owned-by-package /var/lib/rpm') |
244 |
|
245 |
# for dkms packages |
246 |
addFilter('dkms-.* devel-file-in-non-devel-package') |
247 |
|
248 |
# for all bash_completion.d files |
249 |
addFilter('.* non-conffile-in-etc /etc/bash_completion.d/.*') |