[PATCH] gnu: Add inxi.

  • Done
  • quality assurance status badge
Details
5 participants
  • Pierre Neidhardt
  • Oleg Pykhalov
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
  • Pierre Neidhardt
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
Merged with
P
P
Pierre Neidhardt wrote on 16 Apr 2018 14:38
(address . guix-patches@gnu.org)
20180416123830.28716-1-ambrevar@gmail.com
* gnu/packages/admin.scm (inxi): New variable.
---
gnu/packages/admin.scm | 92 +++++++++++++++++++++++++++-
gnu/packages/patches/inxi-path.patch | 13 ++++
2 files changed, 104 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/inxi-path.patch

Toggle diff (135 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 6a7bed389..811e3d4cf 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -67,6 +67,7 @@
#:use-module (gnu packages gnupg)
#:use-module (gnu packages bison)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages openldap)
#:use-module (gnu packages mcrypt)
@@ -90,7 +91,10 @@
#:use-module (gnu packages gnome)
#:use-module (gnu packages kerberos)
#:use-module (gnu packages gtk)
- #:use-module (gnu packages xml))
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages curl)
+ #:use-module (gnu packages file)
+ #:use-module (gnu packages web))
(define-public aide
(package
@@ -2505,3 +2509,89 @@ printed instead of after the entire file has been read, which is often too
late.")
(home-page "https://jwilk.net/software/hungrycat")
(license license:expat)))
+
+(define-public inxi-minimal
+ (let ((version "3.0.04-1")
+ (real-name "inxi"))
+ (package
+ (name "inxi-minimal")
+ (version version)
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/smxi/inxi"
+ "/archive/" version "/inxi.tar.gz"))
+ (file-name (string-append real-name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "14zxdsjgh9dbijmpp0hhvg2yiqqfwnqgcc6x8dpl1v15z1h1r7pc"))))
+ (build-system trivial-build-system)
+ (inputs
+ `(("perl" ,perl)))
+ (native-inputs `(("tar" ,tar)
+ ("gzip" ,gzip)))
+ (arguments
+ `(#:modules
+ ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (setenv "PATH" (string-append
+ (assoc-ref %build-inputs "tar") "/bin" ":"
+ (assoc-ref %build-inputs "gzip") "/bin"))
+ (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
+ (with-directory-excursion ,(string-append real-name "-" version)
+ (with-fluids ((%default-port-encoding #f))
+ (substitute* "inxi"
+ (("/usr/bin/env perl")
+ (string-append (assoc-ref %build-inputs "perl") "/bin/perl"))))
+ (install-file "inxi" (string-append %output "/bin"))
+ (system* "gzip" "inxi.1")
+ (install-file "inxi.1.gz"
+ (string-append %output "/share/doc/man/man1")))
+ #t)))
+ (home-page "https://smxi.org/docs/inxi.htm")
+ (synopsis "Script to get system information")
+ (description
+ "This package provides a script to get system information.")
+ (license license:gpl3+))))
+
+(define-public inxi
+ ;; Use `inxi --recommends` for a check list of all the external programs
+ ;; it can use.
+ ;; TODO: Include additional inputs once their corresponding packages is no
+ ;; longer missing: hddtemp, dig (from dnsutils), perl-xml-dumper. ipmitool
+ ;; and ipmi-sensors.
+ (package
+ (inherit inxi-minimal)
+ (name "inxi")
+ (propagated-inputs
+ `(("coreutils" ,coreutils) ; uptime
+ ("curl" ,curl) ; only if dig is missing.
+ ("dmidecode" ,dmidecode)
+ ;; ("fdisk" ,fdisk) ; only as fallback, but not sure for what
+ ("file" ,file)
+ ("gzip" ,gzip)
+ ("iproute2" ,iproute) ; ip
+ ("kmod" ,kmod) ; modinfo
+ ("lm-sensors" ,lm-sensors)
+ ("mesa-utils" ,mesa-utils)
+ ("pciutils" ,pciutils)
+ ("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
+ ("perl-http-tiny" ,perl-http-tiny)
+ ("perl-io-socket-ssl" ,perl-io-socket-ssl)
+ ("perl-json-xs" ,perl-json-xs)
+ ("perl-time-hires" ,perl-time-hires)
+ ("procps" ,procps)
+ ("tar" ,tar)
+ ("tree" ,tree)
+ ("util-linux" ,util-linux) ; lsblk, lsusb, etc.
+ ;; ("wget" ,wget) ; only if dig and curl are missing.
+ ("wmctrl" ,wmctrl)
+ ("xdpyinfo" ,xdpyinfo)
+ ("xprop" ,xprop)
+ ("xrandr" ,xrandr)))
+ (synopsis "Script to get system information")
+ (description
+ "This package provides a script to get system information.")
+ (license license:gpl3+)))
diff --git a/gnu/packages/patches/inxi-path.patch b/gnu/packages/patches/inxi-path.patch
new file mode 100644
index 000000000..3f0d846bd
--- /dev/null
+++ b/gnu/packages/patches/inxi-path.patch
@@ -0,0 +1,13 @@
+Use dynamic PATH.
+
+--- a/inxi
++++ b/inxi
+@@ -75,5 +75,5 @@ my ($b_sysctl_disk,$b_update,$b_weather) = (1,1,1);
+ ## System
+ my ($bsd_type,$language,$os) = ('','','');
+ my ($cpu_sleep,$dl_timeout,$limit,$ps_count,$usb_level) = (0.35,4,10,5,0);
+-my @paths = qw(/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin /usr/X11R6/bin);
++my @paths = split /:/, $ENV{'PATH'};
+ my $sensors_cpu_nu = 0;
+
+ ## Tools
--
2.17.0
L
L
Ludovic Courtès wrote on 22 Apr 2018 23:42
(name . Pierre Neidhardt)(address . ambrevar@gmail.com)
87r2n6gbpg.fsf@gnu.org
Hello Pierre & Oleg,

Pierre Neidhardt <ambrevar@gmail.com> skribis:

Toggle quote (2 lines)
> * gnu/packages/admin.scm (inxi): New variable.

Could you compare what the two of you submitted at pretty much the same
time? :-)


Thanks,
Ludo’.
P
P
Pierre Neidhardt wrote on 23 Apr 2018 06:33
(name . Ludovic Courtès)(address . ludo@gnu.org)
87sh7mr17w.fsf@gmail.com
I didn't know Oleg was going to submit a patch, maybe there was some
confusion in the process :p

I've quickly reviewed our two patches. Overall I'd opt for mine :p

- It's the latest version.
- It has more inputs.

I think we should use propagated-inputs and not native-inputs. What do
you think?

I'd opt for Oleg's description however!

One thing I forgot is to add a comment about why I've used

(with-fluids ((%default-port-encoding #f))

It's because the `inxi` file contains some weird character. It was
mentioned before on the mailing list.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrdYhMACgkQm9z0l6S7
zH/kLgf+MBwv5a1DtkFf9qZLr1OUdFIju+NXe5IkluOvdm/E0tMwiFYoddfunQ7N
2PR5LWOnUywzkz0RSbafcyX1eLGT11fZ/A6z+BlpysfhtisErGcoDQgGoDJ59lPZ
BcezH3uZkUxQvEVmxNovkvDjobKdXiVECPFdVGxsIwRkYJmxXzvlyesBB93ouL4d
JWNCJsu3vUOTR/GfatgKeRIlvSzU9q1S6O1VLzgh5cAuPOpRdcVa0PHr1PohjwmY
aqJFgnOfP/kjdWoxeU89IeJB9/eIPGTdJYJ84mPh37V6LSQfCmr7yid1iQOEX5Mv
oN8ejjyT4mFkqQ18nklL2VP0r6n9jQ==
=Wtmn
-----END PGP SIGNATURE-----

O
O
Oleg Pykhalov wrote on 23 Apr 2018 07:23
(name . Pierre Neidhardt)(address . ambrevar@gmail.com)
87in8ifqdc.fsf@gmail.com
Hello Pierre and Ludovic,

Pierre Neidhardt <ambrevar@gmail.com> writes:

Toggle quote (3 lines)
> I didn't know Oleg was going to submit a patch, maybe there was some
> confusion in the process :p

I've mentioned it in our mailing list discussion, see

Nevertheless thank you for a 31178! :-)

Toggle quote (5 lines)
> I've quickly reviewed our two patches. Overall I'd opt for mine :p
>
> - It's the latest version.
> - It has more inputs.

I thought that we stuck with an ‘inxi’ Perl script version (31178) and
there was no patch until I pushed one. It's better to get 31178 version
than 31176 ofcourse because of ‘inxi’ version.

But I don't like all those ‘propagated-inputs’ except ‘perl-*’ and I
guess we could do better. Maybe we could use PATH for non ‘perl-*’
inputs the same way as in 31176. WDYT?

Toggle quote (3 lines)
> I think we should use propagated-inputs and not native-inputs. What do
> you think?

I'm not sure about 31178 currently. Usually we prefer to avoid
‘propagated-inputs’ if possible in Guix, because all ‘propagated-inputs’
will be in a Guix profile and could lead to collisions.

If you are talking about 31176, then no, because I've used a wrapper to
find all ‘inxi-minimal’ or ‘inxi’ requisites. It was easy to do,
because ‘inxi’ in 31176 is a Shell script, not a Perl script. Thanks to
Chris Marusich for an idea.

[…]


Oleg.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlrdbb8ACgkQckbhHGm3
lWkaBA/8CdSr9ABsskakoLnL1cW56Rhd8AsJhZfBoYBn3gUvGnR7y+vf3zafl8E5
etlD2gpq3yI3qxtH5yBUmhaXkUH6C5A48cwcuK1VXsP5nxGMuxvMTUI/TR+WshUj
3c4tAEwhmu66TJg2mf7dFyUdmOASTVvr759602dyOZfTEzyHVN5mxzoWEn9zjLZj
Y+Gd3x/O60gYuYVPBFruN6icQb3V66Ml2Jt91Rlzf9/kJzAUOjq3deUk8isV48mL
lOZ6e/YyXE27vaAIsjg10f2ozouoERpEVQJce+UDLBkmhJesm/4igZzAVXdahSIV
kIM3cDLRmLKcNUfYunqIrKEa0AToaURGfRXjHS1L6V6kDTY0NfTL1V3ZyMu1WRA7
yhQav5TjBGjezA5PKfytBQDPkqyzy1hPLuukj2S0qPQR1XZmsXRFGedsFtpmXN1b
l8VdAR/qdXmGxrWNqmbA03t1yaw/QY2VcI8WMse3enJMRCykYj6O+GIEXW8LOMpM
I2e7yKBCTxfOTb/EfqhF9XURsZvhBVl1dVv8CU8A/5Bq2mhdN7qViCYZMSoBkm9b
FoxgHWy8mM+QKH5dEL1X7QFX8+BnqXtNyDNpHG4MdS5JFF7+gs4jYOQgQrlIGgCq
c/FWXujvkPyNczv8VjNfhoDv28QDZxoxPoCBQhQ0eGXPe5WnEFQ=
=Sfaq
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 23 Apr 2018 07:34
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)
87r2n6qydr.fsf@gmail.com
Oleg Pykhalov <go.wigust@gmail.com> writes:

Toggle quote (6 lines)
>> I didn't know Oleg was going to submit a patch, maybe there was some
>> confusion in the process :p
>
> I've mentioned it in our mailing list discussion, see
> https://lists.gnu.org/archive/html/help-guix/2018-04/msg00130.html

Sorry, I had completely missed the last line :)

Toggle quote (5 lines)
> If you are talking about 31176, then no, because I've used a wrapper to
> find all ‘inxi-minimal’ or ‘inxi’ requisites. It was easy to do,
> because ‘inxi’ in 31176 is a Shell script, not a Perl script. Thanks to
> Chris Marusich for an idea.

I think we can do the same thing for the Perl version. You want to give
it a try?

If I understand correctly, relying on native-inputs would mean that if the user
runs `guix gc`, then all of inxi "optional" dependencies would go.
Is this correct?

--
Pierre Neidhardt

Computers are unreliable, but humans are even more unreliable.
Any system which depends on human reliability is unreliable.
-- Gilb
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrdcHAACgkQm9z0l6S7
zH8V0wgApQN2d+bZ+YIzaWuYtoq2IJ9V5FEXZ/Syi1ukTGCUSOAAjVd7P4UU432v
06CnYNUGWYBmwfnV8GEuBlE4V76j/omMxzZmWfUZA/gzCZOHnh0NwjTQvSMvPT60
KUBv4CUdpXnM5m2pyHgBz3eIX68yisfXEF7lDYxLpSumEkRhjK7YHTVRmgqlK8ey
+dsDYhnizi5sKONU8SsgPZ9gNc+Zlh5cxjTNcWuyDPG0bOUvOXtAf5AmXx1jNlk2
nWHT/arq5FOYR1QuyP1FHpgROILqDY6ZnC6PsYsIM5K/lGY0jGxcniL3wH/vZSV5
4IKTLFATtMtQ0bvTf9l/9fnBKaWKKQ==
=lKNZ
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 28 Apr 2018 23:26
control message for bug #31176
(address . control@debbugs.gnu.org)
87tvrv81ku.fsf@gnu.org
merge 31176 31178
L
L
Ludovic Courtès wrote on 28 Apr 2018 23:27
Re: [bug#31178] [PATCH] gnu: Add inxi.
(name . Pierre Neidhardt)(address . ambrevar@gmail.com)
87po2j81jn.fsf@gnu.org
Oleg, could you take care of this patch? (See Pierre’s comments below.)

Pierre Neidhardt <ambrevar@gmail.com> skribis:

Toggle quote (21 lines)
> Oleg Pykhalov <go.wigust@gmail.com> writes:
>
>>> I didn't know Oleg was going to submit a patch, maybe there was some
>>> confusion in the process :p
>>
>> I've mentioned it in our mailing list discussion, see
>> https://lists.gnu.org/archive/html/help-guix/2018-04/msg00130.html
>
> Sorry, I had completely missed the last line :)
>
>> If you are talking about 31176, then no, because I've used a wrapper to
>> find all ‘inxi-minimal’ or ‘inxi’ requisites. It was easy to do,
>> because ‘inxi’ in 31176 is a Shell script, not a Perl script. Thanks to
>> Chris Marusich for an idea.
>
> I think we can do the same thing for the Perl version. You want to give
> it a try?
>
> If I understand correctly, relying on native-inputs would mean that if the user
> runs `guix gc`, then all of inxi "optional" dependencies would go.
> Is this correct?
O
O
Oleg Pykhalov wrote on 29 Apr 2018 19:38
(name . Ludovic Courtès)(address . ludo@gnu.org)
8736zd7w0s.fsf@gmail.com
Hello,

ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (2 lines)
> Oleg, could you take care of this patch?

[…]

Sure I will try because I want ‘inxi’ to be in Guix package collection,
too. But I don't want to give a promise because I'm not much familiar
with a Perl, so it will require some time for me. I don't like current
implementation of the latest version of ‘inxi’ package recipe in 31178.
If I'm only one thinking like that and it's good enough for a push to
‘origin/master’, feel free to say me about this or push it.

Oleg.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlrmAyMACgkQckbhHGm3
lWmOzQ/7BKy5BFIbIoOLOiZO+TRhOLZgv2oFiMM+lce/pXgpwgtFdZiUH4eInTbP
Xdmc+4AnyVLx1Zhdb7ZviSPL/N1cDDFJV9xA6TcUm+NjBm3c4p6eRzuzgMbse2Ls
txnGVDeKXZzKp8kegV7xz0R3YMOkeP4bgtgHA7Nm8RfJygWkBG7m98aWMLkDPbUo
gd7OGTeOv7YtFgYy80UrTBukdNm0TwFwxOGon6Btuk2LlSBE2+XOmZ+H+nDM7Fol
Tq2lcQXn50dKrWyjT3HwGmZkZfk9jcSdE6b5nO1ZfxPTiqyHIfE1O8sxLJPA+bVM
pPl5nnAn92V7D2idvhJZiGVU5ZvTKzvL7tidZUqEU64Vd/IvnTUKBW+IBGC6DFwm
WDGd5uGiC38/bg7YI7NDJ7SFa5K5yFiJxHNEYpuBC3U/6cGp1/+wzrEN0N0w7jZJ
nvTpozgaaF20WA0TVsiHQvbCLfHtqUWUcylUtfWZ+l/oIgAi8RYsiW4ZLRtwrDYC
2YxvBSQVV2l1yDfNdEZOgFC0AuXB/Nsmy3SsSvMLhdBpLmvgQK8lcEUp/p9KFrCm
2yGCX6wZ+yJggxxsHC0Eh9XCUh65esrhVHl/cAAsrCZjKLKIREcgkNg7aOHhRSwq
r365mYtwxRZADlRyUWxSf1vVEP0osKmUPQEQ12H7nyTH4Ob4UrY=
=IPw8
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 30 Apr 2018 12:07
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)
877eop0zzn.fsf@gnu.org
Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

Toggle quote (13 lines)
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Oleg, could you take care of this patch?
>
> […]
>
> Sure I will try because I want ‘inxi’ to be in Guix package collection,
> too. But I don't want to give a promise because I'm not much familiar
> with a Perl, so it will require some time for me. I don't like current
> implementation of the latest version of ‘inxi’ package recipe in 31178.
> If I'm only one thinking like that and it's good enough for a push to
> ‘origin/master’, feel free to say me about this or push it.

I really trust you to make the right decision. The only reason I’m
pinging you is so these patches don’t get lost; they look simple enough
that it shouldn’t take months to apply them. :-)

Ludo’.
P
P
Pierre Neidhardt wrote on 30 Apr 2018 14:31
(name . Ludovic Courtès)(address . ludo@gnu.org)
87sh7c7u4w.fsf@gmail.com
Oleg, if I understood correctly, your concern was about inputs.
To re-quote myself:

Toggle quote (4 lines)
> If I understand correctly, relying on native-inputs would mean that if the user
> runs `guix gc`, then all of inxi "optional" dependencies would go.
> Is this correct?

What's your take on inputs then? If there is anything else, please go
ahead, I can try to address those issues.

I don't have deep knowledge of Perl either so there might be some more
issues I haven't noticed yet. But I think those can easily be patched
in the future when we have more user feedback.

I think it's better to have a package that behaves well in the general
case than not having a package at all.

--
Pierre Neidhardt

The solution of problems is the most characteristic and peculiar sort
of voluntary thinking.
-- William James
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrnDK8ACgkQm9z0l6S7
zH+EQAgAk9J1GYiKUDOML5UTU7mqxqqhk3sZDn4fGi1yAuRF/GgMOACpHR5pgf8M
eVMRc632TVv13MHRtH0r/9I/TgGWYpFTsORcLnzzKJ1LCa5vnKxTCxA3lO+la0os
duNXw6hJF0Xr9QnqH47g+yQdXXXtU8gPTelS8hrO2HgKruK3j8EsRNmLvX9fq31s
0wtEmRAZGDOcBek0bEnWA10gjyDCZFCvdpWf3VMdvLIgm/bo6Ch/1SnFbmbixIpH
Yhq8ZKW0LLrIOk1YzaIz6eWQM8vUPdcui9sciwFbX/znI4oWUJSa3zovycThwVyz
/d4uim8U1CFOfu9p0ZESMVkpCQMBLw==
=9Mvx
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 30 Apr 2018 15:17
6bfd106694d22b12df90b408482e9798@debbugs.gnu.org
Pierre,

Thanks for your work so far! Discussions about inputs (bah,
propagation's evil) and who'll write what aside:

On 2018-04-16 14:38, Pierre Neidhardt wrote:
Toggle quote (6 lines)
> + ;; TODO: Include additional inputs once their corresponding packages
> is no
> + ;; longer missing: hddtemp, dig (from dnsutils), perl-xml-dumper.
> ipmitool
> + ;; and ipmi-sensors.

The only canonical ‘dig’ that I know & love comes from the BIND project,
as installed by ‘bind:utils’.
Does inxi explicitly require this ‘dnsutils’ version? Is it a fork?
Patched? Separate implementation?

I think I have a ‘hddtemp’ package banging about somewhere.

Toggle quote (5 lines)
> + ("curl" ,curl) ; only if dig is missing.
> [...]
> + ;; ("wget" ,wget) ; only if dig and curl are
> missing.

Curl's closure is bigger than that of wget (~210 MiB vs. ~127 MiB), but
it's probably smaller than wget+bind.
Would curl alone cover all uses of wget+bind in the script? (‘I can't be
bothered to dig through it’ is an acceptable answer.)

Kind regards,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.
O
O
Oleg Pykhalov wrote on 30 Apr 2018 21:18
(name . Pierre Neidhardt)(address . ambrevar@gmail.com)
874ljstsei.fsf@gmail.com
Hello Pierre,

Pierre Neidhardt <ambrevar@gmail.com> writes:

Toggle quote (7 lines)
> Oleg, if I understood correctly, your concern was about inputs.
> To re-quote myself:
>
>> If I understand correctly, relying on native-inputs would mean that if the user
>> runs `guix gc`, then all of inxi "optional" dependencies would go.
>> Is this correct?

All “references” should survive ‘guix gc’:
Toggle snippet (3 lines)
guix gc --references $(env GUIX_PACKAGE_PATH= guix build --no-grafts inxi)

Toggle quote (3 lines)
> What's your take on inputs then? If there is anything else, please go
> ahead, I can try to address those issues.

OK, here is a new recipe, which works even in a container (unlike old
‘inxi’ which is a Shell script and not Perl).

Toggle snippet (3 lines)
~/src/guix/pre-inst-env env GUIX_PACKAGE_PATH= guix environment --no-grafts --container --ad-hoc inxi

I've succeeded to test it by invoking ‘inxi’ and ‘inxi --full’, but
please test it more for your use cases.
[…]

Toggle quote (3 lines)
> I think it's better to have a package that behaves well in the general
> case than not having a package at all.

I agree. We have an old ‘inxi’ (Shell script version), which should not
produce collisions because of unnecessary ‘propagated-inputs’.

Oleg.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlrna/UACgkQckbhHGm3
lWmdExAAu6uyv+wcBAJ7HKWUl97xT1a1k8dF2Y9OfslckSYFeTEs4ZsZ9Kke3fld
dM0FxCK8rMQkNc2agtbakEoq1rH3lCB+VMdDCnN9pX1xyUrnZRGkEnlsLuZCuvAS
IKah2r56O1r5cugsOI9/diWFVFZEUWwaGyldf5tQtxSx8WJA0kHgdqs5Owu5tcj6
sbtPqYJhgKyomZY+7kDo0BjJFoyu3pbFbGbPnGrVwWQWmF8D5Zk1VhkWm3gU5KP+
SmNiKn5JD4Qw1arUS+rOUO5lvp5ZvwBMj2Lzwxr4oyKTLbg0OKsb5zudx/fmyGAh
eMERxQOa1Z2NZrTMqM+SZz01Rb9xMz/XBlo6FFgiUk7xti7ERckadcfu4sm6YgPH
598lThViRULCaznnb9ZUXwI8575On+S4LdQ2cnNkJ9Y95o6mmPzBRV8yRVJmE4E5
XIl9pc4+fvKLL1ppR+t1bax0kZFX0eWl+oMYXMlcR/03chn34JN3ZOCC1seo9cj0
P+aqt+L4Vg/jb2eAtn6ZrL4q64zXpijd+3ZcOOR+mEz8PT9U6giKZ1HlcRHJN2/f
ydXJ5s2nWAq7HnMTl9cp50oMHexQC9flFr78hD0YQfuFFlrrUryLhYw4fzH7T9MF
Dh3tGbUI8UQkLTsuz+tTnfeNtSSv+18gkxPJXpUDrr7k6NH3msU=
=hNCP
-----END PGP SIGNATURE-----

O
O
Oleg Pykhalov wrote on 1 May 2018 09:27
Re: [bug#31176] [bug#31178] [PATCH] gnu: Add inxi.
(name . Pierre Neidhardt)(address . ambrevar@gmail.com)
87efivrg20.fsf@gmail.com
Some notes to fix myself about the latest patch.

Oleg Pykhalov <go.wigust@gmail.com> writes:

[…]

Toggle quote (7 lines)
> From 49afb43e03b1de34741c0812cc45fe48c06c404b Mon Sep 17 00:00:00 2001
> From: Pierre Neidhardt <ambrevar@gmail.com>
> Date: Mon, 16 Apr 2018 18:08:30 +0530
> Subject: [PATCH] gnu: Add inxi.
>
> * gnu/packages/admin.scm (inxi): New variable.

I forgot about mentioning a patch in ‘gnu/local.mk’.

[…]

Toggle quote (4 lines)
> +(define-public inxi-minimal
> + (let ((version "3.0.04-1")
> + (real-name "inxi"))

‘let version’ is not necessary. We could use ‘,version’ in ‘arguments’..

[…]

Oleg.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlroFvcACgkQckbhHGm3
lWkN4g/7BPrsLrkXGrv3YrnievsVTld6q/xKaqUqSIuJwsFbpzAa4DkO1yGty/TV
mp6CM5yGVTdL4ebNKrVZlqyHOkNxNNcSxtj4kbWkOY4a7vCeS/fCzpnimXPcCm2t
+y7VtFoschF6DPkySqwuTLEeTxwpdacNr0dSOX/6Czp1c2ZXl4t2bBPT6kqg779Q
KdCKyxZwkZ9um6jkR+gTTEUO/WUQMafYLZ18Vu8JbltRAabpF+ENla0mQiCiWwya
RIvqfUI0ceTaABqkfCqX7BXeuRPCE/PgR8rs/hx8AbmTABW5V8ILZnTZQs0VpGE8
4XecbF38YmufCJZ4CGKMFTlbJStfREXWxwrjfRPgxfZom+Hxh3joYKdEW1fPPU9E
onQHMWZuaTmDjH8/eN8Ak3XUVxvwpeAkPSYXqGfdl9VmKSpskiaSwD9Wd5MvF0D2
RRtmBBEPdkZ4tsxAw3fxS4GgSFRYXEXj/Vd+bzH3q1+VRSiB+IkfKm6GaHwNEiwX
p8oMSGg7bJoBkiYeSxbERW9oMa5C7WJlLE8cBPm/XHkHL1EwDgU5ZlKiXV4neTqd
8YDhMZewerekcJzFyv+gHH+EHTvTPDibWqronLSUAl79AXuygg9Actp7t8Eydw+h
5A3J6qy343m3h+gzxVcJ2a9MGSKaqWkD0I085ze040RX3nZiHVc=
=N8aj
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 6 May 2018 11:42
Re: [bug#31178] [PATCH] gnu: Add inxi.
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)
87vac1ce7v.fsf@gmail.com
Oleg Pykhalov <go.wigust@gmail.com> writes:

Toggle quote (9 lines)
>>> If I understand correctly, relying on native-inputs would mean that if the user
>>> runs `guix gc`, then all of inxi "optional" dependencies would go.
>>> Is this correct?
>
> All “references” should survive ‘guix gc’:
> --8<---------------cut here---------------start------------->8---
> guix gc --references $(env GUIX_PACKAGE_PATH= guix build --no-grafts inxi)
> --8<---------------cut here---------------end--------------->8---

OK, so if I understand correctly, only native-inputs get
garbage-collected, right?

Unless I've missed something in the manual, those details should be
better documented in my opinion.

Toggle quote (3 lines)
> I've succeeded to test it by invoking ‘inxi’ and ‘inxi --full’, but
> please test it more for your use cases.

I've tested with `inxi --recommends` and everything looks OK.

See comments on patch below:

Toggle quote (113 lines)
> From 49afb43e03b1de34741c0812cc45fe48c06c404b Mon Sep 17 00:00:00 2001
> From: Pierre Neidhardt <ambrevar@gmail.com>
> Date: Mon, 16 Apr 2018 18:08:30 +0530
> Subject: [PATCH] gnu: Add inxi.
>
> * gnu/packages/admin.scm (inxi): New variable.
> ---
> gnu/packages/admin.scm | 115 +++++++++++++++++-
> .../patches/inxi-minimal-fix-syntax.patch | 18 +++
> 2 files changed, 132 insertions(+), 1 deletion(-)
> create mode 100644 gnu/packages/patches/inxi-minimal-fix-syntax.patch
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 5e2cf2d7a..7081f7f08 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -50,8 +50,11 @@
> #:use-module (guix build-system trivial)
> #:use-module (gnu packages)
> #:use-module (gnu packages base)
> + #:use-module (gnu packages bash)
> #:use-module (gnu packages check)
> #:use-module (gnu packages cyrus-sasl)
> + #:use-module (gnu packages dns)
> + #:use-module (gnu packages file)
> #:use-module (gnu packages ncurses)
> #:use-module (gnu packages readline)
> #:use-module (gnu packages linux)
> @@ -70,6 +73,7 @@
> #:use-module (gnu packages gnupg)
> #:use-module (gnu packages bison)
> #:use-module (gnu packages flex)
> + #:use-module (gnu packages gl)
> #:use-module (gnu packages glib)
> #:use-module (gnu packages openldap)
> #:use-module (gnu packages mcrypt)
> @@ -97,7 +101,8 @@
> #:use-module (gnu packages xml)
> #:use-module (gnu packages boost)
> #:use-module (gnu packages elf)
> - #:use-module (gnu packages mpi))
> + #:use-module (gnu packages mpi)
> + #:use-module (gnu packages web))
>
> (define-public aide
> (package
> @@ -2649,3 +2654,111 @@ Python loading in HPC environments.")
> ;; This package supports x86_64 and PowerPC64
> (supported-systems '("x86_64-linux"))
> (license license:lgpl2.1)))
> +
> +(define-public inxi-minimal
> + (let ((version "3.0.04-1")
> + (real-name "inxi"))
> + (package
> + (name "inxi-minimal")
> + (version version)
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/smxi/inxi"
> + "/archive/" version "/inxi.tar.gz"))
> + (file-name (string-append real-name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "14zxdsjgh9dbijmpp0hhvg2yiqqfwnqgcc6x8dpl1v15z1h1r7pc"))
> + (patches (search-patches "inxi-minimal-fix-syntax.patch"))))
> + (build-system trivial-build-system)
> + (inputs
> + `(("bash" ,bash)
> + ("perl" ,perl)))
> + (native-inputs
> + `(("gzip" ,gzip)
> + ("tar" ,tar)
> + ("xz" ,xz)))
> + (arguments
> + `(#:modules
> + ((guix build utils)
> + (ice-9 match)
> + (srfi srfi-26))
> + #:builder
> + (begin
> + (use-modules (guix build utils)
> + (ice-9 match)
> + (srfi srfi-26))
> + (setenv "PATH" (string-append
> + (assoc-ref %build-inputs "bash") "/bin" ":"
> + (assoc-ref %build-inputs "gzip") "/bin" ":"
> + (assoc-ref %build-inputs "perl") "/bin" ":"
> + (assoc-ref %build-inputs "tar") "/bin" ":"
> + (assoc-ref %build-inputs "xz") "/bin"))
> + (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
> + (with-directory-excursion ,(string-append real-name "-" version)
> + (substitute* "inxi" (("/usr/bin/env perl") (which "perl")))
> + (let ((bin (string-append %output "/bin")))
> + (install-file "inxi" bin)
> + (wrap-program (string-append bin "/inxi")
> + `("PATH" ":" =
> + ("$PATH"
> + ,@(map (lambda (input)
> + (string-append (match input
> + ((name . store) store))
> + "/bin"))
> + %build-inputs)))
> + `("PERL5LIB" ":" =
> + ,(delete
> + ""
> + (map (match-lambda
> + (((? (cut string-prefix? "perl-" <>) name) . dir)
> + (string-append dir "/lib/perl5/site_perl"))
> + (_ ""))
> + %build-inputs)))))

I'm not too familiar with Perl, so can you explain why you need to tweak
PERL5LIB?
Is it the same as PATH but for perl-cpanel-json-xs, etc.?
If so, why are the perl plugins propagated-inputs and not just inputs?

Toggle quote (10 lines)
> + (invoke "gzip" "inxi.1")
> + (install-file "inxi.1.gz"
> + (string-append %output "/share/doc/man/man1")))
> + #t)))
> + (home-page "https://smxi.org/docs/inxi.htm")
> + (synopsis "Full featured system information script")
> + (description "Inxi is a system information script that can display
> +various things about your hardware and software to users in an IRC chatroom or
> +support forum. It runs with the /exec command in most IRC clients. ")

Spurious trailing space.

Toggle quote (62 lines)
> + (license license:gpl3+))))
> +
> +(define-public inxi
> + (package
> + (inherit inxi-minimal)
> + (name "inxi")
> + (inputs
> + `(("dmidecode" ,dmidecode)
> + ("file" ,file)
> + ("bind:utils" ,isc-bind "utils") ; dig
> + ("gzip" ,gzip)
> + ("iproute2" ,iproute) ; ip
> + ("kmod" ,kmod) ; modinfo
> + ("lm-sensors" ,lm-sensors)
> + ("mesa-utils" ,mesa-utils)
> + ("pciutils" ,pciutils)
> + ("procps" ,procps)
> + ("tar" ,tar)
> + ("tree" ,tree)
> + ("util-linux" ,util-linux) ; lsblk, lsusb, etc.
> + ("wmctrl" ,wmctrl)
> + ("xdpyinfo" ,xdpyinfo)
> + ("xprop" ,xprop)
> + ("xrandr" ,xrandr)
> + ("coreutils" ,coreutils) ; uptime
> + ;; TODO: Add more inputs:
> + ;; ipmi-sensors
> + ;; hddtemp
> + ;; perl-xml-dumper
> + ;; ipmitool
> + ,@(package-inputs inxi-minimal)))
> + (propagated-inputs
> + `(("perl-cpanel-json-xs" ,perl-cpanel-json-xs)
> + ("perl-http-tiny" ,perl-http-tiny)
> + ("perl-io-socket-ssl" ,perl-io-socket-ssl)
> + ("perl-json-xs" ,perl-json-xs)
> + ("perl-time-hires" ,perl-time-hires)))))
> diff --git a/gnu/packages/patches/inxi-minimal-fix-syntax.patch b/gnu/packages/patches/inxi-minimal-fix-syntax.patch
> new file mode 100644
> index 000000000..ca5cde328
> --- /dev/null
> +++ b/gnu/packages/patches/inxi-minimal-fix-syntax.patch
> @@ -0,0 +1,18 @@
> +Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
> +
> +This patch fixes “Quantifier follows nothing in regex” error.
> +
> +--- a/inxi 2018-04-30 20:51:47.665352075 +0300
> ++++ b/inxi 2018-04-30 20:52:21.721804635 +0300
> +@@ -4602,11 +4602,6 @@
> + sub cleaner {
> + my ($item) = @_;
> + return $item if !$item;# handle cases where it was 0 or ''
> +- $item =~ s/chipset|components|computing|computer|corporation|communications|electronics|electrical|electric|gmbh|group|incorporation|industrial|international|nee|revision|semiconductor|software|technologies|technology|ltd\.|<ltd>|\bltd\b|inc\.|<inc>|\binc\b|intl\.|co\.|<co>|corp\.|<corp>|\(tm\)|\(r\)|®|\(rev ..\)|\'|\"|\sinc\s*$|\?//gi;
> +- $item =~ s/,|\*/ /g;
> +- $item =~ s/\s\s+/ /g;
> +- $item =~ s/^\s+|\s+$//g;
> +- return $item;
> + }
> +
> + sub dmi_cleaner {

I'm not sure I get the purpose of this patch. Unless we are talking
about a different error, I had initially fixed it with

(with-fluids ((%default-port-encoding #f))

so that the "®" in the above regexp would not get garbled during the
substitution.
Does your patch does something else / more?

--
Pierre Neidhardt

That's the true harbinger of spring, not crocuses or swallows
returning to Capistrano, but the sound of a bat on a ball.
-- Bill Veeck
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlruzgQACgkQm9z0l6S7
zH/G7Qf/Uq68vmAZNOX02IasKl8herG4tE6q2ykB95cEKu+nwV6wq9T4ANGbjxPA
brVP5JV/Jb3CCb/KuqLEuA+Vlwy7sMOVxAbNkR9Nq/VSf/deQvu66YELjtglMbm5
VREsV1aKtEowTnV1jfOvT9X8qkPmYjmKa4GdnbWso9/jOi00qICl38WnC4Mdvdyq
tIKHT0+jiabE/Qn0FhibzZzbXr/vjN++r16Sh1PuGXBZuLh0MvKGrX22O1kSjnJB
rFxtJY+qB3OMb5uEjIkCDkEyM6C4I1vtmRohsqvQmJ3bqBuaOWIr8gwhV9PS5KaS
LGhFqJ0yWCzSTF4SbVasBCO4C9EEXQ==
=pILp
-----END PGP SIGNATURE-----

O
O
Oleg Pykhalov wrote on 6 May 2018 15:31
(name . Pierre Neidhardt)(address . pe.neidhardt@googlemail.com)
87o9hs52sj.fsf@gmail.com
Hello Pierre,

Pierre Neidhardt <pe.neidhardt@googlemail.com> writes:

Toggle quote (14 lines)
> Oleg Pykhalov <go.wigust@gmail.com> writes:
>
>>>> If I understand correctly, relying on native-inputs would mean that if the user
>>>> runs `guix gc`, then all of inxi "optional" dependencies would go.
>>>> Is this correct?
>>
>> All “references” should survive ‘guix gc’:
>> --8<---------------cut here---------------start------------->8---
>> guix gc --references $(env GUIX_PACKAGE_PATH= guix build --no-grafts inxi)
>> --8<---------------cut here---------------end--------------->8---
>
> OK, so if I understand correctly, only native-inputs get
> garbage-collected, right?

Not quite, missing inputs (*not only* ‘(native-inputs …)’) in the output
of mentioned ‘guix gc’ command get garbage-collected.

Also a good test for missing run-time dependencies is a ‘guix
environment --no-grafts --container --ad-hoc PACKAGE’ command.

[…]

Toggle quote (19 lines)
> See comments on patch below:
>
>> From 49afb43e03b1de34741c0812cc45fe48c06c404b Mon Sep 17 00:00:00 2001
>> From: Pierre Neidhardt <ambrevar@gmail.com>
>> Date: Mon, 16 Apr 2018 18:08:30 +0530
>> Subject: [PATCH] gnu: Add inxi.
>>
>> * gnu/packages/admin.scm (inxi): New variable.
>> ---
>> gnu/packages/admin.scm | 115 +++++++++++++++++-
>> .../patches/inxi-minimal-fix-syntax.patch | 18 +++
>> 2 files changed, 132 insertions(+), 1 deletion(-)
>> create mode 100644 gnu/packages/patches/inxi-minimal-fix-syntax.patch
>>
>> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
>> index 5e2cf2d7a..7081f7f08 100644
>> --- a/gnu/packages/admin.scm
>> +++ b/gnu/packages/admin.scm

[…]

Toggle quote (21 lines)
>> + (wrap-program (string-append bin "/inxi")
>> + `("PATH" ":" =
>> + ("$PATH"
>> + ,@(map (lambda (input)
>> + (string-append (match input
>> + ((name . store) store))
>> + "/bin"))
>> + %build-inputs)))
>> + `("PERL5LIB" ":" =
>> + ,(delete
>> + ""
>> + (map (match-lambda
>> + (((? (cut string-prefix? "perl-" <>) name) . dir)
>> + (string-append dir "/lib/perl5/site_perl"))
>> + (_ ""))
>> + %build-inputs)))))
>
> I'm not too familiar with Perl, so can you explain why you need to tweak
> PERL5LIB?
> Is it the same as PATH but for perl-cpanel-json-xs, etc.?

I cannot say PERL5LIB is the same as PATH, because PATH is for
executables, but I could lie PERL5LIB is the same in ‘inxi’ case.
Because of ‘inxi’ is Perl program, it requires to find run-time
libraries with a help of PERL5LIB. As you could see ‘inxi --recommends’
will complain about missing Perl libraries without PERL5LIB.

Toggle quote (2 lines)
> If so, why are the perl plugins propagated-inputs and not just inputs?

Good catch. Yes, we could have Perl packages in ‘propagated-inputs’.

[…]

Toggle quote (6 lines)
>> + (description "Inxi is a system information script that can display
>> +various things about your hardware and software to users in an IRC chatroom or
>> +support forum. It runs with the /exec command in most IRC clients. ")
>
> Spurious trailing space.

Oh, thanks.

Hm, ‘guix lint’ was quite. Probably a possible place for improvements.

[…]

Toggle quote (36 lines)
>> diff --git a/gnu/packages/patches/inxi-minimal-fix-syntax.patch
>> b/gnu/packages/patches/inxi-minimal-fix-syntax.patch
>> new file mode 100644
>> index 000000000..ca5cde328
>> --- /dev/null
>> +++ b/gnu/packages/patches/inxi-minimal-fix-syntax.patch
>> @@ -0,0 +1,18 @@
>> +Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
>> +
>> +This patch fixes “Quantifier follows nothing in regex” error.
>> +
>> +--- a/inxi 2018-04-30 20:51:47.665352075 +0300
>> ++++ b/inxi 2018-04-30 20:52:21.721804635 +0300
>> +@@ -4602,11 +4602,6 @@
>> + sub cleaner {
>> + my ($item) = @_;
>> + return $item if !$item;# handle cases where it was 0 or ''
>> +- $item =~
>> s/chipset|components|computing|computer|corporation|communications|electronics|electrical|electric|gmbh|group|incorporation|industrial|international|nee|revision|semiconductor|software|technologies|technology|ltd\.|<ltd>|\bltd\b|inc\.|<inc>|\binc\b|intl\.|co\.|<co>|corp\.|<corp>|\(tm\)|\(r\)|®|\(rev
>> ..\)|\'|\"|\sinc\s*$|\?//gi;
>> +- $item =~ s/,|\*/ /g;
>> +- $item =~ s/\s\s+/ /g;
>> +- $item =~ s/^\s+|\s+$//g;
>> +- return $item;
>> + }
>> +
>> + sub dmi_cleaner {
>
> I'm not sure I get the purpose of this patch. Unless we are talking
> about a different error, I had initially fixed it with
>
> (with-fluids ((%default-port-encoding #f))
>
> so that the "®" in the above regexp would not get garbled during the
> substitution.

I believe I tried this ‘with-fluids’ tip, but not succeeded.

Well another attempt seems to work. Thank you for noticed this.

Toggle quote (2 lines)
> Does your patch does something else / more?

No, it doesn't.

Here is a new patch.
Oleg.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlrvA5wACgkQckbhHGm3
lWlOEw/+MSfKynvpzbpjpBhLDNRD/XciGj9Fai7Pl7NmKnwgLvaGhdcCfCZHi3LB
SSUhqz5Ls55Jt6+Lz9udj9mafAcFVYIboYcYaPg4VBeIiDZ3I3iFqBPac2KzjPjz
+aKOdt53qnutmUszSsoHBr5Zq3GpCJkxLST4uyf9jZtaKWFZFB6n40EPOnqCHPzo
RJLyg+zeIR4YS2Fol0Mb0cxSYSp3+q22D/yPngO5/mhGvc4k0YILSvofE51BKPd3
DSYkkHvQXcjhvTyxfO2A3oehl1lkGvJg0tRwZezkOGptf5FPulW1rODz9t0OyySc
N0OkcedZApEDtVff+ZBFYe7iw9AACkwBX21tk2/9mD5uvtmxUVkPEI5zf2NcOerX
E+dI0v2zNnfZNhiDkUiR9NVXPmQvM6pMBI3iEDlR8kYnulvvTW7CSBk0zYriv/lm
b4h0b1LdnzIhlE8Eo9n6MG09z7xgwWAovjsgHvC2WCY4vZbb5AealDkOpN+eAJ1p
9oXrqrgpW3QShtAQ5Y1c3oKCfgkFuEeu344X6R4POCNQofvfMg4BVaajtb80TejM
trjmsccs3a1leDW4TyVCDerGPTryB2o6IMd0Fma+4hN9JoJfkpKFBX7mZsVir3GM
rxIHkmERkvHCYu1NxXb/nH0po7PZlTgQyp2Pw6aHl/t6iNTgaI4=
=iNo5
-----END PGP SIGNATURE-----

P
P
Peter Neidhardt wrote on 7 May 2018 12:14
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)
87vabzai2z.fsf@gmail.com
Oleg Pykhalov <go.wigust@gmail.com> writes:

Toggle quote (6 lines)
>> OK, so if I understand correctly, only native-inputs get
>> garbage-collected, right?
>
> Not quite, missing inputs (*not only* ‘(native-inputs …)’) in the output
> of mentioned ‘guix gc’ command get garbage-collected.

So what are the rules for garbage collection then? I'm confused...
I don't see how _some_ inputs could get garbage collected and others not.


Toggle quote (4 lines)
>> If so, why are the perl plugins propagated-inputs and not just inputs?
>
> Good catch. Yes, we could have Perl packages in ‘propagated-inputs’.

You meant `inputs', right?

--
Peter Neidhardt

"Poor man... he was like an employee to me."
-- The police commissioner on "Sledge Hammer" laments the death of his
bodyguard
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrwJvQACgkQm9z0l6S7
zH+LkQf+LzMvF04Nvk0ai75uQnRRdHezJIeAzFM0gkx/3SNgrtpcxSNnQPKzX8z0
+UYG8+8kBq4+NWesGJ6LUrpgXaBId4yRYyw4SSQ4xou+UFY2jXAvqkEq+7SNFTAh
tqQqaeWwp6VnMwHBR7GOQut80w0Rv91/ggmfwrcrINUCs8wfOwgcuP1NaEO2jjqr
Fz7C43lk2t0+nGyQDqvyqiIjaCErz+jQ6NVIt4Y9q3QlrCCkovEM51dTD+uLz8qO
I6BIakQIzx/Rd6MsK3hi0uexbpuPJ/I9lsJo8pL4B3LgUk2t3qVXd2EvO1euERpG
cUGeiTFEEF/Ck2gwJl3H0rj4ezAY+A==
=lFWZ
-----END PGP SIGNATURE-----

O
O
Oleg Pykhalov wrote on 7 May 2018 17:29
(name . Peter Neidhardt)(address . pe.neidhardt@googlemail.com)
87fu3332ms.fsf@gmail.com
Hello Peter,

I've removed Ludovic from a Cc because I think it doesn't seem a good
thing to disturb him with following questions.

Peter Neidhardt <pe.neidhardt@googlemail.com> writes:

Toggle quote (11 lines)
> Oleg Pykhalov <go.wigust@gmail.com> writes:
>
>>> OK, so if I understand correctly, only native-inputs get
>>> garbage-collected, right?
>>
>> Not quite, missing inputs (*not only* ‘(native-inputs …)’) in the output
>> of mentioned ‘guix gc’ command get garbage-collected.
>
> So what are the rules for garbage collection then? I'm confused...
> I don't see how _some_ inputs could get garbage collected and others not.

When ‘guix gc --references PATH’ shows a ‘/gnu/store/…-INPUT’,
then ‘/gnu/store/…-INPUT’ *will not* be garbage collected.

For example:
Toggle snippet (7 lines)
$ guix gc --references $(env GUIX_PACKAGE_PATH= guix build --no-grafts inxi)
[…]
/gnu/store/…-file-5.32
[…]
/gnu/store/…-xrandr-1.5.0
/gnu/store/…-xprop-1.2.3
‘file’, ‘xrandr’ and ‘xprop’ packages *will not* be garbage collected.

Toggle quote (6 lines)
>>> If so, why are the perl plugins propagated-inputs and not just inputs?
>>
>> Good catch. Yes, we could have Perl packages in ‘propagated-inputs’.
>
> You meant `inputs', right?

Yes, apologies for a mistyping.

Oleg.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlrwcOsACgkQckbhHGm3
lWmTshAAvcmwEzTyXIxz66/HHm+Wr65khuhxveY4/Zy2aJaLeBAlfPof4RvhYDHa
ISrk6qzkMv5arh0Tspci8uKVMrweO1penKG5Vg19nxfHLgeCxORRJCmBZpF++I4p
bsg8Tja9ayjA7V5GcfkeKcND4Lx+tTY4RnaU/bWKvXYA5BpXeqU8Ol61nCUvn+oZ
QQsEX1t6zCu9X5OCLOf0wSse+i5FSXcihBbpO4UvG635cXcNKNIMX8ANtZynubKR
hg4/fvJyPHiJTY3jSujSszhbl0d4SS71V++VuUOqmlpqWcEE1mLFqRsPqQqCjKcw
t8jb3itqanmFiKxDuDJZd813+DYHJkieSiRy4FV4Jbx7TB8bpOSsStK1jGQ1vBVQ
RJR+0bimjG6XLDizvys9E4lW/v8qHamxsjf9l5tGAj7eCXTAHG+j+72yxWK2F3Va
Jhuqotsx8/XGdEojVvwMf4iKd5Cor7Ysh95aLyrB0HC4cv4Xw2CHgQ4AYy2vCBcY
W6CWMx6mb3bch587NNUip9tikM8sfo5Z74kmmawF4U/eIXjm+ZHrZPH3RMKCOH8I
SDg7EVo/cZtaznx5gjDeHscRA2WDleWBhiJDhZhuwGK9Y45UG8VP6PqTUgzMfnJf
NkA6aS4GPgCKskWm0Ojt+6YwIDtUI+YVG7u0rnnE75gBmPlKLEs=
=fPWN
-----END PGP SIGNATURE-----

P
P
Peter Neidhardt wrote on 7 May 2018 21:52
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)
87tvrj9rb9.fsf@gmail.com
Oleg Pykhalov <go.wigust@gmail.com> writes:

Toggle quote (17 lines)
>> So what are the rules for garbage collection then? I'm confused...
>> I don't see how _some_ inputs could get garbage collected and others not.
>
> When ‘guix gc --references PATH’ shows a ‘/gnu/store/…-INPUT’,
> then ‘/gnu/store/…-INPUT’ *will not* be garbage collected.
>
> For example:
> --8<---------------cut here---------------start------------->8---
> $ guix gc --references $(env GUIX_PACKAGE_PATH= guix build --no-grafts inxi)
> […]
> /gnu/store/…-file-5.32
> […]
> /gnu/store/…-xrandr-1.5.0
> /gnu/store/…-xprop-1.2.3
> --8<---------------cut here---------------end--------------->8---
> ‘file’, ‘xrandr’ and ‘xprop’ packages *will not* be garbage collected.

In understand that, my question was _why_ would some inputs get garbage
collected, and why not. My question is on from a logical perspective in
terms of functional package management.


Other than that, the patch looks good to me, feel free to merge! :)

--
Peter Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrwrnoACgkQm9z0l6S7
zH8RKQf+PplYm4UWpxfzVLVOxWDSra/ol/3Vaw4qxpwMtD/aA03paummGyrTF4Bj
4dRrSRXorukkBXIj9Ul/RvOq/zdtxpJpvZ7Y533quQb9oqZvrjL4nGz3/JNXOnLo
W3Yswh5S8DwxQJRae46/nFlnEtE3B5OmvVkUWjU8S91le/M4q6JwJulXK1amfUxz
kyvLjnH/qe/aX9csYkAwsqZqim1qgTm7fV9RCjYz+p1CK9QI+qvLVgjtmgN5OEOO
699DL61Onx7TgufufdQ9v8WixQSa7oSEa1kEq8n6lhaNJzArFmFBSCZZs7DwcjLW
qRw4f8/FcgfKGHDHYE13SYiTyNog3Q==
=UDZz
-----END PGP SIGNATURE-----

O
O
Oleg Pykhalov wrote on 8 May 2018 20:11
Re: [bug#31176] [bug#31178] [PATCH] gnu: Add inxi.
(name . Peter Neidhardt)(address . pe.neidhardt@googlemail.com)
87in7y10hu.fsf@gmail.com
Hello Peter,

Peter Neidhardt <pe.neidhardt@googlemail.com> writes:

[…]

Toggle quote (2 lines)
> Other than that, the patch looks good to me, feel free to merge! :)

OK. Let me know if ‘inxi’ behaves not as you expected.

Pushed as bbc94ed03a219c10740921f64eea2f630458f538

I'll close the bug report.

Oleg.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlrx6D0ACgkQckbhHGm3
lWktng/+OdK+k9OiEJD3nL8GRgObY6x9/JAQgLh11wEXNIpCv+eAH/PR/l+RB3//
JXjCM+foyo9faPnNTv8IJxB/Nv2SYA8/bCvgQnWIz5MCpwx5WKS/C8zQFh3oMoKO
vZK5oX85aix+fuD/zeA8L+VHl1THhb+FeSTf2ekFNK30YF9oRrIc3FpoN/QFOD01
wMdM4Go6QTdCyGTfSCJ324LQtE5KkAR9QGYZs7SIVe4gLnmSUfg/KTIfDRg9qbHf
PGXbI8ptkEtuIRWmRHxgeVEx18YmgOkVwcOO3ZqmAYFrtCjxCAUZzHuh4UjN/qU2
KWMtz2MqhaKxtLPi1MuGbkyXKZpDGIZ2tAAjarQHye4qYQ25ctqQpxJpgAFg441c
Hfblu0Id6nc8sMeaAYldPY4w0au0RmBHfn/IxrUs7BSSVeTdq3FqSvP8Tj9gH/TL
lHGPcmyX4yHMbzKyXUSgsBlx2vBqnRSgvIHC2abEtr8YYt4jXKy+OYXMZHEZ0Faz
l8x3ElPu/YSpqPoB7OqIGJuEgm58/N5iiX5gWeJRux673xVBzqFog/wNJzM95ukq
UQXAe17sycSLRRDQboyWd/6h5rn3SIYKQ4/fLIfVoB8s/Jcs0MDXA/q+nNal9877
mAwNY3emiA4nWANjVVF9VdUynG6amL2g629tg4jHK8nmkcHpgKM=
=5twh
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 31178
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