Re: packaging up a bunch of files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/1/06, Joe Van Dyk <joevandyk@xxxxxxxxx> wrote:
> On 2/1/06, Tom Hicks <headhunter3@xxxxxxxxx> wrote:
> >
> >
> >
> > On 2/1/06, Joe Van Dyk <joevandyk@xxxxxxxxx> wrote:
> > >
> > > On 2/1/06, Joe Van Dyk <joevandyk@xxxxxxxxx> wrote:
> > > > Hi,
> > > >
> > > > I want to package up a bunch of files (pre-built binaries) that should
> > > > get installed to /usr/local/some/path.
> > > >
> > > > Would the following spec snippet be ok?
> > > >
> > > > BuildRoot: %{_tmpdir}/%{name}-%{version}-root
> > > >
> > > > %description
> > > > Description here
> > > >
> > > > %prep
> > > > %setup
> > > >
> > > > %build
> > > > # Nothing, it's already built.
> > > >
> > > > %install
> > > > rm -rf $RPM_BUILD_ROOT
> > > > mkdir -p
> > $RPM_BUILD_ROOT%{_prefix}/local/%{name}-%{version}
> > > > cp -R .
> > $RPM_BUILD_ROOT%{_prefix}/local/%{name}-%{version}
> > > >
> > > > %files
> > > > # What goes here?  I just want all the files that were in the tar.gz
> > > > file to be installed to /usr/local/some/path.
> > >
> > > I have
> > > %files
> > > $RPM_BUILD_ROOT%{_prefix}/local/%{name}-%{version}
> > >
> > > But that gives an error at the very end saying:
> > >
> > > RPM build errors:
> > >     File must begin with "/": $RPM_BUILD_ROOT/usr/local/gcc-3.3.1
> > >
> > >
> > > Any ideas?
> > >
> > > _______________________________________________
> > > Rpm-list mailing list
> > > Rpm-list@xxxxxxxxxx
> > > https://www.redhat.com/mailman/listinfo/rpm-list
> > >
> >  you need to give the path relative to the BuildRoot so for example
> >
> >  %files
> >  %{_prefix}/local/%{name}-%{version}
>
> Ah, thanks.  And thanks to everyone for putting up with my stupid questions!

Last question: I was a bit surprised when I installed the rpm, that
all the files were owned by me (instead of by root).  Do I need to add
a 'chmod -R root:root *' into the %install section?

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

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux