Re: Please review use /$ in %files (Was: Re: Escaping macros in %changelog)

2018-02-12 Thread Michael Schwendt
On Thu, 8 Feb 2018 18:39:19 +0100, Petr Stodulka wrote:

> > The following:
> > %files
> > /some/directory/
> > 
> > is equivalent to:
> > %files
> > %dir /some/directory
> > /some/directory/*
> > 
> > 
> > There's nothing wrong here.
> > 
> >   
> 
> Exactly. IMHO, use of %dir macro for "top" pkg directories is more clean 
> solution, but
> doesn't matter in case the rpm is packaged correctly.

That makes no sense, if you restrict yourself to a "top" directory.
It could be a huge tree with lots of subdirectories. How would you
package it then? With explicit %dir everywhere? Or with %dir only for
the "top" directory?

Including complete directory trees with

  /foo/bar/

is fine and clean and is an advertised solution for many years.
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Please review use /$ in %files (Was: Re: Escaping macros in %changelog)

2018-02-12 Thread Michael Schwendt
On Thu, 8 Feb 2018 18:09:25 +, Tomasz Kłoczko wrote:

> I'm sure that in the past it was difference here :|

You are mistaken about that.
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Please review use /$ in %files (Was: Re: Escaping macros in %changelog)

2018-02-08 Thread Tomasz Kłoczko
On 8 February 2018 at 17:39, Petr Stodulka  wrote:
[..]

> > There's nothing wrong here.
> >
> >
>
> Exactly. IMHO, use of %dir macro for "top" pkg directories is more clean
> solution, but
> doesn't matter in case the rpm is packaged correctly.
>

I'm sure that in the past it was difference here :|
And I'm sure that I found few specs where it was some issue wen /$ was used.

If I'll not back with some exact examples packages/specs (which I saw in
last 2-3 weeks)  in next few days it will mean that I was wrong :/

Nevertheless I found many directories not owned by any packages on my
system as result of many upgrades.
There are few common causes of such issues:

- example gluster.spec: does owns many directories %{_libdir}/glusterfs and
by this on each upgrade to the next version is
left %{_libdir}/glusterfs/ with many empty directories inside.
Other case is that set of dependencies between subpackages are not correct
and by delete some packages ordering them during remove using dependencies
there are left some empty directories

- example libiscis.spec: sometimes it is bug in spec and exact directory is
not included in %files (not added %{_libdir}/iscis
  BTW there are two iscsi client libraries in distribution and libiscsi
moves clashing library to %{_libdir}/iscis

Probably here is more common cases when after upgrade there is left some
not deleted files or directories.

kloczek
-- 
Tomasz Kłoczko | LinkedIn: *http://lnkd.in/FXPWxH *
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Please review use /$ in %files (Was: Re: Escaping macros in %changelog)

2018-02-08 Thread Igor Gnatenko
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Thu, 2018-02-08 at 16:56 +, Tomasz Kłoczko wrote:
> BTW some massively occurring errors in really big number Fedora of specs.
> 
> Looks like many people don't know that %files entry like:
> 
> /some/directory/
> 
> does not include /some/directory into package but all files and
> subdirectories which are in /some/directory.

This is not true.

/foo/bar is same as /foo/bar/ with one caveat: /foo/bar/ will fail if "bar" is
a file and not a directory.

> What it is causing such mistake everyone can check by executing

No, this is caused by different mispackaging.

> $ (for i in /usr/{lib64,exec,share}; do find $i -name \*; done) 2>&1 |
> xargs rpm -qf |grep "is not owned by any package"

Yes, this is a problem and you better to report bugs instead of dumping this
here.
- -- 
- -Igor Gnatenko
-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEEhLFO09aHZVqO+CM6aVcUvRu8X0wFAlp8jdkACgkQaVcUvRu8
X0weJg//W5VMwRVH50A9pEQe39EdGJW+HN6jCOp6V0m6NeLyGVj01+WVXtc5X89k
z+OAwiB06l/jDbdjY6VdYfnn8Z2XBvwqyRPlRpOLrffJTuthZOk53l8LFUM6Lf9C
q6MREhl3a1sdtWPzdF2IeDNlCwGa9Eu/dsMcgVuiWi0lpfec4ADXz/kYbD8PtccS
6CyRSZjZOh7fY5xBZReMgc18qTKoo5ZR1nG0cPMfeyE8uGEOOMd0ewsKLucKXv8J
lVriDuU7e2YajnJnYAByIxJqmpIRALaQbsAcLin8uSkkHBNlY1wZsyYL2egJM1bI
XiUei/8xN/TFA3yOtu60JGfSVczJbfdSrQzNABOK9pPR3Rv9XdZTPW2QVIvjKO12
bKw2uq98n8MFszCqyw+31dpN4U5rtyDyoXhBGiBpqKORjYDG1ax8CkrfF79IR67Q
F+taFyZfa8hTQU9vn0EMLs0B/JqioMJ+/muiaNddZ/bAk30fl7cg0yPftWA4WgY1
e4Na7IXQQRbjHhdSSAST3Fqr8y2K77w40BHhR8aSWotDHhkOcdQzVObV3T/CCsqn
re8kCnqTP+YcXvN+CS0Za/6cfHq9mNipyT9xSHOK1ENN14CbmJgtnBLoftYXCrPU
vRli/1pLlPAsI5PsNwnKzee3kBnkD2eQv6aZKdh0r7s/xlRDP+k=
=lugv
-END PGP SIGNATURE-
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Please review use /$ in %files (Was: Re: Escaping macros in %changelog)

2018-02-08 Thread Petr Stodulka


On 8.2.2018 18:33, Neal Gompa wrote:
> On Thu, Feb 8, 2018 at 11:56 AM, Tomasz Kłoczko
>  wrote:
>> BTW some massively occurring errors in really big number Fedora of specs.
>>
>> Looks like many people don't know that %files entry like:
>>
>> /some/directory/
>>
>> does not include /some/directory into package but all files and
>> subdirectories which are in /some/directory.
>>
> 
> It in fact does.
> 
> The following:
> %files
> /some/directory/
> 
> is equivalent to:
> %files
> %dir /some/directory
> /some/directory/*
> 
> 
> There's nothing wrong here.
> 
> 

Exactly. IMHO, use of %dir macro for "top" pkg directories is more clean 
solution, but
doesn't matter in case the rpm is packaged correctly.

-- 
Petr Stodulka
Core Services (In-place upgrades and migrations)
IRC nicks: pstodulk, skytak
Red Hat



signature.asc
Description: OpenPGP digital signature
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Please review use /$ in %files (Was: Re: Escaping macros in %changelog)

2018-02-08 Thread Neal Gompa
On Thu, Feb 8, 2018 at 11:56 AM, Tomasz Kłoczko
 wrote:
> BTW some massively occurring errors in really big number Fedora of specs.
>
> Looks like many people don't know that %files entry like:
>
> /some/directory/
>
> does not include /some/directory into package but all files and
> subdirectories which are in /some/directory.
>

It in fact does.

The following:
%files
/some/directory/

is equivalent to:
%files
%dir /some/directory
/some/directory/*


There's nothing wrong here.


-- 
真実はいつも一つ!/ Always, there's only one truth!
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org


Re: Please review use /$ in %files (Was: Re: Escaping macros in %changelog)

2018-02-08 Thread Jerry James
On Thu, Feb 8, 2018 at 9:56 AM, Tomasz Kłoczko  wrote:
> Looks like many people don't know that %files entry like:
>
> /some/directory/
>
> does not include /some/directory into package but all files and
> subdirectories which are in /some/directory.

That is incorrect.  For example, the polyml spec file contains this in %files:

%{_libdir}/polyml/

And on my x86_64 Fedora 27 box:

$ rpm -qf /usr/lib64/polyml
polyml-5.7.1-1.fc27.x86_64

The trailing slash doesn't matter.  I use it as a visual reminder that
the %files entry is a directory, not a file.
-- 
Jerry James
http://www.jamezone.org/
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org