[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gambas very simple updater


Il 07/04/24 08:26, Christof Thalhofer ha scritto:
It's always been a problem for me as it means I am now making
software that so many people will never use it because updating
gambas is beyond them.  (I try to stay compatible down to 3.17 but
it's a pain doing that)

I think the IDE needs a working built-in online updater.

So upgrading gambas is as simple as updating the help , click a
button, wait a while.....

No ... please ... no!!!!
If you want to ship the bleeding edge Gambas with your newest fancy
program there are other possibilities ...

Hi,

I believe that in these cases (software created with the latest
'Stable') the solution is AppImage.
AppImage (https://appimage.org/) has the approval of Linus Torvalds and
is simple to create, just have an old version of Ubuntu or Mint, 18.04
and 20.04 seems the best.
The only problem is security, I've been trying to run a test software
recreated with the latest 'Stable' for a few days, inside a Firejail
sandbox with a customized profile, but without success, obviously the
appimage without the sandbox it works.
Has anyone more experienced than me managed to do this?
Probably the error is due to the fact that I try to create a profile in
a virgin OS (without Gambas installed) :-\
I attach a text file with the simplest test I did, obviously I did many
other tests, but the result is always the same: the appimage created
with Gambas only works outside the sandbox. :-(

Regards
Gianluigi
First I copied the CuckooClock appimage created in Mint 21 to the desktop folder Ubuntu focal and Gambas3 stable from PPA. 
I downloaded the CuckooClock project from the Examples Farm, recompiled it and renamed it CuckooClock.AppImage.
I opened the terminal and:

besugo@besugo-VirtualBox:~$ sudo add-apt-repository ppa:deki/firejail
[sudo] password di besugo:             
Stai per aggiungere il seguente PPA:
 Maggiori informazioni: https://launchpad.net/~deki/+archive/ubuntu/firejail
Premi Invio per continuare o Ctrl+C per annullare

gpg: directory '/root/.gnupg' creata
gpg: keybox '/root/.gnupg/pubring.kbx' creato
gpg: /root/.gnupg/trustdb.gpg: creato il trustdb
gpg: keybox '/etc/apt/keyrings/0B58929C0081A52410E8992260537CDCF684460C.keyring' creato
gpg: chiave 60537CDCF684460C: chiave pubblica "Launchpad PPA for Reiner Herrmann" importata
gpg: Numero totale esaminato: 1
gpg:               importate: 1
besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ sudo apt-get update
Scaricamento di:1 https://ppa.launchpadcontent.net/deki/firejail/ubuntu jammy InRelease [18,0 kB]
Scaricamento di:2 https://ppa.launchpadcontent.net/deki/firejail/ubuntu jammy/main amd64 Packages [1.028 B]
Scaricamento di:3 https://ppa.launchpadcontent.net/deki/firejail/ubuntu jammy/main i386 Packages [496 B]
Scaricamento di:4 https://ppa.launchpadcontent.net/deki/firejail/ubuntu jammy/main Translation-en [568 B]
Scaricamento di:5 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Ignorato:6 http://packages.linuxmint.com virginia InRelease                    
Trovato:7 http://archive.ubuntu.com/ubuntu jammy InRelease                     
Scaricamento di:8 http://packages.linuxmint.com virginia Release [24,1 kB]     
Scaricamento di:9 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Scaricamento di:10 http://packages.linuxmint.com virginia Release.gpg [833 B]  
Scaricamento di:11 http://packages.linuxmint.com virginia/upstream amd64 Packages [48,8 kB]
Scaricamento di:12 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages [436 kB]
Trovato:13 http://archive.ubuntu.com/ubuntu jammy-backports InRelease          
Scaricamento di:14 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1.519 kB]
Scaricamento di:15 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1.303 kB]
Scaricamento di:16 http://archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [602 kB]
Scaricamento di:17 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Packages [599 kB]
Scaricamento di:18 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [293 kB]
Scaricamento di:19 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [852 kB]
Scaricamento di:20 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1.648 kB]
Scaricamento di:21 http://archive.ubuntu.com/ubuntu jammy-updates/restricted i386 Packages [35,2 kB]
Scaricamento di:22 http://archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [275 kB]
Scaricamento di:23 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1.060 kB]
Scaricamento di:24 http://archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [698 kB]
Scaricamento di:25 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [49,6 kB]
Scaricamento di:26 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse Translation-en [12,0 kB]
Recuperati 9.705 kB in 2s (3.899 kB/s)                        
Lettura elenco dei pacchetti... Fatto
besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ sudo apt-get install firejail firejail-profiles
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze... Fatto
Lettura informazioni sullo stato... Fatto   
I seguenti pacchetti NUOVI saranno installati:
  firejail firejail-profiles
0 aggiornati, 2 installati, 0 da rimuovere e 24 non aggiornati.
È necessario scaricare 588 kB di archivi.
Dopo quest'operazione, verranno occupati 3.387 kB di spazio su disco.
Scaricamento di:1 https://ppa.launchpadcontent.net/deki/firejail/ubuntu jammy/main amd64 firejail amd64 0.9.72-2~0ubuntu22.04.0 [449 kB]
Scaricamento di:2 https://ppa.launchpadcontent.net/deki/firejail/ubuntu jammy/main amd64 firejail-profiles all 0.9.72-2~0ubuntu22.04.0 [140 kB]
Recuperati 588 kB in 0s (1.812 kB/s)   
Selezionato il pacchetto firejail non precedentemente selezionato.
(Lettura del database... 566080 file e directory attualmente installati.)
Preparativi per estrarre .../firejail_0.9.72-2~0ubuntu22.04.0_amd64.deb...
Estrazione di firejail (0.9.72-2~0ubuntu22.04.0)...
Selezionato il pacchetto firejail-profiles non precedentemente selezionato.
Preparativi per estrarre .../firejail-profiles_0.9.72-2~0ubuntu22.04.0_all.deb...
Estrazione di firejail-profiles (0.9.72-2~0ubuntu22.04.0)...
Configurazione di firejail (0.9.72-2~0ubuntu22.04.0)...
Configurazione di firejail-profiles (0.9.72-2~0ubuntu22.04.0)...
Elaborazione dei trigger per man-db (2.10.2-1)...
besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ sudo firecfg
Removing all firejail symlinks:

Configuring symlinks in /usr/local/bin based on firecfg.config
   Xephyr created
   baobab created
   celluloid created
   dig created
   dnsmasq created
   enchant-2 created
   enchant-lsmod-2 created
   evince created
   ffmpegthumbnailer created
   file-roller created
   firefox created
   ftp created
   gapplication created
   gcalccmd created
   gnome-calculator created
   gnome-calendar created
   gnome-logs created
   gnome-screenshot created
   gucharmap created
   hexchat created
   host created
   libreoffice created
   lobase created
   localc created
   lodraw created
   loffice created
   lofromtemplate created
   loimpress created
   lomath created
   loweb created
   lowriter created
   man created
   mate-color-select created
   nslookup created
   odt2txt created
   onboard created
   patch created
   pdftotext created
   ping created
   pix created
   redshift created
   rhythmbox created
   rhythmbox-client created
   seahorse created
   simple-scan created
   soffice created
   ssh created
   strings created
   telnet created
   thunderbird created
   transmission-gtk created
   wget created
   xcalc created
   xed created
   xreader created
   xreader-previewer created
   xreader-thumbnailer created
   xviewer created
Warning: cannot create /usr/local/bin/yelp - already exists! Skipping...
   yt-dlp created

Adding user besugo to Firejail access database in /etc/firejail/firejail.users
Creating /etc/firejail/firejail.users

Loading AppArmor profile

Fixing desktop files in /home/besugo/.local/share/applications
   org.gnome.Screenshot.desktop created
   io.github.celluloid_player.Celluloid.desktop created
   org.gnome.Logs.desktop created
   org.gnome.baobab.desktop created

besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ 
besugo@besugo-VirtualBox:~$ cd .config

besugo@besugo-VirtualBox:~/.config$ mkdir firejail

besugo@besugo-VirtualBox:~/.config$ cd firejail

besugo@besugo-VirtualBox:~/.config/firejail$ 

besugo@besugo-VirtualBox:~/.config/firejail$ firejail --build=CuckooClock.profile --appimage ~/Scrivania/CuckooClock.AppImage

besugo@besugo-VirtualBox:~/.config/firejail$ ls
CuckooClock.profile
besugo@besugo-VirtualBox:~/.config/firejail$ firejail --profile=CuckooClock.profile --appimage ~/Scrivania/CuckooClock.AppImage
Reading profile CuckooClock.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/whitelist-common.inc
Reading profile /etc/firejail/whitelist-run-common.inc
Reading profile /etc/firejail/whitelist-runuser-common.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Warning: networking feature is disabled in Firejail configuration file
Warning: "shell none" command in the profile file is done by default; the command will be deprecated
Seccomp list in: !chroot, check list: @default-keep, prelist: unknown,
Parent pid 17709, child pid 17713

** Warning: dropping all Linux capabilities and setting NO_NEW_PRIVS prctl **

Mounting appimage type 2
Warning: skipping drirc for private /etc
Private /etc installed in 12.05 ms
Private /usr/etc installed in 0.00 ms
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Seccomp list in: !chroot, check list: @default-keep, prelist: unknown,
Warning: cleaning all supplementary groups
Child process initialized in 111.61 ms
[gb.gui.base]._Gui.MakeDir.119: Cannot create directory
[gb.gui.base]._Gui.MakeDir.119 [gb.gui.base]._Gui._InitApp.143 ? 

Parent is shutting down, bye...
AppImage detached
besugo@besugo-VirtualBox:~/.config/firejail$ 




Follow-Ups:
Re: gambas very simple updaterGianluigi <gradobag@xxxxxxxxxxx>
References:
gambas very simple updaterBruce Steers <bsteers4@xxxxxxxxx>
Re: gambas very simple updaterJorge Carrión <shordi@xxxxxxxxx>
Re: gambas very simple updaterBruce Steers <bsteers4@xxxxxxxxx>
Re: gambas very simple updaterChristof Thalhofer <chrisml@xxxxxxxxxxx>