Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 40344 - src rpm won't build right for non-root
src rpm won't build right for non-root
Product: Red Hat Raw Hide
Classification: Retired
Component: kdebase (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2001-05-12 05:33 EDT by j. alan eldridge
Modified: 2007-04-18 12:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-05-12 05:33:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description j. alan eldridge 2001-05-12 05:33:28 EDT
Description of Problem:

There is a setuid and a setgid program. They are chmod'd in the %install, 
rather than using %attr to be set up at rpm install time.

[alane@wwweasel alane]$ cat misc/patches/kdebase.spec-non-root.patch
< chmod 4755 $RPM_BUILD_ROOT%{prefix}/bin/kcheckpass
< chmod 2755 $RPM_BUILD_ROOT%{prefix}/bin/kdesud
> # use %attr() below, this breaks on non-root build
> #chmod 4755 $RPM_BUILD_ROOT%{prefix}/bin/kcheckpass
> #chmod 2755 $RPM_BUILD_ROOT%{prefix}/bin/kdesud
<       cat $RPM_BUILD_DIR/file.list.%{pkg} |grep -v '/bin/kdesud$' |grep 
-v '/usr/share/config' |grep -v '/etc' |grep -v '/usr/bin$' |grep -v 
'/usr/lib$' |grep -v '/usr/share$' |grep -v '/usr$' |grep -v '/usr/sbin$' 
|grep -v '/usr/share$'
|grep -v '/usr/bin/konsole_grantpty$' >$RPM_BUILD_DIR/file.list.%{pkg}.tmp
>       cat $RPM_BUILD_DIR/file.list.%{pkg} |grep -v '/bin/kdesud$' |grep 
-v 'kcheckpass$' |grep -v '/usr/share/config' |grep -v '/etc' |grep -v 
'/usr/bin$' |grep -v '/usr/lib$' |grep -v '/usr/share$' |grep -v '/usr$' 
|grep -v '/usr/sbin$'
|grep -v '/usr/share$' |grep -v '/usr/bin/konsole_grantpty$' 
> %attr(4755,root,root) %{prefix}/bin/kcheckpass
[alane@wwweasel alane]$
Comment 1 Bernhard Rosenkraenzer 2001-05-13 05:10:44 EDT
It works the way things are. Our build system actually builds all packages as 

Any user can make a file he owns setuid (to his own user ID), therefore the 
chmod commands are OK.

rpm takes care of switching the owner (and thereby the user the application 
runs as).

If you can't rebuild the package, chances are you're trying to build on a 
filesystem that was mounted with nosuid.

Note You need to log in before you can comment on or make changes to this bug.