Compare commits

...

43 Commits

Author SHA1 Message Date
Natalia Serrano 02b14b8b93 Merge pull request 'refs #2232 increase ulimit for the qt6 browser' (#16) from ulimit-n-4096 into main
Reviewed-on: #16
2025-06-18 14:17:59 +02:00
Natalia Serrano 4eb0c9bd9c refs #2232 increase ulimit for the qt6 browser 2025-06-18 13:24:14 +02:00
Natalia Serrano 3f31e288ef Merge pull request 'ogrepo-ssh-key' (#15) from ogrepo-ssh-key into main
Reviewed-on: #15
2025-06-17 14:20:59 +02:00
Natalia Serrano 99cff41d2b refs #2225 take ogrepo ssh key 2025-06-16 15:27:43 +02:00
Natalia Serrano 0ef9593384 refs #2225 take ogrepo ssh key 2025-06-16 15:21:07 +02:00
Natalia Serrano 14e47e0eb6 refs #2225 take ogrepo ssh key 2025-06-16 15:16:06 +02:00
Natalia Serrano 5bf6620916 refs #2225 take ogrepo ssh key 2025-06-16 15:14:26 +02:00
Natalia Serrano 275e64c03c Merge pull request 'refs #2222 install opengnsys-gitlib' (#14) from install-gitlib into main
Reviewed-on: #14
2025-06-16 14:59:05 +02:00
Natalia Serrano 9ba01a6d30 refs #2222 install opengnsys-gitlib 2025-06-16 14:58:41 +02:00
Vadim vtroshchinskiy aeb1f7830b Install gitlib 2025-06-16 14:13:22 +02:00
Natalia Serrano 94a89881c6 Merge pull request 'resolvconf' (#13) from resolvconf into main
Reviewed-on: #13
2025-05-28 13:24:05 +02:00
Natalia Serrano 5a52e3ecae refs #2094 try fixing resolvconf 2025-05-28 13:23:33 +02:00
Natalia Serrano 19c63800de refs #2094 try fixing resolvconf 2025-05-28 11:38:44 +02:00
Natalia Serrano d44d848327 Merge pull request 'refs #2060 add script for setting browser URL' (#12) from py-seturl into main
Reviewed-on: #12
2025-05-21 15:48:08 +02:00
Natalia Serrano eb2d836c51 refs #2060 add script for setting browser URL 2025-05-21 14:25:47 +02:00
Natalia Serrano 9779d9cc8d Merge pull request 'refs #2045 configure dbus' (#11) from dbus into main
Reviewed-on: #11
2025-05-19 19:50:08 +02:00
Natalia Serrano 5c51336402 refs #2045 configure dbus 2025-05-19 19:49:10 +02:00
Natalia Serrano 1fbc28622c Merge pull request 'stunnel' (#10) from stunnel into main
Reviewed-on: #10
2025-05-18 12:18:53 +02:00
Natalia Serrano c9152b5e2d refs #2026 update changelog 2025-05-18 12:16:59 +02:00
Natalia Serrano 2d6db5e475 refs #2026 run stunnel in the foreground 2025-05-18 11:18:54 +02:00
Natalia Serrano 809af2cbc2 refs #2026 configure stunnel after installing it 2025-05-16 15:51:05 +02:00
Natalia Serrano a627be89ba refs #2026 add template for stunnel config 2025-05-16 15:37:08 +02:00
Natalia Serrano a481cccaef refs #2025 install stunnel4 2025-05-16 14:56:35 +02:00
Natalia Serrano 782a85d515 Merge pull request 'OGBrowser integration' (#9) from browser into main
Reviewed-on: #9
2025-05-14 14:52:50 +02:00
Natalia Serrano 895131bb05 refs #2000 bump version 2025-05-14 14:49:02 +02:00
Natalia Serrano f9bb2f3868 refs #2000 remove included file--it lives elsewhere 2025-05-14 13:07:43 +02:00
Vadim Trochinsky 0b2bb98172 browser 2025-05-14 11:32:06 +02:00
Vadim Trochinsky 6d74a02d25 Add browser package to list 2025-05-14 11:32:06 +02:00
Vadim Trochinsky 1029ad0fe6 Re-add ignore-ssl flag 2025-05-14 11:32:06 +02:00
Vadim vtroshchinskiy 2c97f72485 Export variable 2025-05-14 11:32:06 +02:00
Vadim vtroshchinskiy 0cc540c0cd test 2025-05-14 11:32:06 +02:00
Vadim vtroshchinskiy 4d60aaa1d4 Improved browser launcher 2025-05-14 11:32:06 +02:00
Vadim vtroshchinskiy 76950c8c11 Launch browser with new wrapper 2025-05-14 11:32:06 +02:00
Vadim Trochinsky e103f9bf6a Prototipo de oglive con X11 2025-05-14 11:32:06 +02:00
Vadim vtroshchinskiy 42aceb750f Fix environment variable name 2025-05-14 11:32:06 +02:00
Vadim vtroshchinskiy ffa0803aab Enable SHM memory in oglive 2025-05-14 11:32:06 +02:00
Vadim vtroshchinskiy 958143f24f Disable chromium sandbox, makes execution as root possible 2025-05-14 11:32:06 +02:00
Vadim vtroshchinskiy 919b4c58c0 Fix udev for browser/wayland 2025-05-14 11:32:06 +02:00
Vadim vtroshchinskiy 7fdbcdea98 test 2025-05-14 11:32:06 +02:00
Vadim Trochinsky 5452786078 Add packages to support ogbrowser 2025-05-14 11:32:06 +02:00
Vadim Trochinsky 434cfb865e Change python3-xattr to python3-pyxattr -- that's the correct one 2025-05-14 11:32:06 +02:00
Vadim vtroshchinskiy 0ca148775e Fix typo 2025-05-14 11:32:06 +02:00
Vadim vtroshchinskiy ed782169c2 Modificaciones para browser 2025-05-14 11:32:06 +02:00
15 changed files with 347 additions and 96 deletions

View File

@ -5,6 +5,58 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [3.9.1] - 2025-06-18
### Fixed
- Increase "open files" ulimit for the qt6 browser
## [3.9.0] - 2025-06-16
### Added
- Take ogrepository SSH key from its git repo
## [3.8.0] - 2025-06-16
### Added
- Installation of package opengnsys-gitlib
## [3.7.0] - 2025-05-28
### Changed
- Leave resolv.conf as a symlink to /run/resolvconf/resolv.conf
## [3.6.0] - 2025-05-21
### Changed
- Configure stunnel and dbus via includes rather than in python code
### Added
- Add script for changing the URL in the running browser
## [3.5.0] - 2025-05-19
### Changed
- Configure dbus
## [3.4.0] - 2025-05-18
### Changed
- Install and configure stunnel in the image
## [3.3.0] - 2025-05-14
### Changed
- Add changes required for the new browser
## [3.2.1] - 2025-03-31
### Changed

View File

@ -30,7 +30,7 @@ ARG OPENGNSYS_HEAD
COPY . /tmp/opengnsys/oglive_builder/
RUN ls -la /tmp/opengnsys/oglive_builder/ && \
mv /tmp/opengnsys/oglive_builder/engine /tmp/opengnsys/oglive_builder/shared /tmp/opengnsys/ && \
mv /tmp/opengnsys/oglive_builder/engine /tmp/opengnsys/oglive_builder/shared /tmp/opengnsys/oglive_builder/ogrepo-ssh-key /tmp/opengnsys/ && \
cp /tmp/opengnsys/oglive_builder/schroot.conf /tmp/opengnsys/oglive_builder/mount-defaults /etc/schroot/ && \
echo '' >/etc/schroot/default/nssdatabases && \
rm -f /etc/schroot/setup.d/*chrootname

View File

@ -205,7 +205,7 @@ def debootstrap (btrootfsimg, btrootfsmnt, osarch, oscodename, oshttp):
logger.info (f'debootstrap --arch="{osarch}" --components=main,universe "{oscodename}" "{btrootfsmnt}" "{oshttp}" : ok')
return 0
def copy_og_files (builder, og_shared, ogclientmount, osdistrib, oscodename):
def copy_og_files (builder, og_shared, ogrepo_ssh_key, ogclientmount, osdistrib, oscodename):
logger.info ('Iniciando la personalización con datos del repositorio')
sources_list_in = f'{builder}/includes/etc/apt/sources.list.{osdistrib.lower()}'
@ -226,6 +226,12 @@ def copy_og_files (builder, og_shared, ogclientmount, osdistrib, oscodename):
os.makedirs (f'{ogclientmount}/usr/local/lib', exist_ok=True)
os.makedirs (f'{ogclientmount}/usr/local/plugins', exist_ok=True)
os.makedirs (f'{ogclientmount}/root/.ssh', exist_ok=True)
shutil.copy (f'{ogrepo_ssh_key}/opengnsys', f'{ogclientmount}/root/.ssh/id_ed25519')
shutil.copy (f'{ogrepo_ssh_key}/opengnsys.pub', f'{ogclientmount}/root/.ssh/id_ed25519.pub')
os.chmod (f'{ogclientmount}/root/.ssh/id_ed25519', 0o0600)
os.chmod (f'{ogclientmount}/root/.ssh/id_ed25519.pub', 0o0600)
subprocess.run (f'rsync -aH {builder}/includes/* {ogclientmount}/' , shell=True)
subprocess.run (f'rsync -aH {og_shared}/* {ogclientmount}/opt/opengnsys/', shell=True)

View File

@ -87,7 +87,7 @@ def boottoolsSoftwareCompile():
print ('boottoolsSoftwareCompile: spartlnx', file=sys.stderr)
try: utils.run (['which', 'spartl64.run'])
except:
utils.run (['wget', '--quiet', 'http://damien.guibouret.free.fr/savepart.zip'])
utils.run (['wget', '--tries=5', 'http://damien.guibouret.free.fr/savepart.zip'])
utils.run (['unzip', '-o', 'savepart.zip', '-d', '/sbin/', 'spartl64.run', 'spartlnx.run'])
utils.run (['mkdir', '/usr/share/doc/spartlnx'])
utils.run (['unzip', '-j', '-o', 'savepart.zip', '-d', '/usr/share/doc/spartlnx/', 'doc/en/*'])
@ -112,15 +112,23 @@ def boottoolsPythonModules():
utils.run (['pip3', 'install', 'pyblkid', '--break-system-packages'])
def boottoolsRemovePackages():
print ('boottoolsRemovePackages', file=sys.stderr)
apt.remove (['python3-dev', 'python3-setuptools', 'python3-pip'])
def setup_resolvconf():
if os.path.islink('/etc/resolc.conf'):
os.unlink ('/etc/resolv.conf')
## have working DNS during the build
def setup_resolvconf1():
print ('setup_resolvconf1', file=sys.stderr)
os.unlink ('/etc/resolv.conf')
f = open ('/etc/resolv.conf', 'w')
f.write ('nameserver 8.8.8.8')
f.close()
## leave the final configuration for oglive
def setup_resolvconf2():
print ('setup_resolvconf2', file=sys.stderr)
os.unlink ('/etc/resolv.conf')
os.symlink ('/run/resolvconf/resolv.conf', '/etc/resolv.conf')
def boottoolsInitrdGenerate (osrelease):
print ('boottoolsInitrdGenerate', file=sys.stderr)
for f in glob.glob ('/usr/lib/initramfs-tools/bin/*'):
@ -158,10 +166,10 @@ if __name__ == '__main__':
debconf_settings = config['General'].get ('debconf_settings')
updateCaCertificates()
setup_resolvconf()
setup_resolvconf1()
boottoolsSoftwareInstall (args.osarch, args.osrelease)
boottoolsSoftwareCompile()
boottoolsPythonModules()
boottoolsRemovePackages()
setup_resolvconf() ## do this again, since someone seems to be overwriting the file
setup_resolvconf2()
boottoolsInitrdGenerate (args.osrelease)

View File

@ -0,0 +1,8 @@
<busconfig>
<policy user="root">
<allow own="es.opengnsys.OGBrowser.browser"/>
<allow send_destination="es.opengnsys.OGBrowser.browser"/>
<allow send_interface="es.opengnsys.OGBrowser.browser"/>
<allow send_type="method_call"/>
</policy>
</busconfig>

View File

@ -1,4 +1,6 @@
LC_TYPE=es_ES@euro
LC_ALL=es_ES@euro
LANG=es_ES@euro
LANGUAGE=es_ES@euro
LC_TYPE=es_ES.UTF-8@euro
LC_ALL=es_ES.UTF-8@euro
LANG=es_ES.UTF-8@euro
LANGUAGE=es_ES.UTF-8@euro
XDG_RUNTIME_DIR=/run/user/0
QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox

View File

@ -38,6 +38,9 @@ mkdir -p ${DESTDIR}/var/log
mkdir -p ${DESTDIR}/opt/opengnsys;
mkdir -p ${DESTDIR}/ogboot;
mkdir -p ${DESTDIR}/boot;
mkdir -p ${DESTDIR}/run/user/0
chmod 700 ${DESTDIR}/run/user/0
# Insert basic binaries
copy_exec /bin/bash-static /bin/bash

View File

@ -15,6 +15,9 @@
#fbcon
# Kernel 3.7+ video.
virtio_gpu
vmwgfx
uvesafb
# Generales

View File

@ -1 +1 @@
OpenGnsys Client 3.2.1
OpenGnsys Client 3.9.1

View File

@ -110,8 +110,8 @@ fi
#/**
# ogExportVarEnvironment
#@brief Exporta las variables usadas en el proceso de inicio OpenGnsys y las almacena en /tmp
#@param
#@return
#@param
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
@ -119,7 +119,7 @@ fi
#*/ ##
ogExportVarEnvironment ()
{
export CFGINITRD="/tmp/initrd.cfg"
export CFGINITRD="/tmp/initrd.cfg"
OGPROTOCOL="${ogprotocol:-smb}"
[ "$ogunit" != "" ] && OGUNIT="/$ogunit"
# OPTIONS Para samba y local (a nfs no le afecta)
@ -127,16 +127,16 @@ ogExportVarEnvironment ()
DEFOGLIVE="ogclient"
export OGLIVEDIR="${oglivedir:-$DEFOGLIVE}" && echo "OGLIVEDIR=$OGLIVEDIR" >> $CFGINITRD
case "$OGPROTOCOL" in
nfs|NFS)
export SRCOGLIVE="/var/lib/tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD
nfs|NFS)
export SRCOGLIVE="/var/lib/tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD
export SRCOGSHARE="/opt/opengnsys/client" && echo "SRCOGSHARE=$SRCOGSHARE" >> $CFGINITRD
export SRCOGLOG="/opt/opengnsys/log/clients" && echo "SRCOGLOG=$SRCOGLOG" >> $CFGINITRD
export SRCOGIMAGES="/opt/opengnsys/images$OGUNIT" && echo "SRCOGIMAGES=$SRCOGIMAGES" >> $CFGINITRD
export SRCOGLOG="/opt/opengnsys/log/clients" && echo "SRCOGLOG=$SRCOGLOG" >> $CFGINITRD
export SRCOGIMAGES="/opt/opengnsys/images$OGUNIT" && echo "SRCOGIMAGES=$SRCOGIMAGES" >> $CFGINITRD
;;
smb|SMB|cifs|CIFS|samba|SAMBA)
export SRCOGLIVE="tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD
export SRCOGSHARE="ogclient" && echo "SRCOGSHARE=$SRCOGSHARE" >> $CFGINITRD
export SRCOGLOG="oglog" && echo "SRCOGLOG=$SRCOGLOG" >> $CFGINITRD
export SRCOGLOG="oglog" && echo "SRCOGLOG=$SRCOGLOG" >> $CFGINITRD
export SRCOGIMAGES="ogimages$OGUNIT" && echo "SRCOGIMAGES=$SRCOGIMAGES" >> $CFGINITRD
;;
local|LOCAL)
@ -149,7 +149,7 @@ ogExportVarEnvironment ()
esac
#punto de acceso al boot-tools live
export DSTOGLIVE="/opt/oglive/tftpboot"
#punto de montaje para unionfs
#punto de montaje para unionfs
export OGLIVERAMFS="/opt/oglive/ramfs" && echo "OGLIVERAMFS=$OGLIVERAMFS" >> $CFGINITRD
#punto de montaje donde se accede al 2nd FS mediante loop
export OGLIVEROOTFS="/opt/oglive/rootfs" && echo "OGLIVEROOTFS=$OGLIVEROOTFS" >> $CFGINITRD
@ -157,13 +157,13 @@ ogExportVarEnvironment ()
export OGLIVEUNIONFS="/opt/oglive/unionfs" && echo "OGLIVEUNIONFS=$OGLIVEUNIONFS" >> $CFGINITRD
#etiquta para los dispositivos offline
export OGLIVELABEL="ogClient"
#echo "puntos de montajes para los demas accesos"
#echo "acceso al client, engine, scritps, interfaz"
export DSTOGSHARE="/opt/opengnsys" && echo "DSTOGSHARE=$DSTOGSHARE" >> $CFGINITRD
export DSTOGSHARE="/opt/opengnsys" && echo "DSTOGSHARE=$DSTOGSHARE" >> $CFGINITRD
export DSTOGLOG="/opt/opengnsys/log" && echo "DSTOGLOG=$DSTOGLOG" >> $CFGINITRD
export DSTOGIMAGES="/opt/opengnsys/images" && echo "DSTOGIMAGES=$DSTOGIMAGES" >> $CFGINITRD
##INFORMACION DE OTRAS VARIABLES OBTENDIAS EN OTRAS FUNCIONES ogConfigureNetwork.
#DEVICE
#IPV4DDR
@ -185,8 +185,8 @@ ogExportVarEnvironment ()
#/**
# ogConfigureRamfs
#@brief Configura el initrd para adaptarlo al sistema raiz.
#@param
#@return
#@param
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
@ -194,10 +194,10 @@ ogExportVarEnvironment ()
#*/ ##
ogConfigureRamfs ()
{
mkdir -p $DSTOGLIVE
mkdir -p $OGLIVERAMFS
mkdir -p $OGLIVEROOTFS
mkdir -p $OGLIVEUNIONFS
mkdir -p $DSTOGLIVE
mkdir -p $OGLIVERAMFS
mkdir -p $OGLIVEROOTFS
mkdir -p $OGLIVEUNIONFS
touch /etc/fstab
}
@ -206,8 +206,8 @@ ogConfigureRamfs ()
#/**
# ogLoadNetModule
#@brief Carga en un demerminado modulo de red, requiere compilación previo del modulo
#@param
#@return
#@param
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
@ -226,8 +226,8 @@ ogLoadNetModule ()
#/**
# ogPostConfigureFS
#@brief Configura el sistema raiz, para independizarlo entre los clientes.
#@param
#@return
#@param
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
@ -237,29 +237,29 @@ ogPostConfigureFS()
{
# configuramos el /etc/hostname.
echo $HOSTNAME > /etc/hostname
#configuramos el /etc/hosts
echo "127.0.0.1 localhost" > /etc/hosts
echo "$IPV4ADDR $HOSTNAME" >> /etc/hosts
#configuramos el host.conf
echo "order hosts,bind" > /etc/host.conf
echo "multi on" >> /etc/host.conf
#configuramos el dns anterior ubuntu 12.04 (parámetro del Kernel "ogdns=IP_DNS")
if [ -n "$ogdns" ]; then
mkdir -p /run/resolvconf
echo "nameserver $ogdns" > /run/resolvconf/resolv.conf
fi
#configuramos el uso del servicio http proxy (parámetro del Kernel "ogproxy=URL_Proxy")
if [ -n "${ogproxy}" ]; then
export http_proxy="$ogproxy"
export https_proxy="$ogproxy"
export ftp_proxy="$ogproxy"
export ftps_proxy="$ogproxy"
fi
export ftps_proxy="$ogproxy"
fi
# configuramos el /etc/networks
#read -e NETIP NETDEFAULT <<<$(route -n | grep eth0 | awk -F" " '{print $1}')
NETIP=$(route -n | grep eth0 | awk -F" " '{print $1}') && NETIP=$(echo $NETIP | cut -f1 -d" ")
@ -310,8 +310,20 @@ ogPostConfigureFS()
#Montamos un directorio temporal para permitir instalacion de softare desde el comando apt-get (parametor kernel "ogtmpfs=50" valor en megas
ogtmpfs="${ogtmpfs:-15}"
mount tmpfs /var/cache/apt/archives -t tmpfs -o size=${ogtmpfs}M
#mount tmpfs /var/cache/apt/archives -t tmpfs -o size=${ogtmpfs}M
mkdir -p /var/cache/apt/archives/partial
mkdir -p /run/user/0
chmod 700 /run/user/0
# esto completa la inicializacion de udev y permite el inicio del escritorio grafico
/bin/udevadm trigger
# Memoria compartida -- necesario para browser
mkdir -p /dev/shm
mount tmpfs -t tmpfs /dev/shm
chmod 1777 /dev/shm
}
@ -324,8 +336,8 @@ ogPostConfigureFS()
# si la red ha sido configurada con el parametro de kernel ip, será el segundo valor.
## ip=iphost:ipnext-server:ipgateway:netmask:hostname:iface:none
## ip=172.17.36.21:62.36.225.150:172.17.36.254:255.255.255.0:prueba1:eth0:none
#@param
#@return
#@param
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
@ -355,13 +367,13 @@ ogGetROOTSERVER ()
fi
export ROOTSERVER
echo "ROOTSERVER=$ROOTSERVER" >> $CFGINITRD
#si oglive no oglive=R
export OGSERVERIMAGES="${ogrepo:-$ROOTSERVER}" && echo "OGSERVERIMAGES=$OGSERVERIMAGES" >> $CFGINITRD
export OGSERVERIMAGES="${ogrepo:-$ROOTSERVER}" && echo "OGSERVERIMAGES=$OGSERVERIMAGES" >> $CFGINITRD
export OGSERVERSHARE="${ogshare:-$ROOTSERVER}" && echo "OGSERVERSHARE=$OGSERVERSHARE" >> $CFGINITRD
export OGSERVERLOG="${oglog:-$ROOTSERVER}" && echo "OGSERVERLOG=$OGSERVERLOG" >> $CFGINITRD
export OGSERVERLIVE="${oglive:-$OGSERVERIMAGES}" && echo "OGSERVERLIVE=$OGSERVERLIVE" >> $CFGINITRD
return 0
}
@ -369,8 +381,8 @@ ogGetROOTSERVER ()
# ogUpdateInitrd
#@brief Actualiza el initrd de la cache desde el servidor. Si el arranque ha sido desde cache, comprueba desde el servidor nueva version del initird.
#@param1
#@return
#@param1
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
@ -394,26 +406,26 @@ ogUpdateInitrd ()
[ -z "$TYPE" ] && return
mount -t $TYPE LABEL=CACHE /tmp/cache || return
mkdir -p /tmp/cache/boot/$OGLIVEDIR
# comparamos los del server
busybox tftp -g -r $OGLIVEDIR/ogvmlinuz.sum $ROOTSERVER
busybox tftp -g -r $OGLIVEDIR/oginitrd.img.sum $ROOTSERVER
SERVERVMLINUZ=`cat ogvmlinuz.sum`
SERVERINITRD=`cat oginitrd.img.sum`
#comparamos los de la cache
CACHEVMLINUZ=`cat /tmp/cache/boot/$OGLIVEDIR/ogvmlinuz.sum`
CACHEINITRD=`cat /tmp/cache/boot/$OGLIVEDIR/oginitrd.img.sum`
echo "MD5 on SERVER: $SERVERVMLINUZ $SERVERINITRD"
echo "MD5 on CACHE: $CACHEVMLINUZ $CACHEINITRD"
cd /tmp/cache/boot/$OGLIVEDIR || mkdir -p /tmp/cache/boot/$OGLIVEDIR
if [ "$CACHEVMLINUZ" != "$SERVERVMLINUZ" ]
then
then
echo "ogvmlinuz updating"
busybox tftp -g -r $OGLIVEDIR/ogvmlinuz $ROOTSERVER
busybox tftp -g -r $OGLIVEDIR/ogvmlinuz.sum $ROOTSERVER
@ -441,13 +453,13 @@ ogUpdateInitrd ()
#@param3 punto de acceso remoto
#@param4 punto de montaje local
#@param5 acceso de lectura tipo ",ro"
#@return
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
#@date 2011/05/24
#*/ ##
ogConnect ()
{
SERVER=$1
@ -455,13 +467,13 @@ ogConnect ()
SRC=$3
DST=$4
READONLY=$5
case "$PROTOCOL" in
nfs)
nfsmount ${SERVER}:${SRC} ${DST} -o nolock${READONLY} 2> /dev/null || mount.nfs ${SERVER}:${SRC} ${DST} -o nolock${READONLY}
;;
smb)
mount.cifs //${SERVER}/${SRC} ${DST} ${OPTIONS}${READONLY}
mount.cifs //${SERVER}/${SRC} ${DST} ${OPTIONS}${READONLY}
;;
local)
# Comprobamos que estatus sea online y que la variable del server no esta vacia.
@ -485,21 +497,21 @@ ogConnect ()
#/**
# ogConnectOgLive
#@brief Conecta con el recurso para usar el sistema raiz externo, remoto o local
#@param1
#@return
#@param1
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
#@date 2011/05/24
#@date 2011/05/24
ogConnectOgLive ()
{
# Si ogprotocol=local, la funcion ogExportVar => SRCOGLIVE=local
if [ "$SRCOGLIVE" == "local" ]
then
then
echo "Montar imagen del sistema root desde dispositivo local"
for i in $(blkid /dev/s* | grep $OGLIVELABEL | awk -F: '{print $2}' | tr -d \"); do export $i; done
# si local usb| cd con partcion es identificada como label $OGLIVELABEL
mount -t $TYPE LABEL=$OGLIVELABEL $DSTOGLIVE
# si local usb| cd con partcion es identificada como label $OGLIVELABEL
mount -t $TYPE LABEL=$OGLIVELABEL $DSTOGLIVE
if [ $? != 0 ]
then
# Si local es particion CACHE es identificada como CACHE
@ -508,8 +520,8 @@ ogConnectOgLive ()
fi
else
# Si ogprotocol es remoto. TODO en smb rw y en nfs ro??
ogConnect $OGSERVERLIVE $OGPROTOCOL $SRCOGLIVE $DSTOGLIVE
fi
ogConnect $OGSERVERLIVE $OGPROTOCOL $SRCOGLIVE $DSTOGLIVE
fi
# Si el montaje ha sido correcto, tanto en local como en remoto. Procedemos con la union
ogMergeLive
}
@ -518,21 +530,21 @@ ogConnectOgLive ()
#/**
# ogMergeLive
#@brief Metafuncion para fusionar el initrd con el sistema raiz.
#@param1
#@return
#@param1
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
#@date 2011/05/24
#@date 2011/05/24
ogMergeLive()
{
#Si existe en el punto de acceso del del oglive el fichero ogclient.sqfs
#Si existe en el punto de acceso del del oglive el fichero ogclient.sqfs
if [ ! -d $DSTOGLIVE/$OGLIVEDIR ]; then
echo "Usando ogLive por defecto."
export OGLIVEDIR=$DEFOGLIVE
fi
if [ -f $DSTOGLIVE/$OGLIVEDIR/ogclient.sqfs ]
then
then
cat /proc/mounts > /tmp/mtab.preunion
if [ "$og2nd" == "img" ]
then
@ -544,7 +556,7 @@ then
## Montamos el ROOTFS tipo squashfs
mount $DSTOGLIVE/$OGLIVEDIR/ogclient.sqfs $OGLIVEROOTFS -t squashfs -o loop
fi
# Realizamos la union entre el ogliveram(initrd) y el ogliverootfs(ogclient.sqfs)
# Realizamos la union entre el ogliveram(initrd) y el ogliverootfs(ogclient.sqfs)
# Nota: el orden es muy importante para evitar errores de montaje.
[ -d $OGLIVEROOTFS/lib32 ] && LIBS=lib32
for i in bin sbin lib $LIBS etc var usr root boot; do
@ -562,8 +574,8 @@ fi
#/**
# ogUnionLiveDir
#@brief fusiona dos directorios con unionfs
#@param1
#@return
#@param1
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
@ -579,6 +591,7 @@ ogUnionLiveDir()
U1STDIR="${OGLIVERAMFS}${TMPDIR}=RW"
U2NDDIR="${OGLIVEROOTFS}${TMPDIR}=RO"
UNIONDIR=${OGLIVEUNIONFS}${TMPDIR}
ulimit -n 4096
mkdir -p $UNIONDIR $TMPDIR
$UBIN $FUSE_OPT $UNION_OPT ${U1STDIR}:${U2NDDIR} $UNIONDIR
mount --bind $UNIONDIR $TMPDIR
@ -589,8 +602,8 @@ ogUnionLiveDir()
#/**
# ogConfigureLoopback
#@brief Configura la interfaz loopback para cliente torrent
#@param
#@return
#@param
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9 Usando funciones generales de ubuntu
#@author Antonio J. Doblas. Universidad de Malaga.
@ -609,8 +622,8 @@ ogConfigureLoopback()
#/**
# ogConfigureNetworking
#@brief Configura la interfaz de red usada en el pxe
#@param
#@return
#@param
#@return
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author Antonio J. Doblas. Universidad de Malaga.
@ -619,7 +632,7 @@ ogConfigureLoopback()
ogConfigureNetworking()
{
#echo "ogConfigureNetworking: Buscando interfaz a configurar DEVICE"
if [ -n "${BOOTIF}" ]
if [ -n "${BOOTIF}" ]
then
#echo " variable BOOTIF exportada con pxelinux.0 con valor $BOOTIF"
IP=$IPOPTS
@ -673,7 +686,7 @@ if [ -z "${DEVICE}" ]; then
fi
[ -n "${DEVICE}" ] && [ -e /run/net-"${DEVICE}".conf ] && return 0
#if [ -n "${DEVICE}" ] && [ -e /run/net-"${DEVICE}".conf ]; then
#if [ -n "${DEVICE}" ] && [ -e /run/net-"${DEVICE}".conf ]; then
# echo "variable DEVICE con valor $DEVICE y fichero /run/net-$DEVICE encontrados"
# return 0
#else
@ -733,7 +746,7 @@ for ROUNDTTT in 2 3 4 6 9 16 25 36 64 100; do
done
# source ipconfig output
if [ -n "${DEVICE}" ]; then
if [ -n "${DEVICE}" ]; then
export DEVICE
export DEVICECFG="/run/net-${DEVICE}.conf"
# En algunos casos, el fichero de configuración está en /tmp.
@ -755,11 +768,11 @@ fi
# ogYesNo
#@brief Gestion de peticiones de usuario en modo ogdebug=true
#@param1 OPTIONS --timeout N --default ANSWER
#@param1 Questions
#@param1 Questions
#@return 1=yes 0=no
#@exception OG_ERR_FORMAT Formato incorrecto.
#@version 0.9
#@author:
#@author:
#@date 2010/05/24
#*/ ##
ogYesNo()
@ -826,7 +839,7 @@ ogYesNo()
ans=$default
else
ans=$(echo $ans | tr '[:upper:]' '[:lower:]')
fi
fi
fi
if [[ "$ans" == 'y' || "$ans" == 'yes' || "$ans" == 'n' || "$ans" == 'no' ]]; then
@ -836,5 +849,5 @@ ogYesNo()
if [[ $ok -eq 0 ]]; then warning "Valid answers are: yes y no n"; fi
done
[[ "$ans" = "y" || "$ans" == "yes" ]]
}
}

View File

@ -0,0 +1,15 @@
setuid = stunnel4
setgid = stunnel4
pid = /var/run/stunnel4/menu.pid
foreground = yes
debug = info
[menu]
client = yes
accept = 127.0.0.1:81
connect = __OGCORE_IP__:__OGCORE_PORT__
cert = /opt/opengnsys/etc/ogagent.crt
key = /opt/opengnsys/etc/ogagent.key
CAfile = /opt/opengnsys/etc/ca.crt
requireCert = yes
verifyChain = yes

View File

@ -0,0 +1,116 @@
#!/bin/bash
# Compatibilidad con los argumentos usados con el browser original:
# browser -qws http://google.com
#
while getopts ":qwsDWX" opt ; do
case $opt in
q)
echo "Ignoring option: -q"
;;
w)
echo "Ignoring option: -w"
;;
s)
echo "Ignoring option: -s"
;;
D)
BROWSER_DEBUG=1
;;
W)
DISABLE_WAYLAND=1
;;
X)
DISABLE_X11=1
;;
esac
done
shift $(expr $OPTIND - 1 )
browser_args="$@"
echo "Browser args: $browser_args"
[ -n "$DISABLE_WAYLAND" ] && echo "WAYLAND DISABLED"
[ -n "$DISABLE_X11" ] && echo "X11 DISABLED"
if [ -n "BROWSER_DEBUG" ] ; then
echo "DEBUG MODE ENABLED"
echo "* Terminal available via Win+Enter"
echo "* Session may be killed with Ctrl+Alt+Backspace"
echo ""
fi
[ -x "/usr/bin/kitty" ] && wl_terminal=/usr/bin/kitty
[ -x "/usr/bin/foot" ] && wl_terminal=/usr/bin/foot
[ -x "/usr/bin/xterm" ] && x11_terminal=/usr/bin/kitty
[ -x "/usr/bin/i3-sensible-terminal" ] && x11_terminal=/usr/bin/i3-sensible-terminal
# The admin page is hosted remotely but executes things on localhost
QTWEBENGINE_CHROMIUM_FLAGS="--disable-web-security"
[ "$UID" -eq "0" ] && QTWEBENGINE_CHROMIUM_FLAGS="${QTWEBENGINE_CHROMIUM_FLAGS} --no-sandbox"
export QTWEBENGINE_CHROMIUM_FLAGS
rm -rf "/run/sway.started" "/run/x11.started"
mkdir -p $HOME/.config/sway
echo "exec /usr/bin/OGBrowser --ignore-ssl-errors \"$browser_args\" || /usr/bin/browser -qws \"$browser_args\"" > $HOME/.config/sway/config
if [ -n "BROWSER_DEBUG" ] ; then
echo "bindsym Mod4+Return exec $wl_terminal" >> $HOME/.config/sway/config
echo "bindsym Control+Alt+Backspace exit" >> $HOME/.config/sway/config
fi
echo "exec touch /run/sway.started" >> $HOME/.config/sway/config
mkdir -p $HOME/.config/i3
echo "exec /usr/bin/OGBrowser --ignore-ssl-errors \"$browser_args\" || /usr/bin/browser -qws \"$browser_args\"" > $HOME/.config/i3/config
if [ -n "BROWSER_DEBUG" ] ; then
echo "bindsym Mod4+Return exec i3-sensible-terminal" >> $HOME/.config/i3/config
echo "bindsym Control+Mod1+BackSpace exit" >> $HOME/.config/i3/config
fi
echo "exec touch /run/x11.started" >> $HOME/.config/i3/config
echo "exec /usr/bin/i3" > $HOME/.xinitrc
echo "exec /usr/bin/xterm" >> $HOME/.xinitrc
# Make sure libinput works
/usr/bin/udevadm trigger
if [ -x "/usr/bin/sway" -a -z "$DISABLE_WAYLAND" ] ; then
echo "*** Trying to launch Sway ***"
/usr/bin/sway
else
echo Sway not installed in this image, skipping.
fi
if [ ! -f "/run/sway.started" -a -z "$DISABLE_X11" ] ; then
if [ -x "/usr/bin/startx" ] ; then
echo "*** Trying to launch X11 ***"
/usr/bin/startx
else
echo X11 not installed in this image, skipping.
fi
else
echo "Sway was run before, not starting X11".
fi
if [ ! -f "/run/sway.started" -a ! -f "/run/x11.started" ] ; then
echo "Everything failed, dropping into a shell."
exec /usr/bin/bash
else
echo "All done."
fi

View File

@ -0,0 +1,20 @@
#!/usr/bin/python3
import sys
import dbus
if 2 != len(sys.argv):
sys.exit (1)
dest = 'es.opengnsys.OGBrowser.browser'
path = '/'
interface = None
method = 'setURL'
signature = 's'
url = sys.argv[1]
b = dbus.SystemBus()
try:
b.call_blocking (dest, path, interface, method, 's', [url])
except Exception as e:
sys.exit (1)

View File

@ -92,7 +92,7 @@ filesystem_local =
dmraid dmsetup lvm2 e2fsprogs
jfsutils reiserfsprogs reiser4progs xfsprogs mhddfs hfsplus hfsprogs hfsutils nilfs-tools vmfs-tools
btrfs-progs # ogLive a partir de Ubuntu 20.04
zfsutils-linux # ogLive a partir de Ubuntu 16.04
#zfsutils-linux # ogLive a partir de Ubuntu 16.04 -- desactivado temporalmente
android-tools-adb # ogLive a partir de Ubuntu 16.04
android-tools-fastboot # ogLive a partir de Ubuntu 16.04
f2fs-tools
@ -108,7 +108,7 @@ filesystem_remote =
#nfs-common # Provoca error de instalación en Ubuntu 15.04
#bittornado # ogLive anterior a Ubuntu 20.04
monitoring = htop ncdu bwbar bmon iftop ifstat dstat hdparm sdparm blktool testdisk
monitoring = htop ncdu bwbar bmon iftop ifstat dstat hdparm sdparm blktool testdisk kitty-terminfo
networking = netpipes curl wget tftp-hpa dnsutils
#trickle # ubuntu noble: has no installation candidate
@ -126,9 +126,13 @@ testing =
xwindows =
v86d # VESA Kernel 3.7+
icewm xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-video-all xinit i3
#xorg-dev xorg lxde #+300M
#roxterm gparted #+80M
#openbox midori #xvesa en compilacion
oggit = python3 python3-git python3-xattr python3-libarchive-c python3-pylibacl python3-pip opengnsys-libarchive-c python3-termcolor bsdextrautils opengnsys-pyblkid ntfs-3g-system-compression python3-tqdm
ogagent = stunnel4
ogbrowser = sway libinput-tools hwdata ogbrowser
oggit = python3 python3-git python3-pyxattr python3-libarchive-c python3-pylibacl python3-pip python3-hivex opengnsys-libarchive-c python3-termcolor bsdextrautils opengnsys-pyblkid opengnsys-gitlib ntfs-3g-system-compression python3-tqdm

View File

@ -75,9 +75,10 @@ def _initramfs_version (gitrelease, osrelease, curdir):
def _copy_og_files (btrootfsimg, btrootfsmnt, osdistrib, oscodename):
_mount_rootfs (btrootfsimg, btrootfsmnt)
builder = '/tmp/opengnsys/oglive_builder'
og_shared = '/tmp/opengnsys/shared'
btog.copy_og_files (builder, og_shared, btrootfsmnt, osdistrib, oscodename)
builder = '/tmp/opengnsys/oglive_builder'
og_shared = '/tmp/opengnsys/shared'
ogrepo_ssh_key = '/tmp/opengnsys/ogrepo-ssh-key'
btog.copy_og_files (builder, og_shared, ogrepo_ssh_key, btrootfsmnt, osdistrib, oscodename)
utils.umount (btrootfsmnt)
def _chroot_tasks (cfgfile, curdir, osrelease, osarch):