pkg_libchk doesn't work at all when run from bash. The problem is that bash sets OSTYPE to "freebsd8.2" rather than "FreeBSD", hence the "readelf -e" header matching doesn't see a match. Fix: OSTYPE=$(uname -s) early in the script.
Maintainer of sysutils/bsdadminscripts, Please note that PR ports/158967 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/158967 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Responsible Changed From-To: freebsd-ports-bugs->rea Grabbing PR.
The following patch fixes the issue: http://codelabs.ru/fbsd/ports/bsdadminscripts/fix-missing-OSTYPE.diff Tinderbox builds are OK: - http://gpf.codelabs.ru/tb-logs/mine-9/bsdadminscripts-6.1.1_1.log - http://gpf.codelabs.ru/tb-logs/mine-8/bsdadminscripts-6.1.1_1.log - http://gpf.codelabs.ru/tb-logs/mine-7/bsdadminscripts-6.1.1_1.log -- Eygene Ryabinkin ,,,^..^,,, [ Life's unfair - but root password helps! | codelabs.ru ] [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
Go ahead, commit. BTW, problem doesn't occur on -stable. Regards, Dominic
Dominic, good day. Sun, Jul 17, 2011 at 03:00:26PM +0000, Dominic Fandrey wrote: > BTW, problem doesn't occur on -stable. Occurs for me: {{{ $ uname -r 8.0-STABLE $ env -i /bin/sh -c 'echo $OSTYPE' $ env -i /bin/csh -c 'echo $OSTYPE' FreeBSD $ env -i /bin/tcsh -c 'echo $OSTYPE' FreeBSD $ env -i /usr/local/bin/bash -c 'echo $OSTYPE' freebsd8.0 }}} How had you tested for the problem? Under which shell? Going to /bin/sh from /bin/t?csh won't show the problem, because OSTYPE is exported by CSH to the environment: {{{ $ /bin/csh %sh -c 'echo $OSTYPE' FreeBSD }}} -- Eygene Ryabinkin ,,,^..^,,, [ Life's unfair - but root password helps! | codelabs.ru ] [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
rea 2011-07-18 10:06:50 UTC FreeBSD ports repository Modified files: sysutils/bsdadminscripts Makefile Added files: sysutils/bsdadminscripts/files patch-src::pkg_libchk Log: Allow pkg_libchk to work from non-CSH shells /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 (that is not invoked from csh-like shell), this variable will be empty. Moreover, bash sets OSTYPE to freebsdX.Y, so grepping on output of 'readelf -e' wont work either. 'uname -s' provides much more reliable way to get the name of the operating system and all *BSD ELF ABI types inside readelf correspond to the 'uname -s': {{{ case ELFOSABI_NETBSD: return "UNIX - NetBSD"; case ELFOSABI_FREEBSD: return "UNIX - FreeBSD"; case ELFOSABI_OPENBSD: return "UNIX - OpenBSD"; }}} PR: ports/158967 Approved-by: Dominic Fandrey <kamikaze@bsdforen.de> (maintainer), erwin (mentor) Feature-safe: yes Revision Changes Path 1.25 +1 -0 ports/sysutils/bsdadminscripts/Makefile 1.1 +19 -0 ports/sysutils/bsdadminscripts/files/patch-src::pkg_libchk (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
great, thanks - and sorry about the misconfigured sender address and incurred bounces.
State Changed From-To: feedback->closed closing PR, bug was fixed 3 weeks ago.