From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: All source code for GuixSD system Date: Fri, 19 May 2017 17:39:32 +0200 Message-ID: <87d1b4etzf.fsf@gnu.org> References: <089889f3-8c9f-e07d-80c7-d19efc0b2b18@tehnoetic.com> <20170516095039.GD27114@macbook42.flashner.co.il> <87bmqs7fg2.fsf@gnu.org> <591B5BE0.2060609@tehnoetic.com> <87wp9g346c.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBk0A-00015o-Gy for help-guix@gnu.org; Fri, 19 May 2017 11:39:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBk07-0007eV-CW for help-guix@gnu.org; Fri, 19 May 2017 11:39:38 -0400 In-Reply-To: (Dima Ursu's message of "Fri, 19 May 2017 14:18:57 +0300") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Dima Ursu Cc: help-guix Hello Dima, (+Cc: help-guix) Dima Ursu skribis: > On 05/17/2017 12:03 AM, Ludovic Court=C3=A8s wrote: [...] >> If you run: >> >> guix gc -R $(readlink -f /run/current-system) >> >> on a GuixSD system, that=E2=80=99ll list all the =E2=80=9Cthings=E2=80= =9D the system itself >> references. Some of these things are configuration files, but many >> others are the actual packages. > > Thanks, Ludo, that's what I was looking for! > >> A rough approach would be to run something along these lines: >> >> guix build --sources=3Dtransitive \ >> $(guix gc -R $(readlink -f /run/current-system) | \ >> grep -e '-[0-9.]\+$' | \ >> sed -'es,/gnu/store/.\{32\}-\(.*\)-\([0-9.]\+\)$,\1@\2,g') > > I've run this in several stages, and it seems that grep -e '-[0-9.]\+$' > is a bit too aggressive - some packages that I think are valid are > excluded, like: > tz-data > mutter > libjpeg-9b > libcdio-paranoia > xf86-video-intel > > They either have some letters at the end, or not have a version at all. > I wonder if the "--sources=3Dtransitive" would take care of them and pull > them anyway, but there's no obvious way to be sure of that. Yeah, I guess you could fine-tune the regexp as a first step. > There are some .scm files, which I assume are already in the source > version, but correct me if I'm wrong. Yes, these are just copied from Guix proper to /gnu/store. > Some of the reported packages confuse me, like boot, fstab, profile, > raw-initrd, system - and they won't even build - guix just reports them > as "unknown package". Should I bother at all with them? These are non-package byproducts used by the system (everything =E2=80=98gu= ix system=E2=80=99 and other tools build goes to /gnu/store, including configuration files, the initrd, and so on.) It=E2=80=99s safe to ignore t= hem. HTH, Ludo=E2=80=99.