<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>24178</bug_id>
          
          <creation_ts>2003-07-09 07:55 0000</creation_ts>
          <short_desc>gdbm files installed as bin:bin instead of root:root</short_desc>
          <delta_ts>2005-09-21 16:15:06 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Library</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>splite-gentoo@sigint.cs.purdue.edu</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>dc1847@gmail.com</cc>
    
    <cc>ppc-macos@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>splite-gentoo@sigint.cs.purdue.edu</who>
            <bug_when>2003-07-09 07:55:15 0000</bug_when>
            <thetext>gdbm installs its files with bin:bin ownership instead of root:root.  Here&apos;s an
ebuild patch:

diff -u gdbm-1.8.0-r5.ebuild.orig gdbm-1.8.0-r5.ebuild
--- gdbm-1.8.0-r5.ebuild.orig   2003-06-22 01:21:43.000000000 -0500
+++ gdbm-1.8.0-r5.ebuild        2003-07-09 09:49:27.000000000 -0500
@@ -41,12 +41,12 @@
 }
 
 src_install() {
-       make prefix=${D}/usr \
+       make BINOWN=root BINGRP=root prefix=${D}/usr \
                man3dir=${D}/usr/share/man/man3 \
                infodir=${D}/usr/share/info \
                install || die
 
-       make includedir=${D}/usr/include/gdbm \
+       make BINOWN=root BINGRP=root includedir=${D}/usr/include/gdbm \
                install-compat || die
 
        dosed &quot;s:/usr/local/lib&apos;:/usr/lib&apos;:g&quot; /usr/lib/libgdbm.la


Reproducible: Always
Steps to Reproduce:
1.
2.
3.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gmsoft@gentoo.org</who>
            <bug_when>2003-11-13 15:07:13 0000</bug_when>
            <thetext>Wonder why this was assigned to me.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mholzer@gentoo.org</who>
            <bug_when>2004-04-22 11:24:18 0000</bug_when>
            <thetext>what&apos;s the problem when ownership is wrong ?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mholzer@gentoo.org</who>
            <bug_when>2004-04-22 11:24:59 0000</bug_when>
            <thetext>finally fixed, since econf and emake are used now</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>splite-gentoo@sigint.cs.purdue.edu</who>
            <bug_when>2005-09-20 20:06:51 0000</bug_when>
            <thetext>The problem when the ownership is wrong is that it&apos;s bad form to install files
that aren&apos;t owned by root in system directories.  There&apos;s no reason gdbm&apos;s files
need to be owned by bin:bin.  In fact, this later caused bug #96743 because Mac
OS X doesn&apos;t have user/group bin.

And no, using econf and emake doesn&apos;t fix the problem.  BINOWN and BINGRP are
hardcoded to &quot;bin&quot; in Makefile.in and aren&apos;t affected by configure.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-09-21 05:43:11 0000</bug_when>
            <thetext>*** Bug 96743 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2005-09-21 10:27:44 0000</bug_when>
            <thetext>Created an attachment (id=68944)
gdbm-1.8.3-r1.ebuild patch which uses suggested fix

on OSX the group of root is wheel, so we cannot hardcode root:root here.  I
attached a patch where I revert the OSX specific bin user/group creation and
use the suggested BINOWN and BINGRP variables to set the root user and it&apos;s
primary group via a call to `id -gn root`.

I&apos;m not sure on whether this is the right way to do it, but it appears to work
on OSX and linux.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2005-09-21 10:40:20 0000</bug_when>
            <thetext>thinking this over, we could just use uid=0 and gid=0 instead of trying with
names and avoid the `id -gn root` call.  However, if portage ever will allow
non-root installs, then it would require here to use `id -u` and `id -g` for
user and group respectively.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>splite-gentoo@sigint.cs.purdue.edu</who>
            <bug_when>2005-09-21 13:24:46 0000</bug_when>
            <thetext>Hoist on my own petard. :)  Should have used 0 instead of root, sorry about
that.  (In my defense, it _is_ an old patch and predates the &quot;which group is gid
0?&quot; saga.)  As for non-root installs, I&apos;d be tempted to just rip out the
Makefile bits that set the ownership and send the patch upstream.  There&apos;s just
no need for gdbm to set the file ownership at all, IMO.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-09-21 16:15:06 0000</bug_when>
            <thetext>fixed in cvs</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>68944</attachid>
            <date>2005-09-21 10:27 0000</date>
            <desc>gdbm-1.8.3-r1.ebuild patch which uses suggested fix</desc>
            <filename>ebuild.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IGdkYm0tMS44LjMtcjEuZWJ1aWxkCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC92YXIvY3Zz
cm9vdC9nZW50b28teDg2L3N5cy1saWJzL2dkYm0vZ2RibS0xLjguMy1yMS5lYnVpbGQsdgpyZXRy
aWV2aW5nIHJldmlzaW9uIDEuMTUKZGlmZiAtdSAtcjEuMTUgZ2RibS0xLjguMy1yMS5lYnVpbGQK
LS0tIGdkYm0tMS44LjMtcjEuZWJ1aWxkCTEwIFNlcCAyMDA1ID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