[pacman-dev] [RFC] Correct directory permissions if the extracting package is the only owner

Allan McRae allan at archlinux.org
Mon Feb 2 10:21:48 UTC 2015


On 02/02/15 03:30, Doug Newgard wrote:
> On Sun,  1 Feb 2015 21:09:56 +1000
> Allan McRae <allan at archlinux.org> wrote:
> 
>> Adjusting permissions of directories in their install scripts results
>> in warnings such as the following when the package update:
>>
>> warning: directory ownership differs on /var/lib/postfix/
>> filesystem: 73:0 package: 0:0
>>
>> If the package being installed is the only owner of the directory,
>> update the directory's permissions to those in the package file.
>>
>> This also allows directory permissions for a package to be changed
>> directly in the PKGBUILD file rather that requiring adjustment in an
>> install scriptlet.
>>
>> Signed-off-by: Allan McRae <allan at archlinux.org>
>> ---
>>
>> This does require searching through all installed packages filelist
>> to see if any other directories own this file, which does create a
>> slowdown in these error cases. Once the ability to use symbolic names
>> for owners is added, this code path will run only if there is an
>> acutal error or in the rare case that directory permissions are
>> genuinely being changed.
>>
>> Packages can currently avoid this being run by reverting their
>> directory permission changes in pre_upgrade().
>>
>> I'd like to push this to maint if people agree.  These "false"
>> warnings are causing too many issues.
> 
> So what can the user do if they changed it themselves and want
> different permissions than what's in the package?
> 

The same thing as always...  Add it to NoExtract

A


More information about the pacman-dev mailing list