Resync all files to present production state
This commit is contained in:
parent
ae55d71ac2
commit
4d23ec5ec0
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# makedist-announcement
|
# makedist-announcement
|
||||||
# Copyright (c) 2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
# Copyright (c) 2012-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
#
|
#
|
||||||
|
|
||||||
. /usr/share/makedist/VERSION
|
. /usr/share/makedist/VERSION
|
||||||
@ -12,7 +12,7 @@ TEXTDOMAIN="makedist"; export TEXTDOMAIN
|
|||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo $"Usage"": makedist-announcement distversion [mediumname] [--rebuild-announcement] [--rebuild-catalog]
|
echo $"Usage"": makedist-announcement distversion [mediumname] [--rebuild-announcement] [--rebuild-catalog]
|
||||||
[--send-email] [--send-test-email] [-h|--help]
|
[--send-email] [--send-test-email] [-h|--help] [-y|--yes]
|
||||||
|
|
||||||
"$"Example"":
|
"$"Example"":
|
||||||
makedist-announcement milestone2 livecd --send-test-email
|
makedist-announcement milestone2 livecd --send-test-email
|
||||||
@ -29,6 +29,7 @@ while [ "$1" ]; do
|
|||||||
--send-email) SCRIPT_ENV_ADD="$SCRIPT_ENV_ADD SENDEMAIL=1" ;;
|
--send-email) SCRIPT_ENV_ADD="$SCRIPT_ENV_ADD SENDEMAIL=1" ;;
|
||||||
--send-test-email) SCRIPT_ENV_ADD="$SCRIPT_ENV_ADD SENDTESTEMAIL=1" ;;
|
--send-test-email) SCRIPT_ENV_ADD="$SCRIPT_ENV_ADD SENDTESTEMAIL=1" ;;
|
||||||
-h|--help) usage; exit 0 ;;
|
-h|--help) usage; exit 0 ;;
|
||||||
|
-y|--yes) EXTRA_OPTS="-y" ;;
|
||||||
-*) echo "Error: uknown option $1; aborting."
|
-*) echo "Error: uknown option $1; aborting."
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
@ -66,14 +67,17 @@ if [ "$mediumname" ]; then
|
|||||||
*) echo "Error: unsupported language $outputlang; aborting."; exit 1 ;;
|
*) echo "Error: unsupported language $outputlang; aborting."; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
[ "$SCRIPT_ENV_ADD" ] && export $SCRIPT_ENV_ADD
|
[ "$SCRIPT_ENV_ADD" ] && export $SCRIPT_ENV_ADD
|
||||||
/usr/share/makedist/makedist-announcement.sh $distversion $mediumname $outputlang || exit 1
|
/usr/share/makedist/makedist-announcement.sh $EXTRA_OPTS $distversion $mediumname $outputlang || exit 1
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#if [ ! "$SENDEMAIL" -a ! "$SENDTESTEMAIL" ]; then
|
#if [ ! "$SENDEMAIL" -a ! "$SENDTESTEMAIL" ]; then
|
||||||
echo $"Generating $distversion announcements index"
|
echo $"Generating $distversion announcements indexes"
|
||||||
for outputlang in $outputlangs; do
|
for outputlang in $outputlangs; do
|
||||||
|
tmpfile=`mktemp -q -t makedist-announcement.XXXXXXXX`
|
||||||
indexfile=/var/ftp/pub/$distribution/media/$distversion/release-announcement-index.$outputlang.html.inc
|
indexfile=/var/ftp/pub/$distribution/media/$distversion/release-announcement-index.$outputlang.html.inc
|
||||||
|
dateindexfile=/var/ftp/pub/$distribution/media/$distversion/release-announcement-dateindex.$outputlang.html.inc
|
||||||
|
> $dateindexfile
|
||||||
echo "<table>" > $indexfile
|
echo "<table>" > $indexfile
|
||||||
column=0
|
column=0
|
||||||
for i in `seq 1 ${#MEDIA_NAME[*]}`; do
|
for i in `seq 1 ${#MEDIA_NAME[*]}`; do
|
||||||
@ -82,6 +86,8 @@ fi
|
|||||||
for f in $mediumdir/info/release-announcement-*.$outputlang.html; do
|
for f in $mediumdir/info/release-announcement-*.$outputlang.html; do
|
||||||
[ -r $f ] || continue
|
[ -r $f ] || continue
|
||||||
version=`echo $f | sed "s|.*/release-announcement-\(.*\)\.$outputlang.html|\1|"`
|
version=`echo $f | sed "s|.*/release-announcement-\(.*\)\.$outputlang.html|\1|"`
|
||||||
|
announcedate=`stat --format=%X $f`
|
||||||
|
echo "$announcedate `date -d @$announcedate +%d/%m/%Y` ${MEDIA_NAME[i-1]} $version" >> $tmpfile
|
||||||
done
|
done
|
||||||
[ "$version" ] || continue
|
[ "$version" ] || continue
|
||||||
[ $column -eq 0 ] && echo -n "<tr>" >> $indexfile
|
[ $column -eq 0 ] && echo -n "<tr>" >> $indexfile
|
||||||
@ -94,5 +100,11 @@ fi
|
|||||||
done
|
done
|
||||||
[ $column -eq 0 ] && echo -n "<td></td></tr>" >> $indexfile
|
[ $column -eq 0 ] && echo -n "<td></td></tr>" >> $indexfile
|
||||||
echo "</table>" >> $indexfile
|
echo "</table>" >> $indexfile
|
||||||
|
sort -r $tmpfile | \
|
||||||
|
while read line; do
|
||||||
|
set -- $line
|
||||||
|
echo "<br>$2 <a href=\"/distribution/announcements.html?distrelease=${distversion}&medium=$3&version=$4\">"$"Release: ""$distribution $distversion $3 $4</a>" >> $dateindexfile
|
||||||
|
done
|
||||||
|
rm -f $tmpfile
|
||||||
done
|
done
|
||||||
#fi
|
#fi
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
RECORDVM_DATA=/var/makedist/recordvm
|
RECORDVM_DATA=/var/makedist/recordvm
|
||||||
#VBOX=1
|
#VBOX=1
|
||||||
VBOX_VMNAME="openmamba-recordvm"
|
VBOX_VMNAME="openmamba-recordvm"
|
||||||
VBOX_DISPLAY=:1
|
X_DISPLAY=4
|
||||||
EXECUTION_TIME=200
|
EXECUTION_TIME=200
|
||||||
VIDEO_EXT=.flv
|
VIDEO_EXT=.flv
|
||||||
VIDEO_EXT2=.ogv
|
VIDEO_EXT2=.ogv
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo "Usage:"
|
echo "Usage:"
|
||||||
echo "recordvm.sh iso_path [--recreate-images] [-h]"
|
echo "recordvm.sh iso_path [--only-recreate-images] [-h]"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@ -18,7 +18,7 @@ opts=($@)
|
|||||||
|
|
||||||
while test -n "$1" ; do
|
while test -n "$1" ; do
|
||||||
case $1 in
|
case $1 in
|
||||||
"--recreate-images") RECREATE_IMAGES=1;;
|
"--only-recreate-images") ONLY_RECREATE_IMAGES=1;;
|
||||||
"-h") usage; exit 0 ;;
|
"-h") usage; exit 0 ;;
|
||||||
*) if [ -z "$ISO_PATH" ]; then
|
*) if [ -z "$ISO_PATH" ]; then
|
||||||
ISO_PATH=$1
|
ISO_PATH=$1
|
||||||
@ -57,12 +57,22 @@ fi
|
|||||||
VIEWMODE=1
|
VIEWMODE=1
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! "$RECREATE_IMAGES" ]; then
|
echo $ISO_NAME | grep $ISO_VERSION >/dev/null || {
|
||||||
|
echo "makedist-recordvm: ERROR: iso file passed as input does not contain versione; running in view mode only."
|
||||||
|
VIEWMODE=1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ ! "$ONLY_RECREATE_IMAGES" ]; then
|
||||||
echo "Preparing ISO image $ISO_PATH"
|
echo "Preparing ISO image $ISO_PATH"
|
||||||
ln -sf $ISO_PATH $RECORDVM_DATA/recordvm.iso
|
ln -sf $ISO_PATH $RECORDVM_DATA/recordvm.iso
|
||||||
|
[ -e /tmp/.X$X_DISPLAY-lock ] && X_PID=`cat /tmp/.X$X_DISPLAY-lock`
|
||||||
|
if [ "$X_PID" ]; then
|
||||||
|
echo "Warning: an X server seems already running on display $X_DISPLAY with pid $X_PID; killing."
|
||||||
|
kill -9 $X_PID
|
||||||
|
fi
|
||||||
echo "Starting virtual machine for $ISO_PATH"
|
echo "Starting virtual machine for $ISO_PATH"
|
||||||
export HOME=$RECORDVM_DATA
|
export HOME=$RECORDVM_DATA
|
||||||
xinit -- $VBOX_DISPLAY &
|
xinit -- :$X_DISPLAY &
|
||||||
|
|
||||||
if [ "$VBOX" ]; then
|
if [ "$VBOX" ]; then
|
||||||
trap "VBoxManage controlvm $VBOX_VMNAME poweroff" INT QUIT TSTP
|
trap "VBoxManage controlvm $VBOX_VMNAME poweroff" INT QUIT TSTP
|
||||||
@ -79,12 +89,14 @@ if [ ! "$RECREATE_IMAGES" ]; then
|
|||||||
fi
|
fi
|
||||||
let sleepcnt=sleepcnt+1
|
let sleepcnt=sleepcnt+1
|
||||||
done
|
done
|
||||||
WINID=`xwininfo -display $VBOX_DISPLAY -name "$VBOX_VMNAME - Oracle VM VirtualBox" 2>/dev/null |grep "Window id:"| sed "s|.*Window id: \([0-9a-fx]*\).*|\1|"`
|
WINID=`xwininfo -display :$X_DISPLAY -name "$VBOX_VMNAME - Oracle VM VirtualBox" 2>/dev/null |grep "Window id:"| sed "s|.*Window id: \([0-9a-fx]*\).*|\1|"`
|
||||||
|
VOFFSET=0
|
||||||
VBoxManage controlvm $VBOX_VMNAME reset
|
VBoxManage controlvm $VBOX_VMNAME reset
|
||||||
else
|
else
|
||||||
sleepcnt=0
|
sleepcnt=0
|
||||||
while true; do
|
while true; do
|
||||||
WINID=`xwininfo -display $VBOX_DISPLAY -name "QEMU (qemu-recordvm)" 2>/dev/null |grep "Window id:"| sed "s|.*Window id: \([0-9a-fx]*\).*|\1|"`
|
# WINID=`xwininfo -display :$X_DISPLAY -name "QEMU (qemu-recordvm)" 2>/dev/null |grep "Window id:"| sed "s|.*Window id: \([0-9a-fx]*\).*|\1|"`
|
||||||
|
WINID=`xwininfo -display :$X_DISPLAY -root -children 2>/dev/null | grep qemu-recordvm | awk '{ print $1; }' 2>/dev/null`
|
||||||
[ "$WINID" ] && break
|
[ "$WINID" ] && break
|
||||||
if [ $sleepcnt -gt 20 ]; then
|
if [ $sleepcnt -gt 20 ]; then
|
||||||
echo "qemu did not start; aborting."
|
echo "qemu did not start; aborting."
|
||||||
@ -93,6 +105,8 @@ if [ ! "$RECREATE_IMAGES" ]; then
|
|||||||
let sleepcnt=sleepcnt+1
|
let sleepcnt=sleepcnt+1
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
# since qemu 1.5 skip top menu when capturing
|
||||||
|
VOFFSET=24
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Windowid is: $WINID"
|
echo "Windowid is: $WINID"
|
||||||
@ -100,8 +114,8 @@ if [ ! "$RECREATE_IMAGES" ]; then
|
|||||||
if [ ! "$VIEWMODE" ]; then
|
if [ ! "$VIEWMODE" ]; then
|
||||||
echo "Capturing window output"
|
echo "Capturing window output"
|
||||||
mkdir -p $ISO_DIR/preview/
|
mkdir -p $ISO_DIR/preview/
|
||||||
DBUS_SESSION_BUS_ADDRESS= HOME=$RECORDVM_DATA DISPLAY=$VBOX_DISPLAY xvidcap \
|
DBUS_SESSION_BUS_ADDRESS= HOME=$RECORDVM_DATA DISPLAY=:$X_DISPLAY xvidcap \
|
||||||
--cap_geometry 1024x768+0+0 \
|
--cap_geometry 1024x768+0+$VOFFSET \
|
||||||
--verbose 2 --gui no --audio no \
|
--verbose 2 --gui no --audio no \
|
||||||
--time $EXECUTION_TIME --file $ISO_DIR/preview/${ISO_NAME}${VIDEO_EXT} \
|
--time $EXECUTION_TIME --file $ISO_DIR/preview/${ISO_NAME}${VIDEO_EXT} \
|
||||||
--quality 100 >>$RECORDVM_DATA/recordvm.log
|
--quality 100 >>$RECORDVM_DATA/recordvm.log
|
||||||
@ -111,32 +125,53 @@ if [ ! "$RECREATE_IMAGES" ]; then
|
|||||||
|
|
||||||
echo "Powering off VM"
|
echo "Powering off VM"
|
||||||
if [ "$VBOX" ]; then
|
if [ "$VBOX" ]; then
|
||||||
VBoxManage controlvm $VBOX_VMNAME poweroff &
|
# Virtualbox
|
||||||
|
VBoxManage controlvm $VBOX_VMNAME poweroff &
|
||||||
|
|
||||||
count=0
|
count=0
|
||||||
while [ "`pidof VBoxManage`" ]; do
|
while [ "`pidof VBoxManage`" ]; do
|
||||||
let count=count+1
|
let count=count+1
|
||||||
sleep 1
|
sleep 1
|
||||||
if [ $count -gt 60 ]; then
|
if [ $count -gt 60 ]; then
|
||||||
killall -9 VBoxManage
|
killall -9 VBoxManage
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
xkill -id $WINID -display $VBOX_DISPLAY
|
# Qemu
|
||||||
|
if [ "$WINID" ]; then
|
||||||
|
xkill -id $WINID -display :$X_DISPLAY || true
|
||||||
|
fi
|
||||||
|
sleep 10
|
||||||
|
# workaround for safety
|
||||||
|
QEMU_PID=`pidof qemu-system-x86_64`
|
||||||
|
if [ "$QEMU_PID" ]; then
|
||||||
|
for p in $QEMU_PID; do
|
||||||
|
grep qemu-recordvm /proc/$p/cmdline && kill -9 $p
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
# FIXME: sleep here as a workaround attempt for script aborting sometimes
|
||||||
|
fi
|
||||||
|
[ -e /tmp/.X$X_DISPLAY-lock ] && X_PID=`cat /tmp/.X$X_DISPLAY-lock`
|
||||||
|
if [ "$X_PID" ]; then
|
||||||
|
echo "Warning: X server seems to be still running on display $X_DISPLAY with pid $X_PID; killing."
|
||||||
|
kill -9 $X_PID
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! "$VIEWMODE" ]; then
|
if [ ! "$VIEWMODE" ]; then
|
||||||
echo "Creating preview images"
|
echo "Creating preview images"
|
||||||
rm -f $ISO_DIR/preview/image-${ISO_ARCH}-*.jpg
|
rm -f $ISO_DIR/preview/image-${ISO_ARCH}-*.jpg
|
||||||
ffmpeg -y -i $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT} -r 0.1 -f image2 $ISO_DIR/preview/image-${ISO_ARCH}-%02d.jpg >/dev/null
|
ffmpeg -y -i $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT} -r 0.1 -f image2 $ISO_DIR/preview/image-${ISO_ARCH}-%02d.jpg >/dev/null || \
|
||||||
|
echo "ERROR: ffmpeg exited with code: $?"
|
||||||
for i in `seq 22 -1 1`; do
|
for i in `seq 22 -1 1`; do
|
||||||
f=`printf %02d $i`
|
f=`printf %02d $i`
|
||||||
convert -resize 50x40 $ISO_DIR/preview/image-${ISO_ARCH}-$f.jpg $ISO_DIR/preview/image-${ISO_ARCH}-$f-50x40.jpg
|
convert -resize 50x40 $ISO_DIR/preview/image-${ISO_ARCH}-$f.jpg $ISO_DIR/preview/image-${ISO_ARCH}-$f-50x40.jpg || \
|
||||||
|
echo "ERROR: convert exited with code: $?"
|
||||||
done
|
done
|
||||||
for i in `seq 22 -1 1`; do
|
for i in `seq 22 -1 1`; do
|
||||||
f=`printf %02d $i`
|
f=`printf %02d $i`
|
||||||
|
rm -f $ISO_DIR/preview/preview-${ISO_ARCH}-*.jpg
|
||||||
[ -e $ISO_DIR/preview/image-${ISO_ARCH}-$f.jpg ] && {
|
[ -e $ISO_DIR/preview/image-${ISO_ARCH}-$f.jpg ] && {
|
||||||
convert -resize 320x200 $ISO_DIR/preview/image-${ISO_ARCH}-$f.jpg $ISO_DIR/preview/preview-${ISO_ARCH}-$ISO_VERSION.jpg
|
convert -resize 320x200 $ISO_DIR/preview/image-${ISO_ARCH}-$f.jpg $ISO_DIR/preview/preview-${ISO_ARCH}-$ISO_VERSION.jpg
|
||||||
ln -sf preview-${ISO_ARCH}-$ISO_VERSION.jpg $ISO_DIR/preview/preview-${ISO_ARCH}.jpg
|
ln -sf preview-${ISO_ARCH}-$ISO_VERSION.jpg $ISO_DIR/preview/preview-${ISO_ARCH}.jpg
|
||||||
@ -146,9 +181,9 @@ if [ ! "$VIEWMODE" ]; then
|
|||||||
}
|
}
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! "$RECREATE_IMAGES" ]; then
|
if [ ! "$ONLY_RECREATE_IMAGES" ]; then
|
||||||
echo "Creating ${VIDEO_EXT2} video from ${VIDEO_EXT}"
|
echo "Creating ${VIDEO_EXT2} video from ${VIDEO_EXT}"
|
||||||
ffmpeg2theora -y -i $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT} $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT2} >/dev/null
|
ffmpeg2theora -o $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT2} $ISO_DIR/preview/$ISO_NAME${VIDEO_EXT} >/dev/null
|
||||||
|
|
||||||
# cleanup old files
|
# cleanup old files
|
||||||
for f in `ls $ISO_DIR/preview/*.${ISO_ARCH}.*${VIDEO_EXT}`; do
|
for f in `ls $ISO_DIR/preview/*.${ISO_ARCH}.*${VIDEO_EXT}`; do
|
||||||
@ -157,6 +192,10 @@ if [ ! "$VIEWMODE" ]; then
|
|||||||
for f in `ls $ISO_DIR/preview/*.${ISO_ARCH}.*${VIDEO_EXT2}`; do
|
for f in `ls $ISO_DIR/preview/*.${ISO_ARCH}.*${VIDEO_EXT2}`; do
|
||||||
[ "$f" = "$ISO_DIR/preview/$ISO_NAME${VIDEO_EXT2}" ] || rm -f $f
|
[ "$f" = "$ISO_DIR/preview/$ISO_NAME${VIDEO_EXT2}" ] || rm -f $f
|
||||||
done
|
done
|
||||||
|
|
||||||
|
ln -snf $ISO_NAME${VIDEO_EXT} $ISO_DIR/preview/${ISO_NAME/-$ISO_VERSION}${VIDEO_EXT}
|
||||||
|
ln -snf $ISO_NAME${VIDEO_EXT2} $ISO_DIR/preview/${ISO_NAME/-$ISO_VERSION}${VIDEO_EXT2}
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -254,6 +254,7 @@ _EOF
|
|||||||
echo "do_makedist_and_html: calling do_makedist \"$SOURCEIMGFILEPREFIX-$PRODNAME-$l.${a}.${MEDIUMSUFFIX}\" \"$DESTNAME\" \"${l}\" \"${MEDIUMPLATFORM}\" \"${MEDIUMSUBPLATFORM}\" \"$PRODNAME\" \"${a}\""
|
echo "do_makedist_and_html: calling do_makedist \"$SOURCEIMGFILEPREFIX-$PRODNAME-$l.${a}.${MEDIUMSUFFIX}\" \"$DESTNAME\" \"${l}\" \"${MEDIUMPLATFORM}\" \"${MEDIUMSUBPLATFORM}\" \"$PRODNAME\" \"${a}\""
|
||||||
do_makedist "$SOURCEIMGFILEPREFIX-$PRODNAME-$l.${a}.${MEDIUMSUFFIX}" "$DESTNAME" "${l}" "${MEDIUMPLATFORM}" "${MEDIUMSUBPLATFORM}" "$PRODNAME" "${a}"
|
do_makedist "$SOURCEIMGFILEPREFIX-$PRODNAME-$l.${a}.${MEDIUMSUFFIX}" "$DESTNAME" "${l}" "${MEDIUMPLATFORM}" "${MEDIUMSUBPLATFORM}" "$PRODNAME" "${a}"
|
||||||
DIST_CREATED=$?
|
DIST_CREATED=$?
|
||||||
|
[ "$DIST_CREATED" = "255" ] && return 255
|
||||||
|
|
||||||
DESTDIR=$DESTBASEDIR/${PRODNAME}/${l}
|
DESTDIR=$DESTBASEDIR/${PRODNAME}/${l}
|
||||||
DESTIMG=$DESTDIR/$DESTNAME
|
DESTIMG=$DESTDIR/$DESTNAME
|
||||||
@ -306,11 +307,11 @@ _EOF
|
|||||||
chmod +r $DESTHTML
|
chmod +r $DESTHTML
|
||||||
if [ "$DIST_CREATED" = "1" ]; then
|
if [ "$DIST_CREATED" = "1" ]; then
|
||||||
# snapshots
|
# snapshots
|
||||||
makedist-announcement --rebuild-announcement --send-email $DISTVERSION $PRODNAME
|
makedist-announcement --rebuild-announcement --send-email -y $DISTVERSION $PRODNAME
|
||||||
elif [ "$RELEASEPLATFORM" = "$MEDIUMPLATFORM" -a \
|
elif [ "$RELEASEPLATFORM" = "$MEDIUMPLATFORM" -a \
|
||||||
"$RELEASESUBPLATFORM" = "$MEDIUMSUBPLATFORM" ]; then
|
"$RELEASESUBPLATFORM" = "$MEDIUMSUBPLATFORM" -a "$HTMLLANG" = "en" ]; then
|
||||||
# stable
|
# stable
|
||||||
makedist-announcement --rebuild-announcement --send-test-email $DISTVERSION $PRODNAME
|
makedist-announcement --rebuild-announcement --send-test-email -y $DISTVERSION $PRODNAME
|
||||||
fi
|
fi
|
||||||
return $DIST_CREATED
|
return $DIST_CREATED
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
. /etc/sysconfig/makedist
|
. /etc/sysconfig/makedist
|
||||||
SOURCEDIR=/var/makedist
|
SOURCEDIR=/var/makedist
|
||||||
DESTBASEDIR=/var/ftp/pub/openmamba/devel/media
|
MILESTONES="milestone2 devel"
|
||||||
DESTBASEURL=/pub/openmamba/devel/media
|
DESTBASEURL=/pub/openmamba/devel/media
|
||||||
[ "$TODAYDATE" ] || TODAYDATE=`date +%Y%m%d`
|
[ "$TODAYDATE" ] || TODAYDATE=`date +%Y%m%d`
|
||||||
GLOBDOWNLOADSFILE=$DESTBASEDIR/downloads.inc
|
GLOBDOWNLOADSFILE=$DESTBASEDIR/downloads.inc
|
||||||
@ -18,9 +18,12 @@ tmpfile=`mktemp`
|
|||||||
echo "Error: cannot create temporary files; aborting."
|
echo "Error: cannot create temporary files; aborting."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
for l in $LANGS; do
|
|
||||||
for d in `find $DESTBASEDIR/*/$l -maxdepth 0 -type d`; do
|
for m in $MILESTONES; do
|
||||||
for a in $ARCHS; do
|
DESTBASEDIR=/var/ftp/pub/openmamba/$m/media
|
||||||
|
for l in $LANGS; do
|
||||||
|
for d in `find $DESTBASEDIR/*/$l -maxdepth 0 -type d`; do
|
||||||
|
for a in $ARCHS; do
|
||||||
> $tmpfile
|
> $tmpfile
|
||||||
# the following code was used to recover when unetbootin symlink was added causing all iso to be moved
|
# the following code was used to recover when unetbootin symlink was added causing all iso to be moved
|
||||||
#for f in `find $d -type l`; do
|
#for f in `find $d -type l`; do
|
||||||
@ -63,10 +66,11 @@ for l in $LANGS; do
|
|||||||
else
|
else
|
||||||
[ "$VERBOSE" -o "$SIMULATE" ] && echo "KEEP old/$f ($SNAPSHOT_DATE)"
|
[ "$VERBOSE" -o "$SIMULATE" ] && echo "KEEP old/$f ($SNAPSHOT_DATE)"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
# echo
|
# echo
|
||||||
# ls --sort=time $d/*.iso $d/*.cpio.gz
|
# ls --sort=time $d/*.iso $d/*.cpio.gz
|
||||||
#find $DESTBASEDIR -name *.iso
|
#find $DESTBASEDIR -name *.iso
|
||||||
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@ -9,9 +9,15 @@ PORT_DEST_REPOSITORY="devel"
|
|||||||
PORT_AUTODIST_USER="silvan"
|
PORT_AUTODIST_USER="silvan"
|
||||||
RPM_GPG_KEY=/etc/pki/rpm-gpg/RPM-GPG-KEY-Mambasoft
|
RPM_GPG_KEY=/etc/pki/rpm-gpg/RPM-GPG-KEY-Mambasoft
|
||||||
|
|
||||||
|
if [ "$ARCH" = "i586" ]; then
|
||||||
REPOSITORY=(
|
REPOSITORY=(
|
||||||
/var/ftp/pub/openmamba/devel
|
/var/ftp/pub/openmamba/devel
|
||||||
/var/ftp/pub/openmamba/devel-games
|
/var/ftp/pub/openmamba/devel-games
|
||||||
/var/ftp/pub/openmamba/devel-makedist
|
/var/ftp/pub/openmamba/devel-makedist
|
||||||
/var/ftp/private/openmamba/private
|
|
||||||
)
|
)
|
||||||
|
else
|
||||||
|
REPOSITORY=(
|
||||||
|
/var/ftp/pub/openmamba/devel
|
||||||
|
/var/ftp/pub/openmamba/devel-games
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
131
config/makedist
131
config/makedist
@ -9,6 +9,7 @@ HTML_LANGS="it en"
|
|||||||
MAKEDIST_CRON_ENABLE=1
|
MAKEDIST_CRON_ENABLE=1
|
||||||
|
|
||||||
# announcements configuration
|
# announcements configuration
|
||||||
|
#ANNOUNCEMENTS_SIGNER="Signer Name"
|
||||||
#ANNOUNCEMENTS_EMAILS_TEST="test@example.com"
|
#ANNOUNCEMENTS_EMAILS_TEST="test@example.com"
|
||||||
#ANNOUNCEMENTS_EMAILS_STABLE_EN="stable-users@example.com"
|
#ANNOUNCEMENTS_EMAILS_STABLE_EN="stable-users@example.com"
|
||||||
#ANNOUNCEMENTS_EMAILS_STABLE_IT="utenti-stabile@example.com"
|
#ANNOUNCEMENTS_EMAILS_STABLE_IT="utenti-stabile@example.com"
|
||||||
@ -110,14 +111,30 @@ if [ "$RELEASE" ]; then
|
|||||||
MEDIA_ARCHS[4]="i586"
|
MEDIA_ARCHS[4]="i586"
|
||||||
MEDIA_BUILDDAY[4]=8
|
MEDIA_BUILDDAY[4]=8
|
||||||
|
|
||||||
MEDIA_NAME[5]=sdk-root
|
# MEDIA_NAME[5]=sdk-root
|
||||||
|
# MEDIA_TARGET[5]=openmamba
|
||||||
|
# MEDIA_PLATFORM[5]=sdk-root
|
||||||
|
# MEDIA_SUBPLATFORM[5]=
|
||||||
|
# MEDIA_LANGUAGES[5]="it en es"
|
||||||
|
# MEDIA_ARCHS[5]="arm i586"
|
||||||
|
# MEDIA_BUILDDAY[5]=8
|
||||||
|
|
||||||
|
MEDIA_NAME[5]=rootfs-light
|
||||||
MEDIA_TARGET[5]=openmamba
|
MEDIA_TARGET[5]=openmamba
|
||||||
MEDIA_PLATFORM[5]=sdk-root
|
MEDIA_PLATFORM[5]=rootfs-light
|
||||||
MEDIA_SUBPLATFORM[5]=
|
MEDIA_SUBPLATFORM[5]=
|
||||||
MEDIA_LANGUAGES[5]="it en es"
|
MEDIA_LANGUAGES[5]="it en es"
|
||||||
MEDIA_ARCHS[5]="arm i586"
|
MEDIA_ARCHS[5]="arm i586"
|
||||||
MEDIA_BUILDDAY[5]=8
|
MEDIA_BUILDDAY[5]=8
|
||||||
|
|
||||||
|
MEDIA_NAME[6]=rootfs
|
||||||
|
MEDIA_TARGET[6]=openmamba
|
||||||
|
MEDIA_PLATFORM[6]=rootfs
|
||||||
|
MEDIA_SUBPLATFORM[6]=
|
||||||
|
MEDIA_LANGUAGES[6]="it en es"
|
||||||
|
MEDIA_ARCHS[6]="arm i586"
|
||||||
|
MEDIA_BUILDDAY[6]=8
|
||||||
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Error: DISTVERSION was not specified or is invalid for RELEASE target; aborting."
|
echo "Error: DISTVERSION was not specified or is invalid for RELEASE target; aborting."
|
||||||
@ -134,87 +151,95 @@ else
|
|||||||
MEDIA_PLATFORM[0]=livecd
|
MEDIA_PLATFORM[0]=livecd
|
||||||
MEDIA_SUBPLATFORM[0]=livecd-root
|
MEDIA_SUBPLATFORM[0]=livecd-root
|
||||||
MEDIA_LANGUAGES[0]="it en es"
|
MEDIA_LANGUAGES[0]="it en es"
|
||||||
MEDIA_ARCHS[0]="i586"
|
MEDIA_ARCHS[0]="i586 x86_64"
|
||||||
MEDIA_BUILDDAY[0]=1
|
MEDIA_BUILDDAY[0]=5
|
||||||
|
|
||||||
MEDIA_NAME[1]=livedvd
|
MEDIA_NAME[1]=livedvd
|
||||||
MEDIA_TARGET[1]=openmamba
|
MEDIA_TARGET[1]=openmamba
|
||||||
MEDIA_PLATFORM[1]=livedvd
|
MEDIA_PLATFORM[1]=livedvd
|
||||||
MEDIA_SUBPLATFORM[1]=livedvd-root
|
MEDIA_SUBPLATFORM[1]=livedvd-root
|
||||||
MEDIA_LANGUAGES[1]="it en es"
|
MEDIA_LANGUAGES[1]="en"
|
||||||
MEDIA_ARCHS[1]="i586"
|
MEDIA_ARCHS[1]="i586 x86_64"
|
||||||
MEDIA_BUILDDAY[1]=4
|
MEDIA_BUILDDAY[1]=6
|
||||||
|
|
||||||
MEDIA_NAME[2]=livecd-light
|
MEDIA_NAME[2]=livecd-light
|
||||||
MEDIA_TARGET[2]=openmamba
|
MEDIA_TARGET[2]=openmamba
|
||||||
MEDIA_PLATFORM[2]=livecd
|
MEDIA_PLATFORM[2]=livecd
|
||||||
MEDIA_SUBPLATFORM[2]=livecd-light-root
|
MEDIA_SUBPLATFORM[2]=livecd-light-root
|
||||||
MEDIA_LANGUAGES[2]="it en es"
|
MEDIA_LANGUAGES[2]="it en es"
|
||||||
MEDIA_ARCHS[2]="i586"
|
MEDIA_ARCHS[2]="i586 x86_64"
|
||||||
MEDIA_BUILDDAY[2]=5
|
MEDIA_BUILDDAY[2]=2
|
||||||
|
|
||||||
MEDIA_NAME[3]=livegames
|
MEDIA_NAME[3]=livecd-gnome
|
||||||
MEDIA_TARGET[3]=openmamba
|
MEDIA_TARGET[3]=openmamba
|
||||||
MEDIA_PLATFORM[3]=livecd
|
MEDIA_PLATFORM[3]=livecd
|
||||||
MEDIA_SUBPLATFORM[3]=livegames-root
|
MEDIA_SUBPLATFORM[3]=livecd-gnome-root
|
||||||
MEDIA_LANGUAGES[3]="it en es"
|
MEDIA_LANGUAGES[3]="it en es"
|
||||||
MEDIA_ARCHS[3]="i586"
|
MEDIA_ARCHS[3]="i586"
|
||||||
MEDIA_BUILDDAY[3]=7
|
MEDIA_BUILDDAY[3]=3
|
||||||
|
|
||||||
MEDIA_NAME[4]=livecd-gnome
|
MEDIA_NAME[4]=testcd
|
||||||
MEDIA_TARGET[4]=openmamba
|
MEDIA_TARGET[4]=openmamba
|
||||||
MEDIA_PLATFORM[4]=livecd
|
MEDIA_PLATFORM[4]=testcd
|
||||||
MEDIA_SUBPLATFORM[4]=livecd-gnome-root
|
MEDIA_SUBPLATFORM[4]=testcd-root
|
||||||
MEDIA_LANGUAGES[4]="it en es"
|
MEDIA_LANGUAGES[4]="it en es"
|
||||||
MEDIA_ARCHS[4]="i586"
|
MEDIA_ARCHS[4]="i586"
|
||||||
MEDIA_BUILDDAY[4]=6
|
MEDIA_BUILDDAY[4]=1
|
||||||
|
|
||||||
MEDIA_NAME[5]=bootusb
|
MEDIA_NAME[5]=rootfs
|
||||||
MEDIA_TARGET[5]=openmamba
|
MEDIA_TARGET[5]=openmamba
|
||||||
MEDIA_PLATFORM[5]=bootusb
|
MEDIA_PLATFORM[5]=rootfs
|
||||||
MEDIA_SUBPLATFORM[5]=
|
MEDIA_SUBPLATFORM[5]=
|
||||||
MEDIA_LANGUAGES[5]="it en es"
|
MEDIA_LANGUAGES[5]="it en es"
|
||||||
MEDIA_ARCHS[5]="i586"
|
MEDIA_ARCHS[5]="arm i586"
|
||||||
MEDIA_BUILDDAY[5]=7
|
MEDIA_BUILDDAY[5]=4
|
||||||
|
|
||||||
MEDIA_NAME[6]=testcd
|
MEDIA_NAME[6]=rootfs-light
|
||||||
MEDIA_TARGET[6]=openmamba
|
MEDIA_TARGET[6]=openmamba
|
||||||
MEDIA_PLATFORM[6]=testcd
|
MEDIA_PLATFORM[6]=rootfs-light
|
||||||
MEDIA_SUBPLATFORM[6]=testcd-root
|
MEDIA_SUBPLATFORM[6]=
|
||||||
MEDIA_LANGUAGES[6]="it en es"
|
MEDIA_LANGUAGES[6]="it en es"
|
||||||
MEDIA_ARCHS[6]="i586"
|
MEDIA_ARCHS[6]="arm i586 x86_64"
|
||||||
MEDIA_BUILDDAY[6]=3
|
MEDIA_BUILDDAY[6]=7
|
||||||
|
|
||||||
MEDIA_NAME[7]=bootusb-test
|
# MEDIA_NAME[7]=bootcd
|
||||||
MEDIA_TARGET[7]=openmamba
|
# MEDIA_TARGET[7]=openmamba
|
||||||
MEDIA_PLATFORM[7]=bootusb-test
|
# MEDIA_PLATFORM[7]=bootcd
|
||||||
MEDIA_SUBPLATFORM[7]=
|
# MEDIA_SUBPLATFORM[7]=
|
||||||
MEDIA_LANGUAGES[7]="it en es"
|
# MEDIA_LANGUAGES[7]="it en es"
|
||||||
MEDIA_ARCHS[7]="i586"
|
# MEDIA_ARCHS[7]="i586 x86_64"
|
||||||
MEDIA_BUILDDAY[7]=3
|
# MEDIA_BUILDDAY[7]=3
|
||||||
|
|
||||||
MEDIA_NAME[8]=sdk-root
|
# MEDIA_NAME[3]=livegames
|
||||||
MEDIA_TARGET[8]=openmamba
|
# MEDIA_TARGET[3]=openmamba
|
||||||
MEDIA_PLATFORM[8]=sdk-root
|
# MEDIA_PLATFORM[3]=livecd
|
||||||
MEDIA_SUBPLATFORM[8]=
|
# MEDIA_SUBPLATFORM[3]=livegames-root
|
||||||
MEDIA_LANGUAGES[8]="it en es"
|
# MEDIA_LANGUAGES[3]="it en es"
|
||||||
MEDIA_ARCHS[8]="arm i586"
|
# MEDIA_ARCHS[3]="i586"
|
||||||
MEDIA_BUILDDAY[8]=2
|
# MEDIA_BUILDDAY[3]=8
|
||||||
|
|
||||||
MEDIA_NAME[9]=rootfs
|
# MEDIA_NAME[5]=bootusb
|
||||||
MEDIA_TARGET[9]=openmamba
|
# MEDIA_TARGET[5]=openmamba
|
||||||
MEDIA_PLATFORM[9]=rootfs
|
# MEDIA_PLATFORM[5]=bootusb
|
||||||
MEDIA_SUBPLATFORM[9]=
|
# MEDIA_SUBPLATFORM[5]=
|
||||||
MEDIA_LANGUAGES[9]="it en es"
|
# MEDIA_LANGUAGES[5]="it en es"
|
||||||
MEDIA_ARCHS[9]="arm i586"
|
# MEDIA_ARCHS[5]="i586 x86_64"
|
||||||
MEDIA_BUILDDAY[9]=5
|
# MEDIA_BUILDDAY[5]=7
|
||||||
|
|
||||||
MEDIA_NAME[10]=bootcd
|
# MEDIA_NAME[7]=bootusb-test
|
||||||
MEDIA_TARGET[10]=openmamba
|
# MEDIA_TARGET[7]=openmamba
|
||||||
MEDIA_PLATFORM[10]=bootcd
|
# MEDIA_PLATFORM[7]=bootusb-test
|
||||||
MEDIA_SUBPLATFORM[10]=
|
# MEDIA_SUBPLATFORM[7]=
|
||||||
MEDIA_LANGUAGES[10]="it en es"
|
# MEDIA_LANGUAGES[7]="it en es"
|
||||||
MEDIA_ARCHS[10]="i586"
|
# MEDIA_ARCHS[7]="i586"
|
||||||
MEDIA_BUILDDAY[10]=1
|
# MEDIA_BUILDDAY[7]=7
|
||||||
|
|
||||||
|
# MEDIA_NAME[8]=sdk-root
|
||||||
|
# MEDIA_TARGET[8]=openmamba
|
||||||
|
# MEDIA_PLATFORM[8]=sdk-root
|
||||||
|
# MEDIA_SUBPLATFORM[8]=
|
||||||
|
# MEDIA_LANGUAGES[8]="it en es"
|
||||||
|
# MEDIA_ARCHS[8]="arm i586"
|
||||||
|
# MEDIA_BUILDDAY[8]=8
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -177,6 +177,7 @@ PASSED_DISTROMATIC=$PASSED_DISTROMATIC
|
|||||||
PASSED_RELEASE=$PASSED_RELEASE
|
PASSED_RELEASE=$PASSED_RELEASE
|
||||||
PASSED_VARIANT=$PASSED_VARIANT
|
PASSED_VARIANT=$PASSED_VARIANT
|
||||||
RPM_GPG_KEY=$RPM_GPG_KEY
|
RPM_GPG_KEY=$RPM_GPG_KEY
|
||||||
|
MULTILANGUAGE="$MULTILANGUAGE"
|
||||||
_EOF
|
_EOF
|
||||||
|
|
||||||
for c in `seq 1 ${#REPOSITORY[*]}`; do
|
for c in `seq 1 ${#REPOSITORY[*]}`; do
|
||||||
|
@ -56,6 +56,9 @@ function add_additional_defs_file() {
|
|||||||
|
|
||||||
[ -e ${MOUNTDIR}/${ADDITIONAL_DEFS_FILE} ] || return 1
|
[ -e ${MOUNTDIR}/${ADDITIONAL_DEFS_FILE} ] || return 1
|
||||||
|
|
||||||
|
# switching to using internal 'rpm -q' is problematic when cross building, so clean it
|
||||||
|
clean_rpm_database
|
||||||
|
|
||||||
echo "Adding additional defs file $1 from $MOUNTDIR to Makefile..."
|
echo "Adding additional defs file $1 from $MOUNTDIR to Makefile..."
|
||||||
|
|
||||||
local tmpfile=`mktemp -q -t makedist.XXXXXXXX.tmp`
|
local tmpfile=`mktemp -q -t makedist.XXXXXXXX.tmp`
|
||||||
@ -73,9 +76,7 @@ function add_additional_defs_file() {
|
|||||||
rm -f ${tmpfile}
|
rm -f ${tmpfile}
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_rpm_database() {
|
function initialize_root_dir() {
|
||||||
# RPM database initialization
|
|
||||||
#
|
|
||||||
echo "Mounting tmpfs on MOUNTDIR (size=$MOUNTDIR_TMPFS_SIZE)..."
|
echo "Mounting tmpfs on MOUNTDIR (size=$MOUNTDIR_TMPFS_SIZE)..."
|
||||||
[ "$MOUNTDIR" == "" -o "$MOUNTDIR" == "/" ] && {
|
[ "$MOUNTDIR" == "" -o "$MOUNTDIR" == "/" ] && {
|
||||||
echo "$makedist_me: dangerous: MOUNTDIR is empty, aborting."
|
echo "$makedist_me: dangerous: MOUNTDIR is empty, aborting."
|
||||||
@ -95,12 +96,25 @@ function create_rpm_database() {
|
|||||||
mount -o bind /proc $MOUNTDIR/proc
|
mount -o bind /proc $MOUNTDIR/proc
|
||||||
trap "[ -e $MOUNTDIR/proc/version ] && umount $MOUNTDIR/proc; [ \"$MOUNTDIR_TMPFS\" ] && umount $MOUNTDIR_TMPFS" 0 HUP INT QUIT ABRT KILL TERM
|
trap "[ -e $MOUNTDIR/proc/version ] && umount $MOUNTDIR/proc; [ \"$MOUNTDIR_TMPFS\" ] && umount $MOUNTDIR_TMPFS" 0 HUP INT QUIT ABRT KILL TERM
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function create_rpm_database() {
|
||||||
|
# RPM database initialization
|
||||||
|
#
|
||||||
echo "RPM database initialization..."
|
echo "RPM database initialization..."
|
||||||
|
|
||||||
[ -e $MOUNTDIR/var/lib/rpm ] && rm -rf $MOUNTDIR/var/lib/rpm
|
[ -e $MOUNTDIR/var/lib/rpm ] && rm -rf $MOUNTDIR/var/lib/rpm
|
||||||
|
|
||||||
[ "$MEDIUM_NAME" ] || MEDIUM_NAME=`medium_name`
|
[ "$MEDIUM_NAME" ] || MEDIUM_NAME=`medium_name`
|
||||||
BUILDSCRIPT_NAME=${MEDIUM_NAME}.build.sh
|
BUILDSCRIPT_NAME=${MEDIUM_NAME}.build.sh
|
||||||
|
|
||||||
|
if [ "$RPM_CHROOT" ]; then
|
||||||
|
RPM_CHROOT_PREFIX="chroot $MOUNTDIR"
|
||||||
|
RPM_ROOT_APPEND=
|
||||||
|
else
|
||||||
|
RPM_CHROOT_PREFIX=
|
||||||
|
RPM_ROOT_APPEND="-r $MOUNTDIR"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "#!/bin/sh
|
echo "#!/bin/sh
|
||||||
# Build script generated by makedist for ${MAKEDIST_TARGET} ${PLATFORM} platform
|
# Build script generated by makedist for ${MAKEDIST_TARGET} ${PLATFORM} platform
|
||||||
@ -111,15 +125,15 @@ function create_rpm_database() {
|
|||||||
#
|
#
|
||||||
MOUNTDIR=$MOUNTDIR
|
MOUNTDIR=$MOUNTDIR
|
||||||
mkdir -p \$MOUNTDIR/var/lib/rpm
|
mkdir -p \$MOUNTDIR/var/lib/rpm
|
||||||
$RPM -r \$MOUNTDIR --initdb" > ${LOCALSTATEDIR}/${BUILDSCRIPT_NAME}
|
$RPM_CHROOT_PREFIX $RPM $RPM_ROOT_APPEND --initdb" > ${LOCALSTATEDIR}/${BUILDSCRIPT_NAME}
|
||||||
|
|
||||||
mkdir -p $MOUNTDIR/var/lib/rpm
|
mkdir -p $MOUNTDIR/var/lib/rpm
|
||||||
$RPM -r $MOUNTDIR --initdb ||
|
$RPM_CHROOT_PREFIX $RPM $RPM_ROOT_APPEND --initdb ||
|
||||||
{ echo "$makedist_me: unable to initialize the RPM database" >&2
|
{ echo "$makedist_me: unable to initialize the RPM database" >&2
|
||||||
{ (exit 1); exit 1; }; }
|
{ (exit 1); exit 1; }; }
|
||||||
[ -e "$RPM_GPG_KEY" ] && {
|
[ -e "$MOUNTDIR/$RPM_GPG_KEY" ] && {
|
||||||
$RPM -r $MOUNTDIR --import $RPM_GPG_KEY
|
$RPM_CHROOT_PREFIX $RPM $RPM_ROOT_APPEND --import $RPM_GPG_KEY
|
||||||
echo "$RPM -r \$MOUNTDIR --import $RPM_GPG_KEY" >> ${LOCALSTATEDIR}/${BUILDSCRIPT_NAME}
|
echo "$RPM_CHROOT_PREFIX $RPM $RPM_ROOT_APPEND --import $RPM_GPG_KEY" >> ${LOCALSTATEDIR}/${BUILDSCRIPT_NAME}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,13 +180,13 @@ function expand_rpm_names() {
|
|||||||
set_rpm_dirs
|
set_rpm_dirs
|
||||||
|
|
||||||
for i in $1; do
|
for i in $1; do
|
||||||
a=`find $RPM_DIRS -maxdepth 1 -regex ".*/${i//+/\\+}-[^-]*-[^-]*\.rpm" | \
|
a=`find $RPM_DIRS -maxdepth 1 -regex ".*/${i//+/\\\+}-[^-]*-[^-]*\.rpm" | \
|
||||||
grep -m 1 ""`
|
grep -m 1 ""`
|
||||||
[ "$a" ] && echo -n "$a " || {
|
[ "$a" ] && echo -n "$a " || {
|
||||||
if [ "$BUILD_MISSING" -a "$BUILD_MISSING" != "0" ]; then
|
if [ "$BUILD_MISSING" -a "$BUILD_MISSING" != "0" ]; then
|
||||||
resolve_pkg_builddeps $i
|
resolve_pkg_builddeps $i
|
||||||
for j in $PKGS_RESOLVED; do
|
for j in $PKGS_RESOLVED; do
|
||||||
a=`find $RPM_DIRS -maxdepth 1 -regex ".*/${j//+/\\+}-[^-]*-[^-]*\.rpm" | \
|
a=`find $RPM_DIRS -maxdepth 1 -regex ".*/${j//+/\\\+}-[^-]*-[^-]*\.rpm" | \
|
||||||
grep -m 1 ""`
|
grep -m 1 ""`
|
||||||
[ "$a" ] || {
|
[ "$a" ] || {
|
||||||
echo "Porting package $j required by $i" > /dev/stderr
|
echo "Porting package $j required by $i" > /dev/stderr
|
||||||
@ -184,7 +198,7 @@ function expand_rpm_names() {
|
|||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
echo "Error expanding package $i: expanded rpm not found; aborting." > /dev/stderr
|
echo "Error expanding package '$i': expanded rpm not found; aborting." > /dev/stderr
|
||||||
echo "Dirs:$RPM_DIRS" > /dev/stderr
|
echo "Dirs:$RPM_DIRS" > /dev/stderr
|
||||||
return 1;
|
return 1;
|
||||||
fi
|
fi
|
||||||
@ -296,7 +310,7 @@ Installing kernel image (${KERNEL_VER}$1), modules and utilities..." \
|
|||||||
# parameters:
|
# parameters:
|
||||||
# $1 : $KERNEL_VER$KERNEL_EXTRAVER (e.g. 2.4.27preempt)
|
# $1 : $KERNEL_VER$KERNEL_EXTRAVER (e.g. 2.4.27preempt)
|
||||||
function update_modules_dependencies() {
|
function update_modules_dependencies() {
|
||||||
[ -e $MOUNTDIR/lib/modules/$1 ] && {
|
[ -e ${MOUNTDIR}/lib/modules/$1 ] && {
|
||||||
$CHROOTCMD depmod -a -F /boot/System.map-$1 $1
|
$CHROOTCMD depmod -a -F /boot/System.map-$1 $1
|
||||||
touch $MOUNTDIR/lib/modules/$1/kernel/modules.dep
|
touch $MOUNTDIR/lib/modules/$1/kernel/modules.dep
|
||||||
}
|
}
|
||||||
@ -413,22 +427,45 @@ function install_rpms() {
|
|||||||
TOINSTALL_RPMS=`expand_rpm_names "$1"` || exit 1
|
TOINSTALL_RPMS=`expand_rpm_names "$1"` || exit 1
|
||||||
TOINSTALL_SIZE=
|
TOINSTALL_SIZE=
|
||||||
|
|
||||||
|
if [ "$RPM_CHROOT" ]; then
|
||||||
|
RPM_CHROOT_PREFIX="chroot $MOUNTDIR"
|
||||||
|
RPM_ROOT_APPEND=
|
||||||
|
cp $TOINSTALL_RPMS $MOUNTDIR/tmp/
|
||||||
|
TOINSTALL_RPMS_NEW=
|
||||||
|
for p in $TOINSTALL_RPMS; do
|
||||||
|
TOINSTALL_RPMS_NEW="$TOINSTALL_RPMS_NEW /tmp/`basename $p`"
|
||||||
|
done
|
||||||
|
TOINSTALL_RPMS="$TOINSTALL_RPMS_NEW"
|
||||||
|
else
|
||||||
|
RPM_CHROOT_PREFIX=
|
||||||
|
RPM_ROOT_APPEND="-r $MOUNTDIR"
|
||||||
|
fi
|
||||||
|
|
||||||
# rm $MOUNTDIR/var/lib/rpm/__db.00* -f
|
# rm $MOUNTDIR/var/lib/rpm/__db.00* -f
|
||||||
|
|
||||||
|
[ "$VERBOSE" ] && {
|
||||||
|
echo
|
||||||
|
echo "Installing RPMS: $TOINSTALL_RPMS" >&2
|
||||||
|
}
|
||||||
|
|
||||||
echo "#
|
echo "#
|
||||||
# install_rpms():
|
# install_rpms():
|
||||||
LANG=${LANGUAGE}_${COUNTRY}.UTF-8 $RPM --ignorearch -r \$MOUNTDIR -hiv $rpmextraargs $2 $TOINSTALL_RPMS" >> ${LOCALSTATEDIR}/${BUILDSCRIPT_NAME}
|
LANG=${LANGUAGE}_${COUNTRY}.UTF-8 $RPM_CHROOT_PREFIX $RPM --ignorearch $RPM_ROOT_APPEND -hiv $rpmextraargs $2 $TOINSTALL_RPMS" >> ${LOCALSTATEDIR}/${BUILDSCRIPT_NAME}
|
||||||
LANG=${LANGUAGE}_${COUNTRY}.UTF-8 $RPM --ignorearch -r $MOUNTDIR -hiv $rpmextraargs $2 $TOINSTALL_RPMS ||
|
LANG=${LANGUAGE}_${COUNTRY}.UTF-8 $RPM_CHROOT_PREFIX $RPM --ignorearch $RPM_ROOT_APPEND -hiv $rpmextraargs $2 $TOINSTALL_RPMS ||
|
||||||
{ retcode=$?
|
{ retcode=$?
|
||||||
echo "$makedist_me: fatal error, aborting installation" >&2
|
echo "$makedist_me: fatal error, aborting installation" >&2
|
||||||
echo "$makedist_me: exit code was: $retcode" >&2
|
echo "$makedist_me: exit code was: $retcode" >&2
|
||||||
echo "$makedist_me: command was: LANG=${LANGUAGE}_${COUNTRY}.UTF-8 $RPM --ignorearch -r $MOUNTDIR -hiv $rpmextraargs $2 $TOINSTALL_RPMS" >&2
|
echo "$makedist_me: command was: LANG=${LANGUAGE}_${COUNTRY}.UTF-8 $RPM_CHROOT_PREFIX $RPM --ignorearch $RPM_ROOT_APPEND -hiv $rpmextraargs $2 $TOINSTALL_RPMS" >&2
|
||||||
echo "$makedist_me: sleeping 600 seconds"
|
echo "$makedist_me: sleeping 600 seconds"
|
||||||
sleep 600
|
sleep 600
|
||||||
{ (exit 1); exit 1; }; }
|
{ (exit 1); exit 1; }; }
|
||||||
|
|
||||||
INSTALLED="$INSTALLED $1"
|
INSTALLED="$INSTALLED $1"
|
||||||
|
|
||||||
|
if [ "$RPM_CHROOT" ]; then
|
||||||
|
$RPM_CHROOT_PREFIX rm -f $TOINSTALL_RPMS
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# resolve_pkg_deps()
|
# resolve_pkg_deps()
|
||||||
@ -457,7 +494,7 @@ function resolve_pkg_deps() {
|
|||||||
|
|
||||||
PKGS_RESOLVED="`eval $cmd 2>$tmpfile`"
|
PKGS_RESOLVED="`eval $cmd 2>$tmpfile`"
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 -a ! "$RESOLVE_PKG_DEPS_NOERROR" ]; then
|
||||||
MISSING_TARGET=`grep 'No rule to make target' $tmpfile | sed "s|.*target \\\`\(.*\)', needed by.*|\1|"`
|
MISSING_TARGET=`grep 'No rule to make target' $tmpfile | sed "s|.*target \\\`\(.*\)', needed by.*|\1|"`
|
||||||
MISSING_TARGET=${MISSING_TARGET/_unresolved_}
|
MISSING_TARGET=${MISSING_TARGET/_unresolved_}
|
||||||
MISSING_TARGET=${MISSING_TARGET/__missing_provider_for_}
|
MISSING_TARGET=${MISSING_TARGET/__missing_provider_for_}
|
||||||
@ -522,6 +559,15 @@ function install_rpms_by_target() {
|
|||||||
resolve_pkg_deps "$INSTALLED" "$2"
|
resolve_pkg_deps "$INSTALLED" "$2"
|
||||||
|
|
||||||
TOINSTALL="$PKGS_RESOLVED"
|
TOINSTALL="$PKGS_RESOLVED"
|
||||||
|
|
||||||
|
RESOLVE_PKG_DEPS_NOERROR=1
|
||||||
|
if [ "$INSTALL_DEVEL_PACKAGES" ]; then
|
||||||
|
for p in $TOINSTALL; do
|
||||||
|
resolve_pkg_deps "$INSTALLED $TOINSTALL" "$p-devel"
|
||||||
|
TOINSTALL="$TOINSTALL $PKGS_RESOLVED"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
unset RESOLVE_PKG_DEPS_NOERROR
|
||||||
|
|
||||||
[ "$VERBOSE" ] && {
|
[ "$VERBOSE" ] && {
|
||||||
echo
|
echo
|
||||||
@ -561,13 +607,12 @@ function get_pkg_buildinfo() {
|
|||||||
echo "Error: get_pkg_buildinfo: missing distromatic generated file $BUILDSFILE-$arch; aborting."
|
echo "Error: get_pkg_buildinfo: missing distromatic generated file $BUILDSFILE-$arch; aborting."
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_header=();
|
pkg_header=();
|
||||||
pkg_builds=();
|
pkg_builds=();
|
||||||
pkg_obsoletes=();
|
pkg_obsoletes=();
|
||||||
|
. ${BUILDSFILE}-${arch}.sh
|
||||||
|
|
||||||
. $BUILDSFILE-$arch
|
|
||||||
|
|
||||||
pkg_name=${pkg_header[0]};
|
pkg_name=${pkg_header[0]};
|
||||||
pkg_arch=${pkg_header[1]};
|
pkg_arch=${pkg_header[1]};
|
||||||
pkg_version=${pkg_header[2]};
|
pkg_version=${pkg_header[2]};
|
||||||
@ -763,9 +808,8 @@ function add_installed_packages_to_repository() {
|
|||||||
echo "error: file $LOCALSTATEDIR/.$MEDIUM_FILENAME.distinfo missing; aborting."
|
echo "error: file $LOCALSTATEDIR/.$MEDIUM_FILENAME.distinfo missing; aborting."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
echo "loading $LOCALSTATEDIR/.$MEDIUM_FILENAME.distinfo"
|
|
||||||
. $LOCALSTATEDIR/.$MEDIUM_FILENAME.distinfo
|
. $LOCALSTATEDIR/.$MEDIUM_FILENAME.distinfo
|
||||||
echo "INSTALLED=$INSTALLED"
|
|
||||||
|
|
||||||
INSTALL_SRPMS=`expand_srpm_names "$SOURCES"` || exit 1
|
INSTALL_SRPMS=`expand_srpm_names "$SOURCES"` || exit 1
|
||||||
|
|
||||||
@ -778,7 +822,10 @@ echo "INSTALLED=$INSTALLED"
|
|||||||
echo
|
echo
|
||||||
echo "Executing command: $cmd" >&2
|
echo "Executing command: $cmd" >&2
|
||||||
}
|
}
|
||||||
BUILDS="`eval $cmd 2>$tmpfile`"
|
BUILDS="`eval $cmd 2>$tmpfile`" || {
|
||||||
|
echo "${0##*/}: error: the command '$cmd' exited with errors; aborting."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
INSTALL_RPMS=`expand_rpm_names "$BUILDS"` || exit 1
|
INSTALL_RPMS=`expand_rpm_names "$BUILDS"` || exit 1
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# makedist-announcement.sh - a makedist component which produces announcements
|
# makedist-announcement.sh - a makedist component which produces announcements
|
||||||
# Copyright (c) 2012 by Silvan Calarco
|
# Copyright (c) 2012-2013 by Silvan Calarco
|
||||||
#
|
#
|
||||||
. /usr/share/makedist/VERSION
|
. /usr/share/makedist/VERSION
|
||||||
|
|
||||||
@ -16,22 +16,44 @@ wikiaddress=wiki.openmamba.org
|
|||||||
TEXTDOMAIN="makedist"; export TEXTDOMAIN
|
TEXTDOMAIN="makedist"; export TEXTDOMAIN
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo "Usage: makedist-announcement distversion mediumname language
|
echo "Usage: makedist-announcement [-h|-y] distversion mediumname language
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
makedist-announcement milestone2 livecd it
|
makedist-announcement milestone2 livecd it -y
|
||||||
"
|
"
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[ "$1" -a "$2" -a "$3" ] || usage
|
for ((i=1; i<=$#; i++)); do
|
||||||
|
case ${!i} in
|
||||||
|
-h|--help) usage; exit 0 ;;
|
||||||
|
-y|--yes) ASSUME_YES=1 ;;
|
||||||
|
-*) echo "Error: invalid option ${!i}; aborting."
|
||||||
|
usage
|
||||||
|
exit 1 ;;
|
||||||
|
*) if [ ! "$distversion" ]; then
|
||||||
|
distversion=${!i}
|
||||||
|
elif [ ! "$mediumname" ]; then
|
||||||
|
mediumname=${!i}
|
||||||
|
elif [ ! "$outputlang" ]; then
|
||||||
|
outputlang=${!i}
|
||||||
|
else
|
||||||
|
echo "Error: invalid extra parameter ${!i}; aborting."
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
distversion=$1
|
[ "$distversion" -a "$mediumname" -a "$outputlang" ] || {
|
||||||
mediumname=$2
|
echo "Error: insufficient number of parameters; aborting."
|
||||||
outputlang=$3
|
usage
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
case $outputlang in
|
case $outputlang in
|
||||||
it) announcementdate=`date +%d/%m/%Y` ;;
|
it) announcementdate=`date +%d/%m/%Y` ;;
|
||||||
@ -305,8 +327,8 @@ if [ ! -e $outputfile -o "$REBUILDANNOUNCEMENT" = "1" ]; then
|
|||||||
|
|
||||||
echo $"Generating announcement for"" $distribution $distversion ${MEDIA_NAME[i]}"" ($outputlang)"
|
echo $"Generating announcement for"" $distribution $distversion ${MEDIA_NAME[i]}"" ($outputlang)"
|
||||||
|
|
||||||
if [ -e "$mediumdir/$outputlang/preview/preview-$version.jpg" ]; then
|
if [ -e "$mediumdir/$outputlang/preview/preview-i586-$version.jpg" ]; then
|
||||||
IMG_ADD="<img align=\"right\" src=\"http://$siteaddress/$webmediumdir/$outputlang/preview/preview-$version.jpg\">"
|
IMG_ADD="<img align=\"right\" src=\"http://$siteaddress/$webmediumdir/$outputlang/preview/preview-i586-$version.jpg\">"
|
||||||
else
|
else
|
||||||
IMG_ADD=""
|
IMG_ADD=""
|
||||||
fi
|
fi
|
||||||
@ -516,7 +538,7 @@ if [ "$SENDEMAIL" -o "$SENDTESTEMAIL" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for a in $SENDADDRESSES; do
|
for a in $SENDADDRESSES; do
|
||||||
if [[ "`LC_ALL=C /usr/bin/tty`" != "not a tty" ]]; then
|
if [[ "`LC_ALL=C /usr/bin/tty`" != "not a tty" && ! "$ASSUME_YES" ]]; then
|
||||||
echo -n $"Send english ($outputlang) language email to $a for ""'$distribution $distversion ${MEDIA_NAME[i]} $version' [y/N]?"
|
echo -n $"Send english ($outputlang) language email to $a for ""'$distribution $distversion ${MEDIA_NAME[i]} $version' [y/N]?"
|
||||||
read ans
|
read ans
|
||||||
else
|
else
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# makedist.sh - Distribution media (CD/DVD/..) creator
|
# makedist.sh - Distribution media (CD/DVD/..) creator
|
||||||
#
|
#
|
||||||
|
@ -7,6 +7,7 @@ qemu-system-x86_64 \
|
|||||||
-vga vmware \
|
-vga vmware \
|
||||||
-cdrom ~/recordvm.iso \
|
-cdrom ~/recordvm.iso \
|
||||||
-name qemu-recordvm,process=qemu-recordvm
|
-name qemu-recordvm,process=qemu-recordvm
|
||||||
|
# -full-screen \
|
||||||
# -bt hci,host \
|
# -bt hci,host \
|
||||||
#echo "Calling: VBOX_USER_HOME=/var/makedist/recordvm/VirtualBox /opt/VirtualBox/VBoxSDL --startvm openmamba-recordvm --fixedmode 1024 768 32 --nograbonclick --nohostkey --vram 7"
|
#echo "Calling: VBOX_USER_HOME=/var/makedist/recordvm/VirtualBox /opt/VirtualBox/VBoxSDL --startvm openmamba-recordvm --fixedmode 1024 768 32 --nograbonclick --nohostkey --vram 7"
|
||||||
#VBOX_USER_HOME=/var/makedist/recordvm/VirtualBox /opt/VirtualBox/VBoxSDL --startvm openmamba-recordvm --fixedmode 1024 768 32 --nograbonclick --nohostkey --vram 7
|
#VBOX_USER_HOME=/var/makedist/recordvm/VirtualBox /opt/VirtualBox/VBoxSDL --startvm openmamba-recordvm --fixedmode 1024 768 32 --nograbonclick --nohostkey --vram 7
|
||||||
|
Loading…
Reference in New Issue
Block a user