FS#65140 - [namcap] namcap-ignore-so-no-pie.patch is applied incorrectly

Attached to Project: Arch Linux
Opened by Chih-Hsuan Yen (yan12125) - Tuesday, 14 January 2020, 13:12 GMT
Last edited by Jonas Witschel (diabonas) - Wednesday, 22 June 2022, 12:01 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

namcap-ignore-so-no-pie.patch [1], which is from [2], is already applied in namcap.git [3]. However, PKGBUILD of extra/namcap still attempts to apply this patch. As a result, this patch is incorrectly applied to another rule ELFUnstrippedRule. From the log for prepare(),

> patching file Namcap/rules/elffiles.py
> Hunk #1 succeeded at 189 (offset -39 lines).

[1] https://git.archlinux.org/svntogit/packages.git/tree/trunk/namcap-ignore-so-no-pie.patch?h=packages/namcap
[2] https://lists.archlinux.org/pipermail/arch-projects/2018-September/005009.html
[3] https://git.archlinux.org/namcap.git/commit/?id=4ece4901d13b9fa590a538cc2133374d3c17df6f

Additional info:
extra/namcap 3.2.10

Steps to reproduce:
1. Create PKGBUILD and foobar.c

==> PKGBUILD <==
pkgname=foobar
pkgver=1
pkgrel=1
arch=(x86_64)
license=(Unlicense)
source=(foobar.c)
sha256sums=(SKIP)
options=('!strip')
build() {
gcc $LDFLAGS -g -fPIC foobar.c -shared -o foobar.so
}
package() {
install -Dm755 foobar.so -t "$pkgdir"/usr/lib
}

==> foobar.c <==
int foobar() {}

2. Run makepkg
3. Run namcap for the built package

Expected results: (with namcap-ignore-so-no-pie.patch removed from PKGBUILD)
foobar W: ELF file ('usr/lib/foobar.so') is unstripped.

Actual results:
no warnings or errors from namcap
This task depends upon

Closed by  Jonas Witschel (diabonas)
Wednesday, 22 June 2022, 12:01 GMT
Reason for closing:  Fixed
Additional comments about closing:  namcap 3.3.0-1

Loading...