NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: misc/41684: build.sh syspkgs only works on NetBSD hosts
The following reply was made to PR misc/41684; it has been noted by GNATS.
From: Alan Barrett <apb%cequrux.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: misc/41684: build.sh syspkgs only works on NetBSD hosts
Date: Fri, 10 Jul 2009 22:14:01 +0200
On Wed, 08 Jul 2009, lloyd%must-have-coffee.gen.nz@localhost wrote:
> build.sh syspkgs fails with all sorts of strange error messages on OS
> X, even if you have the pkg_* tools available for building packages.
build.sh syspkgs doesn't use the pkg_* tools, except to get a version
number from "pkg_create -V", and I have no idea why that is necessary or
desirable. The appended patch removes that.
> It turns out that various scripts used to build syspkgs don't work
> correctly when /bin/sh is bash.
Thanks for the patches, but next time, please use "diff -u" format.
Please try the appended patch, which is closely based on your changes,
plus removal of the use of pkg_create, and removal of the need for
"cd -".
--apb (Alan Barrett)
Index: distrib/sets/makeplist
--- makeplist 4 Jan 2006 13:57:04 -0000 1.19
+++ makeplist 10 Jul 2009 20:06:38 -0000
@@ -94,7 +94,9 @@
# to consult the metalog instead of the file system.
#
+(
cd "${prefix}"
+
#
# Match the directories. Use find(1) to avoid repeat calls to
# 'test -d'.
@@ -123,7 +125,7 @@
${FIND} ${args} ${SELECTNONDIRS}
done > "${ffilename}"
-cd -
+)
echo "@cwd ${realprefix}"
if [ -s "${ffilename}" ]; then
Index: distrib/sets/regpkg
--- regpkg 3 Apr 2009 22:36:35 -0000 1.16
+++ regpkg 10 Jul 2009 20:06:38 -0000
@@ -606,10 +606,6 @@
@echo MACHINE_ARCH=${MACHINE_ARCH}
@echo MACHINE_GNU_ARCH=${MACHINE_GNU_ARCH}
EOF
- # XXX: what's the point of reporting _PKGTOOLS_VER
- # when we roll everything by hand without using
- # the pkg tools?
- echo "_PKGTOOLS_VER=$(${PKG_CREATE} -V)"
} > "${SYSPKG_DB_SUBDIR}/+BUILD_INFO"
else
cp "${BUILD_INFO_CACHE}" "${SYSPKG_DB_SUBDIR}/+BUILD_INFO"
@@ -639,7 +635,7 @@
utcdate="$(${ENV_CMD} TZ=UTC LOCALE=C \
${DATE} '+%Y-%m-%d %H:%M')"
user="${USER:-root}"
- host="$(${HOSTNAME})"
+ host="$(${HOSTNAME_CMD})"
echo "@name ${pkg}-${t}"
echo "@comment Packaged at ${utcdate} UTC by ${user}@${host}"
echo "@comment Packaged using ${prog} ${rcsid}"
@@ -988,6 +984,7 @@
# No files in the pkg? (This could happen
# if a pkg contains only directories.)
# Do nothing (keep the already-registered pkg).
+ :
fi
else
bomb
Index: distrib/sets/regpkgset
--- regpkgset 12 Nov 2007 15:06:45 -0000 1.10
+++ regpkgset 10 Jul 2009 20:06:39 -0000
@@ -145,10 +145,6 @@
@echo MACHINE_ARCH=${MACHINE_ARCH}
@echo MACHINE_GNU_ARCH=${MACHINE_GNU_ARCH}
EOF
- # XXX: what's the point of reporting _PKGTOOLS_VER
- # when we roll everything by hand without using
- # the pkg tools?
- echo "_PKGTOOLS_VER=$(${PKG_CREATE} -V)"
} > "${BUILD_INFO_CACHE}"
fi
Index: distrib/sets/sets.subr
--- sets.subr 18 Jun 2009 21:05:35 -0000 1.84
+++ sets.subr 10 Jul 2009 20:06:39 -0000
@@ -84,7 +84,7 @@
: ${FIND:=find}
: ${GREP:=grep}
: ${GZIP_CMD:=gzip} # ${GZIP} is special to gzip(1)
-: ${HOSTNAME:=hostname}
+: ${HOSTNAME_CMD:=hostname} # ${HOSTNAME} is special to bash(1)
: ${HOST_SH:=sh}
: ${IDENT:=ident}
: ${JOIN:=join}
@@ -94,7 +94,6 @@
: ${MTREE:=mtree}
: ${PASTE:=paste}
: ${PAX:=pax}
-: ${PKG_CREATE:=pkg_create}
: ${PRINTF:=printf}
: ${SED:=sed}
: ${SORT:=sort}
Home |
Main Index |
Thread Index |
Old Index