chromaprint: fpcalc missing

2018-04-02 Thread Pierre Neidhardt

The chromaprint commandline tool "fpcalc" to compute fingerprints is
missing.

I believe passing the CMAKE argument

-DBUILD_TOOLS=ON

would be enough.

I guess it would be a nice fit for a separate output.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Pros and cons of Emacs package management through Guix instead of package.el

2018-04-02 Thread Pierre Neidhardt

I am thinking of using Guix to manage all my Emacs packages.  I can
think of several benefits:

- Guix provides (possibly) more stable versions.

- Guix can update all packages without hanging Emacs.

- Guix can update all packages from the commandline, i.e. it can be scripted.

- Guix can rollback Emacs packages.  Emacs package updates and system
  program updates can belong to the same transaction: this enforces the
  integrity of the software stack at the user level.

- Guix allows for sharing package files among several users on a multi-user 
system.

And possible downsides:

- package.el provides more up-to-date packages through MELPA but if we
  really want to be more cutting edge (i.e. for development), we are
  usually better off cloning the repository anyway.

- Guix is basically duplicating the effort of (M)ELPA.

What's your take on this?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Trying to define a package

2018-04-02 Thread Pierre Neidhardt

Arnaud B  writes:

> The thing is that I can not debug the build process, even though I use the
> --keep-failed option : I'm not getting a temp build directory
> (/tmp/guix-build-...) as I expect :

This is so because it fails too early, that is, before it builds.

The error is that when using `-f`, guix build _evaluates_ the target
file and builds the _result_.  See `guix build --help`.

The `define-public` does not return a `package`, hence the error.
Simply remove the `define-public` and it should work.

Alternatively, you can place your file in a folder pointed by
GUIX_PACKAGE_PATH, leave the `define-public` and build with `guix build
freefilesync --keep-failed`.

Don't forget that the declared module must match the path, so if you
stick to (gnu packages freefilesync) place the file in
$GUIX_PACKAGE_PATH/gnu/packages/freefilesync.scm.

> One thing to add is that the downloaded source file is not tar.gz file
> format but zip file, perhaps that's part of the problem ?

I think you need

(native-inputs
 `(("unzip" ,unzip)))

And add the (gnu packages compression) module.

A nit: the package name should be lowercase I think.

Love the description, haha! :)

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Package requests: Udisks helpers (udiskie, udevil)

2018-04-01 Thread Pierre Neidhardt

Pierre Neidhardt  writes:

> Can you share those udev rules?  Thanks!

Forget it, just saw your other e-mail in this thread! :p

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Package requests: Udisks helpers (udiskie, udevil)

2018-04-01 Thread Pierre Neidhardt

Chris Marusich  writes:

> My only experience here is in using udev rules to mount disks in systems
> as a specific unprivileged user.  I would install the rule as a
> privileged user, and then enjoy the automatic mounting as an
> unprivileged user.

Can you share those udev rules?  Thanks!

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Fail to configure home-directory

2018-04-01 Thread Pierre Neidhardt

Ludovic Courtès  writes:

>>>> Running `guix system reconfigure' hangs after the `usermod...' changes.
>>>> Not sure about how to print more debug details.
>>>
>>> Does /var/log/messages or /var/log/shepherd.log have more info?
>>
>> /var/log/shepherd.log does not log anything from the `guix system
>> reconfigure...`.
>
> What about /var/log/messages?

Sorry, I forgot about that one.  Starting at 18:42:53:

Apr  1 18:26:14 localhost -- MARK --
Apr  1 18:42:53 localhost nscd: 329 monitored file `/etc/hosts` was 
deleted, removing watch
Apr  1 18:42:53 localhost nscd: 329 monitored file `/etc/hosts` was 
created, adding watch
Apr  1 18:42:53 localhost nscd: 329 monitored file `/etc/services` was 
deleted, removing watch
Apr  1 18:42:53 localhost nscd: 329 monitored file `/etc/services` was 
created, adding watch
Apr  1 18:42:53 localhost NetworkManager[369]:   
[1522588373.7196] settings: hostname changed from (none) to "mimimi"
Apr  1 18:42:53 localhost shepherd[1]: Removing service 'user-homes'... 
Apr  1 18:42:53 localhost shepherd[1]: Done. 
Apr  1 18:42:53 localhost shepherd[1]: Removing service 'term-auto'... 
Apr  1 18:42:53 localhost shepherd[1]: Done. 
Apr  1 18:42:53 localhost shepherd[1]: Evaluating user expression 
(register-services (primitive-load "/gnu/st?") ?). 
Apr  1 18:42:53 localhost shepherd[1]: GNU Guile 2.2.3 
Apr  1 18:42:53 localhost shepherd[1]: Copyright (C) 1995-2017 Free 
Software Foundation, Inc. 
Apr  1 18:42:53 localhost shepherd[1]: Guile comes with ABSOLUTELY NO 
WARRANTY; for details type `,show w'. 
Apr  1 18:42:53 localhost shepherd[1]: This program is free software, 
and you are welcome to redistribute it 
Apr  1 18:42:53 localhost shepherd[1]: under certain conditions; type 
`,show c' for  
Apr  1 18:42:53 localhost shepherd[1]: details. 
Apr  1 18:42:53 localhost shepherd[1]: Enter `,help' for help. 

Also here is the output:

> sudo guix system reconfigure ~/dotfiles/.guix-config/config.scm
substitute: updating list of substitutes from 
'https://mirror.hydra.gnu.org'... 100.0%
The following derivations will be built:
   /gnu/store/6p2mf90icfgkgn0pdcb058mwxl5hndn8-system.drv
   /gnu/store/74s08vh7wk5hg9cd4n2z8irwkznsf0ng-grub.cfg.drv
   
/gnu/store/s4l9g12y5vp36br7w1nrz9a8zkpwx681-shepherd-file-system--foo.scm.drv
   
/gnu/store/s2y5f319phq54lf70qga49kwncn8cyab-shepherd-user-file-systems.scm.drv
   
/gnu/store/dp2ks3cmmikrgbkwjvbgfaak55lkibpc-shepherd-file-systems.scm.drv
   /gnu/store/vzwqn0w5xxgnnbj4x1awgm3s7qssgiz9-shepherd.conf.drv
   /gnu/store/r2njdfp6hkljsrnpnxjcj9m602v1c8wb-activate-service.drv
   /gnu/store/0zr1nagvqrd407z786bfpd482570235j-activate.drv
   /gnu/store/yswg9qnggnb9x02mffl27aaq6bp4wcxf-boot.drv
   /gnu/store/ljp98sn46aqi7vsg3fwpxisphwm7psw3-etc.drv
/gnu/store/j85yjy5sxjlzkcm64f5knkhm9wpy2hd1-system
/gnu/store/sdlvf4aps75cpkjck73iy5c65gm9iby8-grub.cfg
/gnu/store/lb5q7l4yfaqwfb2hxi5q73z3p6pnhpm1-grub-efi-2.02
/gnu/store/kh3bl4qrmkr6wfacdd8dkqkw16n3l0bp-bootloader-installer
activating system...
making '/gnu/store/j85yjy5sxjlzkcm64f5knkhm9wpy2hd1-system' the current 
system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/mv3hpjkfv4qgid27fx590lmly25rxrad-etc...
usermod: no changes
usermod: no changes
usermod: no changes
usermod: no changes
usermod: no changes
usermod: no changes
usermod: no changes
usermod: no changes
usermod: no changes
usermod: no changes
guix system: unloading service 'user-homes'...
shepherd: Removing service 'user-homes'...
shepherd: Done.
guix system: unloading service 'term-auto'...
shepherd: Removing service 'term-auto'...
    shepherd: Done.
guix system: loading new services: file-system-/foo user-homes 
term-auto...
shepherd: Evaluating user expression (register-services (primitive-load 
"/gnu/st?") ?).

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: units_cur

2018-04-01 Thread Pierre Neidhardt

I want to update whenever the file is older than 1 day (so that it does
not do anything on reboot for instance) and every 1 day
from then on (so that it keeps updating even if I don't reboot).

For that I need mcron with some condition on the mtime of
currency.units.

Here is my implementation:

;; -*- mode: Lisp; -*-

;; This cannot be let-bound within `job'.
(define currency-file (string-append (getenv "HOME") 
"/.cache/currency.units"))

(job
 (lambda (current-time)
   (let* ((seconds-in-a-day (* 60 60 24))
  (currency-time (stat:mtime (stat currency-file
 (if (< currency-time (- current-time seconds-in-a-day))
 (next-second)
   ;; TODO: The following does not work while it should.  Report 
upstream.
   ;; (next-hour-from (next-day) (list (tm:hour (localtime 
(current-time)
   (+ (next-second) (- 86400 (- current-time currency-time))
 ;; A string is nicer than Scheme code for `mcron --schedule' output.
 ;; Other we could return '(system* "units_cur" currency-file)
 (string-append "units_cur " currency-file))

I start ~mcron~ from my ~.profile~:

mcron &

Comments are welcome :)


Note: As mentioned in the "TODO:" above, I think there is a bug in
mcron.  The following example taken from the Guix manual does not seem
to work:

 (define idutils-job
   ;; Update the index database as user "charlie" at 12:15PM
   ;; and 19:15PM.  This runs from the user's home directory.
   #~(job '(next-minute-from (next-hour '(12 19)) '(15))
  (string-append #$idutils "/bin/mkid src")
  #:user "charlie"))

Or, at the user level:

(job '(next-minute-from (next-hour '(12 19)) '(15))
  (string-append (getenv "HOME") "/.guix-profile/bin/mkid src"))

> mcron -s 1
mcron: Cannot read files in your ~/.config/cron (or ~/.cron) directory.

More specifically, it seems that mcron fails to take a list as second
argument to the ~next-*~ functions.

Can anyone confirm?

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Package requests: fortune, gifsicle, inxi, uncrustify, unrar, vsftp, xss-lock

2018-04-01 Thread Pierre Neidhardt

Pierre Neidhardt  writes:

>> vsftp:   Very Secure FTP daemon
>> Upstream URL:https://security.appspot.com/vsftpd.html
>> (It seems that there is not a single FTP server on Guix.  Strange... Can 
>> anyone
>> recommend anything better than vsftp for file sharing?  Not necessarily
>> FTP.)
>
> Correction: There is an FTP server in the inetutils package.

And here is a system configuration to get an FTP server up and running
with inetutils:

(use-modules (GNU)
 ; ...
 (gnu services networking)
 (gnu packages admin))

(operating-system
 ; ...
 (users (cons* (user-account
(name "ambrevar")
(group "users")
(supplementary-groups '("wheel" "netdev"
"audio" "video"))
(home-directory "/home/ambrevar"))
   (user-account
(name "ftp")
(group "nogroup")
(home-directory "/home/ftp"))
   %base-user-accounts))

 (services (cons* (service
   inetd-service-type
   (inetd-configuration
(entries
 (list
  (inetd-entry
   (node "127.0.0.1")
   (name "ftp")
   (socket-type 'stream)
   (protocol "tcp")
   (wait? #f)
   (user "root")
   (program (file-append inetutils "/libexec/ftpd"))
   (arguments
'("ftpd" "--anonymous-only" "-l"))
   )
  %my-services)))


I'm now trying to figure out how to declare a service without starting
it when booting.  In the case of inetd, I want to start it manually:

  > sudo herd start inetd

Anyone?

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Package requests: Udisks helpers (udiskie, udevil)

2018-04-01 Thread Pierre Neidhardt

Alternatively, it's also possible to roll out our own 10-line user
script:

https://wiki.archlinux.org/index.php/Udisks#udevadm_monitor

Save it in your PATH as, say, udisks-automount, then add the following
to your startup files (e.g. .profile):

udisks-automount &

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Package requests: Udisks helpers (udiskie, udevil)

2018-04-01 Thread Pierre Neidhardt

Pierre Neidhardt  writes:

> It's possible to mount the drives for every one though:
>
>   (define %automount-udev-rule
> (udev-rule
>  "90-automount.rules"
>  (string-append "KERNEL=\"sd[a-z][0-9]\", ACTION==\"add\", 
> SUBSYSTEM==\"usb\", "
> "ENV{UDISKS_FILESYSTEM_SHARED}=\"1\","
> "RUN+=\"/run/current-system/profile/bin/udisksctl 
> mount -b /dev/%k\"")))

The above rule does not seem to work.

When I try to debug it, udevadm fails to see the new 90-automount rule:

> udevadm test {udevadm info -q path -n /dev/sda1}
calling: test
version 3.2.4
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

=== trie on-disk ===
tool version:  3
file size: 7431994 bytes
header size 80 bytes
strings1901394 bytes
nodes  5530520 bytes
Load module index
timestamp of 
'/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/etc/udev/rules.d' 
changed
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/50-udev-default.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/60-block.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/60-cdrom_id.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/60-drm.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/60-evdev.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/60-persistent-alsa.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/60-persistent-input.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/60-persistent-storage-tape.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/60-persistent-storage.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/60-persistent-v4l.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/60-sensor.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/60-serial.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/64-btrfs.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/70-mouse.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/70-touchpad.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/75-net-description.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/75-probe_mtd.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/78-sound-card.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/80-drivers.rules
Reading rules file: 
/gnu/store/8ylaz1xxb15iq3x1nvbz9rz2c5clq3d5-eudev-3.2.4/lib/udev/rules.d/80-net-name-slot.rules
rules contain 24576 bytes tokens (2048 * 12 bytes), 8930 bytes strings
  # ...

I guess Guix passes some "path" parameters to udev which are missing
above.  The proper path for the rules on my system is:

> ll 
/gnu/store/w1f960p754f5vvbv2mnpfsdbp583hfk7-udev-rules/lib/udev/rules.d
total 3.7k
lrwxrwxrwx   6 root   root  86 1970-01-01  1970 10-dm.rules 
-> 
/gnu/store/rj2da82v4ii1sy2pzb618x1dyxyz4h33-lvm2-2.02.177/lib/udev/rules.d/10-dm.rules
lrwxrwxrwx   6 root   root  90 1970-01-01  1970 
11-dm-lvm.rules -> 
/gnu/store/rj2da82v4ii1sy2pzb618x1dyxyz4h33-lvm2-2.02.177/lib/udev/rules.d/11-dm-lvm.rules
# ...
lrwxrwxrwx  44 root   root  99 1970-01-01  1970 
90-alsa-restore.rules -> 
/gnu/store/w004ykh4r8cqdpxb8jp59h8h40ly32g6-alsa-utils-1.1.5/lib/udev/rules.d/90-alsa-restore.rules
lrwxrwxrwx   2 root   root  98 1970-01-01  1970 
90-automount.rules -> 
/gnu/store/aw9vk500s6zycpr2rb8aih5cjgc8rmw9-90-automount.rules/lib/udev/rules.d/90-automount.rules
lrwxrwxrwx   5 root   root  98 1970-01-01  1970 
90-backlight.r

Re: Package requests: Udisks helpers (udiskie, udevil)

2018-04-01 Thread Pierre Neidhardt

Chris Marusich  writes:

>> Some udev rules might be enough though.
>
> That could very well be true!  I don't know a lot about how the various
> desktop environments like GNOME auto-mount removable storage devices,
> but I'd be surprised if you couldn't whip something up with udev rules.

Thinking about it, I don't think that would work.  I haven't tested the
following, but let's consider the Udev rule:

(define %automount-udev-rule
  (udev-rule
   "90-automount.rules"
   (string-append "KERNEL=\"sd[a-z][0-9]\", ACTION==\"add\", 
SUBSYSTEM==\"usb\", "
  "RUN+=\"/run/current-system/profile/bin/udisksctl 
mount -b /dev/%k\"")))

It would mount the drive as root, not for the current user.
It's possible to mount the drives for every one though:

(define %automount-udev-rule
  (udev-rule
   "90-automount.rules"
   (string-append "KERNEL=\"sd[a-z][0-9]\", ACTION==\"add\", 
SUBSYSTEM==\"usb\", "
"ENV{UDISKS_FILESYSTEM_SHARED}=\"1\","
  "RUN+=\"/run/current-system/profile/bin/udisksctl 
mount -b /dev/%k\"")))

Conclusion: a udev rule might solve part of the problem (auto-mounting) but
it does not allow for per-user mount points.

In the end, udiskie might be the better option.  What do you think?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Package requests: Udisks helpers (udiskie, udevil)

2018-04-01 Thread Pierre Neidhardt

Ricardo Wurmus  writes:

> FWIW I don’t use GNOME (but I might start soon) and to enable
> automounting I had to add the gvfs package to the global environment.

With Nautilus, right?  If you don't use Nautilus or any other
gvfs-based file browser, how do you get automounting?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: units_cur

2018-03-31 Thread Pierre Neidhardt

Ludovic Courtès  writes:

>>> Hmm, dunno.  Perhaps we could modify ‘units’ to look for
>>> /var/run/units/currency.units first, and fall back to
>>> /gnu/store/…-units/share/units/currency.units.
>>>
>>> We would also arrange for ‘units_cur’ to update the file in /var/run by
>>> default.
>>>
>>> WDYT?
>>
>> That sounds reasonable to me.  What's the purpose of /var/run on GuixSD?
>> How is it used?
>
> On GNU/Linux /var/run is the standard location to store “state” files.
> See ‘runstatedir’ in
> <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>.

So how do you get units to use runstatedir instead?
Is there some autoconf way to do it are do we have to patch the code
directly?

I think it would be worth mentioning the issue upstream then.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: units_cur

2018-03-31 Thread Pierre Neidhardt

Ludovic Courtès  writes:

> Hmm, dunno.  Perhaps we could modify ‘units’ to look for
> /var/run/units/currency.units first, and fall back to
> /gnu/store/…-units/share/units/currency.units.
>
> We would also arrange for ‘units_cur’ to update the file in /var/run by
> default.
>
> WDYT?

That sounds reasonable to me.  What's the purpose of /var/run on GuixSD?
How is it used?

> I’m not offering to work on the patch, though.  :-)

I'll give it a shot when I'll more time on my hands.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: units_cur

2018-03-31 Thread Pierre Neidhardt

Pierre Neidhardt  writes:

> I'm also wondering whether an mcron-service would work at the system level.

Well, I guess not, that would defeat the integrity of the store.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Package requests: fortune, gifsicle, inxi, uncrustify, unrar, vsftp, xss-lock

2018-03-30 Thread Pierre Neidhardt

Pierre Neidhardt  writes:

> vsftp:Very Secure FTP daemon
> Upstream URL: https://security.appspot.com/vsftpd.html
> (It seems that there is not a single FTP server on Guix.  Strange... Can 
> anyone
> recommend anything better than vsftp for file sharing?  Not necessarily
> FTP.)

Correction: There is an FTP server in the inetutils package.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: units_cur

2018-03-30 Thread Pierre Neidhardt

I'm also wondering whether an mcron-service would work at the system level.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: units_cur

2018-03-30 Thread Pierre Neidhardt

Ludovic Courtès  writes:

> Looking more closely, you might be able to add a ~/.units file with:
>
>   include my-updated-currency.units

Note that the actual command must start with a `!`, so it would be:

   !include my-updated-currency.units

> Could you check if that works?

It does.  This would definitely work, but then what about the failing
`sudo units_cur`?

I think this should be documented.  Either by patching the documentation
of units_cur itself so that if run with `sudo`, it displays the above
hint instead.

What do you think?

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-03-30 Thread Pierre Neidhardt

Mathieu Lirzin  writes:

> I think you have to use the ‘local-file’ procedure in place of ‘origin’
> in the ‘source’ field.

Unless I'm mistaken, local-file does not work on folders.  In the case
of a Git repo, that would mean extracting the archive and overwriting
the destination on each build.  It's not a solution then.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: units_cur

2018-03-30 Thread Pierre Neidhardt

Ludovic Courtès  writes:

> We could build it with --localstatedir=/var, but would the initial
> ‘currency.units’ be picked up?

Hmm, I don't see how that would work considering currency.units is
located at

PREFIX/share/units/currency.units

Maybe I got you wrong.

What we want to do here is move PREFIX/share/units to a writable location.

With ./configure it's possible to move "datarootdir", but that also
moves the info and the man page.  Thus we need to rectify those 2 locations:

> ./configure --datarootdir=/var --mandir=/usr/local/share/man 
--infodir=/usr/local/share/info

Disclaimer: I don't know autoconf very well, I think we should use a
special syntax for PREFIX instead of /usr/local/.

The result should be

/var/units/currency.units (and 2 other files)

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-30 Thread Pierre Neidhardt

Ricardo Wurmus  writes:

> Pierre Neidhardt  writes:
>
>> The problem is gone for Emacs (hurray!) but not for stow.
>>
>> What does it mean?  That glibc _must_ be installed on all user profiles?
>
> Certainly not.  I’ve never installed glibc into any profile.  glibc is
> linked with programs.

So why did it fix it for Emacs?

> Have you upgraded stow?  If not, it’s possible that it is linked with an
> older version of glibc and thus cannot use the glibc-utf8-locales for
> glibc 2.26 that you have installed.

Upgrading did the trick.

If I get it right, updating glibc or the locales does not trigger an
upgrade of all packages that were built with older versions, hence the
issue.

Should Guix packages depend on glibc so that an upgrade of glibc
upgrades all glibc-dependent packages?

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-03-30 Thread Pierre Neidhardt

Oleg, I tried reusing your package snippet from
http://lists.gnu.org/archive/html/help-guix/2017-09/msg00074.html
by setting

   (url "git://localhost/~ambrevar/projects/emacs")

but it fails for me:

> guix build -K emacs
@ build-started 
/gnu/store/f3gbd1y74vw1my0fmzlpz5cxkqqk423l-emacs-25.3-1.752fba9-checkout.drv - 
x86_64-linux 
/var/log/guix/drvs/f3//gbd1y74vw1my0fmzlpz5cxkqqk423l-emacs-25.3-1.752fba9-checkout.drv.bz2
Initialized empty Git repository in 
/gnu/store/xrprmz45mi7njni6ypz4mad0ijf02r32-emacs-25.3-1.752fba9-checkout/.git/
fatal: unable to connect to localhost:
localhost[0: 127.0.0.1]: errno=Connection refused

fatal: unable to connect to localhost:
localhost[0: 127.0.0.1]: errno=Connection refused

Backtrace:
   4 (primitive-load "/gnu/store/cq0wvv65l9d7zn515dfg07jg3gr?")
In ice-9/eval.scm:
   293:34  3 (_ #)
In ./guix/build/git.scm:
48:10  2 (git-fetch "git://localhost/~ambrevar/projects/emacs" # ?)
In ./guix/build/utils.scm:
589:6  1 (invoke _ . _)
In unknown file:
   0 (scm-error misc-error #f "~A ~S" ("program \"/gnu/s?" ?) ?)

I'm not very familiar with the "git" protocol: does it require some
special configuration?

I also tried specifying a local path:

   (url "/home/ambrevar/projects/emacs")

but it seems that Guix' `git-reference` does not like it:

> guix build -K emacs
@ build-started 
/gnu/store/rvadb9sgi9dj0b3hlgpr3l91nbw9vvn0-emacs-25.3-1.752fba9-checkout.drv - 
x86_64-linux 
/var/log/guix/drvs/rv//adb9sgi9dj0b3hlgpr3l91nbw9vvn0-emacs-25.3-1.752fba9-checkout.drv.bz2
Initialized empty Git repository in 
/gnu/store/xrprmz45mi7njni6ypz4mad0ijf02r32-emacs-25.3-1.752fba9-checkout/.git/
fatal: '/home/ambrevar/projects/emacs' does not appear to be a git 
repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: '/home/ambrevar/projects/emacs' does not appear to be a git 
repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Backtrace:
   4 (primitive-load "/gnu/store/cq0wvv65l9d7zn515dfg07jg3gr?")
In ice-9/eval.scm:
   293:34  3 (_ #)
In ./guix/build/git.scm:
48:10  2 (git-fetch "/home/ambrevar/projects/emacs" "752fba992b?" ?)
In ./guix/build/utils.scm:
589:6  1 (invoke _ . _)
In unknown file:
   0 (scm-error misc-error #f "~A ~S" ("program \"/gnu/s?" ?) ?)

I think this is a bug: if git clone accepts local paths, then so should
git-reference.

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Given a file, find the package that builds it

2018-03-29 Thread Pierre Neidhardt

> Handy way for Emacs users: ‘M-x eww’, then ‘!debfiles bin/hello’.

Didn't know about this, it's brilliant!

See also http://www.portagefilelist.de/site/query/file/?do#result for
the Gentoo equivalent.
I don't know if there is a duckduckgo shortcut however.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Package requests: Udisks helpers (udiskie, udevil)

2018-03-29 Thread Pierre Neidhardt

Chris Marusich  writes:

>> I don't use Nautilus
>
> What do you use?  If you are using another desktop environment besides
> GNOME, and automatic mounting of removable storage devices does not
> occur, perhaps it's a bug we need to fix.  (And maybe that bug is as
> simple as adding the packages you mentioned.)

I don't use a desktop environment.  More specifically, I use EXWM (Emacs
W Window Manager): https://github.com/ch11ng/exwm.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-29 Thread Pierre Neidhardt

Ricardo Wurmus  writes:

> Pierre Neidhardt  writes:
>
>> Glibc was not installed, but installing it pulls 3 packages:
>>
>>  > guix build glibc
>>  
>> /gnu/store/2kjscn5i1zjq2h3j0dcwfnzmc69lajz1-glibc-2.26.105-g0890d5379c-debug
>>  /gnu/store/9j55362h2xgndjgy45f6283spjjx5990-glibc-2.26.105-g0890d5379c
>>  
>> /gnu/store/zpy7n3jjlgnq55lhzkdixf3dvk25vhlj-glibc-2.26.105-g0890d5379c-static
>>
>> Interestingly, `bin/locale` does not end up in the user PATH.
>
> That’s expected.  “guix build” doesn’t install anything and so the
> executables of built packages don’t automatically end up in PATH.
> That’s by design.

Duh!  That was so obvious, I completely forgot I wasn't "installing" :p

The problem is gone for Emacs (hurray!) but not for stow.

What does it mean?  That glibc _must_ be installed on all user profiles?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-29 Thread Pierre Neidhardt

Marius Bakke  writes:

> Pierre Neidhardt  writes:
>
>> Marius Bakke  writes:
>>
>>> Can you post the output of these commands in a terminal:
>>>
>>> $ locale
>>
>> locale: command not found
>
> Try: "$(guix build glibc)/bin/locale" instead.

Glibc was not installed, but installing it pulls 3 packages:

> guix build glibc

/gnu/store/2kjscn5i1zjq2h3j0dcwfnzmc69lajz1-glibc-2.26.105-g0890d5379c-debug
/gnu/store/9j55362h2xgndjgy45f6283spjjx5990-glibc-2.26.105-g0890d5379c

/gnu/store/zpy7n3jjlgnq55lhzkdixf3dvk25vhlj-glibc-2.26.105-g0890d5379c-static

Interestingly, `bin/locale` does not end up in the user PATH.

> 
/gnu/store/9j55362h2xgndjgy45f6283spjjx5990-glibc-2.26.105-g0890d5379c/bin/locale
 
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

> And then `ls -l /run/current-system/locale/2.26/`.

> ls -l /run/current-system/locale/2.26/
total 136
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ca_ES.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 cs_CZ.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 da_DK.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 de_DE.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 el_GR.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 en_AU.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 en_CA.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 en_GB.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 en_US.UTF-8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 en_US.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 es_AR.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 es_CL.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 es_ES.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 es_MX.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 fi_FI.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 fr_BE.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 fr_CA.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 fr_CH.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 fr_FR.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ga_IE.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 it_IT.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ja_JP.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ko_KR.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 nb_NO.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 nl_NL.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 pl_PL.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 pt_PT.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ro_RO.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 ru_RU.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 sv_SE.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 tr_TR.utf8
dr-xr-xr-x   3 root       root 4096 1970-01-01  1970 uk_UA.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 vi_VN.utf8
dr-xr-xr-x   3 root   root 4096 1970-01-01  1970 zh_CN.utf8

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-29 Thread Pierre Neidhardt

Marius Bakke  writes:

> Can you post the output of these commands in a terminal:
>
> $ locale

locale: command not found

> $ env | grep LOCPATH

GUIX_LOCPATH=/run/current-system/locale


> $ ls -l /run/current-system/locale/

total 4
dr-xr-xr-x  36 root   root 4096 1970-01-01  1970 2.26

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Package requests: Udisks helpers (udiskie, udevil)

2018-03-29 Thread Pierre Neidhardt

I don't use Nautilus and I just want to automate the ~udisksctl mount~
command whenever a disk is plugged-in.
Some udev rules might be enough though.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Package requests: Udisks helpers (udiskie, udevil)

2018-03-29 Thread Pierre Neidhardt

At the moment, Guix does not seem to feature any helper to auto-mount
disks managed by udisks (such as external hard drives).

Common options include

udiskie:Removable disk automounter using udisks
Upstream URL:   https://pypi.python.org/pypi/udiskie

udevil: Mount and unmount without password
Upstream URL:   http://ignorantguru.github.com/udevil/

I'm willing to package one of them.  Does anyone have an opinion on the matter?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Missing pinentry-emacs for gpg-agent?

2018-03-29 Thread Pierre Neidhardt

Oleg Pykhalov  writes:

>>  > cp ~/.config/guix/latest/gnu/packages/gnupg.scm ~/.guix-packages/
>>  > chmod +w ~/.guix-packages/gnupg.scm
>> [...]
>> Then add the above the the file
>
> Sorry, I don't understand what do you mean.

I meant adding the ~(define-public ... (package...))~ I quoted to the
new gnupg.scm file.

> Do you mean ‘#:use-module (gnu packages gnupg)’?

No. For now I just wanted to do some out-of-tree hacking, as a first
step towards contributing to Guix.

What I had in mind:

1. Copy gnupg.scm.
2. Modify it to add the new recipe plus the new use-module requirements.
3. Build.

I understand it's not how Guix is meant to be patched, I'll go on with a
proper checkout next.

That said, the new ~define-module~ is as follows:


(define-module (gnu packages gnupg)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (gnu packages)
  #:use-module (gnu packages emacs) ; NEW
...

>> Now if I do
>>
>>  > guix package -s pinentry-emacs
>>  guix package: warning: failed to load '(gnupg)':
>>  no code for module (gnupg)
>>  name: pinentry-emacs
>>  version: 1.1.0
>>  outputs: out
>>  systems: x86_64-linux i686-linux armhf-linux aarch64-linux 
>> mips64el-linux
>>  dependencies: emacs-25.3 libassuan-2.5.1 libsecret-0.18.5 
>> ncurses-6.0-20170930
>>  + pkg-config-0.29.2
>>  location: /home/ambrevar/.guix-packages/gnupg.scm:991:2
>>  homepage: https://gnupg.org/aegypten2/
>>  license: GPL 2+
>>  synopsis: GnuPG's interface to passphrase input
>>  description: Pinentry provides a console and an Emacs interface that 
>> allows users to enter a
>>  + passphrase when required by `gpg' or other software.
>>  relevance: 4
>>
>> Notive the error at th beginning:
>>
>>  guix package: warning: failed to load '(gnupg)':
>>  no code for module (gnupg)
>>
>> I don't understand this.
>
> You want to name your Guile module properly [2].  In case of
> ‘GUIX_PACKAGE_PATH=$HOME/.guix-packages’:
>
> (define-module (gnupg) …)

So ~(define-module (gnu packages gnupg)...)~ means the package must lie
in a "gnu/packages/gnupg.scm" file.  Did not know that, I assumed the
namespace was detached from

> [2]  
> https://www.gnu.org/software/guile/manual/html_node/Using-the-Guile-Module-System.html

The manual you linked shows examples of paths linked to the namespaces.
But I can't seem to find where it states that it is a requirement.

I always thought this requirement on path-linked namespaces (that we
find in many languages) to be redundant.

> Local checkout allows you prepare patches and use ‘guix’ without ‘guix
> pull’.  If you plan to contribute more it's definitely worth to have it.

Will do just now.
Thanks a lot for your help.

--
Pierre Neidhardt


signature.asc
Description: PGP signature


updatedb.conf is missing, should it be configurable via ~guix system reconfigure~?

2018-03-29 Thread Pierre Neidhardt

~man updatedb.conf~ shows

   /gnu/store/d51d0bnpiwmarcjp8kckxb5wvs6kr7dz-mlocate-0.26/etc/updat‐
   edb.conf - a configuration file for updatedb(8)

Which does not exist.

> guix build mlocate
/gnu/store/5ry4cnrnfx54mjvh20n4idfv7xqfc95m-mlocate-0.26

> tree -a /gnu/store/5ry4cnrnfx54mjvh20n4idfv7xqfc95m-mlocate-0.26
/gnu/store/5ry4cnrnfx54mjvh20n4idfv7xqfc95m-mlocate-0.26
|-- bin
|   |-- locate
|   `-- updatedb
|-- share
|   |-- doc
|   |   `-- mlocate-0.26
|   |   `-- COPYING
|   |-- locale
|   |   [...]
|   `-- man
|   |-- man1
|   |   `-- locate.1.gz
|   |-- man5
|   |   |-- mlocate.db.5.gz
|   |   `-- updatedb.conf.5.gz
|   `-- man8
|   `-- updatedb.8.gz
`-- var
`-- mlocate

A global search on the filesystem reveals no updatedb.conf.  I think we
need some rules to configure it from a system configuration with ~guix
system reconfigure~.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-28 Thread Pierre Neidhardt

Marius Bakke  writes:

> Pierre Neidhardt  writes:
>
>>> guix package -I local
>> glibc-utf8-locales   2.26.105-g0890d5379cout 
>> /gnu/store/3k6hl20c3b7big8ngrsl6mj9k8xav99d-glibc-utf8-locales-2.26.105-g0890d5379c
>>
>>> guix package -I emacs
>> emacs25.3out 
>> /gnu/store/y335nx4r08m6kg0yrna7spfwr4s05n36-emacs-25.3
>>
>> How do I check which glibc Emacs is using?
>> I can think of `ldd emacs` but... Where is ldd? :p
>
> "ldd" is in "glibc" :-)
>
> You can also use `guix gc -R /gnu/store/...-emacs-25.3 | grep glibc`.

Here:

> guix gc -R ${guix build emacs} | grep glibc
/gnu/store/4sqaib7c2dfjv62ivrg9b8wa7bh226la-glibc-2.26.105-g0890d5379c

>> A more general question: How do I find to which non-installed package a
>> filename belongs?
>
> Guix does not currently know anything about the files inside each
> package, I typically do a web search...

This is too bad, I believe it's an important feature for any package
manager.
As far as I can tell, `portage` and `pacman` can both do it.

Any plan regarding guix?

>> If Emacs happens to be using glibc 2.25, how could such a sitution occur
>> in the first place?  Why is glibc 2.25 needed at all?
>
> This situation can occur when you've installed emacs built against glibc
> 2.25 (which was the glibc in Guix until ~February), and then later
> updated "glibc-utf8-locales" to 2.26 which has incompatible locale data.
>
> Updating emacs would fix it in that case, since it would be built
> against the new glibc.

Running `guix package -u emacs` does nothing special, possibly because
it's already up to date.  Can I force a rebuild?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Fail to configure home-directory

2018-03-28 Thread Pierre Neidhardt

Ludovic Courtès  writes:

> Oops, that’s a bug that should be fixed now:
>
>   
> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=82b71ac366ef154400653d264b46b7aa3520f393

It works, thanks!

>> Furthermore, I cannot mount a filesystem as /home:
>>
>> ```
>> (file-system
>>   (device "home")
>>   (title 'label)
>>   (mount-point "/home")
>>   (type "ext4"))
>> ```
>>
>> Running `guix system reconfigure' hangs after the `usermod...' changes.
>> Not sure about how to print more debug details.
>
> Does /var/log/messages or /var/log/shepherd.log have more info?

/var/log/shepherd.log does not log anything from the `guix system
reconfigure...`.

Reconfiguring with --verbosity=10 fails with the following:

|   lock released on 
`/gnu/store/qz82gly176p51n82j60rx9aadqxyrm0k-grub.cfg.lock'
|   building of `/gnu/store/xhg2rknd3yvhhb5vsalwwz14kf6184v1-grub.cfg.drv': 
goal destroyed
guix system: error: build failed: |   |   |   bind mounting `/dev/full' to 
`/gnu/store/xhg2rknd3yvhhb5vsalwwz14kf6184v1-grub.cfg.drv.chroot/dev/full'

I've managed to work around the issue:

- Moving the mount point of "LABEL=home" from /mnt to /foo did not work.

- After a failure, all subsequent `guix system reconfigure` fail, even
  the original, working configuration.
  
- After a fresh system boot, commenting out the filesystem configuration
  of LABEL=home works.  I rebooted after that.  From then, I re-added
  the entry for LABEL=home with the new mount point /home.  It worked
  after a reboot.

Something is fishiy...

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Package request inxi

2018-03-28 Thread Pierre Neidhardt

Oleg Pykhalov  writes:

> You could take a package recipe [1].  I don't think it's ready to push
> to Guix package collection, because it requires more ‘(substitute* …)’.
>
> [1]  
> https://notabug.org/wigust/guix-wigust/src/master/wigust/packages/inxi.scm

Nice, thanks!

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Package requests: fortune, gifsicle, inxi, uncrustify, unrar, vsftp, xss-lock

2018-03-28 Thread Pierre Neidhardt

I'm missing the following packages in Guix.  If no one has planned to
package them yet, I'll give it a go.

fortune:The Fortune Cookie Program from BSD games
Upstream URL:   http://www.shlomifish.org/open-source/projects/fortune-mod/

gifsicle:   A powerful command-line program for creating, editing, 
manipulating and getting information about GIF images and animations
Upstream URL:   http://www.lcdf.org/gifsicle/

inxi:   script to get system information
Upstream URL:   https://github.com/smxi/inxi

uncrustify: A source code beautifier
Upstream URL:   http://uncrustify.sourceforge.net/

Description:The RAR uncompression program
Upstream URL:   http://www.rarlab.com/rar_add.htm
(Not sure about the licensing of this one: does not look free.  Is there
any free way to extract RAR?)

vsftp:  Very Secure FTP daemon
Upstream URL:   https://security.appspot.com/vsftpd.html
(It seems that there is not a single FTP server on Guix.  Strange... Can anyone
recommend anything better than vsftp for file sharing?  Not necessarily
FTP.)

xss-lock:   Use external locker as X screen saver
Upstream URL:   https://bitbucket.org/raymonad/xss-lock

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Missing pinentry-emacs for gpg-agent?

2018-03-28 Thread Pierre Neidhardt

Thinking more about it, wouldn't it make more sense to use several
outputs instead of several packages?
Is it possible to specify additional inputs for specific outputs?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Missing pinentry-emacs for gpg-agent?

2018-03-28 Thread Pierre Neidhardt

Oleg Pykhalov  writes:

> Then could you add a flag Vladimir talked about and send a patch?  ;-)

What about a separate package?  E.g.

(define-public pinentry-emacs
  (package
   (inherit pinentry-tty)
   (name "pinentry-emacs")
   (inputs
`(("emacs" ,emacs)
  ,@(package-inputs pinentry-tty)))
   (arguments
`(#:configure-flags '("--enable-pinentry-emacs")))
   (description
"Pinentry provides a console and an Emacs interface that allows 
users to
enter a passphrase when required by @code{gpg} or other software.")))

I haven't delved into packaging so far.  I have read the manual but I'm
unsure about the best practice for local hacking.

I have set GUIX_PACKAGE_PATH=~/.guix-packages, then

> cp ~/.config/guix/latest/gnu/packages/gnupg.scm ~/.guix-packages/
> chmod +w ~/.guix-packages/

Then add the above the the file, plus a

  #:use-module (gnu packages emacs)

at the beginning.

Now if I do

> guix package -s pinentry-emacs
guix package: warning: failed to load '(gnupg)':
no code for module (gnupg)
name: pinentry-emacs
version: 1.1.0
outputs: out
systems: x86_64-linux i686-linux armhf-linux aarch64-linux 
mips64el-linux
dependencies: emacs-25.3 libassuan-2.5.1 libsecret-0.18.5 
ncurses-6.0-20170930
+ pkg-config-0.29.2
location: /home/ambrevar/.guix-packages/gnupg.scm:991:2
homepage: https://gnupg.org/aegypten2/
license: GPL 2+
synopsis: GnuPG's interface to passphrase input  
description: Pinentry provides a console and an Emacs interface that 
allows users to enter a
+ passphrase when required by `gpg' or other software.
relevance: 4

Notive the error at th beginning:

guix package: warning: failed to load '(gnupg)':
no code for module (gnupg)

I don't understand this.

That said, is this the commended way to proceed?  Or should I work from
a local checkout of guix?  What about the value of GUIX_PACKAGE_PATH then?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Missing pinentry-emacs for gpg-agent?

2018-03-27 Thread Pierre Neidhardt

Vladimir Sedach  writes:

> Apparently everyone thinks that Emacs is a "significant security
> risk," so no distributions seem to ship it.

Well, at least Arch Linux, Gentoo and Void Linux ship it!
Not tht uncommon!

I agree with all your other points.

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-27 Thread Pierre Neidhardt

> guix package -I local
glibc-utf8-locales  2.26.105-g0890d5379cout 
/gnu/store/3k6hl20c3b7big8ngrsl6mj9k8xav99d-glibc-utf8-locales-2.26.105-g0890d5379c

> guix package -I emacs
emacs   25.3out /gnu/store/y335nx4r08m6kg0yrna7spfwr4s05n36-emacs-25.3

How do I check which glibc Emacs is using?
I can think of `ldd emacs` but... Where is ldd? :p

A more general question: How do I find to which non-installed package a
filename belongs?

If Emacs happens to be using glibc 2.25, how could such a sitution occur
in the first place?  Why is glibc 2.25 needed at all?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Missing pinentry-emacs for gpg-agent?

2018-03-27 Thread Pierre Neidhardt

Oleg Pykhalov  writes:

> I'm sorry to steal a potential contribution to Guix, but you could try:
>
> ‘M-x view-emacs-news’:
>
> * New Modes and Packages in Emacs 25.1
>
> ** pinentry.el allows GnuPG passphrase to be prompted through the
> minibuffer instead of a graphical dialog, depending on whether the
> gpg command is called from Emacs (i.e., INSIDE_EMACS environment
> variable is set).  This feature requires newer versions of GnuPG
> (2.1.5 or later) and Pinentry (0.9.5 or later).  To use this
> feature, add "allow-emacs-pinentry" to "~/.gnupg/gpg-agent.conf" and
> reload the configuration with "gpgconf --reload gpg-agent".

Unless I'm mistaken, this won't work without pinentry-emacs when gpg is
used to decrypt data, e.g. `gpg -d FILE`.  I do not know about a
INSIDE_EMACS environment variable.  How is it set?

--
Pierre Neidhardt


signature.asc
Description: PGP signature


units_cur

2018-03-27 Thread Pierre Neidhardt

I believe that GNU units ("units" package) needs more patching to
function properly:

> sudo units_cur
Unable to write to output file:
[Errno 30] Read-only file system: 
'/gnu/store/cqvsljfz81xkwfnd4ln2zk4194wjjcgd-units-2.16/share/units/currency.units'

On other systems, one is supposed to run `sudo units_cur' to update the
exchange rates in the currency.units file.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Outdated Qutebrowser and missing qtwebengine?

2018-03-27 Thread Pierre Neidhardt

Qutebrowser is out of date: 0.11.0 in GuixSD, upstream is 1.2.1.

https://github.com/qutebrowser/qutebrowser/releases

Newer versions support qtwebengine, which is not packaged on GuixSD
either.
I was wondering if this has anything to do with non-free software.
If not, I'd be happy to package it.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Locale error: Falling back to C locale

2018-03-27 Thread Pierre Neidhardt

Sorry, forgot to mention that I'm running GuixSD, which is why I'm a bit
clueless here.

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Locale error: Falling back to C locale

2018-03-27 Thread Pierre Neidhardt

Some applications complain about the locale:

> stow .
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.utf8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

> emacs
(process:7796): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.

Both emacs and stow still work properly but I wonder where this comes
from.  Did I miss something during the install?

This could be related to this:
https://lists.gnu.org/archive/html/help-guix/2018-02/msg00091.html
But no LD_ variable is set in my environment.

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Missing pinentry-emacs for gpg-agent?

2018-03-26 Thread Pierre Neidhardt

Somewhat surprisingly, pinentry-emacs does not seem to be in the repo.
Is it intentional?  I'd love to have it back.

On a related topic, is it possible to share a gpg-agent.conf between a
Guix-based system and another system?
What I mean here is that the following line in gpg-agent.conf:

pinentry-program /home/ambrevar/.guix-profile/bin/pinentry

won't work on other systems (/usr/bin/pinentry on other systems is
somewhat more universal, but hey...).

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: How to install prerelease package versions (particularly Emacs)

2018-03-26 Thread Pierre Neidhardt

Considering the importance of Emacs in this community, I think it would
make sense to provide a cutting-edge version.

Is anyone willing to accept this?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Fail to configure home-directory

2018-03-26 Thread Pierre Neidhardt

I'm hitting issues when setting the home folder.

The default home is /home/ambrevar.  If I change `home-directory' to
"/foo" and run `guix system reconfigure' then "/foo" is created but the
home folder is still "/home/ambrevar".

Furthermore, I cannot mount a filesystem as /home:

```
(file-system
  (device "home")
  (title 'label)
  (mount-point "/home")
  (type "ext4"))
```

Running `guix system reconfigure' hangs after the `usermod...' changes.
Not sure about how to print more debug details.

Did I hit a bug?

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Вопрос по опциям монтирования SSD и logrotate

2018-03-26 Thread Pierre Neidhardt

Thank you, Oleg.

>>> Как часто следует выполнять команду trim?
>>
>> У меня GuixSD занимает весь накопитель около года.  ‘grep’ работает
>> шустро все это время без ‘trim’ :-) Но я бы наверное порекомендовал
>> после каждого вызова ‘guix gc’, потому что ‘trim’ выполняется для
>> нахождения пустого пространства, которое появляется после сборки мусора.
>
> The question was about preferable frequency of invoking ‘trim’ command.

And what's the answer? :p

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Installation: Load non-free wifi firmware (iwlwifi)

2018-03-24 Thread Pierre Neidhardt

> "The trouble with firmware" by Jake Edge, January 5, 2011
> https://lwn.net/Articles/421680/

Interesting article.  I share similar views and I believe that making
proprietary code hard to proliferate is laudable.  See the GPL license.
I'm not completely convince how Linux-libre would work towards that end
though.

That said, I'm now stuck with an iwlwifi card and I have to live with
that much backward practices.

> As Ludo mentioned elsewhere, using a dongle is one good option.  What
> prevents you from using a dongle?

A nit, really, but I have an rather extreme life-style that pushes me to
travel as lightweight as possible.  A dongle is not much for sure, but
if I can I'd rather avoid it.

The other issue is that when I initially wrote this e-mail I could not
buy one and could not even order online.  Not a problem anymore for now.

Being even more picky, dongles have drawbacks:
- They occupy a USB port (I have only 2).
- They stick out... :p

> https://minifree.org/

Thanks for the link, I did not know about it.  Very nice initiative.

I am now running the ultra-thin laptop Xiaomi Air 13, which, beside the
non-free iwlwifi card, is an excellent piece of hardware in my opinion.
Way ahead of the offers on minifree.  I wish there would be something
similar and a 100% free.  Anyone aware of such a machine?

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Вопрос по опциям монтирования SSD и logrotate

2018-03-24 Thread Pierre Neidhardt

> Regarding multilingual e-mails, I'm wondering if it would be possible to
> have a summary of the matter at hand together with its various solutions
> once the problem is solved.

I mean, a summary in English.

-- 
Pierre Neidhardt

Retirement means that when someone says "Have a nice day", you
actually have a shot at it.


signature.asc
Description: PGP signature


Re: Вопрос по опциям монтирования SSD и logrotate

2018-03-24 Thread Pierre Neidhardt

Forgive me if this not an appropriate place to ask.

Regarding multilingual e-mails, I'm wondering if it would be possible to
have a summary of the matter at hand together with its various solutions
once the problem is solved.

Similar to what Alex Kost did in the "Modify system behavior after
reconfigure" thread.

--
Pierre Neidhardt

The price one pays for pursuing any profession, or calling, is an intimate
knowledge of its ugly side.
-- James Baldwin


signature.asc
Description: PGP signature


Re: Installation: Load non-free wifi firmware (iwlwifi)

2018-03-23 Thread Pierre Neidhardt

Clément Lassieur  writes:

> Guix allows one to customize their packages through inheritance.  You
> could create a custom linux package that inherits Guix's linux-libre,
> with, say a differente source.  When linux-libre is updated, my-linux
> would be updated as well, since it inherits linux-libre.  Thus, you
> would have no maintainance to do.
>
> (define-public my-linux
>   (package
> (inherit linux-libre)
> (name "my-linux")
> (source ...)))
>
> This custom package's definition needs to be within GUIX_PACKAGE_PATH.
> See
> https://www.gnu.org/software/guix/manual/html_node/Package-Modules.html#Package-Modules
> for more information.

Thanks for the tip, it seems to be working perfectly so far!

-- 
Pierre Neidhardt

No matter what other nations may say about the United States,
immigration is still the sincerest form of flattery.


signature.asc
Description: PGP signature


Re: Build image for USB with custom kernel and packages

2018-03-23 Thread Pierre Neidhardt

Damn!  Been stuck on this issue for days and it's right after sending
the last e-mail that I realized that install.scm was not inside
GUIX_PACKAGE_PATH...

Problem solved.

-- 
Pierre Neidhardt

She always believed in the old adage -- leave them while you're looking good.
-- Anita Loos, "Gentlemen Prefer Blondes"


signature.asc
Description: PGP signature


Build image for USB with custom kernel and packages

2018-03-23 Thread Pierre Neidhardt

Starting from /gnu/system/install.scm, I can run

> guix system disk-image install.scm

and it works.

Now if I add a custom kernel and a custom package to install.scm:

(define-public my-linux
  (package
(inherit linux-libre)
(name "my-linux")
(source ...

(define-public 
  (package
(name "foo")
(version version)
(source ...)
(build-system trivial-build-system)
(arguments
 `(#:modules ((guix build utils))
   #:builder ...))
(home-page "")
(synopsis "Blah blah")
(description "More blah blah")
(license #f

And in the `operating-system` form:

(operating-system
(kernel my-linux)
;; Rest is untouched.

I have to use more modules for this to work:

  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system trivial)

This fails to run:

> guix system disk-image install.scm
guile: warning: failed to install locale
warning: failed to install locale: Invalid argument
guix system: error: failed to load 'install.scm': No such file or 
directory

Am I missing something or is it a bug?

-- 
Pierre Neidhardt

Chemist who falls in acid is absorbed in work.


signature.asc
Description: PGP signature


Re: Integrate guix-installed Emacs packages with locally compiled Emacs pretest

2018-03-13 Thread Pierre Neidhardt

Is there such a thing as a curated list of unofficial, user-contributed
packages for GuixSD?  (Anything that cannot be accepted in the official
repository, such as development versions.)

--
Pierre Neidhardt


signature.asc
Description: PGP signature


guix system disk-image: Could not access KVM kernel module: Permission denied

2018-03-03 Thread Pierre Neidhardt

I'm trying to generate a disk image of Guix.
The image creation process goes fine until the start of QEMU:

creating raw image of 2607.99 MiB...
Formatting '/gnu/store/fwjlpcwc3b81m2s6phwldwyxpd3wzsjm-disk-image', 
fmt=raw size=2734679872
Could not access KVM kernel module: Permission denied
qemu-system-x86_64: failed to initialize KVM: Permission denied
file-size: 
/gnu/store/xsb0k5lrbrc63kardzxa7h4qvland6n2-profile/etc/ssl/certs/NetLock_Arany_=Class_Gold=_F??tan??s??tv??ny:2.6.73.65.44.228.0.16.pem:
 No such file or directory
file-size: 
/gnu/store/xsb0k5lrbrc63kardzxa7h4qvland6n2-profile/etc/ssl/certs/T??RKTRUST_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??_H5:2.7.0.142.23.254.36.32.129.pem:
 No such file or directory
file-size: 
/gnu/store/xsb0k5lrbrc63kardzxa7h4qvland6n2-profile/etc/ssl/certs/AC_Ra??z_Certic??mara_S.A.:2.15.7.126.82.147.123.224.21.227.87.240.105.140.203.236.12.pem:
 No such file or directory
file-size: 
/gnu/store/d48rkmvrbzaabxdldcrdps7cf27rm092-nss-certs-3.35/etc/ssl/certs/NetLock_Arany_=Class_Gold=_F??tan??s??tv??ny:2.6.73.65.44.228.0.16.pem:
 No such file or directory
file-size: 
/gnu/store/d48rkmvrbzaabxdldcrdps7cf27rm092-nss-certs-3.35/etc/ssl/certs/T??RKTRUST_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??_H5:2.7.0.142.23.254.36.32.129.pem:
 No such file or directory
file-size: 
/gnu/store/d48rkmvrbzaabxdldcrdps7cf27rm092-nss-certs-3.35/etc/ssl/certs/AC_Ra??z_Certic??mara_S.A.:2.15.7.126.82.147.123.224.21.227.87.240.105.140.203.236.12.pem:
 No such file or directory
Backtrace:
   2 (primitive-load "/gnu/store/iyjms00w31p51gz9jfdvrlk7qnd?")
In ./gnu/build/vm.scm:
163:4  1 (load-in-linux-vm _ #:output _ #:qemu _ #:memory-size _ ?)
In unknown file:
   0 (scm-error misc-error #f "~A ~S" ("qemu failed" "qem?") #)

ERROR: In procedure scm-error:
qemu failed "qemu-system-x86_64"
builder for 
`/gnu/store/qaaf9mr4zwdpfxg0a7gvgl6wyrwrg5dn-disk-image.drv' failed with exit 
code 1
guix system: error: build failed: build of 
`/gnu/store/qaaf9mr4zwdpfxg0a7gvgl6wyrwrg5dn-disk-image.drv' failed

My host system is Void Linux (which I don't know so well).
Permissions for /dev/kvm seem to be correct:

> ls -l /dev/kvm
crw-rw   1 root   kvm 0 2018-03-03 14:56 
/dev/kvm

My user is part of the kvm group.  Also the module seems to be loaded fine:

> lsmod | grep kvm
kvm_intel 225280  0
kvm   630784  1 kvm_intel
irqbypass  16384  1 kvm

Not sure what's wrong.  I am not very familiar with QEMU / KVM I'm afraid...
Any clue?

Besides, and maybe unrelated, some certificates seem to be missing.  Any
idea how that could happen?

--
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: Installation: Load non-free wifi firmware (iwlwifi)

2018-03-02 Thread Pierre Neidhardt

An idea crossed my mind: from a foreign distribution with Guix
installed, run

 guix system init /mnt/etc/config.scm /mnt

The documentation tells us that's not enough though:

> With the target partitions ready and the target root mounted on ‘/mnt’,
> we’re ready to go.  First, run:
>
>  herd start cow-store /mnt
>
>This makes ‘/gnu/store’ copy-on-write, such that packages added to it
> during the installation phase are written to the target disk on ‘/mnt’
> rather than kept in memory.  This is necessary because the first phase
> of the ‘guix system init’ command (see below) entails downloads or
> builds to ‘/gnu/store’ which, initially, is an in-memory file system.

Is there a simple way to do this without `herd'?

-- 
Pierre Neidhardt

Do you think that illiterate people get the full effect of alphabet soup?


signature.asc
Description: PGP signature


Installation: Load non-free wifi firmware (iwlwifi)

2018-03-02 Thread Pierre Neidhardt

This was posted before:

https://lists.gnu.org/archive/html/help-guix/2017-01/msg00041.html

Unfortunately, I'm not able to acquire a wifi dongle at the moment.
As far as I understand, linux-libre turns off the ability to load
non-free firmware.  Why is it so?

Is it possible to re-enable the feature?
If not, are there other ways around the issue?

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


<    1   2   3   4   5   6