FS#7182 - pacman -Q --changelog works only as root

Attached to Project: Pacman
Opened by Attila (attila) - Thursday, 17 May 2007, 06:18 GMT
Last edited by Xavier (shining) - Monday, 03 December 2007, 19:52 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Dan McGee (toofishes)
Architecture All
Severity Low
Priority Normal
Reported Version 3.0.4
Due in Version 3.1.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I created an own package using fakeroot (umask user: 007) and includes a ChangeLog. As normal user i can't see it with pacman (Fehler: Kein Änderungsprotokoll für 'PACKAGE' verfügbar) and as root it works. The reason be the file permissions of this Changelog:
-rw-r----- 1 root root

An "find /var/lib/pacman/local -type f -perm 640" shows that the *.install files from my own packages has the same file permissions but this has for me more cosmetically character.
This task depends upon

This task blocks these from closing
 FS#8109 - Pacman 3.1 Release Roadmap 
Closed by  Xavier (shining)
Monday, 03 December 2007, 19:52 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed by Aaron in git, commit 5f811dc020.
Comment by Aaron Griffin (phrakture) - Thursday, 17 May 2007, 15:31 GMT
This is technically a packaging problem, but we can fix it (and probably should) in libalpm.

Note to self: on DB extraction, use archive_entry_set_mode() and force DB to 644 across the board.
Comment by Aaron Griffin (phrakture) - Thursday, 15 November 2007, 01:12 GMT
This is done locally, need to test it though
Comment by Aaron Griffin (phrakture) - Thursday, 15 November 2007, 01:22 GMT Comment by Dan McGee (toofishes) - Thursday, 29 November 2007, 19:04 GMT
I believe this is working fine now, but can anyone confirm? Perhaps make a package with a changelog with permissions of 400, then install and see if you can read the changelog as root.
Comment by Aaron Griffin (phrakture) - Thursday, 29 November 2007, 19:19 GMT Comment by Xavier (shining) - Thursday, 29 November 2007, 19:32 GMT
Looks like the last pacman package in Dan's repo was built after this change.
I can't confirm it was fixed though, the changelog kept the 400 permission when installing the package.
Sorry, I don't have time to investigate this issue now, but tomorrow or this week end, I can have a better look.

To Dan : I think you meant "as user", not "as root" :)
Comment by Xavier (shining) - Thursday, 29 November 2007, 23:45 GMT
Well, I gave a quick look, and it's actually pretty simple.
_alpm_unpack in util.c is only used for extracting the scriptlets and the databases.
The ChangeLog extraction is done in add.c , with every other files, and doesn't use the _alpm_unpack function.
Comment by Aaron Griffin (phrakture) - Thursday, 29 November 2007, 23:55 GMT
Already done:
http://code.phraktured.net/?p=pacman.git;a=commit;h=531772693e0aade8a577f33af3e3c91aac616d84

See also the commit above it for why I used 0644 for both. I need to test THAT commit much much more.
Comment by Xavier (shining) - Friday, 30 November 2007, 00:39 GMT
Ok, just confirming that commit does fix the changelog permission problem.

Loading...