Bug 2897 - rpm not recognizing topdir flag
Summary: rpm not recognizing topdir flag
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 5.2
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-05-18 01:05 UTC by Brian Gunney
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 1999-05-18 14:20:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Brian Gunney 1999-05-18 01:05:41 UTC
(My first report did not appear to show up.  I don't mean to
duplicate it but it probably requires resending.)

Despite "Maximum RPM"'s discussion of the flag "topdir", rpm
does not seem to recognize this flag.  I am using version
rpm-2.94-5 on an i586 running RH-5.2 with linux 2.2.3-2.

Here is the output.  Note that I do NOT have an /etc/rpmrc
nor do I have a .rpmrc in the working directory.  The
~/.rpmrc contains only the topdir flag.


localhost:~/rpm/SPECS>7 cat /etc/rpmrc
cat: /etc/rpmrc: No such file or directory
localhost:~/rpm/SPECS>8 cat ~/.rpmrc
topdir: /home/brian/rpm

localhost:~/rpm/SPECS>9 cat .rpmrc
cat: .rpmrc: No such file or directory
localhost:~/rpm/SPECS>10 rpm --showrc
bad option 'topdir' at /home/brian/.rpmrc:1
ARCHITECTURE AND OS:
build arch            : i386
compatible build archs: i586 i486 i386 noarch
build os              : Linux
compatible build os's : Linux
install arch          : i586
install os            : Linux
compatible archs      : i586 i486 i386 noarch
compatible os's       : Linux

RPMRC VALUES:
macrofiles            :
/usr/lib/rpm/macros:/usr/lib/rpm/i586-linux/macros:/etc/rpm/macros:/etc/rpm/i586-linux/macros:~/.rpmmacros
optflags              : -O2
========================
-14: GNUconfigure
  %{__libtoolize} --copy --force
  %{__aclocal}
  %{__autoheader}
  %{__automake}
  %{__autoconf}
  CFLAGS="%{optflags}" ./configure %{_target_platform}
--prefix=%{_prefix}
-14: __aclocal  aclocal
-14: __autoconf autoconf
-14: __autoheader       autoheader
-14: __automake automake
-14: __bzip2    %(which bzip2)
-14: __cat      %(which cat)
-14: __chgrp    %(which chgrp)
-14: __chmod    %(which chmod)
-14: __chown    %(which chown)
-14: __cpio     %(which cpio)
-14: __gzip     %(which gzip)
-14: __install  %(which install)
-14: __libtoolize       libtoolize
-14: __make     %(which make)
-14: __mkdir    %(which mkdir)
-14: __patch    %(which patch)
-14: __ranlib   %(which ranlib)
-14: __rm       %(which rm)
-14: __strip    %(which strip)
-14: __tar      %(which tar)
-14: _arch      i386
-14: _build     %{_host}
-14: _build_alias       %{_host_alias}
-14: _build_cpu %{_host_cpu}
-14: _build_os  %{_host_os}
-14: _build_vendor      %{_host_vendor}
-14: _builddir  %{_topdir}/BUILD
-14: _buildshell        /bin/sh
-14: _bzip2bin  /usr/bin/bzip2
-14: _dbpath    %{_var}/lib/rpm
-14: _defaultdocdir     %{_usr}/doc
-14: _fixgroup  [ `id -u` = '0' ] && chgrp -R root
-14: _fixowner  [ `id -u` = '0' ] && chown -R root
-14: _fixperms  chmod -R a+rX,g-w,o-w
-14: _gzipbin   /bin/gzip
-14: _host      i686-pc-linux-gnu
-14: _host_alias        i686-pc-linux-gnu
-14: _host_cpu  i686
-14: _host_os   linux-gnu
-14: _host_vendor       pc
-14: _instchangelog     5
-14: _os        linux
-14: _pgpbin    /usr/bin/pgp
-14: _preScriptEnvironment
        RPM_SOURCE_DIR="%{_sourcedir}"
        RPM_BUILD_DIR="%{_builddir}"
        RPM_OPT_FLAGS="%{optflags}"
        RPM_ARCH="%{_arch}"
        RPM_OS="%{_os}"
        export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS
RPM_ARCH RPM_OS
        RPM_DOC_DIR="%{_docdir}"
        export RPM_DOC_DIR
        RPM_PACKAGE_NAME="%{name}"
        RPM_PACKAGE_VERSION="%{version}"
        RPM_PACKAGE_RELEASE="%{release}"
        export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION
RPM_PACKAGE_RELEASE
        %{?buildroot:RPM_BUILD_ROOT="%{buildroot}"
        export RPM_BUILD_ROOT
        }
-14: _prefix    /usr
-14: _rpmdir    %{_topdir}/RPMS
-14: _rpmfilename
%%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
-14: _signature none
-14: _sourcedir %{_topdir}/SOURCES
-14: _specdir   %{_topdir}/SPECS
-14: _srcrpmdir %{_topdir}/SRPMS
-11: _target    i386-linux
-14: _target_alias      %{_host_alias}
-11= _target_cpu        i386
-11= _target_os linux
-14: _target_platform
%{_target_cpu}-%{_vendor}-%{_target_os}
-14: _target_vendor     %{_host_vendor}
-14: _tmppath   %{_var}/tmp
-14: _topdir    %{_usrsrc}/redhat
-14: _usr       /usr
-14: _usrsrc    %{_usr}/src
-14: _var       /var
-14: _vendor    redhat
-14: configure
  %{?__libtoolize:[ -f configure.in ] && %{__libtoolize}
--copy --force}
  CFLAGS="%{optflags}" ./configure %{_target_platform}
--prefix=%{_prefix}
-15: optflags   -O2
-15: sigtype    none
======================== active 67 empty 0
localhost:~/rpm/SPECS>11 rpm -ba sla-1.0.spec
bad option 'topdir' at /home/brian/.rpmrc:1
Executing: %prep
+ umask 022
+ cd /usr/src/redhat/BUILD
+ rm -rf /usr/src/redhat/BUILD/sla-1.0
+ zcat /usr/src/redhat/SOURCES/sla-1.0.tar.gz
+ tar xvf -
sla-1.0/
sla-1.0/DIST_NOTE
<snipped>

Comment 1 Jeff Johnson 1999-05-18 14:20:59 UTC
The method of configuration has changed.
    Old way:
	in ~/.rpmrc
		topdir:		/whatever

    New way:
	in ~/.rpmmacros
		%_topdir	/whatever

For rpm-2.94, you will also need
	in ~/.rpmrc
		macrofiles: /usr/lib/rpm/macros:~/.rpmmacros
if something like that is not already present in /usr/lib/rpm/macros.

You should upgrade your rpm to at least 3.0 (and 3.0.1 when available)
in order to fix a number of bugs.


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