Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 289565 - Document an example of using 'env.d' to append to CONFIG_PROTECT_MASK
Summary: Document an example of using 'env.d' to append to CONFIG_PROTECT_MASK
Status: RESOLVED FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Devmanual (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Devmanual Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2009-10-18 10:30 UTC by amitds
Modified: 2022-06-06 08:22 UTC (History)
0 users

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


Attachments
appends documentation to suggested devmanual page (bug_289565.patch,994 bytes, patch)
2009-10-19 07:37 UTC, amitds
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description amitds 2009-10-18 10:30:56 UTC
Following discussion at http://archives.gentoo.org/gentoo-portage-dev/msg_734755854771be3eb9e8c4da55489b34.xml,

I suggest adding a/m to the "ebuild howto" guide.

I suggest the following paragraph:

<QUOTE>
An ebuild can append to the CONFIG_PROTECT_MASK variable by using portage's env.d mechanism (http://devmanual.gentoo.org/tasks-reference/environment/index.html). The ebuild has to generate an env.d file, then use either newenvd or doenvd to put it in-place. 'emerge' shall call 'env-update' and generate the proper enviroment for proceeding with its merge.
The following ebuild snippet (from src_install()) shall cause /etc/test.cfg to be auto-merged w/o needing to call etc-update after the merge:
<snip>
echo "CONFIG_PROTECT_MASK=\"/etc/test.cfg\"" > 99my-pkg
doenvd 99my-pkg
</snip>
<UNQUOTE>

Thanks,

Reproducible: Always

Steps to Reproduce:
n/a
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2009-10-18 21:52:39 UTC
If you feel like submitting a patch for this you can find the sources to devmanual from http://anonsvn.gentoo.org/
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2009-10-18 22:05:59 UTC
This might be a better place for the information:
http://devmanual.gentoo.org/general-concepts/config-protect/index.html
Comment 3 amitds 2009-10-19 07:37:22 UTC
Created attachment 207535 [details, diff]
appends documentation to suggested devmanual page

patch created by: 

amit0 config-protect # svn di --diff-cmd diff text.xml >& bug_289565.patch
Comment 4 Ulrich Müller gentoo-dev 2020-02-28 11:07:21 UTC
(In reply to amitds from comment #3)
> Created attachment 207535 [details, diff] [details, diff]
> appends documentation to suggested devmanual page

Why hasn't this been merged yet? Now we no longer can, unless we get a sign-off for it: https://www.gentoo.org/glep/glep-0076.html#certificate-of-origin

@amitds: If you're still reading, can you post a comment with a "Signed-off-by:" line for your patch?
Comment 5 Ulrich Müller gentoo-dev 2022-06-04 09:48:31 UTC
Actually, this is below the 15 lines threshold, so I've created a pull request:
https://github.com/gentoo/devmanual/pull/291
Comment 6 Larry the Git Cow gentoo-dev 2022-06-06 08:22:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=0ef26e79892567f73359629f0cc0c00df3651dd1

commit 0ef26e79892567f73359629f0cc0c00df3651dd1
Author:     Amit Dor-Shifer <amitds@oversi.com>
AuthorDate: 2009-10-19 07:37:22 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2022-06-05 21:01:41 +0000

    general-concepts/config-protect: Add example for env.d
    
    Closes: https://bugs.gentoo.org/289565
    [Make the XML validate. Small tweaks to example and wording.]
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 general-concepts/config-protect/text.xml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)