Compare commits

..

15 Commits
oggit ... main

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
12 changed files with 135 additions and 76 deletions

View File

@ -5,6 +5,40 @@ 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

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

@ -27,7 +27,7 @@ def GetOsInfo (type_client='host'):
oscodename='precise'
osrelease='3.2.0-23-generic'
osarch='i386'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'wheezy' == type_client: # ogLive basado en Debian 7.3.
osdistrib='debian'
oscodename='wheezy'
@ -39,85 +39,85 @@ def GetOsInfo (type_client='host'):
oscodename='quantal'
osrelease='3.7.6-030706-generic'
osarch='i386'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'raring' == type_client: # ogLive 1.0.5-rc3 basado en Ubuntu 13.04.
osdistrib='ubuntu'
oscodename='raring'
osrelease='3.8.0-22-generic'
osarch='i386'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'trusty' == type_client: # ogLive 1.0.5-rc4 basado en Ubuntu 14.04.
osdistrib='ubuntu'
oscodename='trusty'
osrelease='3.13.0-24-generic'
osarch='i386'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'vivid' == type_client: # ogLive 1.1.0-rc2 basado en Ubuntu 15.04.
osdistrib='ubuntu'
oscodename='vivid'
osrelease='3.19.0-49-generic'
osarch='i386'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'wily' == type_client: # ogLive 1.1.0-rc1 basado en Ubuntu 15.10.
osdistrib='ubuntu'
oscodename='wily'
osrelease='4.2.0-35-generic'
osarch='i386'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'xenial' == type_client or 'xenial-4.4' == type_client: # ogLive 1.1.0-rc4 basado en Ubuntu 16.04 y Kernel 4.4.
osdistrib='ubuntu'
oscodename='xenial'
osrelease='4.4.0-34-generic'
osarch='i386'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'xenial-4.8' == type_client: # ogLive 1.1.0-rc5 basado en Ubuntu 16.04 y Kernel 4.8.
osdistrib='ubuntu'
oscodename='xenial'
osrelease='4.8.0-39-generic'
osarch='amd64'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'xenial-4.13' == type_client: # ogLive 1.1.0-rc6 basado en Ubuntu 16.04 y Kernel 4.13.
osdistrib='ubuntu'
oscodename='xenial'
osrelease='4.13.0-17-generic'
osarch='amd64'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'bionic' == type_client or 'bionic-4.15' == type_client: # ogLive 1.1.1-rc1 basado en Ubuntu 18.04 y Kernel 4.15.
osdistrib='ubuntu'
oscodename='bionic'
osrelease='4.15.0-32-generic'
osarch='amd64'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'bionic-4.18' == type_client: # ogLive 1.1.1-rc3 basado en Ubuntu 18.04 y Kernel 4.18.
osdistrib='ubuntu'
oscodename='bionic'
osrelease='4.18.0-20-generic'
osarch='amd64'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'bionic-5.0' == type_client: # ogLive 1.1.1-rc5 basado en Ubuntu 18.04 y Kernel 5.0.
osdistrib='ubuntu'
oscodename='bionic'
osrelease='5.0.0-27-generic'
osarch='amd64'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'focal' == type_client: # ogLive 1.2.0-rc1 basado en Ubuntu 20.04 y Kernel 5.4.
osdistrib='ubuntu'
oscodename='focal'
osrelease='5.4.0-42-generic'
osarch='amd64'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'noble' == type_client: # ogLive 3.1.1 basado en Ubuntu 24.04 y Kernel 6.8.
osdistrib='ubuntu'
oscodename='noble'
osrelease='6.8.0-31-generic'
osarch='amd64'
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
elif 'host' == type_client: # ogLive basado en la distribución del servidor.
osdistrib=platform.freedesktop_os_release()['NAME']
oscodename=platform.freedesktop_os_release()['VERSION_CODENAME']
osrelease=platform.uname()[2]
osarch, _=utils.run (['dpkg', '--print-architecture'])
oshttp='http://fr.archive.ubuntu.com/ubuntu/'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
else: # Parámetro desconocido
logger.error ('Parámetro no válido.')
osdistrib=None
@ -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/*'])
@ -108,37 +108,6 @@ def updateCaCertificates():
print ('Updating CA trust Store', file=sys.stderr)
utils.run (['update-ca-certificates'])
def configure_stunnel():
print ('configure_stunnel', file=sys.stderr)
with open ('/etc/stunnel/menu.conf', 'w') as fd:
fd.write ('setuid = stunnel4\n')
fd.write ('setgid = stunnel4\n')
fd.write ('pid = /var/run/stunnel4/menu.pid\n')
fd.write ('foreground = yes\n')
fd.write ('debug = info\n')
fd.write ('\n')
fd.write ('[menu]\n')
fd.write ('client = yes\n')
fd.write ('accept = 127.0.0.1:81\n')
fd.write ('connect = __OGCORE_IP__:__OGCORE_PORT__\n')
fd.write ('cert = /opt/opengnsys/etc/ogagent.crt\n')
fd.write ('key = /opt/opengnsys/etc/ogagent.key\n')
fd.write ('CAfile = /opt/opengnsys/etc/ca.crt\n')
fd.write ('requireCert = yes\n')
fd.write ('verifyChain = yes\n')
def configure_dbus():
print ('configure_dbus', file=sys.stderr)
with open ('/etc/dbus-1/system.d/ogbrowser.conf', 'w') as fd:
fd.write ('<busconfig>\n')
fd.write (' <policy user="root">\n')
fd.write (' <allow own="es.opengnsys.OGBrowser.browser"/>\n')
fd.write (' <allow send_destination="es.opengnsys.OGBrowser.browser"/>\n')
fd.write (' <allow send_interface="es.opengnsys.OGBrowser.browser"/>\n')
fd.write (' <allow send_type="method_call"/>\n')
fd.write (' </policy>\n')
fd.write ('</busconfig>\n')
def boottoolsPythonModules():
utils.run (['pip3', 'install', 'pyblkid', '--break-system-packages'])
@ -146,13 +115,20 @@ 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/*'):
@ -190,12 +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()
configure_stunnel()
configure_dbus()
setup_resolvconf() ## do this again, since someone seems to be overwriting the file
setup_resolvconf2()
boottoolsInitrdGenerate (args.osrelease)

View File

@ -1,26 +1,26 @@
deb http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME main restricted
deb-src http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME main restricted
deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME main restricted
deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME-updates main restricted
deb-src http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME-updates main restricted
deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates main restricted
deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME universe
deb-src http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME universe
deb http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME-updates universe
deb-src http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME-updates universe
deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME universe
deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME universe
deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates universe
deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME multiverse
deb http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME-updates multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME-updates multiverse
deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME multiverse
deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME multiverse
deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates multiverse
deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates multiverse
## Uncomment the following two lines to add software from the 'backports'
## repository.
@ -29,8 +29,8 @@ deb-src http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME-updates multiverse
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME-backports main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME-backports main restricted universe multiverse
deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-backports main restricted universe multiverse
deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
@ -48,7 +48,7 @@ deb http://security.ubuntu.com/ubuntu OSCODENAME-security multiverse
deb-src http://security.ubuntu.com/ubuntu OSCODENAME-security multiverse
deb http://fr.archive.ubuntu.com/ubuntu OSCODENAME main
deb http://archive.ubuntu.com/ubuntu OSCODENAME main
#deb http://free.nchc.org.tw/drbl-core drbl stable
deb http://free.nchc.org.tw/ubuntu OSCODENAME-security main restricted universe multiverse
#deb http://ppa.launchpad.net/freenx-team/ubuntu/ OSCODENAME main

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 +1 @@
OpenGnsys Client 3.5.0
OpenGnsys Client 3.9.1

View File

@ -591,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

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,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

@ -135,4 +135,4 @@ ogagent = stunnel4
ogbrowser = sway libinput-tools hwdata ogbrowser
oggit = python3 python3-git python3-pyxattr python3-libarchive-c python3-pylibacl python3-pip 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 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):