* [gentoo-dev] ACCESS DENIED during emerge
@ 2006-04-28 19:41 A. Khattri
2006-04-28 19:58 ` Chris White
2006-04-28 19:59 ` Stephen Bennett
0 siblings, 2 replies; 12+ messages in thread
From: A. Khattri @ 2006-04-28 19:41 UTC (permalink / raw
To: gentoo-dev
In writing and testing a new ebuild, I ran emerge as root and got ACCESS
DENIED errors when it tried writing two config files into /etc.
Do I need to do something special for config files in an ebuild?
--
Aj
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] ACCESS DENIED during emerge
2006-04-28 19:41 [gentoo-dev] ACCESS DENIED during emerge A. Khattri
@ 2006-04-28 19:58 ` Chris White
2006-04-28 20:35 ` A. Khattri
2006-04-28 19:59 ` Stephen Bennett
1 sibling, 1 reply; 12+ messages in thread
From: Chris White @ 2006-04-28 19:58 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
On Friday 28 April 2006 12:41 pm, A. Khattri wrote:
> In writing and testing a new ebuild, I ran emerge as root and got ACCESS
> DENIED errors when it tried writing two config files into /etc.
>
> Do I need to do something special for config files in an ebuild?
Don't copy files to the live filesystem, instead do:
cp whatever.conf whatever2.conf ${D}/etc/
or some people like:
insinto /etc
doins whatever.conf whatever2.conf
or if it's a conf.d file:
doconfd
>
> --
> Aj
--
Chris White
Gentoo Developer aka:
ChrisWhite
cpw
ChrisWhite|Work
WhiteChocolate
VanillaWhite
Whitey
WhiteLight
WhiteCheese
WhiteSugar
WhiteButter
WhiteWall
WhiteLemon
WhiteApple
WhiteBlanket
WhiteEnergy
WhiteWhite
[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] ACCESS DENIED during emerge
2006-04-28 19:41 [gentoo-dev] ACCESS DENIED during emerge A. Khattri
2006-04-28 19:58 ` Chris White
@ 2006-04-28 19:59 ` Stephen Bennett
2006-04-28 20:35 ` A. Khattri
1 sibling, 1 reply; 12+ messages in thread
From: Stephen Bennett @ 2006-04-28 19:59 UTC (permalink / raw
To: gentoo-dev
On Fri, 28 Apr 2006 15:41:48 -0400 (EDT)
"A. Khattri" <ajai@bway.net> wrote:
>
> In writing and testing a new ebuild, I ran emerge as root and got
> ACCESS DENIED errors when it tried writing two config files into /etc.
>
> Do I need to do something special for config files in an ebuild?
http://dev.gentoo.org/~plasmaroo/devmanual//general-concepts/sandbox/
http://dev.gentoo.org/~plasmaroo/devmanual//appendices/common-problems/#handling-access-violations
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] ACCESS DENIED during emerge
2006-04-28 19:58 ` Chris White
@ 2006-04-28 20:35 ` A. Khattri
2006-04-28 20:41 ` Donnie Berkholz
2006-04-28 21:01 ` Drake Wyrm
0 siblings, 2 replies; 12+ messages in thread
From: A. Khattri @ 2006-04-28 20:35 UTC (permalink / raw
To: gentoo-dev
On Fri, 28 Apr 2006, Chris White wrote:
> On Friday 28 April 2006 12:41 pm, A. Khattri wrote:
> > In writing and testing a new ebuild, I ran emerge as root and got ACCESS
> > DENIED errors when it tried writing two config files into /etc.
> >
> > Do I need to do something special for config files in an ebuild?
>
> Don't copy files to the live filesystem, instead do:
>
> cp whatever.conf whatever2.conf ${D}/etc/
>
> or some people like:
>
> insinto /etc
> doins whatever.conf whatever2.conf
Ah, I see now that the actual make install is trying to do this.
I see there is a configure flag for this:
--enable-conf-install enable install of sample .conf files in
sysconfdir (default: yes)
Allow me to run this by you:
1. So I need to set --enable-conf-install=no which also implies
I need to override src_compile
2. And then after the build, override pkg_postinst to copy the sample
config files into /etc
Does this sound right or is there a better (preferred?) way?
--
Aj
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] ACCESS DENIED during emerge
2006-04-28 19:59 ` Stephen Bennett
@ 2006-04-28 20:35 ` A. Khattri
0 siblings, 0 replies; 12+ messages in thread
From: A. Khattri @ 2006-04-28 20:35 UTC (permalink / raw
To: gentoo-dev
On Fri, 28 Apr 2006, Stephen Bennett wrote:
> On Fri, 28 Apr 2006 15:41:48 -0400 (EDT)
> "A. Khattri" <ajai@bway.net> wrote:
>
> >
> > In writing and testing a new ebuild, I ran emerge as root and got
> > ACCESS DENIED errors when it tried writing two config files into /etc.
> >
> > Do I need to do something special for config files in an ebuild?
>
> http://dev.gentoo.org/~plasmaroo/devmanual//general-concepts/sandbox/
> http://dev.gentoo.org/~plasmaroo/devmanual//appendices/common-problems/#handling-access-violations
>
Thanks for this useful resource.
--
Aj
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] ACCESS DENIED during emerge
2006-04-28 20:35 ` A. Khattri
@ 2006-04-28 20:41 ` Donnie Berkholz
2006-04-28 20:56 ` A. Khattri
2006-04-28 21:01 ` Drake Wyrm
1 sibling, 1 reply; 12+ messages in thread
From: Donnie Berkholz @ 2006-04-28 20:41 UTC (permalink / raw
To: gentoo-dev
A. Khattri wrote:
> Does this sound right or is there a better (preferred?) way?
Try to fix --enable-conf-install to respect DESTDIR or whatever other
install method you're using, or look to see what flag it will take at
'make install' time to use a prefix.
Donnie
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] ACCESS DENIED during emerge
2006-04-28 20:41 ` Donnie Berkholz
@ 2006-04-28 20:56 ` A. Khattri
2006-04-28 21:14 ` Grant Goodyear
0 siblings, 1 reply; 12+ messages in thread
From: A. Khattri @ 2006-04-28 20:56 UTC (permalink / raw
To: gentoo-dev
On Fri, 28 Apr 2006, Donnie Berkholz wrote:
> A. Khattri wrote:
> > Does this sound right or is there a better (preferred?) way?
>
> Try to fix --enable-conf-install to respect DESTDIR or whatever other
> install method you're using, or look to see what flag it will take at
> 'make install' time to use a prefix.
Right now, in src_compile I have this:
./configure \
--prefix=/usr \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--localstatedir=/var \
--enable-conf-install=no \
--enable-mk-localstatedir=no || die "./configure failed"
The last two flags tell it to not install the sample configs in /etc and
to not create a local state directory under /var. I imagine I will have to
do that myself in pkg_postinstall?
--
Aj
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] ACCESS DENIED during emerge
2006-04-28 20:35 ` A. Khattri
2006-04-28 20:41 ` Donnie Berkholz
@ 2006-04-28 21:01 ` Drake Wyrm
2006-04-29 1:56 ` Edward Catmur
1 sibling, 1 reply; 12+ messages in thread
From: Drake Wyrm @ 2006-04-28 21:01 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1868 bytes --]
"A. Khattri" <ajai@bway.net> wrote:
> On Fri, 28 Apr 2006, Chris White wrote:
> > On Friday 28 April 2006 12:41 pm, A. Khattri wrote:
> > > In writing and testing a new ebuild, I ran emerge as root and got
> > > ACCESS DENIED errors when it tried writing two config files into
> > > /etc.
> > >
> > > Do I need to do something special for config files in an ebuild?
> >
> > Don't copy files to the live filesystem, instead do:
> >
> > cp whatever.conf whatever2.conf ${D}/etc/
> >
> > or some people like:
> >
> > insinto /etc
> > doins whatever.conf whatever2.conf
>
> Ah, I see now that the actual make install is trying to do this.
[snip]
> 1. So I need to set --enable-conf-install=no which also implies I need
> to override src_compile
You shouldn't need to completely override src_compile for just that. All
you'd need to do is set EXTRA_ECONF appropriately.
> 2. And then after the build, override pkg_postinst to copy the sample
> config files into /etc
>
> Does this sound right or is there a better (preferred?) way?
As I understand things, it should be done in src_install. One way to do
this is to prevent the package from installing to /etc by using
--enable-conf-install=no and then using one of Chris's two suggestions.
Another way would be to patch the Makefile.in so that it would respect
--prefix=whatever for that portion of the install.
Yet another way would be to patch the Makefile.am and use that to
generate a better Makefile.in. This last method has the added advantage
that you can send the patch upstream for inclusion in the actual package
for some future revision, thereby alleviating the need to deal with this
at all (at some point in the future).
--
There are problems in today's world that cannot be
solved by the level of thinking that created them.
-- Albert Einstein
[-- Attachment #2: Type: application/pgp-signature, Size: 199 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] ACCESS DENIED during emerge
2006-04-28 20:56 ` A. Khattri
@ 2006-04-28 21:14 ` Grant Goodyear
0 siblings, 0 replies; 12+ messages in thread
From: Grant Goodyear @ 2006-04-28 21:14 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]
A. Khattri wrote:
> On Fri, 28 Apr 2006, Donnie Berkholz wrote:
>
>> A. Khattri wrote:
>>> Does this sound right or is there a better (preferred?) way?
>> Try to fix --enable-conf-install to respect DESTDIR or whatever other
>> install method you're using, or look to see what flag it will take at
>> 'make install' time to use a prefix.
>
> Right now, in src_compile I have this:
>
> ./configure \
> --prefix=/usr \
> --infodir=/usr/share/info \
> --mandir=/usr/share/man \
> --localstatedir=/var \
> --enable-conf-install=no \
> --enable-mk-localstatedir=no || die "./configure failed"
>
> The last two flags tell it to not install the sample configs in /etc and
> to not create a local state directory under /var. I imagine I will have to
> do that myself in pkg_postinstall?
You should never use pkg_postinstall to bypass the "fake install" that
we stole from OpenBSD long ago. Instead, you need to install to ${D}:
http://dev.gentoo.org/~plasmaroo/devmanual//ebuild-writing/functions/src_install/
Also see man 5 ebuild; it's extremely helpful.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] ACCESS DENIED during emerge
2006-04-28 21:01 ` Drake Wyrm
@ 2006-04-29 1:56 ` Edward Catmur
2006-04-29 3:01 ` Drake Wyrm
0 siblings, 1 reply; 12+ messages in thread
From: Edward Catmur @ 2006-04-29 1:56 UTC (permalink / raw
To: gentoo-dev
On Fri, 2006-04-28 at 14:01 -0700, Drake Wyrm wrote:
> "A. Khattri" <ajai@bway.net> wrote:
> > Ah, I see now that the actual make install is trying to do this.
> [snip]
> > 1. So I need to set --enable-conf-install=no which also implies I need
> > to override src_compile
>
> You shouldn't need to completely override src_compile for just that. All
> you'd need to do is set EXTRA_ECONF appropriately.
No, EXTRA_ECONF is for end-users to add their own cracktastic configure
flags. Ebuilds should not set it.
--
Ed Catmur
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] ACCESS DENIED during emerge
2006-04-29 1:56 ` Edward Catmur
@ 2006-04-29 3:01 ` Drake Wyrm
2006-04-29 13:12 ` Diego 'Flameeyes' Pettenò
0 siblings, 1 reply; 12+ messages in thread
From: Drake Wyrm @ 2006-04-29 3:01 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 987 bytes --]
Edward Catmur <ed@catmur.co.uk> wrote:
> On Fri, 2006-04-28 at 14:01 -0700, Drake Wyrm wrote:
> > You shouldn't need to completely override src_compile for just that. All
> > you'd need to do is set EXTRA_ECONF appropriately.
> No, EXTRA_ECONF is for end-users to add their own cracktastic configure
> flags. Ebuilds should not set it.
ebuild(5):
HELPER FUNCTIONS: COMPILE
econf [configure options]
[snip]
Note that the EXTRA_ECONF is for users only, not for
ebuild writers. If you wish to pass more options to
configure, just pass the extra arguements to econf.
I stand corrected. Might it be acceptable, though, to set it with
something like
EXTRA_ECONF="--enable-wombats $EXTRA_ECONF"
in the ebuild? That would still allow the users to set their own flags.
--
Human beings, who are almost unique in having the ability
to learn from the experience of others, are also
remarkable for their apparent disinclination to do so.
-- Douglas Adams
[-- Attachment #2: Type: application/pgp-signature, Size: 199 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-dev] ACCESS DENIED during emerge
2006-04-29 3:01 ` Drake Wyrm
@ 2006-04-29 13:12 ` Diego 'Flameeyes' Pettenò
0 siblings, 0 replies; 12+ messages in thread
From: Diego 'Flameeyes' Pettenò @ 2006-04-29 13:12 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 309 bytes --]
On Saturday 29 April 2006 05:01, Drake Wyrm wrote:
> I stand corrected. Might it be acceptable, though, to set it with
> something like
No, it's an user variable.
--
Diego "Flameeyes" Pettenò - http://farragut.flameeyes.is-a-geek.org/
Gentoo/Alt lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-04-29 13:14 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-28 19:41 [gentoo-dev] ACCESS DENIED during emerge A. Khattri
2006-04-28 19:58 ` Chris White
2006-04-28 20:35 ` A. Khattri
2006-04-28 20:41 ` Donnie Berkholz
2006-04-28 20:56 ` A. Khattri
2006-04-28 21:14 ` Grant Goodyear
2006-04-28 21:01 ` Drake Wyrm
2006-04-29 1:56 ` Edward Catmur
2006-04-29 3:01 ` Drake Wyrm
2006-04-29 13:12 ` Diego 'Flameeyes' Pettenò
2006-04-28 19:59 ` Stephen Bennett
2006-04-28 20:35 ` A. Khattri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox