Bug 121134 - device-mapper source package won't build as non-root
Summary: device-mapper source package won't build as non-root
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: device-mapper-obsolete   
(Show other bugs)
Version: rawhide
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Alasdair Kergon
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: FC2Blocker
TreeView+ depends on / blocked
 
Reported: 2004-04-17 20:30 UTC by Ed Avis
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Ed Avis 2004-04-17 20:30:14 UTC
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 17:56:46 UTC
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 16:42:16 UTC
Should be fixed in device-mapper-1.00.17-1 

Comment 3 Alasdair Kergon 2004-04-19 16:43:32 UTC
(lvm2 package fixed similarly, lvm2-2.00.15-1.0) 

Comment 4 Jef Spaleta 2004-05-07 18:27:11 UTC
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 21:29:57 UTC
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 17:05:18 UTC
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.