FS#36770 - [lxdm] do not set permissions in post_install/upgrade

Attached to Project: Community Packages
Opened by Allan McRae (Allan) - Monday, 02 September 2013, 04:52 GMT
Last edited by Allan McRae (Allan) - Sunday, 08 September 2013, 22:29 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Balló György (City-busz)
Daniel Wallace (gtmanfred)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

No idea whose bright idea this was!

In the lxdm post_install there is:

chown -R 121:121 /var/lib/lxdm
chgrp 121 /etc/lxdm/lxdm.conf
chmod +r /etc/lxdm/lxdm.conf

Do that in the PKGBUILD. That was pacman can track the permissions. The "chmod +r" is especially bad...


Also, the post_upgrade runs post_install which does a usermod which reports "usermod: no changes". Then the same usermod command is in the post_upgrade but in a vercmp block to prevent it being run.


And while I am ranting:
- applying half the patches in prepare() and the rest in build() is strange.
- there is no need for the "s:sbin:bin:" sed - the symlinks work fine.
- the chmod on .pam_environment is unneeded
- why is "/" used as a separator in the sed statement on lxdm.conf when replacing paths with "/" in them...
- the echo statement has "\t"s in it. These should be actual tabs.
This task depends upon

Closed by  Allan McRae (Allan)
Sunday, 08 September 2013, 22:29 GMT
Reason for closing:  Fixed
Additional comments about closing:  0.4.1-25
Comment by Balló György (City-busz) - Friday, 06 September 2013, 05:55 GMT
I rewrote the PKGBUILD and .install file. Please check the version 0.4.1-24, it's in the [community-testing] repository, and report if you still found problems.
Comment by Allan McRae (Allan) - Friday, 06 September 2013, 06:03 GMT
The install file still has:
chown -R lxdm:lxdm /var/lib/lxdm > /dev/null

which results in pacman (4.2) outputting:

warning: directory ownership differs on /var/lib/lxdm/
filesystem: 121:121 package: 0:0

just "chown -R 121:121 $pkgdir/var/lib/lxdm" in the PKGBUILD
Comment by Balló György (City-busz) - Sunday, 08 September 2013, 22:19 GMT
Please check the version 0.4.1-25. I think that everything is implemented now.

Loading...