Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658460 - sys-process/at-3.1.20: runs chown in pkg_postinst
Summary: sys-process/at-3.1.20: runs chown in pkg_postinst
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Zoltan Puskas
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2018-06-19 07:16 UTC by Michał Górny
Modified: 2023-08-09 18:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-06-19 07:16:01 UTC
Why does the ebuild chown/chmod everything post-install, instead of doing it either in src_install or pkg_preinst?  In the latter case, I think you could also delay creating the user until preinst.

http://michael.orlitzky.com/articles/end_root_chowning_now_%28make_pkg_postinst_great_again%29.xhtml
Comment 1 Zoltan Puskas 2023-07-30 23:30:56 UTC
It seems that keepdir changes the permissions on the /var/spool/at/atspool directory, that's why the previous owner opted to fix that in pkg_postinst.

Moving ownership and permission setting into src_install after keepdir should work though.
Comment 2 Larry the Git Cow gentoo-dev 2023-08-09 18:15:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=681086e7c5050ab59ecf09c139470ee8408af6d6

commit 681086e7c5050ab59ecf09c139470ee8408af6d6
Author:     Zoltan Puskas <zoltan@sinustrom.info>
AuthorDate: 2023-07-30 22:30:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-09 18:14:48 +0000

    sys-process/at: Fix several installation issues
    
    - Fix `at` binary ownership
    - Remove `pkg_postinst()` since Makefile actually sets the ownership and
      permissions as needed. Fix broken permission by keepdir in scr_install
      instead.
    
    Closes: https://bugs.gentoo.org/658460
    Closes: https://bugs.gentoo.org/711598
    Signed-off-by: Zoltan Puskas <zoltan@sinustrom.info>
    Closes: https://github.com/gentoo/gentoo/pull/32113
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-process/at/at-3.2.5-r2.ebuild                  | 91 ++++++++++++++++++++++
 .../at-3.2.5-Makefile.binary-permission-fix.patch  | 12 +++
 2 files changed, 103 insertions(+)