List Info

Thread: ACCESS DENIED during emerge




ACCESS DENIED during emerge
user name
2006-04-28 19:41:48
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-devgentoo.org mailing list

ACCESS DENIED during emerge
user name
2006-04-28 19:59:58
On Fri, 28 Apr 2006 15:41:48 -0400 (EDT)
"A. Khattri" <ajaibway.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.gen
too.org/~plasmaroo/devmanual//appendices/common-problems/#ha
ndling-access-violations
-- 
gentoo-devgentoo.org mailing list

ACCESS DENIED during emerge
user name
2006-04-28 19:58:46
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 $/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
ACCESS DENIED during emerge
user name
2006-04-28 20:35:11
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 $/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-devgentoo.org mailing list

ACCESS DENIED during emerge
user name
2006-04-28 20:41:55
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-devgentoo.org mailing list

ACCESS DENIED during emerge
user name
2006-04-28 20:35:57
On Fri, 28 Apr 2006, Stephen Bennett wrote:

> On Fri, 28 Apr 2006 15:41:48 -0400 (EDT)
> "A. Khattri" <ajaibway.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.gen
too.org/~plasmaroo/devmanual//appendices/common-problems/#ha
ndling-access-violations
>


Thanks for this useful resource.



-- 
Aj


-- 
gentoo-devgentoo.org mailing list

ACCESS DENIED during emerge
user name
2006-04-28 20:56:54
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-devgentoo.org mailing list

ACCESS DENIED during emerge
user name
2006-04-28 21:01:34
"A. Khattri" <ajaibway.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 $/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
ACCESS DENIED during emerge
user name
2006-04-28 21:14:07
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 $:

http://dev.gentoo.org/~plasmaro
o/devmanual//ebuild-writing/functions/src_install/

Also see man 5 ebuild; it's extremely helpful.

ACCESS DENIED during emerge
user name
2006-04-29 01:56:57
On Fri, 2006-04-28 at 14:01 -0700, Drake Wyrm wrote:
> "A. Khattri" <ajaibway.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-devgentoo.org mailing list

ACCESS DENIED during emerge
user name
2006-04-29 03:01:45
Edward Catmur <edcatmur.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
ACCESS DENIED during emerge
user name
2006-04-29 13:12:02
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://farra
gut.flameeyes.is-a-geek.org/
Gentoo/Alt lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM,
KDE
[1-12]

about | contact  Other archives ( Real Estate discussion Medical topics )