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
|
#@brief Librería o clase Boot-Tools
|
||||||
#@class Boot-Tools
|
#@class Boot-Tools
|
||||||
#@brief Funciones para generar un sistema operativo cliente para opengnsys
|
#@brief Funciones para generar un sistema operativo cliente para opengnsys
|
||||||
#@version 1.1.0
|
#@version 1.1.1
|
||||||
#@warning License: GNU GPLv3+
|
#@warning License: GNU GPLv3+
|
||||||
#*/
|
#*/
|
||||||
|
|
||||||
|
@ -13,13 +13,7 @@
|
||||||
# Autor: Antonio J. Doblas Viso. Universidad de Málaga.
|
# Autor: Antonio J. Doblas Viso. Universidad de Málaga.
|
||||||
function btogGetVar()
|
function btogGetVar()
|
||||||
{
|
{
|
||||||
|
export BTDIR=/tmp/opengnsys_installer/opengnsys/client/boot-tools
|
||||||
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 BTTARGETDIR=/var/lib/tftpboot/ogclient/
|
export BTTARGETDIR=/var/lib/tftpboot/ogclient/
|
||||||
export BTROOTFSIMG=${BTTARGETDIR}ogclient.img
|
export BTROOTFSIMG=${BTTARGETDIR}ogclient.img
|
||||||
export BTROOTFSMNT=${BTTARGETDIR}ogclientmount
|
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.
|
bionic) # ogLive 1.1.1-rc1 basado en Ubuntu 18.04 y Kernel 4.15.
|
||||||
OSDISTRIB="ubuntu"
|
OSDISTRIB="ubuntu"
|
||||||
OSCODENAME="bionic"
|
OSCODENAME="bionic"
|
||||||
OSRELEASE="4.15.0-13-generic"
|
OSRELEASE="4.15.0-32-generic"
|
||||||
OSARCH="amd64"
|
OSARCH="amd64"
|
||||||
OSHTTP="http://es.archive.ubuntu.com/ubuntu/"
|
OSHTTP="http://es.archive.ubuntu.com/ubuntu/"
|
||||||
;;
|
;;
|
||||||
|
@ -141,12 +135,13 @@ case "${1,,}" in
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
SVNURL="https://github.com/opengnsys/OpenGnsys/branches/devel/client"
|
BRANCH="devel"
|
||||||
VERSIONSVN=$(LC_ALL=C svn info $SVNURL | awk '/Date:/ {gsub(/-/,""); print ""$4}')
|
GITURL="https://api.github.com/repos/opengnsys/OpenGnsys/commits?sha=$BRANCH&path=/client"
|
||||||
NAMEISOCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$OSRELEASE-$OSARCH-$VERSIONSVN"
|
GITRELEASE=$(curl -s "$GITURL" | jq -r '"r" + (.[0].commit.committer.date | gsub("-"; "")[:8]) + "." + (.[0].sha[:7])')
|
||||||
NAMEHOSTCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$VERSIONSVN"
|
NAMEISOCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$OSRELEASE-$OSARCH-$GITRELEASE"
|
||||||
|
NAMEHOSTCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$GITRELEASE"
|
||||||
export OSDISTRIB OSCODENAME OSRELEASE OSARCH OSHTTP
|
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).
|
### El fichero de configuración debe sustituir a estos 3 ficheros (borrar las 3 líneas siguientes).
|
||||||
echo "$NAMEISOCLIENT" > /tmp/opengnsys_info_rootfs
|
echo "$NAMEISOCLIENT" > /tmp/opengnsys_info_rootfs
|
||||||
echo "$NAMEHOSTCLIENT" > /tmp/opengnsys_chroot
|
echo "$NAMEHOSTCLIENT" > /tmp/opengnsys_chroot
|
||||||
|
@ -158,7 +153,7 @@ OSCODENAME="$OSCODENAME"
|
||||||
OSRELEASE="$OSRELEASE"
|
OSRELEASE="$OSRELEASE"
|
||||||
OSARCH="$OSARCH"
|
OSARCH="$OSARCH"
|
||||||
OSHTTP="$OSHTTP"
|
OSHTTP="$OSHTTP"
|
||||||
VERSIONSVN="$VERSIONSVN"
|
GITRELEASE="$GITRELEASE"
|
||||||
NAMEISOCLIENT="$NAMEISOCLIENT"
|
NAMEISOCLIENT="$NAMEISOCLIENT"
|
||||||
NAMEHOSTCLIENT="$NAMEHOSTCLIENT"
|
NAMEHOSTCLIENT="$NAMEHOSTCLIENT"
|
||||||
EOT
|
EOT
|
||||||
|
@ -364,7 +359,7 @@ TIMEMOD=`date +%Y%m%d-%H%M%S`
|
||||||
|
|
||||||
#copiando
|
#copiando
|
||||||
cp /tmp/initrd.img-${OSRELEASE} ${BTTARGETDIR}/oginitrd.img
|
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.
|
#generamos md5 del kernel y del initrd.
|
||||||
DATASUM=`md5sum "${BTTARGETDIR}/oginitrd.img" | cut -f1 -d" "`
|
DATASUM=`md5sum "${BTTARGETDIR}/oginitrd.img" | cut -f1 -d" "`
|
||||||
echo $DATASUM > ${BTTARGETDIR}/oginitrd.img.sum
|
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
|
cat /etc/schroot/schroot.conf | grep $BTROOTFSIMG || btogSetFsAccess
|
||||||
###########################################################################
|
###########################################################################
|
||||||
echo "FASE 5 - Incorporando ficheros OpenGnsys al sistema raíz rootfs "
|
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
|
chmod +x /tmp/boot-tools/*.sh
|
||||||
# Incluir revisión.
|
# 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.
|
# 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)
|
umount $BTROOTFSMNT 2>/dev/null || (kill -9 $(lsof -t $BTROOTFSMNT); umount $BTROOTFSMNT 2>/dev/null)
|
||||||
schroot -p -c IMGogclient -- /tmp/boot-tools/boottoolsFsOpengnsys.sh
|
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
|
for i in bin sbin lib $LIBS etc var usr root boot; do
|
||||||
ogUnionLiveDir $i
|
ogUnionLiveDir $i
|
||||||
done
|
done
|
||||||
cat /tmp/mtab.preunion > /etc/mtab
|
[ -L /etc/mtab ] || cat /tmp/mtab.preunion > /etc/mtab
|
||||||
else
|
else
|
||||||
echo "Fichero imagen del cliente no encontrado"
|
echo "Fichero imagen del cliente no encontrado"
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -24,7 +24,7 @@ echo "$OSDISTRIB:$OSCODENAME:$OSRELEASE:$OSARCH:$OSHTTP"
|
||||||
|
|
||||||
LERROR=TRUE
|
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)
|
# 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
|
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
|
fi
|
||||||
|
|
||||||
# El fichero de configuración debe sustituir a los 2 ficheros (borrar las 2 líneas).
|
# 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}-${OSRELEASE}-${GITRELEASE}" > /$NAMEISOCLIENTFILE
|
||||||
echo "${VERSIONBOOTTOOLS}-${OSCODENAME}-${VERSIONSVN}" > $NAMEHOSTCLIENTFILE
|
echo "${VERSIONBOOTTOOLS}-${OSCODENAME}-${GITRELEASE}" > $NAMEHOSTCLIENTFILE
|
||||||
|
|
||||||
|
|
||||||
history -c
|
history -c
|
||||||
|
|
|
@ -8,7 +8,7 @@ rm -f /usr/lib/initramfs-tools/bin/*
|
||||||
cp /bin/busybox /usr/lib/initramfs-tools/bin
|
cp /bin/busybox /usr/lib/initramfs-tools/bin
|
||||||
cd /tmp
|
cd /tmp
|
||||||
mkinitramfs -o /tmp/initrd.img-$OSRELEASE -v $OSRELEASE
|
mkinitramfs -o /tmp/initrd.img-$OSRELEASE -v $OSRELEASE
|
||||||
cp -v /boot/vmlinuz-$OSRELEASE.efi.signed /tmp
|
cp -v /boot/vmlinuz-$OSRELEASE /tmp
|
||||||
|
|
||||||
history -c
|
history -c
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,8 @@ if [ "$OSRELEASE" == "3.7.6-030706-generic" ]; then
|
||||||
rm -fr /tmp/kernel
|
rm -fr /tmp/kernel
|
||||||
else
|
else
|
||||||
# Instalar Kernel firmado del repositorio de paquetes.
|
# 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-${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-modules-${OSRELEASE} linux-modules-extra-${OSRELEASE} 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Valores para paquetes interactivos.
|
# Valores para paquetes interactivos.
|
||||||
|
|
Loading…
Reference in New Issue