[kw-pm] getting cpan2rpm to build rpms as non-root user

Robert P. J. Day rpjday at mindspring.com
Tue Dec 14 09:54:49 CST 2004


  apparently, the easiest way to get some essential perl modules on my
FC3 system is to grab them via "cpan2rpm".  it seemed easy enough, but
there's a weird glitch that i don't understand.

  i've got an rpm build environment set up (through ~/.rpmmacros) that
does all my rpm builds in my non-root user account.  only after the
final rpm file is built do i pop into root to install it.  and the
build directory structure is under:

  ~/build/rpms		(remember this)

  so, after i install cpan2rpm, i try:

  $ cpan2rpm IO::String

and get:

=====
cpan2rpm IO::String

-- cpan2rpm - Ver: 2.026 --
Signatures not set up
Upgrade check
RPM user environment - Your account does not have
permissions to the requisite RPM directory structure.
Try 'cpan2rpm --mk-rpm-dirs=~/rpm' to setup your
environment for non-root package building.
Failing dirs: /home/rpjday/build/rpms/SRPMS
-- Done --
=====

  now, that's all right -- it tells me that at least it understands
where i want the building done (~/build/rpms/), and that i just forgot
to create the initial .../SRPMS directory.  why it can't create it
automatically is a bit of a mystery, but ok, i'll use "mkdir", and try
again:

  $ cpan2rpm IO::String

and get:

=====
$ cpan2rpm IO::String

-- cpan2rpm - Ver: 2.026 --
Signatures not set up
Upgrade check
CPAN+ not found - using old interface

-- module: IO::String --
CPAN: Storable loaded ok
mkdir /root/.cpan: Permission denied at /usr/lib/perl5/5.8.5/CPAN.pm
line 2342
-- Done --
=====

  why, if i'm building as a non-root user and cpan2rpm already
confirmed that it understands where my build location is, is anything
trying to get at root's home directory?  surely, i should be entitled
to do the entire download and build as a regular user if i've
configured it that way.

  thoughts?

rday


More information about the kw-pm mailing list