1 |
"A. Khattri" <ajai@××××.net> wrote: |
2 |
> On Fri, 28 Apr 2006, Chris White wrote: |
3 |
> > On Friday 28 April 2006 12:41 pm, A. Khattri wrote: |
4 |
> > > In writing and testing a new ebuild, I ran emerge as root and got |
5 |
> > > ACCESS DENIED errors when it tried writing two config files into |
6 |
> > > /etc. |
7 |
> > > |
8 |
> > > Do I need to do something special for config files in an ebuild? |
9 |
> > |
10 |
> > Don't copy files to the live filesystem, instead do: |
11 |
> > |
12 |
> > cp whatever.conf whatever2.conf ${D}/etc/ |
13 |
> > |
14 |
> > or some people like: |
15 |
> > |
16 |
> > insinto /etc |
17 |
> > doins whatever.conf whatever2.conf |
18 |
> |
19 |
> Ah, I see now that the actual make install is trying to do this. |
20 |
[snip] |
21 |
> 1. So I need to set --enable-conf-install=no which also implies I need |
22 |
> to override src_compile |
23 |
|
24 |
You shouldn't need to completely override src_compile for just that. All |
25 |
you'd need to do is set EXTRA_ECONF appropriately. |
26 |
|
27 |
> 2. And then after the build, override pkg_postinst to copy the sample |
28 |
> config files into /etc |
29 |
> |
30 |
> Does this sound right or is there a better (preferred?) way? |
31 |
|
32 |
As I understand things, it should be done in src_install. One way to do |
33 |
this is to prevent the package from installing to /etc by using |
34 |
--enable-conf-install=no and then using one of Chris's two suggestions. |
35 |
|
36 |
Another way would be to patch the Makefile.in so that it would respect |
37 |
--prefix=whatever for that portion of the install. |
38 |
|
39 |
Yet another way would be to patch the Makefile.am and use that to |
40 |
generate a better Makefile.in. This last method has the added advantage |
41 |
that you can send the patch upstream for inclusion in the actual package |
42 |
for some future revision, thereby alleviating the need to deal with this |
43 |
at all (at some point in the future). |
44 |
|
45 |
-- |
46 |
There are problems in today's world that cannot be |
47 |
solved by the level of thinking that created them. |
48 |
-- Albert Einstein |