[pve-devel] [PATCH zfsonlinux 13/15] add 3 patches for lintian errors

Stoiko Ivanov s.ivanov at proxmox.com
Thu May 23 23:11:40 CEST 2019


* wrong-path-for-interpreter is a lintian error, one single zfs-test used
/usr/bin/ksh instead of /bin/ksh.
* python-script-but-no-python-dep was reported because test-runner.py had
/usr/bin/python as shebang, but the buildsystem and our dependencies expected
/usr/bin/python3
* executable-not-elf-or-script were results of some files being installed with
the wrong permissions

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 ...x-ksh-path-for-random_readwrite_fixed.ksh.patch |  24 +++++
 ...-test-runner.py-change-shebang-to-python3.patch |  28 ++++++
 ...osmetic-permission-issues-during-make-ins.patch | 110 +++++++++++++++++++++
 zfs/debian/patches/series                          |   3 +
 4 files changed, 165 insertions(+)
 create mode 100644 zfs/debian/patches/0007-Fix-ksh-path-for-random_readwrite_fixed.ksh.patch
 create mode 100644 zfs/debian/patches/0008-test-runner.py-change-shebang-to-python3.patch
 create mode 100644 zfs/debian/patches/0009-tests-fix-cosmetic-permission-issues-during-make-ins.patch

diff --git a/zfs/debian/patches/0007-Fix-ksh-path-for-random_readwrite_fixed.ksh.patch b/zfs/debian/patches/0007-Fix-ksh-path-for-random_readwrite_fixed.ksh.patch
new file mode 100644
index 0000000..4995515
--- /dev/null
+++ b/zfs/debian/patches/0007-Fix-ksh-path-for-random_readwrite_fixed.ksh.patch
@@ -0,0 +1,24 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Stoiko Ivanov <s.ivanov at proxmox.com>
+Date: Tue, 21 May 2019 18:19:01 +0200
+Subject: [PATCH] Fix ksh-path for random_readwrite_fixed.ksh
+
+The test in zfs-tests/tests/perf/regression/random_readwrite_fixed.ksh
+is the only file to use /usr/bin/ksh in the shebang.
+Change it to /bin/ksh for consistency.
+
+Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
+---
+ tests/zfs-tests/tests/perf/regression/random_readwrite_fixed.ksh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/zfs-tests/tests/perf/regression/random_readwrite_fixed.ksh b/tests/zfs-tests/tests/perf/regression/random_readwrite_fixed.ksh
+index 38c0669f6..e368ed236 100755
+--- a/tests/zfs-tests/tests/perf/regression/random_readwrite_fixed.ksh
++++ b/tests/zfs-tests/tests/perf/regression/random_readwrite_fixed.ksh
+@@ -1,4 +1,4 @@
+-#!/usr/bin/ksh
++#!/bin/ksh
+ # file and its contents are supplied under the terms of the
+ # Common Development and Distribution License ("CDDL"), version 1.0.
+ # You may only use this file in accordance with the terms of version
diff --git a/zfs/debian/patches/0008-test-runner.py-change-shebang-to-python3.patch b/zfs/debian/patches/0008-test-runner.py-change-shebang-to-python3.patch
new file mode 100644
index 0000000..6bc4117
--- /dev/null
+++ b/zfs/debian/patches/0008-test-runner.py-change-shebang-to-python3.patch
@@ -0,0 +1,28 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Stoiko Ivanov <s.ivanov at proxmox.com>
+Date: Thu, 23 May 2019 15:22:27 +0200
+Subject: [PATCH] test-runner.py: change shebang to python3
+
+In commit 6e72a5b9b61066146deafda39ab8158c559f5f15 python scripts which
+work with python2 and python3 changed the shebang from /usr/bin/python
+to /usr/bin/python3. This gets adapted by the build-system on systems
+which don't provide python3.
+This commit changes test-runner.py to also use /usr/bin/python3,
+enabling the change during buildtime and fixing a minor lintian issue
+on Debian systems, which only have python3 installed.
+
+Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
+---
+ tests/test-runner/bin/test-runner.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test-runner/bin/test-runner.py b/tests/test-runner/bin/test-runner.py
+index ea37e8ab6..4d4fd96ad 100755
+--- a/tests/test-runner/bin/test-runner.py
++++ b/tests/test-runner/bin/test-runner.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+ 
+ #
+ # This file and its contents are supplied under the terms of the
diff --git a/zfs/debian/patches/0009-tests-fix-cosmetic-permission-issues-during-make-ins.patch b/zfs/debian/patches/0009-tests-fix-cosmetic-permission-issues-during-make-ins.patch
new file mode 100644
index 0000000..b04a6bc
--- /dev/null
+++ b/zfs/debian/patches/0009-tests-fix-cosmetic-permission-issues-during-make-ins.patch
@@ -0,0 +1,110 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Stoiko Ivanov <s.ivanov at proxmox.com>
+Date: Thu, 23 May 2019 15:32:53 +0200
+Subject: [PATCH] tests: fix cosmetic permission issues during `make install`
+
+files in dist_*_SCRIPTS get installed with 0755, those in dist_*_DATA
+with 0644. This commit moves all .kshlib, .shlib and .cfg files in the
+testsuite to dist_pkgdata_DATA, and removes the shebang from
+zpool_import.kshlib.
+
+This ensures that the files are installed with appropriate permissions
+and silences some warnings from lintian
+
+Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
+---
+ tests/zfs-tests/tests/functional/alloc_class/Makefile.am            | 6 ++++--
+ .../tests/functional/cli_root/zpool_import/zpool_import.kshlib      | 2 --
+ .../tests/functional/cli_root/zpool_initialize/Makefile.am          | 1 -
+ tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am    | 4 +++-
+ tests/zfs-tests/tests/functional/removal/Makefile.am                | 5 ++++-
+ tests/zfs-tests/tests/perf/Makefile.am                              | 2 +-
+ 6 files changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/tests/zfs-tests/tests/functional/alloc_class/Makefile.am b/tests/zfs-tests/tests/functional/alloc_class/Makefile.am
+index 073eac988..7cffb2eac 100644
+--- a/tests/zfs-tests/tests/functional/alloc_class/Makefile.am
++++ b/tests/zfs-tests/tests/functional/alloc_class/Makefile.am
+@@ -1,7 +1,5 @@
+ pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/alloc_class
+ dist_pkgdata_SCRIPTS = \
+-	alloc_class.cfg \
+-	alloc_class.kshlib \
+ 	setup.ksh \
+ 	cleanup.ksh \
+ 	alloc_class_001_pos.ksh \
+@@ -17,3 +15,7 @@ dist_pkgdata_SCRIPTS = \
+ 	alloc_class_011_neg.ksh \
+ 	alloc_class_012_pos.ksh \
+ 	alloc_class_013_pos.ksh
++
++dist_pkgdata_DATA = \
++	alloc_class.cfg \
++	alloc_class.kshlib
+diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.kshlib b/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.kshlib
+index f53b88f79..d050145e4 100644
+--- a/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.kshlib
++++ b/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.kshlib
+@@ -1,5 +1,3 @@
+-#!/bin/ksh
+-
+ #
+ # This file and its contents are supplied under the terms of the
+ # Common Development and Distribution License ("CDDL"), version 1.0.
+diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/Makefile.am b/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/Makefile.am
+index a0a0e0b5c..2ebc376d9 100644
+--- a/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/Makefile.am
++++ b/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/Makefile.am
+@@ -3,7 +3,6 @@ dist_pkgdata_SCRIPTS = \
+ 	cleanup.ksh \
+ 	zpool_initialize_attach_detach_add_remove.ksh \
+ 	zpool_initialize_import_export.ksh \
+-	zpool_initialize.kshlib \
+ 	zpool_initialize_offline_export_import_online.ksh \
+ 	zpool_initialize_online_offline.ksh \
+ 	zpool_initialize_split.ksh \
+diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am b/tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am
+index c357eeffb..d2d3b4ae8 100644
+--- a/tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am
++++ b/tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am
+@@ -2,7 +2,6 @@ pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/cli_root/zpool_trim
+ dist_pkgdata_SCRIPTS = \
+ 	setup.ksh \
+ 	cleanup.ksh \
+-	zpool_trim.kshlib \
+ 	zpool_trim_attach_detach_add_remove.ksh \
+ 	zpool_trim_import_export.ksh \
+ 	zpool_trim_multiple.ksh \
+@@ -20,3 +19,6 @@ dist_pkgdata_SCRIPTS = \
+ 	zpool_trim_unsupported_vdevs.ksh \
+ 	zpool_trim_verify_checksums.ksh \
+ 	zpool_trim_verify_trimmed.ksh
++
++dist_pkgdata_DATA = \
++	zpool_trim.kshlib
+diff --git a/tests/zfs-tests/tests/functional/removal/Makefile.am b/tests/zfs-tests/tests/functional/removal/Makefile.am
+index c5d013e7c..ba42b899a 100644
+--- a/tests/zfs-tests/tests/functional/removal/Makefile.am
++++ b/tests/zfs-tests/tests/functional/removal/Makefile.am
+@@ -28,6 +28,9 @@ dist_pkgdata_SCRIPTS = \
+ 	removal_with_send.ksh removal_with_send_recv.ksh \
+ 	removal_with_snapshot.ksh removal_with_write.ksh \
+ 	removal_with_zdb.ksh remove_mirror.ksh remove_mirror_sanity.ksh \
+-	remove_raidz.ksh remove_expanded.ksh removal.kshlib
++	remove_raidz.ksh remove_expanded.ksh
++
++dist_pkgdata_DATA = \
++	removal.kshlib
+ 
+ pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/removal
+diff --git a/tests/zfs-tests/tests/perf/Makefile.am b/tests/zfs-tests/tests/perf/Makefile.am
+index 68dd31ec1..294b136b3 100644
+--- a/tests/zfs-tests/tests/perf/Makefile.am
++++ b/tests/zfs-tests/tests/perf/Makefile.am
+@@ -1,5 +1,5 @@
+ pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/perf
+-dist_pkgdata_SCRIPTS = \
++dist_pkgdata_DATA = \
+ 	nfs-sample.cfg \
+ 	perf.shlib
+ 
diff --git a/zfs/debian/patches/series b/zfs/debian/patches/series
index 66bda31..1739ac6 100644
--- a/zfs/debian/patches/series
+++ b/zfs/debian/patches/series
@@ -4,3 +4,6 @@
 0004-increase-default-zcmd-allocation-to-256K.patch
 0005-import-with-d-dev-disk-by-id-in-scan-service.patch
 0006-Enable-zed-emails.patch
+0007-Fix-ksh-path-for-random_readwrite_fixed.ksh.patch
+0008-test-runner.py-change-shebang-to-python3.patch
+0009-tests-fix-cosmetic-permission-issues-during-make-ins.patch
-- 
2.11.0





More information about the pve-devel mailing list