diff --git a/Namcap/rules/elffiles.py b/Namcap/rules/elffiles.py index 98cdbc0..ae55d08 100644 --- a/Namcap/rules/elffiles.py +++ b/Namcap/rules/elffiles.py @@ -10,7 +10,7 @@ from Namcap.util import is_elf from Namcap.ruleclass import TarballRule # Valid directories for ELF files -valid_dirs = ["bin/", "sbin/", "usr/bin/", "usr/sbin/", "lib/", "usr/lib/", "usr/lib32/"] +valid_dirs = ["bin/", "sbin/", "usr/bin/", "usr/sbin/", "lib/", "lib64", "usr/lib/", "usr/lib32/", "usr/lib64/"] # Questionable directories for ELF files # (Suppresses some output spam.) questionable_dirs = ["opt/"] diff --git a/Namcap/rules/fhs.py b/Namcap/rules/fhs.py index 8e081fe..a92e8a5 100644 --- a/Namcap/rules/fhs.py +++ b/Namcap/rules/fhs.py @@ -19,6 +19,7 @@ class FHSRule(TarballRule): "usr/include/", "usr/lib/", "usr/lib32/", + "usr/lib64/", "usr/sbin/", "usr/share/", "usr/src/", @@ -111,6 +112,6 @@ class RubyPathsRule(TarballRule): def analyze(self, pkginfo, tar): for i in tar.getmembers(): - if i.name.startswith("usr/lib/ruby/site_ruby"): + if i.name.startswith("usr/lib64/ruby/site_ruby"): self.warnings.append(("site-ruby", ())) return diff --git a/Namcap/rules/pcdepends.py b/Namcap/rules/pcdepends.py index 1e43857..0e324e5 100644 --- a/Namcap/rules/pcdepends.py +++ b/Namcap/rules/pcdepends.py @@ -19,12 +19,12 @@ def scanpcfiles(tar, pclist): pkg_pc_files = [f for f in tar.getnames() if ".pc" in f] for f in pkg_pc_files: - if f.startswith("usr/lib/pkgconfig") or f.startswith("usr/share/pkgconfig"): - pcname = f.replace("usr/lib/pkgconfig/", "").replace("usr/share/pkgconfig/", "").replace(".pc", "") + if f.startswith("usr/lib64/pkgconfig") or f.startswith("usr/share/pkgconfig"): + pcname = f.replace("usr/lib64/pkgconfig/", "").replace("usr/share/pkgconfig/", "").replace(".pc", "") pkgconfig_command = "pkg-config" elif f.startswith("usr/lib32/pkgconfig"): pcname = f.replace("usr/lib32/pkgconfig/", "").replace(".pc", "") - pkgconfig_command = "i686-pc-linux-gnu-pkg-config" + pkgconfig_command = "i686-flarebird-linux-gnu-pkg-config" else: continue diff --git a/Namcap/rules/pydepends.py b/Namcap/rules/pydepends.py index d2bcd66..cd22474 100644 --- a/Namcap/rules/pydepends.py +++ b/Namcap/rules/pydepends.py @@ -35,7 +35,7 @@ def finddepends(pkgname, modules, gir_modules, gir_versions): for module in modules: # Check application-specific python modules if importlib.machinery.PathFinder.find_spec( - module.split(".")[0], ["/usr/lib/" + pkgname, "/usr/share/" + pkgname] + module.split(".")[0], ["/usr/lib64/" + pkgname, "/usr/share/" + pkgname] ): dependlist[pkgname].add(module) continue @@ -67,10 +67,10 @@ def finddepends(pkgname, modules, gir_modules, gir_versions): dependlist[pkg.name].add(k) foundlibs.add(k) - if j.startswith("usr/lib/girepository-1.0/"): + if j.startswith("usr/lib64/girepository-1.0/"): for module in gir_modules: gir_module = module.replace("gi.repository.", "") - if j.startswith("usr/lib/girepository-1.0/" + gir_module + "-" + gir_versions[gir_module]): + if j.startswith("usr/lib64/girepository-1.0/" + gir_module + "-" + gir_versions[gir_module]): gir_dependlist[pkg.name].add(module) gir_foundlibs.add(module) diff --git a/Namcap/rules/qmldepends.py b/Namcap/rules/qmldepends.py index 17d86a1..6761491 100644 --- a/Namcap/rules/qmldepends.py +++ b/Namcap/rules/qmldepends.py @@ -7,7 +7,7 @@ import Namcap.package from Namcap.ruleclass import TarballRule from Namcap.util import is_elf -qml_path = "usr/lib/qt6/qml/" +qml_path = "usr/lib64/qt/qml/" def finddepends(modules): @@ -60,7 +60,7 @@ class QmlDependencyRule(TarballRule): if entry.name.startswith(qml_path) and entry.name.endswith("/qmldir"): included_modules += [entry.name.replace(qml_path, "").replace("/qmldir", "").replace("/", ".")] continue - if not entry.name.endswith(".qml") and not any(entry.name.startswith(d) for d in ["usr/bin", "usr/lib"]): + if not entry.name.endswith(".qml") and not any(entry.name.startswith(d) for d in ["usr/bin", "usr/lib64"]): continue f = tar.extractfile(entry) if not entry.name.endswith(".qml") and not is_elf(f): diff --git a/Namcap/rules/rpath.py b/Namcap/rules/rpath.py index d58907a..f5552d1 100644 --- a/Namcap/rules/rpath.py +++ b/Namcap/rules/rpath.py @@ -7,7 +7,7 @@ from Namcap.ruleclass import TarballRule from elftools.elf.elffile import ELFFile from elftools.elf.dynamic import DynamicSection -allowed = ["/usr/lib", "/usr/lib32", "/lib", "$ORIGIN", "${ORIGIN}"] +allowed = ["/usr/lib64", "/usr/lib", "/usr/lib32", "/lib64", "/lib", "$ORIGIN", "${ORIGIN}"] allowed_toplevels = [s + "/" for s in allowed] warn = ["/usr/local/lib"] diff --git a/Namcap/rules/runpath.py b/Namcap/rules/runpath.py index 9fe1e97..dd1918d 100644 --- a/Namcap/rules/runpath.py +++ b/Namcap/rules/runpath.py @@ -7,7 +7,7 @@ from Namcap.ruleclass import TarballRule from elftools.elf.elffile import ELFFile from elftools.elf.dynamic import DynamicSection -allowed = ["/usr/lib", "/usr/lib32", "/lib", "$ORIGIN", "${ORIGIN}"] +allowed = ["/usr/lib64", "/usr/lib", "/usr/lib32", "/lib64", "/lib", "$ORIGIN", "${ORIGIN}"] allowed_toplevels = [s + "/" for s in allowed] warn = ["/usr/local/lib"] diff --git a/Namcap/rules/sodepends.py b/Namcap/rules/sodepends.py index 5ea1c82..a5eec10 100644 --- a/Namcap/rules/sodepends.py +++ b/Namcap/rules/sodepends.py @@ -37,7 +37,7 @@ def scanlibs(fileobj, filename, custom_libs, liblist, libdepends, libprovides): bitsize = elffile.elfclass architecture = {32: "i686", 64: "x86-64"}[bitsize] # DT_SONAME means it provides a library - if tag.entry.d_tag == "DT_SONAME" and os.path.dirname(filename) in ["usr/lib", "usr/lib32"]: + if tag.entry.d_tag == "DT_SONAME" and os.path.dirname(filename) in ["usr/lib", "usr/lib64", "usr/lib32"]: soname = re.sub(r"\.so.*", ".so", tag.soname) soversion = re.sub(r"^.*\.so\.", "", tag.soname) libprovides[soname + "=" + soversion + "-" + str(bitsize)].add(filename) diff --git a/Namcap/tests/package/test_anyelf.py b/Namcap/tests/package/test_anyelf.py index 62580ab..8c5fb98 100644 --- a/Namcap/tests/package/test_anyelf.py +++ b/Namcap/tests/package/test_anyelf.py @@ -62,7 +62,7 @@ build() { ar cru library.a main.o } package() { - install -m644 -D ${srcdir}/library.a ${pkgdir}/usr/lib/library.a + install -m644 -D ${srcdir}/library.a ${pkgdir}/usr/lib64/library.a } """ @@ -92,6 +92,6 @@ package() { f.write(self.pkgbuild_static) self.run_makepkg() pkg, r = self.run_rule_on_tarball(os.path.join(self.tmpdir, pkgfile), Namcap.rules.anyelf.package) - self.assertEqual(r.errors, [("elffile-in-any-package %s", "usr/lib/library.a")]) + self.assertEqual(r.errors, [("elffile-in-any-package %s", "usr/lib64/library.a")]) self.assertEqual(r.warnings, []) self.assertEqual(r.infos, []) diff --git a/Namcap/tests/package/test_libtool.py b/Namcap/tests/package/test_libtool.py index 2fe8719..69e359d 100644 --- a/Namcap/tests/package/test_libtool.py +++ b/Namcap/tests/package/test_libtool.py @@ -22,8 +22,8 @@ build() { true } package() { - mkdir -p "${pkgdir}/usr/lib" - touch "${pkgdir}/usr/lib/libsomething.la" + mkdir -p "${pkgdir}/usr/lib64" + touch "${pkgdir}/usr/lib64/libsomething.la" } """ @@ -34,5 +34,5 @@ package() { self.run_makepkg() pkg, r = self.run_rule_on_tarball(os.path.join(self.tmpdir, pkgfile), Namcap.rules.libtool.package) self.assertEqual(r.errors, []) - self.assertEqual(r.warnings, [("libtool-file-present %s", "usr/lib/libsomething.la")]) + self.assertEqual(r.warnings, [("libtool-file-present %s", "usr/lib64/libsomething.la")]) self.assertEqual(r.infos, []) diff --git a/Namcap/tests/package/test_missingbackups.py b/Namcap/tests/package/test_missingbackups.py index c204708..845aad4 100644 --- a/Namcap/tests/package/test_missingbackups.py +++ b/Namcap/tests/package/test_missingbackups.py @@ -23,8 +23,8 @@ build() { true } package() { - mkdir -p "${pkgdir}/usr/lib" - touch "${pkgdir}/usr/lib/libsomething" + mkdir -p "${pkgdir}/usr/lib64" + touch "${pkgdir}/usr/lib64/libsomething" } """ diff --git a/Namcap/tests/package/test_pathdepends.py b/Namcap/tests/package/test_pathdepends.py index 9e44163..eda95a0 100644 --- a/Namcap/tests/package/test_pathdepends.py +++ b/Namcap/tests/package/test_pathdepends.py @@ -27,8 +27,8 @@ package() { touch "${pkgdir}/usr/share/glib-2.0/schemas/org.test.gschema.xml" # glib2-needed-for-gio-modules - mkdir -p "${pkgdir}/usr/lib/gio/modules" - touch "${pkgdir}/usr/lib/gio/modules/something.so" + mkdir -p "${pkgdir}/usr/lib64/gio/modules" + touch "${pkgdir}/usr/lib64/gio/modules/something.so" # hicolor-icon-theme-needed-for-hicolor-dir mkdir -p "${pkgdir}/usr/share/icons/hicolor/64x64/apps" diff --git a/Namcap/tests/package/test_perllocal.py b/Namcap/tests/package/test_perllocal.py index af1f507..8eb2acd 100644 --- a/Namcap/tests/package/test_perllocal.py +++ b/Namcap/tests/package/test_perllocal.py @@ -22,8 +22,8 @@ build() { true } package() { - mkdir -p "${pkgdir}/usr/lib/perl/5.12/site-local/libmine" - touch "${pkgdir}/usr/lib/perl/5.12/site-local/libmine/perllocal.pod" + mkdir -p "${pkgdir}/usr/lib64/perl/5.12/site-local/libmine" + touch "${pkgdir}/usr/lib64/perl/5.12/site-local/libmine/perllocal.pod" } """ @@ -33,6 +33,6 @@ package() { f.write(self.pkgbuild) self.run_makepkg() pkg, r = self.run_rule_on_tarball(os.path.join(self.tmpdir, pkgfile), Namcap.rules.perllocal.package) - self.assertEqual(r.errors, [("perllocal-pod-present %s", "usr/lib/perl/5.12/site-local/libmine/perllocal.pod")]) + self.assertEqual(r.errors, [("perllocal-pod-present %s", "usr/lib64/perl/5.12/site-local/libmine/perllocal.pod")]) self.assertEqual(r.warnings, []) self.assertEqual(r.infos, []) diff --git a/Namcap/tests/package/test_permissions.py b/Namcap/tests/package/test_permissions.py index ab07e78..bc2f9c4 100644 --- a/Namcap/tests/package/test_permissions.py +++ b/Namcap/tests/package/test_permissions.py @@ -34,8 +34,8 @@ package() { install -d -m 744 ${pkgdir}/usr/share/broken - install -d -m 755 ${pkgdir}/usr/lib/libstatic.a - ln -s libstatic.a ${pkgdir}/usr/lib/libstaticlink.a + install -d -m 755 ${pkgdir}/usr/lib64/libstatic.a + ln -s libstatic.a ${pkgdir}/usr/lib64/libstaticlink.a } """ @@ -54,7 +54,7 @@ package() { ("file-not-world-readable %s", "usr/bin/secret"), ("file-setugid %s", "usr/bin/unsafe"), ("directory-not-world-executable %s", "usr/share/broken"), - ("incorrect-library-permissions %s", "usr/lib/libstatic.a"), + ("incorrect-library-permissions %s", "usr/lib64/libstatic.a"), ] ), ) diff --git a/Namcap/tests/package/test_sodepends.py b/Namcap/tests/package/test_sodepends.py index 92533a7..c703c24 100644 --- a/Namcap/tests/package/test_sodepends.py +++ b/Namcap/tests/package/test_sodepends.py @@ -44,7 +44,7 @@ package() { def test_sodepends(self): "Package with missing pacman dependency" pkgfile = "__namcap_test_sodepends-1.0-1-%(arch)s.pkg.tar" % {"arch": self.arch} - alpm_filename = os.path.join("usr/lib", get_soname("/usr/lib/libalpm.so")) + alpm_filename = os.path.join("usr/lib64", get_soname("/usr/lib64/libalpm.so")) with open(os.path.join(self.tmpdir, "PKGBUILD"), "w") as f: f.write(self.pkgbuild) self.run_makepkg() diff --git a/Namcap/tests/package/test_unusedsodepends.py b/Namcap/tests/package/test_unusedsodepends.py index c3a730f..3bc8f08 100644 --- a/Namcap/tests/package/test_unusedsodepends.py +++ b/Namcap/tests/package/test_unusedsodepends.py @@ -36,5 +36,5 @@ package() { self.run_makepkg() pkg, r = self.run_rule_on_tarball(os.path.join(self.tmpdir, pkgfile), Namcap.rules.unusedsodepends.package) self.assertEqual(r.errors, []) - self.assertEqual(r.warnings, [("unused-sodepend %s %s", ("/usr/lib/libm.so.6", "usr/bin/evilprogram"))]) + self.assertEqual(r.warnings, [("unused-sodepend %s %s", ("/usr/lib64/libm.so.6", "usr/bin/evilprogram"))]) self.assertEqual(r.infos, []) diff --git a/Namcap/tests/pkgbuild/test_carch.py b/Namcap/tests/pkgbuild/test_carch.py index 81be35e..27b1a38 100644 --- a/Namcap/tests/pkgbuild/test_carch.py +++ b/Namcap/tests/pkgbuild/test_carch.py @@ -41,7 +41,7 @@ package() { cd "${srcdir}"/${pkgname}-${pkgver} ./configure --prefix=/usr make DESTDIR="${pkgdir}" install - cp foobar /usr/lib/i686/pkg/ + cp foobar /usr/lib64/i686/pkg/ } """ diff --git a/namcap-tags b/namcap-tags index 806a8e5..4eeff47 100644 --- a/namcap-tags +++ b/namcap-tags @@ -91,7 +91,7 @@ qml-module-no-package-associated %s %s :: Referenced QML module '%s' is an unins redundant-makedep %s :: Make dependency (%s) already included as dependency script-link-detected %s in %s :: Script link detected (%s) in file %s scrollkeeper-dir-exists %s :: Scrollkeeper directory exists (%s). Remember to not run scrollkeeper till post_{install,upgrade,remove}. -site-ruby :: Found usr/lib/ruby/site_ruby in package, usr/lib/ruby/vendor_ruby should be used instead. +site-ruby :: Found usr/lib64/ruby/site_ruby in package, usr/lib64/ruby/vendor_ruby should be used instead. specific-host-type-used %s :: Reference to %s should be changed to $CARCH specific-sourceforge-mirror :: Attempting to use specific sourceforge mirror, use downloads.sourceforge.net instead symlink-found %s points to %s :: Symlink (%s) found that points to %s