Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710014 - net-misc/dhcp-4.4.2-r1: uses both acct-{group,user}/dhcp and calls enewgroup/enewuser
Summary: net-misc/dhcp-4.4.2-r1: uses both acct-{group,user}/dhcp and calls enewgroup/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-18 06:21 UTC by Tomáš Mózes
Modified: 2020-02-18 09:09 UTC (History)
0 users

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 Tomáš Mózes 2020-02-18 06:21:29 UTC
I suppose these should be dropped:
enewgroup dhcp
enewuser dhcp -1 -1 /var/lib/dhcp dhcp

And since acct-user/dhcp doesn't set a home directory, we should keepdir /var/lib/dhcp in the ebuild (with the correct user/group).

Thanks
Comment 1 Tomáš Mózes 2020-02-18 06:32:12 UTC
Oh, just found out /var/lib/dhcp is created in the init script. However, shouldn't we set 750 perms on it?
Comment 2 Tomáš Mózes 2020-02-18 06:33:47 UTC
--- /usr/portage/net-misc/dhcp/dhcp-4.4.2-r1.ebuild     2020-01-24 22:09:52.000000000 +0000
+++ dhcp-4.4.2-r1.ebuild        2020-02-18 06:24:34.827827323 +0000
@@ -236,12 +236,12 @@
                mv "${f}" "${f%.example}" || die
        done
        sed -i '/^[^#]/s:^:#:' "${ED}"/etc/dhcp/*.conf || die
+
+       diropts -m0750 -o dhcp -g dhcp
+       keepdir /var/lib/dhcp
 }

 pkg_preinst() {
-       enewgroup dhcp
-       enewuser dhcp -1 -1 /var/lib/dhcp dhcp
-
        # Keep the user files over the sample ones.  The
        # hashing is to ignore the crappy defaults #384087.
        local f h
Comment 3 Larry the Git Cow gentoo-dev 2020-02-18 08:23:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=557fd8ba795a841069d6c3709fec7f6b57b51568

commit 557fd8ba795a841069d6c3709fec7f6b57b51568
Author:     Tomáš Mózes <hydrapolic@gmail.com>
AuthorDate: 2020-02-18 08:21:12 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2020-02-18 08:23:00 +0000

    net-misc/dhcp: Revbump to remove old user eclass remnants
    
    Closes: https://bugs.gentoo.org/710014
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 net-misc/dhcp/{dhcp-4.4.2-r1.ebuild => dhcp-4.4.2-r2.ebuild} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Comment 4 Tomáš Mózes 2020-02-18 09:09:12 UTC
Thank you Lars.