Source: iptables-netflow
Version: 2.5-2
Severity: serious
tags: patch
Hello, looks like your dkms ship file is sourcing external stuff with
pushd/popd and so on.
I don't think this is a sane idea, specially because in Debian we don't even
use version.sh script to fill the dkms.conf file.
Can you please remove the two lines?
this is what we do to test dkms packages:
if ! dkms_conf=$(dpkg -L $pkg | grep '/usr/src' | grep '/dkms.conf$'); then
echo "I: Package $pkg has no dkms.conf, skipping"
return
fi
echo "I: Testing binary package $pkg"
dkms_pkg=$(bash -c ". $dkms_conf; echo \$PACKAGE_NAME" 2>/dev/null)
dkms_ver=$(bash -c ". $dkms_conf; echo \$PACKAGE_VERSION" 2>/dev/null)
bash -c ". dkms.conf; echo \$PACKAGE_NAME"
/tmp/iptables-netflow-2.5 /tmp/iptables-netflow-2.5
/tmp/iptables-netflow-2.5
ipt-netflow
I think dkms.conf files are meant to be sourced from outside, and launching
scripts is a bad idea.
this is the trivial patch:
Description: Don't print useless stuff and change directory in dkms file, it is
meant to be sourced from outside.
Author: Gianfranco Costamagna <[email protected]>
Bug-Debian: https://bugs.debian.org/-1
Last-Update: 2020-07-29
--- iptables-netflow-2.5.orig/dkms.conf
+++ iptables-netflow-2.5/dkms.conf
@@ -1,7 +1,5 @@
PACKAGE_NAME="ipt-netflow"
-pushd `dirname $BASH_SOURCE`
PACKAGE_VERSION=`./version.sh`
-popd
BUILT_MODULE_NAME[0]=ipt_NETFLOW
DEST_MODULE_LOCATION[0]=/kernel/extra
STRIP[0]=no