Date: Tuesday, October 15, 2019 @ 16:00:36 Author: diabonas Revision: 516189
upgpkg: deheader 1.6-3 Use system Python binary (also fixes issues with the reproducible builds CI) Added: deheader/trunk/deheader_use-system-python.patch Modified: deheader/trunk/PKGBUILD ----------------------------------+ PKGBUILD | 11 +++++++-- deheader_use-system-python.patch | 42 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-10-15 15:23:28 UTC (rev 516188) +++ PKGBUILD 2019-10-15 16:00:36 UTC (rev 516189) @@ -1,19 +1,24 @@ # Maintainer: Jonas Witschel <diabo...@archlinux.org> pkgname=deheader pkgver=1.6 -pkgrel=2 +pkgrel=3 pkgdesc='Find and optionally remove unneeded includes in C or C++ source files' arch=('any') url='http://www.catb.org/~esr/deheader/' license=('BSD') depends=('python') -source=("$url/$pkgname-$pkgver.tar.gz") +source=("$url/$pkgname-$pkgver.tar.gz" 'deheader_use-system-python.patch') noextract=("$pkgname-$pkgver.tar.gz") -sha512sums=('8278d845bf618aabe1fb1da77fb99f6de5efe76a8bd8ae12da0327c0e4df184b7c4d50b2ac2be4a3dd271b8b010818fef83cd80d81f2be2b04bd09e2fee1cea3') +sha512sums=('8278d845bf618aabe1fb1da77fb99f6de5efe76a8bd8ae12da0327c0e4df184b7c4d50b2ac2be4a3dd271b8b010818fef83cd80d81f2be2b04bd09e2fee1cea3' + 'e864cd32dca820844c5d4a0ff4f15f18bf7be53231daba54111ea914cbd594f9d0244e4ec05cf806ef85a86662ce434acc41ace97106e846ddb7409be793a0d3') prepare() { # Invalid hardlink in release tarball leads to bsdtar errors during extraction + # (https://gitlab.com/esr/deheader/issues/7) bsdtar --extract -s '|deheader-1.6/deheader.1||R' --file "$pkgname-$pkgver.tar.gz" + + cd "$pkgname-$pkgver" + patch --strip=1 --input="$srcdir/deheader_use-system-python.patch" } check() { Added: deheader_use-system-python.patch =================================================================== --- deheader_use-system-python.patch (rev 0) +++ deheader_use-system-python.patch 2019-10-15 16:00:36 UTC (rev 516189) @@ -0,0 +1,42 @@ +From df0b47a4543279191e1bfc88269438add4a8deb3 Mon Sep 17 00:00:00 2001 +From: Jonas Witschel <diabo...@gmx.de> +Date: Tue, 15 Oct 2019 17:51:25 +0200 +Subject: [PATCH] Force use of the system Python 3 interpreter + +This avoids PATH manipulation attacks and is encouraged by PEP 394. +--- + deheader | 2 +- + test/Makefile | 5 ----- + 2 files changed, 1 insertion(+), 6 deletions(-) + +diff --git a/deheader b/deheader +index 5b7d06f..4ceb83b 100755 +--- a/deheader ++++ b/deheader +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + """\ + deheader -- find (optionally remove) unneeded includes in C or C++ sourcefiles. + +diff --git a/test/Makefile b/test/Makefile +index 6a70c0d..cf4dc8c 100644 +--- a/test/Makefile ++++ b/test/Makefile +@@ -4,13 +4,8 @@ SOURCES = $(shell ls *.c) + + regress: + @echo "Testing deheader: no output is good news." +- @setpython python2 + @-deheader -v -v . >/tmp/regress + @diff -u regress.chk /tmp/regress +- @setpython python3 +- @-deheader -v -v . >/tmp/regress +- @diff -u regress.chk /tmp/regress +- @setpython python + @rm /tmp/regress + makeregress: + @-deheader -v -v . >regress.chk +-- +2.23.0 +