Tue Dec 1 15:49:21 2009 UTC ()
There's no point in adding _PKGTOOLS_VER=$(${PKG_CREATE} -V)
to any syspkg +BUILD_INFO files, since we don't use the pkg_* tools
to create syspkgs.  Also remove the definition of PKG_CREATE
from sets.subr, since nothing uses it now.


(apb)
diff -r1.17 -r1.18 src/distrib/sets/regpkg
diff -r1.11 -r1.12 src/distrib/sets/regpkgset
diff -r1.92 -r1.93 src/distrib/sets/sets.subr

cvs diff -r1.17 -r1.18 src/distrib/sets/regpkg (expand / switch to unified diff)

--- src/distrib/sets/regpkg 2009/10/17 23:43:22 1.17
+++ src/distrib/sets/regpkg 2009/12/01 15:49:21 1.18
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! /bin/sh 1#! /bin/sh
2# 2#
3# $NetBSD: regpkg,v 1.17 2009/10/17 23:43:22 agc Exp $ 3# $NetBSD: regpkg,v 1.18 2009/12/01 15:49:21 apb Exp $
4# 4#
5# Copyright (c) 2003,2009 The NetBSD Foundation, Inc. 5# Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
6# All rights reserved. 6# All rights reserved.
7# 7#
8# This code is derived from software contributed to The NetBSD Foundation 8# This code is derived from software contributed to The NetBSD Foundation
9# by Alistair Crooks (agc@NetBSD.org) 9# by Alistair Crooks (agc@NetBSD.org)
10# 10#
11# Redistribution and use in source and binary forms, with or without 11# Redistribution and use in source and binary forms, with or without
12# modification, are permitted provided that the following conditions 12# modification, are permitted provided that the following conditions
13# are met: 13# are met:
14# 1. Redistributions of source code must retain the above copyright 14# 1. Redistributions of source code must retain the above copyright
15# notice, this list of conditions and the following disclaimer. 15# notice, this list of conditions and the following disclaimer.
16# 2. Redistributions in binary form must reproduce the above copyright 16# 2. Redistributions in binary form must reproduce the above copyright
@@ -593,56 +593,52 @@ register_syspkg() @@ -593,56 +593,52 @@ register_syspkg()
593 if [ x"${BUILD_INFO_CACHE}" = x ]; then 593 if [ x"${BUILD_INFO_CACHE}" = x ]; then
594 { 594 {
595 # These variables describe the build 595 # These variables describe the build
596 # environment, not the target. 596 # environment, not the target.
597 echo "OPSYS=$(${UNAME} -s)" 597 echo "OPSYS=$(${UNAME} -s)"
598 echo "OS_VERSION=$(${UNAME} -r)" 598 echo "OS_VERSION=$(${UNAME} -r)"
599 ${MAKE} -B -f- all <<EOF 599 ${MAKE} -B -f- all <<EOF
600.include <bsd.own.mk> 600.include <bsd.own.mk>
601all: 601all:
602 @echo OBJECT_FMT=${OBJECT_FMT} 602 @echo OBJECT_FMT=${OBJECT_FMT}
603 @echo MACHINE_ARCH=${MACHINE_ARCH} 603 @echo MACHINE_ARCH=${MACHINE_ARCH}
604 @echo MACHINE_GNU_ARCH=${MACHINE_GNU_ARCH} 604 @echo MACHINE_GNU_ARCH=${MACHINE_GNU_ARCH}
605EOF 605EOF
606 # XXX: what's the point of reporting _PKGTOOLS_VER 
607 # when we roll everything by hand without using 
608 # the pkg tools? 
609 echo "_PKGTOOLS_VER=$(${PKG_CREATE} -V)" 
610 } > "${SYSPKG_DB_SUBDIR}/+BUILD_INFO" 606 } > "${SYSPKG_DB_SUBDIR}/+BUILD_INFO"
611 else 607 else
612 cp "${BUILD_INFO_CACHE}" "${SYSPKG_DB_SUBDIR}/+BUILD_INFO" 608 cp "${BUILD_INFO_CACHE}" "${SYSPKG_DB_SUBDIR}/+BUILD_INFO"
613 fi 609 fi
614 610
615 # test for attributes 611 # test for attributes
616 args="" 612 args=""
617 attrs="$(${AWK} '$1 ~ '/"${pkg}"/' { \ 613 attrs="$(${AWK} '$1 ~ '/"${pkg}"/' { \
618 print substr($0, length($1) + 2) }' \ 614 print substr($0, length($1) + 2) }' \
619 "${rundir}/attrs")" 615 "${rundir}/attrs")"
620 for a in "${attrs}"; do 616 for a in "${attrs}"; do
621 case "${attrs}" in 617 case "${attrs}" in
622 "") ;; 618 "") ;;
623 preserve) 619 preserve)
624 echo "${pkg}-${t}" >"${SYSPKG_DB_SUBDIR}/+PRESERVE" 620 echo "${pkg}-${t}" >"${SYSPKG_DB_SUBDIR}/+PRESERVE"
625 args="${args} -n ${SYSPKG_DB_SUBDIR}/+PRESERVE" 621 args="${args} -n ${SYSPKG_DB_SUBDIR}/+PRESERVE"
626 ;; 622 ;;
627 esac 623 esac
628 done 624 done
629 625
630 # 626 #
631 # Create ${SYSPKGSIR}/+CONTENTS from ${PLIST}, by adding an 627 # Create ${SYSPKGSIR}/+CONTENTS from ${PLIST}, by adding an
632 # "@name" line and a lot of "@comment MD5:" lines. 628 # "@name" line and a lot of "@comment MD5:" lines.
633 # 629 #
634 { 630 {
635 rcsid='$NetBSD: regpkg,v 1.17 2009/10/17 23:43:22 agc Exp $' 631 rcsid='$NetBSD: regpkg,v 1.18 2009/12/01 15:49:21 apb Exp $'
636 utcdate="$(${ENV_CMD} TZ=UTC LOCALE=C \ 632 utcdate="$(${ENV_CMD} TZ=UTC LOCALE=C \
637 ${DATE} '+%Y-%m-%d %H:%M')" 633 ${DATE} '+%Y-%m-%d %H:%M')"
638 user="${USER:-root}" 634 user="${USER:-root}"
639 host="$(${HOSTNAME})" 635 host="$(${HOSTNAME})"
640 echo "@name ${pkg}-${t}" 636 echo "@name ${pkg}-${t}"
641 echo "@comment Packaged at ${utcdate} UTC by ${user}@${host}" 637 echo "@comment Packaged at ${utcdate} UTC by ${user}@${host}"
642 echo "@comment Packaged using ${prog} ${rcsid}" 638 echo "@comment Packaged using ${prog} ${rcsid}"
643 # XXX: "option extract-in-place" might help to get 639 # XXX: "option extract-in-place" might help to get
644 # pkg_add to create directories. 640 # pkg_add to create directories.
645 # XXX: no, it doesn't work. Yet another pkg_add bug. 641 # XXX: no, it doesn't work. Yet another pkg_add bug.
646 ## echo "@option extract-in-place" 642 ## echo "@option extract-in-place"
647 # Move the @pkgdep and @blddep lines up, so that 643 # Move the @pkgdep and @blddep lines up, so that
648 # they are easy to see when people do "less 644 # they are easy to see when people do "less

cvs diff -r1.11 -r1.12 src/distrib/sets/regpkgset (expand / switch to unified diff)

--- src/distrib/sets/regpkgset 2009/10/17 23:43:22 1.11
+++ src/distrib/sets/regpkgset 2009/12/01 15:49:21 1.12
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! /bin/sh 1#! /bin/sh
2# 2#
3# $NetBSD: regpkgset,v 1.11 2009/10/17 23:43:22 agc Exp $ 3# $NetBSD: regpkgset,v 1.12 2009/12/01 15:49:21 apb Exp $
4# 4#
5# Copyright (c) 2003,2009 The NetBSD Foundation, Inc. 5# Copyright (c) 2003,2009 The NetBSD Foundation, Inc.
6# All rights reserved. 6# All rights reserved.
7# 7#
8# This code is derived from software contributed to The NetBSD Foundation 8# This code is derived from software contributed to The NetBSD Foundation
9# by Alistair Crooks (agc@NetBSD.org) 9# by Alistair Crooks (agc@NetBSD.org)
10# 10#
11# Redistribution and use in source and binary forms, with or without 11# Redistribution and use in source and binary forms, with or without
12# modification, are permitted provided that the following conditions 12# modification, are permitted provided that the following conditions
13# are met: 13# are met:
14# 1. Redistributions of source code must retain the above copyright 14# 1. Redistributions of source code must retain the above copyright
15# notice, this list of conditions and the following disclaimer. 15# notice, this list of conditions and the following disclaimer.
16# 2. Redistributions in binary form must reproduce the above copyright 16# 2. Redistributions in binary form must reproduce the above copyright
@@ -132,30 +132,26 @@ if ${cache}; then @@ -132,30 +132,26 @@ if ${cache}; then
132 export BUILD_INFO_CACHE 132 export BUILD_INFO_CACHE
133 { 133 {
134 # These variables describe the build 134 # These variables describe the build
135 # environment, not the target. 135 # environment, not the target.
136 echo "OPSYS=$(${UNAME} -s)" 136 echo "OPSYS=$(${UNAME} -s)"
137 echo "OS_VERSION=$(${UNAME} -r)" 137 echo "OS_VERSION=$(${UNAME} -r)"
138 ${MAKE} -B -f- all <<EOF 138 ${MAKE} -B -f- all <<EOF
139.include <bsd.own.mk> 139.include <bsd.own.mk>
140all: 140all:
141 @echo OBJECT_FMT=${OBJECT_FMT} 141 @echo OBJECT_FMT=${OBJECT_FMT}
142 @echo MACHINE_ARCH=${MACHINE_ARCH} 142 @echo MACHINE_ARCH=${MACHINE_ARCH}
143 @echo MACHINE_GNU_ARCH=${MACHINE_GNU_ARCH} 143 @echo MACHINE_GNU_ARCH=${MACHINE_GNU_ARCH}
144EOF 144EOF
145 # XXX: what's the point of reporting _PKGTOOLS_VER 
146 # when we roll everything by hand without using 
147 # the pkg tools? 
148 echo "_PKGTOOLS_VER=$(${PKG_CREATE} -V)" 
149 } > "${BUILD_INFO_CACHE}" 145 } > "${BUILD_INFO_CACHE}"
150fi 146fi
151 147
152# 148#
153# For each pkgset mentioned in ${list}, get a list of all pkgs in the pkgset. 149# For each pkgset mentioned in ${list}, get a list of all pkgs in the pkgset.
154# 150#
155# Sort all the pkgs into dependency order (with prerequisite pkgs before 151# Sort all the pkgs into dependency order (with prerequisite pkgs before
156# pkgs that depend on them). 152# pkgs that depend on them).
157# 153#
158# Invoke ${rundir}/regpkg for each pkg, taking care to do it in dependency 154# Invoke ${rundir}/regpkg for each pkg, taking care to do it in dependency
159# order. If there were any pkgs for which we failed to find dependency 155# order. If there were any pkgs for which we failed to find dependency
160# information, handle them at the end. 156# information, handle them at the end.
161# 157#

cvs diff -r1.92 -r1.93 src/distrib/sets/sets.subr (expand / switch to unified diff)

--- src/distrib/sets/sets.subr 2009/11/30 16:13:23 1.92
+++ src/distrib/sets/sets.subr 2009/12/01 15:49:21 1.93
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: sets.subr,v 1.92 2009/11/30 16:13:23 uebayasi Exp $ 1# $NetBSD: sets.subr,v 1.93 2009/12/01 15:49:21 apb Exp $
2# 2#
3 3
4# 4#
5# The following variables contain defaults for sets.subr functions and callers: 5# The following variables contain defaults for sets.subr functions and callers:
6# setsdir path to src/distrib/sets 6# setsdir path to src/distrib/sets
7# nlists list of base sets 7# nlists list of base sets
8# xlists list of x11 sets 8# xlists list of x11 sets
9# extlists list of extsrc sets 9# extlists list of extsrc sets
10# obsolete controls if obsolete files are selected instead 10# obsolete controls if obsolete files are selected instead
11# module if != "no", enable MODULE sets 11# module if != "no", enable MODULE sets
12# shlib shared library format (a.out, elf, or "") 12# shlib shared library format (a.out, elf, or "")
13# stlib static library format (a.out, elf) 13# stlib static library format (a.out, elf)
14# 14#
@@ -91,27 +91,26 @@ MKVARS="\ @@ -91,27 +91,26 @@ MKVARS="\
91: ${FIND:=find} 91: ${FIND:=find}
92: ${GREP:=grep} 92: ${GREP:=grep}
93: ${GZIP_CMD:=gzip} # ${GZIP} is special to gzip(1) 93: ${GZIP_CMD:=gzip} # ${GZIP} is special to gzip(1)
94: ${HOSTNAME:=hostname} 94: ${HOSTNAME:=hostname}
95: ${HOST_SH:=sh} 95: ${HOST_SH:=sh}
96: ${IDENT:=ident} 96: ${IDENT:=ident}
97: ${JOIN:=join} 97: ${JOIN:=join}
98: ${LS:=ls} 98: ${LS:=ls}
99: ${MAKE:=make} 99: ${MAKE:=make}
100: ${MKTEMP:=mktemp} 100: ${MKTEMP:=mktemp}
101: ${MTREE:=mtree} 101: ${MTREE:=mtree}
102: ${PASTE:=paste} 102: ${PASTE:=paste}
103: ${PAX:=pax} 103: ${PAX:=pax}
104: ${PKG_CREATE:=pkg_create} 
105: ${PRINTF:=printf} 104: ${PRINTF:=printf}
106: ${SED:=sed} 105: ${SED:=sed}
107: ${SORT:=sort} 106: ${SORT:=sort}
108: ${STAT:=stat} 107: ${STAT:=stat}
109: ${TSORT:=tsort} 108: ${TSORT:=tsort}
110: ${UNAME:=uname} 109: ${UNAME:=uname}
111: ${WC:=wc} 110: ${WC:=wc}
112 111
113# 112#
114# If printf is a shell builtin command, then we can 113# If printf is a shell builtin command, then we can
115# implement cheaper versions of basename and dirname 114# implement cheaper versions of basename and dirname
116# that do not involve any fork/exec overhead. 115# that do not involve any fork/exec overhead.
117# If printf is not builtin, approximate it using echo, 116# If printf is not builtin, approximate it using echo,
@@ -232,27 +231,27 @@ extlists="extbase extcomp extetc" @@ -232,27 +231,27 @@ extlists="extbase extcomp extetc"
232OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh` 231OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh`
233MODULEDIR="stand/${MACHINE}/${OSRELEASE}/modules" 232MODULEDIR="stand/${MACHINE}/${OSRELEASE}/modules"
234SUBST="s#@MODULEDIR@#${MODULEDIR}#g" 233SUBST="s#@MODULEDIR@#${MODULEDIR}#g"
235SUBST="${SUBST};s#@OSRELEASE@#${OSRELEASE}#g" 234SUBST="${SUBST};s#@OSRELEASE@#${OSRELEASE}#g"
236SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g" 235SUBST="${SUBST};s#@MACHINE@#${MACHINE}#g"
237 236
238# 237#
239# list_set_files setfile [...] 238# list_set_files setfile [...]
240#  239#
241# Produce a packing list for setfile(s). 240# Produce a packing list for setfile(s).
242# In each file, a record consists of a path and a System Package name, 241# In each file, a record consists of a path and a System Package name,
243# separated by whitespace. E.g., 242# separated by whitespace. E.g.,
244# 243#
245# # $NetBSD: sets.subr,v 1.92 2009/11/30 16:13:23 uebayasi Exp $ 244# # $NetBSD: sets.subr,v 1.93 2009/12/01 15:49:21 apb Exp $
246# . base-sys-root [keyword[,...]] 245# . base-sys-root [keyword[,...]]
247# ./altroot base-sys-root 246# ./altroot base-sys-root
248# ./bin base-sys-root 247# ./bin base-sys-root
249# ./bin/[ base-util-root 248# ./bin/[ base-util-root
250# ./bin/cat base-util-root 249# ./bin/cat base-util-root
251# [...] 250# [...]
252# 251#
253# A # in the first column marks a comment. 252# A # in the first column marks a comment.
254# 253#
255# If ${obsolete} != 0, only entries with an "obsolete" keyword will 254# If ${obsolete} != 0, only entries with an "obsolete" keyword will
256# be printed. All other keywords must be present. 255# be printed. All other keywords must be present.
257# 256#
258# The third field is an optional comma separated list of keywords to 257# The third field is an optional comma separated list of keywords to