FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > RPM Package Manager

 
 
LinkBack Thread Tools
 
Old 05-08-2008, 06:22 PM
"Hajducko, Steven"
 
Default RPM constructed name - how to control?




I've been trying to
build an RPM on an AIX system and I'm running into a silly little issue - the
AIX rpm insists on putting 'aix5.3' onto the RPM name, even if I build it with
BuildArch: noarch
*
If I take the same
spec file and put it on a RHEL system and build it there - it works fine.*
So my question is - is there some spec file way of saying what the actual RPM
name should end up looking like?* I've tried building with --target but
that didn't help.* Should I be unsetting some tag to make aix 5.3 go
away?
*
AIX builds:
facter-1.3.8-4.aix5.3.noarch.rpm
RHEL builds: facter-1.3.8-4.noarch.rpm
*
The RPM version on
AIX is older, but it's what IBM provides,
[stha3155@nickel1:~/rpm]$ rpm --version
RPM version
3.0.5

RHEL:
[stha3155@octane2.star.corp:~/rpm/SPECS]$ rpm --version
RPM version
4.4.2
*
I've tried search
the rc for any 'aix' strings:
*
[stha3155@nickel1:~/rpm]$ rpm --showrc | grep aix
build
os*************
: aix5.3
compatible build os's : aix5.3
install
os*********** :
aix5.3
compatible os's****** : aix5.3 aix5.2
aix5.1 aix5.0
aix4.3
macrofiles***********
:
/opt/freeware/lib/rpm/macros:/opt/freeware/lib/rpm/ppc-aix5.3/macros:/etc/rpm/macros.specspo:/etc/rpm/macros:/etc/rpm/ppc-aix5.3/macros:~/.rpmmacros
-14:
_host***** powerpc-ibm-aix5.1
-14:
_host_alias******* powerpc-ibm-aix5.1
-14:
_host_os** aix5.1
-14:
_os******* aix
-11:
_target*** ppc-aix5.3
-11= _target_os
aix5.3

Obviously, since I'm
building 'noarch' packages, I can build them on the RHEL system and be done with
it - this is more of a curiosity than anything.
*
Here's the spec file
( any comments on other parts of this spec file are welcome as well
)
*
%define rubylibdir
%(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
%define rubybindir
%(ruby -rrbconfig -e 'puts Config::CONFIG["bindir"]')
*
Name:
facter
Version: 1.3.8
Release: 4
Packager: %{packager}
Vendor:
%{vendor}
Summary: facter is a small ruby program that gets facts about your
system
License: GPL
Group: Applications/System
Source0:
facter-1.3.8.tgz
BuildRoot:
%{_tmppath}/%{name}-%{version}-%{release}-root
BuildArchitectures:
noarch
*
Requires: ruby >=
1.8.1
BuildRequires: ruby >= 1.8.1
*
Prefix:
%{rubybindir}
Prefix: %{rubylibdir}
*
%description
Facter is a module for collecting simple facts about a
host Operating system. It is required for Puppet.
*
%prep
%setup
-q
*
%build
*
%install
rm -rf
%{buildroot}
mkdir %{buildroot}
DESTDIR=%{buildroot} ruby
./install.rb
*
%clean
rm -rf
%{buildroot}
*
%files
%defattr(-,root,root,-)
%{rubybindir}/facter
%{rubylibdir}/*
*
%changelog
* Tue
May 8 2008 Steve 'haji' Hajducko <steven.hajducko@digitalinsight.com>
- 1.3.8-4
- Added rubybindir - facter will be installed by default to this
directory.* Also added
* Prefix methods to allow for different
install location
*
* Tue May 6 2008
Steve 'haji' Hajducko <steven.hajducko@digitalinsight.com>
- 1.3.8-3
- Changed file listing to include rubylibdir and
bindir
*
* Tue May 6 2008
Steve 'haji' Hajducko <steven.hajducko@digitalinsight.com>
- 1.3.8-2
- Added file listing
*
* Tue May 6 2008
Steve 'haji' Hajducko <steven.hajducko@digitalinsight.com>
- 1.3.8-1
- Initial spec file

*
.................................................. ...................
Steven Hajducko
Systems
Engineer, Systems Integration
w:
818.597.6443** m: 805.377.9074


This email may contain confidential and privileged material for
the sole
use of the intended recipient. Any review or distribution
by others is
strictly prohibited. If you are not the intended
recipient please contact the
sender and delete all copies.

*
_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 05-08-2008, 08:25 PM
Tim Mooney
 
Default RPM constructed name - how to control?

Because your message came through as an attachment it's hard for me to
quote any of it, but you want to investigate the setting for either

%_build_name_fmt

or

rpmfilename

I don't remember which one RPM 3.x used, but I would start with
%_build_name_fmt. That's what controls how the file is named with modern
RPM.

Note, though, that for the example you give, I'm not sure it would be
advisable to change your %_build_name_fmt, other than to just add
%%{ARCH} to what's already there.

Tim
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 05-09-2008, 09:34 AM
devzero2000
 
Default RPM constructed name - how to control?

Put in ~/.rpmmacros

%_rpmfilename** %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

Best Regards

On Thu, May 8, 2008 at 10:25 PM, Tim Mooney <mooney@dogbert.cc.ndsu.nodak.edu> wrote:



Because your message came through as an attachment it's hard for me to

quote any of it, but you want to investigate the setting for either



* * * *%_build_name_fmt



or



* * * *rpmfilename



I don't remember which one RPM 3.x used, but I would start with

%_build_name_fmt. *That's what controls how the file is named with modern

RPM.



Note, though, that for the example you give, I'm not sure it would be

advisable to change your %_build_name_fmt, other than to just add

%%{ARCH} to what's already there.



Tim

--

Tim Mooney * * * * * * * * * * * * * * *mooney@dogbert.cc.ndsu.NoDak.edu

Information Technology Services * * * * (701) 231-1076 (Voice)

Room 242-J6, IACC Building * * * * * * *(701) 231-8541 (Fax)

North Dakota State University, Fargo, ND 58105-5164



_______________________________________________

Rpm-list mailing list

Rpm-list@redhat.com

https://www.redhat.com/mailman/listinfo/rpm-list



_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 

Thread Tools




All times are GMT. The time now is 10:01 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org