Thinstation / thinstation

A framework for making thin and light Linux based images for x86 based machines and thinclients.
https://www.thinstation.net/
775 stars 188 forks source link

ViewHorizon Update for python3, #793

Closed rohrbachger closed 8 months ago

rohrbachger commented 9 months ago

Newer Horizon View Client 23xx needs gcc12 and also the python3 for setup,with python 2 where issues Here included only the vmview package fix, without gcc12.

Doncuppjr commented 9 months ago

If you are using a pip3.freeze file, you don't need to make ports......

Doncuppjr commented 9 months ago

I say this, because I hate having python ports, and I try and keep it down to just the ones that are needed to compile other packages. I prefer for the image building system to use .freeze files, then we don't have to dink around with version in the directory name problem.

rohrbachger commented 9 months ago

I understand would you mean. Is there any sample available how it works with pip3.freeze in TS? This sounds much easier as with ports. I was really proud to get it working, but you have much more experience. The first commit for horizon view does not need the unixodbc, freetds, pyodbc and pywinrm. So it will try to revoke this and make pip3.freeze packages.

Iḿ still a git beginner.

rohrbachger commented 8 months ago

I will pull a new requerst for gcc12 port and a different for the view client update.

Doncuppjr commented 8 months ago

I was not ignoring this, but if the new client requires a new gcc, then that needs to be part of the merge. Thank you for the contribution.

rohrbachger commented 8 months ago

That is stopping me, large file. I did not figured yet out, how to solve this.

root@Desktop:/GRPROG/thinstation-31/ts/ports/core/gcc# git commit [6.2-Stable 2602e18] gcc 12.2 git lfs needed 1 file changed, 1 insertion(+) create mode 100644 ts/ports/core/gcc/.gitattributes root@Desktop:/GRPROG/thinstation-31/ts/ports/core/gcc# git push Username for 'https://github.com': rohrbachger Password for 'https://rohrbachger@github.com': Objekte aufzählen: 21, fertig. Zähle Objekte: 100% (21/21), fertig. Delta-Kompression verwendet bis zu 4 Threads. Komprimiere Objekte: 100% (15/15), fertig. Schreibe Objekte: 100% (15/15), 106.64 MiB | 1.35 MiB/s, fertig. Gesamt 15 (Delta 10), Wiederverwendet 0 (Delta 0), Pack wiederverwendet 0 remote: Resolving deltas: 100% (10/10), completed with 5 local objects. remote: error: Trace: 85dfd853e718965dd3f3df914e51b602358f9e65022507cf0417b34a5d644d41 remote: error: See https://gh.io/lfs for more information. remote: error: File ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz is 106.60 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. To https://github.com/rohrbachger/thinstation.git ! [remote rejected] 6.2-Stable -> 6.2-Stable (pre-receive hook declined) error: Fehler beim Versenden einiger Referenzen nach 'https://github.com/rohrbachger/thinstation.git'

Thinstation commented 8 months ago

Use the shrink command

On Sat, Oct 21, 2023 at 8:15 AM rohrbachger @.***> wrote:

That is stopping me, large file. I did not figured yet out, how to solve this.

@.:/GRPROG/thinstation-31/ts/ports/core/gcc# git commit [6.2-Stable 2602e18] gcc 12.2 git lfs needed 1 file changed, 1 insertion(+) create mode 100644 ts/ports/core/gcc/.gitattributes @.:/GRPROG/thinstation-31/ts/ports/core/gcc# git push Username for 'https://github.com': rohrbachger Password for @.***': Objekte aufzählen: 21, fertig. Zähle Objekte: 100% (21/21), fertig. Delta-Kompression verwendet bis zu 4 Threads. Komprimiere Objekte: 100% (15/15), fertig. Schreibe Objekte: 100% (15/15), 106.64 MiB | 1.35 MiB/s, fertig. Gesamt 15 (Delta 10), Wiederverwendet 0 (Delta 0), Pack wiederverwendet 0 remote: Resolving deltas: 100% (10/10), completed with 5 local objects.

remote: error: Trace: 85dfd853e718965dd3f3df914e51b602358f9e65022507cf0417b34a5d644d41 remote: error: See https://gh.io/lfs https://gh.io/lfs for more information. remote: error: File ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz is 106.60 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com https://git-lfs.github.com. To https://github.com/rohrbachger/thinstation.git ! [remote rejected] 6.2-Stable -> 6.2-Stable (pre-receive hook declined) error: Fehler beim Versenden einiger Referenzen nach ' https://github.com/rohrbachger/thinstation.git'

— Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/pull/793#issuecomment-1773804958, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47UOSAITTNLVKPRL4WTYAPKGRAVCNFSM6AAAAAA5XSUAY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTHAYDIOJVHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rohrbachger commented 8 months ago

The gcc file is already too large. Do you mean git shrink? Did not found somethink for this.

root@Desktop:/GRPROG/thinstation-31/ts/ports/core/gcc# ls -l -rw-r--r-- 1 root root 111780192 Okt 21 15:39 gcc#12.2.0-1.pkg.tar.xz -rw-r--r-- 1 root root 5636 Okt 21 15:39 Pkgfile

Thinstation commented 8 months ago

‘shrink gcc’

On Sat, Oct 21, 2023 at 9:45 AM rohrbachger @.***> wrote:

The gcc file is already too large. Do you mean git shrink? Did not found somethink for this.

@.***:/GRPROG/thinstation-31/ts/ports/core/gcc# ls -l -rw-r--r-- 1 root root 111780192 Okt 21 15:39 gcc#12.2.0-1.pkg.tar.xz -rw-r--r-- 1 root root 5636 Okt 21 15:39 Pkgfile

— Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/pull/793#issuecomment-1773835437, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47SPCWHMVU3UXDN6RPTYAPUZNAVCNFSM6AAAAAA5XSUAY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTHAZTKNBTG4 . You are receiving this because you commented.Message ID: @.***>

rohrbachger commented 8 months ago

Got it, but result 0 byte is not okay. The error is pointing to an memory issue, machine has enough..

root@TS_chroot]/# shrink gcc

[root@TS_chroot]/ts/ports/core/gcc# ls -l total 8 -rw-r--r-- 1 root root 5636 Oct 21 13:39 Pkgfile -rw-r--r-- 1 root root 0 Oct 21 17:04 gcc#12.2.0-1.pkg.tar.xz

Thinstation commented 8 months ago

You need more RAM

On Sat, Oct 21, 2023 at 11:09 AM rohrbachger @.***> wrote:

Got it, but result 0 byte is not okay. The error is pointing to an memory issue, machine has enough..

@.***_chroot]/# shrink gcc

  • port=gcc ++ prt-get printf %v --filter=gcc
  • version=12.2.0 ++ prt-get printf %r --filter=gcc
  • release=1 ++ prt-get path gcc
  • path=/ts/ports/core/gcc
  • '[' -e /ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.gz ']'
  • '[' -e /ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz ']'
  • sarchive=/ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz
  • darchive=/ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz
  • '[' -z /ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz ']'
  • '[' -z /ts/ports/core/gcc ']'
  • '[' -e /tmp/shrink ']'
  • mkdir -p /tmp/shrink
  • mount -t tmpfs -o size=1G tmpfs /tmp/shrink
  • tar -xf /ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz -C /tmp/shrink ++ du -sb /ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz ++ cut -f1
  • oldsize=111780192
  • cd /tmp/shrink
  • tar -c usr
  • xz -9 --lzma2=dict=max xz: (stdin): Cannot allocate memory ++ du -sb /ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz.new ++ cut -f1
  • newsize=0
  • '[' 111780192 -gt 0 ']'
  • cp /ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz.new /ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz
  • rm /ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz.new
  • cd /
  • umount /tmp/shrink
  • rmdir /tmp/shrink

@.**_chroot]/ts/ports/core/gcc# ls -l total 8 -rw-r--r-- 1 root root 5636 Oct 21 13:39 Pkgfile -rw-r--r-- 1 root root 0* Oct 21 17:04 gcc#12.2.0-1.pkg.tar.xz

— Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/pull/793#issuecomment-1773865217, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47UBWSAI7PR2TVJWOGLYAP6TBAVCNFSM6AAAAAA5XSUAY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTHA3DKMRRG4 . You are receiving this because you commented.Message ID: @.***>

rohrbachger commented 8 months ago

machine has 8GB RAM, I restarted, still the same. Iḿ running on ubuntu, maybe this makes a difference.

Thinstation commented 8 months ago

I give my VM’s 32gb. You could try without using a RAM disk. Edit the shrink command.

On Sat, Oct 21, 2023 at 11:33 AM rohrbachger @.***> wrote:

machine has 8GB RAM, I restarted, still the same. Iḿ running on ubuntu, maybe this makes a difference.

— Reply to this email directly, view it on GitHub https://github.com/Thinstation/thinstation/pull/793#issuecomment-1773871929, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVW47WOS3H2AWB3REM6MITYAQBODAVCNFSM6AAAAAA5XSUAY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTHA3TCOJSHE . You are receiving this because you commented.Message ID: @.***>

rohrbachger commented 8 months ago

I made some unsuccessful experiments with shrink. I ordered some more memory,...

Doncuppjr commented 8 months ago

The main thing that shrink does, is utilize the maximum compression mode of xz to make s smaller archive. This works well when dealing with a rather large archive that can benefit from the bigger dictionary. This uses quite a bit of memory though, so not an everyday kind of thing. It also makes a 1 gig ram disk, just for speed, but that usually is not what is getting in the way. On Tuesday, October 24, 2023 at 10:59:55 AM MDT, rohrbachger @.***> wrote:

I made some unsuccessful experiments with shrink. I ordered some more memory,...

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>