commit:     ecacc00aef905d57b8f8e6eccd21473494d53c72
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 11 01:50:12 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 11 01:50:25 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecacc00a

sys-apps/util-linux: fix oids test

Closes: https://bugs.gentoo.org/657640
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 ...p-oids-test-when-uuidgen-is-not-available.patch | 41 ++++++++++++++++++++++
 sys-apps/util-linux/util-linux-2.32.1-r1.ebuild    |  1 +
 sys-apps/util-linux/util-linux-2.33.ebuild         |  4 +++
 sys-apps/util-linux/util-linux-9999.ebuild         |  4 +++
 4 files changed, 50 insertions(+)

diff --git 
a/sys-apps/util-linux/files/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch
 
b/sys-apps/util-linux/files/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch
new file mode 100644
index 00000000000..743dc89e242
--- /dev/null
+++ 
b/sys-apps/util-linux/files/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch
@@ -0,0 +1,41 @@
+From 8f93c8c71d264e90bdcecf98c9ac372bbcdc53aa Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <[email protected]>
+Date: Sun, 11 Nov 2018 02:17:55 +0100
+Subject: [PATCH] tests: run oids test only when uuidgen tool was built
+
+oids test did not check if uuidgen was available.
+
+oids test was also calling uuidgen from PATH which could result
+in wrong results if uuidgen from a previous util-linux installation
+was used.
+
+With this commit we will check if uuidgen was built and make sure
+that we only call the uuidgen binary we just built. If uuidgen is
+not available we will skip this test.
+---
+ tests/ts/uuid/oids | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/tests/ts/uuid/oids b/tests/ts/uuid/oids
+index 3b005c5b2..77e010c1d 100755
+--- a/tests/ts/uuid/oids
++++ b/tests/ts/uuid/oids
+@@ -20,12 +20,14 @@ ts_init "$*"
+ 
+ : . > $TS_OUTPUT
+ 
+-uuidgen --md5 --namespace @dns --name "www.widgets.com" >> $TS_OUTPUT
++ts_check_test_command "$TS_CMD_UUIDGEN"
+ 
+-uuidgen --md5 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
++$TS_CMD_UUIDGEN --md5 --namespace @dns --name "www.widgets.com" >> $TS_OUTPUT
+ 
+-uuidgen --sha1 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
++$TS_CMD_UUIDGEN --md5 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
+ 
+-uuidgen --sha1 --namespace @oid --hex --name "525400fc0f5e" >> $TS_OUTPUT
++$TS_CMD_UUIDGEN --sha1 --namespace @dns --name "www.example.com" >> $TS_OUTPUT
++
++$TS_CMD_UUIDGEN --sha1 --namespace @oid --hex --name "525400fc0f5e" >> 
$TS_OUTPUT
+ 
+ ts_finalize

diff --git a/sys-apps/util-linux/util-linux-2.32.1-r1.ebuild 
b/sys-apps/util-linux/util-linux-2.32.1-r1.ebuild
index 8334aa825c1..954f4398edf 100644
--- a/sys-apps/util-linux/util-linux-2.32.1-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.32.1-r1.ebuild
@@ -65,6 +65,7 @@ S="${WORKDIR}/${MY_P}"
 
 PATCHES=(
        "${FILESDIR}/util-linux-2.32-python3-tests.patch"
+       
"${FILESDIR}/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch"
 )
 
 src_prepare() {

diff --git a/sys-apps/util-linux/util-linux-2.33.ebuild 
b/sys-apps/util-linux/util-linux-2.33.ebuild
index 2e987185feb..e93eae675f8 100644
--- a/sys-apps/util-linux/util-linux-2.33.ebuild
+++ b/sys-apps/util-linux/util-linux-2.33.ebuild
@@ -63,6 +63,10 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=(
+       
"${FILESDIR}/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch"
+)
+
 src_prepare() {
        default
 

diff --git a/sys-apps/util-linux/util-linux-9999.ebuild 
b/sys-apps/util-linux/util-linux-9999.ebuild
index cdfc75a44ba..78f587fe30c 100644
--- a/sys-apps/util-linux/util-linux-9999.ebuild
+++ b/sys-apps/util-linux/util-linux-9999.ebuild
@@ -63,6 +63,10 @@ REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=(
+       
"${FILESDIR}/util-linux-2.32.1-skip-oids-test-when-uuidgen-is-not-available.patch"
+)
+
 src_prepare() {
        default
 

Reply via email to