Welcome to CRUX bug tracking.

FS#379 - pkgutils: rejmerge ignores directory permissions

Attached to Project: CRUX
Opened by Juergen Daubert (jue) - Wednesday, 19 November 2008, 13:24 GMT
Last edited by Tim Biermann (tb) - Thursday, 24 June 2021, 11:25 GMT
Task Type Bug Report
Category tools → pkgutils
Status Work in Progress
Assigned To CRUX Developers (crux)
Operating System CRUX
Severity Low
Priority Normal
Reported Version Development
Due in Version Undecided
Due Date Undecided
Percent Complete 10%
Votes 1
Private No


if a directory, rejected by pkgadd, has new/other permissions or user/group than the installed one, rejmerge should do an update which the current version refused to do.

How to reproduce:

1. echo >> /var/spool/cron/crontabs/root
2. chown daemon /var/spool/cron/crontabs
3. cd /usr/ports/core/dcron
4. pkgmk -u

pkgadd reports something like that:

pkgadd: rejecting var/spool/cron/crontabs/, keeping existing version
pkgadd: rejecting var/spool/cron/crontabs/root, keeping existing'version

5. run rejmerge

step 1. above is necessary because pkgadd doesn't add empty directories to /var/lib/pkg/rejected, which might be considered as bug as well.

Attached patch adds a check of directory permissions to rejmerge.
This task depends upon

Comment by Juergen Daubert (jue) - Wednesday, 19 November 2008, 14:09 GMT
That issue was already reported with ticket #122
Comment by Jose V Beneyto (sepen) - Friday, 22 June 2012, 10:55 GMT
This comment was added from  FS#122  (Opened by Mark Rosenstand) which I closed as duplicated:

"If a directory matches UPGRADE NO and the permissions are different from the installed directory, it gets rejected. However, rejmerge gladly ignore them (whereas the user is prompted for an action when file permissions change) and delete the rejected directory."
Comment by Jose V Beneyto (sepen) - Friday, 22 June 2012, 14:28 GMT
Attached updated patch