[PATCH 0/2] Update looking-glass-client to B6 and restyle package

  • Done
  • quality assurance status badge
Details
2 participants
  • Ahmad Draidi
  • Christopher Baines
Owner
unassigned
Submitted by
Ahmad Draidi
Severity
normal
A
A
Ahmad Draidi wrote on 16 Aug 2023 11:15
(address . guix-patches@gnu.org)(name . Ahmad Draidi)(address . a.r.draidi@redscript.org)
cover.1692176991.git.a.r.draidi@redscript.org
Hello Guix,

This series updates and restyles looking-glass-client, and also restores a
configuration parameter that was dropped in the previous update patch. Some
notes for posterity below.

The package builds with "-march=native" GCC parameter by default, which
makes it incompatible with CPUs older than the build machine and causes
crashes with "terminated by signal SIGILL (Illegal instruction)" and perhaps
others. We build it with the minimum supported CPU architecture to fix that.
This also helps with package reproducibility.

Thanks,

Ahmad Draidi (2):
gnu: looking-glass-client: Update to B6.
gnu: looking-glass-client: Update package style.

gnu/packages/virtualization.scm | 146 ++++++++++++++++----------------
1 file changed, 73 insertions(+), 73 deletions(-)


base-commit: 880ada0bdb9e694573ec42200d48658b27744b9b
--
2.41.0
A
A
Ahmad Draidi wrote on 16 Aug 2023 11:32
[PATCH 1/2] gnu: looking-glass-client: Update to B6.
(address . 65336@debbugs.gnu.org)(name . Ahmad Draidi)(address . a.r.draidi@redscript.org)
87ff44ae30c9a029646b5cc7693c0c6a84335939.1692176991.git.a.r.draidi@redscript.org
* gnu/packages/virtualization.scm (looking-glass-client): Update to B6.
[source]: Use upstream tarball and switch to url-fetch.
[inputs]: Add font-dejavu, libsamplerate, pipewire, pulseaudio. Remove
openssl, sdl2, sdl2-ttf.
[native-inputs]: Remove libconfig.
[arguments]: Add "-DOPTIMIZE_FOR_NATIVE=OFF" to #:configure-flags for
reproducibility and CPU compatibility.
[use-modules]: Add (gnu packages fonts).
---
gnu/packages/virtualization.scm | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)

Toggle diff (81 lines)
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 9556fbc61e..e446adfa98 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2023 Juliana Sims <juli@incana.org>
+;;; Copyright © 2023 Ahmad Draidi <a.r.draidi@redscript.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -75,6 +76,7 @@ (define-module (gnu packages virtualization)
#:use-module (gnu packages figlet)
#:use-module (gnu packages firmware)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages fonts)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
@@ -1915,27 +1917,27 @@ (define-public qmpbackup
(define-public looking-glass-client
(package
(name "looking-glass-client")
- (version "B5")
+ (version "B6")
(source
(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/gnif/LookingGlass")
- (commit version)
- (recursive? #t)))
- (file-name (git-file-name name version))
+ (method url-fetch)
+ (uri (string-append "https://looking-glass.io/artifact/"
+ version "/source"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "09mn544x5hg1z31l92ksk7fi7yj9r8xdk0dcl9fk56ivcr452ylm"))))
+ "15d7wwbzfw28yqbz451b6n33ixy50vv8acyzi8gig1mq5a8gzdib"))))
(build-system cmake-build-system)
(inputs
(list bash-minimal
+ font-dejavu
fontconfig
freetype
glu
gmp
libglvnd
libiberty
+ libsamplerate
libx11
libxcursor
libxfixes
@@ -1946,16 +1948,18 @@ (define-public looking-glass-client
libxrandr
libxscrnsaver
mesa
- openssl
- sdl2
- sdl2-ttf
+ pipewire
+ pulseaudio
spice-protocol
wayland
wayland-protocols
`(,zlib "static")))
- (native-inputs (list libconfig nettle pkg-config))
+ (native-inputs (list nettle pkg-config))
(arguments
`(#:tests? #f ;; No tests are available.
+ ;; Package uses "-march=native" by default. We disable that to build with the
+ ;; lowest supported architecture for reproducibility and CPU compatibility.
+ #:configure-flags '("-DOPTIMIZE_FOR_NATIVE=OFF")
#:make-flags '("CC=gcc")
#:phases (modify-phases %standard-phases
(add-before 'configure 'chdir-to-client
--
2.41.0
A
A
Ahmad Draidi wrote on 16 Aug 2023 11:32
[PATCH 2/2] gnu: looking-glass-client: Update package style.
(address . 65336@debbugs.gnu.org)(name . Ahmad Draidi)(address . a.r.draidi@redscript.org)
dd4c012264d5f45ed89464ed9afd799f6aada160.1692176991.git.a.r.draidi@redscript.org
* gnu/packages/virtualization.scm (looking-glass-client): Restyle format.
[arguments]: Use G-expressions. Drop trailing #t from phases.
---
gnu/packages/virtualization.scm | 142 ++++++++++++++++----------------
1 file changed, 69 insertions(+), 73 deletions(-)

Toggle diff (160 lines)
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index e446adfa98..2f2454e544 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1918,84 +1918,80 @@ (define-public looking-glass-client
(package
(name "looking-glass-client")
(version "B6")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://looking-glass.io/artifact/"
- version "/source"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "15d7wwbzfw28yqbz451b6n33ixy50vv8acyzi8gig1mq5a8gzdib"))))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://looking-glass.io/artifact/" version
+ "/source"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "15d7wwbzfw28yqbz451b6n33ixy50vv8acyzi8gig1mq5a8gzdib"))))
(build-system cmake-build-system)
- (inputs
- (list bash-minimal
- font-dejavu
- fontconfig
- freetype
- glu
- gmp
- libglvnd
- libiberty
- libsamplerate
- libx11
- libxcursor
- libxfixes
- libxi
- libxinerama
- libxkbcommon
- libxpresent
- libxrandr
- libxscrnsaver
- mesa
- pipewire
- pulseaudio
- spice-protocol
- wayland
- wayland-protocols
- `(,zlib "static")))
+ (inputs (list bash-minimal
+ font-dejavu
+ fontconfig
+ freetype
+ glu
+ gmp
+ libglvnd
+ libiberty
+ libsamplerate
+ libx11
+ libxcursor
+ libxfixes
+ libxi
+ libxinerama
+ libxkbcommon
+ libxpresent
+ libxrandr
+ libxscrnsaver
+ mesa
+ pipewire
+ pulseaudio
+ spice-protocol
+ wayland
+ wayland-protocols
+ `(,zlib "static")))
(native-inputs (list nettle pkg-config))
(arguments
- `(#:tests? #f ;; No tests are available.
- ;; Package uses "-march=native" by default. We disable that to build with the
- ;; lowest supported architecture for reproducibility and CPU compatibility.
- #:configure-flags '("-DOPTIMIZE_FOR_NATIVE=OFF")
- #:make-flags '("CC=gcc")
- #:phases (modify-phases %standard-phases
- (add-before 'configure 'chdir-to-client
- (lambda* (#:key outputs #:allow-other-keys)
- (chdir "client")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (install-file "looking-glass-client"
- (string-append (assoc-ref outputs "out")
- "/bin"))
- #t))
- (add-after 'install 'wrapper
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (wrap-program
- (string-append (assoc-ref outputs "out")
- "/bin/looking-glass-client")
- `("LD_LIBRARY_PATH" ":" prefix
- ,(map (lambda (name)
- (let ((input (assoc-ref inputs name)))
- (string-append input "/lib")))
- '("gmp"
- "libxi"
- "nettle"
- "mesa"
- "wayland"
- "fontconfig-minimal"
- "freetype"
- "libx11"
- "libxfixes"
- "libxscrnsaver"
- "libxinerama"))))
- #t)))))
+ (list #:tests? #f ;No tests are available.
+ ;; Package uses "-march=native" by default. We disable that to build with the
+ ;; lowest supported architecture for reproducibility and CPU compatibility.
+ #:configure-flags #~'("-DOPTIMIZE_FOR_NATIVE=OFF")
+ #:make-flags #~'("CC=gcc")
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'configure 'chdir-to-client
+ (lambda* (#:key outputs #:allow-other-keys)
+ (chdir "client")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (install-file "looking-glass-client"
+ (string-append (assoc-ref outputs
+ "out")
+ "/bin"))))
+ (add-after 'install 'wrapper
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (wrap-program (string-append (assoc-ref outputs
+ "out")
+ "/bin/looking-glass-client")
+ `("LD_LIBRARY_PATH" ":" prefix
+ ,(map (lambda (name)
+ (let ((input (assoc-ref inputs name)))
+ (string-append input "/lib")))
+ '("gmp" "libxi"
+ "nettle"
+ "mesa"
+ "wayland"
+ "fontconfig-minimal"
+ "freetype"
+ "libx11"
+ "libxfixes"
+ "libxscrnsaver"
+ "libxinerama")))))))))
(home-page "https://looking-glass.io/")
(synopsis "KVM Frame Relay (KVMFR) implementation")
- (description "Looking Glass allows the use of a KVM (Kernel-based Virtual
+ (description
+ "Looking Glass allows the use of a KVM (Kernel-based Virtual
Machine) configured for VGA PCI Pass-through without an attached physical
monitor, keyboard or mouse. It displays the VM's rendered contents on your
main monitor/GPU.")
--
2.41.0
C
C
Christopher Baines wrote on 29 Aug 2023 15:05
Re: [bug#65336] [PATCH 0/2] Update looking-glass-client to B6 and restyle package
(name . Ahmad Draidi)(address . a.r.draidi@redscript.org)
875y4ygfrr.fsf@cbaines.net
Ahmad Draidi via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (19 lines)
> This series updates and restyles looking-glass-client, and also restores a
> configuration parameter that was dropped in the previous update patch. Some
> notes for posterity below.
>
> The package builds with "-march=native" GCC parameter by default, which
> makes it incompatible with CPUs older than the build machine and causes
> crashes with "terminated by signal SIGILL (Illegal instruction)" and perhaps
> others. We build it with the minimum supported CPU architecture to fix that.
> This also helps with package reproducibility.
>
> Thanks,
>
> Ahmad Draidi (2):
> gnu: looking-glass-client: Update to B6.
> gnu: looking-glass-client: Update package style.
>
> gnu/packages/virtualization.scm | 146 ++++++++++++++++----------------
> 1 file changed, 73 insertions(+), 73 deletions(-)

Thanks Ahmad, these changes look good to me. I've pushed to master as
02e32197a80e4fc323ffe0e519ad4e58f206fc5d.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmTt7ShfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XcPjQ//WGIJz4+Oif4Y++Qja+2A5ohtXFTGIWCI
5pJi80tTNATLwDV35V0VldKeuPtUDr7nctAL7mFr7+U3LvPThjNO4bBbUAEE65Re
0fVwbLmEGafWeIKzIaAy7Cvs2dekGOKKwTm2Xtyeb7Hs9uv1WdBNe7BDqYTlIV3Y
ajANBK8ZmbETp9ZrdxgXv02AIjjfM4kvPqxTx7smdkY+Ijv0ZMetUWaZGb+ECvFO
2suRdpGWERPwQ2bzxnosGUQ0bmqOut5CbZx7rofkdDsbtFz9Atv+MnFRQgk8D3wE
4d/7ap15FfEpMp/ni2OksUuC5Ooa3UFUa4h9UU69he7tua+U8Hw6+OqAlW9PuRC1
7lSaaUJJuZ2AVZIjFBqTLhk2TyZNAhb91OJ3FWDbaYrWCf49El/KeDBDzX09jRZs
W2gPCN7naVMD5Ua0VfxDIOo6kcFwXQBl/Md49Ji8xuk8goIp3zS33kszJNB2eRQw
qEI1BwdRu4AhfseLxtrXk7+fX6jDn1qB2cVzUqyk4lJ5WFFwdTqRNhlfyJmPvmMs
N6xdj/E1DMx0+tklx+sBOPdCwzKlO7cmk6MxKSjDYzbSkihp1Vo9wvTfwf3Zqju5
7SLuRP3xpooC3XfrBnbTVyYf6Qz2OiPG6/s4a2M2TLJqYbedE5acbiDFFBaJelhe
oLkcYOtGRvE=
=tZWl
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 65336@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 65336
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch