Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 702508 - devmanual: update example acct-* ebuilds to match recommendations
Summary: devmanual: update example acct-* ebuilds to match recommendations
Status: RESOLVED FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Devmanual (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Devmanual Team
URL: https://archives.gentoo.org/gentoo-de...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-12-11 02:13 UTC by Michael Orlitzky
Modified: 2020-01-23 19:29 UTC (History)
1 user (show)

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


Attachments
0001-ebuild-writing-users-and-groups-use-an-explicit-plac.patch (0001-ebuild-writing-users-and-groups-use-an-explicit-plac.patch,1.35 KB, patch)
2019-12-11 02:16 UTC, Michael Orlitzky
Details | Diff
0002-ebuild-writing-users-and-groups-drop-uncommon-variab.patch (0002-ebuild-writing-users-and-groups-drop-uncommon-variab.patch,1.14 KB, patch)
2019-12-11 02:16 UTC, Michael Orlitzky
Details | Diff
0003-ebuild-writing-users-and-groups-replace-example-grou.patch (0003-ebuild-writing-users-and-groups-replace-example-grou.patch,1.08 KB, patch)
2019-12-11 02:17 UTC, Michael Orlitzky
Details | Diff
0003-ebuild-writing-users-and-groups-replace-example-grou.patch (0003-ebuild-writing-users-and-groups-replace-example-grou.patch,1.08 KB, patch)
2019-12-19 13:53 UTC, Michael Orlitzky
Details | Diff
0004-ebuild-writing-users-and-groups-use-non-fictional-ex.patch (0004-ebuild-writing-users-and-groups-use-non-fictional-ex.patch,2.49 KB, patch)
2019-12-19 13:54 UTC, Michael Orlitzky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Orlitzky gentoo-dev 2019-12-11 02:13:53 UTC
Following up on bug 693964, hopefully the commits are self-explanatory.
Comment 1 Michael Orlitzky gentoo-dev 2019-12-11 02:16:26 UTC
Created attachment 599110 [details, diff]
0001-ebuild-writing-users-and-groups-use-an-explicit-plac.patch
Comment 2 Michael Orlitzky gentoo-dev 2019-12-11 02:16:46 UTC
Created attachment 599112 [details, diff]
0002-ebuild-writing-users-and-groups-drop-uncommon-variab.patch
Comment 3 Michael Orlitzky gentoo-dev 2019-12-11 02:17:07 UTC
Created attachment 599114 [details, diff]
0003-ebuild-writing-users-and-groups-replace-example-grou.patch
Comment 4 Ulrich Müller gentoo-dev 2019-12-11 05:49:29 UTC
(In reply to Michael Orlitzky from comment #1)
> Created attachment 599110 [details, diff] [details, diff]
> 0001-ebuild-writing-users-and-groups-use-an-explicit-plac.patch

Not sure if this is an improvement. The "123" example had the advantage that it was within the valid range. I don't see it as a problem that it's used by a real package. The manual has other examples like this (e.g., example ebuilds using real package names).

Maybe we could go even one step further and use an actual ebuild from acct-user as an example?
Comment 5 Ulrich Müller gentoo-dev 2019-12-11 05:53:01 UTC
(In reply to Michael Orlitzky from comment #2)
> Created attachment 599112 [details, diff] [details, diff]
> 0002-ebuild-writing-users-and-groups-drop-uncommon-variab.patch

(In reply to Michael Orlitzky from comment #3)
> Created attachment 599114 [details, diff] [details, diff]
> 0003-ebuild-writing-users-and-groups-replace-example-grou.patch

These look good to me. One could bikeshed if there should be quotes around ${PN}, but I don't think we have a policy for that.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-11 08:32:09 UTC
(In reply to Ulrich Müller from comment #4)
> (In reply to Michael Orlitzky from comment #1)
> > Created attachment 599110 [details, diff] [details, diff] [details, diff]
> > 0001-ebuild-writing-users-and-groups-use-an-explicit-plac.patch
> 
> Not sure if this is an improvement. The "123" example had the advantage that
> it was within the valid range. I don't see it as a problem that it's used by
> a real package. The manual has other examples like this (e.g., example
> ebuilds using real package names).
> 
> Maybe we could go even one step further and use an actual ebuild from
> acct-user as an example?

I agree with that. Maybe something from the high 4xx range to give even a better suggestion that we go downwards from there.

(In reply to Michael Orlitzky from comment #2)
> Created attachment 599112 [details, diff] [details, diff]
> 0002-ebuild-writing-users-and-groups-drop-uncommon-variab.patch

This one LGTM.

(In reply to Michael Orlitzky from comment #3)
> Created attachment 599114 [details, diff] [details, diff]
> 0003-ebuild-writing-users-and-groups-replace-example-grou.patch

I have mixed feelings about this but I suppose the array syntax makes it clear enough that multiple values are allowed.
Comment 7 Michael Orlitzky gentoo-dev 2019-12-19 13:53:15 UTC
Created attachment 600136 [details, diff]
0003-ebuild-writing-users-and-groups-replace-example-grou.patch

Updated 3rd patch just changes "Closes" to "Bug" in the footer.
Comment 8 Michael Orlitzky gentoo-dev 2019-12-19 13:54:45 UTC
Created attachment 600138 [details, diff]
0004-ebuild-writing-users-and-groups-use-non-fictional-ex.patch

And here's a patch on top of the first three that changes the two examples to use acct-{user,group}/suricata instead of a made-up one.
Comment 9 Ulrich Müller gentoo-dev 2020-01-23 12:06:17 UTC
(In reply to Michael Orlitzky from comment #8)
> Created attachment 600138 [details, diff] [details, diff]
> 0004-ebuild-writing-users-and-groups-use-non-fictional-ex.patch
> 
> And here's a patch on top of the first three that changes the two examples
> to use acct-{user,group}/suricata instead of a made-up one.

Can you squash this with the first patch of the series, please? Changing from a real ID to an invalid one and back to real doesn't make much sense.
Comment 10 Michael Orlitzky gentoo-dev 2020-01-23 16:29:01 UTC
(In reply to Ulrich Müller from comment #9)
> 
> Can you squash this with the first patch of the series, please? Changing
> from a real ID to an invalid one and back to real doesn't make much sense.

I know, but this isn't a simple squash because the first and fourth commits are what need to be combined and the two in between modify the same stuff. Can I please not spend an hour mangling the history, editing the commit messages, and re-proof-reading everything?
Comment 11 Ulrich Müller gentoo-dev 2020-01-23 17:16:41 UTC
(In reply to Michael Orlitzky from comment #10)
> I know, but this isn't a simple squash because the first and fourth commits
> are what need to be combined and the two in between modify the same stuff.
> Can I please not spend an hour mangling the history, editing the commit
> messages, and re-proof-reading everything?

Well then: https://github.com/gentoo/devmanual/pull/148
Comment 12 Larry the Git Cow gentoo-dev 2020-01-23 19:29:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=56eb6bc591c3daff893e9060faed0c04b4adb7f1

commit 56eb6bc591c3daff893e9060faed0c04b4adb7f1
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2020-01-23 19:29:35 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2020-01-23 19:29:35 +0000

    ebuild-writing/users-and-groups: Use example ebuilds from tree.
    
    The acct-user/group ebuilds for suricata are rather typical examples,
    so replace the fictitious user 123 by them.
    
    This also has ${PN} as single element in ACCT_USER_GROUPS, and it
    drops the uncommon ACCT_USER_{SHELL,HOME{,_OWNER,_PERMS}} variables
    from the example.
    
    Original patch from Michael Orlitzky <mjo@gentoo.org> (who asked me to
    put my own name on it).
    
    Closes: https://bugs.gentoo.org/702508
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 ebuild-writing/users-and-groups/text.xml | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)