pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Wrong directory ownership or permissions warning when install package



On 5/22/15 2:58 PM, J. Lewis Muir wrote:
> On 5/7/15 3:10 PM, J. Lewis Muir wrote:
>> Hello, pkgsrc Users!
>>
>> After building my 2015Q1 packages on OS X Yosemite using pbulk with
>> a pbulk user, when I install some of the packages, I get messages
>> about directories used by the package having wrong ownership and/or
>> permissions like this:
>>
>> =====================================================================
>>   The following directories are used by pkg_alternatives-1.6 and
>>   have the wrong ownership and/or permissions:
>>
>>         /opt/pkg/etc/pkg_alternatives (m=755, o=pbulk, g=pbulk)
>> =====================================================================
>>
>> (If it's helpful, the full list of such messages that I get is
>> below.)  Indeed the ownership of the files is different.  This is
>> intentional; I build the packages as the pbulk user, but my installed
>> files have nothing to do with that user.  Is there a way to turn off
>> these warnings, or am I building my packages incorrectly, or is it
>> something else?
>
> Hello.
>
> Any ideas on this?

I'll answer my own question.  The reason was that I had specified
the "--unprivileged" option when bootstrapping the pbulk and pkg
trees.  After removing that option, rebootstrapping, and rebuilding the
pkg_alternatives package, pkg_info now shows:

===
$ pkg_info -i pkg_alternatives-1.6.tgz | egrep '^# DIR'
# DIR: etc/pkg_alternatives m 755 root wheel
# DIR: etc/pkg_alternatives m
# DIR: libdata/pkg_alternatives fm
===

As you can see, the pbulk owner and group are no longer there in the
package, now the owner and group are root and wheel.

Unfortunately, when I install this package using pkg_add as an admin
user that is not root, into a prefix that is owned by the admin user,
not root, I still get the following warning message:

========================================================================
The following directories are used by pkg_alternatives-1.6 and
have the wrong ownership and/or permissions:

	/opt/pkg/etc/pkg_alternatives (m=755, o=root, g=wheel)

========================================================================

It works, but it emits this warning message.  It seems like pkgsrc
builds packages expecting them to be installed by root (assuming one has
not specified the "--unprivileged" bootstrap option).  Is that true?

Thanks!

Lewis


Home | Main Index | Thread Index | Old Index