Primitive use of rpm

Rick Hedin cubsno1 at gmail.com
Thu Apr 12 15:21:19 UTC 2012


I'm trying to be more explicit in response to Dan's comment.

wam.spec:
Name:       webappmanager
Version:    2.0.7
Release:    1
   . . .
# BuildRoot:  /tmp/rpmash_work
# BuildDir:   /tmp/rpmash_work
Buildroot:  /tmp/rpmash_work/total_nonsense
%define _topdir    /tmp/rpmash_work
%define buildroot   /tmp/rpmash_work
%dump
%description
Web App Manager.  Also called Web App Server.

%files
/tmp/rpmash_work/pretend/wam.bash
/tmp/rpmash_work/merge_files.bash
/tmp/rpmash_work/webappmanager-dist-2.0.7-SNAPSHOT-dist.tar.gz

%post
bash -v -x ./wam.bash 2>&1 | tee /tmp/rpmash_work/wam.bash.output | grep
'^\*\*\*[    ]'

result of running rpmbuild:
======================== active 365 empty 0
Processing files: webappmanager-2.0.7-1.i386
error: File not found:
/home/rickh/rpmbuild/BUILDROOT/webappmanager-2.0.7-1.i386/tmp/rpmash_work/pretend/wam.bash
error: File not found:
/home/rickh/rpmbuild/BUILDROOT/webappmanager-2.0.7-1.i386/tmp/rpmash_work/merge_files.bash
error: File not found:
/home/rickh/rpmbuild/BUILDROOT/webappmanager-2.0.7-1.i386/tmp/rpmash_work/webappmanager-dist-2.0.7-SNAPSHOT-dist.tar.gz

RPM build errors:
rpmbuild -bl wam.spec 2>&1 | less
-14= _builddir  %{_topdir}/BUILD
-14= _buildrootdir      %{_topdir}/BUILDROOT
   . . .
-14: _tmppath   %{_var}/tmp
  0: _topdir    /tmp/rpmash_work
-14: _transaction_color 0
   . . .
-14: bcond_without      %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
  0: buildroot  /tmp/rpmash_work
-14: cmake_kde4
   . . .
    File not found:
/home/rickh/rpmbuild/BUILDROOT/webappmanager-2.0.7-1.i386/tmp/rpmash_work/pretend/wam.bash
    File not found:
/home/rickh/rpmbuild/BUILDROOT/webappmanager-2.0.7-1.i386/tmp/rpmash_work/merge_files.bash
    File not found:
/home/rickh/rpmbuild/BUILDROOT/webappmanager-2.0.7-1.i386/tmp/rpmash_work/webappmanager-dist-2.0.7-SNAPSHOT-dist.tar.gz
my questions:
1. I set the buildroot: directive in the spec file, but it doesn't seem to
make any difference.  It seems to me that it's insisting that the build
root is /home/rickh/rpmbuild/BUILDROOT etc.  Perhaps I'm setting buildroot
at the wrong point, and it gets overwritten?
2. I see that topdir and buildroot are used later in the build.  So I tried
to set them to what I want.  But it didn't seem to make any difference.
Perhaps buildroot isn't the relevant symbol in the %files section?

I hope at least now it's clear what I'm *trying* to do.  Plainly I have a
vast lack of perspective.

               Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20120412/0ec6ac08/attachment.html>


More information about the Rpm-list mailing list