Bug 1226458 - guix problem when installing/building some packages
Summary: guix problem when installing/building some packages
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: x86-64 openSUSE Tumbleweed
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: Tomas Cech
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-18 07:03 UTC by J V M
Modified: 2024-07-02 09:18 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
example of problematic manifest (2.73 KB, text/x-scheme)
2024-07-02 08:01 UTC, J V M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description J V M 2024-06-18 07:03:40 UTC
I wanted to install a package form a git repo. So I created my own package manifest and did `guix package -m package.scm`. It fetched all dependencies but then I got this error:

```
guix build: error: while setting up the build environment: getting attributes of path `/etc/services': No such file or directory
```

I could solve it after `touch /etc/services`. Not sure why guix needs this at all (it has not written anything on the file). But it needs it, so I suggest the file is created in the package installation.

Thanks.
Comment 1 J V M 2024-06-18 07:08:18 UTC
So I just learnt that in opensuse this file is in `/usr/etc/services`. So I guess that either a symlink to that file or changing something in guix config to point there would be the correct thing to do.
Comment 2 Tomas Cech 2024-07-02 04:56:42 UTC
I have never seen this error. Would that be possible to share your `package.scm` with me, so I can reproduce it locally?

I wonder why would Guix depend on /etc/services. Generic thought would be that it's problem of Guix and not openSUSE as it depends on outside files.
Comment 3 J V M 2024-07-02 08:01:03 UTC
Created attachment 875822 [details]
example of problematic manifest
Comment 4 J V M 2024-07-02 08:04:23 UTC
(In reply to Tomas Cech from comment #2)
> I have never seen this error. Would that be possible to share your
> `package.scm` with me, so I can reproduce it locally?


It happened to me when installing R packages through guix.install package (only in installations based on git repos).

Please, find attached in my previous message an example test.scm file created by this guix.install R package.




> I wonder why would Guix depend on /etc/services. Generic thought would be
> that it's problem of Guix and not openSUSE as it depends on outside files.

I have no idea if this is a Guix problem or an opensuse problem, but I guess Guix need some (minimal) interaction with the rest of the system (maybe to fetch the git repo?). I think it is a default in the initial configuration, so I guess the package should change the default option to /usr/etc/services.
Comment 5 Jonathan Brielmaier 2024-07-02 09:18:05 UTC
Hi,

I have seen this error message in the past. My workaround was touching `/etc/services`

My educated guess is that it's hard coded in the guix-daemon:
https://git.savannah.gnu.org/cgit/guix.git/tree/nix/libstore/build.cc?id=7f29030cd85e5e8c5110e4772ee4491a7a3d41a3#n2063

So a workaround for openSUSE would be to replace it there with `/usr/etc/services`.

We also should file a bug upstream as I think this should be configurable as it not only is the case in openSUSE.

~Jonathan