From 985e347c7a0ba1192ef496b862339be9c1c442ba9fab8d976f4c70fbfc778c83 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 30 Sep 2017 07:51:17 +0000 Subject: [PATCH] - drop config.in: unused - switch to python 3.x OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=497 --- config | 376 ++++++++++++++++++------------------- config.in | 240 ----------------------- description-check.diff | 2 +- invalid-filerequires.diff | 2 +- libtool-wrapper-check.diff | 27 +-- rpmlint.changes | 2 + rpmlint.spec | 22 +-- 7 files changed, 209 insertions(+), 462 deletions(-) delete mode 100644 config.in diff --git a/config b/config index 08075e0..c13a60d 100644 --- a/config +++ b/config @@ -44,19 +44,19 @@ addCheck("TmpFilesCheck") addCheck("CheckSysVinitOnSystemd") # stuff autobuild takes care about -addFilter(".*invalid-version.*") -addFilter(".*invalid-packager.*") -addFilter(".*not-standard-release-extension.*") -#addFilter(".*non-standard-group.*") -addFilter(".*invalid-buildhost.*") -addFilter(".*executable-in-library-package.*") -addFilter(".*non-versioned-file-in-library-package.*") -addFilter(".*incoherent-version-in-name.*") -addFilter(".*invalid-vendor.*") -addFilter(".*invalid-distribution.*") -addFilter(".*hardcoded-path-in-buildroot-tag.*") -addFilter(".*no-buildroot-tag.*") -addFilter(".*cross-directory-hard-link.*") +addFilter('.*invalid-version.*') +addFilter('.*invalid-packager.*') +addFilter('.*not-standard-release-extension.*') +#addFilter('.*non-standard-group.*') +addFilter('.*invalid-buildhost.*') +addFilter('.*executable-in-library-package.*') +addFilter('.*non-versioned-file-in-library-package.*') +addFilter('.*incoherent-version-in-name.*') +addFilter('.*invalid-vendor.*') +addFilter('.*invalid-distribution.*') +addFilter('.*hardcoded-path-in-buildroot-tag.*') +addFilter('.*no-buildroot-tag.*') +addFilter('.*cross-directory-hard-link.*') # Configuration options used by the checks @@ -908,223 +908,223 @@ setOption("PAMModules.WhiteList", ( )) # Output filters -addFilter(".*spurious-bracket-in-.*") -addFilter(".*one-line-command-in-.*") -addFilter(" dir-or-file-in-opt ") # handled by CheckFilelist.py -addFilter(" dir-or-file-in-usr-local ") # handled by CheckFilelist.py -addFilter(" non-standard-dir-in-usr ") # handled by CheckFilelist.py -addFilter("incoherent-version-in-changelog") -addFilter(" no-signature") -addFilter(" symlink-crontab-file") #bnc591431 -addFilter(" without-chkconfig") -addFilter("unstripped-binary-or-object.*\.ko") -addFilter(" no-chkconfig") -addFilter(" subsys-not-used") -addFilter(" dangerous-command.*") -addFilter(" setuid-binary.*") -addFilter(".*FSSTND-dir-in-var /var/adm/.*") -addFilter("subdir-in-bin /sbin/conf.d/") -addFilter(".* nss_db non-standard-dir-in-var db") -addFilter("non-standard-dir-in-usr openwin") -addFilter("ibcs2 non-standard-dir-in-usr i486-sysv4") -addFilter("shlibs5 non-standard-dir-in-usr i486-linux-libc5") -addFilter("explicit-lib-dependency libtool") +addFilter(r'.*spurious-bracket-in-.*') +addFilter(r'.*one-line-command-in-.*') +addFilter(' dir-or-file-in-opt ') # handled by CheckFilelist.py +addFilter(' dir-or-file-in-usr-local ') # handled by CheckFilelist.py +addFilter(' non-standard-dir-in-usr ') # handled by CheckFilelist.py +addFilter('incoherent-version-in-changelog') +addFilter(' no-signature') +addFilter(' symlink-crontab-file') #bnc591431 +addFilter(' without-chkconfig') +addFilter(r'unstripped-binary-or-object.*\.ko') +addFilter(' no-chkconfig') +addFilter(' subsys-not-used') +addFilter(r' dangerous-command.*') +addFilter(r' setuid-binary.*') +addFilter(r'.*FSSTND-dir-in-var /var/adm/.*') +addFilter('subdir-in-bin /sbin/conf.d/') +addFilter(r'.* nss_db non-standard-dir-in-var db') +addFilter('non-standard-dir-in-usr openwin') +addFilter('ibcs2 non-standard-dir-in-usr i486-sysv4') +addFilter('shlibs5 non-standard-dir-in-usr i486-linux-libc5') +addFilter('explicit-lib-dependency libtool') # filesystem package needs special exceptions -addFilter("^filesystem\..*: dir-or-file-in-var-run") -addFilter("^filesystem\..*: dir-or-file-in-var-lock") -addFilter("^filesystem\..*: dir-or-file-in-var-tmp") -addFilter("^filesystem\..*: dir-or-file-in-var-run") -addFilter("^filesystem\..*: dir-or-file-in-var-lock") -addFilter("^filesystem\..*: dir-or-file-in-usr-tmp") -addFilter("^filesystem\..*: dir-or-file-in-tmp") -addFilter("^filesystem\..*: dir-or-file-in-mnt") -addFilter("^filesystem\..*: dir-or-file-in-home") -addFilter("^filesystem\..*: hidden-file-or-dir /root/.gnupg") -addFilter("^filesystem\..*: hidden-file-or-dir /root/.gnupg") -addFilter("^filesystem\..*: hidden-file-or-dir /etc/skel/.config") -addFilter("^filesystem\..*: hidden-file-or-dir /etc/skel/.local") -addFilter("^filesystem\..*: hidden-file-or-dir /tmp/.X11-unix") -addFilter("^filesystem\..*: hidden-file-or-dir /tmp/.ICE-unix") -addFilter("^filesystem\..*: hidden-file-or-dir /etc/skel/.fonts") -addFilter("^filesystem\..*: suse-filelist-forbidden-fhs23") -addFilter("^filesystem\..*: suse-filelist-forbidden-opt") -addFilter("^filesystem\..*: non-standard-uid /var/lib/nobody nobody") -addFilter("^filesystem\..*: missing-dependency-to-cron") +addFilter(r'^filesystem\..*: dir-or-file-in-var-run') +addFilter(r'^filesystem\..*: dir-or-file-in-var-lock') +addFilter(r'^filesystem\..*: dir-or-file-in-var-tmp') +addFilter(r'^filesystem\..*: dir-or-file-in-var-run') +addFilter(r'^filesystem\..*: dir-or-file-in-var-lock') +addFilter(r'^filesystem\..*: dir-or-file-in-usr-tmp') +addFilter(r'^filesystem\..*: dir-or-file-in-tmp') +addFilter(r'^filesystem\..*: dir-or-file-in-mnt') +addFilter(r'^filesystem\..*: dir-or-file-in-home') +addFilter(r'^filesystem\..*: hidden-file-or-dir /root/.gnupg') +addFilter(r'^filesystem\..*: hidden-file-or-dir /root/.gnupg') +addFilter(r'^filesystem\..*: hidden-file-or-dir /etc/skel/.config') +addFilter(r'^filesystem\..*: hidden-file-or-dir /etc/skel/.local') +addFilter(r'^filesystem\..*: hidden-file-or-dir /tmp/.X11-unix') +addFilter(r'^filesystem\..*: hidden-file-or-dir /tmp/.ICE-unix') +addFilter(r'^filesystem\..*: hidden-file-or-dir /etc/skel/.fonts') +addFilter(r'^filesystem\..*: suse-filelist-forbidden-fhs23') +addFilter(r'^filesystem\..*: suse-filelist-forbidden-opt') +addFilter(r'^filesystem\..*: non-standard-uid /var/lib/nobody nobody') +addFilter(r'^filesystem\..*: missing-dependency-to-cron') # has arch specific dirs in /usr -addFilter("^filesystem\..*: no-binary") +addFilter(r'^filesystem\..*: no-binary') # suppress any errors about internal packages -addFilter("^qa\S+: [EWI]:") -addFilter("^\S*(?:INTERNAL|internal)\.\S+: [EWI]:") +addFilter(r'^qa\S+: [EWI]:') +addFilter(r'^\S*(?:INTERNAL|internal)\.\S+: [EWI]:') # exceptions for devel-files -addFilter("devel-file-in-non-devel-package.*/boot/vmlinuz-.*autoconf.h") -addFilter("devel-file-in-non-devel-package.*/usr/src/linux-") -addFilter("devel-file-in-non-devel-package.*/usr/share/systemtap") -addFilter("kde4-kapptemplate\.\S+:.*devel-file-in-non-devel-package") -addFilter("kdesdk3\.\S+:.*devel-file-in-non-devel-package") -addFilter("-(?:examples|doc)\.\S+: \w: devel-file-in-non-devel-package") -addFilter("java\S+-demo\.\S+: \w: devel-file-in-non-devel-package") -addFilter('avr-libc\.\S+: \w: devel-file-in-non-devel-package') -addFilter('dietlibc\.\S+ \w: devel-file-in-non-devel-package') -addFilter('cross-.*devel-file-in-non-devel-package') -addFilter('cmake.*devel-file-in-non-devel-package') -addFilter('gcc\d\d.*devel-file-in-non-devel-package') -addFilter('OpenOffice_org-sdk\.\S+: \w: devel-file-in-non-devel-package') -addFilter('wnn-sdk\.\S+: \w: devel-file-in-non-devel-package') -addFilter('ocaml\.\S+: \w: devel-file-in-non-devel-package') -addFilter('xorg-x11-server-sdk\.\S+: \w: devel-file-in-non-devel-package') -addFilter('linux-kernel-headers\.\S+: \w: devel-file-in-non-devel-package') -addFilter(' devel-file-in-non-devel-package.*-config') -addFilter('libtool\.\S+: \w: devel-file-in-non-devel-package') +addFilter(r'devel-file-in-non-devel-package.*/boot/vmlinuz-.*autoconf.h') +addFilter(r'devel-file-in-non-devel-package.*/usr/src/linux-') +addFilter(r'devel-file-in-non-devel-package.*/usr/share/systemtap') +addFilter(r'kde4-kapptemplate\.\S+:.*devel-file-in-non-devel-package') +addFilter(r'kdesdk3\.\S+:.*devel-file-in-non-devel-package') +addFilter(r'-(?:examples|doc)\.\S+: \w: devel-file-in-non-devel-package') +addFilter(r'java\S+-demo\.\S+: \w: devel-file-in-non-devel-package') +addFilter(r'avr-libc\.\S+: \w: devel-file-in-non-devel-package') +addFilter(r'dietlibc\.\S+ \w: devel-file-in-non-devel-package') +addFilter(r'cross-.*devel-file-in-non-devel-package') +addFilter(r'cmake.*devel-file-in-non-devel-package') +addFilter(r'gcc\d\d.*devel-file-in-non-devel-package') +addFilter(r'OpenOffice_org-sdk\.\S+: \w: devel-file-in-non-devel-package') +addFilter(r'wnn-sdk\.\S+: \w: devel-file-in-non-devel-package') +addFilter(r'ocaml\.\S+: \w: devel-file-in-non-devel-package') +addFilter(r'xorg-x11-server-sdk\.\S+: \w: devel-file-in-non-devel-package') +addFilter(r'linux-kernel-headers\.\S+: \w: devel-file-in-non-devel-package') +addFilter(r' devel-file-in-non-devel-package.*-config') +addFilter(r'libtool\.\S+: \w: devel-file-in-non-devel-package') -addFilter('update-desktop-files\.\S+: \w: untranslated-desktop-file') -addFilter("sdb.* dangling-relative-symlink /usr/share/doc/sdb/.*/gifs ../gifs") -addFilter("kernel-modules-not-in-kernel-packages") +addFilter(r'update-desktop-files\.\S+: \w: untranslated-desktop-file') +addFilter(r'sdb.* dangling-relative-symlink /usr/share/doc/sdb/.*/gifs ../gifs') +addFilter('kernel-modules-not-in-kernel-packages') # SUSE kmp's don't need manual depmod (bnc#456048) -addFilter("module-without-depmod-postin") -addFilter("postin-with-wrong-depmod") -addFilter("module-without-depmod-postun") -addFilter("postun-with-wrong-depmod") +addFilter('module-without-depmod-postin') +addFilter('postin-with-wrong-depmod') +addFilter('module-without-depmod-postun') +addFilter('postun-with-wrong-depmod') # -addFilter("configure-without-libdir-spec") -addFilter("conffile-without-noreplace-flag /etc/init.d") -addFilter("use-of-RPM_SOURCE_DIR") -addFilter("use-tmp-in-") -addFilter("symlink-contains-up-and-down-segments /var/lib/named") -addFilter("no-ldconfig-symlink") -addFilter("aaa_base\.\S+: \w: use-of-home-in-%post") -addFilter("description-line-too-long") -addFilter("hardcoded-library-path") -# addFilter("incoherent-subsys") +addFilter('configure-without-libdir-spec') +addFilter('conffile-without-noreplace-flag /etc/init.d') +addFilter('use-of-RPM_SOURCE_DIR') +addFilter('use-tmp-in-') +addFilter('symlink-contains-up-and-down-segments /var/lib/named') +addFilter('no-ldconfig-symlink') +addFilter(r'aaa_base\.\S+: \w: use-of-home-in-%post') +addFilter('description-line-too-long') +addFilter('hardcoded-library-path') +# addFilter('incoherent-subsys') # doesn't seem to make sense -addFilter("invalid-ldconfig-symlink") -addFilter("invalid-soname") -addFilter("library-not-linked-against-libc") -addFilter("only-non-binary-in-usr-lib") -addFilter("outside-libdir-files") +addFilter('invalid-ldconfig-symlink') +addFilter('invalid-soname') +addFilter('library-not-linked-against-libc') +addFilter('only-non-binary-in-usr-lib') +addFilter('outside-libdir-files') # we want these files -addFilter(" perl-temp-file ") -addFilter(" hidden-file-or-dir .*/\.packlist") -addFilter(" hidden-file-or-dir .*/\.directory") -addFilter("perl-.*no-binary") -addFilter(" no-major-in-name ") +addFilter(' perl-temp-file ') +addFilter(r' hidden-file-or-dir .*/\.packlist') +addFilter(r' hidden-file-or-dir .*/\.directory') +addFilter(r'perl-.*no-binary') +addFilter(' no-major-in-name ') # we check for that already -addFilter("dangling-relative-symlink") -addFilter(" lib-package-without-%mklibname") -addFilter(" requires-on-release") -addFilter(" non-executable-script /etc/profile.d/") -addFilter(" non-executable-script /var/adm/fillup-templates/") -addFilter(" init-script-name-with-dot ") -addFilter('.* statically-linked-binary /sbin/ldconfig') -addFilter('.* statically-linked-binary /sbin/init') -addFilter('valgrind.* statically-linked-binary') -addFilter('ldconfig-post.*/ddiwrapper/wine/') -addFilter('glibc\.\S+: \w: statically-linked-binary /usr/sbin/glibc_post_upgrade') -addFilter(" symlink-should-be-relative ") -addFilter(" binary-or-shlib-defines-rpath .*ORIGIN") -addFilter("libzypp.*shlib-policy-name-error.*libzypp") -addFilter("libtool.*shlib-policy.*") +addFilter('dangling-relative-symlink') +addFilter(' lib-package-without-%mklibname') +addFilter(' requires-on-release') +addFilter(' non-executable-script /etc/profile.d/') +addFilter(' non-executable-script /var/adm/fillup-templates/') +addFilter(' init-script-name-with-dot ') +addFilter(r'.* statically-linked-binary /sbin/ldconfig') +addFilter(r'.* statically-linked-binary /sbin/init') +addFilter(r'valgrind.* statically-linked-binary') +addFilter(r'ldconfig-post.*/ddiwrapper/wine/') +addFilter(r'glibc\.\S+: \w: statically-linked-binary /usr/sbin/glibc_post_upgrade') +addFilter(' symlink-should-be-relative ') +addFilter(' binary-or-shlib-defines-rpath .*ORIGIN') +addFilter(r'libzypp.*shlib-policy-name-error.*libzypp') +addFilter(r'libtool.*shlib-policy.*') # stuff that is currently too noisy, but might become relevant in the future -addFilter(" prereq-use") -addFilter(" file-not-utf8") -addFilter(" tag-not-utf8") -addFilter(" setup-not-quiet") -addFilter(" no-cleaning-of-buildroot ") -addFilter(" mixed-use-of-spaces-and-tabs ") -addFilter(" prereq-use ") +addFilter(' prereq-use') +addFilter(' file-not-utf8') +addFilter(' tag-not-utf8') +addFilter(' setup-not-quiet') +addFilter(' no-cleaning-of-buildroot ') +addFilter(' mixed-use-of-spaces-and-tabs ') +addFilter(' prereq-use ') # an issue with OBS, works with autobuild -addFilter(" no-packager-tag") -addFilter(" unversioned-explicit-provides ") -addFilter(" unversioned-explicit-obsoletes ") -addFilter(" no-%clean-section") -addFilter(" service-default-enabled ") -addFilter(" non-standard-dir-perm ") -addFilter(" conffile-without-noreplace-flag ") -addFilter(" non-standard-executable-perm ") -addFilter(" jar-not-indexed ") -addFilter(" uncompressed-zip ") -addFilter(" %ifarch-applied-patch ") -addFilter(" read-error ") -addFilter(" init-script-without-chkconfig-postin ") -addFilter(" init-script-without-chkconfig-preun ") -addFilter(" postin-without-chkconfig ") -addFilter(" preun-without-chkconfig ") -addFilter(" no-dependency-on locales") -addFilter(" incoherent-version-in-name") -addFilter(" binary-or-shlib-defines-rpath") -addFilter(" executable-marked-as-config-file") -addFilter(" log-files-without-logrotate") -addFilter(" hardcoded-prefix-tag") -addFilter(" no-documentation") -addFilter(" multiple-specfiles") -addFilter(" apache2-naming-policy-not-applied") -addFilter(" no-default-runlevel ") -addFilter(" setgid-binary ") -addFilter(" non-readable ") -addFilter(" manpage-not-bzipped ") -addFilter(" postin-without-ghost-file-creation ") +addFilter(' no-packager-tag') +addFilter(' unversioned-explicit-provides ') +addFilter(' unversioned-explicit-obsoletes ') +addFilter(' no-%clean-section') +addFilter(' service-default-enabled ') +addFilter(' non-standard-dir-perm ') +addFilter(' conffile-without-noreplace-flag ') +addFilter(' non-standard-executable-perm ') +addFilter(' jar-not-indexed ') +addFilter(' uncompressed-zip ') +addFilter(' %ifarch-applied-patch ') +addFilter(' read-error ') +addFilter(' init-script-without-chkconfig-postin ') +addFilter(' init-script-without-chkconfig-preun ') +addFilter(' postin-without-chkconfig ') +addFilter(' preun-without-chkconfig ') +addFilter(' no-dependency-on locales') +addFilter(' incoherent-version-in-name') +addFilter(' binary-or-shlib-defines-rpath') +addFilter(' executable-marked-as-config-file') +addFilter(' log-files-without-logrotate') +addFilter(' hardcoded-prefix-tag') +addFilter(' no-documentation') +addFilter(' multiple-specfiles') +addFilter(' apache2-naming-policy-not-applied') +addFilter(' no-default-runlevel ') +addFilter(' setgid-binary ') +addFilter(' non-readable ') +addFilter(' manpage-not-bzipped ') +addFilter(' postin-without-ghost-file-creation ') # bug 287090 -addFilter(" file-in-usr-marked-as-conffile") -addFilter(" non-remote_fs-dependency.*/boot") +addFilter(' file-in-usr-marked-as-conffile') +addFilter(' non-remote_fs-dependency.*/boot') # exceptions for non-devel-buildrequires -addFilter(" non-devel-buildrequires apache2-mod_perl") -addFilter(" non-devel-buildrequires ksh") -addFilter(" non-devel-buildrequires perl") -addFilter(" non-devel-buildrequires php5") -addFilter(" non-devel-buildrequires postfix") -addFilter(" non-devel-buildrequires python") -addFilter(" non-devel-buildrequires ruby") -addFilter(" non-devel-buildrequires valgrind") -addFilter(" non-devel-buildrequires yasm") -addFilter(" non-devel-buildrequires tcl") +addFilter(' non-devel-buildrequires apache2-mod_perl') +addFilter(' non-devel-buildrequires ksh') +addFilter(' non-devel-buildrequires perl') +addFilter(' non-devel-buildrequires php5') +addFilter(' non-devel-buildrequires postfix') +addFilter(' non-devel-buildrequires python') +addFilter(' non-devel-buildrequires ruby') +addFilter(' non-devel-buildrequires valgrind') +addFilter(' non-devel-buildrequires yasm') +addFilter(' non-devel-buildrequires tcl') -addFilter("beagle-index\.\S+: \w: (non-devel|unnecessary)-buildrequires") -addFilter("collect-desktop-files\.\S+: \w: (non-devel|unnecessary)-buildrequires") -addFilter("installation-images\.\S+: \w: (non-devel|unnecessary)-buildrequires") +addFilter(r'beagle-index\.\S+: \w: (non-devel|unnecessary)-buildrequires') +addFilter(r'collect-desktop-files\.\S+: \w: (non-devel|unnecessary)-buildrequires') +addFilter(r'installation-images\.\S+: \w: (non-devel|unnecessary)-buildrequires') # exceptions for filelist checks -addFilter("nfs-client\.\S+: \w: suse-filelist-forbidden-backup-file /var/lib/nfs/sm.bak ") -addFilter("perl\.\S+: \w: suse-filelist-forbidden-perl-dir ") -addFilter("info\.\S+: \w: info-dir-file .*/usr/share/info/dir") +addFilter(r'nfs-client\.\S+: \w: suse-filelist-forbidden-backup-file /var/lib/nfs/sm.bak ') +addFilter(r'perl\.\S+: \w: suse-filelist-forbidden-perl-dir ') +addFilter(r'info\.\S+: \w: info-dir-file .*/usr/share/info/dir') # fillup is known to break SuSEfirewall's sysconfig file on many # systems as people tend to break up long lines into several ones. # This bug remains unfixed since years (bnc#340926). # So we have to avoid fillup and therefore break the SUSE policy -addFilter("SuSEfirewall2\.\S+: \w: suse-filelist-forbidden-sysconfig.*/etc/sysconfig/SuSEfirewall2") +addFilter(r'SuSEfirewall2\.\S+: \w: suse-filelist-forbidden-sysconfig.*/etc/sysconfig/SuSEfirewall2') # these packages are used for CD creation and are not supposed to be # installed. It's still a dirty hack to make an exception. The # packages should either be built in a separate project with # different config or file be put somewhere below /opt/suse/* -addFilter("(?:dosutils|skelcd|installation-images|yast2-slide-show|instlux|skelcd-.*|patterns-.*)\.\S+: \w: suse-filelist-forbidden-fhs23 /CD1") +addFilter(r'(?:dosutils|skelcd|installation-images|yast2-slide-show|instlux|skelcd-.*|patterns-.*)\.\S+: \w: suse-filelist-forbidden-fhs23 /CD1') # suboptimal library packaging -addFilter(" non-devel-buildrequires graphviz") -addFilter(" non-devel-buildrequires ImageMagick") -addFilter(" non-devel-buildrequires aspell") -addFilter(" non-devel-buildrequires autotrace") -addFilter(" non-devel-buildrequires gettext") -addFilter(" non-devel-buildrequires devhelp") -addFilter(" non-devel-buildrequires libxml2") -addFilter(" non-devel-buildrequires libxslt") -addFilter(" non-devel-buildrequires recode") +addFilter(' non-devel-buildrequires graphviz') +addFilter(' non-devel-buildrequires ImageMagick') +addFilter(' non-devel-buildrequires aspell') +addFilter(' non-devel-buildrequires autotrace') +addFilter(' non-devel-buildrequires gettext') +addFilter(' non-devel-buildrequires devhelp') +addFilter(' non-devel-buildrequires libxml2') +addFilter(' non-devel-buildrequires libxslt') +addFilter(' non-devel-buildrequires recode') # many places have shorter paths -addFilter(" non-coherent-filename ") +addFilter(' non-coherent-filename ') # mandriva specific stuff that we don't want -addFilter(" invalid-build-requires ") -addFilter(" no-provides ") +addFilter(' invalid-build-requires ') +addFilter(' no-provides ') # bash completion files are not scripts, do not require them marked as %config -addFilter("W: non-conffile-in-etc /etc/bash_completion.d/") +addFilter('W: non-conffile-in-etc /etc/bash_completion.d/') # config ends here diff --git a/config.in b/config.in deleted file mode 100644 index 90c468a..0000000 --- a/config.in +++ /dev/null @@ -1,240 +0,0 @@ -# -*- python -*- -# Configuration for the rpmlint utility. -# Loaded before ~/.rpmlintrc -# $Id: config,v 1.39 2003/12/22 11:20:55 flepied Exp $ - -# This line is mandatory to access the configuration functions -from Config import * - -# Additionale path to look for checks - -#addCheckDir("~/mandrake/rpmlint") - -# Configure the checks if you don't want the default ones - -allChecks() - -addCheck("CheckBuildRoot") -addCheck("CheckExecDocs") -addCheck("CheckPkgConfig") -addCheck("CheckCommonFiles") -addCheck("CheckInitScripts") -addCheck("DuplicatesCheck") -addCheck("LibraryPolicyCheck") -addCheck("CheckIconSizes") -#addCheck("CheckStaticLibraries") -addCheck("BrandingPolicyCheck") -addCheck("CheckSUIDPermissions") -# polkit-default-privs would need to be installed always -#addCheck("CheckPolkitPrivs") -addCheck("CheckDBUSServices") -addCheck("CheckDBusPolicy") -addCheck("CheckFilelist") - -# stuff autobuild takes care about -addFilter(".*invalid-version.*") -addFilter(".*invalid-packager.*") -addFilter(".*not-standard-release-extension.*") -#addFilter(".*non-standard-group.*") -addFilter(".*invalid-buildhost.*") -addFilter(".*executable-in-library-package.*") -addFilter(".*non-versioned-file-in-library-package.*") -addFilter(".*incoherent-version-in-name.*") -addFilter(".*invalid-vendor.*") -addFilter(".*invalid-distribution.*") - -# Configuration options used by the checks - -#setOption("Vendor", "MySelf") -#setOption("Distribution", "MyDistrib") -setOption("UseBzip2", 0) -setOption("UseUTF8", 1) -#setOption("ReleaseExtension", None) -#setOption("ValidGroups", ("Group1", "Group2")) -#setOption("KernelModuleRPMsOK", 0) - -@STDGROUPS@ -@STDUSERS@ - -setOption('DanglingSymlinkExceptions', - (['/usr/share/doc/licenses/', 'licenses'], - ['consolehelper$', 'usermode-consoleonly'], -)) - -# Output filters -addFilter(".*spurious-bracket-in-.*") -addFilter(".*one-line-command-in-.*") -addFilter(" dir-or-file-in-opt") -addFilter("incoherent-version-in-changelog") -addFilter(" no-signature") -addFilter(" without-chkconfig") -addFilter("unstripped-binary-or-object.*\.ko") -addFilter(" no-chkconfig") -addFilter(" subsys-not-used") -addFilter(" dangerous-command.*") -addFilter(" setuid-binary.*") -addFilter(".*FSSTND-dir-in-var /var/adm/.*") -addFilter("no-url-tag") -addFilter("subdir-in-bin /sbin/conf.d/") -addFilter(" invalid-license") -addFilter(".* nss_db non-standard-dir-in-var db") -addFilter("non-standard-dir-in-usr openwin") -addFilter("ibcs2 non-standard-dir-in-usr i486-sysv4") -addFilter("shlibs5 non-standard-dir-in-usr i486-linux-libc5") -addFilter("filesystem dir-or-file") -addFilter("filesystem hidden-") -addFilter("explicit-lib-dependency libtool") - - -# suppress any errors about internal packages -addFilter("^qa\S+: [EWI]:") -addFilter("^\S*(?:INTERNAL|internal)\.\S+: [EWI]:") - - -# exceptions for devel-files -addFilter("devel-file-in-non-devel-package.*/boot/vmlinuz-.*autoconf.h") -addFilter("devel-file-in-non-devel-package.*/usr/src/linux-") -addFilter("devel-file-in-non-devel-package.*/usr/share/systemtap") -addFilter("kde4-kapptemplate\.\S+:.*devel-file-in-non-devel-package") -addFilter("kdesdk3\.\S+:.*devel-file-in-non-devel-package") -addFilter("-(?:examples|doc)\.\S+: \w: devel-file-in-non-devel-package") -addFilter("java\S+-demo\.\S+: \w: devel-file-in-non-devel-package") -addFilter('avr-libc\.\S+: \w: devel-file-in-non-devel-package') -addFilter('dietlibc\.\S+ \w: devel-file-in-non-devel-package') -addFilter('cross-.*devel-file-in-non-devel-package') -addFilter('cmake.*devel-file-in-non-devel-package') -addFilter('gcc\d\d.*devel-file-in-non-devel-package') -addFilter('OpenOffice_org-sdk\.\S+: \w: devel-file-in-non-devel-package') -addFilter('wnn-sdk\.\S+: \w: devel-file-in-non-devel-package') -addFilter('ocaml\.\S+: \w: devel-file-in-non-devel-package') -addFilter('xorg-x11-server-sdk\.\S+: \w: devel-file-in-non-devel-package') -addFilter('linux-kernel-headers\.\S+: \w: devel-file-in-non-devel-package') -addFilter(' devel-file-in-non-devel-package.*-config') -addFilter('libtool\.\S+: \w: devel-file-in-non-devel-package') - -addFilter('update-desktop-files\.\S+: \w: untranslated-desktop-file') -addFilter("sdb.* dangling-relative-symlink /usr/share/doc/sdb/.*/gifs ../gifs") -addFilter("kernel-modules-not-in-kernel-packages") -# SUSE kmp's don't need manual depmod (bnc#456048) -addFilter("module-without-depmod-postin") -addFilter("postin-with-wrong-depmod") -addFilter("module-without-depmod-postun") -addFilter("postun-with-wrong-depmod") -# -addFilter("configure-without-libdir-spec") -addFilter("conffile-without-noreplace-flag /etc/init.d") -addFilter("use-of-RPM_SOURCE_DIR") -addFilter(" info info-dir-file /usr/share/info/dir") -addFilter("use-tmp-in-") -addFilter("symlink-contains-up-and-down-segments /var/lib/named") -addFilter("no-ldconfig-symlink") -addFilter("aaa_base\.\S+: \w: use-of-home-in-%post") -addFilter("description-line-too-long") -addFilter("hardcoded-library-path") -# addFilter("incoherent-subsys") -# doesn't seem to make sense -addFilter("invalid-ldconfig-symlink") -addFilter("invalid-soname") -addFilter("library-not-linked-against-libc") -addFilter("only-non-binary-in-usr-lib") -addFilter("outside-libdir-files") -# we want these files -addFilter(" perl-temp-file ") -addFilter(" hidden-file-or-dir .*/\.packlist") -addFilter(" hidden-file-or-dir .*/\.directory") -addFilter("perl-.*no-binary") -addFilter(" no-major-in-name ") -# we check for that already -addFilter("dangling-relative-symlink") -addFilter(" lib-package-without-%mklibname") -addFilter(" requires-on-release") -addFilter(" non-executable-script /etc/profile.d/") -addFilter(" non-executable-script /var/adm/fillup-templates/") -addFilter(" init-script-name-with-dot ") -addFilter('.* statically-linked-binary /sbin/ldconfig') -addFilter('.* statically-linked-binary /sbin/init') -addFilter('ldconfig-post.*/ddiwrapper/wine/') -addFilter('glibc\.\S+: \w: statically-linked-binary /usr/sbin/glibc_post_upgrade') -addFilter(" symlink-should-be-relative ") -addFilter(" binary-or-shlib-defines-rpath .*ORIGIN") -addFilter("libzypp.*shlib-policy-name-error.*libzypp") - -# stuff that is currently too noisy, but might become relevant in the future -addFilter(" file-not-utf8") -addFilter(" tag-not-utf8") -addFilter(" setup-not-quiet") -addFilter(" no-cleaning-of-buildroot ") -addFilter(" mixed-use-of-spaces-and-tabs ") -addFilter(" prereq-use ") -addFilter(" unversioned-explicit-provides ") -addFilter(" unversioned-explicit-obsoletes ") -addFilter(" no-%clean-section") -addFilter(" service-default-enabled ") -addFilter(" non-standard-dir-perm ") -addFilter(" conffile-without-noreplace-flag ") -addFilter(" non-standard-executable-perm ") -addFilter(" jar-not-indexed ") -addFilter(" non-conffile-in-etc ") -addFilter(" uncompressed-zip ") -addFilter(" %ifarch-applied-patch ") -addFilter(" read-error ") -addFilter(" init-script-without-chkconfig-postin ") -addFilter(" init-script-without-chkconfig-preun ") -addFilter(" postin-without-chkconfig ") -addFilter(" preun-without-chkconfig ") -addFilter(" no-dependency-on locales") -addFilter(" incoherent-version-in-name") -addFilter(" binary-or-shlib-defines-rpath") -addFilter(" executable-marked-as-config-file") -addFilter(" log-files-without-logrotate") -addFilter(" hardcoded-prefix-tag") -addFilter(" no-documentation") -addFilter(" multiple-specfiles") -addFilter(" apache2-naming-policy-not-applied") -addFilter(" no-default-runlevel ") -addFilter(" setgid-binary ") -addFilter(" non-standard-gid ") -addFilter(" non-readable ") -addFilter(" manpage-not-bzipped ") -addFilter(" postin-without-ghost-file-creation ") -# bug 287090 -addFilter(" file-in-usr-marked-as-conffile") -addFilter(" non-remote_fs-dependency.*/boot") - -# exceptions for non-devel-buildrequires -addFilter(" non-devel-buildrequires apache2-mod_perl") -addFilter(" non-devel-buildrequires ksh") -addFilter(" non-devel-buildrequires perl") -addFilter(" non-devel-buildrequires php5") -addFilter(" non-devel-buildrequires postfix") -addFilter(" non-devel-buildrequires python") -addFilter(" non-devel-buildrequires ruby") -addFilter(" non-devel-buildrequires valgrind") -addFilter(" non-devel-buildrequires yasm") -addFilter(" non-devel-buildrequires tcl") - -addFilter("beagle-index\.\S+: \w: (non-devel|unnecessary)-buildrequires") -addFilter("collect-desktop-files\.\S+: \w: (non-devel|unnecessary)-buildrequires") -addFilter("installation-images\.\S+: \w: (non-devel|unnecessary)-buildrequires") - -# suboptimal library packaging -addFilter(" non-devel-buildrequires graphviz") -addFilter(" non-devel-buildrequires ImageMagick") -addFilter(" non-devel-buildrequires aspell") -addFilter(" non-devel-buildrequires autotrace") -addFilter(" non-devel-buildrequires gettext") -addFilter(" non-devel-buildrequires devhelp") -addFilter(" non-devel-buildrequires libxml2") -addFilter(" non-devel-buildrequires libxslt") -addFilter(" non-devel-buildrequires recode") - - -# many places have shorter paths -addFilter(" non-coherent-filename ") - -# mandriva specific stuff that we don't want -addFilter(" invalid-build-requires ") -addFilter(" no-provides ") - -# config ends here - diff --git a/description-check.diff b/description-check.diff index 3e51b92..1c1df4e 100644 --- a/description-check.diff +++ b/description-check.diff @@ -16,7 +16,7 @@ Index: rpmlint-rpmlint-1.10/TagsCheck.py for lang in langs: self.check_description(pkg, lang, ignored_words) + -+ if len(Pkg.b2s(pkg[rpm.RPMTAG_DESCRIPTION]).partition('Authors:')[0])-4 < len(pkg[rpm.RPMTAG_SUMMARY]): ++ if len(Pkg.b2s(pkg[rpm.RPMTAG_DESCRIPTION]).partition('Authors:')[0]) - 4 < len(pkg[rpm.RPMTAG_SUMMARY]): + printWarning(pkg, 'description-shorter-than-summary') else: printError(pkg, 'no-description-tag') diff --git a/invalid-filerequires.diff b/invalid-filerequires.diff index e3ac63b..4707c2d 100644 --- a/invalid-filerequires.diff +++ b/invalid-filerequires.diff @@ -15,7 +15,7 @@ Index: rpmlint-rpmlint-1.10/TagsCheck.py # () are here for grouping purpose in the regexp forbidden_words_regex = re.compile(r'(%s)' % Config.getOption('ForbiddenWords'), re.IGNORECASE) valid_buildhost_regex = re.compile(Config.getOption('ValidBuildHost')) -+valid_filedep_regex=re.compile('(?:/s?bin/|^/etc/|^/usr/lib/sendmail$)') ++valid_filedep_regex = re.compile('(?:/s?bin/|^/etc/|^/usr/lib/sendmail$)') use_epoch = Config.getOption('UseEpoch', False) use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT) max_line_len = Config.getOption('MaxLineLength', 79) diff --git a/libtool-wrapper-check.diff b/libtool-wrapper-check.diff index e0141b0..0c4fe5a 100644 --- a/libtool-wrapper-check.diff +++ b/libtool-wrapper-check.diff @@ -1,17 +1,6 @@ -From: Some One -Date: Thu, 9 Apr 2015 14:55:39 +0200 -Subject: [PATCH] libtool-wrapper-check.diff - -=================================================================== ---- - BinariesCheck.py | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -Index: rpmlint-rpmlint-1.10/BinariesCheck.py -=================================================================== --- rpmlint-rpmlint-1.10.orig/BinariesCheck.py +++ rpmlint-rpmlint-1.10/BinariesCheck.py -@@ -367,8 +367,19 @@ class BinariesCheck(AbstractCheck.Abstra +@@ -367,8 +367,15 @@ class BinariesCheck(AbstractCheck.Abstra is_ar = 'current ar archive' in pkgfile.magic is_ocaml_native = 'Objective caml native' in pkgfile.magic is_lua_bytecode = 'Lua bytecode' in pkgfile.magic @@ -19,26 +8,22 @@ Index: rpmlint-rpmlint-1.10/BinariesCheck.py is_binary = is_elf or is_ar or is_ocaml_native or is_lua_bytecode + if is_shell: -+ count= 0 -+ for l in open(pkgfile.path, 'rb'): -+ count = count + 1 -+ if (l.find(b'This wrapper script should never be moved out of the build directory') != -1): ++ with open(pkgfile.path, 'rb') as inputf: ++ if (b'This wrapper script should never ' ++ b'be moved out of the build directory' in inputf.read(2048)): + printError(pkg, 'libtool-wrapper-in-package', fname) -+ break -+ if (count > 20): -+ break; + if not is_binary: if reference_regex.search(fname): lines = pkg.grep(invalid_dir_ref_regex, fname) -@@ -637,6 +648,15 @@ to list code compiled without -fPIC. +@@ -637,6 +644,15 @@ to list code compiled without -fPIC. Another common mistake that causes this problem is linking with ``gcc -Wl,-shared'' instead of ``gcc -shared''.''', +'libtool-wrapper-in-package', +'''Your package contains a libtool wrapper shell script. This +will not work. Instead of install'ing the libtool wrapper file, -+runĀ· ++run + +libtool --mode=install install -m perm + diff --git a/rpmlint.changes b/rpmlint.changes index 752b5c9..5cb0d0d 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -82,6 +82,8 @@ Thu Sep 28 10:40:08 UTC 2017 - dmueller@suse.com 0003-Tighten-lib_regex-to-avoid-false-positive-in-python-.patch, 0001-Execute-chroot-tests-also-on-x86-rpms.patch, ignore-readelf-ar-error.diff +- drop config.in: unused +- switch to python 3.x ------------------------------------------------------------------- Thu Sep 28 09:37:04 UTC 2017 - dmueller@suse.com diff --git a/rpmlint.spec b/rpmlint.spec index e72913b..12461a3 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -20,10 +20,9 @@ Name: rpmlint BuildRequires: obs-service-format_spec_file -BuildRequires: python-pytest BuildRequires: python3-flake8 +BuildRequires: python3-pytest BuildRequires: python3-rpm -BuildRequires: rpm-python BuildRequires: xz Summary: Rpm correctness checker License: GPL-2.0+ @@ -33,7 +32,6 @@ Release: 0 Source0: https://github.com/rpm-software-management/rpmlint/archive/rpmlint-%{version}.tar.gz Source1: rpmlint-checks-master.tar.xz Source2: config -Source3: config.in Source11: pie.config Source12: licenses.config Source99: README.packaging.txt @@ -47,10 +45,9 @@ Requires: dash Requires: desktop-file-utils Requires: file Requires: findutils -Requires: python-magic -Requires: python-pybeam -Requires: python-xml -Requires: rpm-python +Requires: python3-magic +Requires: python3-pybeam +Requires: python3-rpm Patch00: rpmlint-suse.diff Patch01: suse-checks.diff Patch02: suse-version.diff @@ -117,16 +114,19 @@ chmod 0755 rpmlint-checks-master/*.py mv rpmlint-checks-master/*.py . %build -make %{?_smp_mflags} +make %{?_smp_mflags} PYTHON=/usr/bin/python3 %install -make install DESTDIR=$RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT PYTHON=/usr/bin/python3 # the provided bash-completion does not work and only prints bash errors rm -rf $RPM_BUILD_ROOT/etc/bash_completion.d mv $RPM_BUILD_ROOT/etc/rpmlint/config $RPM_BUILD_ROOT/usr/share/rpmlint/config head -n 8 $RPM_BUILD_ROOT/usr/share/rpmlint/config > $RPM_BUILD_ROOT/etc/rpmlint/config # make sure that the package is sane -python -tt %{SOURCE100} $RPM_BUILD_ROOT/usr/share/rpmlint/*.py $RPM_BUILD_ROOT/usr/share/rpmlint/config +for f in $RPM_BUILD_ROOT/usr/share/rpmlint/*.py $RPM_BUILD_ROOT/usr/share/rpmlint/config; do + echo $f + env LC_ALL=C.utf8 python3 -tt %{SOURCE100} $f +done %__install -m 644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/rpmlint/ cp %{SOURCE12} licenses.config @@ -137,7 +137,7 @@ done %__install -m 644 licenses.config %{buildroot}/%{_sysconfdir}/rpmlint/ %check -sh ./test.sh +env PYTHON=/usr/bin/python3 ./test.sh %files %defattr(-,root,root,0755)