Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 657394 Details for
Bug 702624
acct-user.eclass: support systemd-sysusers
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch with group support, r1
0001-acct-.eclass-Create-sysusers.d-files.patch (text/plain), 2.46 KB, created by
Michał Górny
on 2020-08-29 17:31:47 UTC
(
hide
)
Description:
Patch with group support, r1
Filename:
MIME Type:
Creator:
Michał Górny
Created:
2020-08-29 17:31:47 UTC
Size:
2.46 KB
patch
obsolete
>From e3d08cee64aba5e144fa01b0d0d2f9d951c3ac50 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> >Date: Fri, 13 Dec 2019 17:32:09 +0100 >Subject: [PATCH] acct-*.eclass: Create sysusers.d files >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Thanks to David Michael for the initial patch and upstream fixes. > >Signed-off-by: MichaŠGórny <mgorny@gentoo.org> >--- > eclass/acct-group.eclass | 16 +++++++++++++++- > eclass/acct-user.eclass | 16 +++++++++++++++- > 2 files changed, 30 insertions(+), 2 deletions(-) > >diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass >index 5550e4a2fb10..dc1562974870 100644 >--- a/eclass/acct-group.eclass >+++ b/eclass/acct-group.eclass >@@ -80,7 +80,7 @@ S=${WORKDIR} > > > # << Phase functions >> >-EXPORT_FUNCTIONS pkg_pretend pkg_preinst >+EXPORT_FUNCTIONS pkg_pretend src_install pkg_preinst > > # @FUNCTION: acct-group_pkg_pretend > # @DESCRIPTION: >@@ -116,6 +116,20 @@ acct-group_pkg_pretend() { > fi > } > >+# @FUNCTION: acct-group_src_install >+# @DESCRIPTION: >+# Installs sysusers.d file for the group. >+acct-group_src_install() { >+ debug-print-function ${FUNCNAME} "${@}" >+ >+ insinto /usr/lib/sysusers.d >+ newins - ${CATEGORY}-${ACCT_GROUP_NAME}.conf < <( >+ printf "g\t%q\t%q\n" \ >+ "${ACCT_GROUP_NAME}" \ >+ "${ACCT_GROUP_ID/#-*/-}" >+ ) >+} >+ > # @FUNCTION: acct-group_pkg_preinst > # @DESCRIPTION: > # Creates the group if it does not exist yet. >diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass >index e82f3c56dbbe..f9772c3cb111 100644 >--- a/eclass/acct-user.eclass >+++ b/eclass/acct-user.eclass >@@ -312,7 +312,7 @@ acct-user_pkg_pretend() { > # @FUNCTION: acct-user_src_install > # @DESCRIPTION: > # Installs a keep-file into the user's home directory to ensure it is >-# owned by the package. >+# owned by the package, and sysusers.d file. > acct-user_src_install() { > debug-print-function ${FUNCNAME} "${@}" > >@@ -321,6 +321,20 @@ acct-user_src_install() { > # created yet > keepdir "${ACCT_USER_HOME}" > fi >+ >+ insinto /usr/lib/sysusers.d >+ newins - ${CATEGORY}-${ACCT_USER_NAME}.conf < <( >+ printf "u\t%q\t%q\t%q\t%q\t%q\n" \ >+ "${ACCT_USER_NAME}" \ >+ "${ACCT_USER_ID/#-*/-}:${ACCT_USER_GROUPS[0]}" \ >+ "${DESCRIPTION//[:,=]/;}" \ >+ "${ACCT_USER_HOME}" \ >+ "${ACCT_USER_SHELL/#-*/-}" >+ if [[ ${#ACCT_USER_GROUPS[@]} -gt 1 ]]; then >+ printf "m\t${ACCT_USER_NAME}\t%q\n" \ >+ "${ACCT_USER_GROUPS[@]:1}" >+ fi >+ ) > } > > # @FUNCTION: acct-user_pkg_preinst >-- >2.28.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 702624
:
599312
|
599352
|
657352
| 657394