From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.4.2) Gecko/20040308 Description of problem: The BuildRequires is missing flex and bison. Additionally, when you build the rpm, you have to do it from root which is bad because of the Makefiles. You should be able to build this package as a normal user. I will attach 2 patches that fix this. Version-Release number of selected component (if applicable): dhcpv6-0.10-6 How reproducible: Always Steps to Reproduce: 1. rpm -e --nodeps bison flex 2. rpmbuild -bb dhcpv6.spec Additional info:
Created attachment 103975 [details] Patch to fix spec file
Created attachment 103976 [details] Patch to fix make file
This is now fixed : There were two problems here: 1. The spec file lacked 'BuildRequires: flex, bison' this is now added. 2. The build works fine as a none root user with the command: 'rpmbuild --rebuild dhcpv6*.src.rpm' This correctly produces an rpm with the binary files installed correctly, as a non-root user, using the default $RPM_BUILD_ROOT - the 'rpmbuild -bb' would seem not to be using the correct RPM_BUILD_ROOT, for which non-root users do not have permission on your system ?
wrt #1, thanks. Regarding #2, it cannot work correctly for a non-root acct. If you look at the makefile's install target, you will see that its trying to set the file owner and group to the bin account. And dhcp6s.sh is beeing set for root ownership. Only root may do that. FWIW, my build root is within my build acct's home directory. It has full permissions there. The only way to make it work is to patch the makefile. Do I need to re-open the bug or did the makefile get patched?
I still don't see this problem. The Makefile uses commands like: /usr/bin/install -c -s -o bin -g bin dhcp6s /var/tmp/dhcpv6-0.10-root/usr/sbin I've tested /usr/bin/install (both from coreutils-5.2.1-24 & 5.2.1-7) and it allows non-root users to specify '-o bin -g bin' or even '-o root -g root' with no error - it just doesn't set the ownerships / groups - this is OK, because ownerships / groups are set by the RPM install. All our automated builds are done by non-root users and they complete without errors. If I patch the Makefile to remove the '-o <user> -g <group>', then it then cannot be used for doing an actual install outside the RPM . I suspect you are using a non-standard /usr/bin/install that returns an error for '-o <user> -g <group>' by non-root users instead of silently ignoring them. I will include the patch in the next RPM as 'dhcpv6-0.10-build-non-root.patch' , which can be optionally applied by users, but I don't think the RPM build should apply it automatically, as it would break non-RPM builds.
OK. I see what you are trying to solve. I have another way to solve it that may be better. How about if I re-work the patch so that it uses shell variables for the accts. Then the shell variables can be overridden on the make install line in the spec file. I've used this trick before and it would solve the problem in a way that people using makefiles wouldn't notice a difference and people using the spec file build under a non-privileged acct. FWIW, the install program that I'm using is the one in rawhide. Do you want a new patch?
Created attachment 104380 [details] Patch for Makefile The problem still exists in dhcpv6-0.10-7. I have a new patch that addresses the concern about using the Makefile for non-rpm builds. The %install section needs to be this: %install rm -rf %{buildroot} make DESTDIR=%{buildroot} BIN_OWNER=`id -nu` ROOT_OWNER=`id -nu` install mkdir -p %{buildroot}%{_localstatedir}/lib/dhcpv6 This way the override is passed on the make install line. The defaults in the Makefile use bin & root respectively. This is the same technique used by SysVinit.spec file if you wanted to double check the validity of this concern. Thanks.