Compare commits

..

3 Commits
main ... oggit

Author SHA1 Message Date
Vadim Trochinsky a85feac505 Change another mirror 2025-05-29 14:50:10 +02:00
Vadim vtroshchinskiy 3d224a3a17 Use french Ubuntu source 2025-05-29 13:11:43 +02:00
Vadim vtroshchinskiy a4e8d0edc3 Install gitlib 2025-05-29 13:11:37 +02:00
12 changed files with 76 additions and 135 deletions

View File

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

@ -27,7 +27,7 @@ def GetOsInfo (type_client='host'):
oscodename='precise'
osrelease='3.2.0-23-generic'
osarch='i386'
oshttp='http://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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://es.archive.ubuntu.com/ubuntu/'
oshttp='http://fr.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, 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

@ -87,7 +87,7 @@ def boottoolsSoftwareCompile():
print ('boottoolsSoftwareCompile: spartlnx', file=sys.stderr)
try: utils.run (['which', 'spartl64.run'])
except:
utils.run (['wget', '--tries=5', 'http://damien.guibouret.free.fr/savepart.zip'])
utils.run (['wget', '--quiet', '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,6 +108,37 @@ 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'])
@ -115,20 +146,13 @@ def boottoolsRemovePackages():
print ('boottoolsRemovePackages', file=sys.stderr)
apt.remove (['python3-dev', 'python3-setuptools', 'python3-pip'])
## have working DNS during the build
def setup_resolvconf1():
print ('setup_resolvconf1', file=sys.stderr)
os.unlink ('/etc/resolv.conf')
def setup_resolvconf():
if os.path.islink('/etc/resolc.conf'):
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/*'):
@ -166,10 +190,12 @@ if __name__ == '__main__':
debconf_settings = config['General'].get ('debconf_settings')
updateCaCertificates()
setup_resolvconf1()
setup_resolvconf()
boottoolsSoftwareInstall (args.osarch, args.osrelease)
boottoolsSoftwareCompile()
boottoolsPythonModules()
boottoolsRemovePackages()
setup_resolvconf2()
configure_stunnel()
configure_dbus()
setup_resolvconf() ## do this again, since someone seems to be overwriting the file
boottoolsInitrdGenerate (args.osrelease)

View File

@ -1,26 +1,26 @@
deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME main restricted
deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME main restricted
deb http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME main restricted
deb-src http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates main restricted
deb-src http://es.archive.ubuntu.com/ubuntu/ OSCODENAME-updates main restricted
deb http://fr.archive.ubuntu.com/ubuntu/ OSCODENAME-updates main restricted
deb-src http://fr.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://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
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
## 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://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
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
## Uncomment the following two lines to add software from the 'backports'
## repository.
@ -29,8 +29,8 @@ deb-src http://es.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://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
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
## 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://archive.ubuntu.com/ubuntu OSCODENAME main
deb http://fr.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

@ -1,8 +0,0 @@
<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.9.1
OpenGnsys Client 3.5.0

View File

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

@ -1,15 +0,0 @@
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

@ -1,20 +0,0 @@
#!/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 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 opengnsys-gitlib 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):