list files in %files section of .spec

arnaud gaboury arnaud.gaboury at gmail.com
Mon Dec 7 10:06:18 UTC 2015


On Mon, Dec 7, 2015 at 10:22 AM, arnaud gaboury
<arnaud.gaboury at gmail.com> wrote:
> On Mon, Dec 7, 2015 at 10:02 AM, arnaud gaboury
> <arnaud.gaboury at gmail.com> wrote:
>> I am not sure how I shall lsit my files under the %files section. My
>> doubt is how deep I shall go in lisiting
>> direcrories/subdirectories/files.
>>
>> Below is part of the content of my buildroot
>> ----------------------------------------------------------------
>> % ls usr/lib64/rstudio-server
>> bin/  resources/  www-symbolmaps/  INSTALL  README.md  VERSION
>> R/    www/        COPYING          NOTICE   SOURCE
>>
>> % ls -al usr/lib64/rstudio-server/bin/
>> total 22M
>> drwxr-xr-x 1 poisonivy poisonivy  142 Dec  7 08:12 ./
>> drwxr-xr-x 1 poisonivy poisonivy  144 Dec  7 08:11 ../
>> drwxr-xr-x 1 poisonivy poisonivy   42 Dec  7 08:11 pandoc/
>> drwxr-xr-x 1 poisonivy poisonivy  178 Dec  7 08:11 postback/
>> -rwxr-xr-x 1 poisonivy poisonivy  629 Dec  7 08:09 r-ldpath*
>> -rwxr-xr-x 1 poisonivy poisonivy 3.3M Dec  7 08:12 rpostback*
>> -rwxr-xr-x 1 poisonivy poisonivy 4.6M Dec  7 08:12 rserver*
>> -rwxr-xr-x 1 poisonivy poisonivy 2.8M Dec  7 08:12 rserver-pam*
>> -rwxr-xr-x 1 poisonivy poisonivy  11M Dec  7 08:12 rsession*
>> -rwxr-xr-x 1 poisonivy poisonivy 3.1K Dec  7 08:09 rstudio-server*
>> --------------------------------------------------------------------
>>
>> What I would do is this:
>>
>> %files
>>
>> %{_libdir}/%{name}/bin/pandoc/        <--- dir
>> %{_libdir}/%{name}/bin/postback/     <---- dir
>> %{_libdir}/%{name}/bin/r-ldpath         <----- file
>> %{_libdir}/%{name}/bin/rpostback      <---- file
>
> ERRATA:
>>
>> %{_libdir}%{name}/bin/pandoc/        <--- dir
>> %{_libdir}%{name}/bin/postback/     <---- dir
>> %{_libdir}%{name}/bin/r-ldpath         <----- file
>> %{_libdir}%{name}/bin/rpostback      <---- file
>>
>> etc with all files

In fact, I just did this and it build fine:

%files
%defattr(-, root, root, -)
%{_libdir}/%{name}/*
%{_localstatedir}/*
%{_sysconfdir}/*

When looking at various spec files from Fedora repo, I can't see such
method.Most spec files contain a very long list of files. Why? Is
there any reason not to use /* ?


>>
>> Is this correct? pandoc/ and postbac directories only contain files, no subdir.
>>
>> Why not simply:
>>
>> %{_libdir}/%{name}/bin/
>>
>>
>> Thank you for hints.
>>
>>
>>
>>
>> --
>>
>> google.com/+arnaudgabourygabx
>
>
>
> --
>
> google.com/+arnaudgabourygabx



-- 

google.com/+arnaudgabourygabx


More information about the users mailing list