makedist.sh,functions.inc.sh: sync with current production server
This commit is contained in:
parent
910cd4cc53
commit
e887892a40
@ -377,7 +377,6 @@ for i in `seq 0 $ALLMEDIASLAST`; do
|
||||
echo "Releasing $PRODUCT_NAME media (${PLATFORM}/${SUBPLATFORM} $RELEASETAG)"
|
||||
SIMULATE=1
|
||||
elif [ "$WEEKDAY" = "${MEDIA_WEEKDAY[i]}" -o \
|
||||
"${MEDIA_WEEKDAY[i]}" = "ANY" -o \
|
||||
"$FORCEBUILD" = "$PRODUCT_NAME" ]; then
|
||||
echo "Building $PRODUCT_NAME media"
|
||||
unset SIMULATE
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Functions used by makedist scripts
|
||||
#
|
||||
# Copyright (c) 2004-2020 by Silvan Calarco (silvan.calarco@mambasoft.it)
|
||||
# Copyright (c) 2004-2023 by Silvan Calarco (silvan.calarco@mambasoft.it)
|
||||
# Copyright (c) 2004-2005 by Davide Madrisan (davide.madrisan@gmail.com)
|
||||
#
|
||||
|
||||
@ -125,6 +125,7 @@ function initialize_root_dir() {
|
||||
|
||||
# / to /usr symlinks
|
||||
mkdir -p $MOUNTDIR/usr/{bin,sbin,lib}
|
||||
#ln -s bin $MOUNTDIR/usr/sbin
|
||||
ln -s usr/bin $MOUNTDIR/bin
|
||||
ln -s usr/sbin $MOUNTDIR/sbin
|
||||
ln -s usr/lib $MOUNTDIR/lib
|
||||
@ -137,7 +138,7 @@ function initialize_root_dir() {
|
||||
#[ $MEDIA = "raw" ] && create_raw_filesystem $LOCALSTATEDIR/$MEDIA_NAME $MEDIA_SIZE 1024k $ROOTFS
|
||||
[ $MEDIA = "raw" ] && create_raw_disk_image $MEDIA_SIZE 1024k
|
||||
|
||||
trap "[ $LOOPDEV ] && losetup -d $LOOPDEV; chroot $MOUNTDIR /usr/bin/gpgconf --kill gpg-agent 2>/dev/null; sleep 10; [ -e $MOUNTDIR/proc/version ] && umount $MOUNTDIR/proc; [ -e $MOUNTDIR/dev/null ] && umount $MOUNTDIR/dev; [ -e $MOUNTDIR/run/systemd ] && umount $MOUNTDIR/run; [ -e $MOUNTDIR/sys/kernel ] && umount $MOUNTDIR/sys; [ \"$MOUNTDIR_TMPFS\" ] && umount $MOUNTDIR_TMPFS" 0 HUP INT QUIT ABRT KILL TERM
|
||||
trap "[ $LOOPDEV ] && losetup -d $LOOPDEV; killall -9 gpg-agent; [ -e $MOUNTDIR/proc/version ] && umount $MOUNTDIR/proc; [ -e $MOUNTDIR/dev/null ] && umount $MOUNTDIR/dev; [ -e $MOUNTDIR/run/systemd ] && umount $MOUNTDIR/run; [ -e $MOUNTDIR/sys/kernel ] && umount $MOUNTDIR/sys; [ \"$MOUNTDIR_TMPFS\" ] && umount $MOUNTDIR_TMPFS" 0 HUP INT QUIT ABRT KILL TERM
|
||||
}
|
||||
|
||||
function create_rpm_database() {
|
||||
@ -172,7 +173,10 @@ $RPM_CHROOT_PREFIX $RPM $RPM_ROOT_APPEND --initdb" > ${LOCALSTATEDIR}/${BUILDSCR
|
||||
mkdir -p $MOUNTDIR/var/lib/rpm
|
||||
$RPM_CHROOT_PREFIX $RPM $RPM_ROOT_APPEND --initdb ||
|
||||
{ echo "$makedist_me: unable to initialize the RPM database" >&2
|
||||
{ (exit 1); exit 1; }; }
|
||||
echo "$makedist_me: command was: $RPM_CHROOT_PREFIX $RPM $RPM_ROOT_APPEND --initdb" >&2
|
||||
echo "$makedist_me: sleeping 600 seconds"
|
||||
sleep 600
|
||||
{ (exit 1); exit 1; }; }
|
||||
[ -e "$RPM_GPG_KEY" ] && {
|
||||
$RPM_CHROOT_PREFIX $RPM $RPM_ROOT_APPEND --import $RPM_GPG_KEY
|
||||
echo "$RPM_CHROOT_PREFIX $RPM $RPM_ROOT_APPEND --import $RPM_GPG_KEY" >> ${LOCALSTATEDIR}/${BUILDSCRIPT_NAME}
|
||||
@ -180,10 +184,13 @@ $RPM_CHROOT_PREFIX $RPM $RPM_ROOT_APPEND --initdb" > ${LOCALSTATEDIR}/${BUILDSCR
|
||||
}
|
||||
|
||||
function clean_rpm_database() {
|
||||
echo "Cleaning rpm database"
|
||||
[ "$MOUNTDIR" != "" -a "$MOUNTDIR" != "/" ] && rm -rf $MOUNTDIR/var/lib/rpm/__db.*
|
||||
#echo "Cleaning rpm database"
|
||||
#[ "$MOUNTDIR" != "" -a "$MOUNTDIR" != "/" ] && rm -rf $MOUNTDIR/var/lib/rpm/__db.*
|
||||
echo "Killing any gpg-agent..."
|
||||
# Kill any gpg-agent daemon spawned daemon preventing umount
|
||||
chroot $MOUNTDIR /usr/bin/gpgconf --kill gpg-agent || :
|
||||
killall -9 gpg-agent
|
||||
rm -rf $MOUNTDIR/root/.gnupg
|
||||
#chroot $MOUNTDIR /usr/bin/gpgconf --kill gpg-agent || :
|
||||
}
|
||||
|
||||
function erase_rpm_database() {
|
||||
|
@ -119,7 +119,7 @@ TARGETDIR=$TARGETSDIR/$MAKEDIST_TARGET
|
||||
MOUNTDIR=$LOCALSTATEDIR/root.tmp
|
||||
# Auxiliary mountdir
|
||||
MOUNTDIR2=$LOCALSTATEDIR/root2.tmp
|
||||
MOUNTDIR_TMPFS_SIZE=10G
|
||||
MOUNTDIR_TMPFS_SIZE=16G
|
||||
|
||||
[ -d $MOUNTDIR ] && rm -rf $MOUNTDIR
|
||||
mkdir -p $MOUNTDIR
|
||||
|
Loading…
Reference in New Issue
Block a user