Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92323 - nagios-core-1.2-r2 doesn't install as a binary package
Summary: nagios-core-1.2-r2 doesn't install as a binary package
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-11 19:32 UTC by CJ Kucera
Modified: 2005-09-26 08:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description CJ Kucera 2005-05-11 19:32:22 UTC
If you build nagios-core-1.2-r2 with buildpkg turned on in FEATURES (or, presumably, if you use quickpkg to make a package from an installed version), the resulting binary package doesn't install cleanly onto the destination host:

# emerge -K nagios-core
Calculating dependencies ...done!
>>> emerge (1 of 1) net-analyzer/nagios-core-1.2-r99 to /
>>> extracting info
>>> extracting nagios-core-1.2-r99
>>> Merging net-analyzer/nagios-core-1.2-r99 to /
chown: cannot access `/var/tmp/portage/nagios-core-1.2-r99/image//var/nagios/rw': No such file or directory

!!! ERROR: net-analyzer/nagios-core-1.2-r99 failed.

The problem is in the if block starting on line 184 of the ebuild:

    if use noweb; then
        chown nagios:nagios ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
    else
        chown nagios:apache ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw"
    fi

That's in pkg_preinst.  There's a 'keepdir' for that directory in src_install, but I'm guessing that just gets wrapped up inside the package's tarball and not expanded into the image directory in time for pkg_preinst to have the data there.

The fix for this is actually already present in both -r3 and -r4, with the addition of a 'keepdir' statement for the directory in question inside of pkg_preinst.  -r3 and -r4 are still marked ~x86, though, so unless one of those gets unmasked, that keepdir statement should probably be added into the -r2 ebuild as well.

Reproducible: Always
Steps to Reproduce:
1. on host A: FEATURES="buildpkg" emerge =net-analyzer/nagios-core-1.2-r2
2. either transfer the package in PKGDIR from host A to host B, or make sure that PKGDIR is NFS-mounted (or whatever) properly over on host B.
3. on host B: emerge -K =net-analyzer/nagios-core-1.2-r2

Actual Results:  
That results in the error message I specified up in the 'Details' section.

Expected Results:  
nagios-core should be installed properly

As I mentioned in the 'Details' section above, the fix is to add a keepdir
statement to pkg_preinst, like the -r3 and -r4 ebuilds are doing (or,
alternatively, unmask -r3 or -r4).
Comment 1 CJ Kucera 2005-05-11 19:44:11 UTC
Blast, I copy/pasted the excerpt from one attempt to install a modified ebuild I had in my local portage tree (note the -r99 in there).  The actual stock -r2 ebuild functions the same way, though.  Sorry about that.
Comment 2 Daniel Black (RETIRED) gentoo-dev 2005-05-25 06:01:46 UTC
nagios-core-1.2 nolonger exists in portage. 
Comment 3 CJ Kucera 2005-05-25 07:31:44 UTC
Er...

Are you sure about that?

viewcvs says it still exists:
http://www.gentoo.org/cgi-bin/viewcvs.cgi/net-analyzer/nagios-core/?hideattic=1

My sync from about 10 minutes ago still contains it:
pez@mcp:~$ emerge -pv net-analyzer/nagios-core
...
[ebuild  N    ] net-analyzer/nagios-core-1.2-r2  -apache2 -debug +mysql -noweb
+perl +postgres 1,587 kB

I also asked a friend who's a Gentoo dev to check in cvs just in case it was
removed very recently and my mirror/viewcvs hadn't caught up with reality yet.

I'm gonna mark this as "reopened" (or at least I'll try to; dunno if I have
permissiont to do so or not)...  Apologies if that's an impatient/rude/whatever
thing to do.
Comment 4 Daniel Black (RETIRED) gentoo-dev 2005-05-25 14:03:50 UTC
opps sorry. must of been looking at the wrong package. 
Comment 5 Eldad Zack (RETIRED) gentoo-dev 2005-09-26 08:30:46 UTC
marked -r3 and -r4 stable. issue resolved in these ebuilds.