Don't run fixowner and fixgroup at end of %prep
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 8 May 2008 11:36:08 +0000 (14:36 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 8 May 2008 11:36:08 +0000 (14:36 +0300)
- they'd only work for root, and we don't want to encourage people to build
  as root...

build/parsePrep.c

index 04b3b49..306fae8 100644 (file)
@@ -363,20 +363,14 @@ static int doSetupMacro(rpmSpec spec, const char *line)
     appendStringBuf(spec->prep, getStringBuf(after));
     after = freeStringBuf(after);
 
-    /* XXX FIXME: owner & group fixes were conditioned on !geteuid() */
-    /* Fix the owner, group, and permissions of the setup build tree */
-    {  static const char * const fixmacs[] =
-               { "%{_fixowner}", "%{_fixgroup}", "%{_fixperms}", NULL };
-       const char * const * fm;
-
-       for (fm = fixmacs; *fm; fm++) {
-           char * fix = rpmExpand(*fm, " .", NULL);
-           if (fix && *fix != '%')
-               appendLineStringBuf(spec->prep, fix);
-           fix = _free(fix);
+    /* Fix the permissions of the setup build tree */
+    {  char *fix = rpmExpand("%{_fixperms} .", NULL);
+       if (fix && *fix != '%') {
+           appendLineStringBuf(spec->prep, fix);
        }
+       free(fix);
     }
-    
+       
     return RPMRC_OK;
 }