.so
depends should only be added in package functions because they're only valid after makepkg has added a version bound to them.
At the top level, depends
and makedepends
are used by makepkg --syncdeps
, which cannot fill in version bounds and as a result can install the wrong packages.
Without the version bound, a dependency on libjack.so
can be fulfilled by libjack.so=0-64
provided by jack2
and libjack.so=0-32
provided by lib32-jack2
.
I'm hitting the same issue here.
Thinking about the solution, the #!python
shebang should work, as proven by reflector
. However, considering namcap is only provided as an Arch package, using a simple #!/usr/bin/python
should not be a problem.
As per https://wiki.archlinux.org/title/PKGBUILD#source, it says .install files are recognized automatically by makepkg and should not be included in the source array.
Currently, this is not checked.
As per https://wiki.archlinux.org/title/PKGBUILD#provides, it says Do not add pkgname to the provides array, as it is done automatically.
. Currently, this is possible.
As per https://wiki.archlinux.org/title/PKGBUILD#Dependencies, packages also part of base-devel
should not be part of makedepends
or checkdepends
.
Install the invalid.py "binary" so it is checked by namcap.
Caleb Maclennan (fae71be2) at 13 Mar 21:12
fix(tests): install invalid python test program
sphinx-build by default leaves unreproducible pickle files and other a cache files which should not be packaged.
Caleb Maclennan (7cb57186) at 13 Mar 21:09
feat(rules): introduce unreproducible sphinx cache file rule
sphinx-build by default leaves unreproducible pickle files and other a cache files which should not be packaged.
A lot of our repository packages which have no top level pkgdesc
but have split packages which have a `pkgdesc` like zsh give a false positive error
virt-manager/namcap.log:PKGBUILD (virt-manager) E: Missing description in PKGBUILD
virtualbox/namcap.log:PKGBUILD (virtualbox) E: Missing description in PKGBUILD
vulkan-docs/namcap.log:PKGBUILD (vulkan-html-docs) E: Missing description in PKGBUILD
A lot of our repository packages which have no top level pkgdesc
but have split packages which have a `pkgdesc` like zsh give a false positive error
virt-manager/namcap.log:PKGBUILD (virt-manager) E: Missing description in PKGBUILD
virtualbox/namcap.log:PKGBUILD (virtualbox) E: Missing description in PKGBUILD
vulkan-docs/namcap.log:PKGBUILD (vulkan-html-docs) E: Missing description in PKGBUILD
For PKGBUILD's with split packages the pkgbase does not have to be a "valid" package or contain a pkgdesc.
Fixes #77
Caleb Maclennan (d114edfe) at 13 Mar 20:55
fix(rules): make missing pkgdesc rule split package aware
Install the invalid.py "binary" so it is checked by namcap.
For PKGBUILD's with split packages the pkgbase does not have to be a "valid" package or contain a pkgdesc.
Fixes #77
What happens if there is a space after the hash-bang: #! /usr/bin/env
?
[jelle@natrium][/mnt/arch/mirror/core/os/x86_64]%namcap /mnt/arch/mirror/core/os/x86_64/libcurl-compat-8.6.0-3-x86_64.pkg.tar.zst
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/lib/python3.11/site-packages/namcap.py", line 253, in <module>
process_realpackage(package, active_modules)
File "/usr/lib/python3.11/site-packages/namcap.py", line 95, in process_realpackage
rule.analyze(pkginfo, pkgtar)
File "/usr/lib/python3.11/site-packages/Namcap/rules/licensepkg.py", line 301, in analyze
list(Path(license_dir_symlink.lstrip("usr/share/licenses/")).parts)[0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range