Bug 121134 - device-mapper source package won't build as non-root
device-mapper source package won't build as non-root
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: device-mapper-obsolete (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks: FC2Blocker
  Show dependency treegraph
 
Reported: 2004-04-17 16:30 EDT by Ed Avis
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-26 13:05:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ed Avis 2004-04-17 16:30:14 EDT
Description of problem:

The source package device-mapper-1.00.14-3.src.rpm will not build as a
non-root user.

Version-Release number of selected component (if applicable):

1.00.14-3

How reproducible:

'rpmbuild --rebuild device-mapper-1.00.14-3.src.rpm' as non-root user

Actual results:

Building fails, the last few lines of message are

make -C man install
make[1]: Entering directory
`/home/ed/usr_src/RPM/BUILD/device-mapper.1.00.14/man'
*** Installing  in
/var/tmp/device-mapper-1.00.14-3-buildroot/usr/share/man/man8 ***
/home/ed/bin/install: cannot change owner and/or group of
`/var/tmp/device-mapper-1.00.14-3-buildroot': Operation not permitted
make[1]: *** [install] Error 1
make[1]: Leaving directory
`/home/ed/usr_src/RPM/BUILD/device-mapper.1.00.14/man'
make: *** [man.install] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.4056 (%install)

Expected results:

It should be possible to build the package as an ordinary user.

Additional info:

This is because of lines in the various makefiles like

@INSTALL@ -D -o $(OWNER) -g $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \

Because $(OWNER) and $(GROUP) are set to 'root' by configure, the
makefiles try to chown files to root, which isn't permitted.  I think
you may be able to fix this using the --with-user or --without-user
options to configure.
Comment 1 Alasdair Kergon 2004-04-18 13:56:46 EDT
The 'install' that I'm used to ignores -o when not running as root. It
looks like that behaviour has been changed without providing a
compatibility option:-(
Comment 2 Alasdair Kergon 2004-04-19 12:42:16 EDT
Should be fixed in device-mapper-1.00.17-1 
Comment 3 Alasdair Kergon 2004-04-19 12:43:32 EDT
(lvm2 package fixed similarly, lvm2-2.00.15-1.0) 
Comment 4 Jef Spaleta 2004-05-07 14:27:11 EDT
device-mapper-1.00.14-3.src.rpm rebuilds for me non root on my test3
box synced against available rawhide.

One minor thing..is a missing buildrequirement for libselinux-devel
package that i hit...which imho isn't worthy of being a blocker. I'll
refile that as a new bug against device-mapper.

Here is the command I just ran:
rpmbuild --rebuild device-mapper-1.00.14-3.src.rpm
using .rpmmacros file:
%_topdir      %(echo $HOME)/rpmbuild
%_smp_mflags  -j3

1.00.17-1 is not available in rawhide for me to test afaict
Comment 5 Alasdair Kergon 2004-05-07 17:29:57 EDT
I thought I submitted this to fc2 - but it isn't there, only in
fc2-scratch.  Sorry about that.

(Might need the same selinux return 0->return 1 fix as lvm2 needed.
I can look next week.)

Comment 6 Alasdair Kergon 2004-05-26 13:05:18 EDT
Submitted 1.00.17-2 to dist-fc3

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