Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 22b08814a1311ba0803cbddb1d7cefd3 > files > 3

rpmlint-mageia-policy-0.2.29-2.1.mga6.src.rpm

from Config import *

#TODO add a loop for theses errors 
# forbidden-selinux-command-in-
# incorrect-i18n-tag-
# incorrect-locale-
# invalid-shell-in-
# non-empty-
# perl-syntax-error-in-
# shell-syntax-error-in-
# update-menus-without-menu-file-in-
# use-of-home-in-
# use-tmp-in-


valid_groups=(
    'Accessibility',
    'Archiving/Backup',
    'Archiving/Cd burning',
    'Archiving/Compression',
    'Archiving/Other',
    'Communications/Bluetooth',
    'Communications/Dial-Up',
    'Communications/Fax',
    'Communications/Mobile',
    'Communications/Radio',
    'Communications/Serial',
    'Communications/Telephony',
    'Databases',
    'Development/Basic',
    'Development/C',
    'Development/C++',
    'Development/C#',
    'Development/Databases',
    'Development/Erlang',
    'Development/GNOME and GTK+',
    'Development/Java',
    'Development/KDE and Qt',
    'Development/Kernel',
    'Development/OCaml',
    'Development/Other',
    'Development/Perl',
    'Development/PHP',
    'Development/Python',
    'Development/Ruby',
    'Development/Tools',
    'Development/X11',
    'Documentation',
    'Editors',
    'Education',
    'Emulators',
    'File tools',
    'Games/Adventure',
    'Games/Arcade',
    'Games/Boards',
    'Games/Cards',
    'Games/Other',
    'Games/Puzzles',
    'Games/Shooter',
    'Games/Simulation',
    'Games/Sports',
    'Games/Strategy',
    'Geography',
    'Graphical desktop/Cinnamon',
    'Graphical desktop/Enlightenment',
    'Graphical desktop/FVWM based',
    'Graphical desktop/GNOME',
    'Graphical desktop/Icewm',
    'Graphical desktop/KDE',
    'Graphical desktop/MATE',
    'Graphical desktop/Other',
    'Graphical desktop/Sawfish',
    'Graphical desktop/WindowMaker',
    'Graphical desktop/Xfce',
    'Graphics/3D',
    'Graphics/Editors and Converters',
    'Graphics/Utilities',
    'Graphics/Photography',
    'Graphics/Scanning',
    'Graphics/Viewers',
    'Monitoring',
    'Networking/Chat',
    'Networking/File transfer',
    'Networking/IRC',
    'Networking/Instant messaging',
    'Networking/Mail',
    'Networking/News',
    'Networking/Other',
    'Networking/Remote access',
    'Networking/WWW',
    'Office/Dictionary',
    'Office/Finance',
    'Office/Management',
    'Office/Organizer',
    'Office/Utilities',
    'Office/Spreadsheet',
    'Office/Suite',
    'Office/Word processor',
    'Publishing',
    'Sciences/Astronomy',
    'Sciences/Biology',
    'Sciences/Chemistry',
    'Sciences/Computer science',
    'Sciences/Geosciences',
    'Sciences/Mathematics',
    'Sciences/Other',
    'Sciences/Physics',
    'Security',
    'Shells',
    'Sound/Editors and Converters',
    'Sound/Midi',
    'Sound/Mixers',
    'Sound/Players',
    'Sound/Utilities',
    'System/Base',
    'System/Boot and Init',
    'System/Cluster',
    'System/Configuration',
    'System/Fonts/Console',
    'System/Fonts/True type',
    'System/Fonts/Type1',
    'System/Fonts/X11 bitmap',
    'System/Internationalization',
    'System/Kernel and hardware',
    'System/Libraries',
    'System/Networking',
    'System/Packaging',
    'System/Printing',
    'System/Servers',
    'System/X11',
    'Terminals',
    'Text tools',
    'Toys',
    'Video/Editors and Converters',
    'Video/Players',
    'Video/Television',
    'Video/Utilities',
    )

setOption('ValidGroups',valid_groups)

setOption('UseLzma', True)
setOption('UseBzip2', False)

setOption('CompressExtension','xz')
setOption('NetworkEnabled',False)

# no longer needed in cooker, we use file trigger
addFilter('library-without-ldconfig-postin')
addFilter('library-without-ldconfig-postun')

addFilter('.* hardcoded-library-path in \$RPM_BUILD_ROOT/lib/udev/rules.d/.*')
addFilter('.* hardcoded-library-path in /lib/udev/rules.d/.*')

# we no longer compress patch and source when this is not needed
addFilter('source-or-patch-not-compressed')

# we do not check url in Source for the moment
addFilter('invalid-url')

# BuildRoot is optional now in our version of rpm
addFilter('no-buildroot-tag')

# false positive, as it has a number in the name
addFilter('.* invalid-build-requires libxml2-devel')

# false positive nowadays, may need a bug rpmlint side
addFilter('.* no-dependency-on python-base')

# done by default
addFilter('no-cleaning-of-buildroot')
# %clean is now optional, and set by default to a proper value
addFilter('no-%clean-section')

# no longer needed in cauldron ( and in fact, before )
addFilter('files-attr-not-set')

# avoid problem like
# https://bugs.mageia.org/show_bug.cgi?id=369
addFilter('.*-debug\..* non-standard-group Development/Debug')
addFilter('.*-debug\..* dangling-relative-symlink')
addFilter('.*-debug\..* shared-lib-without-dependency-information')
addFilter('.*-debug\..* statically-linked-binary')
addFilter('.*-debug\..* unstripped-binary-or-object')
addFilter('.*-debug\..* no-documentation')
addFilter('.*-debug\..* hidden-file-or-dir /usr/lib/debug/.build-id')

addFilter('.*-debuginfo\..* non-standard-group Development/Debug')
addFilter('.*-debugsource\..* non-standard-group Development/Debug')

# for kppp-provider 
addFilter('unexpanded-macro /usr/share/apps/kppp/Provider')
# for various perl packages
addFilter('unexpanded-macro.*%INC')
addFilter('unexpanded-macro.*%ENV')

# for jruby
addFilter('unexpanded-macro /usr/lib64/jruby')
addFilter('unexpanded-macro /usr/lib/jruby')

# for gdm
addFilter('unexpanded-macro /var/lib/gdm/.gconf.mandatory/%gconf-tree.xml')
addFilter('unexpanded-macro /var/lib/gdm/.gconf.defaults/%gconf-tree.xml')
# for various ruby packages 
addFilter('unexpanded-macro /usr/share/ruby/gems/.*/doc/')
addFilter('unexpanded-macro /usr/share/ruby/gems/doc/')
addFilter('unexpanded-macro /usr/share/ruby/gems/gems/railties-.*/templates')
addFilter('unexpanded-macro /usr/share/gems/.*/doc/')
addFilter('unexpanded-macro /usr/share/gems/doc/')
addFilter('unexpanded-macro /usr/share/gems/gems/railties-.*/templates')
# mypaint brushes
addFilter('unexpanded-macro /usr/share/mypaint/brushes/ramon/100%.* %_Opaque.*')

# for ocaml-camomile-data
addFilter('unexpanded-macro /usr/share/camomile/charmaps/')
# skychart documentation, a wget of a wiki with url
addFilter('unexpanded-macro /usr/share/skychart/doc/wiki_doc/lib/exe/fetch.php')
# for scilab, where several macro and diagram files look like unexpanded macros
addFilter('unexpanded-macro /usr/share/scilab/.*/macros/.* %.*')
addFilter('unexpanded-macro /usr/share/scilab/modules/xcos/tests/unit_tests/%diagram_xcos.* %diagram_xcos')
# ruby documentation
addFilter('unexpanded-macro /usr/share/ri/')
# several perl module. no risk of breaking anything
addFilter('unexpanded-macro %description ')
# for plt
addFilter('unexpanded-macro /usr/lib/plt/collects/srfi/%*')
addFilter('unexpanded-macro /usr/lib/plt/collects/srfi/compiled/%*')
addFilter('unexpanded-macro /usr/lib64/plt/collects/srfi/%*')
addFilter('unexpanded-macro /usr/lib64/plt/collects/srfi/compiled/%*')
# for racket
addFilter('unexpanded-macro /usr/lib/racket/collects/srfi/%*')
addFilter('unexpanded-macro /usr/lib/racket/collects/srfi/compiled/%*')
addFilter('unexpanded-macro /usr/lib64/racket/collects/srfi/%*')
addFilter('unexpanded-macro /usr/lib64/racket/collects/srfi/compiled/%*')
# for metasploit
addFilter('unexpanded-macro /usr/share/metasploit/lib/gemcache/ruby/1.9.1/gems')
# for libreoffice
addFilter('unexpanded-macro /usr/lib/libreoffice/share/extensions/.*/help')
addFilter('unexpanded-macro /usr/lib64/libreoffice/share/extensions/.*/help')
# for opencpn
addFilter('unexpanded-macro /usr/share/opencpn/doc/OpenCPN User Manual_files/')

addFilter('x11-server-common.* standard-dir-owned-by-package')
addFilter('filesystem.* standard-dir-owned-by-package')
addFilter('filesystem.* dir-or-file-in-usr-local')
addFilter('rpm.* standard-dir-owned-by-package /var/lib/rpm')

# for dkms packages
addFilter('dkms-.* devel-file-in-non-devel-package')

# for all bash_completion.d files
addFilter('.* non-conffile-in-etc /etc/bash_completion.d/.*')