Bug 11989 - when building, fileutils tries to update running system
when building, fileutils tries to update running system
Product: Red Hat Raw Hide
Classification: Retired
Component: findutils (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Preston Brown
Depends On:
  Show dependency treegraph
Reported: 2000-06-08 13:33 EDT by Michael Tokarev
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-06-08 14:38:17 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 Michael Tokarev 2000-06-08 13:33:09 EDT
$ 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):
        $(top_srcdir)/mkinstalldirs $(localstatedir)

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

make localstatedir=/var/lib

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 \

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


#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 14:38:16 EDT
With changes in .spec (that I provided), bug will go away.
Comment 2 Preston Brown 2001-01-31 17:29:24 EST
fixed since 7 was released.

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