Compare commits

..

No commits in common. "main" and "resolvconf" have entirely different histories.

12 changed files with 592 additions and 727 deletions

View File

@ -5,72 +5,6 @@ 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.12.1] - 2025-08-05
### Added
- Save a log of early init (oginit/ogfuncions)
## [3.12.0] - 2025-07-31
### Changed
- Have /sbin/init run the python init
## [3.11.2] - 2025-07-18
### Changed
- Don't use the "@euro" locales
## [3.11.1] - 2025-07-11
### Fixed
- Fix opensearch pipeline
## [3.11.0] - 2025-07-11
### Added
- Install filebeat
## [3.10.1] - 2025-07-03
### Changed
- Undo the pcp/dstat change--does nothing
## [3.10.0] - 2025-07-03
### Changed
- Explicitly remove pcp and install dstat
## [3.9.2] - 2025-06-26
### Fixed
- Include dbus env var in .xinitrc
## [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

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/oglive_builder/ogrepo-ssh-key /tmp/opengnsys/ && \
mv /tmp/opengnsys/oglive_builder/engine /tmp/opengnsys/oglive_builder/shared /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, ogrepo_ssh_key, ogclientmount, osdistrib, oscodename):
def copy_og_files (builder, og_shared, 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,12 +226,6 @@ def copy_og_files (builder, og_shared, ogrepo_ssh_key, ogclientmount, osdistrib,
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

@ -1,6 +1,6 @@
LC_TYPE=es_ES.UTF-8
LC_ALL=es_ES.UTF-8
LANG=es_ES.UTF-8
LANGUAGE=es_ES.UTF-8
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

@ -1,28 +0,0 @@
filebeat.inputs:
- type: log
enabled: true
paths:
- /var/log/opengnsys.json.log
setup.template.settings:
index.number_of_shards: 1
output.elasticsearch:
hosts: ["__OGLOG_IP__:__OGLOG_PORT__"]
pipeline: "filebeat_opengnsys_pipeline"
username: "filebeat_writer"
password: "__OPENSEARCH_PASSWORD__"
protocol: "https"
ssl.enabled: true
ssl.verification_mode: none
#ssl.certificate: "/opt/opengnsys/etc/filebeat.crt.pem"
#ssl.key: "/opt/opengnsys/etc/filebeat.key.pem"
processors:
- add_host_metadata:
when.not.contains.tags: forwarded
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
seccomp.enabled: false

View File

@ -1 +1 @@
OpenGnsys Client 3.12.1
OpenGnsys Client 3.7.0

File diff suppressed because it is too large Load Diff

View File

@ -32,104 +32,115 @@
#@date 2013/02/18
#*/
og_ask() {
echo "$1" >>/tmp/oginit.log
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "$1: y/N "; [ $? == 0 ] && sh || echo " "
}
mountroot () {
[ -f /scripts/VERSION.txt ] && OGVERSION=$(cat /scripts/VERSION.txt)
OGVERSION=${OGVERSION:-"OpenGnsys Client"}
echo; echo; echo "$OGVERSION"; echo; echo
#[ "$quiet" != "y" ] && log_begin_msg "Running OpenGnsys /scripts/og-top"
#run_scripts /scripts/og-top
#[ "$quiet" != "y" ] && log_end_msg
. /scripts/functions
. /scripts/ogfunctions
# If the root device hasn't shown up yet, give it a little while
# to deal with removable devices
sleep 2
og_ask "Stop before get OG variables"
set -a
log_success_msg "Checking kernel parameters"
ogExportKernelParameters
[ -n "$video" ] && ogChangeVideoResolution # Cambiar resolución de vídeo para kernels que usan el parámetro "video".
log_success_msg "Checking OpenGnsys Environmnet"
ogExportVarEnvironment
og_ask "Stop before configure ramfs structure for OG"
ogConfigureRamfs
og_ask "Stop before configure netmoule specified in kernel parameters"
ogLoadNetModule
#[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/og-premount"
#run_scripts /scripts/og-premount
#[ "$quiet" != "y" ] && log_end_msg
og_ask "Stop before configure networking"
if [ -n "$oglive" ]; then
while !(ping -c 1 $oglive &> /dev/null); do
ogConfigureNetworking
done
fi
log_success_msg "config networking"
ogConfigureLoopback
log_success_msg "config loopback"
og_ask "Stop before detect rootserver"
ogGetROOTSERVER && log_success_msg "Get Info from pxe server and ckeck distribuited OG services "
if [ "$ogupdateinitrd" == "true" ]; then
og_ask "Stop before check updating initrd"
fi
if [ "$ogupdateinitrd" == "true" -o ! -d /lib/modules/$(uname -r) ]; then
ogUpdateInitrd # Actualizar Initrd si se solicita o si no se corresponde con su kernel.
fi
og_ask "Stop before connect and merging the rootfs -ogLive- with $OGSERVERLIVE"
ogConnectOgLive && log_success_msg "Merge the initrd with the remote rootfs -ogLive- on $OGSERVERLIVE" || sh
# si es necesario realiza ogConnect $OGSERVERLIVE $OGPROTOCOL $SRCOGLIVE $DSTOGLIVE
og_ask "Stop before connect with client dir SHARE -engine,scripts,interface, -share- on $OGSERVERSHARE "
ogConnect $OGSERVERSHARE $OGPROTOCOL $SRCOGSHARE $DSTOGSHARE
if [ $? -ne 0 -a "$SRCOGSHARE" != "$DEFOGSHARE" ]; then
ogConnect $OGSERVERSHARE $OGPROTOCOL $DEFOGSHARE $DSTOGSHARE && SRCOGSHARE=$DEFOGSHARE
fi
unset DEFOGSHARE
og_ask "Stop before connect with client dir LOG STORAGE on $OGSERVERLOG "
ogConnect $OGSERVERLOG $OGPROTOCOL $SRCOGLOG $DSTOGLOG
og_ask "Stop before connect with REPOSITORY STORAGE on $OGSERVERIMAGES "
ogConnect $OGSERVERIMAGES $OGPROTOCOL $SRCOGIMAGES $DSTOGIMAGES ,ro
og_ask "Stop before doing the postconfiguration"
ogPostConfigureFS
setupcon -k
og_ask "Stop before calling oginit with /etc/inittab"
if [ "$oginit" ]; then
echo "exec oginit ($oginit)" >>/tmp/oginit.log
exec $oginit
else
echo "exec regular init" >>/tmp/oginit.log
exec init
fi
# Parameter: Where to mount the filesystem
mountroot ()
{
[ -f /scripts/VERSION.txt ] && OGVERSION=$(cat /scripts/VERSION.txt)
OGVERSION=${OGVERSION:-"OpenGnsys Client"}
echo; echo; echo "$OGVERSION"; echo; echo
#[ "$quiet" != "y" ] && log_begin_msg "Running OpenGnsys /scripts/og-top"
#run_scripts /scripts/og-top
#[ "$quiet" != "y" ] && log_end_msg
# If the root device hasn't shown up yet, give it a little while
# to deal with removable devices
. /scripts/functions
. /scripts/ogfunctions
sleep 2
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before get OG variables: y/N "
[ $? == 0 ] && sh || echo " "
set -a
log_success_msg "Checking kernel parameters"
ogExportKernelParameters
# Cambiar resolución de vídeo para kernels que usan el parámetro "video".
[ -n "$video" ] && ogChangeVideoResolution
log_success_msg "Checking OpenGnsys Environmnet"
ogExportVarEnvironment
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure ramfs structure for OG: y/N "
[ $? == 0 ] && sh || echo " "
ogConfigureRamfs
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure netmoule specified in kernel parameters: y/N "
[ $? == 0 ] && sh || echo " "
ogLoadNetModule
#[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/og-premount"
#run_scripts /scripts/og-premount
#[ "$quiet" != "y" ] && log_end_msg
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before configure networking: y/N "
[ $? == 0 ] && sh || echo " "
if [ -n "$oglive" ]
then
while !(ping -c 1 $oglive &> /dev/null)
do
ogConfigureNetworking
done
fi
log_success_msg "config networking"
ogConfigureLoopback
log_success_msg "config loopback"
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before detect rootserver: y/N "
[ $? == 0 ] && sh || echo " "
ogGetROOTSERVER && log_success_msg "Get Info from pxe server and ckeck distribuited OG services "
if [ "$ogdebug" == "true" -a "$ogupdateinitrd" == "true" ]; then
ogYesNo --timeout 5 --default no "Stop before check updating initrd: y/N "
[ $? == 0 ] && sh || echo " "
fi
# Actualizar Initrd si se solicita o si no se corresponde con su kernel.
if [ "$ogupdateinitrd" == "true" -o ! -d /lib/modules/$(uname -r) ]; then
ogUpdateInitrd
fi
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect and merging the rootfs -ogLive- with $OGSERVERLIVE: y/N "
[ $? == 0 ] && sh || echo " "
ogConnectOgLive && log_success_msg "Merge the initrd with the remote rootfs -ogLive- on $OGSERVERLIVE" || sh
# si es necesario realiza ogConnect $OGSERVERLIVE $OGPROTOCOL $SRCOGLIVE $DSTOGLIVE
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with client dir SHARE -engine,scripts,interface, -share- on $OGSERVERSHARE : y/N "
[ $? == 0 ] && sh || echo " "
ogConnect $OGSERVERSHARE $OGPROTOCOL $SRCOGSHARE $DSTOGSHARE
if [ $? -ne 0 -a "$SRCOGSHARE" != "$DEFOGSHARE" ]; then
ogConnect $OGSERVERSHARE $OGPROTOCOL $DEFOGSHARE $DSTOGSHARE && SRCOGSHARE=$DEFOGSHARE
fi
unset DEFOGSHARE
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with client dir LOG STORAGE on $OGSERVERLOG : y/N "
[ $? == 0 ] && sh || echo " "
ogConnect $OGSERVERLOG $OGPROTOCOL $SRCOGLOG $DSTOGLOG
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before connect with REPOSITORY STORAGE on $OGSERVERIMAGES : y/N "
[ $? == 0 ] && sh || echo " "
ogConnect $OGSERVERIMAGES $OGPROTOCOL $SRCOGIMAGES $DSTOGIMAGES ,ro
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before doing the postconfiguration: y/N "
[ $? == 0 ] && sh || echo " "
ogPostConfigureFS
setupcon -k
[ "$ogdebug" == "true" ] && ogYesNo --timeout 5 --default no "Stop before calling oginit with /etc/inittab: y/N "
[ $? == 0 ] && sh || echo " "
if [ "$oginit" ]
then
exec $oginit
else
exec init
fi
}

View File

@ -1,5 +1,13 @@
# This is run first except when booting in single-user mode
tty1::respawn:/opt/opengnsys/etc/preinit.py
#
#::sysinit:/opt/opengnsys/etc/preinit/defaultTESTING.sh
# /bin/sh invocations on selected ttys
#
# Start an "askfirst" shell on the console (whatever that may be)
#::askfirst:/bin/sh
# Start an "askfirst" shell on /dev/tty2-4
#tty1::respawn:/sbin/getty 38400 tty1
tty1::respawn:/opt/opengnsys/etc/preinit/default.sh
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4

View File

@ -1,18 +1,32 @@
#!/bin/bash
# Compatibilidad con los argumentos usados con el browser original: browser -qws http://google.com
# 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 ;;
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)
shift $(expr $OPTIND - 1 )
browser_args="$@"
@ -28,51 +42,52 @@ if [ -n "BROWSER_DEBUG" ] ; then
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
[ -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"
## sway
mkdir -p $HOME/.config/sway
echo "exec /usr/bin/OGBrowser --ignore-ssl-errors \"$browser_args\"" > $HOME/.config/sway/config
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
## i3
mkdir -p $HOME/.config/i3
echo "exec /usr/bin/OGBrowser --ignore-ssl-errors \"$browser_args\"" > $HOME/.config/i3/config
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
## xinitrc
if [[ -z $DBUS_SESSION_BUS_ADDRESS ]]; then eval $(cat /proc/$(pidof OGAgent)/environ |sed -e 's/\x00/\x0a/g' |grep DBUS_SESSION_BUS_ADDRESS); fi
echo "export DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" > $HOME/.xinitrc
echo "exec /usr/bin/i3" >> $HOME/.xinitrc
echo "exec /usr/bin/xterm" >> $HOME/.xinitrc
echo "exec /usr/bin/i3" > $HOME/.xinitrc
echo "exec /usr/bin/xterm" >> $HOME/.xinitrc
# Make sure libinput works
/usr/bin/udevadm trigger
## go
rm -rf "/run/sway.started" "/run/x11.started"
if [ -x "/usr/bin/sway" -a -z "$DISABLE_WAYLAND" ] ; then
echo "*** Trying to launch Sway ***"
/usr/bin/sway
@ -97,3 +112,5 @@ if [ ! -f "/run/sway.started" -a ! -f "/run/x11.started" ] ; then
else
echo "All done."
fi

View File

@ -112,7 +112,7 @@ monitoring = htop ncdu bwbar bmon iftop ifstat dstat hdparm sdparm blktool testd
networking = netpipes curl wget tftp-hpa dnsutils
#trickle # ubuntu noble: has no installation candidate
lighttpd ethtool ssmping tcpdump nmap arping ntpdate udpcast aria2 mktorrent #iptraf
lighttpd ethtool ssmping tcpdump nmap arping ntpdate ctorrent udpcast #iptraf
testing =
screen schroot xmlstarlet
@ -131,8 +131,8 @@ xwindows =
#roxterm gparted #+80M
#openbox midori #xvesa en compilacion
ogagent = stunnel4 filebeat
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
oggit = python3 python3-git python3-pyxattr python3-libarchive-c python3-pylibacl python3-pip opengnsys-libarchive-c python3-termcolor bsdextrautils opengnsys-pyblkid ntfs-3g-system-compression python3-tqdm

View File

@ -75,10 +75,9 @@ 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'
ogrepo_ssh_key = '/tmp/opengnsys/ogrepo-ssh-key'
btog.copy_og_files (builder, og_shared, ogrepo_ssh_key, btrootfsmnt, osdistrib, oscodename)
builder = '/tmp/opengnsys/oglive_builder'
og_shared = '/tmp/opengnsys/shared'
btog.copy_og_files (builder, og_shared, btrootfsmnt, osdistrib, oscodename)
utils.umount (btrootfsmnt)
def _chroot_tasks (cfgfile, curdir, osrelease, osarch):