Compare commits
83 Commits
oglive-ipv
...
main
Author | SHA1 | Date |
---|---|---|
|
94a89881c6 | |
|
5a52e3ecae | |
|
19c63800de | |
|
d44d848327 | |
|
eb2d836c51 | |
|
9779d9cc8d | |
|
5c51336402 | |
|
1fbc28622c | |
|
c9152b5e2d | |
|
2d6db5e475 | |
|
809af2cbc2 | |
|
a627be89ba | |
|
a481cccaef | |
|
782a85d515 | |
|
895131bb05 | |
|
f9bb2f3868 | |
|
0b2bb98172 | |
|
6d74a02d25 | |
|
1029ad0fe6 | |
|
2c97f72485 | |
|
0cc540c0cd | |
|
4d60aaa1d4 | |
|
76950c8c11 | |
|
e103f9bf6a | |
|
42aceb750f | |
|
ffa0803aab | |
|
958143f24f | |
|
919b4c58c0 | |
|
7fdbcdea98 | |
|
5452786078 | |
|
434cfb865e | |
|
0ca148775e | |
|
ed782169c2 | |
|
1ef837e053 | |
|
1ee49dfd2c | |
|
36652da35b | |
|
64bbb1d198 | |
|
1ee274bd0b | |
|
5dfeffb6d6 | |
|
149d3ffc39 | |
|
f42cd45239 | |
|
6a34ca68b1 | |
|
1785456f43 | |
|
68c5a27075 | |
|
c9fa4eff93 | |
|
386a2a6175 | |
|
da32d165a6 | |
|
4101da8082 | |
|
219c5dc45b | |
|
c97e352f1d | |
|
419f983e50 | |
|
2e8981fd19 | |
|
d6a3c4205b | |
|
3abcad9776 | |
|
e2910b33e2 | |
|
7b51a04358 | |
|
c4d1e23114 | |
|
ed1f58a287 | |
|
723a79f68e | |
|
a2e12e6b6e | |
|
6dddc6ba8b | |
|
0e5d83c501 | |
|
865470e03c | |
|
7467f991a6 | |
|
fe5645c30a | |
|
7123d35179 | |
|
567c8dcfb5 | |
|
6b66424631 | |
|
02b44a1d95 | |
|
dffb315879 | |
|
1f695da3e4 | |
|
c1a9ff29b7 | |
|
fe39c2d99f | |
|
652fd3beb0 | |
|
2f745e8b43 | |
|
c160c5c1eb | |
|
13b086f328 | |
|
48528a4c2f | |
|
d6eb76f36b | |
|
f9a275e380 | |
|
2e092b0372 | |
|
16de310ac8 | |
|
bfbc10a65b |
|
@ -10,3 +10,6 @@ ogclient/
|
||||||
ogclientImg2Sqfs
|
ogclientImg2Sqfs
|
||||||
ogclientSqfs2Img
|
ogclientSqfs2Img
|
||||||
**/*.swp
|
**/*.swp
|
||||||
|
|
||||||
|
## the following is used in the jenkins job
|
||||||
|
opengnsys-repo
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
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.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
|
||||||
|
|
||||||
|
- Include build date in the final VERSION.txt
|
16
Dockerfile
16
Dockerfile
|
@ -1,7 +1,5 @@
|
||||||
FROM ubuntu:noble
|
FROM ubuntu:noble
|
||||||
|
|
||||||
ARG OPENGNSYS_BRANCH=main
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y install \
|
RUN apt-get update && apt-get -y install \
|
||||||
debootstrap \
|
debootstrap \
|
||||||
fdisk \
|
fdisk \
|
||||||
|
@ -27,14 +25,14 @@ RUN groupadd opengnsys
|
||||||
RUN mkdir -p /opt/opengnsys/client /tmp/opengnsys/oglive_builder /var/lib/tftpboot/
|
RUN mkdir -p /opt/opengnsys/client /tmp/opengnsys/oglive_builder /var/lib/tftpboot/
|
||||||
RUN ln -fs /var/lib/tftpboot /opt/opengnsys
|
RUN ln -fs /var/lib/tftpboot /opt/opengnsys
|
||||||
|
|
||||||
## take stuff from the OG repo: a) cloning engine, b) shared stuff and c) gitrelease
|
ARG OPENGNSYS_HEAD
|
||||||
RUN git clone -c http.sslVerify=false --branch ${OPENGNSYS_BRANCH} https://ognproject.evlt.uma.es/gitea/opengnsys/opengnsys.git /tmp/ogrepo && \
|
|
||||||
mv /tmp/ogrepo/client/engine /tmp/ogrepo/client/shared /tmp/opengnsys/ && \
|
|
||||||
git --git-dir /tmp/ogrepo/.git log --date format:r%Y%m%d --format=%ad -1 >/tmp/opengnsys/oglive_builder/gitrelease && \
|
|
||||||
rm -rf /tmp/ogrepo/
|
|
||||||
|
|
||||||
#RUN echo 0 ## development: invalidate docker cache at this point, so that the 'COPY' below actually copies files
|
|
||||||
COPY . /tmp/opengnsys/oglive_builder/
|
COPY . /tmp/opengnsys/oglive_builder/
|
||||||
RUN 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
|
|
||||||
|
RUN ls -la /tmp/opengnsys/oglive_builder/ && \
|
||||||
|
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
|
||||||
|
|
||||||
ENTRYPOINT ["/tmp/opengnsys/oglive_builder/mkoglive.py"]
|
ENTRYPOINT ["/tmp/opengnsys/oglive_builder/mkoglive.py"]
|
||||||
|
|
|
@ -41,15 +41,6 @@ Y también podemos indicar otro archivo de configuración usando --config.
|
||||||
|
|
||||||
Las imágenes se crean en ./ogclient. Es conveniente crear este directorio con antelación, antes de ejecutar docker, porque de este modo el directorio queda con permisos de usuario. De lo contrario, docker lo crearía como root y necesitaríamos sudo para hacer cualquier cosa dentro de él.
|
Las imágenes se crean en ./ogclient. Es conveniente crear este directorio con antelación, antes de ejecutar docker, porque de este modo el directorio queda con permisos de usuario. De lo contrario, docker lo crearía como root y necesitaríamos sudo para hacer cualquier cosa dentro de él.
|
||||||
|
|
||||||
Puede que durante la ejecución del contenedor salga un error como este una o más veces:
|
|
||||||
|
|
||||||
Exception ignored in: <function _acquireLock at 0x7fdac10f1f80>
|
|
||||||
Traceback (most recent call last):
|
|
||||||
File "/usr/lib/python3.12/logging/__init__.py", line 241, in _acquireLock
|
|
||||||
_lock.acquire()
|
|
||||||
|
|
||||||
Es un bug conocido en la biblioteca "logging" de python, para el cual ya existe solución y solo es cuestión de tiempo que la versión de python incluida en ubuntu incluya el fix.
|
|
||||||
|
|
||||||
|
|
||||||
Descripción de la estrucutra de boot-tools
|
Descripción de la estrucutra de boot-tools
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
|
@ -58,30 +58,8 @@ def cache_search (pkgs):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def install (pkgs, opts={}):
|
def install (pkgs, opts={}):
|
||||||
apt_pkg.init()
|
opts_list = []
|
||||||
|
for k in opts: opts_list += ['-o', f'{k}={opts[k]}']
|
||||||
if opts:
|
print ('about to install these packages: "{}"'.format (' '.join (pkgs)))
|
||||||
apt_pkg.init_config()
|
import subprocess
|
||||||
for k in opts:
|
subprocess.run (['apt-get', '--yes', 'install'] + pkgs + opts_list)
|
||||||
apt_pkg.config.set (k, opts[k])
|
|
||||||
|
|
||||||
cache = apt_pkg.Cache()
|
|
||||||
sl = apt_pkg.SourceList()
|
|
||||||
sl.read_main_list()
|
|
||||||
cache.update (apt.progress.base.AcquireProgress(), sl)
|
|
||||||
|
|
||||||
_to_install = []
|
|
||||||
dep_cache = apt_pkg.DepCache(cache)
|
|
||||||
for p in pkgs:
|
|
||||||
package = cache[p]
|
|
||||||
if not package:
|
|
||||||
print (f'package "{p}" not found')
|
|
||||||
continue
|
|
||||||
_to_install.append (p)
|
|
||||||
dep_cache.mark_install(package)
|
|
||||||
|
|
||||||
if _to_install:
|
|
||||||
print ('about to install these packages: "{}"'.format (' '.join (_to_install)))
|
|
||||||
fetcher = apt_pkg.Acquire()
|
|
||||||
install_progress = apt.progress.base.InstallProgress()
|
|
||||||
dep_cache.commit(fetcher, install_progress)
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ def GetVar (osarch):
|
||||||
if 'i386' == osarch:
|
if 'i386' == osarch:
|
||||||
btvirtualdisksize = '2000' # tamaño maximo limitado por schroot 2GB para 32 bits
|
btvirtualdisksize = '2000' # tamaño maximo limitado por schroot 2GB para 32 bits
|
||||||
else:
|
else:
|
||||||
btvirtualdisksize = '3G'
|
btvirtualdisksize = '5G'
|
||||||
return bttargetdir, btrootfsimg, btrootfsmnt, btvirtualdisksize
|
return bttargetdir, btrootfsimg, btrootfsmnt, btvirtualdisksize
|
||||||
|
|
||||||
def GetOsInfo (type_client='host'):
|
def GetOsInfo (type_client='host'):
|
||||||
|
@ -106,7 +106,7 @@ def GetOsInfo (type_client='host'):
|
||||||
osrelease='5.4.0-42-generic'
|
osrelease='5.4.0-42-generic'
|
||||||
osarch='amd64'
|
osarch='amd64'
|
||||||
oshttp='http://es.archive.ubuntu.com/ubuntu/'
|
oshttp='http://es.archive.ubuntu.com/ubuntu/'
|
||||||
elif 'noble' == type_client: # ogLive 1.2.0-rc1 basado en Ubuntu 24.04 y Kernel 6.8.
|
elif 'noble' == type_client: # ogLive 3.1.1 basado en Ubuntu 24.04 y Kernel 6.8.
|
||||||
osdistrib='ubuntu'
|
osdistrib='ubuntu'
|
||||||
oscodename='noble'
|
oscodename='noble'
|
||||||
osrelease='6.8.0-31-generic'
|
osrelease='6.8.0-31-generic'
|
||||||
|
@ -205,7 +205,7 @@ def debootstrap (btrootfsimg, btrootfsmnt, osarch, oscodename, oshttp):
|
||||||
logger.info (f'debootstrap --arch="{osarch}" --components=main,universe "{oscodename}" "{btrootfsmnt}" "{oshttp}" : ok')
|
logger.info (f'debootstrap --arch="{osarch}" --components=main,universe "{oscodename}" "{btrootfsmnt}" "{oshttp}" : ok')
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def copy_og_files (builder, og_shared, og_engine, ogclientmount, osdistrib, oscodename):
|
def copy_og_files (builder, og_shared, ogclientmount, osdistrib, oscodename):
|
||||||
logger.info ('Iniciando la personalización con datos del repositorio')
|
logger.info ('Iniciando la personalización con datos del repositorio')
|
||||||
|
|
||||||
sources_list_in = f'{builder}/includes/etc/apt/sources.list.{osdistrib.lower()}'
|
sources_list_in = f'{builder}/includes/etc/apt/sources.list.{osdistrib.lower()}'
|
||||||
|
@ -226,9 +226,8 @@ def copy_og_files (builder, og_shared, og_engine, ogclientmount, osdistrib, osco
|
||||||
os.makedirs (f'{ogclientmount}/usr/local/lib', exist_ok=True)
|
os.makedirs (f'{ogclientmount}/usr/local/lib', exist_ok=True)
|
||||||
os.makedirs (f'{ogclientmount}/usr/local/plugins', exist_ok=True)
|
os.makedirs (f'{ogclientmount}/usr/local/plugins', exist_ok=True)
|
||||||
|
|
||||||
subprocess.run (f'rsync -aH {builder}/includes/* {ogclientmount}/' , shell=True)
|
subprocess.run (f'rsync -aH {builder}/includes/* {ogclientmount}/' , shell=True)
|
||||||
subprocess.run (f'rsync -aH {og_shared}/* {ogclientmount}/opt/opengnsys/' , shell=True)
|
subprocess.run (f'rsync -aH {og_shared}/* {ogclientmount}/opt/opengnsys/', shell=True)
|
||||||
subprocess.run (f'rsync -aH {og_engine}/* {ogclientmount}/opt/opengnsys/lib/engine/bin/', shell=True)
|
|
||||||
|
|
||||||
if not os.path.exists (f'{ogclientmount}/etc/pci.ids'):
|
if not os.path.exists (f'{ogclientmount}/etc/pci.ids'):
|
||||||
shutil.copy (f'{og_shared}/lib/pci.ids', f'{ogclientmount}/etc/')
|
shutil.copy (f'{og_shared}/lib/pci.ids', f'{ogclientmount}/etc/')
|
||||||
|
@ -239,9 +238,8 @@ def copy_og_files (builder, og_shared, og_engine, ogclientmount, osdistrib, osco
|
||||||
subprocess.run (f'rsync -aH {og_shared}/lib/fonts {ogclientmount}/usr/local/lib', shell=True)
|
subprocess.run (f'rsync -aH {og_shared}/lib/fonts {ogclientmount}/usr/local/lib', shell=True)
|
||||||
subprocess.run (f'rsync -aH {og_shared}/lib/qtplugins/* {ogclientmount}/usr/local/plugins', shell=True)
|
subprocess.run (f'rsync -aH {og_shared}/lib/qtplugins/* {ogclientmount}/usr/local/plugins', shell=True)
|
||||||
|
|
||||||
# Browser y ogAdmClient.
|
# Browser
|
||||||
if os.path.exists (f'{og_shared}/bin/browser'): shutil.copy (f'{og_shared}/bin/browser', f'{ogclientmount}/bin/')
|
if os.path.exists (f'{og_shared}/bin/browser'): shutil.copy (f'{og_shared}/bin/browser', f'{ogclientmount}/bin/')
|
||||||
if os.path.exists (f'{og_shared}/bin/ogAdmClient'): shutil.copy (f'{og_shared}/bin/ogAdmClient', f'{ogclientmount}/bin/')
|
|
||||||
|
|
||||||
def sysctl (btrootfsmnt):
|
def sysctl (btrootfsmnt):
|
||||||
logger.debug ('copiando sysctl.conf')
|
logger.debug ('copiando sysctl.conf')
|
||||||
|
|
|
@ -32,7 +32,7 @@ def boottoolsSoftwareInstall (osarch, osrelease):
|
||||||
pkgs32 = []
|
pkgs32 = []
|
||||||
if 'i386' != osarch:
|
if 'i386' != osarch:
|
||||||
utils.run (['dpkg', '--add-architecture', 'i386'])
|
utils.run (['dpkg', '--add-architecture', 'i386'])
|
||||||
pkgs32 = 'lib32gcc-s1 lib32stdc++6 lib32z1 libc6-i386'.split (' ') ## nserrano: he cambiado lib32gcc1 por lib32gcc-s1 pero como queramos crear un oglive viejo, esto va a petar
|
pkgs32 = 'lib32gcc-s1 lib32stdc++6 lib32z1 libc6-i386'.split (' ')
|
||||||
|
|
||||||
_oghook_deactivate()
|
_oghook_deactivate()
|
||||||
|
|
||||||
|
@ -40,10 +40,13 @@ def boottoolsSoftwareInstall (osarch, osrelease):
|
||||||
subprocess.run (['debconf-set-selections'], input=debconf_settings, text=True)
|
subprocess.run (['debconf-set-selections'], input=debconf_settings, text=True)
|
||||||
utils.run (['dpkg-reconfigure', '--frontend', 'noninteractive', 'console-setup', 'locales']) ## XXX: despues de esto, debconf-get-selections devuelve los valores antiguos, no se por que...
|
utils.run (['dpkg-reconfigure', '--frontend', 'noninteractive', 'console-setup', 'locales']) ## XXX: despues de esto, debconf-get-selections devuelve los valores antiguos, no se por que...
|
||||||
|
|
||||||
pkgs = []
|
pkgs = glob.glob ('/tmp/opengnsys/oglive_builder/ogagent_*.deb') + glob.glob ('/tmp/opengnsys/oglive_builder/OGBrowser*.deb')
|
||||||
for section in config.options('Packages'):
|
for section in config.options('Packages'):
|
||||||
pkgs += re.split (r'[ \n]', config['Packages'].get(section).strip())
|
pkgs += re.split (r'[ \n]', config['Packages'].get(section).strip())
|
||||||
|
|
||||||
|
apt.update()
|
||||||
|
apt.upgrade()
|
||||||
|
|
||||||
pkgs = [f'linux-image-{osrelease}', f'linux-headers-{osrelease}', f'linux-modules-{osrelease}', f'linux-modules-extra-{osrelease}', 'dkms', 'shim-signed', 'openssl', 'sshfs', 'kexec-tools'] + pkgs32 + pkgs
|
pkgs = [f'linux-image-{osrelease}', f'linux-headers-{osrelease}', f'linux-modules-{osrelease}', f'linux-modules-extra-{osrelease}', 'dkms', 'shim-signed', 'openssl', 'sshfs', 'kexec-tools'] + pkgs32 + pkgs
|
||||||
print (f'boottoolsSoftwareInstall: installing packages: {str(pkgs)}', file=sys.stderr)
|
print (f'boottoolsSoftwareInstall: installing packages: {str(pkgs)}', file=sys.stderr)
|
||||||
apt.install (pkgs, opts={'DPkg::Options::': '--force-confdef'}) ## --force-confdef is required to avoid an interactive question regarding /etc/ssh/ssh_config
|
apt.install (pkgs, opts={'DPkg::Options::': '--force-confdef'}) ## --force-confdef is required to avoid an interactive question regarding /etc/ssh/ssh_config
|
||||||
|
@ -84,34 +87,72 @@ def boottoolsSoftwareCompile():
|
||||||
print ('boottoolsSoftwareCompile: spartlnx', file=sys.stderr)
|
print ('boottoolsSoftwareCompile: spartlnx', file=sys.stderr)
|
||||||
try: utils.run (['which', 'spartl64.run'])
|
try: utils.run (['which', 'spartl64.run'])
|
||||||
except:
|
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'])
|
utils.run (['unzip', '-o', 'savepart.zip', '-d', '/sbin/', 'spartl64.run', 'spartlnx.run'])
|
||||||
utils.run (['mkdir', '/usr/share/doc/spartlnx'])
|
utils.run (['mkdir', '/usr/share/doc/spartlnx'])
|
||||||
utils.run (['unzip', '-j', '-o', 'savepart.zip', '-d', '/usr/share/doc/spartlnx/', 'doc/en/*'])
|
utils.run (['unzip', '-j', '-o', 'savepart.zip', '-d', '/usr/share/doc/spartlnx/', 'doc/en/*'])
|
||||||
|
|
||||||
if not os.path.exists ('python-libfdisk'):
|
if not os.path.exists ('python-libfdisk'):
|
||||||
print ('boottoolsSoftwareCompile: python-libfdisk', file=sys.stderr)
|
print ('boottoolsSoftwareCompile: python-libfdisk', file=sys.stderr)
|
||||||
apt.install (['python3-psutil', 'python3-dev', 'libfdisk-dev', 'python3-setuptools'])
|
apt.install (['python3-psutil', 'python3-dev', 'libfdisk-dev', 'python3-setuptools'])
|
||||||
utils.run (['git', 'clone', 'git://git.48k.eu/python-libfdisk'])
|
utils.run (['git', 'clone', 'https://ognproject.evlt.uma.es/gitea/48k.eu-mirror/python-libfdisk.git'])
|
||||||
os.chdir ('python-libfdisk')
|
os.chdir ('python-libfdisk')
|
||||||
utils.run (['python3', 'setup.py', 'install'])
|
utils.run (['python3', 'setup.py', 'install'])
|
||||||
os.chdir ('..')
|
os.chdir ('..')
|
||||||
apt.remove (['python3-dev', 'python3-setuptools'])
|
|
||||||
|
|
||||||
os.environ['LANGUAGE'] = env_language
|
os.environ['LANGUAGE'] = env_language
|
||||||
os.environ['LC_ALL'] = env_lc_all
|
os.environ['LC_ALL'] = env_lc_all
|
||||||
os.environ['LANG'] = env_lang
|
os.environ['LANG'] = env_lang
|
||||||
|
|
||||||
|
def updateCaCertificates():
|
||||||
|
print ('Updating CA trust Store', file=sys.stderr)
|
||||||
|
utils.run (['update-ca-certificates'])
|
||||||
|
|
||||||
|
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'])
|
||||||
|
|
||||||
|
## 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):
|
def boottoolsInitrdGenerate (osrelease):
|
||||||
print ('boottoolsInitrdGenerate', file=sys.stderr)
|
print ('boottoolsInitrdGenerate', file=sys.stderr)
|
||||||
for f in glob.glob ('/usr/lib/initramfs-tools/bin/*'):
|
for f in glob.glob ('/usr/lib/initramfs-tools/bin/*'):
|
||||||
os.unlink (f)
|
os.unlink (f)
|
||||||
shutil.copy ('/bin/busybox', '/usr/lib/initramfs-tools/bin')
|
shutil.copy ('/bin/busybox', '/usr/lib/initramfs-tools/bin')
|
||||||
|
|
||||||
|
initrd_img = f'/tmp/initrd.img-{osrelease}'
|
||||||
|
|
||||||
os.chdir ('/tmp')
|
os.chdir ('/tmp')
|
||||||
utils.run (['mkinitramfs', '-o', f'/tmp/initrd.img-{osrelease}', osrelease])
|
utils.run (['mkinitramfs', '-o', initrd_img, osrelease])
|
||||||
shutil.copy (f'/boot/vmlinuz-{osrelease}', '/tmp/')
|
shutil.copy (f'/boot/vmlinuz-{osrelease}', '/tmp/')
|
||||||
|
|
||||||
|
## turn cpio-with-prepended-stuff into a regular cpio, see #975
|
||||||
|
utils.run (['unmkinitramfs', initrd_img, 'undone'])
|
||||||
|
os.mkdir ('undone/merged')
|
||||||
|
subprocess.run (['rsync -aH undone/early/* undone/main/* undone/merged/'], shell=True)
|
||||||
|
shutil.rmtree ('undone/early')
|
||||||
|
shutil.rmtree ('undone/main')
|
||||||
|
os.chdir ('undone/merged/')
|
||||||
|
subprocess.run ([f'find . |cpio -H newc -oa >{initrd_img}'], shell=True)
|
||||||
|
os.chdir ('/tmp')
|
||||||
|
shutil.rmtree ('undone')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument ('--osarch', help='OS architecture', action='store', required=True)
|
parser.add_argument ('--osarch', help='OS architecture', action='store', required=True)
|
||||||
|
@ -124,6 +165,11 @@ if __name__ == '__main__':
|
||||||
sys.exit (1)
|
sys.exit (1)
|
||||||
debconf_settings = config['General'].get ('debconf_settings')
|
debconf_settings = config['General'].get ('debconf_settings')
|
||||||
|
|
||||||
|
updateCaCertificates()
|
||||||
|
setup_resolvconf1()
|
||||||
boottoolsSoftwareInstall (args.osarch, args.osrelease)
|
boottoolsSoftwareInstall (args.osarch, args.osrelease)
|
||||||
boottoolsSoftwareCompile()
|
boottoolsSoftwareCompile()
|
||||||
|
boottoolsPythonModules()
|
||||||
|
boottoolsRemovePackages()
|
||||||
|
setup_resolvconf2()
|
||||||
boottoolsInitrdGenerate (args.osrelease)
|
boottoolsInitrdGenerate (args.osrelease)
|
||||||
|
|
|
@ -58,3 +58,6 @@ deb http://free.nchc.org.tw/ubuntu OSCODENAME-security main restricted universe
|
||||||
#deb http://ppa.launchpad.net/zfs-native/stable/ubuntu OSCODENAME main
|
#deb http://ppa.launchpad.net/zfs-native/stable/ubuntu OSCODENAME main
|
||||||
#deb-src http://ppa.launchpad.net/zfs-native/stable/ubuntu OSCODENAME main
|
#deb-src http://ppa.launchpad.net/zfs-native/stable/ubuntu OSCODENAME main
|
||||||
|
|
||||||
|
|
||||||
|
deb [trusted=yes] https://ognproject.evlt.uma.es/debian-opengnsys/opengnsys OSCODENAME main
|
||||||
|
|
||||||
|
|
|
@ -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>
|
|
@ -1,4 +1,6 @@
|
||||||
LC_TYPE=es_ES@euro
|
LC_TYPE=es_ES.UTF-8@euro
|
||||||
LC_ALL=es_ES@euro
|
LC_ALL=es_ES.UTF-8@euro
|
||||||
LANG=es_ES@euro
|
LANG=es_ES.UTF-8@euro
|
||||||
LANGUAGE=es_ES@euro
|
LANGUAGE=es_ES.UTF-8@euro
|
||||||
|
XDG_RUNTIME_DIR=/run/user/0
|
||||||
|
QTWEBENGINE_CHROMIUM_FLAGS=--no-sandbox
|
||||||
|
|
|
@ -38,6 +38,9 @@ mkdir -p ${DESTDIR}/var/log
|
||||||
mkdir -p ${DESTDIR}/opt/opengnsys;
|
mkdir -p ${DESTDIR}/opt/opengnsys;
|
||||||
mkdir -p ${DESTDIR}/ogboot;
|
mkdir -p ${DESTDIR}/ogboot;
|
||||||
mkdir -p ${DESTDIR}/boot;
|
mkdir -p ${DESTDIR}/boot;
|
||||||
|
mkdir -p ${DESTDIR}/run/user/0
|
||||||
|
chmod 700 ${DESTDIR}/run/user/0
|
||||||
|
|
||||||
|
|
||||||
# Insert basic binaries
|
# Insert basic binaries
|
||||||
copy_exec /bin/bash-static /bin/bash
|
copy_exec /bin/bash-static /bin/bash
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
#fbcon
|
#fbcon
|
||||||
|
|
||||||
# Kernel 3.7+ video.
|
# Kernel 3.7+ video.
|
||||||
|
virtio_gpu
|
||||||
|
vmwgfx
|
||||||
|
|
||||||
uvesafb
|
uvesafb
|
||||||
|
|
||||||
# Generales
|
# Generales
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
OpenGnsys Client 1.2.0-rc1
|
OpenGnsys Client 3.7.0
|
||||||
|
|
|
@ -110,8 +110,8 @@ fi
|
||||||
#/**
|
#/**
|
||||||
# ogExportVarEnvironment
|
# ogExportVarEnvironment
|
||||||
#@brief Exporta las variables usadas en el proceso de inicio OpenGnsys y las almacena en /tmp
|
#@brief Exporta las variables usadas en el proceso de inicio OpenGnsys y las almacena en /tmp
|
||||||
#@param
|
#@param
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
|
@ -119,7 +119,7 @@ fi
|
||||||
#*/ ##
|
#*/ ##
|
||||||
ogExportVarEnvironment ()
|
ogExportVarEnvironment ()
|
||||||
{
|
{
|
||||||
export CFGINITRD="/tmp/initrd.cfg"
|
export CFGINITRD="/tmp/initrd.cfg"
|
||||||
OGPROTOCOL="${ogprotocol:-smb}"
|
OGPROTOCOL="${ogprotocol:-smb}"
|
||||||
[ "$ogunit" != "" ] && OGUNIT="/$ogunit"
|
[ "$ogunit" != "" ] && OGUNIT="/$ogunit"
|
||||||
# OPTIONS Para samba y local (a nfs no le afecta)
|
# OPTIONS Para samba y local (a nfs no le afecta)
|
||||||
|
@ -127,16 +127,16 @@ ogExportVarEnvironment ()
|
||||||
DEFOGLIVE="ogclient"
|
DEFOGLIVE="ogclient"
|
||||||
export OGLIVEDIR="${oglivedir:-$DEFOGLIVE}" && echo "OGLIVEDIR=$OGLIVEDIR" >> $CFGINITRD
|
export OGLIVEDIR="${oglivedir:-$DEFOGLIVE}" && echo "OGLIVEDIR=$OGLIVEDIR" >> $CFGINITRD
|
||||||
case "$OGPROTOCOL" in
|
case "$OGPROTOCOL" in
|
||||||
nfs|NFS)
|
nfs|NFS)
|
||||||
export SRCOGLIVE="/var/lib/tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD
|
export SRCOGLIVE="/var/lib/tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD
|
||||||
export SRCOGSHARE="/opt/opengnsys/client" && echo "SRCOGSHARE=$SRCOGSHARE" >> $CFGINITRD
|
export SRCOGSHARE="/opt/opengnsys/client" && echo "SRCOGSHARE=$SRCOGSHARE" >> $CFGINITRD
|
||||||
export SRCOGLOG="/opt/opengnsys/log/clients" && echo "SRCOGLOG=$SRCOGLOG" >> $CFGINITRD
|
export SRCOGLOG="/opt/opengnsys/log/clients" && echo "SRCOGLOG=$SRCOGLOG" >> $CFGINITRD
|
||||||
export SRCOGIMAGES="/opt/opengnsys/images$OGUNIT" && echo "SRCOGIMAGES=$SRCOGIMAGES" >> $CFGINITRD
|
export SRCOGIMAGES="/opt/opengnsys/images$OGUNIT" && echo "SRCOGIMAGES=$SRCOGIMAGES" >> $CFGINITRD
|
||||||
;;
|
;;
|
||||||
smb|SMB|cifs|CIFS|samba|SAMBA)
|
smb|SMB|cifs|CIFS|samba|SAMBA)
|
||||||
export SRCOGLIVE="tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD
|
export SRCOGLIVE="tftpboot" && echo "SRCOGLIVE=$SRCOGLIVE" >> $CFGINITRD
|
||||||
export SRCOGSHARE="ogclient" && echo "SRCOGSHARE=$SRCOGSHARE" >> $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
|
export SRCOGIMAGES="ogimages$OGUNIT" && echo "SRCOGIMAGES=$SRCOGIMAGES" >> $CFGINITRD
|
||||||
;;
|
;;
|
||||||
local|LOCAL)
|
local|LOCAL)
|
||||||
|
@ -149,7 +149,7 @@ ogExportVarEnvironment ()
|
||||||
esac
|
esac
|
||||||
#punto de acceso al boot-tools live
|
#punto de acceso al boot-tools live
|
||||||
export DSTOGLIVE="/opt/oglive/tftpboot"
|
export DSTOGLIVE="/opt/oglive/tftpboot"
|
||||||
#punto de montaje para unionfs
|
#punto de montaje para unionfs
|
||||||
export OGLIVERAMFS="/opt/oglive/ramfs" && echo "OGLIVERAMFS=$OGLIVERAMFS" >> $CFGINITRD
|
export OGLIVERAMFS="/opt/oglive/ramfs" && echo "OGLIVERAMFS=$OGLIVERAMFS" >> $CFGINITRD
|
||||||
#punto de montaje donde se accede al 2nd FS mediante loop
|
#punto de montaje donde se accede al 2nd FS mediante loop
|
||||||
export OGLIVEROOTFS="/opt/oglive/rootfs" && echo "OGLIVEROOTFS=$OGLIVEROOTFS" >> $CFGINITRD
|
export OGLIVEROOTFS="/opt/oglive/rootfs" && echo "OGLIVEROOTFS=$OGLIVEROOTFS" >> $CFGINITRD
|
||||||
|
@ -157,13 +157,13 @@ ogExportVarEnvironment ()
|
||||||
export OGLIVEUNIONFS="/opt/oglive/unionfs" && echo "OGLIVEUNIONFS=$OGLIVEUNIONFS" >> $CFGINITRD
|
export OGLIVEUNIONFS="/opt/oglive/unionfs" && echo "OGLIVEUNIONFS=$OGLIVEUNIONFS" >> $CFGINITRD
|
||||||
#etiquta para los dispositivos offline
|
#etiquta para los dispositivos offline
|
||||||
export OGLIVELABEL="ogClient"
|
export OGLIVELABEL="ogClient"
|
||||||
|
|
||||||
#echo "puntos de montajes para los demas accesos"
|
#echo "puntos de montajes para los demas accesos"
|
||||||
#echo "acceso al client, engine, scritps, interfaz"
|
#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 DSTOGLOG="/opt/opengnsys/log" && echo "DSTOGLOG=$DSTOGLOG" >> $CFGINITRD
|
||||||
export DSTOGIMAGES="/opt/opengnsys/images" && echo "DSTOGIMAGES=$DSTOGIMAGES" >> $CFGINITRD
|
export DSTOGIMAGES="/opt/opengnsys/images" && echo "DSTOGIMAGES=$DSTOGIMAGES" >> $CFGINITRD
|
||||||
|
|
||||||
##INFORMACION DE OTRAS VARIABLES OBTENDIAS EN OTRAS FUNCIONES ogConfigureNetwork.
|
##INFORMACION DE OTRAS VARIABLES OBTENDIAS EN OTRAS FUNCIONES ogConfigureNetwork.
|
||||||
#DEVICE
|
#DEVICE
|
||||||
#IPV4DDR
|
#IPV4DDR
|
||||||
|
@ -185,8 +185,8 @@ ogExportVarEnvironment ()
|
||||||
#/**
|
#/**
|
||||||
# ogConfigureRamfs
|
# ogConfigureRamfs
|
||||||
#@brief Configura el initrd para adaptarlo al sistema raiz.
|
#@brief Configura el initrd para adaptarlo al sistema raiz.
|
||||||
#@param
|
#@param
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
|
@ -194,10 +194,10 @@ ogExportVarEnvironment ()
|
||||||
#*/ ##
|
#*/ ##
|
||||||
ogConfigureRamfs ()
|
ogConfigureRamfs ()
|
||||||
{
|
{
|
||||||
mkdir -p $DSTOGLIVE
|
mkdir -p $DSTOGLIVE
|
||||||
mkdir -p $OGLIVERAMFS
|
mkdir -p $OGLIVERAMFS
|
||||||
mkdir -p $OGLIVEROOTFS
|
mkdir -p $OGLIVEROOTFS
|
||||||
mkdir -p $OGLIVEUNIONFS
|
mkdir -p $OGLIVEUNIONFS
|
||||||
|
|
||||||
touch /etc/fstab
|
touch /etc/fstab
|
||||||
}
|
}
|
||||||
|
@ -206,8 +206,8 @@ ogConfigureRamfs ()
|
||||||
#/**
|
#/**
|
||||||
# ogLoadNetModule
|
# ogLoadNetModule
|
||||||
#@brief Carga en un demerminado modulo de red, requiere compilación previo del modulo
|
#@brief Carga en un demerminado modulo de red, requiere compilación previo del modulo
|
||||||
#@param
|
#@param
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
|
@ -226,8 +226,8 @@ ogLoadNetModule ()
|
||||||
#/**
|
#/**
|
||||||
# ogPostConfigureFS
|
# ogPostConfigureFS
|
||||||
#@brief Configura el sistema raiz, para independizarlo entre los clientes.
|
#@brief Configura el sistema raiz, para independizarlo entre los clientes.
|
||||||
#@param
|
#@param
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
|
@ -237,29 +237,29 @@ ogPostConfigureFS()
|
||||||
{
|
{
|
||||||
# configuramos el /etc/hostname.
|
# configuramos el /etc/hostname.
|
||||||
echo $HOSTNAME > /etc/hostname
|
echo $HOSTNAME > /etc/hostname
|
||||||
|
|
||||||
#configuramos el /etc/hosts
|
#configuramos el /etc/hosts
|
||||||
echo "127.0.0.1 localhost" > /etc/hosts
|
echo "127.0.0.1 localhost" > /etc/hosts
|
||||||
echo "$IPV4ADDR $HOSTNAME" >> /etc/hosts
|
echo "$IPV4ADDR $HOSTNAME" >> /etc/hosts
|
||||||
|
|
||||||
#configuramos el host.conf
|
#configuramos el host.conf
|
||||||
echo "order hosts,bind" > /etc/host.conf
|
echo "order hosts,bind" > /etc/host.conf
|
||||||
echo "multi on" >> /etc/host.conf
|
echo "multi on" >> /etc/host.conf
|
||||||
|
|
||||||
#configuramos el dns anterior ubuntu 12.04 (parámetro del Kernel "ogdns=IP_DNS")
|
#configuramos el dns anterior ubuntu 12.04 (parámetro del Kernel "ogdns=IP_DNS")
|
||||||
if [ -n "$ogdns" ]; then
|
if [ -n "$ogdns" ]; then
|
||||||
mkdir -p /run/resolvconf
|
mkdir -p /run/resolvconf
|
||||||
echo "nameserver $ogdns" > /run/resolvconf/resolv.conf
|
echo "nameserver $ogdns" > /run/resolvconf/resolv.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#configuramos el uso del servicio http proxy (parámetro del Kernel "ogproxy=URL_Proxy")
|
#configuramos el uso del servicio http proxy (parámetro del Kernel "ogproxy=URL_Proxy")
|
||||||
if [ -n "${ogproxy}" ]; then
|
if [ -n "${ogproxy}" ]; then
|
||||||
export http_proxy="$ogproxy"
|
export http_proxy="$ogproxy"
|
||||||
export https_proxy="$ogproxy"
|
export https_proxy="$ogproxy"
|
||||||
export ftp_proxy="$ogproxy"
|
export ftp_proxy="$ogproxy"
|
||||||
export ftps_proxy="$ogproxy"
|
export ftps_proxy="$ogproxy"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# configuramos el /etc/networks
|
# configuramos el /etc/networks
|
||||||
#read -e NETIP NETDEFAULT <<<$(route -n | grep eth0 | awk -F" " '{print $1}')
|
#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" ")
|
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
|
#Montamos un directorio temporal para permitir instalacion de softare desde el comando apt-get (parametor kernel "ogtmpfs=50" valor en megas
|
||||||
ogtmpfs="${ogtmpfs:-15}"
|
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 /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.
|
# 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=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
|
## ip=172.17.36.21:62.36.225.150:172.17.36.254:255.255.255.0:prueba1:eth0:none
|
||||||
#@param
|
#@param
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
|
@ -355,13 +367,13 @@ ogGetROOTSERVER ()
|
||||||
fi
|
fi
|
||||||
export ROOTSERVER
|
export ROOTSERVER
|
||||||
echo "ROOTSERVER=$ROOTSERVER" >> $CFGINITRD
|
echo "ROOTSERVER=$ROOTSERVER" >> $CFGINITRD
|
||||||
|
|
||||||
#si oglive no oglive=R
|
#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 OGSERVERSHARE="${ogshare:-$ROOTSERVER}" && echo "OGSERVERSHARE=$OGSERVERSHARE" >> $CFGINITRD
|
||||||
export OGSERVERLOG="${oglog:-$ROOTSERVER}" && echo "OGSERVERLOG=$OGSERVERLOG" >> $CFGINITRD
|
export OGSERVERLOG="${oglog:-$ROOTSERVER}" && echo "OGSERVERLOG=$OGSERVERLOG" >> $CFGINITRD
|
||||||
export OGSERVERLIVE="${oglive:-$OGSERVERIMAGES}" && echo "OGSERVERLIVE=$OGSERVERLIVE" >> $CFGINITRD
|
export OGSERVERLIVE="${oglive:-$OGSERVERIMAGES}" && echo "OGSERVERLIVE=$OGSERVERLIVE" >> $CFGINITRD
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,8 +381,8 @@ ogGetROOTSERVER ()
|
||||||
|
|
||||||
# ogUpdateInitrd
|
# 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.
|
#@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
|
#@param1
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
|
@ -394,26 +406,26 @@ ogUpdateInitrd ()
|
||||||
[ -z "$TYPE" ] && return
|
[ -z "$TYPE" ] && return
|
||||||
mount -t $TYPE LABEL=CACHE /tmp/cache || return
|
mount -t $TYPE LABEL=CACHE /tmp/cache || return
|
||||||
mkdir -p /tmp/cache/boot/$OGLIVEDIR
|
mkdir -p /tmp/cache/boot/$OGLIVEDIR
|
||||||
|
|
||||||
|
|
||||||
# comparamos los del server
|
# comparamos los del server
|
||||||
busybox tftp -g -r $OGLIVEDIR/ogvmlinuz.sum $ROOTSERVER
|
busybox tftp -g -r $OGLIVEDIR/ogvmlinuz.sum $ROOTSERVER
|
||||||
busybox tftp -g -r $OGLIVEDIR/oginitrd.img.sum $ROOTSERVER
|
busybox tftp -g -r $OGLIVEDIR/oginitrd.img.sum $ROOTSERVER
|
||||||
SERVERVMLINUZ=`cat ogvmlinuz.sum`
|
SERVERVMLINUZ=`cat ogvmlinuz.sum`
|
||||||
SERVERINITRD=`cat oginitrd.img.sum`
|
SERVERINITRD=`cat oginitrd.img.sum`
|
||||||
|
|
||||||
|
|
||||||
#comparamos los de la cache
|
#comparamos los de la cache
|
||||||
CACHEVMLINUZ=`cat /tmp/cache/boot/$OGLIVEDIR/ogvmlinuz.sum`
|
CACHEVMLINUZ=`cat /tmp/cache/boot/$OGLIVEDIR/ogvmlinuz.sum`
|
||||||
CACHEINITRD=`cat /tmp/cache/boot/$OGLIVEDIR/oginitrd.img.sum`
|
CACHEINITRD=`cat /tmp/cache/boot/$OGLIVEDIR/oginitrd.img.sum`
|
||||||
|
|
||||||
echo "MD5 on SERVER: $SERVERVMLINUZ $SERVERINITRD"
|
echo "MD5 on SERVER: $SERVERVMLINUZ $SERVERINITRD"
|
||||||
echo "MD5 on CACHE: $CACHEVMLINUZ $CACHEINITRD"
|
echo "MD5 on CACHE: $CACHEVMLINUZ $CACHEINITRD"
|
||||||
|
|
||||||
cd /tmp/cache/boot/$OGLIVEDIR || mkdir -p /tmp/cache/boot/$OGLIVEDIR
|
cd /tmp/cache/boot/$OGLIVEDIR || mkdir -p /tmp/cache/boot/$OGLIVEDIR
|
||||||
|
|
||||||
if [ "$CACHEVMLINUZ" != "$SERVERVMLINUZ" ]
|
if [ "$CACHEVMLINUZ" != "$SERVERVMLINUZ" ]
|
||||||
then
|
then
|
||||||
echo "ogvmlinuz updating"
|
echo "ogvmlinuz updating"
|
||||||
busybox tftp -g -r $OGLIVEDIR/ogvmlinuz $ROOTSERVER
|
busybox tftp -g -r $OGLIVEDIR/ogvmlinuz $ROOTSERVER
|
||||||
busybox tftp -g -r $OGLIVEDIR/ogvmlinuz.sum $ROOTSERVER
|
busybox tftp -g -r $OGLIVEDIR/ogvmlinuz.sum $ROOTSERVER
|
||||||
|
@ -441,13 +453,13 @@ ogUpdateInitrd ()
|
||||||
#@param3 punto de acceso remoto
|
#@param3 punto de acceso remoto
|
||||||
#@param4 punto de montaje local
|
#@param4 punto de montaje local
|
||||||
#@param5 acceso de lectura tipo ",ro"
|
#@param5 acceso de lectura tipo ",ro"
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
#@date 2011/05/24
|
#@date 2011/05/24
|
||||||
#*/ ##
|
#*/ ##
|
||||||
|
|
||||||
ogConnect ()
|
ogConnect ()
|
||||||
{
|
{
|
||||||
SERVER=$1
|
SERVER=$1
|
||||||
|
@ -455,13 +467,13 @@ ogConnect ()
|
||||||
SRC=$3
|
SRC=$3
|
||||||
DST=$4
|
DST=$4
|
||||||
READONLY=$5
|
READONLY=$5
|
||||||
|
|
||||||
case "$PROTOCOL" in
|
case "$PROTOCOL" in
|
||||||
nfs)
|
nfs)
|
||||||
nfsmount ${SERVER}:${SRC} ${DST} -o nolock${READONLY} 2> /dev/null || mount.nfs ${SERVER}:${SRC} ${DST} -o nolock${READONLY}
|
nfsmount ${SERVER}:${SRC} ${DST} -o nolock${READONLY} 2> /dev/null || mount.nfs ${SERVER}:${SRC} ${DST} -o nolock${READONLY}
|
||||||
;;
|
;;
|
||||||
smb)
|
smb)
|
||||||
mount.cifs //${SERVER}/${SRC} ${DST} ${OPTIONS}${READONLY}
|
mount.cifs //${SERVER}/${SRC} ${DST} ${OPTIONS}${READONLY}
|
||||||
;;
|
;;
|
||||||
local)
|
local)
|
||||||
# Comprobamos que estatus sea online y que la variable del server no esta vacia.
|
# Comprobamos que estatus sea online y que la variable del server no esta vacia.
|
||||||
|
@ -485,21 +497,21 @@ ogConnect ()
|
||||||
#/**
|
#/**
|
||||||
# ogConnectOgLive
|
# ogConnectOgLive
|
||||||
#@brief Conecta con el recurso para usar el sistema raiz externo, remoto o local
|
#@brief Conecta con el recurso para usar el sistema raiz externo, remoto o local
|
||||||
#@param1
|
#@param1
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
#@date 2011/05/24
|
#@date 2011/05/24
|
||||||
ogConnectOgLive ()
|
ogConnectOgLive ()
|
||||||
{
|
{
|
||||||
# Si ogprotocol=local, la funcion ogExportVar => SRCOGLIVE=local
|
# Si ogprotocol=local, la funcion ogExportVar => SRCOGLIVE=local
|
||||||
if [ "$SRCOGLIVE" == "local" ]
|
if [ "$SRCOGLIVE" == "local" ]
|
||||||
then
|
then
|
||||||
echo "Montar imagen del sistema root desde dispositivo local"
|
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
|
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
|
# si local usb| cd con partcion es identificada como label $OGLIVELABEL
|
||||||
mount -t $TYPE LABEL=$OGLIVELABEL $DSTOGLIVE
|
mount -t $TYPE LABEL=$OGLIVELABEL $DSTOGLIVE
|
||||||
if [ $? != 0 ]
|
if [ $? != 0 ]
|
||||||
then
|
then
|
||||||
# Si local es particion CACHE es identificada como CACHE
|
# Si local es particion CACHE es identificada como CACHE
|
||||||
|
@ -508,8 +520,8 @@ ogConnectOgLive ()
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Si ogprotocol es remoto. TODO en smb rw y en nfs ro??
|
# Si ogprotocol es remoto. TODO en smb rw y en nfs ro??
|
||||||
ogConnect $OGSERVERLIVE $OGPROTOCOL $SRCOGLIVE $DSTOGLIVE
|
ogConnect $OGSERVERLIVE $OGPROTOCOL $SRCOGLIVE $DSTOGLIVE
|
||||||
fi
|
fi
|
||||||
# Si el montaje ha sido correcto, tanto en local como en remoto. Procedemos con la union
|
# Si el montaje ha sido correcto, tanto en local como en remoto. Procedemos con la union
|
||||||
ogMergeLive
|
ogMergeLive
|
||||||
}
|
}
|
||||||
|
@ -518,21 +530,21 @@ ogConnectOgLive ()
|
||||||
#/**
|
#/**
|
||||||
# ogMergeLive
|
# ogMergeLive
|
||||||
#@brief Metafuncion para fusionar el initrd con el sistema raiz.
|
#@brief Metafuncion para fusionar el initrd con el sistema raiz.
|
||||||
#@param1
|
#@param1
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
#@date 2011/05/24
|
#@date 2011/05/24
|
||||||
ogMergeLive()
|
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
|
if [ ! -d $DSTOGLIVE/$OGLIVEDIR ]; then
|
||||||
echo "Usando ogLive por defecto."
|
echo "Usando ogLive por defecto."
|
||||||
export OGLIVEDIR=$DEFOGLIVE
|
export OGLIVEDIR=$DEFOGLIVE
|
||||||
fi
|
fi
|
||||||
if [ -f $DSTOGLIVE/$OGLIVEDIR/ogclient.sqfs ]
|
if [ -f $DSTOGLIVE/$OGLIVEDIR/ogclient.sqfs ]
|
||||||
then
|
then
|
||||||
cat /proc/mounts > /tmp/mtab.preunion
|
cat /proc/mounts > /tmp/mtab.preunion
|
||||||
if [ "$og2nd" == "img" ]
|
if [ "$og2nd" == "img" ]
|
||||||
then
|
then
|
||||||
|
@ -544,7 +556,7 @@ then
|
||||||
## Montamos el ROOTFS tipo squashfs
|
## Montamos el ROOTFS tipo squashfs
|
||||||
mount $DSTOGLIVE/$OGLIVEDIR/ogclient.sqfs $OGLIVEROOTFS -t squashfs -o loop
|
mount $DSTOGLIVE/$OGLIVEDIR/ogclient.sqfs $OGLIVEROOTFS -t squashfs -o loop
|
||||||
fi
|
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.
|
# Nota: el orden es muy importante para evitar errores de montaje.
|
||||||
[ -d $OGLIVEROOTFS/lib32 ] && LIBS=lib32
|
[ -d $OGLIVEROOTFS/lib32 ] && LIBS=lib32
|
||||||
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
|
||||||
|
@ -562,8 +574,8 @@ fi
|
||||||
#/**
|
#/**
|
||||||
# ogUnionLiveDir
|
# ogUnionLiveDir
|
||||||
#@brief fusiona dos directorios con unionfs
|
#@brief fusiona dos directorios con unionfs
|
||||||
#@param1
|
#@param1
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
|
@ -589,8 +601,8 @@ ogUnionLiveDir()
|
||||||
#/**
|
#/**
|
||||||
# ogConfigureLoopback
|
# ogConfigureLoopback
|
||||||
#@brief Configura la interfaz loopback para cliente torrent
|
#@brief Configura la interfaz loopback para cliente torrent
|
||||||
#@param
|
#@param
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9 Usando funciones generales de ubuntu
|
#@version 0.9 Usando funciones generales de ubuntu
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
|
@ -609,8 +621,8 @@ ogConfigureLoopback()
|
||||||
#/**
|
#/**
|
||||||
# ogConfigureNetworking
|
# ogConfigureNetworking
|
||||||
#@brief Configura la interfaz de red usada en el pxe
|
#@brief Configura la interfaz de red usada en el pxe
|
||||||
#@param
|
#@param
|
||||||
#@return
|
#@return
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author Antonio J. Doblas. Universidad de Malaga.
|
#@author Antonio J. Doblas. Universidad de Malaga.
|
||||||
|
@ -619,7 +631,7 @@ ogConfigureLoopback()
|
||||||
ogConfigureNetworking()
|
ogConfigureNetworking()
|
||||||
{
|
{
|
||||||
#echo "ogConfigureNetworking: Buscando interfaz a configurar DEVICE"
|
#echo "ogConfigureNetworking: Buscando interfaz a configurar DEVICE"
|
||||||
if [ -n "${BOOTIF}" ]
|
if [ -n "${BOOTIF}" ]
|
||||||
then
|
then
|
||||||
#echo " variable BOOTIF exportada con pxelinux.0 con valor $BOOTIF"
|
#echo " variable BOOTIF exportada con pxelinux.0 con valor $BOOTIF"
|
||||||
IP=$IPOPTS
|
IP=$IPOPTS
|
||||||
|
@ -673,7 +685,7 @@ if [ -z "${DEVICE}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "${DEVICE}" ] && [ -e /run/net-"${DEVICE}".conf ] && return 0
|
[ -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"
|
# echo "variable DEVICE con valor $DEVICE y fichero /run/net-$DEVICE encontrados"
|
||||||
# return 0
|
# return 0
|
||||||
#else
|
#else
|
||||||
|
@ -733,7 +745,7 @@ for ROUNDTTT in 2 3 4 6 9 16 25 36 64 100; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# source ipconfig output
|
# source ipconfig output
|
||||||
if [ -n "${DEVICE}" ]; then
|
if [ -n "${DEVICE}" ]; then
|
||||||
export DEVICE
|
export DEVICE
|
||||||
export DEVICECFG="/run/net-${DEVICE}.conf"
|
export DEVICECFG="/run/net-${DEVICE}.conf"
|
||||||
# En algunos casos, el fichero de configuración está en /tmp.
|
# En algunos casos, el fichero de configuración está en /tmp.
|
||||||
|
@ -755,11 +767,11 @@ fi
|
||||||
# ogYesNo
|
# ogYesNo
|
||||||
#@brief Gestion de peticiones de usuario en modo ogdebug=true
|
#@brief Gestion de peticiones de usuario en modo ogdebug=true
|
||||||
#@param1 OPTIONS --timeout N --default ANSWER
|
#@param1 OPTIONS --timeout N --default ANSWER
|
||||||
#@param1 Questions
|
#@param1 Questions
|
||||||
#@return 1=yes 0=no
|
#@return 1=yes 0=no
|
||||||
#@exception OG_ERR_FORMAT Formato incorrecto.
|
#@exception OG_ERR_FORMAT Formato incorrecto.
|
||||||
#@version 0.9
|
#@version 0.9
|
||||||
#@author:
|
#@author:
|
||||||
#@date 2010/05/24
|
#@date 2010/05/24
|
||||||
#*/ ##
|
#*/ ##
|
||||||
ogYesNo()
|
ogYesNo()
|
||||||
|
@ -826,7 +838,7 @@ ogYesNo()
|
||||||
ans=$default
|
ans=$default
|
||||||
else
|
else
|
||||||
ans=$(echo $ans | tr '[:upper:]' '[:lower:]')
|
ans=$(echo $ans | tr '[:upper:]' '[:lower:]')
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ans" == 'y' || "$ans" == 'yes' || "$ans" == 'n' || "$ans" == 'no' ]]; then
|
if [[ "$ans" == 'y' || "$ans" == 'yes' || "$ans" == 'n' || "$ans" == 'no' ]]; then
|
||||||
|
@ -836,5 +848,5 @@ ogYesNo()
|
||||||
if [[ $ok -eq 0 ]]; then warning "Valid answers are: yes y no n"; fi
|
if [[ $ok -eq 0 ]]; then warning "Valid answers are: yes y no n"; fi
|
||||||
done
|
done
|
||||||
[[ "$ans" = "y" || "$ans" == "yes" ]]
|
[[ "$ans" = "y" || "$ans" == "yes" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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)
|
|
@ -0,0 +1,39 @@
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
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
|
||||||
|
-----END CERTIFICATE-----
|
11
mkoglive.cfg
11
mkoglive.cfg
|
@ -92,7 +92,7 @@ filesystem_local =
|
||||||
dmraid dmsetup lvm2 e2fsprogs
|
dmraid dmsetup lvm2 e2fsprogs
|
||||||
jfsutils reiserfsprogs reiser4progs xfsprogs mhddfs hfsplus hfsprogs hfsutils nilfs-tools vmfs-tools
|
jfsutils reiserfsprogs reiser4progs xfsprogs mhddfs hfsplus hfsprogs hfsutils nilfs-tools vmfs-tools
|
||||||
btrfs-progs # ogLive a partir de Ubuntu 20.04
|
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-adb # ogLive a partir de Ubuntu 16.04
|
||||||
android-tools-fastboot # ogLive a partir de Ubuntu 16.04
|
android-tools-fastboot # ogLive a partir de Ubuntu 16.04
|
||||||
f2fs-tools
|
f2fs-tools
|
||||||
|
@ -108,7 +108,7 @@ filesystem_remote =
|
||||||
#nfs-common # Provoca error de instalación en Ubuntu 15.04
|
#nfs-common # Provoca error de instalación en Ubuntu 15.04
|
||||||
#bittornado # ogLive anterior a Ubuntu 20.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
|
networking = netpipes curl wget tftp-hpa dnsutils
|
||||||
#trickle # ubuntu noble: has no installation candidate
|
#trickle # ubuntu noble: has no installation candidate
|
||||||
|
@ -126,6 +126,13 @@ testing =
|
||||||
|
|
||||||
xwindows =
|
xwindows =
|
||||||
v86d # VESA Kernel 3.7+
|
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
|
#xorg-dev xorg lxde #+300M
|
||||||
#roxterm gparted #+80M
|
#roxterm gparted #+80M
|
||||||
#openbox midori #xvesa en compilacion
|
#openbox midori #xvesa en compilacion
|
||||||
|
|
||||||
|
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 ntfs-3g-system-compression python3-tqdm
|
||||||
|
|
|
@ -8,6 +8,7 @@ import glob
|
||||||
import stat
|
import stat
|
||||||
import shutil
|
import shutil
|
||||||
import argparse
|
import argparse
|
||||||
|
import datetime
|
||||||
|
|
||||||
curdir = os.path.dirname (__file__)
|
curdir = os.path.dirname (__file__)
|
||||||
sys.path.insert (0, curdir)
|
sys.path.insert (0, curdir)
|
||||||
|
@ -76,8 +77,7 @@ def _copy_og_files (btrootfsimg, btrootfsmnt, osdistrib, oscodename):
|
||||||
_mount_rootfs (btrootfsimg, btrootfsmnt)
|
_mount_rootfs (btrootfsimg, btrootfsmnt)
|
||||||
builder = '/tmp/opengnsys/oglive_builder'
|
builder = '/tmp/opengnsys/oglive_builder'
|
||||||
og_shared = '/tmp/opengnsys/shared'
|
og_shared = '/tmp/opengnsys/shared'
|
||||||
og_engine = '/tmp/opengnsys/engine'
|
btog.copy_og_files (builder, og_shared, btrootfsmnt, osdistrib, oscodename)
|
||||||
btog.copy_og_files (builder, og_shared, og_engine, btrootfsmnt, osdistrib, oscodename)
|
|
||||||
utils.umount (btrootfsmnt)
|
utils.umount (btrootfsmnt)
|
||||||
|
|
||||||
def _chroot_tasks (cfgfile, curdir, osrelease, osarch):
|
def _chroot_tasks (cfgfile, curdir, osrelease, osarch):
|
||||||
|
@ -134,7 +134,8 @@ def _main (cfgfile, config, type_client):
|
||||||
_debootstrap (btrootfsimg, btrootfsmnt, osarch, oscodename, oshttp)
|
_debootstrap (btrootfsimg, btrootfsmnt, osarch, oscodename, oshttp)
|
||||||
|
|
||||||
logger.info ('STAGE 2 - copy files to the rootfs')
|
logger.info ('STAGE 2 - copy files to the rootfs')
|
||||||
_initramfs_version (gitrelease, osrelease, curdir)
|
today = datetime.datetime.now(datetime.timezone.utc).strftime ('%Y%m%d')
|
||||||
|
_initramfs_version (gitrelease+'_'+today, osrelease, curdir)
|
||||||
_copy_og_files (btrootfsimg, btrootfsmnt, osdistrib, oscodename)
|
_copy_og_files (btrootfsimg, btrootfsmnt, osdistrib, oscodename)
|
||||||
|
|
||||||
logger.info ('STAGE 3 - perform tasks within the chroot')
|
logger.info ('STAGE 3 - perform tasks within the chroot')
|
||||||
|
@ -144,7 +145,7 @@ def _main (cfgfile, config, type_client):
|
||||||
|
|
||||||
logger.info ('STAGE 4 - generate distribution files')
|
logger.info ('STAGE 4 - generate distribution files')
|
||||||
pxepkg = _get_pxepkg()
|
pxepkg = _get_pxepkg()
|
||||||
nameisoclient = '-'.join (['ogLive', oscodename, osrelease, osarch, gitrelease])
|
nameisoclient = '-'.join (['ogLive', oscodename, osrelease, osarch, gitrelease+'_'+today])
|
||||||
_mkinitrd_squashfs_isofs (bttargetdir, osrelease, btrootfsimg, btrootfsmnt, pxepkg, isolinux_tpl, nameisoclient)
|
_mkinitrd_squashfs_isofs (bttargetdir, osrelease, btrootfsimg, btrootfsmnt, pxepkg, isolinux_tpl, nameisoclient)
|
||||||
|
|
||||||
logger.info ('OpenGnsys installation finished')
|
logger.info ('OpenGnsys installation finished')
|
||||||
|
|
Loading…
Reference in New Issue