Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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 Sven-Hendrik Haase (Svenstaro) - Wednesday, 12 February 2020, 11:40 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
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

Loading...