Fix release.sh to work with NetBSD Build system.
Also fix a potential issue where host tools would be compiled dynamically under MINIX. This also updates proto.common.dynamic to use the new placement of the dynamic libraries (/usr/lib)
This commit is contained in:
parent
bcbee7d9e1
commit
b0814fec4e
7 changed files with 40 additions and 40 deletions
2
Makefile
2
Makefile
|
@ -312,7 +312,7 @@ distribution buildworld: .PHONY .MAKE
|
||||||
.if defined(__MINIX)
|
.if defined(__MINIX)
|
||||||
${MAKEDIRTARGET} releasetools do-hdboot
|
${MAKEDIRTARGET} releasetools do-hdboot
|
||||||
.endif # defined(__MINIX)
|
.endif # defined(__MINIX)
|
||||||
.if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/"
|
.if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/" && ${CHECKFLIST:Uyes} == "yes"
|
||||||
${MAKEDIRTARGET} . postinstall-fix-obsolete
|
${MAKEDIRTARGET} . postinstall-fix-obsolete
|
||||||
${MAKEDIRTARGET} distrib/sets checkflist
|
${MAKEDIRTARGET} distrib/sets checkflist
|
||||||
.endif
|
.endif
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
libexec d--755 0 0
|
libexec d--755 0 0
|
||||||
ld.elf_so ---755 0 0 /libexec/ld.elf_so
|
ld.elf_so ---755 0 0 /usr/libexec/ld.elf_so
|
||||||
$
|
$
|
||||||
usr d--755 0 0
|
usr d--755 0 0
|
||||||
lib d--755 0 0
|
lib d--755 0 0
|
||||||
libc.so.0 ---755 0 0 /lib/libc.so.0
|
libc.so.0 ---755 0 0 /usr/lib/libc.so.0
|
||||||
libminlib.so.0 ---755 0 0 /lib/libminlib.so.0
|
libminlib.so.0 ---755 0 0 /usr/lib/libminlib.so.0
|
||||||
libcompat_minix.so.0 ---755 0 0 /lib/libcompat_minix.so.0
|
libcompat_minix.so.0 ---755 0 0 /usr/lib/libcompat_minix.so.0
|
||||||
libterminfo.so.0 ---755 0 0 /lib/libterminfo.so.0
|
libterminfo.so.0 ---755 0 0 /usr/lib/libterminfo.so.0
|
||||||
$
|
$
|
||||||
$
|
$
|
||||||
|
|
|
@ -78,7 +78,7 @@ drivers: includes servers
|
||||||
|
|
||||||
# make bootable and place system images
|
# make bootable and place system images
|
||||||
bootable:
|
bootable:
|
||||||
exec su root mkboot bootable
|
exec su root mkboot bootable ${DESTDIR}
|
||||||
|
|
||||||
hdboot: services .WAIT do-hdboot
|
hdboot: services .WAIT do-hdboot
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ do-hdboot:
|
||||||
@if [ "${MKINSTALLBOOT:Uno}" != "no" ] ; then \
|
@if [ "${MKINSTALLBOOT:Uno}" != "no" ] ; then \
|
||||||
${STRIP} -s ${DESTDIR}/boot/minix/.temp/* ; \
|
${STRIP} -s ${DESTDIR}/boot/minix/.temp/* ; \
|
||||||
gzip ${DESTDIR}/boot/minix/.temp/mod* ; \
|
gzip ${DESTDIR}/boot/minix/.temp/mod* ; \
|
||||||
${HOST_SH} mkboot hdboot; \
|
${HOST_SH} mkboot hdboot ${DESTDIR}; \
|
||||||
${HOST_SH} ../commands/update_bootcfg/update_bootcfg.sh;\
|
${HOST_SH} ../commands/update_bootcfg/update_bootcfg.sh;\
|
||||||
else \
|
else \
|
||||||
${INSTALL_DIR} ${DESTDIR}/multiboot; \
|
${INSTALL_DIR} ${DESTDIR}/multiboot; \
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
export SHELL=/bin/sh
|
|
||||||
cd /usr/src
|
|
||||||
|
|
||||||
if [ $# -gt 0 ]
|
|
||||||
then make $@
|
|
||||||
exit $?
|
|
||||||
fi
|
|
||||||
make world
|
|
||||||
cp /usr/mdec/boot_monitor /
|
|
||||||
cp /boot/minix_latest/* /boot/minix_default/
|
|
||||||
|
|
||||||
if [ $MAKEMAP -ne 0 ]; then
|
|
||||||
find . -type f -perm 755 | xargs nm -n 2> /dev/null > symbols.txt
|
|
||||||
fi
|
|
||||||
make clean cleandepend
|
|
|
@ -4,7 +4,7 @@
|
||||||
# Author: Kees J. Bot
|
# Author: Kees J. Bot
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 [bootable | hdboot]" >&2
|
echo "Usage: $0 [bootable | hdboot] [DESTDIR]" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,11 +28,16 @@ rotate_oldest() {
|
||||||
trap 'e=$?; rm -f /tmp/mkb.$$; exit $e' 0 2
|
trap 'e=$?; rm -f /tmp/mkb.$$; exit $e' 0 2
|
||||||
|
|
||||||
mdec=/usr/mdec # bootstraps
|
mdec=/usr/mdec # bootstraps
|
||||||
|
# If no DESTDIR specified, then act on / or on the current chroot
|
||||||
|
DESTDIR=
|
||||||
# Check arguments.
|
# Check arguments.
|
||||||
case "$#:$1" in
|
case "$#:$1" in
|
||||||
1:bootable | 1:hdboot )
|
1:bootable | 1:hdboot )
|
||||||
action=$1 dev=$2 size=$3
|
# LSC Broken, if $# == 1, then $2,$3 are not set...
|
||||||
|
action=$1
|
||||||
|
;;
|
||||||
|
2:bootable | 2:hdboot )
|
||||||
|
action=$1 DESTDIR=$2
|
||||||
;;
|
;;
|
||||||
*) usage
|
*) usage
|
||||||
esac
|
esac
|
||||||
|
@ -100,15 +105,15 @@ hdboot)
|
||||||
|
|
||||||
target="${version}${rrevision}${gitrev}"
|
target="${version}${rrevision}${gitrev}"
|
||||||
|
|
||||||
rotate_oldest "$rootdir/boot/minix"
|
rotate_oldest "$DESTDIR/boot/minix"
|
||||||
|
|
||||||
# rotate system processes. We assume latest ones are in
|
# rotate system processes. We assume latest ones are in
|
||||||
# /boot/modules/.temp and we maintain /boot/modules/ by ourselves.
|
# /boot/modules/.temp and we maintain /boot/modules/ by ourselves.
|
||||||
[ -d /boot/minix/.temp ] || exit 1
|
[ -d $DESTDIR/boot/minix/.temp ] || exit 1
|
||||||
rm -rf /boot/minix/"$target"/
|
rm -rf $DESTDIR/boot/minix/"$target"/
|
||||||
mv /boot/minix/.temp /boot/minix/"$target"
|
mv $DESTDIR/boot/minix/.temp $DESTDIR/boot/minix/"$target"
|
||||||
rm -f /boot/minix_latest
|
rm -f $DESTDIR/boot/minix_latest
|
||||||
ln -s minix/"$target" /boot/minix_latest
|
ln -s minix/"$target" $DESTDIR/boot/minix_latest
|
||||||
|
|
||||||
# Save the revision number.
|
# Save the revision number.
|
||||||
test "$revision" != "$oldrev" && echo $revision >revision
|
test "$revision" != "$oldrev" && echo $revision >revision
|
||||||
|
|
|
@ -55,7 +55,7 @@ set -- $* $RELOPTS
|
||||||
# SVN trunk repo
|
# SVN trunk repo
|
||||||
TRUNK=https://gforge.cs.vu.nl/svn/minix/trunk
|
TRUNK=https://gforge.cs.vu.nl/svn/minix/trunk
|
||||||
|
|
||||||
RELEASEDIR=/usr/r-staging
|
export RELEASEDIR=/usr/r-staging
|
||||||
RELEASEMNTDIR=/usr/r
|
RELEASEMNTDIR=/usr/r
|
||||||
RELEASEPACKAGE=${RELEASEDIR}/usr/install/packages
|
RELEASEPACKAGE=${RELEASEDIR}/usr/install/packages
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Copying contents from current src dir."
|
echo "Copying contents from current src dir."
|
||||||
( cd .. && make depend && make clean )
|
( cd .. && make cleandir )
|
||||||
srcdir=/usr/$SRC
|
srcdir=/usr/$SRC
|
||||||
( cd $srcdir && tar --exclude .svn -cf - . ) | ( cd $RELEASEDIR/usr && mkdir $SRC && cd $SRC && tar xf - )
|
( cd $srcdir && tar --exclude .svn -cf - . ) | ( cd $RELEASEDIR/usr && mkdir $SRC && cd $SRC && tar xf - )
|
||||||
REVTAG=copy
|
REVTAG=copy
|
||||||
|
@ -261,12 +261,10 @@ chmod 755 $RELEASEDIR/usr/share/mk
|
||||||
cp $RELEASEDIR/usr/src/share/mk/* $RELEASEDIR/usr/share/mk/
|
cp $RELEASEDIR/usr/src/share/mk/* $RELEASEDIR/usr/share/mk/
|
||||||
chown -R root $RELEASEDIR/usr/share/mk
|
chown -R root $RELEASEDIR/usr/share/mk
|
||||||
rm -f $RELEASEDIR/usr/$SRC/releasetools/revision
|
rm -f $RELEASEDIR/usr/$SRC/releasetools/revision
|
||||||
cp chrootmake.sh $RELEASEDIR/usr/$SRC/releasetools/chrootmake.sh
|
|
||||||
mkdir -p $RELEASEDIR/etc
|
mkdir -p $RELEASEDIR/etc
|
||||||
cp $RELEASEDIR/usr/src/etc/group $RELEASEDIR/etc
|
cp $RELEASEDIR/usr/src/etc/group $RELEASEDIR/etc
|
||||||
|
|
||||||
echo " * Make hierarchy"
|
echo " * Make hierarchy"
|
||||||
sh -c "$LD_LIB chroot $RELEASEDIR sh -c \"$BUILDENV sh -x /usr/$SRC/releasetools/chrootmake.sh etcfiles\"" || exit 1
|
|
||||||
|
|
||||||
for p in $PREINSTALLED_PACKAGES
|
for p in $PREINSTALLED_PACKAGES
|
||||||
do echo " * Pre-installing: $p from $PKG_ADD_URL"
|
do echo " * Pre-installing: $p from $PKG_ADD_URL"
|
||||||
|
@ -279,8 +277,21 @@ fi
|
||||||
|
|
||||||
echo " * Resetting timestamps"
|
echo " * Resetting timestamps"
|
||||||
find $RELEASEDIR | xargs touch
|
find $RELEASEDIR | xargs touch
|
||||||
echo " * Chroot build"
|
echo " * Build"
|
||||||
sh -c "$LD_LIB MAKEMAP=$MAKEMAP chroot $RELEASEDIR sh -c \"$BUILDENV sh -x /usr/$SRC/releasetools/chrootmake.sh\"" || exit 1
|
|
||||||
|
cd $RELEASEDIR/usr/src
|
||||||
|
make distribution DESTDIR=$RELEASEDIR CHECKFLIST=no
|
||||||
|
make -C releasetools do-hdboot DESTDIR=$RELEASEDIR MKINSTALLBOOT=yes
|
||||||
|
cp $RELEASEDIR/usr/mdec/boot_monitor $RELEASEDIR
|
||||||
|
cp $RELEASEDIR/boot/minix_latest/* $RELEASEDIR/boot/minix_default/
|
||||||
|
|
||||||
|
if [ $MAKEMAP -ne 0 ]; then
|
||||||
|
find . -type f -perm 755 | xargs nm -n 2> /dev/null > symbols.txt
|
||||||
|
fi
|
||||||
|
make cleandir
|
||||||
|
|
||||||
|
cd -
|
||||||
|
|
||||||
echo " * Chroot build done"
|
echo " * Chroot build done"
|
||||||
echo " * Removing bootstrap files"
|
echo " * Removing bootstrap files"
|
||||||
rm -rf $RELEASEDIR/$XBIN
|
rm -rf $RELEASEDIR/$XBIN
|
||||||
|
|
|
@ -7,6 +7,7 @@ _BSD_SYS_MK_=1
|
||||||
|
|
||||||
.if ${HOST_OSTYPE:C/\-.*//:U} == "Minix"
|
.if ${HOST_OSTYPE:C/\-.*//:U} == "Minix"
|
||||||
HOST_CPP?= /usr/lib/cpp
|
HOST_CPP?= /usr/lib/cpp
|
||||||
|
HOST_LDFLAGS?= -static
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${MKREPRO:Uno} == "yes"
|
.if ${MKREPRO:Uno} == "yes"
|
||||||
|
|
Loading…
Reference in a new issue