commit:     6ea8fba1db783272b090a19950dd186a5cd2f4b5
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  9 10:18:23 2025 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Dec  9 10:18:23 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=6ea8fba1

sys-apps/portage-3.0.72: quote PORTAGE_{USER,GRP}NAME in migration

As pointed out in bug #967030, this can contain weird values, so don't
trust them to be sane.

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 sys-apps/portage/portage-3.0.72.ebuild | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/sys-apps/portage/portage-3.0.72.ebuild 
b/sys-apps/portage/portage-3.0.72.ebuild
index 0bc964eb99..9f4d553c9e 100644
--- a/sys-apps/portage/portage-3.0.72.ebuild
+++ b/sys-apps/portage/portage-3.0.72.ebuild
@@ -318,10 +318,10 @@ pkg_postinst() {
                        elog "Due to a change in how Prefix Portage handles 
user and group"
                        elog "administration, you must add the following in 
your"
                        elog "  ${EROOT}/etc/portage/make.conf"
-                       elog "PORTAGE_USERNAME=${PORTAGE_USERNAME}"
-                       elog "PORTAGE_GRPNAME=${PORTAGE_GRPNAME}"
-                       elog "PORTAGE_INST_UID=${PORTAGE_INST_UID}"
-                       elog "PORTAGE_INST_GID=${PORTAGE_INST_GID}"
+                       elog "PORTAGE_USERNAME=\"${PORTAGE_USERNAME}\""
+                       elog "PORTAGE_GRPNAME=\"${PORTAGE_GRPNAME}\""
+                       elog "PORTAGE_INST_UID=\"${PORTAGE_INST_UID}\""
+                       elog "PORTAGE_INST_GID=\"${PORTAGE_INST_GID}\""
                        eerror "your installation will break without these 
settings"
 
                        local conffile="${EROOT}/etc/portage/make.conf"
@@ -343,10 +343,10 @@ pkg_postinst() {
                                        echo "# added by ${P} at $(date)"
                                        echo "# this was done as part of a 
migration of these"
                                        echo "# values from make.globals to 
user configuration"
-                                       echo 
"PORTAGE_USERNAME=${PORTAGE_USERNAME}"
-                                       echo 
"PORTAGE_GRPNAME=${PORTAGE_GRPNAME}"
-                                       echo 
"PORTAGE_INST_UID=${PORTAGE_INST_UID}"
-                                       echo 
"PORTAGE_INST_GID=${PORTAGE_INST_GID}"
+                                       echo 
"PORTAGE_USERNAME=\"${PORTAGE_USERNAME}\""
+                                       echo 
"PORTAGE_GRPNAME=\"${PORTAGE_GRPNAME}\""
+                                       echo 
"PORTAGE_INST_UID=\"${PORTAGE_INST_UID}\""
+                                       echo 
"PORTAGE_INST_GID=\"${PORTAGE_INST_GID}\""
                                } >> "${conffile}"
                                elog "user configuration variables were 
automatically added"
                                elog "to your ${conffile}, please review"

Reply via email to