[arch-projects] [namcap] [PATCH v2] Warn on unquoted pkgdir and srcdir

2020-09-20 Thread Michael Straube via arch-projects
Unqouted $pkgdir and $srcdir can lead to errors if the directory name contains spaces. Not quoting these variables is a common mistake. For example, it is often seen in PKGBUILDs that are submitted for review. Add a rule that warns on unquoted $pkgdir and $srcdir. Signed-off-by: Michael Straube

[arch-projects] [namcap] [PATCH] Revert "makedepends: Replace bzr with breezy"

2020-09-20 Thread Michael Straube via arch-projects
As Allan pointed out the change bzr -> breezy was in Arch, but not everywhere else pacman is used. Also breezy provides bzr, so it still works as it was. Signed-off-by: Michael Straube --- https://lists.archlinux.org/pipermail/pacman-dev/2020-July/024474.html Namcap/rules/makedepends.py

[arch-projects] [namcap] [PATCH] Don't report missing-vcs-makedeps when it is in depends

2020-04-11 Thread Michael Straube via arch-projects
Currently a PKGBUILD warning is shown when the package depends on git instead of makedepends on it. Since we also have the redundant_makedepends rule we should not write it again in makedepends. This patch checkes depends array too so this warning could be suppressed. ---

[arch-projects] [namcap] [PATCH] Warn on unquoted pkgdir and srcdir

2020-04-07 Thread Michael Straube via arch-projects
Unqouted $pkgdir and $srcdir can lead to errors if the directory name contains spaces. Not quoting these variables is a common mistake. For example, it is often seen in PKGBUILDs that are submitted for review. Add a rule that warns on unquoted $pkgdir and $srcdir. Signed-off-by: Michael Straube

[arch-projects] [namcap] [PATCH] makedepends: Replace bzr with breezy

2020-02-09 Thread Michael Straube via arch-projects
The 'bzr' package was replaced with 'breezy' in the repos. Update the VCS makedepends rule to report the correct package. Signed-off-by: Michael Straube --- Namcap/rules/makedepends.py | 2 +- Namcap/tests/pkgbuild/test_makedepends.py | 2 +- 2 files changed, 2 insertions(+), 2

[arch-projects] [PATCH] [namcap] Fix makedepends.py for PKGBUILD without source array

2020-01-20 Thread Michael Straube via arch-projects
Namcap errors when a PKGBUILD has no source array. Test if the PKGBUILD has a source array in the VCSMakedepends rule to avoid such errors. Fixes FS#65042 Signed-off-by: Michael Straube --- Namcap/rules/makedepends.py | 3 +++ 1 file changed, 3 insertions(+) diff --git

[arch-projects] [namcap] FS#34300 False positive on Mach-O universal binary

2018-12-03 Thread Michael Straube via arch-projects
Hi, namcap does not distinguish java class files from Mach-O files since both use the same byte magic CAFEBABE. See FS#34300 Implementing this would only need a test if the value of the byte at offset 7 is greater than 0x30. See: https://github.com/file/file/blob/master/magic/Magdir/cafebabe I

Re: [arch-projects] [namcap] [PATCH] namcap-tags: Add back missing dependency reason tags (FS#56898)

2018-12-03 Thread Michael Straube via arch-projects
Am 02.12.18 um 20:34 schrieb Eli Schwartz via arch-projects: On 12/2/18 1:33 PM, Michael Straube via arch-projects wrote: There are two missing tags that are needed in rules added (back) in commit e385ac93a354 (Restore and refactor accidentally removed tests). Add back the missing tags. Signed

[arch-projects] [namcap] [PATCH] namcap-tags: Add back missing dependency reason tags (FS#56898)

2018-12-02 Thread Michael Straube via arch-projects
There are two missing tags that are needed in rules added (back) in commit e385ac93a354 (Restore and refactor accidentally removed tests). Add back the missing tags. Signed-off-by: Michael Straube --- namcap-tags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/namcap-tags b/namcap-tags

[arch-projects] [namcap] [PATCH v3] makedepends: Make VCS matching more robust

2018-12-02 Thread Michael Straube via arch-projects
If a VCS source is renamed using the "::" syntax the makedepends are not detected. If there are files starting with in the source array false positives are produced. See the gitlab package for example. Make the matching more robust to avoid such issues. Signed-off-by: Michael Straube --- v1 ->

[arch-projects] [namcap] [PATCH v2] makedepends: Make VCS matching more robust

2018-12-02 Thread Michael Straube via arch-projects
If a VCS source is renamed using the "::" syntax the makedepends are not detected. If there are files starting with in the source array false positives are produced. See the gitlab package for example. Make the matching more robust to avoid such issues. Signed-off-by: Michael Straube --- v1 ->

Re: [arch-projects] [namcap] [PATCH] makedepends: Make VCS matching more robust

2018-12-02 Thread Michael Straube via arch-projects
Am 02.12.18 um 06:04 schrieb Eli Schwartz via arch-projects: On 12/1/18 9:54 AM, Michael Straube via arch-projects wrote: If a VCS source is renamed using the "::" syntax the makedepends are not detected. If there are files starting with in the source array false positives are pro

[arch-projects] [namcap] [PATCH] makedepends: Make VCS matching more robust

2018-12-01 Thread Michael Straube via arch-projects
If a VCS source is renamed using the "::" syntax the makedepends are not detected. If there are files starting with in the source array false positives are produced. See the gitlab package for example. Make the matching more robust to avoid such issues. Signed-off-by: Michael Straube ---

[arch-projects] [namcap] [PATCH v2 2/3] Add test for the makedepends rule

2018-11-25 Thread Michael Straube via arch-projects
Signed-off-by: Michael Straube --- Namcap/tests/pkgbuild/test_makedepends.py | 65 +++ 1 file changed, 65 insertions(+) create mode 100644 Namcap/tests/pkgbuild/test_makedepends.py diff --git a/Namcap/tests/pkgbuild/test_makedepends.py

[arch-projects] [namcap] [PATCH v2 1/3] Warn about makedepends already in depends

2018-11-25 Thread Michael Straube via arch-projects
Add a rule that warns about make dependencies already listed as dependencies. Signed-off-by: Michael Straube --- v1 -> v2 Added patch that implements FS#58303 Warn about missing VCS make dependencies. Namcap/rules/__init__.py| 1 + Namcap/rules/makedepends.py | 41

[arch-projects] [namcap] [PATCH] Add test for systemdlocation rule

2018-11-21 Thread Michael Straube via arch-projects
Signed-off-by: Michael Straube --- Namcap/tests/package/test_systemdlocation.py | 85 1 file changed, 85 insertions(+) create mode 100644 Namcap/tests/package/test_systemdlocation.py diff --git a/Namcap/tests/package/test_systemdlocation.py

[arch-projects] [namcap] [PATCH] Add test for makepkgfunctions rule

2018-11-02 Thread Michael Straube via arch-projects
Signed-off-by: Michael Straube --- .../tests/pkgbuild/test_makepkgfunctions.py | 67 +++ 1 file changed, 67 insertions(+) create mode 100644 Namcap/tests/pkgbuild/test_makepkgfunctions.py diff --git a/Namcap/tests/pkgbuild/test_makepkgfunctions.py

[arch-projects] [namcap] [PATCH 1/2] Warn about makedepends already in depends

2018-10-31 Thread Michael Straube via arch-projects
Add a rule that warns about make dependencies already listed as dependencies. Signed-off-by: Michael Straube --- Namcap/rules/__init__.py| 1 + Namcap/rules/makedepends.py | 41 + namcap-tags | 1 + 3 files changed, 43 insertions(+)

[arch-projects] [namcap] [PATCH 2/2] Add test for the makedepends rule

2018-10-31 Thread Michael Straube via arch-projects
Signed-off-by: Michael Straube --- Namcap/tests/pkgbuild/test_makedepends.py | 65 +++ 1 file changed, 65 insertions(+) create mode 100644 Namcap/tests/pkgbuild/test_makedepends.py diff --git a/Namcap/tests/pkgbuild/test_makedepends.py

[arch-projects] [namcap] [PATCH] parsepkgbuild.sh: fix detection of split pkgbuilds with empty pkgbase

2018-10-31 Thread Michael Straube via arch-projects
For split pkgbuilds the pkgbase variable is optional. If not specified, the first element in the pkgname array is used. Currently parsepkgbuild.sh fails to detect split pkgbuilds if pkgbase is not specified. Therefore the split pkgbuild rules are not applied to such pkgbuilds. Instead of testing

[arch-projects] [namcap] [PATCH] tests: pacman 5.1

2018-07-02 Thread Michael Straube via arch-projects
Signed-off-by: Michael Straube --- Namcap/tests/package/test_sodepends.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Namcap/tests/package/test_sodepends.py b/Namcap/tests/package/test_sodepends.py index 3a3d7b6..4188c35 100644 ---

[arch-projects] [namcap] [PATCH] Add missing support for sha224 sums

2018-07-02 Thread Michael Straube via arch-projects
Namcap does not support sha224 checksums but makepkg does. Add sha224 support. Signed-off-by: Michael Straube --- Namcap/rules/arrays.py | 2 +- Namcap/rules/extravars.py | 4 ++-- Namcap/rules/missingvars.py | 2 +- parsepkgbuild.sh| 5 + 4 files changed, 9