From adcdb2ce5a7214934d179f1a8a77c3a7aa089c2f Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Sat, 16 Jul 2011 22:00:18 +0400 Subject: [PATCH] sysutils/bsdadminscripts: fix OSTYPE issue /bin/sh does not set OSTYPE, so this variable is inherited from the shell from which pkg_libchk is invoked. From all standard shells in the base system, only csh and tcsh do set this variable, so when pkg_libchk is invoked from sh, this variable will be empty. Moreover, bash sets OSTYPE to freebsdX.Y, so grepping on output of 'readelf -e' wont work either. PR: ports/158967 Signed-off-by: Eygene Ryabinkin --- sysutils/bsdadminscripts/Makefile | 1 + .../bsdadminscripts/files/patch-src::pkg_libchk | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-) create mode 100644 sysutils/bsdadminscripts/files/patch-src::pkg_libchk diff --git a/sysutils/bsdadminscripts/Makefile b/sysutils/bsdadminscripts/Makefile index 89b559b..3681214 100644 --- a/sysutils/bsdadminscripts/Makefile +++ b/sysutils/bsdadminscripts/Makefile @@ -7,6 +7,7 @@ PORTNAME= bsdadminscripts PORTVERSION= 6.1.1 +PORTREVISION= 1 CATEGORIES= sysutils ports-mgmt MASTER_SITES= SF/${PORTNAME}/${PORTNAME} diff --git a/sysutils/bsdadminscripts/files/patch-src::pkg_libchk b/sysutils/bsdadminscripts/files/patch-src::pkg_libchk new file mode 100644 index 0000000..a6cd544 --- /dev/null +++ b/sysutils/bsdadminscripts/files/patch-src::pkg_libchk @@ -0,0 +1,19 @@ +--- pkg_libchk.orig 2011-07-16 21:42:34.990085774 +0400 ++++ pkg_libchk 2011-07-16 21:45:53.405082081 +0400 +@@ -23,6 +23,7 @@ + + readonly name=pkg_libchk + readonly version=1.6.1 ++readonly osname=`uname -s` + + # Use a line break as delimiter. + IFS=' +@@ -206,7 +207,7 @@ + # We cannot handle non-native binaries, + # so assume everything is in order. + if ! readelf -e "$1" 2>&1 | \ +- grep -E "^[[:space:]]*OS/ABI:[[:space:]]*UNIX - $OSTYPE\$" \ ++ grep -E "^[[:space:]]*OS/ABI:[[:space:]]*UNIX - $osname\$" \ + > /dev/null + then + return 2 -- 1.7.5.4