guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: package definition question: installation into system directory


From: Felix Lechner
Subject: Re: package definition question: installation into system directory
Date: Fri, 23 Jun 2023 13:24:06 -0700

Hi Andy,

On Fri, Jun 23, 2023 at 11:44 AM Andy Tai <atai@atai.org> wrote:
>
> Hi, I was trying to create a package definition for xrdp.
>
> cannot create directory ‘/etc/xrdp’: Permission denied

Installation paths must be located inside the output folder. The paths
always point into the store.

> make[3]: *** [Makefile:690: install-dist_sesmansysconfDATA] Error 1

You should be able to override the installation prefix at configure
time. It will affect Automake's sysconfdir, which is probably at issue
here. [1]

(It may even work at 'make' time but I do not recommend It.)

I believe the preferred way to override the installation prefix in
Guix is via something like

(arguments
  (list
    #: configure-flags (list (string-append "--prefix=" output)))).

> it was trying to install (some PAM related file) into /etc
> which fails.  Curious how should such scenario be handled?

The PAM-related file belongs into the package output. That makes it
available for potential use. Users of your package can then include it
in their system config via the PAM facilities in Guix System.

An example for pam_limits can be seen here [3] except you probably
want to use absolute paths to the PAM data. I suggested it for
pam_limits in this patch [4] but it has not yet been accepted. Instead
of the linux-pam package users of your package would refer to xrdp.

Kind regards & please have a good weekend!
Felix

[1] https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
[2] 
https://guix.gnu.org/en/manual/devel/en/guix.html#index-gnu_002dbuild_002dsystem
[3] https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/base.scm#n1604
[4] https://issues.guix.gnu.org/63383#3



reply via email to

[Prev in Thread] Current Thread [Next in Thread]