FS#9176 - pacman -Ss as normal user and a local repository
Attached to Project:
Pacman
Opened by Attila (attila) - Saturday, 12 January 2008, 19:29 GMT
Last edited by Xavier (shining) - Monday, 14 January 2008, 23:28 GMT
Opened by Attila (attila) - Saturday, 12 January 2008, 19:29 GMT
Last edited by Xavier (shining) - Monday, 14 January 2008, 23:28 GMT
|
Details
Summary and Info:
I got a lot of messages about that files from my local repository can not be open. The permissions of the files looks okay '-rw-r--r-- root root' but the permissions of the directories be bad 'drwxr-x--- root root'. Steps to Reproduce: 1. Update to the new pacman (and config something) 2. 'pacman -Sc' with deleting unnecessary repos 3. 'pacman -Sy' 4. 'pacman -Ss' as normal user |
This task depends upon
Closed by Xavier (shining)
Monday, 14 January 2008, 23:28 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in git, commit 8186dc11a90db.
Monday, 14 January 2008, 23:28 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in git, commit 8186dc11a90db.
Or do you think it was caused by the upgrade to pacman 3.1? I don't see how that's possible.
Probably it won't help, but it's good to have more details, for example do ls -l on some broken entries and paste or attach the output here.
That is, something under /var/lib/pacman/sync/ , not /var/lib/pacman/local/ ?
Did you try running : pacman -Syy ?
And also, did you try with other mirrors?
drwxr-x--- 2 root root 16 13. Jan 09:16 kdeicons-gorilla-1.3.5-1ah
drwxr-x--- 2 root root 16 13. Jan 09:16 kdeicons-gorilla-svg-1.4-1ah
Example of inside one of them:
-rw-r--r-- 1 root root 53 13. Jan 09:16 depends
-rw-r--r-- 1 root root 362 13. Jan 09:16 desc
Before the update i an do a pacman -Ss as normal user and this happens only to my local repository which stays in /var/lib/pacman/sync/attila. I do a "chmod 755 *" inside of this directoy but after adding something to my local repo (repo-add /home/packages/pkg/attila.db.tar.gz PACKAGE) and a "pacman -Sy" the wrong file permissions been back.
Root use the normal umask and my user have the umask 007. Ah, now i know from where this comes: This be the same file permissions as in /home/packages/pkg/attila.db.tar.gz. But the strange thing is that after a 'pacman -Sy' the files *.depends and *.desc get the 'r' flag for other user (644) instead of that in the archiv they have it not (640) but the directories stays with their bad permissions.
I hope you understand something from my poor english.-)
As you noticed, pacman enforce the permissions of the files in the sync database to 644.
But it didn't change the directory permission to 755. That's a very easy change in pacman code.
But as makepkg sets the umask itself to 022 to avoid these kind of problems, maybe repo-add should do the same?
I just tried that, and it seems to work fine.
I try to support you more and take a look at repo-{add,remove} too but you was faster than mine.-) My solution, which is only for the stats and no suggestion, starts a little bit later but perhaps you be interested for it:
# if all operations were a success, rezip database
if [ $success -eq 1 ]; then
msg "$(gettext "Creating updated database file %s")" "$REPO_DB_FILE"
+ find "$gstmpdir" -type d -print0 | xargs -r0 chmod 755
+ find "$gstmpdir" -type f -print0 | xargs -r0 chmod 644
pushd "$gstmpdir" 2>&1 >/dev/null