From mboxrd@z Thu Jan  1 00:00:00 1970
From: Efraim Flashner <efraim@flashner.co.il>
Subject: Re: List of installed package, version pairs
Date: Thu, 10 Jan 2019 09:33:28 +0200
Message-ID: <20190110073328.GE18849@macbook41>
References: <alpine.DEB.2.20.1901091703170.7735@marsh.hcoop.net>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="H4SyuGOnfnj3aJqJ"
Return-path: <help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([209.51.188.92]:39166)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <efraim@flashner.co.il>) id 1ghUqO-0000WW-1L
	for help-guix@gnu.org; Thu, 10 Jan 2019 02:33:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <efraim@flashner.co.il>) id 1ghUqM-000772-5F
	for help-guix@gnu.org; Thu, 10 Jan 2019 02:33:35 -0500
Received: from flashner.co.il ([178.62.234.194]:41284)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <efraim@flashner.co.il>) id 1ghUqK-000752-06
	for help-guix@gnu.org; Thu, 10 Jan 2019 02:33:32 -0500
Content-Disposition: inline
In-Reply-To: <alpine.DEB.2.20.1901091703170.7735@marsh.hcoop.net>
List-Id: <help-guix.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-guix>,
	<mailto:help-guix-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-guix/>
List-Post: <mailto:help-guix@gnu.org>
List-Help: <mailto:help-guix-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-guix>,
	<mailto:help-guix-request@gnu.org?subject=subscribe>
Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org
Sender: "Help-Guix" <help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org>
To: Jack Hill <jackhill@jackhill.us>
Cc: help-guix@gnu.org


--H4SyuGOnfnj3aJqJ
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jan 09, 2019 at 05:03:40PM -0500, Jack Hill wrote:
> Hi,
>=20
> It seems that work has noticed the GuixSD host that I brought into the
> office. The security office maintains a risk profile be collecting lists =
of
> installed packages, so I've been asked to produce one for the GuixSD host=
=2E I
> assume that the garbage collector's live-paths is roughly equivalent to w=
hat
> they want.
>=20
> However, I've become stuck developing this report as both "guix gc
> --list-live" and the live-paths function in the (guix store) Guile module
> produce a list of store paths. I would like to get the package name and
> version. Is there a good way to do this without resorting to string
> manipulation?
>=20
> Best,
> Jack
>=20

For packages you have installed in your profile
'guix package -I | cut -f1,2 --output-delimiter=3D@ | sort -u' gives a
nice list. Perhaps someone else has an idea for the list from your
os-config.

Although the code above doesn't take into account build inputs and
packages that are in your binaries' paths. For that my two initial ideas
are 'guix package -I | cut -f1 | sort -u | xargs guix size' or
'guix package -I | cut -f1 | sort -u | guix refresh --list-transitive'
and some more shell scripting to get the package and version.

--=20
Efraim Flashner   <efraim@flashner.co.il>   =D7=90=D7=A4=D7=A8=D7=99=D7=9D =
=D7=A4=D7=9C=D7=A9=D7=A0=D7=A8
GPG key =3D A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

--H4SyuGOnfnj3aJqJ
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlw29UgACgkQQarn3Mo9
g1Gi/g/9EjrDuNbYslJ0D/oyE/RUtRALKgkPQiTA+THqMwH4YwiEplEeJOV1ZmiW
EmDqqWGz6X+/0G5usYk3/q8w5QaZk2Y49fGyUJvh0cxb33UEreIQ6VugpPW5pvPK
GxQs9tNnBhH3utMEkR/gLZZrHAWk6oI+3ZYhtBGCJaD7tABWltQfJZ7n6sKtQ7jR
rhZK9U38xYYzugiffX3MLTUtonQxPMjUnXpVIC33oT/Z8lFUEefOgYw49TIID+FV
q6Hd1MZ1nlmeSkVWY9mLs5bx/WO0IRWWKdVO/9lT3BJjqXu7g+plmKVYzyf7QULP
ilDniupVy0OBxS3sdbcU8lbt2WcLC0b77h8ffMSamtzDOTEEXPD2KGQKMBz+DnU1
ic140tj1aJwzAgzXKy9Ra8hgS/ccAYmeHk2R43bs7MQvYR5/79n65e7/V+ZBFVQb
HYPovBL6qF+2Mv+BdVJ3ZBqyu4+yFsSEeUv+OuqizNy3m4E4st8bs1P/UB+5bUAW
jCJpzm4gPOkLFg8z0bP9OErV1LoGexhg8llozl2qwCEXy1qcJ98ReLwa2pUFgj24
vzqVI1mdzV78vMYkscdZ6GL5KqJI29heKtCp3AIeDPCwCsDEYueT4bzDFkF9dYf+
AcG7rMgMSjdTu2BhAVCC49suvwm/iC0bArzIHVgq5A9Gi8J2juY=
=o9yd
-----END PGP SIGNATURE-----

--H4SyuGOnfnj3aJqJ--