From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id +PF7IckB7WX7UgEAqHPOHw:P1 (envelope-from ) for ; Sun, 10 Mar 2024 01:41:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id +PF7IckB7WX7UgEAqHPOHw (envelope-from ) for ; Sun, 10 Mar 2024 01:41:45 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=nsgr9qvx; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710031305; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=OxzTL8KgGqVWPmb9fZnI6/5xV/me4iN6UikM6VlJwUQ=; b=pG590DEU6pwZm6VPJ1OUa8R8k3EGr6Q3L1e9EVK4P8ZQYs03qRx46waWWuMWe7D4JjoXWF r8E5zNLcH+YIsWsWkCuAomGSvdROpKZNdn48pKtF+55r/PYdPnHGsu75Ku2zC1q/Tz9we/ LbMdUQqwsdmVUuN5cV/78HyuK4iILl3IGYJIWdBLeTziYkz9oahiHhsQdpk8RCQ6qe2DOQ DRc7nFO+RhiEXx/sfmQlXYesDW51lonKPwfNnWqFc7srSokj+64GjGR2X7T6h4vOzJ+ucx lKIVQayHElZcMLHhrAS9maUQH7jX5pxvOwvgkhMkBZaB8FjgucBcVAdYXmveIA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=nsgr9qvx; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710031305; a=rsa-sha256; cv=none; b=XtuX5bT4epgXJzxIZDwcZeOemHSDs1gI58sYVZJPoWIfJR4/z/UrAdHiiWFRP67o2jhQTv 1U7aBOX7CliDQwnUIA4cCXaYjiS51S1SGyaNKB7fkWZZ2OVGnga8NgXs7XzMNspcFGyocl MD8BLFt/WV2ME78oscsO9gX/Ylvf0Gog6vtP7i2QYxH1OpI1+KYy/sdcIkrhPdjMJU5p4j 1CxY5eoh1XbNOPfOQODOvodQBVEwYyz/8XCgVktI9KWDIueKlQETwbbj4ZZ8MM2e9g6akM C/eGtmlcIhOjIf83KAg55Tx3khJyLNVLkE7pl8BTilnGTON2m+o8TOXIeamiVw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1EAB636A08 for ; Sun, 10 Mar 2024 01:41:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rj7Ft-0006kg-Ug; Sat, 09 Mar 2024 19:41:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rj7Fq-0006kJ-As for guix-patches@gnu.org; Sat, 09 Mar 2024 19:41:30 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rj7Fq-0007S3-2n for guix-patches@gnu.org; Sat, 09 Mar 2024 19:41:30 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rj7GL-0007IN-Iy; Sat, 09 Mar 2024 19:42:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67257] [PATCH v2 1/2] gnu: Add nx-libs. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org, steve@futurile.net Resent-Date: Sun, 10 Mar 2024 00:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67257 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Steve George Cc: nicolas.debonnaire@gmail.com, Ludovic =?UTF-8?Q?Court=C3=A8s?= , 67257@debbugs.gnu.org Received: via spool by 67257-submit@debbugs.gnu.org id=B67257.171003132028036 (code B ref 67257); Sun, 10 Mar 2024 00:42:01 +0000 Received: (at 67257) by debbugs.gnu.org; 10 Mar 2024 00:42:00 +0000 Received: from localhost ([127.0.0.1]:34985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rj7GG-0007I4-QD for submit@debbugs.gnu.org; Sat, 09 Mar 2024 19:42:00 -0500 Received: from mail-qt1-f182.google.com ([209.85.160.182]:42242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rj7GB-0007Hn-H4 for 67257@debbugs.gnu.org; Sat, 09 Mar 2024 19:41:55 -0500 Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-42e323a2e39so28725231cf.1 for <67257@debbugs.gnu.org>; Sat, 09 Mar 2024 16:41:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710031212; x=1710636012; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OxzTL8KgGqVWPmb9fZnI6/5xV/me4iN6UikM6VlJwUQ=; b=nsgr9qvxDQtiAhayDthjbQxMElD8oCa5YwngVIdQceCWUlzDhws+8FE99iDWsXeCZx eG4hQ+2QtP7Y5v85NvT9AwMDPoebZ37WpYXk0tNv6fypjbalhVnf19P+FQBCgEau2WZ3 RpOXvvC46Cie9JoT0jPNchVe6REEMm30KW6HsqNfZPwIF+N6hudx8hXxsSFxuU7xQ2ni ybKgiJgh1X/NbuoZHCc83l6e3EZtWW7BfJ2Z0ua3ejRM1r9LCNMbvBiFAW8PWQJq/w4T dVolju6aGpFw09tOXwq+sdVhw+5olBem8KwviO2J9rIkZHZT+jH7Thjs8LtnOrWhqEvW RTlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710031212; x=1710636012; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=OxzTL8KgGqVWPmb9fZnI6/5xV/me4iN6UikM6VlJwUQ=; b=quWnn8nHlHx3y+5busN33HdMkyXiincTQcYSpqsdh71vgXnFM5Jlm9gkRYTSJul3qs inj6pGXC3uQWmcMnRZMv2cjyGrrbTx+OdTLNDJLvHC/OgBOKc/ZsMheAoa19d3HvaSTl FxN/6qkzZQKUHaHWz2VAi2IvTPv3SgnT/vlBA42Z0xlf56eh8dU1nW1tNCxU1ii2XdvX dp8qeiQp4aRZiLQZeYyD1uIMKxqrebXtE0LANCsIqO7L1qjMI0LlHo0yOc6vASc18nRs g18QyI8vgjDdRHe8T0HH+41/1RQ85/gt7uvn87hfYnvX3utwM7L/T0CE5IXUA1uRib/3 qVIQ== X-Forwarded-Encrypted: i=1; AJvYcCUJvmdk7wLoc9qmTlqBnerCytt6sZPSpRp5IFEywxBNtRqjlq5Kh7pmtZ8KRjDTcLAhk21aWBKFfrEti4VfJIb6l/6IC2s= X-Gm-Message-State: AOJu0YyRFwVpTtv9K9q/OLcuKXdFQgh03vju3lC2Lzt2RIkERqgNF6Td oYKkv7ST9bfGg3h0xcad9ppGykytPOrUCO615hcLNSHwmR8Ce5u49Va5guek6yvvFw== X-Google-Smtp-Source: AGHT+IF4/T96GcI/ouHF2l2bsQfwQD1mbzOE4aYTuwXtutBIoxFEo71De86JpZy1zxfL95DKd7nPhA== X-Received: by 2002:ac8:5a89:0:b0:42e:fa69:ba81 with SMTP id c9-20020ac85a89000000b0042efa69ba81mr4759546qtc.18.1710031212388; Sat, 09 Mar 2024 16:40:12 -0800 (PST) Received: from hurd (dsl-150-134.b2b2c.ca. [66.158.150.134]) by smtp.gmail.com with ESMTPSA id 11-20020ac8594b000000b0042f430b6176sm79617qtz.7.2024.03.09.16.40.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 16:40:11 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <87sf1ei5xp.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 27 Feb 2024 10:59:14 +0100") References: <834a3cc5e7e16f94691c1bb726f1dd1cc5edb6d0.1708638616.git.steve@futurile.net> <87sf1ei5xp.fsf@gnu.org> Date: Sat, 09 Mar 2024 19:40:10 -0500 Message-ID: <875xxuex79.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: 4.22 X-Spam-Score: 4.22 X-Migadu-Queue-Id: 1EAB636A08 X-TUID: RL9UKNyU27mv Hi Steve and Ludovic, I had started reviewing this work as a diff with the intent to merge it before Ludovic tipped in; apologies for not signaling this earlier. Ludovic Court=C3=A8s writes: > Hi! > > Thank you Steve for shepherding this patch set! Here are some comments > on minor issues. > > Steve George skribis: > >> From: nicodebo >> >> * gnu/packages/nx.scm: New file. >> * gnu/packages/nx.scm (nx-libs): New variable. > > The second line is unnecessary. > > Please make sure to add the file to =E2=80=98gnu/local.mk=E2=80=99. Done. >> +++ b/gnu/packages/nx.scm >> @@ -0,0 +1,141 @@ >> +;;; This file is part of GNU Guix. > > Looks like a couple of lines are missing from the usual header. > >> + (add-before 'build 'replace-shebang-nxdialog >> + (lambda _ >> + (substitute* "nxdialog/bin/nxdialog" >> + (("#!/usr/bin/env python") >> + (string-append "#!" >> + (which "python3")))))) > > =E2=80=98which=E2=80=99 returns =E2=80=98python3=E2=80=99 as found in $PA= TH=E2=80=94i.e., the native python. > > To do the right thing in a cross-compilation context (for example, pick > the AArch64 =E2=80=98python3=E2=80=99 binary if you=E2=80=99re cross-comp= iling to AArch64), it > should be written like this: > > (lambda* (#:key inputs #:allow-other-keys) > (substitute* =E2=80=A6 > (=E2=80=A6 =E2=80=A6 (search-input-file inputs "/bin/python3")))) Done. >> + (synopsis "NX remote desktop library") >> + (description >> + "NX technology also known as NX or NoMachine is a protocol that en= ables >> +remote desktop access. It's maintained by the artica project, x2go >> +developers and TheQVD.") > > Please describe that the package does; who maintains it is usually not > relevant here: > > https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Description= s.html Done. Here's the full diff from my changes from v1: --8<---------------cut here---------------start------------->8--- modified gnu/local.mk @@ -487,6 +487,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/packages/ntp.scm \ %D%/packages/nutrition.scm \ %D%/packages/nvi.scm \ + %D%/packages/nx.scm \ %D%/packages/ocaml.scm \ %D%/packages/ocr.scm \ %D%/packages/openkinect.scm \ modified gnu/packages/nx.scm @@ -1,4 +1,6 @@ ;;; This file is part of GNU Guix. +;;; Copyright =C2=A9 2024 Nicolas Debonnaire +;;; Copyright =C2=A9 2024 Maxim Cournoyer ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by @@ -14,13 +16,14 @@ ;;; along with GNU Guix. If not, see . =20 (define-module (gnu packages nx) - #:use-module (guix build utils) #:use-module (guix build-system gnu) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (gnu packages autotools) + #:use-module (gnu packages base) #:use-module (gnu packages commencement) #:use-module (gnu packages cups) #:use-module (gnu packages glib) @@ -54,95 +57,104 @@ (define-public nx-libs (base32 "0ykbza39ksycpyydaiwwbp7hkmdk96v7b36pn989k39lhfwnn8kz")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ;; no tests in this project - #:phases (modify-phases %standard-phases - (delete 'configure) - (add-before 'build 'replace-shebang-nxdialog - (lambda _ - (substitute* "nxdialog/bin/nxdialog" - (("#!/usr/bin/env python") - (string-append "#!" - (which "python3")))))) - (add-before 'build 'fix-makefile - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (etc (string-append out "/etc"))) - (mkdir-p etc) - (substitute* "Makefile" - (("^gzip -f") "gzip -f -n") ;; reproducible build - (("/usr/local") - out) - (("/etc/nxagent") - etc) - (("./configure") - (string-append "CONFIG_SHELL=3D" - (which "sh") - " SHELL=3D" - (which "sh") - " " - (which "sh") - " ./configure"))) - (substitute* '("nx-X11/config/cf/site.def") - (("#include ") - (string-append "#include " "\n" - "#define BourneShell " - (which "sh"))) - (("/usr/local") - out)) - ;; Workaround the following error during the build - ;; process: invalid input: ("_" #) - (substitute* '("nx-X11/Makefile") - (("which") - "echo")) - #t))) - (replace 'build - (lambda _ - (invoke "make" "IMAKE_DEFINES=3D\"-DUseTIRPC=3D1\"")= #t)) - (add-before 'validate-runpath 'link-libraries - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib")) - (lib-nx-x11 (string-append lib "/nx/X11"))) - ;; TODO: Should I use symlink instead of install-f= ile ? - (for-each (lambda (file) - (install-file file lib-nx-x11)) - (list (string-append lib "/libXcomp.so.3= ") - (string-append lib - "/libXcompshad.so.3= ") - (string-append lib "/libNX_X11.so.= 6"))) - #t)))))) - (inputs (list perl - python - python-pygobject - gtk+)) - (native-inputs (list autoconf - automake - libtool - pkg-config - libpng - libjpeg-turbo - xkbcomp - libxfont - libxdamage - libxrandr - libxtst - libxext - libxcomposite - libxinerama - libxpm - libxml2 - font-util - pixman - gccmakedep - imake - quilt - libtirpc - gcc-toolchain)) - (synopsis "NX remote desktop library") - (description - "NX technology also known as NX or NoMachine is a protocol that enabl= es -remote desktop access. It's maintained by the artica project, x2go -developers and TheQVD.") + (list + #:tests? #f ;no test suite + ;; The build randomly fails when run in parallel (see: + ;; https://github.com/ArcticaProject/nx-libs/issues/1072). + #:parallel-build? #f + #:make-flags #~(let ((sh (search-input-file %build-inputs "bin/sh"))) + (list (string-append "PREFIX=3D" #$output) + (string-append "ETCDIR_NX=3D" #$output "/etc") + (string-append "LOCAL_LDFLAGS=3D-Wl," + "-rpath=3D" #$output "/lib," + "-rpath=3D" #$output "/lib/nx/= X11") + (string-append "IMAKE_DEFINES=3D-DUseTIRPC=3D= 1" + " -DBourneShell=3D" sh + " -DProjectRoot=3D" #$output + " -DDefaultUserPath=3D" + #$output "/bin") + (string-append "CONFIG_SHELL=3D" sh) + (string-append "SHELL=3D" sh) + ;; Autoreconf being run by Make, the generated + ;; configure script shebangs thus haven't been + ;; patched; workaround this by running explic= itly + ;; via the shell. + (string-append "CONFIGURE=3D" sh " ./configur= e " + "--prefix=3D" #$output) + "VERBOSE=3D1")) + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'adjust-Makefile + (lambda _ + ;; It's best to source a script via its absolute pa= th, + ;; otherwise it's looked from PATH and fails for PO= SIX + ;; shells, such as our Bash-provided 'sh' (see: + ;; https://github.com/ArcticaProject/nx-libs/issues= /1071). + (substitute* "Makefile" + (("\\. replace.sh") + ". ./replace.sh")))) + (add-after 'install 'wrap-nxdialog + (lambda* (#:key inputs #:allow-other-keys) + (wrap-program (string-append #$output "/bin/nxdialo= g") + `("GUIX_PYTHONPATH" =3D + (,(getenv "GUIX_PYTHONPATH"))) + ;; Ensure GObject Introspection typelibs are foun= d. + `("GI_TYPELIB_PATH" ":" =3D + (,(getenv "GI_TYPELIB_PATH"))))))))) + (native-inputs + (list autoconf + automake + font-util + gccmakedep + imake + libtool + perl + pkg-config + quilt + which)) + (inputs + (list gtk+ + libjpeg-turbo + libtirpc + libxcomposite + libxdamage + libxext + libxfont + libxinerama + libxml2 + libxpm + libxrandr + libxtst + pixman + python-pygobject + python-wrapper + xkbcomp)) + (propagated-inputs + (list libpng)) ;in Requires of nxcomp.pc + (synopsis "NX X11 protocol compression libraries") + (description "NX is a software suite which implements very efficient +compression of the X11 protocol. This increases performance when using X +applications over a network, especially a slow one. This package provides= the +following libraries: +@table @code +@item NX_X11 +NX's modified X Window System (X11) library +@item Xcomp +NX differential compression library for X11 +@item Xcompshad +Session shadowing library +@end table + +The following commands are also provided: + +@table @command +@item nxagent +Agent providing NX transport of X sessions +@item nxproxy +The NX proxy (client) binary +@item nxdialog +Helper script +@end table") (home-page "https://github.com/ArcticaProject/nx-libs") (license license:gpl2))) --8<---------------cut here---------------end--------------->8--- Changes summary: 1. Move most libraries to inputs. 2. Remove gcc-toolchain from native-inputs. 3. Use gexps / search-input-file instead of 'which' 4. Expound description 5. Wrap Python script with needed environment variables 6. Disable parallel build, which was randomly causing build failures 7. Use make flags instead of modifying the Makefile. I think that's about it! I'll push shortly. Thanks to Steve for the initial review, and for Ludo for providing extra tips. --=20 Thanks, Maxim