Sync with current production server

This commit is contained in:
Silvan Calarco 2023-08-07 12:33:15 +02:00
parent 801cd59eb2
commit 29bc94e68b
6 changed files with 24 additions and 49 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# Makedist automatic media build script # Makedist automatic media build script
# Copyright (c) 2007-2022 by Silvan Calarco <silvan.calarco@mambasoft.it> # Copyright (c) 2007-2023 by Silvan Calarco <silvan.calarco@mambasoft.it>
# #
# Usage: # Usage:
# #
@ -88,7 +88,7 @@ function do_makedist() {
else else
CMD_PREFIX= CMD_PREFIX=
fi fi
if [ "${DESTMILESTONE}" = "devel" -o "${DESTMILESTONE}" = "main" ]; then if [ "${DESTMILESTONE}" = "rolling" -o "${DESTMILESTONE}" = "main" ]; then
MAKEDIST_TARGET=${DESTTARGET} MAKEDIST_TARGET=${DESTTARGET}
else else
MAKEDIST_TARGET=${DESTTARGET}-${DESTMILESTONE} MAKEDIST_TARGET=${DESTTARGET}-${DESTMILESTONE}
@ -191,7 +191,7 @@ function do_makedist_and_html() {
echo "Error: do_makedist_and_html: invalid number of parameters; aborting." echo "Error: do_makedist_and_html: invalid number of parameters; aborting."
exit 1 exit 1
} }
if [ "${MEDIUMMILESTONE}" != "devel" -a "${MEDIUMMILESTONE}" != "main" ]; then if [ "${MEDIUMMILESTONE}" != "rolling" -a "${MEDIUMMILESTONE}" != "main" ]; then
SOURCEIMGFILEPREFIX="${MEDIUMTARGET}-${MEDIUMMILESTONE}" SOURCEIMGFILEPREFIX="${MEDIUMTARGET}-${MEDIUMMILESTONE}"
DESTIMGFILEPREFIX="${MEDIUMTARGET}-${MEDIUMMILESTONE}" DESTIMGFILEPREFIX="${MEDIUMTARGET}-${MEDIUMMILESTONE}"
else else
@ -330,7 +330,7 @@ _EOF
chmod +r $DESTHTML chmod +r $DESTHTML
if [ "$DIST_CREATED" = "1" ]; then if [ "$DIST_CREATED" = "1" ]; then
# snapshots # snapshots
if [ "$MEDIUMMILESTONE" != "devel" -a "$MEDIUMMILESTONE" != "main" ]; then if [ "$MEDIUMMILESTONE" != "rolling" -a "$MEDIUMMILESTONE" != "main" ]; then
#temporary #temporary
makedist-announcement --rebuild-announcement --send-test-email -y ${MEDIUMMILESTONE} $PRODNAME makedist-announcement --rebuild-announcement --send-test-email -y ${MEDIUMMILESTONE} $PRODNAME
else else
@ -355,8 +355,8 @@ for i in `seq 0 $ALLMEDIASLAST`; do
PLATFORM=${MEDIA_PLATFORM[i]} PLATFORM=${MEDIA_PLATFORM[i]}
SUBPLATFORM=${MEDIA_SUBPLATFORM[i]} SUBPLATFORM=${MEDIA_SUBPLATFORM[i]}
VARIANT=${MEDIA_VARIANT[i]} VARIANT=${MEDIA_VARIANT[i]}
DESTBASEDIR=${REPODIR_LOCAL}/${MEDIA_MILESTONE[i]}/media DESTBASEDIR=${REPODIR_LOCAL}/media/${MEDIA_MILESTONE[i]}
DESTBASEURL=${REPODIR_URL}/${MEDIA_MILESTONE[i]}/media DESTBASEURL=${REPODIR_URL}/media/${MEDIA_MILESTONE[i]}
unset PRODUCT_NAME unset PRODUCT_NAME
unset PRODUCT_NAME_OVERRIDE unset PRODUCT_NAME_OVERRIDE

View File

@ -1,6 +1,6 @@
# makedist Makefile # makedist Makefile
# Copyright (c) 2003-2023 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2003-2004 by Davide Madrisan <davide.madrisan@gmail.com> # Copyright (c) 2003-2004 by Davide Madrisan <davide.madrisan@gmail.com>
# Copyright (c) 2003-2022 by Silvan Calarco <silvan.calarco@mambasoft.it>
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
@ -10,9 +10,6 @@
include /var/makedist/.defs.inc include /var/makedist/.defs.inc
include ./VERSION include ./VERSION
default_branch = devel
ftp_path = ftp://ftp.openmamba.org/pub/openmamba
# FIXME: obsolete, check and remove next time # FIXME: obsolete, check and remove next time
initrd_dir = $(LOCALSTATEDIR)/initrd initrd_dir = $(LOCALSTATEDIR)/initrd
@ -41,8 +38,7 @@ help:
echo echo
$(ALL_TARGETS): clean $(ALL_TARGETS): clean
@branch=$(BRANCH); test -z "$$branch" && branch=$(default_branch);\ ./makedist.sh -t $@ $(initrd_dir) $(DEBUG)
./makedist.sh -t $@ $(initrd_dir) $$branch $(DEBUG)
clean: clean:
@rm -fr $(initrd_dir)/modules/* $(initrd_dir)/install/* || true @rm -fr $(initrd_dir)/modules/* $(initrd_dir)/install/* || true

View File

@ -45,7 +45,7 @@ fi
arch=$ARCH arch=$ARCH
[ $ARCH ] || { [ $ARCH ] || {
arch=`uname -i` arch=`uname -m`
[ "$arch" = "unknown" ] && { [ "$arch" = "unknown" ] && {
echo "Error: can't determine the hardware platform; aborting." echo "Error: can't determine the hardware platform; aborting."
exit 1 exit 1

View File

@ -124,8 +124,8 @@ function initialize_root_dir() {
create_devices create_devices
# / to /usr symlinks # / to /usr symlinks
mkdir -p $MOUNTDIR/usr/{bin,sbin,lib} mkdir -p $MOUNTDIR/usr/{bin,lib}
#ln -s bin $MOUNTDIR/usr/sbin ln -s bin $MOUNTDIR/usr/sbin
ln -s usr/bin $MOUNTDIR/bin ln -s usr/bin $MOUNTDIR/bin
ln -s usr/sbin $MOUNTDIR/sbin ln -s usr/sbin $MOUNTDIR/sbin
ln -s usr/lib $MOUNTDIR/lib ln -s usr/lib $MOUNTDIR/lib

View File

@ -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-2014 by Silvan Calarco # Copyright (c) 2012-2023 by Silvan Calarco
# #
. /usr/share/makedist/VERSION . /usr/share/makedist/VERSION
@ -69,7 +69,7 @@ else
MAKEDIST_TARGET=$distribution MAKEDIST_TARGET=$distribution
buildinfourl=/var/ftp/pub/$distribution/distromatic/devel-makedist buildinfourl=/var/ftp/pub/$distribution/distromatic/devel-makedist
pkginforep=$distversion-makedist pkginforep=$distversion-makedist
mediadistversion=snapshot mediadistversion=$distversion
fi fi
. /etc/sysconfig/makedist . /etc/sysconfig/makedist
@ -261,7 +261,7 @@ mediumvariant=${MEDIA_VARIANT[i]}
webmediumdir=pub/$distribution/media/$distversion/$mediumname webmediumdir=pub/$distribution/media/$distversion/$mediumname
mediumdir=/var/ftp/$webmediumdir mediumdir=/var/ftp/$webmediumdir
[ "$distversion" = "devel" ] && fallbackmediumdir=/var/ftp/pub/$distribution/media/milestone2/$mediumname #[ "$distversion" = "devel" ] && fallbackmediumdir=/var/ftp/pub/$distribution/media/milestone2/$mediumname
if [ $mediumsubplatform ]; then if [ $mediumsubplatform ]; then
. /var/makedist/targets/$MAKEDIST_TARGET/platforms/$mediumsubplatform/settings.inc . /var/makedist/targets/$MAKEDIST_TARGET/platforms/$mediumsubplatform/settings.inc
@ -313,7 +313,7 @@ fi
# fi # fi
#done #done
if [ "$distversion" = "devel" ]; then if [ "$distversion" = "rolling" ]; then
version=`ls $mediumdir/en/latest-is-*.txt 2>/dev/null| sed "s/.*latest-is-\(.*\)\.txt/\1/"` version=`ls $mediumdir/en/latest-is-*.txt 2>/dev/null| sed "s/.*latest-is-\(.*\)\.txt/\1/"`
else else
version=`ls $mediumdir/en/latest-is-$distversion-*.txt 2>/dev/null| sed "s/.*latest-is-$distversion-\(.*\)\.txt/\1/"` version=`ls $mediumdir/en/latest-is-$distversion-*.txt 2>/dev/null| sed "s/.*latest-is-$distversion-\(.*\)\.txt/\1/"`
@ -331,7 +331,7 @@ if [ ! -e $outputfile -o "$REBUILDANNOUNCEMENT" = "1" ]; then
IMG_ADD="" IMG_ADD=""
fi fi
if [ "$distversion" != "devel" ]; then if [ "$distversion" != "rolling" ]; then
echo "<h2>"$"$distribution ${MEDIA_NAME[i]} $version ($distversion) release announcement""</h2>" > $outputfile echo "<h2>"$"$distribution ${MEDIA_NAME[i]} $version ($distversion) release announcement""</h2>" > $outputfile
echo "<div align=right><i><a href="http://$siteaddress">$sitedomain</a> - $announcementdate</i></div>" >> $outputfile echo "<div align=right><i><a href="http://$siteaddress">$sitedomain</a> - $announcementdate</i></div>" >> $outputfile
echo "<br><p>"$"The <b>$distversion $version</b> release of the $distribution <b>${MEDIA_NAME[i]}</b> distribution is available for download." >> $outputfile echo "<br><p>"$"The <b>$distversion $version</b> release of the $distribution <b>${MEDIA_NAME[i]}</b> distribution is available for download." >> $outputfile
@ -394,12 +394,12 @@ $distribution-$mediumname-$l-$mediadistversion-$version.${a}.${medium_suffix}</a
<li>"$"Updates level"": "$"bugfix"", "$"security"", "$"end-user applications"" <li>"$"Updates level"": "$"bugfix"", "$"security"", "$"end-user applications""
<li>"$"Default updates channels"": milestone2, milestone2-updates, milestone2-games <li>"$"Default updates channels"": milestone2, milestone2-updates, milestone2-games
" >> $outputfile " >> $outputfile
elif [ "$distversion" = "devel" ]; then elif [ "$distversion" = "rolling" ]; then
echo "\ echo "\
<li>"$"Release branch"": $distversion ("$"unstable"") <li>"$"Release branch"": $distversion ("$"rolling"")
<li>"$"Planned maintenance"": "$"long term"" <li>"$"Planned maintenance"": "$"long term""
<li>"$"Updates level"": "$"rolling"" <li>"$"Updates level"": "$"rolling""
<li>"$"Updates default channels"": devel, devel-games <li>"$"Updates default channels"": base
" >> $outputfile " >> $outputfile
fi fi
echo -n "</ul>" >> $outputfile echo -n "</ul>" >> $outputfile
@ -482,23 +482,14 @@ _EOF
:<< _EOF :<< _EOF
echo "<li><a href='http://$siteaddress/distribution/media/${MEDIA_NAME[i]}.html?lang=$outputlang'>\ echo "<li><a href='http://$siteaddress/distribution/media/${MEDIA_NAME[i]}.html?lang=$outputlang'>\
"$"${MEDIA_NAME[i]} page at $siteaddress""</a>" >> $outputfile "$"${MEDIA_NAME[i]} page at $siteaddress""</a>" >> $outputfile
if [ "$distversion" = "devel" ]; then
sitedistversion="development"
else
sitedistversion="$distversion"
fi
echo "<li><a href='http://$siteaddress/distribution/$sitedistversion.html?lang=$outputlang'>"$"$sitedistversion channels and packages""</a>" >> $outputfile
_EOF
echo "\ echo "\
<li><a href='https://$siteaddress/$outputlang/'>"$"$distribution website""</a>\ <li><a href='https://$siteaddress/$outputlang/'>"$"$distribution website""</a>\
<li><a href='https://$siteaddress/$outputlang/forum/'>"$"$distribution forum""</a>\ <li><a href='https://$siteaddress/$outputlang/forum/'>"$"$distribution forum""</a>\
" >> $outputfile " >> $outputfile
echo -n "</div><hr><p><i>"$"Announcement automatically generated by"" makedist $makedist_version " >> $outputfile echo -n "</div><hr><p><i>"$"Announcement automatically generated by"" makedist $makedist_version " >> $outputfile
if [ "$distversion" != "devel" -a "$ANNOUNCEMENTS_SIGNER" ]; then if [ "$ANNOUNCEMENTS_SIGNER" ]; then
echo $"and signed off by"" $ANNOUNCEMENTS_SIGNER</i>" >> $outputfile echo $"and signed off by"" $ANNOUNCEMENTS_SIGNER</i>" >> $outputfile
else
echo >> $outputfile
fi fi
#gpg --clearsign $outputfile > $outputfile.sig #gpg --clearsign $outputfile > $outputfile.sig
@ -517,7 +508,7 @@ if [ "$SENDEMAIL" -o "$SENDTESTEMAIL" ]; then
if [ ! "$SENDADDRESSES" ]; then if [ ! "$SENDADDRESSES" ]; then
if [ "$SENDTESTEMAIL" ]; then if [ "$SENDTESTEMAIL" ]; then
SENDADDRESSES=$ANNOUNCEMENTS_EMAILS_TEST SENDADDRESSES=$ANNOUNCEMENTS_EMAILS_TEST
elif [ "$distversion" = "devel" ]; then elif [ "$distversion" = "rolling" ]; then
case $outputlang in case $outputlang in
en) SENDADDRESSES="$ANNOUNCEMENTS_EMAILS_DEVEL_EN" ;; en) SENDADDRESSES="$ANNOUNCEMENTS_EMAILS_DEVEL_EN" ;;
it) SENDADDRESSES="$ANNOUNCEMENTS_EMAILS_DEVEL_IT" ;; it) SENDADDRESSES="$ANNOUNCEMENTS_EMAILS_DEVEL_IT" ;;
@ -532,7 +523,7 @@ if [ "$SENDEMAIL" -o "$SENDTESTEMAIL" ]; then
fi fi
fi fi
if [ "$distversion" != "devel" ]; then if [ "$distversion" != "rolling" ]; then
SENDTITLE=$"Release announcement: $distribution $distversion ${MEDIA_NAME[i]} $version" SENDTITLE=$"Release announcement: $distribution $distversion ${MEDIA_NAME[i]} $version"
else else
SENDTITLE=$"New snapshot: $distribution ${MEDIA_NAME[i]} $version ($distversion)" SENDTITLE=$"New snapshot: $distribution ${MEDIA_NAME[i]} $version ($distversion)"

View File

@ -2,7 +2,7 @@
# #
# makedist.sh - Distribution media (CD/DVD/..) creator # makedist.sh - Distribution media (CD/DVD/..) creator
# #
# Copyright (c) 2003-2015 by Silvan Calarco <silvan.calarco@mambasoft.it> # Copyright (c) 2003-2023 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2003-2006 by Davide Madrisan <davide.madrisan@gmail.com> # Copyright (c) 2003-2006 by Davide Madrisan <davide.madrisan@gmail.com>
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
@ -25,7 +25,6 @@ Copyright (c) 2003-2015 by Silvan Calarco <silvan.calarco@mambasoft.it>
Copyright (c) 2003-2005 by Davide Madrisan <davide.madrisan@gmail.com> Copyright (c) 2003-2005 by Davide Madrisan <davide.madrisan@gmail.com>
" "
unset branch # can be 'stable', 'unstable', or 'devel'
makedist_me="${0##*/}" makedist_me="${0##*/}"
UPDATE=none UPDATE=none
@ -38,7 +37,7 @@ RPM2CPIO=rpm2cpio
function usage() { function usage() {
echo "\ echo "\
usage: $makedist_me [-y] [-u[=<opts>]] [-t target] bootcd initrd kernel branch usage: $makedist_me [-y] [-u[=<opts>]] [-t target] bootcd initrd kernel
-y : switch to non interactive mode -y : switch to non interactive mode
-w : download only files and packages; do not create an ISO image -w : download only files and packages; do not create an ISO image
-t : build CD for specified target -t : build CD for specified target
@ -67,7 +66,6 @@ while test -n "$1" ; do
-h) usage; exit ;; -h) usage; exit ;;
-v) echo "$copyleft"; exit ;; -v) echo "$copyleft"; exit ;;
*) if test -z "$INITRDDIR" ; then INITRDDIR=$1 *) if test -z "$INITRDDIR" ; then INITRDDIR=$1
elif test -z "$branch" ; then branch=$1
elif test -z "$DEBUG" ; then DEBUG=$1 elif test -z "$DEBUG" ; then DEBUG=$1
elif test -z "$MEDIA" ; then MEDIA=$1 elif test -z "$MEDIA" ; then MEDIA=$1
elif test -z "$PLATFORM" ; then PLATFORM=$1 elif test -z "$PLATFORM" ; then PLATFORM=$1
@ -84,21 +82,11 @@ done
unset error unset error
test -z "$INITRDDIR" && error=true test -z "$INITRDDIR" && error=true
test "$UPDATE" != "none" -a -z "$branch" && error=true
test x$error = xtrue && test x$error = xtrue &&
{ echo "$makedist_me: missing parameter"; { echo "$makedist_me: missing parameter";
usage; { (exit 1); exit 1; }; } usage; { (exit 1); exit 1; }; }
case "$branch" in
stable) branch_dir="stable/current" ;;
unstable) branch_dir="unstable/current" ;;
devel) branch_dir="devel" ;;
*) echo "unknown branch ($branch)"
echo "valid choices are: 'stable', 'unstable', 'devel'"
exit 1 ;;
esac
case "$LANGUAGE" in case "$LANGUAGE" in
it*) LANGUAGE=it it*) LANGUAGE=it
COUNTRY=IT ;; COUNTRY=IT ;;