public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Bizarre permission problem when installing a package using my own ebuild.
@ 2002-06-05 11:20 Dan Naumov
  2002-06-05 11:37 ` Ryan Shaw
  2002-06-05 13:04 ` Jens "Mr.Big" Blaesche
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Naumov @ 2002-06-05 11:20 UTC (permalink / raw
  To: gentoo-dev

Hello.

I decided to do an ebuild for "WebDownloader for X" and ran into a bizarre permission problem when the compiled package is being installed. For reference, here's the .ebuild itself:

=====================================================================
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="A GUI program for downloading files using FTP/HTTP."

NAME="d4x"

SRC_URI="http://www.krasu.ru/soft/chuchelo/files/${NAME}-${PV}.tar.gz
        ftp://ftp.chg.ru/pub/X11/applications/${NAME}-${PV}.tar.gz"
HOMEPAGE="http://www.krasu.ru/soft/chuchelo/"

LICENSE="Artistic"

DEPEND="=dev-libs/glib-1.2*
        =x11-libs/gtk+-1.2*
        nls? ( sys-devel/gettext )"

S=${WORKDIR}/${NAME}-${PV}

src_compile() {

    local myconf
    use nls || myconf="--disable-nls"
    use oss || myconf="${myconf} --disable-oss"
    use esd || myconf="${myconf} --disable-esd"

    ./configure ${myconf} \
        --prefix=/usr \
        --datadir=/usr/share \
        --infodir=/usr/share/info \
        --mandir=/usr/share/man \
        --enable-release || die "./configure failed"

    emake || die

}

src_install () {

    make DESTDIR=${D} install || die "install failed"

    dodoc AUTHORS COPYING ChangeLog NEWS PLANS README TODO

}
=====================================================================

The package compiles without errors, but during the installation, it aborts with the following error:

=====================================================================
/bin/sh ../admin/mkinstalldirs /usr/share/d4x
mkdir /usr/share/d4x
ACCESS DENIED  mkdir:     /usr/share/d4x
mkdir: cannot create directory `/usr/share/d4x': Permission denied
make[2]: *** [install-data-local] Error 1
make[2]: Leaving directory `/var/tmp/portage/webdownloader-2.0/work/d4x-2.0/share'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/var/tmp/portage/webdownloader-2.0/work/d4x-2.0/share'
make: *** [install-recursive] Error 1

!!! ERROR: The ebuild did not complete successfully.
!!! Function src_install, Line 2, Exitcode 2
!!! install failed

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-webdownloader-2.0-7385.log"

mkdir:     /usr/share/d4x
--------------------------------------------------------------------------------
!!! emerge aborting on  /usr/portage/net-misc/webdownloader/webdownloader-2.0.ebuild .
=====================================================================

I can see that other packages have their subdirectories under /usr/share and that /usr/share itself is drwxr-xr-x and owned by root. I am (obviously) running emerge as root and for the life of me cannot figure out what prevents the ebuild from installing the package completely, any ideas ?

Sincerely,
Dan Naumov


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

* Re: [gentoo-dev] Bizarre permission problem when installing a package using my own ebuild.
  2002-06-05 11:20 [gentoo-dev] Bizarre permission problem when installing a package using my own ebuild Dan Naumov
@ 2002-06-05 11:37 ` Ryan Shaw
  2002-06-05 13:04 ` Jens "Mr.Big" Blaesche
  1 sibling, 0 replies; 3+ messages in thread
From: Ryan Shaw @ 2002-06-05 11:37 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 4162 bytes --]

Have you read the developer docs? 

Emerge is working exactly as it is supposed to. When you 
emerge a package, it is first installed into an "image" 
directory under /var/tmp/portage. Only if this install
proceeds without error does portage then merge this
image into the actual system, i.e. the "real" dirs. 

It is up to the ebuild writer to make sure that the 
respects this. If an ebuild tries to install anything 
outside of the image directory, it will cause an access 
violation like the one you saw. Portage sandboxes ebuilds 
so that even though you are running as root, nothing can 
be changed outside of the image dir until the final "merge" 
step. This keeps broken ebuilds from fscking up your system.

Read the developer docs thoroughly, and check out 
/usr/lib/portage/bin/ebuild.sh for the gritty details.
 
Ryan

On Wed, 2002-06-05 at 20:20, Dan Naumov wrote:
> Hello.
> 
> I decided to do an ebuild for "WebDownloader for X" and ran into a bizarre permission problem when the compiled package is being installed. For reference, here's the .ebuild itself:
> 
> =====================================================================
> # Copyright 1999-2002 Gentoo Technologies, Inc.
> # Distributed under the terms of the GNU General Public License v2
> # $Header: $
> 
> DESCRIPTION="A GUI program for downloading files using FTP/HTTP."
> 
> NAME="d4x"
> 
> SRC_URI="http://www.krasu.ru/soft/chuchelo/files/${NAME}-${PV}.tar.gz
>         ftp://ftp.chg.ru/pub/X11/applications/${NAME}-${PV}.tar.gz"
> HOMEPAGE="http://www.krasu.ru/soft/chuchelo/"
> 
> LICENSE="Artistic"
> 
> DEPEND="=dev-libs/glib-1.2*
>         =x11-libs/gtk+-1.2*
>         nls? ( sys-devel/gettext )"
> 
> S=${WORKDIR}/${NAME}-${PV}
> 
> src_compile() {
> 
>     local myconf
>     use nls || myconf="--disable-nls"
>     use oss || myconf="${myconf} --disable-oss"
>     use esd || myconf="${myconf} --disable-esd"
> 
>     ./configure ${myconf} \
>         --prefix=/usr \
>         --datadir=/usr/share \
>         --infodir=/usr/share/info \
>         --mandir=/usr/share/man \
>         --enable-release || die "./configure failed"
> 
>     emake || die
> 
> }
> 
> src_install () {
> 
>     make DESTDIR=${D} install || die "install failed"
> 
>     dodoc AUTHORS COPYING ChangeLog NEWS PLANS README TODO
> 
> }
> =====================================================================
> 
> The package compiles without errors, but during the installation, it aborts with the following error:
> 
> =====================================================================
> /bin/sh ../admin/mkinstalldirs /usr/share/d4x
> mkdir /usr/share/d4x
> ACCESS DENIED  mkdir:     /usr/share/d4x
> mkdir: cannot create directory `/usr/share/d4x': Permission denied
> make[2]: *** [install-data-local] Error 1
> make[2]: Leaving directory `/var/tmp/portage/webdownloader-2.0/work/d4x-2.0/share'
> make[1]: *** [install-am] Error 2
> make[1]: Leaving directory `/var/tmp/portage/webdownloader-2.0/work/d4x-2.0/share'
> make: *** [install-recursive] Error 1
> 
> !!! ERROR: The ebuild did not complete successfully.
> !!! Function src_install, Line 2, Exitcode 2
> !!! install failed
> 
> --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
> LOG FILE = "/tmp/sandbox-webdownloader-2.0-7385.log"
> 
> mkdir:     /usr/share/d4x
> --------------------------------------------------------------------------------
> !!! emerge aborting on  /usr/portage/net-misc/webdownloader/webdownloader-2.0.ebuild .
> =====================================================================
> 
> I can see that other packages have their subdirectories under /usr/share and that /usr/share itself is drwxr-xr-x and owned by root. I am (obviously) running emerge as root and for the life of me cannot figure out what prevents the ebuild from installing the package completely, any ideas ?
> 
> Sincerely,
> Dan Naumov
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [gentoo-dev] Bizarre permission problem when installing a package using my own ebuild.
  2002-06-05 11:20 [gentoo-dev] Bizarre permission problem when installing a package using my own ebuild Dan Naumov
  2002-06-05 11:37 ` Ryan Shaw
@ 2002-06-05 13:04 ` Jens "Mr.Big" Blaesche
  1 sibling, 0 replies; 3+ messages in thread
From: Jens "Mr.Big" Blaesche @ 2002-06-05 13:04 UTC (permalink / raw
  To: gentoo-dev

Am Mit, 2002-06-05 um 13.20 schrieb Dan Naumov:
> Hello.
> 
> I decided to do an ebuild for "WebDownloader for X" and ran into a bizarre permission problem when the compiled package is being installed. For reference, here's the .ebuild itself:
> 

is already available -> net-misc/nt . -> emerge nt

J.






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

end of thread, other threads:[~2002-06-05 13:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-05 11:20 [gentoo-dev] Bizarre permission problem when installing a package using my own ebuild Dan Naumov
2002-06-05 11:37 ` Ryan Shaw
2002-06-05 13:04 ` Jens "Mr.Big" Blaesche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox