Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Red Hat Linux (http://www.linux-archive.org/red-hat-linux/)
-   -   RPM query. (http://www.linux-archive.org/red-hat-linux/675118-rpm-query.html)

Jason Morgan 06-20-2012 07:00 PM

RPM query.
 
Hi,

I have an RPM spec file that I have taken from a RHEL Summit PDF. On RHEL 5 this SPEC file builds ok. However when I try to build this RPM on RHEL 6 the build fails. Was there a change between RHEL5 & RHEL6 in the RPM build environment. I have attached my SPEC file and rpmbuild output below. Would appreciate if anyone can see what is missing ?

Thanks

My SPEC file taken direct from doc.

Summary: My Company general configuration RPM
Name: config
Version: 1
Release: 1
License: Copyright 2010, My Company, Inc.
Group: MyCompany/Configs
Packager: Packager Name <my-email@mycompany.com>
BuildArch: noarch
Source: %{name}-%{version}.tgz
BuildRoot: %{_builddir}/%{name}-%{version}
%description
This RPM provides config files for My Company.
%prep
%setup
%files
%config(noreplace) %attr(644,root,root) /etc/ntp.conf


RHEL6 rpmbuild output.

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.7AXZ3w
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf config-1
+ /bin/tar -xvvf -
+ /usr/bin/gzip -dc /root/rpmbuild/SOURCES/config-1.tgz
drwxr-xr-x root/root 0 2012-06-20 14:20 config-1/
drwxr-xr-x root/root 0 2012-06-20 14:20 config-1/etc/
-rw-r--r-- root/root 64 2012-06-20 14:20 config-1/etc/ntp.conf
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd config-1
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Processing files: config-1-1.noarch
error: File not found: /root/rpmbuild/BUILDROOT/config-1-1.x86_64/etc/ntp.conf


RPM build errors:
File not found: /root/rpmbuild/BUILDROOT/config-1-1.x86_64/etc/ntp.conf

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

06-20-2012 07:03 PM

RPM query.
 
Jason Morgan wrote:
>
> I have an RPM spec file that I have taken from a RHEL Summit PDF. On RHEL
> 5 this SPEC file builds ok. However when I try to build this RPM on RHEL 6
> the build fails. Was there a change between RHEL5 & RHEL6 in the RPM build
> environment. I have attached my SPEC file and rpmbuild output below. Would
> appreciate if anyone can see what is missing ?
<snip>
> RPM build errors:
> File not found:
> /root/rpmbuild/BUILDROOT/config-1-1.x86_64/etc/ntp.conf

Seems pretty clear to me: you're missing this file, and I'd assume that
whatever you're building requires ntp.conf.

mark

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

Jason Morgan 06-20-2012 07:27 PM

RPM query.
 
This SPEC file builds ok on RHEL5 and creates the rpm but fails to build on RHEL6. Sourc TAR is exactly the same on both server.

> Date: Wed, 20 Jun 2012 15:03:57 -0400
> Subject: Re: RPM query.
> From: m.roth@5-cent.us
> To: redhat-list@redhat.com
>
> Jason Morgan wrote:
> >
> > I have an RPM spec file that I have taken from a RHEL Summit PDF. On RHEL
> > 5 this SPEC file builds ok. However when I try to build this RPM on RHEL 6
> > the build fails. Was there a change between RHEL5 & RHEL6 in the RPM build
> > environment. I have attached my SPEC file and rpmbuild output below. Would
> > appreciate if anyone can see what is missing ?
> <snip>
> > RPM build errors:
> > File not found:
> > /root/rpmbuild/BUILDROOT/config-1-1.x86_64/etc/ntp.conf
>
> Seems pretty clear to me: you're missing this file, and I'd assume that
> whatever you're building requires ntp.conf.
>
> mark
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

06-20-2012 07:42 PM

RPM query.
 
Jason,

First, please don't top post. We don't care what Outlook wants.... <g>

Jason Morgan wrote:
>> From: m.roth@5-cent.us
>> Jason Morgan wrote:
>> >
>> > I have an RPM spec file that I have taken from a RHEL Summit PDF. On
>> > RHEL 5 this SPEC file builds ok. However when I try to build this RPM on
>> > RHEL 6 the build fails. Was there a change between RHEL5 & RHEL6 in the
>> > RPM build environment. I have attached my SPEC file and rpmbuild output
>> > below. Would appreciate if anyone can see what is missing ?
>> <snip>
>> > RPM build errors:
>> > File not found:
>> > /root/rpmbuild/BUILDROOT/config-1-1.x86_64/etc/ntp.conf
>>
>> Seems pretty clear to me: you're missing this file, and I'd assume that
>> whatever you're building requires ntp.conf.
>>
> This SPEC file builds ok on RHEL5 and creates the rpm but fails to build
> on RHEL6. Sourc TAR is exactly the same on both server.

That may be the case, but it's possible that one of your dependencies
that's *not* your in-house stuff now has that as a requirement.

Interesting. I was looking to see if there was an ntp-devel, and ran
across this presentation:
<http://www.redhat.com/promo/summit/2010/presentations/summit/opensource-for-it-leaders/thurs/pwaterma-2-rpm/RPM-ifying-System-Configurations.pdf>.
On slide 40, he describes the .tgz going into an rpm:
Now we create a .tgz file containing the files going into
our RPM. Its contents look like this:
% tar tzf /usr/src/redhat/SOURCES/config-1.tgz
config-1/
config-1/etc/
config-1/etc/ntp.conf

You're sure that it's not in your .tgz?

mark


mark

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

Jason Morgan 06-20-2012 08:05 PM

RPM query.
 
Definitely , the SOURCE and SPEC files were taken as is from my RHEL 5 server.

I'm pretty sure the way RHEL uses buildroot has changed between release. I can work around this but am curious as to why I am seeing this behavour.





--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


All times are GMT. The time now is 07:53 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.