Re: U-Boot for Raspberry Pi

2022-02-22 Thread Vincent Legoll
On Tue, Feb 22, 2022 at 10:05 AM Vincent Legoll
 wrote:
> I was about to suggest:
> ("CONFIG_VIRTIO_BLK" . m) (in guix guile syntax)

modulo the copy/paste gotcha, it should have been

("CONFIG_VIRTIO_BLK" . y) (in guix guile syntax)

-- 
Vincent Legoll



Re: U-Boot for Raspberry Pi

2022-02-22 Thread Vincent Legoll
Hello Reza Alizadeh Majd,

On Tue, Feb 22, 2022 at 9:31 AM Ricardo Wurmus  wrote:
> The list of modules depends largely on the kernel configuration.  I
> encourage you to check if you need to add something to the kernel
> configuration and build your own kernel.

See here for details on how to achieve this:
https://guix.gnu.org/en/cookbook/en/html_node/Customizing-the-Kernel.html#Customizing-the-Kernel

I was about to suggest:

The config item you will probably need to add is
CONFIG_MMC_BLOCK=y (in .config syntax)
or
("CONFIG_VIRTIO_BLK" . m) (in guix guile syntax)

but then I had a look:

~/dev/repo/upstream/guix$ grep -r 'CONFIG_MMC_BLOCK='
./gnu/packages/aux-files/linux-libre/*-arm*.conf
./gnu/packages/aux-files/linux-libre/4.14-arm.conf:CONFIG_MMC_BLOCK=y
./gnu/packages/aux-files/linux-libre/4.19-arm64.conf:CONFIG_MMC_BLOCK=y
./gnu/packages/aux-files/linux-libre/4.19-arm.conf:CONFIG_MMC_BLOCK=y
./gnu/packages/aux-files/linux-libre/5.10-arm64.conf:CONFIG_MMC_BLOCK=y
./gnu/packages/aux-files/linux-libre/5.10-arm.conf:CONFIG_MMC_BLOCK=y
./gnu/packages/aux-files/linux-libre/5.15-arm64.conf:CONFIG_MMC_BLOCK=y
./gnu/packages/aux-files/linux-libre/5.15-arm.conf:CONFIG_MMC_BLOCK=y
./gnu/packages/aux-files/linux-libre/5.16-arm64.conf:CONFIG_MMC_BLOCK=y
./gnu/packages/aux-files/linux-libre/5.16-arm.conf:CONFIG_MMC_BLOCK=y
./gnu/packages/aux-files/linux-libre/5.4-arm64.conf:CONFIG_MMC_BLOCK=y
./gnu/packages/aux-files/linux-libre/5.4-arm.conf:CONFIG_MMC_BLOCK=y

it looks like this option is already properly set to "y" for all
relevant guix kernels...

Sorry, someone more familiar with this part of guix will have to chime in to
help further.

Regards

-- 
Vincent Legoll



Re: Running Out of Inodes

2021-11-14 Thread Vincent Legoll
Hello,

On Sun, Nov 14, 2021 at 7:58 PM Jaft via  wrote:
> Heh, – well – I tried the large_dir suggestion in that thread and GRUB had
> the same freak-out (in retrospect, not surprising as the E-mails are only from
> 2020; dunno why I thought I'd seen 2017, on first read…).

There's a "2017" mention in the thread referenced by Petr, maybe that's where
you saw it.

> using a root partition of about 46G
> About 17 packages in, I started getting a "No space left on device" error;
> looking closer at it, – while I still had ~20% of free disk space available –
> I was fresh out of free inodes.

If your problem is really being out of free inodes, I don't think the
"large_dir"
option is your solution, because it only increase the number of files per
directory limit, it does not increase the available number of inodes.

Maybe you should manually create the filesystem with mke2fs and specify
a bigger number of inodes with its "-N" parameter.

Tell us if you find a way around the problem.

-- 
Vincent Legoll



Re: support split /boot partition

2021-05-02 Thread Vincent Legoll
Hello,

On Sun, May 2, 2021 at 11:17 PM Vagrant Cascadian  wrote:
> Another more complicated option would be to use kexec; where you boot
> one kernel and maybe a minimal rootfs, and load a new kernel and initrd
> into ram, which uses the kernel drivers and then runs "kexec" to switch
> to the newly loaded kernel... not sure how reliable that is, but it is
> possible.

This is actually usable and used, see petitboot or linuxboot.

https://github.com/open-power/petitboot
https://www.linuxboot.org

-- 
Vincent Legoll



Re: How to reference a module defined in another package?

2021-04-24 Thread Vincent Legoll
Hello,

On Sat, Apr 24, 2021 at 2:56 PM  wrote:
> Thanks but I don't see how channels will help me. Artanis is in the
> public Guix repository. If I query my local store for the missing
> module:

Sorry, I misunderstood, and thought that your module was outside.

-- 
Vincent Legoll



Re: Pinebook pro build

2021-04-24 Thread Vincent Legoll
Hello,

I did try to get guix running on the pbp earlier, with the images, first
trying to cross-build them myself, then with the cuirass built ones.
I'm not sure I got anything working at all (no console output, serial
console problem).

I now got some time to try again, and chose a different path, seeing
that Janneke go it to work, I tried to replicate what he's done, and it
worked, I've now got guixrunning on my pbp, yay !

Some of the steps were different in my attempt, but that's not really
important, I could have done the whole thing on the pbp itself too. I
chose that because the pbp is slower (CPU and storage-wise) than
the Odroid N2.

So, what I did is the following: on an Odroid N2 with the guix binary
tarball installed over Armbian on the eMMC with the help from
guix-install.sh script.

I put /gnu on an external USB3 SSD that is way bigger and also faster
than the eMMC.

I had to make the guix-daemon use a TMPDIR in there, as the system
one was too small (2GB tmpfs):

  sudo mkdir /gnu/tmp
  sudo chmod 1777 /gnu/tmp
  sudo chmod 644 /etc/systemd/system/guix-daemon.service
  sudo vi /etc/systemd/system/guix-daemon.service
  # Add to "[Service]" section:
  # Environment=TMPDIR=/gnu/tmp
  sudo systemctl daemon-reload
  sudo systemctl restart guix-daemon

then plugged an sdcard and did:

  SDCARD=/dev/mmcblk1

  sudo parted -- ${SDCARD} mkpart p 0% -1
  sudo parted -- ${SDCARD} set 1 boot on
  sudo mkfs.ext4 -F ${SDCARD}p1
  sudo e2label ${SDCARD}p1 GUIXROOT
  blkid

  sudo mkdir /mnt/tmp
  sudo mount ${SDCARD}p1 /mnt/tmp

  git clone git://git.savannah.gnu.org/guix.git
  cd guix
  git checkout wip-pinebook-pro

  guix environment guix
  ./bootstrap
  ./configure --localstatedir=/var
  make -j 7
  cp gnu/system/examples/pinebook-pro.tmpl ./config-pbp.scm
  vi config-pbp.scm
  # Set bootloader target to ${SDCARD}
  # Set filesystem / to uuid you got by the above blkid, or to label GUIXROOT
  sudo -E ./pre-inst-env guix system init config-pbp.scm /mnt/tmp --fallback

I checked that he final section from Janneke's blog post was not
needed anymore

  grep DEFAULT_FDT /gnu/store/*u-boot*pinebook*/libexec/.config
  grep FDT /mnt/tmp/boot/extlinux/extlinux.conf
  find 
/mnt/tmp/gnu/store/z1kmpmyvm3shh59fsnw5v7s41bdi2fs1-linux-libre-pinebook-pro-5.10.29/lib/dtbs/
-name rk3399-pinebook-pro.dtb
  cat /mnt/tmp/boot/extlinux/extlinux.conf

  sudo umount /mnt/tmp

unplug the sdcard from the N2 and put it in the pinebook pro, turn it
on, enjoy.

Hope that report is helpful.

Many thanks to Janneke, his blog post is very nice and simple to follow.
And to the guix community for all the good work done !

Regards

-- 
Vincent Legoll



Re: How to reference a module defined in another package?

2021-04-23 Thread Vincent Legoll
On Sat, Apr 24, 2021 at 12:08 AM Vincent Legoll
 wrote:
> I think this may be of help:
>
> https://guix.gnu.org/cookbook/en/html_node/GUIX_005fPACKAGE_005fPATH.html

And the first thing this page tells you, is to go have a look at the
new way of doing
this kind of things: channels.

https://guix.gnu.org/manual/en/html_node/Channels.html#Channels

So I think I also have to read about the new world order... :-)

-- 
Vincent Legoll



Re: How to reference a module defined in another package?

2021-04-23 Thread Vincent Legoll
Hello,

I think this may be of help:

https://guix.gnu.org/cookbook/en/html_node/GUIX_005fPACKAGE_005fPATH.html

The error seems to be that it does not find the code, that your use module
is trying to load.

-- 
Vincent Legoll



Re: Certbot with DNS Challenge

2021-04-17 Thread Vincent Legoll
Hello,

> [SNIPPED NICE STUFF]

I think that would make a nice addition to the cookbook

Anyone want to try submitting a PR for that ?

-- 
Vincent Legoll



Re: How to compile native?

2021-04-14 Thread Vincent Legoll
Hello,

On Wed, Apr 14, 2021 at 8:32 PM Joshua Branson  wrote:
>
> Charles Direg  writes:
>
> > Hi,
> >
> > How can I do a compilation of the packages natively?
>
> Yes this is possible!  You can disable substitutes to compile all
> packages natively.

I think Charles meant compilation optimized for his actual processor
instead of being compatible with all x86_64. Like with the following
CFLAGS:

> > What I mean is that, for example in Gentoo it can be used inside
> > /etc/portage/make.conf: CFLAGS="-O2 -march=native -mtune=native"

I think there's no use of giving "-mtune" when you have "-march", c.f.:
https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-march-14

> > Is that possible in guix?

I've heard it is, but not seen the recipe.

> Currently guix does not support gentoo style flags..yet.  Though there
> are talks to do something like that.

Gentoo use flags are something different, used to disable things in
packages.

> If you wanted to compile packages
> with specific compile flags, then you'll need to make custom package
> definitions.

That's probably what Charles wants, but in a global way, settings CFLAGS once
for the whole distro.

-- 
Vincent Legoll



Re: gparted not seeing all filesystem options

2021-04-13 Thread Vincent Legoll
Hello,

On Tue, Apr 13, 2021 at 1:44 PM Efraim Flashner  wrote:
> The image can be built with 'guix system vm gparted.scm'

KnoppGuix wOOt !

I really like the idea of a "Guix rescue image" (that you can put
on CD/DVD/USB/whatever).

-- 
Vincent Legoll



Re: local cuirass

2021-04-11 Thread Vincent Legoll
Hi,

On Sun, Apr 11, 2021 at 6:37 PM Mathieu Othacehe  wrote:
> > when connecting to "https://$IP:8081/;, I get:
> >
> > SSL_ERROR_RX_RECORD_TOO_LONG
>
> I think you should try "$IP:8081" instead. The Cuirass web server is not
> configured to handle HTTPS. You would need to setup an Nginx reverse
> proxy as here: https://git.savannah.gnu.org/cgit/guix/maintenance.git/.

Yes it's working with plain http, I think the browser automagically added
https:// and I never questionned that afterwards.

-- 
Vincent Legoll



Re: (No Subject)

2021-04-11 Thread Vincent Legoll
Hello,

On Sun, Apr 11, 2021 at 6:20 PM Joshua Branson  wrote:
> Also any old-ish computer that has an Intel
> processor should work well with GNU/Guix.

Also beware of GPUs that need firmware / blobs.

> PineBook Pro

I've yet to see that is properly supported (as in:
GUI desktop) by guix. Some distros are OK though.

[looks like Vagrant beat me to tell this]

-- 
Vincent Legoll



local cuirass

2021-04-10 Thread Vincent Legoll
Hello,

I'm trying to follow the blog post [1] to install
a local cuirass service.

I'm doing this in a kvm-based VM launched
on my desktop system (debian), running
guix system (up to date as of yesterday).

when connecting to "https://$IP:8081/;, I get:

SSL_ERROR_RX_RECORD_TOO_LONG

which seems to be server-side configuration
problem (& may be TLS version-related)

I tried with 3 different browsers, same error.

What am I missing ?

Thanks

[1] https://othacehe.org/building-your-own-channels.html

-- 
Vincent Legoll



Re: guix pull error after install i686 1.2.0

2021-04-10 Thread Vincent Legoll
Hello,

Also trying to be helpful here, but, be careful anyways... ;-)

On Sat, Apr 10, 2021 at 6:28 AM Bone Baboon  wrote:
> I have just installed Guix on a computer using:
> https://ftp.gnu.org/gnu/guix/guix-system-install-1.2.0.i686-linux.iso.xz

I did this 2 days ago on an old laptop, which had an old guix
install (~1 year old).

> When I run `guix pull` I get this error message "guix pull: error: Git
> error: the SSL certificate is invalid".

And I can guix pull & guix system reconfigure.

I reinstalled because I saw that same error message, from
the old guix install...

So I don't know if this is helpful.

But I remember having seen an (default checked) option
to install certificates when choosing packages to install.

Let me power it up and check...

I have the "nss-certs" package installed from /etc/config.scm

This may be what you're missing.

-- 
Vincent Legoll



Re: Edits to `etc/resolv.conf` being overwritten

2021-04-10 Thread Vincent Legoll
Hello,

On Sat, Apr 10, 2021 at 5:40 AM Bone Baboon  wrote:
> Vincent Legoll writes:
> > I'd try the "-R" command line option without giving "domain-name-servers"
> >
> > See details in the dhclient's man page
>
> Thank you for the suggestion.  Reading dhclient's man page it looks like
> `-R` is related to IPV6.  I have IPV6 disabled.

Sorry, I just looked at the first hit for "dhclient man", which
is not the same as what "man dhclient" gives on guix (and
on others distros also) :facepalm:

I'm not seeing mention of IPv6 in "-R" text from :
https://linux.die.net/man/8/dhclient

But you're right that this was a wrong suggestion.

Let me try again :

Have a look at the "LEASE REQUIREMENTS AND REQUESTS"
section from man dhclient.conf, you should be able to make
it *NOT* require "name-servers"...

Hopefully this time, the suggestion will be right...

-- 
Vincent Legoll



Re: Edits to `etc/resolv.conf` being overwritten

2021-04-08 Thread Vincent Legoll
Hello,

On Thu, Apr 8, 2021 at 9:08 PM Bone Baboon  wrote:
> It is almost like `sudo dhclient ` is taking
> instruction from the router (provided by my internet service provider)
> to overwrite `/etc/resolv.conf` to the DNS of my internet service
> provider.

I'd try the "-R" command line option without giving "domain-name-servers"

See details in the dhclient's man page

-- 
Vincent Legoll



Re: 'guix deploy' installs old version of Guix on Digital Ocean

2021-03-26 Thread Vincent Legoll
On Fri, Mar 26, 2021 at 9:55 PM Tim Lee  wrote:
> I am following this article to manage my Digital Ocean servers using
> 'guix deploy':
> https://guix.gnu.org/blog/2019/managing-servers-with-gnu-guix-a-tutorial/
>
> However, I notice that the Digital Ocean deployment actually installs
> Guix version 1.0.1 (May 2019) instead of the latest version — 1.2.0
> (November 2020).
>
> I looked into the source code and found that gnu/machine/digital-ocean.scm
> is outdated:
> https://github.com/guix-mirror/guix/blob/v1.2.0/gnu/machine/digital-ocean.scm#L198

Heh, there's a lot of infection happening this evening (see the other
thread from ilmu)
And now I see where his script variant may be coming from, will the
infection rate be
higher ?

OK now, COVID-related jokes asides, you're right this is outdated.

You could try with just updating the URLs to guix binary tarballs and
tell us if this
still works, or even contribute by sending a patch fixing it.

This should be straightforward.

Contributing doc here:
https://guix.gnu.org/manual/en/html_node/Contributing.html#Contributing

Tchuss

--
Vincent Legoll



Re: Something like nixos-infect?

2021-03-26 Thread Vincent Legoll
On Fri, Mar 26, 2021 at 10:23 PM Vincent Legoll
 wrote:
> Since you didn't fully explain what you want to achieve,
> I'll speculate a bit...

Or maybe you want to mutate a foreign distro (since they don't have guix
images / OS templates) from a cloud provider into a real guix system...

-- 
Vincent Legoll



Re: Something like nixos-infect?

2021-03-26 Thread Vincent Legoll
Hello,

Since you didn't fully explain what you want to achieve,
I'll speculate a bit...

On Fri, Mar 26, 2021 at 9:59 PM ilmu  wrote:
> This is what I have: git.sr.ht/~ilmu/server
>
> The reason I'm posting this here is twofold:
> - maybe someone already has a solution they can share
> - maybe someone would also like to have something like this and appreciates 
> the starting point

I think you'll find something useful here:

https://guix.gnu.org/manual/en/html_node/Binary-Installation.html
https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh

This could replace line 7-20 from your script, I.e. the "contamination"
part, the "infection" is left as an exercise (and it looks like you're on
the right path)...

;-)

But maybe something like the following would be better suited:
https://guix.gnu.org/manual/en/html_node/Invoking-guix-deploy.html#Invoking-guix-deploy

Tchuss

-- 
Vincent Legoll



Re: Start Xorg server using xinit manually

2021-03-22 Thread Vincent Legoll
Hello Gary,

On Mon, Mar 22, 2021 at 5:49 PM Gary Johnson  wrote:
> [...] Nicely described stuff

I think this would make a nice additional recipe for the cookbook.

WOGT ? (What Other Guixers Think)

-- 
Vincent Legoll



Re: How to check Guix servers have Ungoogled-Chrome substitutions for me?

2021-02-27 Thread Vincent Legoll
Hello,

On Sat, Feb 27, 2021 at 6:14 PM znavko--- via  wrote:
> Is there some 'guix' command run that will download updates and will check 
> which packages are to be
> substitued, and which are to be compiled?

I think you'll find relevant informations here:
https://issues.guix.gnu.org/26608

But this may not be implemeted yet, though.

Tchuss

-- 
Vincent Legoll



Re: javadoc not in jdk?

2021-02-27 Thread Vincent Legoll
Hello,

you should try adding the "doc" output from the jdk

see https://guix.gnu.org/manual/en/guix.html#Packages-with-Multiple-Outputs

something like the following:

 (native-inputs
  `(("openjdk" ,openjdk14)
 ("jdk-doc" ,openjdk:doc)))

Tchuss

-- 
Vincent Legoll



Re: How to use pip3 libs abcent in guix repo?

2021-02-18 Thread Vincent Legoll
Hello,

On Thu, Feb 18, 2021 at 4:45 PM Jelle Licht  wrote:
> `guix environment --ad-hoc python-pip python-virtualenv python-numpy 
> python-websocket-client python'
>
> Note that it is important that the "python" package comes last in this
> invocation!

Can you elaborate a bit on why this is required ?

Or maybe I should just RTFM... ;-)

Thanks

-- 
Vincent Legoll



Re: guix gc only the rebuildable items

2021-02-16 Thread Vincent Legoll
Hello,

On Tue, Feb 16, 2021 at 9:13 PM Efraim Flashner  wrote:
> To quote the manual¹
> In this way, setting --gc-keep-derivations to yes causes liveness to flow 
> from outputs to derivations, and setting --gc-keep-outputs to yes causes 
> liveness to flow from derivations to outputs. When both are set to yes, the 
> effect is to keep all the build prerequisites (the sources, compiler, 
> libraries, and other build-time tools) of live objects in the store, 
> regardless of whether these prerequisites are reachable from a GC root. This 
> is convenient for developers since it saves rebuilds or downloads.

Ouch, I should have RTFM, thanks a lot !

-- 
Vincent Legoll



guix gc only the rebuildable items

2021-02-16 Thread Vincent Legoll
Hello,

is there a way to guix gc, but only for the
buildable items ? (I have low bandwidth /
CPU ratio here).

I.e. keep the downloadable source tarballs
and git repo checkouts.

Thanks

-- 
Vincent Legoll



Re: How to use elfutils? bash: eu-strip: command not found

2021-01-17 Thread Vincent Legoll
Hello,

On Sun, Jan 17, 2021 at 12:00 PM Pierre Neidhardt  wrote:
> You need to install the "bin" output:
>
>   guix install elfutils:bin

Maybe some hint like that should be added to description.

WDYT ?

> If you want to fix your executable interpreter (and probably the RPATH
> too), you can use `patchelf'.

And maybe a "see also" too.

-- 
Vincent Legoll



Re: Bug? Haskell GHC wont' work since ghc@8.6?

2021-01-11 Thread Vincent Legoll
Hello,

should the following issues be merged together ?

45776
45777
45778

-- 
Vincent Legoll



Re: Guix System ext4 index full

2020-06-04 Thread Vincent Legoll

Hello Roel,

On 04/06/2020 20:55, Roel Janssen wrote:

Thanks for your help.  Don't worry, I figured I had to reinstall it,
which is okay. :)

Unfortunately, after reinstalling Guix using Btrfs as the root
filesystem I cannot seem to boot either.  The last line printed on the
screen is:
[   10.830469 ] Error: Driver 'pcspkr' is already registered,
aborting...

I think it has something to do with the "compatibility support module"
option in the BIOS, because without it I couldn't boot the LiveUSB.

Did you try reverting this option back to the state it was in before
doing the USB installation ?

This may be a BIOS / UEFI bootability difference between the USB flash
disk and the installed system.

--
Vincent Legoll



Re: Guix System ext4 index full

2020-06-03 Thread Vincent Legoll

Hello,

On 03/06/2020 22:21, Roel Janssen wrote:

Also, I cannot write to the root filesystem because the system thinks
it's full (while df shows it has ~125G free space).


T
I think the filesystem (or directory) is full of inodes.

There are many forms of foulness ;-)

--
Vincent Legoll



Re: Guix Docker image inflation

2020-05-31 Thread Vincent Legoll

Hello,

maybe you can try:

docker export  | docker import - img_name

This should flatten the layers back to a single one.

--
Vincent Legoll




Re: Broken at reinstall on CentOS7, possibly due to conflict with `sqlplus`

2020-05-25 Thread Vincent Legoll

Hello Josh,

On 25/05/2020 16:01, Josh Marshall wrote:


[1590413635.160]: [ INFO ] init system is: system
[...]
[1590413650.090]: [ PASS ] enabled Guix daemon via system


Did you modify the installer script ?

I ask because I cannot find any reference to the "system" init
system that is shown in your output quoted above, current code
only has: upstart, systemd & sysv-init. (more to come in the
future).

Could you check that the script is pristine, or send us a copy
of the one you used, maybe there's something there that will
give us a clue about what's happening ?

Thanks

--
Vincent Legoll



Re: Few questions

2020-05-14 Thread Vincent Legoll

On 12/05/2020 13:40, zimoun wrote:

Could you be more precise about this package ROOT-6.20.02?


Look here: https://root.cern/

--
Vincent Legoll



Re: Problem compiling boost for mysql

2020-05-14 Thread Vincent Legoll

Hello Emmanuel,

On 14/05/2020 09:50, Emmanuel Medernach wrote:

I have an error when trying to build a package, the following
gnu packages derivation does not compile:

# guix build -e '(@ (gnu packages boost) boost-for-mysql)'


I'm reproducing the problem, I tried to use boost instead of
boost-for-mysql in the mysql package, but is still requires boost
1.59.0, which is not building.

First because execunix.c got translated into C++, in a later version of 
boost, so the guix recipe to build it changed, see:

02fef9619bd96086aa9255ffb0944d4cda617c84

But boost-for-mysql inherits that configure phase, whereas it still has
the c version of that file.

And second, if you fix^Whack that, then you get a compilation error on
some const * being used as non-const *.

Here is that whitespace-damaged hack:

diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index 2f2ca289ab..a9b463ca92 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -122,7 +124,7 @@
(out (assoc-ref outputs "out")))
(substitute* '("libs/config/configure"

"libs/spirit/classic/phoenix/test/runtest.sh"
-  "tools/build/src/engine/execunix.cpp"
+  "tools/build/src/engine/execunix.c"
   "tools/build/src/engine/Jambase")
  (("/bin/sh") (which "sh")))

I don't know how to fix that properly, maybe copy/paste the whole
(arguments ...) from boost into boost-for-mysql, but that does not
look right.

--
Vincent Legoll



Re: conf file - where is it ?

2020-05-09 Thread Vincent Legoll

On 09/05/2020 20:31, Catonano wrote:

Vincent Legoll this could be of help for you too, couldn't it ?


I had to recreate my VM anyways, so that was not really a problem,
but yes it could have.

--
Vincent Legoll



Re: How to make bash sees binaries from /root/.local/bin ?

2020-05-06 Thread Vincent Legoll
hello,

have you tried something like the following:
echo 'PATH="${PATH}:/root/.local/bin"' >> /root/.bash_profile

maybe also add 'export PATH' after that if needed

-- 
Vincent Legoll



Re: conf file - where is it ?

2020-05-03 Thread Vincent Legoll

Hello,

On 03/05/2020 20:41, Catonano wrote:

After quite some time I run Guix again, this time in a Qemu based vm


I'm on the same boat


With the vm provided on the download page

The manual (linked from the download page, it's here
https://guix.gnu.org/manual/en/html_node/Running-Guix-in-a-VM.html ) says
that the configuration file used t produce that image is in the tree

But I can't find it

I'd like to reconfigure my machine but using its own conf file as a
starting point


This has already been reported (by others and myself) and has been
fixed but new images have not been generated since. The next ones
will be good.

See:
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=9d0b9c7c6c0b0d45653dea80b499314ea415d3c7

--
Vincent Legoll



Re: Help on writing package definitions

2020-04-23 Thread Vincent Legoll

On 23/04/2020 14:09, Emmanuel Medernach wrote:

Hello Vincent, glad to read from you here !


Small world ;-)

Hope to see you soon(-ish) in Strasbourg ! [1]


Thanks for your hints, I didn't realize that it should return
#t at the  end. However I still have the same error.


Yes, this is not the one breaking the build. I'm still low on
the scheme/guix learning curve.

I think you got a more complete answer from Simon.

The pkgconfig & libfabric hints should help.

[1] BTW, I ate with Jérôme a few weeks before the lock-down.

--
Vincent Legoll



Re: Help on writing package definitions

2020-04-23 Thread Vincent Legoll

Hello Emmanuel,

really nice to see you here !

A few smallish comments on your code (I'll try to build it later)

You mixed tabs & spaces for indentation.

Looks like the second lambda does not return #t, if I'm not mistaken
the return value will be setenv's which is unspecified.

I'll try to be more helpful in my next reply ;-)

And sorry if my answer broke the threading, I just subscribed...

--
Vincent Legoll



Re: Documentation

2016-09-02 Thread Vincent Legoll
>> Or maybe I'm very bad at info, always found its interface weird...
>
> I'm not sure, I actually don't use `info` very much either. Maybe your
> GuixSD installation has not been updated since the relevant text was
> added to the manual?

I regularly do guix pull && guix system reconfigure, like earlier today...

Isn't that enough ?

Which package contains this documentation ?

>> $ ./configure --localstatedir=/var
>> configure: error: cannot find install-sh, install.sh, or shtool in
>> build-aux "."/build-aux
>
> Sorry, I forgot the first step, `./bootstrap`, which is mentioned here:

OK, after ./bootstrap, now ./configure --localstatedir=/var works, but not:

$ make doc/guix.html

make[1]: Entering directory `/home/vlegoll/repo/upstream/gnu/guix'
make[1]: Leaving directory `/home/vlegoll/repo/upstream/gnu/guix'
Updating ./doc/version.texi
  MAKEINFO doc/guix.html
doc/guix.texi:6621: @include: could not find os-config-bare-bones.texi
doc/guix.texi:6726: @include: could not find os-config-desktop.texi
doc/guix.texi:6733: @include: could not find os-config-lightweight-desktop.texi
make: *** [doc/guix.html] Error 1

-- 
Vincent Legoll



Re: Documentation

2016-09-02 Thread Vincent Legoll
Thanks for the answers, still no joy for me...

On Fri, Sep 2, 2016 at 6:08 PM, Leo Famulari <l...@famulari.name> wrote:
> On Fri, Sep 02, 2016 at 05:45:02PM +0200, Vincent Legoll wrote:
>> when & how is the documentation here :
>> https://www.gnu.org/software/guix/manual/guix.html
>> updated ?
>
> I'm not sure, but I think it's updated whenever we make a new release.
>
>> Then I searched how to build the doc, and found in README:
>>
>> See the manual for the installation instructions, either by running
>>
>>   info -f doc/guix.info "(guix) Installation"
>>
>> but...
>>
>> info: doc/guix.info: No such file or directory
>
> On GuixSD, `info guix` should work. On other systems...

That works, but I cannot find what I'm searching for: libressl, that
I can see with (in a current git checkout) :

$ git grep libressl
[...]
doc/guix.texi:(define libressl-instead-of-openssl
doc/guix.texi:  (package-input-rewriting `((,openssl . ,libressl
doc/guix.texi:(define git-with-libressl
doc/guix.texi:  (libressl-instead-of-openssl git))
doc/guix.texi:with @var{libressl}.  Then we use it to define a
@dfn{variant} of the
doc/guix.texi:@var{git} package that uses @var{libressl} instead of
@var{openssl}.

What am I missing ?
Or maybe I'm very bad at info, always found its interface weird...

>> So how do I make that doc so that I can read the "installation
>> instructions" which will tell me how to make the doc...
>
> ... from a checkout of our Git repo, you can do:
>
> `guix environment guix -- make doc/guix.info`

I don't have guix installed on this system, see below:

> Similarly, you can do `make doc/guix.html`.

$ make doc/guix.html
make: *** No rule to make target `doc/guix.html'.  Stop.

The configure script is not working here (ubuntu 14.04) bare git
checkout, see below...

> If the Git checkout is new, you will need to run the ./configure script
> first. And if so, you almost always want to do it like this:
>
> `./configure --localstatedir=/var`.

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
$ ./configure --localstatedir=/var
configure: error: cannot find install-sh, install.sh, or shtool in
build-aux "."/build-aux

-- 
Vincent Legoll



Documentation

2016-09-02 Thread Vincent Legoll
Hello,

when & how is the documentation here :
https://www.gnu.org/software/guix/manual/guix.html
updated ?

I ask, because doing some git grep in a recent git checkout
showed me something in doc/guix.texi that I couldn't find in
that online manual...

Then I searched how to build the doc, and found in README:

See the manual for the installation instructions, either by running

  info -f doc/guix.info "(guix) Installation"

but...

info: doc/guix.info: No such file or directory

So how do I make that doc so that I can read the "installation
instructions" which will tell me how to make the doc...

Looks adequately recursive to me... ;-)

Maybe a very simple INSTALL file with the basic explained
would help newbies...

Or did I miss something ?

-- 
Vincent Legoll



Re: Why are there no binary available

2016-08-30 Thread Vincent Legoll
Hello,

> The (lset-difference …) expression above is equal to ‘%base-packages’,
> because the third argument is a list of symbols whereas the second one
> is a list a packages (so these two sets are disjoint).
>
> You probably meant:
>
> (lset-difference eq? %base-packages
>  (list libinput avahi bluez))

Thanks a lot, I couldn't have found this myself (my eyes are still not
accustomed enough with scheme for that)...

> I don’t know the answer to your initial question though.

That was probably a configuration glitch that I inadvertently fixed in the
mean time, as it is not happening any more...

-- 
Vincent Legoll



NTP service

2016-08-28 Thread Vincent Legoll
Hello,

I want my GuixSD to keep it time synchronized,
so I added (ntp-service) to (operating-system (services ...))

I'm still investigating if this is working properly, but I found
the following in guix manual:

Scheme Procedure: ntp-service [#:ntp ntp] [#:name-service %ntp-servers]

and am wondering if #:name-service is a cut'n'paste mistake or genuine...

-- 
Vincent Legoll



Re: simplest package definition?

2016-08-25 Thread Vincent Legoll
> I've found how to patch shebang staying inside trivial-build-system.
> There is 'patch-shebang' procedure in (guix build utils) module, so all
> is needed is to call it with the proper path (containing bash or another
> shell you use).  So the following lines should be added:

I think you can also use "which" to find bash if you don't want to add
it to your inputs.

(let ((sh (which "sh"))) ...)

But I don't know which solution is better...

-- 
Vincent Legoll



Re: guix pull avoidance

2016-08-24 Thread Vincent Legoll
Hello,

> How's the following totally untested, probably buggy patch ?

After painful testing (I have to remove the .config/guix/latest symlink
each time, make it point back to ~/guix_git with my modifications, and
it recompiles a whole bunch of scm files...)

Any idea how to improve that ?

> it's in RFC, to show the intended effects...

I fixed a few silly mistakes...

> What's inside:
>
> - create a symlink /gnu/store/latest pointing to the last installed
> /gnu/store/*-guix-latest

This is failing with :

guix pull: error: symlink: Read-only file system: "/gnu/store/latest.new"

Despite my tries to replicate the (run-with-store (mlet* %store-monad ...))
thing, which AFAIU*, should make writing to the store doable...

What am I missing ?

* I don't think I fully understand that, as the "->" in the mlet* for
instance, I
couldn't find explanations in guile's refman nor guix's...

Please help

-- 
Vincent Legoll
From f0d8a8f1e5a5c69752c2c6139b6a5325734c4ba1 Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.leg...@gmail.com>
Date: Tue, 23 Aug 2016 15:06:12 +0200
Subject: [PATCH] Add --nodownload CLI option

* guix/scripts/pull.scm (show-help, %option): add new option
(guix-pull): handle --nodownload option
(build-and-install): add store parameter,
     create $STORE/latest symlink

Signed-off-by: Vincent Legoll <vincent.leg...@gmail.com>
---
 guix/scripts/pull.scm | 38 --
 1 file changed, 28 insertions(+), 10 deletions(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index a4824e4..b1911ba 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -79,6 +79,8 @@ Download and deploy the latest version of Guix.\n"))
   --url=URL  download the Guix tarball from URL"))
   (display (_ "
   --bootstrapuse the bootstrap Guile to build the new Guix"))
+  (display (_ "
+  --nodownload   only switch to the last downloaded version of Guix"))
   (newline)
   (display (_ "
   -h, --help display this help and exit"))
@@ -99,6 +101,9 @@ Download and deploy the latest version of Guix.\n"))
 (option '("bootstrap") #f #f
 (lambda (opt name arg result)
   (alist-cons 'bootstrap? #t result)))
+(option '("nodownload") #f #f
+(lambda (opt name arg result)
+  (alist-cons 'nodownload? #t result)))
 
 (option '(#\h "help") #f #f
 (lambda args
@@ -197,6 +202,7 @@ contained therein."
 (if built?
 (mlet* %store-monad
 ((latest -> (string-append config-dir "/latest"))
+ (latest-in-store -> (string-append %store-directory "/latest"))
  (done  (indirect-root-added latest)))
   (if (and (file-exists? latest)
(string=? (readlink latest) source-dir))
@@ -205,6 +211,9 @@ contained therein."
 (return #t))
   (begin
 (switch-symlinks latest source-dir)
+(switch-symlinks latest-in-store source-dir)
+(display "symlinked: " latest source-dir)
+(display "symlinked: " latest-in-store source-dir)
 (format #t
 (_ "updated ~a successfully deployed under `~a'~%")
 %guix-package-name latest)
@@ -224,18 +233,27 @@ contained therein."
   (with-error-handling
 (let* ((opts  (parse-options))
(store (open-connection))
+   (config-dir (config-directory))
(url   (assoc-ref opts 'tarball-url)))
-  (let ((tarball (download-to-store store url "guix-latest.tar.gz")))
-(unless tarball
-  (leave (_ "failed to download up-to-date source, exiting\n")))
-(parameterize ((%guile-for-build
-(package-derivation store
-(if (assoc-ref opts 'bootstrap?)
-%bootstrap-guile
-(canonical-package guile-2.0)
+  (if (assoc-ref opts 'nodownload?)
   (run-with-store store
-(build-and-install tarball (config-directory)
-   #:verbose? (assoc-ref opts 'verbose?
+(mlet* %store-monad
+  ((latest -> (string-append config-dir "/latest"))
+   (latest-in-store -> (string-append %store-directory "/latest")))
+(begin
+  (switch-symlinks latest latest-in-store)
+  (display "symlinked: " latest latest-in-store
+  (let ((tarball (down

Re: guix pull avoidance

2016-08-23 Thread Vincent Legoll
Hello,

On Tue, Aug 23, 2016 at 10:39 AM, Vincent Legoll
<vincent.leg...@gmail.com> wrote:
> On Mon, Aug 22, 2016 at 8:01 PM, Leo Famulari <l...@famulari.name> wrote:
>> On Mon, Aug 22, 2016 at 04:34:41PM +0200, Vincent Legoll wrote:
>>> when one does guix pull, it is done only for that user, another one
>>> doing it subsequently (or at the same time) is going to download
>>> and compile the whole (identical) thing again, is it possible to switch
>>> a user to a previously dl'ed revision, like just changing a symlink in
>>> ~/.guix-profile to point to /gnu/store/*-guix-latest, or something like
>>> that ?
>>
>> The 2nd user who does `guix pull` will not recompile if nothing has
>> changed.
>
> Sorry, I wasn't being clear enough, I also want to avoid download.
>
>> You can change which Guix you use by changing what the symlink at
>> '~/.config/guix/latest' points to.
>
> OK thanks that's what I wanted to know

How's the following totally untested, probably buggy patch ?

it's in RFC, to show the intended effects...

What's inside:

- create a symlink /gnu/store/latest pointing to the last installed
/gnu/store/*-guix-latest
- make ~/.config/guix/latest point to that, if --nodownload option is given...

WDYT ?

-- 
Vincent Legoll
From 0a4209c49eac41b728500fbdfa17f38aa2a4d210 Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.leg...@gmail.com>
Date: Tue, 23 Aug 2016 15:06:12 +0200
Subject: [PATCH] Add --nodownload CLI option

* guix/scripts/pull.scm (show-help, %option): add new option
(guix-pull): handle --nodownload option
(build-and-install): add store parameter,
 create $STORE/latest symlink

Signed-off-by: Vincent Legoll <vincent.leg...@gmail.com>
---
 guix/scripts/pull.scm | 36 
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index a4824e4..e7775c0 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -79,6 +79,8 @@ Download and deploy the latest version of Guix.\n"))
   --url=URL  download the Guix tarball from URL"))
   (display (_ "
   --bootstrapuse the bootstrap Guile to build the new Guix"))
+  (display (_ "
+  --nodownload   only switch to the last downloaded version of Guix"))
   (newline)
   (display (_ "
   -h, --help display this help and exit"))
@@ -99,6 +101,9 @@ Download and deploy the latest version of Guix.\n"))
 (option '("bootstrap") #f #f
 (lambda (opt name arg result)
   (alist-cons 'bootstrap? #t result)))
+(option '("nodownload") #f #f
+(lambda (opt name arg result)
+  (alist-cons 'nodownload? #t result)))
 
 (option '(#\h "help") #f #f
 (lambda args
@@ -184,7 +189,7 @@ contained therein."
 ;; tree.
 (build source #:verbose? verbose?)))
 
-(define* (build-and-install tarball config-dir
+(define* (build-and-install tarball config-dir store
 #:key verbose?)
   "Build the tool from TARBALL, and install it in CONFIG-DIR."
   (mlet* %store-monad ((source(build-from-source tarball
@@ -197,6 +202,7 @@ contained therein."
 (if built?
 (mlet* %store-monad
 ((latest -> (string-append config-dir "/latest"))
+ (latest-in-store -> (string-append store "/latest"))
  (done  (indirect-root-added latest)))
   (if (and (file-exists? latest)
(string=? (readlink latest) source-dir))
@@ -205,6 +211,7 @@ contained therein."
 (return #t))
   (begin
 (switch-symlinks latest source-dir)
+(switch-symlinks latest-in-store source-dir)
 (format #t
 (_ "updated ~a successfully deployed under `~a'~%")
 %guix-package-name latest)
@@ -224,18 +231,23 @@ contained therein."
   (with-error-handling
 (let* ((opts  (parse-options))
(store (open-connection))
+   (config-dir (config-directory))
(url   (assoc-ref opts 'tarball-url)))
-  (let ((tarball (download-to-store store url "guix-latest.tar.gz")))
-(unless tarball
-  (leave (_ "failed to download up-to-date source, exiting\n")))
-(parameterize ((%guile-for-build
-(package-derivation store
-(if (assoc-ref opts 'bootstrap?)
-%bootstrap-guile
-(canonical-pa

Re: Why are there no binary available

2016-08-23 Thread Vincent Legoll
Hello,

On Mon, Aug 22, 2016 at 9:16 PM, Leo Famulari <l...@famulari.name> wrote:
> On Fri, Aug 19, 2016 at 01:18:13PM +0200, Vincent Legoll wrote:
>> I'm trying to understand why are there no binaries available
>> for my system and I'm rebuilding everything.
>>
>> The answer may be that I have a system configuration that
>> makes the hydra binaries not good for my system, but that
>> is just a guess...
>>
>> Is there a guix command to know for sure that system
>> configuration is not compatible with hydra binaries ?
>
> Changing the system configuration should not cause changes to package
> definitions, so you should be using the same packages that are provided
> by Hydra.
>
> I'm not sure where what the problem could be. Can you give some details
> about your set-up?
>
> Guix or GuixSD?

GuixSD in a qemu VM x86_64

> What version of Guix (`guix --version)?

$ guix --version
guix (GNU Guix) 20160823.08

> Are you trying to use modified versions of any packages?

Not with root account, nor with guix system reconfigure, just the
following in /etc/config.scm
(based on bare-bones.scm) :

(bootloader (grub-configuration (device "/dev/vda")
;  (theme (grub-theme))
))

(packages (cons libinput-minimal (lset-difference eqv? %base-packages
'(libinput avahi bluez

I had the impression (not sure it was not related to something else)
that when I uncommented
the grub theme config line, I got to rebuild a lot of things, even if
I did not do a guix pull in
between... But maybe I was wrong, so my question above...

> Is Hydra's key in '/etc/guix/acl'?

(acl
 (entry
  (public-key
   (rsa
(n #00DB1634E3D9DFAC97AE4734DAE968CCB1[...]FEE551A3C447C12E104E65#)
(e #010001#)
)
   )
  (tag
   (guix import)
   )
  )
 )

> Can you reach the Hydra mirror at
> https://mirror.hydra.gnu.org?

it pings OK, I can "wget --no-check-certificate" the index.html file

> And, please share any other information that you think might be
> relevant.

I don't think there's anything else...

WDYT ?

-- 
Vincent Legoll



Re: guix pull avoidance

2016-08-23 Thread Vincent Legoll
Hello

On Mon, Aug 22, 2016 at 8:01 PM, Leo Famulari <l...@famulari.name> wrote:
> On Mon, Aug 22, 2016 at 04:34:41PM +0200, Vincent Legoll wrote:
>> when one does guix pull, it is done only for that user, another one
>> doing it subsequently (or at the same time) is going to download
>> and compile the whole (identical) thing again, is it possible to switch
>> a user to a previously dl'ed revision, like just changing a symlink in
>> ~/.guix-profile to point to /gnu/store/*-guix-latest, or something like
>> that ?
>
> The 2nd user who does `guix pull` will not recompile if nothing has
> changed.

Sorry, I wasn't being clear enough, I also want to avoid download.

> You can change which Guix you use by changing what the symlink at
> '~/.config/guix/latest' points to.

OK thanks that's what I wanted to know

-- 
Vincent Legoll



guix pull avoidance

2016-08-22 Thread Vincent Legoll
Hello,

when one does guix pull, it is done only for that user, another one
doing it subsequently (or at the same time) is going to download
and compile the whole (identical) thing again, is it possible to switch
a user to a previously dl'ed revision, like just changing a symlink in
~/.guix-profile to point to /gnu/store/*-guix-latest, or something like
that ?

I have seen suggestions about using git as a backend for guix pull,
but until that happen is there an easy way to get the same thing done ?

Thanks

-- 
Vincent Legoll



Why are there no binary available

2016-08-19 Thread Vincent Legoll
I'm trying to understand why are there no binaries available
for my system and I'm rebuilding everything.

The answer may be that I have a system configuration that
makes the hydra binaries not good for my system, but that
is just a guess...

Is there a guix command to know for sure that system
configuration is not compatible with hydra binaries ?

The following is an example:

/etc/config.scm
(bootloader (grub-configuration (theme (grub-theme))
may make the binaries incompatible with hydra-built ones...

How do I know ?

-- 
Vincent Legoll



Re: grub.cfg.drv gets rebuilt

2016-08-16 Thread Vincent Legoll
On Tue, Aug 16, 2016 at 7:28 AM, Eric Bavier <ericbav...@openmailbox.org> wrote:
>> I'm wondering if it's normal to have *-grub.cfg.drv rebuilt on
>> successive "guix system reconfigure", when nothing has
>> changed between first and subsequent runs.
>
> The grub configuration generates menu entries for each invocation of
> 'guix system reconfigure' to enable system roll-backs during boot-up,
> so it is always updated.  The thing that's "changed" is the menu
> entries.

OK, but if nothing else changed, the menus should stay the same, and
wouldn't need a regeneration...

-- 
Vincent Legoll



grub.cfg.drv gets rebuilt

2016-08-15 Thread Vincent Legoll
I'm wondering if it's normal to have *-grub.cfg.drv rebuilt on
successive "guix system reconfigure", when nothing has
changed between first and subsequent runs.

Is this reproducible on your GuixSD systems ?

root@guixsd /etc# guix system reconfigure /etc/config.scm
The following derivation will be built:
   /gnu/store/786b130gin8jrhksbwfimpi2xjnc2fsd-grub.cfg.drv
/gnu/store/j05dqpaj3ln3s512nzp39i4nzrpfxwaf-system
/gnu/store/900qjchmspy9iyxyzz48bw2sh5k861nq-grub.cfg
/gnu/store/gka9rl2k8mqqi27rrvjpgz6yw165d3if-grub-2.02beta3
activating system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/lwvwgajp7yigf8hmwm56wvf5rh94i5hm-etc...
usermod: no changes
usermod: no changes
usermod: no changes
making '/gnu/store/j05dqpaj3ln3s512nzp39i4nzrpfxwaf-system' the
current system...
Installing for i386-pc platform.
Installation finished. No error reported.

root@guixsd /etc# guix system reconfigure /etc/config.scm
The following derivation will be built:
   /gnu/store/l4lsqqyncz8pq5w4hqjsl49rydjfqwb8-grub.cfg.drv
/gnu/store/j05dqpaj3ln3s512nzp39i4nzrpfxwaf-system
/gnu/store/wb836hy9adib0phxvzzcdigvhmvaq52d-grub.cfg
/gnu/store/gka9rl2k8mqqi27rrvjpgz6yw165d3if-grub-2.02beta3
activating system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/lwvwgajp7yigf8hmwm56wvf5rh94i5hm-etc...
usermod: no changes
usermod: no changes
usermod: no changes
making '/gnu/store/j05dqpaj3ln3s512nzp39i4nzrpfxwaf-system' the
current system...
Installing for i386-pc platform.
Installation finished. No error reported.

-- 
Vincent Legoll



Re: Reverse dependencies

2016-08-12 Thread Vincent Legoll
Hello,

> I think you mean inkscape is pulled when you build the system.  Then you
> will not find it like this.  It is needed to build the fancy grub image,
> and it is "pulled" by the system building code (specifically by
> 'svg->png' procedure in (gnu system grub) module).  If you want to avoid
> it, you can specify an "empty" theme for example:
>
>   (bootloader (grub-configuration (device "/dev/sda")
>   (theme (grub-theme

Thanks for that information, that was what I wanted to know (both the where
does it come from, and the how to avoid it being pulled in)

I think a "guix revdep $PKG" should be a valuable tool

it should work:
1 - globally in the list of defined packages
2 - locally in the list of packages from the current user's profile
3 - systemly, from the list of installed packages in the system profile

I'm trying Eric's suggestion (thanks Eric), and that seems to do 1, I need
a way to modify it to do the other 2... (see the attached script)

WDYT ?

-- 
Vincent Legoll
;;; GNU Guix --- Functional package management for GNU
;;; Copyright  2016 Vincent Legoll <vincent.leg...@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; 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
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(use-modules (guix packages)
 (gnu packages)
 (srfi srfi-1)
 (srfi srfi-26)
 (ice-9 getopt-long))
 	
(define (revdep pkg)
  (fold-packages
(lambda (package _)
  (when (any (cut eq? <> (specification->package pkg))
 (map second (package-direct-inputs package)))
(format #t "~a depends on ~a~%"
(package-full-name package) pkg)))
#t))

(define (main args)
  (let* ((option-spec '((version (single-char #\v) (value #f))
(help(single-char #\h) (value #f
 (options (getopt-long args option-spec))
 (help-wanted (option-ref options 'help #f))
 (version-wanted (option-ref options 'version #f))
 (pkgs (option-ref options '() #f)))
(if (or version-wanted help-wanted)
(begin
  (if version-wanted
  (display "revdep.scm version 0.1\n"))
  (if help-wanted
  (display "\
revdev.scm [options|package names]
  -v, --versionDisplay version
  -h, --help   Display this help\n")))
(map revdep pkgs

(main (command-line))


guix pull parallelism

2016-08-12 Thread Vincent Legoll
Hello,

it does look like some parts of "guix pull" are parallelized
as I was seeing guix-daemon's child guile take 200% CPU during :

loading... 23.5% of 511 filesrandom seed for tests: 1471011793
loading... 99.8% of 511 files
compiling... 99.6% of 511 files

So far so good, nice to use those cores that would stay idle.

But...

$ grep -c ^processor /proc/cpuinfo
3

So why is that not a ~300% is there only parallelism for 2 threads,
or is it an unintended side effect and there is no parallelism ?

If it had been ~100% or ~300% I would not have asked, but that
200% looks wrong one (missed a core) way or the other (no
parallelism)...

Thanks for feeding my curiosity...

-- 
Vincent Legoll



GNU sites down

2016-08-12 Thread Vincent Legoll
Hello,

I cannot connect to gnu.org sites since this morning
see http://www.downornot.net/full-history?id=3073

I could get on hydra, though, so the entire domain is
not AWOL, but a significant portion is (www, savannah,
etc.)

Do anyone know if there's an ETA for availability?

BTW, in the mean time are there any mirrors for the
www ?

-- 
Vincent Legoll



Re: Reverse dependencies

2016-08-11 Thread Vincent Legoll
Hello,

>> I'm trying to understand which package(s) depends on some other package,
>> kind of the reverse of what guix graph does (I think).
>
> I think that `guix refresh --list-dependent foo` is what you are asking
> for, or at least it's close. We use it to learn what will need to be
> rebuilt when upgrading foo.

Not really what I want to know:

# guix refresh --list-dependent inkscape
Building the following 5 packages would ensure 10 dependent packages
are rebuilt: frescobaldi-2.19.0 solfege-3.22.2 simple-scan-3.19.91
termite-11 hydra-20150407.4c0e3e4

None of those are installed, but inkscape is pulled in by something
which I want to know

Is there no other way to get that information ?

-- 
Vincent Legoll



Re: Size of bare-bones guixsd

2016-08-05 Thread Vincent Legoll
>> I'm wondering if there's interest in reducing the bare-bones system
>> footprint, there are some X / GUI stuff in there that may / could /
>> should be trimmed IMHO...
>
> Like what?

I know these probably come from indirect dependencies of other tools,
for advanced features... (please remember that I come with a long
background of gentoo negated use flags)

libXpm, cairo, libxcb, randrproto, glibmm, randrproto, mkfontscale,
inputproto, imagemagick, xtrans, gtk+, compositeproto, cups*, inkscape,
xextproto, freetype, libXrender, gdk-pixbuf, libxcb, libXdmcp, libXaw,
xcb-proto, pixman, netpbm, libvorbis, libcddb, openjpeg, atkmm, libxmu,
libx11, etc...

And I may have missed some...

Some come probably as "guix graph" deps...

I was thinking of bare-bone just as what that name implies, just what is
needed for booting, guix dependencies, and nothing more...

As if I was designing an embedded system with no place in the flash
for anything superfluous, maybe that was a bad assumption...

>> And what would be the way to do this ?
>
> I would take a look at gnu/system.scm which, if I understand correctly,
> implements the core of GuixSD.
>
> Variables like %base-packages and %base-firmware might be interesting to
> look at.

I'll first try to remove some from the %base-packages list and see what is
trimmable...

> By the way, people usually ask about *adding* things to the bare-bones
> example :)

Maybe make a real bare-bones, and then based upon this one, a more "usable"
CLI-system, with more stuff added.

-- 
Vincent Legoll



Size of bare-bones guixsd

2016-08-05 Thread Vincent Legoll
Hello,

I'm wondering if there's interest in reducing the bare-bones system
footprint, there are some X / GUI stuff in there that may / could /
should be trimmed IMHO...

And what would be the way to do this ?

-- 
Vincent Legoll



Re: GNU Guix & GuixSD 0.11.0 released

2016-08-05 Thread Vincent Legoll
Sorry for the reply to all...
Argh



Re: GNU Guix & GuixSD 0.11.0 released

2016-08-05 Thread Vincent Legoll
Hello,

I'm doing an usb install in a VM, and I saw an error message
during boot (of the usb image & of the installed system) from
nscd, it says it cannot find /etc/resolv.conf

After the first reboot the file is there though

So this is probably not that important.

During the first guix pull & system reconfigure, I saw that:

warning: collision encountered:
/gnu/store/jp9hnhyyzf4djdm23ldp3gjqz01biy3y-gmp-6.1.0/lib/libgmp.so
/gnu/store/cdkrfbl10kbyyjjw3yfk9hckfw8n1b7g-gmp-6.1.0/lib/libgmp.so
warning: arbitrarily choosing
/gnu/store/jp9hnhyyzf4djdm23ldp3gjqz01biy3y-gmp-6.1.0/lib/libgmp.so

Is this explained somewhere in the doc ?

-- 
Vincent Legoll



Re: no patch applies

2016-08-05 Thread Vincent Legoll
Hello

>> I attempted to apply the patch onto a fresh Guix master and the patch does
>> not apply, I don't know why

When I fail to apply a patch that's often because of a wrong -p parameter.
Try with "--dry-run -p0" or "--dry-run -p1" to find the good one. You can also
look at file paths in the patch and deduce the right path strip level.

-- 
Vincent Legoll



Re: installing libraries

2016-07-27 Thread Vincent Legoll
Hello,

> Since Guix(SD) has no notion of “standard location” for libraries, the
> normal way to address search path issues is via RUNPATH.

OK

> When you install the ‘gcc-toolchain’ package, the ‘ld’ command you get
> is a wrapper that automatically passes the right -Wl,-rpath flags to the
> real ‘ld’, such that shared libraries are always found.

That does answer the point I think

> Could it be that you built with just plain Binutils’ ld, instead of
> that?

Yes, you're right, and after removing those packages (binutils, glibc, gcc)
and installing gcc-toolchain instead it now works (almost properly) !

Thanks a lot, Ludo, Alex & Tobias

-- 
Vincent Legoll



Re: Newbie packagers

2016-07-23 Thread Vincent Legoll
Hello,

> On Thu, Jul 21, 2016 at 05:52:43PM +0200, Ricardo Wurmus wrote:
>> > - the comma operator
>> > - the backquote operator
>> > - the quote operator
>> > - the arobase operator (is it for list unpacking ?)
>> These are all about list quoting.
>
> very nice explanations!

Yep, I understood them... ;-)

> I wonder whether this should not appear in the manual
> or in some blog post that discusses how to contribute to Guix.

Parts of that has already percolated into guile & guix manuals...

The most important one IMHO, being the reference link from
guix -> guile...

I don't know when they'll be updated on the web, but the modifs
are committed...

-- 
Vincent Legoll



Re: installing libraries

2016-07-22 Thread Vincent Legoll
> Which error, exactly?

error while loading shared libraries: libncursesw.so.6: cannot open
shared object file: No such file or directory

>> There's no ldconfig, so in absence of LD_LIBRARY_PATH how do dynamic
>> libraries get loaded ?
>
> Are you on a ‘foreign’ Linux distribution by any chance?

No, it looks like I'm on an alien distribution : GuixSD :-)

-- 
Vincent Legoll



Re: installing libraries

2016-07-22 Thread Vincent Legoll
> $ guix environment linux-libre --ad-hoc ncurses ... -- make ...
> (or drop the ‘-- ...’ for an interactive build shell)
>
> That will set LIBRARY_PATH (and everything else) up for you.

That does not work, same error

There's no ldconfig, so in absence of LD_LIBRARY_PATH how do dynamic
libraries get loaded ?

-- 
Vincent Legoll



Re: Kernel config

2016-07-22 Thread Vincent Legoll
>> Something that I don't understand:
>>
>> root@guixsd ~# guix --version
>> guix (GNU Guix) 20160722.06
>> root@guixsd ~# which guix
>> /run/current-system/profile/bin/guix
>
> This one is recent, and the ‘local-file’ trick should work with it.

Indeed, thanks

>> vince@guixsd ~$ guix --version
>> guix (GNU Guix) 0.10.0
>> vince@guixsd ~$ which guix
>> /run/current-system/profile/bin/guix
>
> This one might be too old, though we can’t really tell.
>
> They show different versions because in fact, all of Guix except the
> ‘guix’ command (which does very little) is taken from
> ~/.config/guix/latest, populated by ‘guix pull’.  Remember that ‘guix
> pull’ is per-user.

Yep, after doing guix pull as user, it worked properly...

Sorry for the noise...

-- 
Vincent Legoll



Re: Newbie packagers

2016-07-22 Thread Vincent Legoll
> I have no control over search engines.  :-)

Yep, that was just a lame excuse, sorry...
;-)

>> 3 - I'd add the following to (unquote-splicing expr):
>>
>> `(1 ,x 4)  ⇒ (1 (2 3) 4)
>>
>> to better demonstrate the effect of splicing
>>
>> and to (unquote expr) :
>>
>> `(1 2 (* 9 9) 3 4)  ⇒ (1 2 (* 9 9) 3 4)
>
> I’d prefer to avoid duplication with the Guile manual.

Those additional examples would have been for:
https://www.gnu.org/software/guile/manual/guile.html#Expression-Syntax
and not for the guix manual...

Do you want me to submit a patch for those ?

-- 
Vincent Legoll



Re: Newbie packagers

2016-07-22 Thread Vincent Legoll
>> A question remains, why do the configure flags need to be a quoted list ?
>
> It’s a list of arguments that gets passed to a function down the road.

but as the list of arguments is already in a quoted list, it is quoted and not
interpreted here.

'(toto (titi)) => (toto (titi))

and not an error telling titi is unbound variable.

'(toto '(titi)) => (toto (quote (titi)))

there's an additional quote level...

-- 
Vincent Legoll



installing libraries

2016-07-22 Thread Vincent Legoll
Hello (again),

I'm trying to do a kernel "make menuconfig", so I have to install some packages,
make, gcc, binutils, ncurses, glibc, linux-libre-headers...

but ncurses despite being installed, is not picked up...

vince@guixsd ~/tmp/build-linux$ ls $LIBRARY_PATH/*ncurses*
/home/vince/.guix-profile/lib/libncurses.a
/home/vince/.guix-profile/lib/libncurses++w.a
/home/vince/.guix-profile/lib/libncursesw.so.6
/home/vince/.guix-profile/lib/libncurses.so
/home/vince/.guix-profile/lib/libncursesw.a
/home/vince/.guix-profile/lib/libncursesw.so.6.0
/home/vince/.guix-profile/lib/libncurses.so.6
/home/vince/.guix-profile/lib/libncursesw.so

I've found that doing:
vince@guixsd ~/tmp/build-linux$ export LD_LIBRARY_PATH=$LIBRARY_PATH

will make it work...

Is that the "right" way to do it ?

I seem to remember that the export LIBPATH line was hinted from some
package install (maybe gcc), so I put it in .bashrc...

-- 
Vincent Legoll



Re: Newbie packagers

2016-07-22 Thread Vincent Legoll
Just to see if I understood properly...

In the hello.scm example, there is :

(arguments `(#:configure-flags '("--enable-silent-rules")))

1 - can the quasiquote be replaced by a regular quote, because
unquote is not used ?

I'd guess yes, now I'll try it... 

So, it seems like we can change the quasiquote to a simple quote.

A question remains, why do the configure flags need to be a quoted list ?

Is it because it could be a function call evaluated by the gnu-build-system
which has to return a list of strings ?

That would mean the following should work:

(arguments `(#:configure-flags (lambda () (list "--enable-silent-rules"

-- 
Vincent Legoll



Re: Newbie packagers

2016-07-21 Thread Vincent Legoll
Thanks Ludo,

> I would propose the patch below as a start.  While it does not give
> detailed explanations, it provides terminology and pointers, in
> particular to this section of the Guile manual:
>
>   https://www.gnu.org/software/guile/manual/html_node/Expression-Syntax.html

this is nice, the pointer to the reference is actually the nicest
part because of the ungooglability of the various quoting characters.
And the small local explanation is good too.

> Unfortunately, this section of Guile’s manual is a reference and it
> lacks examples and a good overview.  I think we should fix it on Guile’s
> side instead of palliating this deficiency in Guix’s manual.
>
> If nobody beats me at it, I can try and improve this is in Guile’s
> manual afterwards.

I'll go read it and see what I find missing

-- 
Vincent Legoll



Newbie packagers

2016-07-21 Thread Vincent Legoll
I put this in a separate email, as it's becoming long...

The packaging doc:

https://www.gnu.org/software/guix/manual/guix.html#Defining-Packages
is good, but still not enough for beginners.

Essentially it's missing what is hidden behind "Without being a Scheme ..."

It wouldn't hurt to have the scheme non-obvious parts explained:

- the comma operator
- the backquote operator
- the quote operator
- the arobase operator (is it for list unpacking ?)
- the percent operator
- the #: operator
- the different module import things (#:use-module vs (use-modules) vs ...)

(Forgive my probably-not-appropriate terms.)

No need to explain function calls, string quoting and simple stuff, though.

I tried to find a good tutorial explaining all of those, but couldn't. I found
snippets that helped me understand some of those, but they were scattered,
and it's still blurry.

Specific explanations will be more useful that a general scheme tutorial, the
hello.scm is good as an example :

(inputs `(("gawk" ,gawk)))

here we use the backquote because ...
the comma is there for ...

(arguments `(#:configure-flags '("--enable-silent-rules")))

here the #: means ...
we use the simple quote because ...

Obviously I cannot write that myself, but if someone does the explanation,
I volunteer the .texi translation...

-- 
Vincent Legoll



Re: Kernel config

2016-07-20 Thread Vincent Legoll
>   (define-public my-own-linux-libre
> (package
>   (inherit linux-libre)
>   (native-inputs
> `(("kconfig" ,(local-file "./my-kernel.conf"))
>   ,@(alist-delete "kconfig" (package-native-inputs linux-libre))
>
> … which can be dropped in a file in $GUIX_PACKAGE_PATH.
>
> It remains somewhat inconvenient, though.

Yep, inconvenient in the sense I couldn't find the right incantation to
make this work, even with the help from people on #guix...

-- 
Vincent Legoll



Re: new GuixSD version?

2016-07-20 Thread Vincent Legoll
> I think the main problem is that some of the 0.10.0 binaries have
> vanished from {mirror.,}hydra.gnu.org.  Thus, people installing GuixSD
> for the first time today have a very bad experience.

I concurr, today's nightmarish.

Long story short:

My first VM in which I installed guixsd successfully, didn't have enough
disk space. So I decided to make a new one from scratch : Bad idea...

And as I'm a complete scheme newbie, I cannot make sense of the
error messages I get, I cannot even know if PEBCAK...

-- 
Vincent Legoll



build logs

2016-07-20 Thread Vincent Legoll
Hello,

I am currently building kernel during guix system reconfigure,
is there a way to get the complete build log ?

I tried guix build --log-file linux-libre but that gives me
https://mirror.hydra.gnu.org/log/wkdnd1dcgljr0jxmd3li8j0qsr2zwrci-linux-libre-4.6.4

which is the build log for the currently installed kernel (I think)...

-- 
Vincent Legoll



gcc default args

2016-07-18 Thread Vincent Legoll
Hello,

I searched for a way to set gcc's -march globally, for the whole distro,
is this possible with guix ?

-- 
Vincent Legoll



Re: Kernel config

2016-07-17 Thread Vincent Legoll
On Sun, Jul 17, 2016 at 7:49 PM, Ludovic Courtès <l...@gnu.org> wrote:
> Vincent Legoll <vincent.leg...@gmail.com> skribis:
>
>> Would the following work in the mean time ?
>>
>> 1. Adding the following to gnu/packages/linux.scm :
>>
>> (define-public linux-libre-config variant
>>   (package
>> (inherit linux-libre)
>> (native-inputs
>>  (let ((conf (kernel-config (or (%current-target-system)
>> (%current-system))
>> #:variant variant)))
>>`(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
>>  ("kconfig" ,conf))
>
> This should roughly work.  However, I think one can already provide
> their own config file with something like:
>
>   (define-public my-own-linux-libre
> (package
>   (inherit linux-libre)
>   (native-inputs
> `(("kconfig" ,(local-file "./my-kernel.conf"))
>   ,@(alist-delete "kconfig" (package-native-inputs linux-libre))
>
> … which can be dropped in a file in $GUIX_PACKAGE_PATH.
>
> It remains somewhat inconvenient, though.

Yes, that would be simpler.

Does it have to be in root's $GUIX_PACKAGE_PATH, or can guix system reconfigure
work as a user ? That would be a sufficiently good solution, I think...

I'll try it.

-- 
Vincent Legoll



Re: Kernel config

2016-07-17 Thread Vincent Legoll
Would the following work in the mean time ?

1. Adding the following to gnu/packages/linux.scm :

(define-public linux-libre-config variant
  (package
(inherit linux-libre)
(native-inputs
 (let ((conf (kernel-config (or (%current-target-system)
(%current-system))
#:variant variant)))
   `(,@(alist-delete "kconfig" (package-native-inputs linux-libre))
 ("kconfig" ,conf))

2. Adding this to your OS definition config.scm :

(operating-system
...
  (kernel (linux-libre-config "4.6-vince")))

3. putting the kconfig file into:

gnu/packages/linux-libre-4.6-vince-x86_64.conf

If that's OK, I can prepare a patch adding the missing pieces...

-- 
Vincent Legoll



Re: Kernel config

2016-07-16 Thread Vincent Legoll
Thanks a lot, I'll see if I manage to get that done...

On Sat, Jul 16, 2016 at 7:39 PM, Ricardo Wurmus <rek...@elephly.net> wrote:
>
> Vincent Legoll <vincent.leg...@gmail.com> writes:
>
>> I'm wondering if it is possible to pass a .config file to be used for
>> "guix system", as
>> currently the config used is very heavy, and takes ages to build.
>
> To use a different configuration you would create a new package variant
> of the “linux-libre” package in “gnu/packages/linux.scm”, overriding the
> native-input with the label “kconfig”.  Then you can specify your kernel
> variant package in the “kernel” field of your system configuration.
>
> I don’t recommend changing the default configuration in your local
> checkout.
>
> Hope this helps!
>
> ~~ Ricardo
>



-- 
Vincent Legoll



Re: FAQ

2016-07-16 Thread Vincent Legoll
I did it:
https://lists.gnu.org/archive/html/guix-devel/2016-07/msg00488.html

That's where I'm coming from with this idea of not-so-formalized, *easy*
to edit FAQ...

Something where we can tell newcomers to go wild, and ask their questions,
they don't know scheme, nor texinfo, nor should we assume anything from
them. then as questions / answers mature, they can be moved into the
relevant doc section.

That's my 2 cts

-- 
Vincent Legoll



Re: FAQ

2016-07-16 Thread Vincent Legoll
OK, I'll try to create a FAQ section in the official doc then...

-- 
Vincent Legoll



multiple versions

2016-07-16 Thread Vincent Legoll
Hello,

I m trying to get python3 & python2 installed for the same user

guix package -i python@2 -i python@3

but that does not look like it will do what I want:

vince@guixsd ~/guix-packages$ guix package -i python@2 python@3
The following package will be downgraded:
   python3.4.3 → 2.7.10
/gnu/store/7fm1qk703x47qzb9p6xg08cxgb009akz-python-2.7.10

The following package will be upgraded:
   python3.4.3 → 3.4.3
/gnu/store/dsp685maxqc1i6qcib77449g2b6b7qah-python-3.4.3

I've looked at

https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-package.html#Invoking-guix-package

And that could use some more  involved examples, for such non trivial needs...

-- 
Vincent Legoll



Reverse dependencies

2016-07-16 Thread Vincent Legoll
Hello,

I'm trying to understand which package(s) depends on some other package,
kind of the reverse of what guix graph does (I think).

-- 
Vincent Legoll



Kernel config

2016-07-16 Thread Vincent Legoll
hello,

I'm wondering if it is possible to pass a .config file to be used for
"guix system", as
currently the config used is very heavy, and takes ages to build.

Thanks

-- 
Vincent Legoll