scripts: make load-devel-config not to appear as executable 04/2204/1
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Wed, 3 Aug 2016 14:11:06 +0000 (16:11 +0200)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Wed, 3 Aug 2016 14:40:56 +0000 (16:40 +0200)
Quoting the first line of the script: "#! /bin/echo must be loaded with ."
Given that we should drop the .sh file ending as well as the executable
flag - both are not needed to source the file.

Backport of http://dpdk.org/dev/patchwork/patch/15100/
Already got an ack to be commited, but no git commit id yet.

Change-Id: Iadad8b2454feb82361731fce19928b395b256fa2
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
debian/changelog
debian/patches/make-load-devel-config-not-to-appear-as-executable.patch [new file with mode: 0644]
debian/patches/series

index 1c03ef7..18bd2e7 100644 (file)
@@ -13,6 +13,9 @@ dpdk (16.07-1) UNRELEASED; urgency=medium
     These binaries are part of the sdk and meant to be shipped with the sdk.
   * d/p/dpdk-dev-doc-fix-old-dpdk-nic-bind.py-references.patch to fix the
     docs in regard to 16.07 changes renaming dpdk_nic_bind
+  * d/p/make-load-devel-config-not-to-appear-as-executable.patch to avoid
+    accidentially executing as script and to fix unusual-interpreter lintian
+    warning.
 
   [ Anders Roxell ]
   * debian/control: add pciutils to the dpdk depends list, since lspci is used
diff --git a/debian/patches/make-load-devel-config-not-to-appear-as-executable.patch b/debian/patches/make-load-devel-config-not-to-appear-as-executable.patch
new file mode 100644 (file)
index 0000000..0493053
--- /dev/null
@@ -0,0 +1,86 @@
+Description: scripts: make load-devel-config not to appear as executable
+
+Quoting the first line of the script: "#! /bin/echo must be loaded with ."
+Given that we should drop the .sh file ending as well as the executable
+flag - both are not needed to source the file.
+
+Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+
+Origin: Upstream, http://dpdk.org/dev/patchwork/patch/15100/
+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+Last-Update: 2016-08-03
+
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -27,7 +27,7 @@
+ F: scripts/check-maintainers.sh
+ F: scripts/check-git-log.sh
+ F: scripts/checkpatches.sh
+-F: scripts/load-devel-config.sh
++F: scripts/load-devel-config
+ F: scripts/test-build.sh
+ Stable Branches
+--- a/scripts/checkpatches.sh
++++ b/scripts/checkpatches.sh
+@@ -33,7 +33,7 @@
+ # Load config options:
+ # - DPDK_CHECKPATCH_PATH
+ # - DPDK_CHECKPATCH_LINE_LENGTH
+-. $(dirname $(readlink -e $0))/load-devel-config.sh
++. $(dirname $(readlink -e $0))/load-devel-config
+ length=${DPDK_CHECKPATCH_LINE_LENGTH:-80}
+--- /dev/null
++++ b/scripts/load-devel-config
+@@ -0,0 +1,12 @@
++# Load DPDK devel config and allow override
++# from system file
++test ! -r /etc/dpdk/devel.config ||
++        . /etc/dpdk/devel.config
++# from user file
++test ! -r ~/.config/dpdk/devel.config ||
++        . ~/.config/dpdk/devel.config
++# from local file
++test ! -r $(dirname $(readlink -m $0))/../.develconfig ||
++        . $(dirname $(readlink -m $0))/../.develconfig
++
++# The config files must export variables in the shell style
+--- a/scripts/load-devel-config.sh
++++ /dev/null
+@@ -1,14 +0,0 @@
+-#! /bin/echo must be loaded with .
+-
+-# Load DPDK devel config and allow override
+-# from system file
+-test ! -r /etc/dpdk/devel.config ||
+-        . /etc/dpdk/devel.config
+-# from user file
+-test ! -r ~/.config/dpdk/devel.config ||
+-        . ~/.config/dpdk/devel.config
+-# from local file
+-test ! -r $(dirname $(readlink -m $0))/../.develconfig ||
+-        . $(dirname $(readlink -m $0))/../.develconfig
+-
+-# The config files must export variables in the shell style
+--- a/scripts/test-build.sh
++++ b/scripts/test-build.sh
+@@ -48,7 +48,7 @@
+ # - DPDK_NOTIFY (notify-send)
+ # - LIBSSO_SNOW3G_PATH
+ # - LIBSSO_KASUMI_PATH
+-. $(dirname $(readlink -e $0))/load-devel-config.sh
++. $(dirname $(readlink -e $0))/load-devel-config
+ print_usage () {
+       echo "usage: $(basename $0) [-h] [-jX] [-s] [config1 [config2] ...]]"
+@@ -211,7 +211,7 @@
+       # reload config with DPDK_TARGET set
+       DPDK_TARGET=$target
+       reset_env
+-      . $(dirname $(readlink -e $0))/load-devel-config.sh
++      . $(dirname $(readlink -e $0))/load-devel-config
+       options=$(echo $conf | sed 's,[^~+]*,,')
+       dir=$conf
index 6840080..1a80552 100644 (file)
@@ -2,3 +2,4 @@ fix-vhost-user-socket-permission.patch
 fix-double-license-info.patch
 fix-unusual-interpreter.patch
 dpdk-dev-doc-fix-old-dpdk-nic-bind.py-references.patch
+make-load-devel-config-not-to-appear-as-executable.patch