unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* package definition question: installation into system directory
@ 2023-06-23 17:56 Andy Tai
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Tai @ 2023-06-23 17:56 UTC (permalink / raw)
  To: guix-devel

Hi, I was trying to create a package definition for xrdp.
when testing the package build, its fails at installation step:

libtool: install:
/gnu/store/a5i8avx826brw5grn3n4qv40g514505c-coreutils-9.1/bin/install
-c .libs/xrdp-sesman
/gnu/store/6rfpjdc3vcsfw3yi1cr42g81pd1lw63l-xrdp-0.9.22.1/sbin/xrdp-sesman
 /gnu/store/a5i8avx826brw5grn3n4qv40g514505c-coreutils-9.1/bin/mkdir
-p '/etc/xrdp'
/gnu/store/a5i8avx826brw5grn3n4qv40g514505c-coreutils-9.1/bin/mkdir:
cannot create directory ‘/etc/xrdp’: Permission denied
make[3]: *** [Makefile:690: install-dist_sesmansysconfDATA] Error 1


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* package definition question: installation into system directory
@ 2023-06-23 18:43 Andy Tai
  2023-06-23 20:24 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Tai @ 2023-06-23 18:43 UTC (permalink / raw)
  To: guix-devel

Hi, I was trying to create a package definition for xrdp.
when testing the package build, its fails at installation step:

libtool: install:
/gnu/store/a5i8avx826brw5grn3n4qv40g514505c-coreutils-9.1/bin/install
-c .libs/xrdp-sesman
/gnu/store/6rfpjdc3vcsfw3yi1cr42g81pd1lw63l-xrdp-0.9.22.1/sbin/xrdp-sesman
 /gnu/store/a5i8avx826brw5grn3n4qv40g514505c-coreutils-9.1/bin/mkdir
-p '/etc/xrdp'
/gnu/store/a5i8avx826brw5grn3n4qv40g514505c-coreutils-9.1/bin/mkdir:
cannot create directory ‘/etc/xrdp’: Permission denied
make[3]: *** [Makefile:690: install-dist_sesmansysconfDATA] Error 1


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: package definition question: installation into system directory
  2023-06-23 18:43 package definition question: installation into system directory Andy Tai
@ 2023-06-23 20:24 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  0 siblings, 0 replies; 3+ messages in thread
From: Felix Lechner via Development of GNU Guix and the GNU System distribution. @ 2023-06-23 20:24 UTC (permalink / raw)
  To: Andy Tai; +Cc: guix-devel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-25  8:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-23 18:43 package definition question: installation into system directory Andy Tai
2023-06-23 20:24 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  -- strict thread matches above, loose matches on Subject: below --
2023-06-23 17:56 Andy Tai

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).