Close #840 #847: Cliente ogLive se gneera a partir del código Git en vez de Subversion; lista actualizada de tickets resultos.
parent
7486c139fa
commit
cc9336ff35
|
@ -4,7 +4,7 @@
|
|||
#@brief Librería o clase Boot-Tools
|
||||
#@class Boot-Tools
|
||||
#@brief Funciones para generar un sistema operativo cliente para opengnsys
|
||||
#@version 1.1.0
|
||||
#@version 1.1.1
|
||||
#@warning License: GNU GPLv3+
|
||||
#*/
|
||||
|
||||
|
@ -13,13 +13,7 @@
|
|||
# Autor: Antonio J. Doblas Viso. Universidad de Málaga.
|
||||
function btogGetVar()
|
||||
{
|
||||
|
||||
export BTSVNBOOTTOOLS=/tmp/opengnsys_installer/opengnsys/client/boot-tools
|
||||
export BTSVNSHARE=/tmp/opengnsys_installer/opengnsys/client/shared
|
||||
export BTSVNENGINE=/tmp/opengnsys_installer/opengnsys/client/engine
|
||||
|
||||
export BTSVNOG2=/tmp/opengnsys_installer/opengnsys2
|
||||
|
||||
export BTDIR=/tmp/opengnsys_installer/opengnsys/client/boot-tools
|
||||
export BTTARGETDIR=/var/lib/tftpboot/ogclient/
|
||||
export BTROOTFSIMG=${BTTARGETDIR}ogclient.img
|
||||
export BTROOTFSMNT=${BTTARGETDIR}ogclientmount
|
||||
|
@ -125,7 +119,7 @@ case "${1,,}" in
|
|||
bionic) # ogLive 1.1.1-rc1 basado en Ubuntu 18.04 y Kernel 4.15.
|
||||
OSDISTRIB="ubuntu"
|
||||
OSCODENAME="bionic"
|
||||
OSRELEASE="4.15.0-13-generic"
|
||||
OSRELEASE="4.15.0-32-generic"
|
||||
OSARCH="amd64"
|
||||
OSHTTP="http://es.archive.ubuntu.com/ubuntu/"
|
||||
;;
|
||||
|
@ -141,12 +135,13 @@ case "${1,,}" in
|
|||
exit 1
|
||||
;;
|
||||
esac
|
||||
SVNURL="https://github.com/opengnsys/OpenGnsys/branches/devel/client"
|
||||
VERSIONSVN=$(LC_ALL=C svn info $SVNURL | awk '/Date:/ {gsub(/-/,""); print ""$4}')
|
||||
NAMEISOCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$OSRELEASE-$OSARCH-$VERSIONSVN"
|
||||
NAMEHOSTCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$VERSIONSVN"
|
||||
BRANCH="devel"
|
||||
GITURL="https://api.github.com/repos/opengnsys/OpenGnsys/commits?sha=$BRANCH&path=/client"
|
||||
GITRELEASE=$(curl -s "$GITURL" | jq -r '"r" + (.[0].commit.committer.date | gsub("-"; "")[:8]) + "." + (.[0].sha[:7])')
|
||||
NAMEISOCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$OSRELEASE-$OSARCH-$GITRELEASE"
|
||||
NAMEHOSTCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$GITRELEASE"
|
||||
export OSDISTRIB OSCODENAME OSRELEASE OSARCH OSHTTP
|
||||
export TYPECLIENT VERSIONSVN NAMEISOCLIENT NAMEHOSTCLIENT
|
||||
export TYPECLIENT GITRELEASE NAMEISOCLIENT NAMEHOSTCLIENT
|
||||
### El fichero de configuración debe sustituir a estos 3 ficheros (borrar las 3 líneas siguientes).
|
||||
echo "$NAMEISOCLIENT" > /tmp/opengnsys_info_rootfs
|
||||
echo "$NAMEHOSTCLIENT" > /tmp/opengnsys_chroot
|
||||
|
@ -158,7 +153,7 @@ OSCODENAME="$OSCODENAME"
|
|||
OSRELEASE="$OSRELEASE"
|
||||
OSARCH="$OSARCH"
|
||||
OSHTTP="$OSHTTP"
|
||||
VERSIONSVN="$VERSIONSVN"
|
||||
GITRELEASE="$GITRELEASE"
|
||||
NAMEISOCLIENT="$NAMEISOCLIENT"
|
||||
NAMEHOSTCLIENT="$NAMEHOSTCLIENT"
|
||||
EOT
|
||||
|
@ -364,7 +359,7 @@ TIMEMOD=`date +%Y%m%d-%H%M%S`
|
|||
|
||||
#copiando
|
||||
cp /tmp/initrd.img-${OSRELEASE} ${BTTARGETDIR}/oginitrd.img
|
||||
cp /tmp/vmlinuz-${OSRELEASE}.efi.signed ${BTTARGETDIR}/ogvmlinuz
|
||||
cp /tmp/vmlinuz-${OSRELEASE} ${BTTARGETDIR}/ogvmlinuz
|
||||
#generamos md5 del kernel y del initrd.
|
||||
DATASUM=`md5sum "${BTTARGETDIR}/oginitrd.img" | cut -f1 -d" "`
|
||||
echo $DATASUM > ${BTTARGETDIR}/oginitrd.img.sum
|
||||
|
|
|
@ -72,10 +72,10 @@ echo "FASE 4 - Configurar acceso schroot al Segundo Sistema de archivos (img)"
|
|||
cat /etc/schroot/schroot.conf | grep $BTROOTFSIMG || btogSetFsAccess
|
||||
###########################################################################
|
||||
echo "FASE 5 - Incorporando ficheros OpenGnsys al sistema raíz rootfs "
|
||||
cp -a ${BTSVNBOOTTOOLS}/includes/usr/bin/* /tmp
|
||||
cp -a ${BTDIR}/includes/usr/bin/* /tmp
|
||||
chmod +x /tmp/boot-tools/*.sh
|
||||
# Incluir revisión.
|
||||
sed -i "1 s/$/ $VERSIONSVN/" ${BTSVNBOOTTOOLS}/includes/etc/initramfs-tools/scripts/VERSION.txt
|
||||
sed -i "1 s/$/ $GITRELEASE/" ${BTDIR}/includes/etc/initramfs-tools/scripts/VERSION.txt
|
||||
# En Ubuntu 13.04+ es necesario matar proceso de "udev" antes de desmontar.
|
||||
umount $BTROOTFSMNT 2>/dev/null || (kill -9 $(lsof -t $BTROOTFSMNT); umount $BTROOTFSMNT 2>/dev/null)
|
||||
schroot -p -c IMGogclient -- /tmp/boot-tools/boottoolsFsOpengnsys.sh
|
||||
|
|
|
@ -1 +1 @@
|
|||
OpenGnsys Client 1.1.1-rc1-efi
|
||||
OpenGnsys Client 1.1.1-rc2
|
||||
|
|
|
@ -550,7 +550,7 @@ then
|
|||
for i in bin sbin lib $LIBS etc var usr root boot; do
|
||||
ogUnionLiveDir $i
|
||||
done
|
||||
cat /tmp/mtab.preunion > /etc/mtab
|
||||
[ -L /etc/mtab ] || cat /tmp/mtab.preunion > /etc/mtab
|
||||
else
|
||||
echo "Fichero imagen del cliente no encontrado"
|
||||
return 1
|
||||
|
|
|
@ -24,7 +24,7 @@ echo "$OSDISTRIB:$OSCODENAME:$OSRELEASE:$OSARCH:$OSHTTP"
|
|||
|
||||
LERROR=TRUE
|
||||
|
||||
echo "$FUNCNAME: Iniciando la personalización con datos del SVN "
|
||||
echo "$FUNCNAME: Iniciando la personalización con datos del repositorio"
|
||||
|
||||
# parseamos el apt.source de la distribución (en minúsculas)
|
||||
sed -e "s/OSCODENAME/$OSCODENAME/g" ${SVNCLIENTDIR}/includes/etc/apt/sources.list.${OSDISTRIB,,} > ${SVNCLIENTDIR}/includes/etc/apt/sources.list
|
||||
|
@ -77,8 +77,8 @@ if [ $? -ne 0 ]; then
|
|||
fi
|
||||
|
||||
# El fichero de configuración debe sustituir a los 2 ficheros (borrar las 2 líneas).
|
||||
echo "${VERSIONBOOTTOOLS}-${OSCODENAME}-${OSRELEASE}-${VERSIONSVN}" > /$NAMEISOCLIENTFILE
|
||||
echo "${VERSIONBOOTTOOLS}-${OSCODENAME}-${VERSIONSVN}" > $NAMEHOSTCLIENTFILE
|
||||
echo "${VERSIONBOOTTOOLS}-${OSCODENAME}-${OSRELEASE}-${GITRELEASE}" > /$NAMEISOCLIENTFILE
|
||||
echo "${VERSIONBOOTTOOLS}-${OSCODENAME}-${GITRELEASE}" > $NAMEHOSTCLIENTFILE
|
||||
|
||||
|
||||
history -c
|
||||
|
|
|
@ -8,7 +8,7 @@ rm -f /usr/lib/initramfs-tools/bin/*
|
|||
cp /bin/busybox /usr/lib/initramfs-tools/bin
|
||||
cd /tmp
|
||||
mkinitramfs -o /tmp/initrd.img-$OSRELEASE -v $OSRELEASE
|
||||
cp -v /boot/vmlinuz-$OSRELEASE.efi.signed /tmp
|
||||
cp -v /boot/vmlinuz-$OSRELEASE /tmp
|
||||
|
||||
history -c
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ if [ "$OSRELEASE" == "3.7.6-030706-generic" ]; then
|
|||
rm -fr /tmp/kernel
|
||||
else
|
||||
# Instalar Kernel firmado del repositorio de paquetes.
|
||||
apt-get -y --force-yes install linux-signed-image-${OSRELEASE} linux-headers-${OSRELEASE} dkms shim-signed
|
||||
apt-get -y --force-yes install linux-image-extra-${OSRELEASE} 2>/dev/null
|
||||
apt-get -y --force-yes install linux-image-${OSRELEASE} linux-headers-${OSRELEASE} dkms shim-signed
|
||||
apt-get -y --force-yes install linux-modules-${OSRELEASE} linux-modules-extra-${OSRELEASE} 2>/dev/null
|
||||
fi
|
||||
|
||||
# Valores para paquetes interactivos.
|
||||
|
|
Loading…
Reference in New Issue