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

RE: help with directories in spec file %files section



--- Bharavi Oak <Bharavi.Oak@patni.com> wrote:
> 
> 
> > -----Original Message-----
> > From: rpm-list-admin@redhat.com
> [mailto:rpm-list-admin@redhat.com]On
> > Behalf Of Howard G Page
> > Sent: Tuesday, May 27, 2003 10:45 AM
> > To: rpm-list@redhat.com
> > Subject: help with directories in spec file %files
> section
> >
> >
> >
> > Help! Maybe someone can explain some funny rpm
> behavior. I have two
> > sepc files.  The first has only files in the
> %files section:
> >
> > %files
> > %attr(222, root, bin) /tmp/rpmtest/newdir/newfile
> > %attr(111, root, bin) /tmp/rpmtest/test3aa
> >
> > I make the rpm and execute this:
> >
> > rpm -q --queryformat
> >
>
'[%{FILENAMES}|%{FILEUSERNAME}|%{FILEGROUPNAME}|%{FILEMODES}|%
> >
>
{FILEMD5S}|%{FILEFLAGS:fflags}|%{FILERDEVS}|%{FILESIZES}|%{FIL
> > EINODES}|\n]' -p 
> /usr/src/redhat/RPMS/i386/test3b-1.0-1.i386.rpm
> >
> > and the output is:
> >
> >
>
/tmp/rpmtest/newdir/newfile|root|bin|32914|48408e7dd4985e8dada
> > d42b1f61c18ba||2816|9|6816204|
> >
>
/tmp/rpmtest/test3aa|root|bin|32841|15b44c8d97772e0278cee14e0f
> > 8e4a57||2816|8|6816203|
> >
> > So far, so good.
> >
> > The second rpm's spec file lists the same files as
> well as a
> > directory:
> >
> > %files
> > %attr(222, root, bin) /tmp/rpmtest/newdir/newfile
> > %attr(111, root, bin) /tmp/rpmtest/test3aa
> > %attr(751, root,bin) /tmp/rpmtest
> >
> > NOte that there is *no* entry for the directory:
> /tmp/rpmtest/newdir
> >
> > But the output of the same query command for this
> rpm is:
> >
> > /tmp/rpmtest|root|bin|16873|||0|4096|6816201|
> >
> /tmp/rpmtest/newdir|root|bin|16873|||0|4096|6816202|
> >
>
/tmp/rpmtest/newdir/newfile|root|bin|33257|48408e7dd4985e8dada
> > d42b1f61c18ba||2816|9|6816204|
> >
>
/tmp/rpmtest/test3aa|root|bin|33257|15b44c8d97772e0278cee14e0f
> > 8e4a57||2816|8|6816203|
> >
> > Note there is an entry for the additional
> directory
> > (/tmp/rpmtest). But
> > there is also an entry for the other directory
> (/tmp/rpmtest/newdir)
> > although there is no corresponding entry in the
> spec file.
> >
> > But look, the user/group/mode of
> /tmp/rpmtest/newdir/ has been set to
> > the same as /tmp/rpmtest.
> >
> > Two quuestions: Why the extra entry in the rpm
> (for
> > /tmp/rpmtest/newdir)
> 
> When a directory is specified in the files list, all
> sub-directories and
> files under it will also be included unless %dir is
> specified for the
> directory. Pleaseuse %dir before the directory name
> and see what happens!

It's really intresting - why rpm not complaine about
files defined twice - one time explicit
%attr(222, root, bin) /tmp/rpmtest/newdir/newfile
%attr(111, root, bin) /tmp/rpmtest/test3aa
and one time implicit (with /tmp/rpmtest directory)

Valery

 
> > and why were its user/group/mode set to the same
> as the other
> > directory
> > (/tmp/rpmtest)?
> 
> This is because it is including /tmp/rpmtest/newdir
> because it is under
> /tmp/rpmtest and hence the same User/group/mode.
> 
> >
> > Thanks.
> >
> > Regards,
> >
> > Howard
> >
> > P.S. Try it yourself!
> >
> 
> Regards,
> Bharavi.
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://www.redhat.com/mailman/listinfo/rpm-list


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com




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