From 4ad7f40395be970b7d84cb9782ce6c7717db9d37 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 8 May 2008 14:37:29 +0300 Subject: [PATCH] Rip useless ROOT_GROUP checking from configure - it was only used for an ancient RH-specific %_fixgroup anyway which in turn only ever did anything when building as root - bad bad... --- configure.ac | 34 ---------------------------------- platform.in | 2 -- 2 files changed, 36 deletions(-) diff --git a/configure.ac b/configure.ac index 3c7714d..04c936c 100644 --- a/configure.ac +++ b/configure.ac @@ -885,40 +885,6 @@ AC_CHECK_FUNC(lchown, AC_SUBST(__CHOWN_RHF) AC_SUBST(__CHGRP_RHF) -dnl -dnl figure out what root's primary group is -dnl -AC_MSG_CHECKING(root's primary group) -AC_RUN_IFELSE([AC_LANG_SOURCE([[#include -#include -#include -#include - -int main() -{ - struct passwd *root = NULL; - struct group *roots_group = NULL; - FILE * tempfile = NULL; - - root = getpwuid( (uid_t) 0 ); - if (root != NULL) { - roots_group = getgrgid(root->pw_gid); - if (roots_group != NULL) { - tempfile = fopen("conftest_rootg", "w"); - if (tempfile != NULL) { - fprintf(tempfile, "%s\n", roots_group->gr_name); - fclose(tempfile); - exit(0); - } - } - } - - exit(1); -}]])],[ROOT_GROUP=`cat conftest_rootg`],[ROOT_GROUP="root"],[ROOT_GROUP="root" -]) -AC_MSG_RESULT($ROOT_GROUP) -AC_SUBST(ROOT_GROUP) - if echo "$host_os" | grep sco > /dev/null; then echo "hacking things up for sco" AC_DEFINE(NEED_STRINGS_H, 1, [Define as one if we need to include (along with )]) diff --git a/platform.in b/platform.in index ed4f148..04e3c54 100644 --- a/platform.in +++ b/platform.in @@ -76,8 +76,6 @@ @redhat@%__id_u @__ID_U@ @redhat@%__chown_Rhf @__CHOWN_RHF@ @redhat@%__chgrp_Rhf @__CHGRP_RHF@ -@redhat@%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root -@redhat@%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} @ROOT_GROUP@ @redhat@%_fixperms %{__chmod} -Rf @FIXPERMS@ @redhat@#--------------------------------------------------------------------- @redhat@# Always use %defattr(-,root,root) in %files (added in rpm-4.0.4) -- 2.7.4