1 Star 0 Fork 80

KangLee/rpm

forked from src-openEuler/rpm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Use-root-as-default-UID_0_USER-and-UID_0_GROUP.patch 1.00 KB
一键复制 编辑 原始数据 按行查看 历史
rwx403335 提交于 2021-12-27 19:59 . upgrade version to 4.17.0
From 7b3a3f004f96ed3cb9cc377f7e64bfc88195dfc2 Mon Dec 13 16:41:34 2021
From: From: Florian Festi <ffesti@redhat.com>
Date: Mon, 13 Dec 2021 16:41:34 +0800
Subject: [PATCH] Use root as default UID_0_USER and UID_0_GROUP
If /etc/passwd or /etc/group was not available during building rpm itself
these ended up empty. This affects builds done later on using rpmbuild.
Resolves: #1838
---
configure.ac | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure.ac b/configure.ac
index cdaf2b6..8656043 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1050,6 +1050,8 @@ fi
user_with_uid0=$(awk -F: '$3==0 {print $1;exit}' /etc/passwd)
group_with_gid0=$(awk -F: '$3==0 {print $1;exit}' /etc/group)
+if test -z "$user_with_uid0" ; then user_with_uid0=root ; fi
+if test -z "$group_with_gid0" ; then group_with_gid0=root ; fi
AC_DEFINE_UNQUOTED([UID_0_USER],["$user_with_uid0"],[Get the user name having userid 0])
AC_DEFINE_UNQUOTED([GID_0_GROUP],["$group_with_gid0"],[Get the group name having groupid 0])
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/KantLee/rpm.git
git@gitee.com:KantLee/rpm.git
KantLee
rpm
rpm
master

搜索帮助