Bug 11989 - when building, fileutils tries to update running system
Summary: when building, fileutils tries to update running system
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: findutils
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Preston Brown
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-06-08 17:33 UTC by Michael Tokarev
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-06-08 18:38:17 UTC
Embargoed:


Attachments (Terms of Use)

Description Michael Tokarev 2000-06-08 17:33:09 UTC
$ rpm --rebuild findutils-4.1.4-1.src.rpm
....
%install stage
...
make[2]: Entering directory `/usr/mjt/rpm/build/findutils-4.1.4/locate'
/bin/sh ../mkinstalldirs /var/tmp/find-root/usr/bin
  /usr/bin/install -c  locate /var/tmp/find-root/usr/bin/locate
/bin/sh ../mkinstalldirs /usr/lib/findutils
mkdir /usr/lib/findutils
^^^^^^^^^^^^^^^^^^^^^^^^
mkdir: cannot make directory `/usr/lib/findutils': Permission denied
make[2]: *** [install-libexecPROGRAMS] Error 1

$_

This caused by buggy line in locate/Makefile, at the bottom of file,
that is a duplicate of install target (install: install-am):
---
install:
        $(top_srcdir)/mkinstalldirs $(localstatedir)
---

And also, relevant portion of .spec file:
===========
%define optflags $RPM_OPT_FLAGS -D_GNU_SOURCE
%configure \
 --exec-prefix=%{_prefix} \
 --libexecdir=$RPM_BUILD_ROOT/%{_prefix}/lib/findutils
%undefine optflags

make localstatedir=/var/lib

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/findutils
make \
 prefix=${RPM_BUILD_ROOT}%{_prefix} \
 exec_prefix=${RPM_BUILD_ROOT}%{_prefix} \
 libexecdir=%{_prefix}/lib/findutils \
 localstatedir=/var/lib \
 install
===

This should be as follows:
===
%define optflags $RPM_OPT_FLAGS -D_GNU_SOURCE
%configure \
 --exec-prefix=%{_prefix} \
 --libexecdir='${exec_prefix}/lib/findutils' \
 --localstatedir=/var/lib
%undefine optflags

make

%install
rm -rf $RPM_BUILD_ROOT
#mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/findutils
make install DESTDIR="${RPM_BUILD_ROOT}"
======

Far more clean than original (RH) verion... ;)

==
Can anybody audit all packages to be buildable as non-root and
thus preventing that ugly bug(s)?!
I already posted tons of bugreports about similar problems
(missing `%defattr(-,root,root)', stupid `install -u0 -g0',
modification of system files when building etc etc...)

Comment 1 Michael Tokarev 2000-06-08 18:38:16 UTC
With changes in .spec (that I provided), bug will go away.


Comment 2 Preston Brown 2001-01-31 22:29:24 UTC
fixed since 7 was released.


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