Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jun 2005 12:23:16 +0200
From:      "Tom Skoglund" <tos@teleplan.no>
To:        <freebsd-questions@freebsd.org>
Cc:        mick.walker@ctcmarine.com
Subject:   RE: Release build problem
Message-ID:  <20050617102116.TUWQ8168.amsfep14-int.chello.nl@tos>

next in thread | raw e-mail | index | archive | help
Here are the attachments inlined.

-Tom


Release.sh:
===========

#!/bin/sh

export HERE=$(realpath $(dirname $0))

export BUILDNAME="5.4-COMSECURE"
export CHROOTDIR="/home/release"
STAGEDIR="${CHROOTDIR}/R/stage"
BASEDIR="${STAGEDIR}/trees/base"
DISTDIR="${STAGEDIR}/dists"
CDROMDIR="${CHROOTDIR}/R/cdrom"
PACKAGEDIR="${CDROMDIR}/disc1/packages"
CLIENTDIR="${CDROMDIR}/disc1/client"
export CVSROOT="/home/cvsup/freebsd/cvs"

# For the FreeBSD 5.2 based release
#export CVSCMDARGS="-D'2004/08/01 00:00:00 GMT'"

# For the FreeBSD 5.4 based release
export RELEASETAG="RELENG_5_4_0_RELEASE"
export PORTSRELEASETAG="RELEASE_5_4_0"

export DISC1_LABEL="ComSecure_INSTALL"
export DISC1_NAME="install"
export DISC2_LABEL="ComSecure_LIVE"
export DISC2_NAME="live"

# Tweak the release
# NB: Remember to update to the correct FreeBSD release
export LOCAL_PATCHES="$(echo ${HERE}/patches-5.4/patch-*)"
export LOCAL_SCRIPT="$(echo ${HERE}/scripts/script-*)"
chmod a+rx ${LOCAL_SCRIPT}
export FIXCRYPTO=""
export KERNELS="COMSECURE"
export NODOC="YES"
export NOPORTREADMES="YES"
export NO_FLOPPIES="YES"

# Save some time
export WORLD_FLAGS=-j3
export KERNEL_FLAGS=-j3

pdate() {
	date +">>> %F %T"
}

set -e
trap pdate EXIT

if [ ! -d "${BASEDIR}" ] ; then
	pdate
	echo ">>> make release"
	cd /usr/src/release
	make release
fi

pdate
echo ">>> Writing loader.conf"
					:> "${BASEDIR}/boot/loader.conf"
echo 'beastie_disable="YES"'		>> "${BASEDIR}/boot/loader.conf"
echo 'autoboot_delay=3'			>> "${BASEDIR}/boot/loader.conf"
echo 'kernel="COMSECURE"'		>> "${BASEDIR}/boot/loader.conf"
echo 'kern.ipc.nmbclusters=262144'	>> "${BASEDIR}/boot/loader.conf"
echo 'hz=2048'				>> "${BASEDIR}/boot/loader.conf"

pdate
echo ">>> Writing make.conf"
cat ${CHROOTDIR}/etc/make.conf		 > "${BASEDIR}/etc/make.conf"
echo "KERNCONF           = COMSECURE"	>> "${BASEDIR}/etc/make.conf"
echo 'KODIR              = /boot/${KERNCONF}'	>>
"${BASEDIR}/etc/make.conf"
echo					>> "${BASEDIR}/etc/make.conf"
echo "# work around bug in sysinstall"	>> "${BASEDIR}/etc/make.conf"
echo "NO_RESCUE          = YES"         >> "${BASEDIR}/etc/make.conf"
echo "WITH_POSTGRESQL    = YES"		>> "${BASEDIR}/etc/make.conf"

pdate
echo ">>> Writing libmap.conf"
					:> "${BASEDIR}/etc/libmap.conf"
echo "# KSE is still unreliable"	>> "${BASEDIR}/etc/libmap.conf"
echo "libpthread.so.1   libthr.so.1"	>> "${BASEDIR}/etc/libmap.conf"
echo "libpthread.so     libthr.so"	>> "${BASEDIR}/etc/libmap.conf"
echo "libc_r.so.5       libthr.so.1"	>> "${BASEDIR}/etc/libmap.conf"
echo "libc_r.so         libthr.so"	>> "${BASEDIR}/etc/libmap.conf"

pdate
rm -rf "${CDROMDIR}"
mkdir -p "${PACKAGEDIR}"
sh -e "${HERE}/packages.sh" "${PACKAGEDIR}"
if [ -f "${HERE}/ComSecureClient.jar" ]; then
	mkdir -p "${CLIENTDIR}"
	cp "${HERE}/ComSecureClient.jar" "${CLIENTDIR}"
fi

# force 'make rerelease' to re-roll the tarballs
rm -f "${CHROOTDIR}/usr/obj/usr/src/release/release.7"
rm -f "${CHROOTDIR}/usr/obj/usr/src/release/release.8"
rm -f "${CHROOTDIR}/usr/obj/usr/src/release/cdrom.1"
rm -f "${CHROOTDIR}/usr/obj/usr/src/release/iso.1"

pdate
echo ">>> make rerelease"
cd /usr/src/release
#make rerelease -DMAKE_ISOS CVSPREFIX="echo"
export RELEASENOUPDATE="YES"
make rerelease -DMAKE_ISOS 

pdate
echo ">>> Release build complete"


Packages.sh:
============

#!/bin/sh

ports="mmsc zsh"

here="$(realpath $(dirname $0))"
mmscdir="$(realpath ${here}/..)"
portsdir="/usr/ports"
pkgdir="$(realpath ${1:-${here}/packages})"

set -e

rm -rf "${pkgdir}"
mkdir -p "${pkgdir}"

# Create package dirs if missing
if [ ! -d "${portsdir}/packages/All" ] ; then
    mkdir "${portsdir}/packages/All"
fi
if [ ! -d "${portsdir}/packages/Latest" ] ; then
    mkdir "${portsdir}/packages/Latest"
fi


deplist() {
    pkg=$(basename $(realpath "${portsdir}/packages/Latest/${1}.tbz"))
    pkg=${pkg%.tbz}
    if [ -f "${portsdir}/packages/All/${pkg}.tbz" ] ; then
	echo "${pkg}"
	pkg_info -qr "${portsdir}/packages/All/${pkg}.tbz" | \
	    awk '/^@pkgdep/ { print $2 }'
    fi
}

pkglist() {
    for port; do
	deplist "${port}"
    done | \
	sort -u
}

echo ">>> Locating packages"
packages=$(pkglist $ports)
echo "${packages}"
echo ">>> Copying packages"
cd ${portsdir}/packages
for pkg in ${packages}; do
    find . -name "${pkg}.tbz" -print
done | \
    tar cf - ${pkgfiles} -T /dev/stdin | \
    tar xvf - -C ${pkgdir}

echo ">>> Generating ${pkgdir}/INDEX"
for pkg in ${packages} ; do
    echo "d ${pkg}" 1>&2
    origin=$(pkg_info -qo ${pkgdir}/All/${pkg}.tbz)
    if [ -d "${mmscdir}/ports/$(basename ${origin})" ] ; then
	cd "${mmscdir}/ports/$(basename ${origin})"
	make describe
    elif [ -d "${portsdir}/${origin}" ] ; then
	cd "${portsdir}/${origin}"
	make describe
    else
	echo "Can't find ${origin}" 1>&2
	exit 1
    fi
done | \
    perl ${portsdir}/Tools/make_index | \
    sort >"${pkgdir}/INDEX"


Release.log:
============

>>> 2005-06-13 16:30:27
>>> Writing loader.conf
>>> 2005-06-13 16:30:27
>>> Writing make.conf
>>> 2005-06-13 16:30:27
>>> Writing libmap.conf
>>> 2005-06-13 16:30:27
>>> Locating packages
gettext-0.14.1
libiconv-1.9.2_1
mmsc-1.2.2
p5-DBD-Pg-1.40_1
p5-DBI-1.48
p5-MMSC-1.2.2
pcre-5.0
perl-5.8.6_2
postgresql-client-7.4.7
postgresql-server-7.4.7_3
snort-2.3.2
zsh-4.2.4
>>> Copying packages
x All/gettext-0.14.1.tbz
x devel/gettext-0.14.1.tbz
x All/libiconv-1.9.2_1.tbz
x converters/libiconv-1.9.2_1.tbz
x devel/libiconv-1.9.2_1.tbz
x All/mmsc-1.2.2.tbz
x net/mmsc-1.2.2.tbz
x security/mmsc-1.2.2.tbz
x All/p5-DBD-Pg-1.40_1.tbz
x perl5/p5-DBD-Pg-1.40_1.tbz
x databases/p5-DBD-Pg-1.40_1.tbz
x All/p5-DBI-1.48.tbz
x perl5/p5-DBI-1.48.tbz
x databases/p5-DBI-1.48.tbz
x All/p5-MMSC-1.2.2.tbz
x net/p5-MMSC-1.2.2.tbz
x security/p5-MMSC-1.2.2.tbz
x perl5/p5-MMSC-1.2.2.tbz
x All/pcre-5.0.tbz
x devel/pcre-5.0.tbz
x All/perl-5.8.6_2.tbz
x perl5/perl-5.8.6_2.tbz
x devel/perl-5.8.6_2.tbz
x lang/perl-5.8.6_2.tbz
x All/postgresql-client-7.4.7.tbz
x databases/postgresql-client-7.4.7.tbz
x All/postgresql-server-7.4.7_3.tbz
x databases/postgresql-server-7.4.7_3.tbz
x All/snort-2.3.2.tbz
x security/snort-2.3.2.tbz
x All/zsh-4.2.4.tbz
x shells/zsh-4.2.4.tbz
>>> Generating /home/release/R/cdrom/disc1/packages/INDEX
d gettext-0.14.1
d libiconv-1.9.2_1
d mmsc-1.2.2
d p5-DBD-Pg-1.40_1
d p5-DBI-1.48
d p5-MMSC-1.2.2
d pcre-5.0
d perl-5.8.6_2
d postgresql-client-7.4.7
d postgresql-server-7.4.7_3
d snort-2.3.2
d zsh-4.2.4
make_index: gettext-0.14.1: no entry for /usr/ports/devel/libtool15
make_index: postgresql-server-7.4.7_3: no entry for /usr/ports/devel/gmake
make_index: postgresql-client-7.4.7: no entry for /usr/ports/devel/gmake
make_index: libiconv-1.9.2_1: no entry for /usr/ports/devel/libtool15
make_index: pcre-5.0: no entry for /usr/ports/devel/libtool15
>>> 2005-06-13 16:30:39
>>> make rerelease
# Add version information to those things that need it.
if [ ! -f /home/release/tmp/.world_done ]; then  cd
/home/release/usr/src/sys/conf &&  mv newvers.sh foo &&  sed
"s/^RELEASE=.*/RELEASE=5.4-COMSECURE/" foo > newvers.sh &&  rm foo;  fi
test -f install.cfg && cp install.cfg /home/release/usr/src/release
*** Error code 1 (ignored)
echo "#!/bin/sh"			> /home/release/mk
echo "set -ex"				>> /home/release/mk
echo "trap 'umount /dev || true' 0"	>> /home/release/mk
echo "_RELTARGET=\${1:-doRELEASE}"	>> /home/release/mk
echo "export AUTO_KEYBOARD_DETECT=\"0\""	>> /home/release/mk
echo "export BUILDNAME=\"5.4-COMSECURE\""	>> /home/release/mk
echo "export DISTRIBUTIONS=\"base catpages manpages games proflibs dict info
doc compat1x compat20 compat21 compat22 compat3x compat4x\""	>>
/home/release/mk
echo "export FTP_PASSIVE_MODE=\"YES\""	>> /home/release/mk
echo "export KERNELS=\"COMSECURE\""	>> /home/release/mk
echo "export KERNEL_FLAGS=\"-j3\""	>> /home/release/mk
echo "export MAKE_ISOS=\"1\""	>> /home/release/mk
echo "export NODOC=\"YES\""	>> /home/release/mk
echo "export NO_FLOPPIES=\"YES\""	>> /home/release/mk
echo "export RELEASETAG=\"RELENG_5_4_0_RELEASE\""	>> /home/release/mk
echo "export RELNOTES_LANG=\"en_US.ISO8859-1\""	>> /home/release/mk
echo "export TARGET=\"i386\""	>> /home/release/mk
echo "export TARGET_ARCH=\"i386\""	>> /home/release/mk
echo "export WORLD_FLAGS=\"-j3\""	>> /home/release/mk
# Don't remove this, or the build will fall over!
echo "export RELEASEDIR=/R"		>> /home/release/mk
echo "export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin"	>>
/home/release/mk
echo "export MANBUILDCAT=YES"		>> /home/release/mk
# NB: these may fail if the host is running w/o devfs
echo "umount /dev >/dev/null 2>&1 || true" >> /home/release/mk
echo "mount -t devfs devfs /dev >/dev/null 2>&1 || true"	>>
/home/release/mk
echo "if [ -x /etc/rc.d/ldconfig ]; then" >> /home/release/mk
echo "	/etc/rc.d/ldconfig start"	>> /home/release/mk
echo "else"				>> /home/release/mk
echo "	ldconfig /lib /usr/lib /usr/local/lib || true" >> /home/release/mk
echo "fi"				>> /home/release/mk
echo "if [ ! -f /tmp/.world_done ]; then" >> /home/release/mk
echo "	cd /usr/src"			>> /home/release/mk
echo "	make TARGET_ARCH=i386 TARGET=i386 -j3 -DNOCLEAN buildworld && \\" >>
/home/release/mk
echo "	touch /tmp/.world_done || exit 1" >> /home/release/mk
echo "fi"				>> /home/release/mk
echo "if [ ! -f /tmp/.skip_ports_index ]; then" >> /home/release/mk
echo "	echo \">>> make index started on \`LC_ALL=C TZ=GMT date\`\"" >>
/home/release/mk
echo "	for i in lang/perl5.8"	>> /home/release/mk
echo "	do"			>> /home/release/mk
echo "		cd /usr/ports/\${i}"	>> /home/release/mk
echo "		env -i FTP_PASSIVE_MODE=${FTP_PASSIVE_MODE:-no} PATH=${PATH}
\\" >> /home/release/mk
echo "		make all install clean BATCH=yes FORCE_PKG_REGISTER=yes" >>
/home/release/mk
echo "	done"				>> /home/release/mk
echo "	cd /usr/ports"			>> /home/release/mk
echo "	rm -f INDEX*"			>> /home/release/mk
echo "	make index -DINDEX_PRISTINE"	>> /home/release/mk
echo "	rm -f INDEX*.tmp"		>> /home/release/mk
echo "	touch /tmp/.skip_ports_index"	>> /home/release/mk
echo "	echo \">>> make index finished on \`LC_ALL=C TZ=GMT date\`\"" >>
/home/release/mk
echo "fi"				>> /home/release/mk
echo "cd /usr/src/release"		>> /home/release/mk
echo "make obj"				>> /home/release/mk
echo "make \${_RELTARGET}"		>> /home/release/mk
echo "echo \">>> make rerelease for i386 finished on \`LC_ALL=C TZ=GMT
date\`\"" >> /home/release/mk
chmod 755 /home/release/mk
# Ensure md.ko is loaded if md(4) is not statically compiled into
# the kernel
mdconfig 2>/dev/null
*** Error code 1 (ignored)
env -i /usr/sbin/chroot `dirname /home/release/mk` /`basename
/home/release/mk`
+ trap umount /dev || true 0
+ _RELTARGET=doRELEASE
+ export AUTO_KEYBOARD_DETECT=0
+ export BUILDNAME=5.4-COMSECURE
+ export DISTRIBUTIONS=base catpages manpages games proflibs dict info doc
compat1x compat20 compat21 compat22 compat3x compat4x
+ export FTP_PASSIVE_MODE=YES
+ export KERNELS=COMSECURE
+ export KERNEL_FLAGS=-j3
+ export MAKE_ISOS=1
+ export NODOC=YES
+ export NO_FLOPPIES=YES
+ export RELEASETAG=RELENG_5_4_0_RELEASE
+ export RELNOTES_LANG=en_US.ISO8859-1
+ export TARGET=i386
+ export TARGET_ARCH=i386
+ export WORLD_FLAGS=-j3
+ export RELEASEDIR=/R
+ export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
+ export MANBUILDCAT=YES
+ umount /dev
+ true
+ mount -t devfs devfs /dev
+ [ -x /etc/rc.d/ldconfig ]
+ /etc/rc.d/ldconfig start
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib
a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout
+ [ ! -f /tmp/.world_done ]
+ [ ! -f /tmp/.skip_ports_index ]
+ LC_ALL=C TZ=GMT date
+ echo >>> make index started on Mon Jun 13 14:30:40 GMT 2005
>>> make index started on Mon Jun 13 14:30:40 GMT 2005
+ cd /usr/ports/lang/perl5.8
+ env -i FTP_PASSIVE_MODE=YES
PATH=/root/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr
/bin:/usr/sbin:/usr/local/linux-sun-jdk1.4.2/bin make all install clean
BATCH=yes FORCE_PKG_REGISTER=yes


===>  Building for perl-5.8.6_2

[...]

===>  Cleaning for perl-5.8.6_2


+ cd /usr/ports
+ rm -f INDEX-5
+ make index -DINDEX_PRISTINE
Generating INDEX-5 - please wait.. Done.
+ rm -f INDEX-5.tmp
+ touch /tmp/.skip_ports_index
+ LC_ALL=C TZ=GMT date
+ echo >>> make index finished on Mon Jun 13 14:42:54 GMT 2005
>>> make index finished on Mon Jun 13 14:42:54 GMT 2005
+ cd /usr/src/release
+ make obj
+ make doRELEASE
rolling src/sbase tarball
rolling src/sbin tarball
rolling src/scontrib tarball
rolling src/scrypto tarball
rolling src/setc tarball
rolling src/sgames tarball
rolling src/sgnu tarball
rolling src/sinclude tarball
rolling src/skrb5 tarball
rolling src/slib tarball
rolling src/slibexec tarball
rolling src/srelease tarball
rolling src/srescue tarball
rolling src/ssbin tarball
rolling src/ssecure tarball
rolling src/sshare tarball
rolling src/ssys tarball
rolling src/stools tarball
rolling src/subin tarball
rolling src/susbin tarball
(cd /R/stage/dists/src; rm -f CHECKSUM.MD5; md5 * > CHECKSUM.MD5)
src distribution is finished.
touch release.7
cp /R/stage/trees/base/etc/disktab /etc
rm -rf /R/stage/mfsfd
mkdir /R/stage/mfsfd
cd /R/stage/mfsfd &&  mkdir -p etc/defaults dev mnt stand/etc/defaults
stand/help
( cd /R/stage/mfsfd &&  for dir in bin sbin ; do  ln -sf /stand $dir;  done
)
cp /R/stage/trees/base/sbin/dhclient-script /R/stage/mfsfd/stand
cp /usr/src/release/../etc/usbd.conf /R/stage/mfsfd/etc/usbd.conf
( for F in defaults/rc.conf netconfig protocols ; do  sed -e '/^#.*$/d' -e
's/[:space:]*#.*$//g'  /R/stage/trees/base/etc/$F >
/R/stage/mfsfd/stand/etc/$F ;  done )
grep -E '^(ftp|nameserver|domain|sunrpc|cmd|nfsd)[^-\w]'
/R/stage/trees/base/etc/services |  sed -e '/^#.*$/d' -e
's/[:space:]*#.*$//g'  > /R/stage/mfsfd/stand/etc/services
grep 'operator' /R/stage/trees/base/etc/group  >
/R/stage/mfsfd/stand/etc/group
ln /R/stage/mfsfd/stand/etc/services /R/stage/mfsfd/etc/services
ln /R/stage/mfsfd/stand/etc/group /R/stage/mfsfd/etc/group
ln /R/stage/mfsfd/stand/etc/netconfig /R/stage/mfsfd/etc/netconfig
cp /R/stage/trees/base/COPYRIGHT /R/stage/mfsfd/stand/help/COPYRIGHT.hlp
test -f /usr/src/release/install.cfg  && cp /usr/src/release/install.cfg
/R/stage/mfsfd
*** Error code 1 (ignored)
sh -e /usr/src/release/scripts/doFS.sh bsdlabel "" /R/stage/mfsroot/mfsroot
/R/stage /mnt  4320 /R/stage/mfsfd 8000 minimum3
+ export BLOCKSIZE=512
+ DISKLABEL=bsdlabel
+ shift
+ MACHINE=
+ shift
+ FSIMG=/R/stage/mfsroot/mfsroot
+ shift
+ RD=/R/stage
+ shift
+ MNT=/mnt
+ shift
+ FSSIZE=4320
+ shift
+ FSPROTO=/R/stage/mfsfd
+ shift
+ FSINODE=8000
+ shift
+ FSLABEL=minimum3
+ shift
+ [ 4320 -eq 0 -a minimum3 = auto ]
+ rm -f /R/stage/mfsroot/mfsroot
+ dd of=/R/stage/mfsroot/mfsroot if=/dev/zero count=4320 bs=1k
+ uname -r
+ [ -f /R/stage/trees/base/boot/boot ]
+ BOOT=-B -b /R/stage/trees/base/boot/boot
+ dofs_md
+ [ x != x ]
+ mdconfig -a -t vnode -f /R/stage/mfsroot/mfsroot
+ MDDEVICE=md0
+ sleep 3
+ [ ! -c /dev/md0 ]
+ trap umount /mnt; mdconfig -d -u md0 EXIT
+ bsdlabel -w -B -b /R/stage/trees/base/boot/boot md0 minimum3
+ newfs -O1 -i 8000 -o space -m 0 /dev/md0c
fstab: /etc/fstab:0: No such file or directory
/dev/md0c: 4.2MB (8640 sectors) block size 4096, fragment size 512
	using 4 cylinder groups of 1.06MB, 271 blks, 160 inodes.
super-block backups (for fsck -b #) at:
 32, 2200, 4368, 6536
+ mount /dev/md0c /mnt
+ [ -d /R/stage/mfsfd ]
+ set -e
+ cd /R/stage/mfsfd
+ find . -print
+ cpio -dump /mnt
4621 blocks
+ df -ki /mnt
Filesystem 1K-blocks Used Avail Capacity iused ifree %iused  Mounted on
/dev/md0c       4175 2329  1846    56%      45   593    7%   /mnt
+ df -ki /mnt
+ tail -1
+ set /dev/md0c 4175 2329 1846 56% 45 593 7% /mnt
+ echo *** File system is 4320 K, 1846 left
*** File system is 4320 K, 1846 left
+ echo ***     8000 bytes/inode, 593 left
***     8000 bytes/inode, 593 left
+ umount /mnt
+ mdconfig -d -u md0
/R/stage/mfsroot/mfsroot:	 74.2% -- replaced with
/R/stage/mfsroot/mfsroot.gz
touch release.8
Building CDROM live filesystem image
0 blocks
0 blocks
0 blocks
0 blocks
0 blocks
0 blocks
0 blocks
0 blocks
0 blocks
0 blocks
0 blocks
0 blocks
0 blocks
0 blocks
Setting up CDROM boot area
# Break the link to device.hints so we can modify it
touch cdrom.1
Creating ISO images...
mkisofs: No such file or directory. Invalid node - /R/cdrom/bootonly
*** Error code 2

Stop in /usr/src/release.
+ umount /dev
*** Error code 1

Stop in /usr/src/release.
>>> 2005-06-13 16:44:40





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050617102116.TUWQ8168.amsfep14-int.chello.nl>