# -*- python -*-
# Configuration for the rpmlint utility.
# Loaded before ~/.rpmlintrc

# This line is mandatory to access the configuration functions
from Config import *

# Configure the checks if you don't want the default ones

#addCheck("DistributionCheck")
#addCheck("TagsCheck")
#addCheck("BinariesCheck")
#addCheck("ConfigCheck")
#addCheck("FilesCheck")
#addCheck("FHSCheck")
#addCheck("SignatureCheck")
#addCheck("I18NCheck")
#addCheck("MenuCheck")
#addCheck("PostCheck")
#addCheck("InitScriptCheck")
#addCheck("SourceCheck")
#addCheck("SpecCheck")
#addCheck("NamingPolicyCheck")
#addCheck("ZipCheck")

# Configuration options used by the checks for Fedora Core Development

setOption("Vendor", "Red Hat, Inc.")
setOption("Distribution", "Red Hat (FC-3)")
setOption("Packager", "Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>")
setOption("ValidBuildHost", "\.redhat\.com$")
setOption("UseBzip2", 0)
setOption("UseVersionInChangelog", 0)
setOption("ReleaseExtension", None)
setOption("UseIndexedJars", 0)
setOption("ValidGroups", (
    "Amusements/Games",
    "Amusements/Graphics",
    "Applications/Archiving",
    "Applications/CPAN",
    "Applications/Communications",
    "Applications/Databases",
    "Applications/Editors",
    "Applications/Emulators",
    "Applications/Engineering",
    "Applications/File",
    "Applications/Internet",
    "Applications/Multimedia",
    "Applications/Productivity",
    "Applications/Publishing",
    "Applications/System",
    "Applications/Text",
    "Desktop/Accessibility",
    "Development/Debuggers",
    "Development/Languages",
    "Development/Libraries",
    "Development/System",
    "Development/Tools",
    "Documentation",
    "System Environment/Base",
    "System Environment/Daemons",
    "System Environment/Kernel",
    "System Environment/Libraries",
    "System Environment/Shells",
    "User Interface/Desktops",
    "User Interface/X",
    "User Interface/X Hardware Support"
))

# filters for NamingPolicyCheck.py
# When python modules are found in packages named != python-*, so disable
addFilter(".* python-naming-policy-not-applied")
# When perl modulees are found in packages named != perl-*, so disable
addFilter(".* perl5-naming-policy-not-applied")

# filters for TagsCheck.py
addFilter("gcc(3.|4) devel-dependency glibc-devel")
addFilter("(compat-)?gcc.*-c\+\+ devel-dependency (compat-)?libstdc\+\+-devel")
addFilter("(compat-)?gcc-java devel-dependency (compat-)?libgcj-devel")
# No changelog is included in fedora-release
addFilter("fedora-release no-changelogname-tag")
# Tool for developing KDE applications
addFilter("kdevelop devel-dependency kdelibs-devel")
# Tool for developing python modules
addFilter("Pyrex devel-dependency python-devel")
# Tool for developing Qt applications
addFilter("qt-designer devel-dependency qt-devel")

# filters for BinariesCheck.py
# Why aren't these noarch?
addFilter("aspell-.. no-binary")
# Different dirs are included depending on the arch (e.g. /lib64)
addFilter("filesystem no-binary")
# Binaries are in libgal%{soname}
addFilter("gal no-binary")
# Specificities for x86_64 at least
addFilter("glibc-kernheaders no-binary")
# From the spec : WE ARE NOT NOARCH, /usr/lib/pkgconfig is not noarch.
addFilter("gnome-mime-data no-binary")
# The binary is in /boot, doesn't get detected properly by rpmlint it seems
addFilter("memtest86\+ no-binary")
# Binaries are in mew-common
addFilter("mew no-binary")
# Deps are different across archs (genromfs, slilo, syslinux)
addFilter("mkbootdisk no-binary")
# Binaries are in netdump-server
addFilter("netdump no-binary")
# Exclusive x86
addFilter("redhat-lsb no-binary")
# Package lists vary between archs
addFilter("rpmdb-fedora no-binary")
# Binaries are in -canna/-nocanna sub-packages
addFilter("nvi-m17n no-binary")
# Exclusive x86 package
addFilter("system-config-boot no-binary")
# Binaries are in wordtrans-kde
addFilter("wordtrans no-binary")

# filters for FilesCheck.py
# Many files are replaced with symlinks to files from the artwork package
addFilter(".* dangling-symlink .* /usr/share/desktop-menu-patches/")
addFilter(".* symlink-should-be-relative .* /usr/share/desktop-menu-patches/")
# KDE docs often link back to the main docs, or so it seems
addFilter(".* dangling-symlink .* /usr/share/doc/HTML/../common$")
addFilter(".* symlink-should-be-relative .* /usr/share/doc/HTML/../common$")
# Log has group utmp and logrotate is done from the main /etc/logrotate.conf
addFilter("initscripts non-root-group-log-file /var/log/wtmp utmp")
addFilter("initscripts log-files-without-logrotate /var/log/wtmp")
# Log belongs to mysql
addFilter("mysql-server non-root-.*-log-file /var/log/mysqld\.log mysql")

# filters for PostCheck.py
# Proper shell syntax : mkdir -p "${device%/*}"
addFilter("brltty percent-in-%post")
# Proper find syntax : $(find $i -maxdepth 0 -printf %F)
addFilter("cyrus-imapd percent-in-%post")
# Uses TMP=$(mktemp /tmp/fstab.XXXXXX)
addFilter("dev use-tmp-in-%post")
# Uses rel=${rel%.cat}
addFilter("docbook-style-dsssl percent-in-%post")
# HOME=/root is used, since fc-cache being run will use ~/fc.cache
addFilter("fontconfig use-of-home-in-%post")
# echo -e '%s/color="#20305a"/color="#444444"/g\nw'
addFilter("redhat-artwork percent-in-%post")
# `date +"%b %d %X"`
addFilter("scrollkeeper percent-in-%post")
# TMPFILE=$(mktemp /tmp/fonts.alias.XXXXXX)
addFilter("taipeifonts use-tmp-in-(%post|%postun)")
# Shell scriplet has C-style
addFilter("xorg-x11 spurious-bracket-in-%pre")
# Uses TmpFile=`/bin/mktemp /tmp/.zshrpmXXXXXX`
addFilter("zsh use-tmp-in-%postun")

# filters for DistributionCheck.py
# Bug in rpmlint : serial/8250/many/ports.h matches man?/*.?
addFilter("kernel(-smp)? manpage-not-gzipped /lib/modules/.*")
# This is the old value, not replaced everywhere yet
addFilter("invalid-distribution Red Hat Linux")

