Re: rpm bug for multiple README.md or LICENSE.md in EPEL 8 and Fedora

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

 



On Sun, Dec 5, 2021 at 1:49 AM Otto Urpelainen <oturpe@xxxxxx> wrote:
>
> Nico Kadel-Garcia kirjoitti 5.12.2021 klo 5.07:
> > I've been trying to bundle the current ansible-5.0.1 release as an RPM
> > for Fedora and EPEL use. Leaving aside the peculiar decisions to
> > replace the pypi.org "ansible" tarball with a tarball of roughly 150
> > modules from the "ansiblee-collections" repos, and moving the actual
> > ansible software to a distinct python tarball called "ansible-core"
> > without changing the source repo or the actual critical installed
> > python modules, the new "ansible" has more than 300 files called
> > "README.md" and more than 100 files called "LICENSE.md".
> >
> > This breaks building RPMs for EPEL 8 or Fedora, because the '%doc' and
> > '%license' macros strip off the subdirectories of the files and
> > install them directly at the top of the docdir.
> >
> > Basicely these only generate one file:
> >
> >         %doc README.md
> >         %doc dir1/README.md
> >         %doc dir2/README.md
> >
> >         %license LICENSE.md
> >          %license dir1/LICENSE
> >          %license dir2/LICENSE.md
> >
> > When compiled, these would only produce:
> >
> >            /usr/share/doc/package-%{fersion}/README.md
> >            /usr/share/doc/package-%{fersion}/LICENSE.md
>
> Path stripping only happens if you list relative paths with %doc or
> %license, which which case rpm looks for them from the build directory.
> If you specify absolute paths, rpm looks for them in the buildroot like
> it does for any other files. See section %doc and %license at rpm spec
> file format reference [1].
>
> So something like this should work:
>
>      %install
>      cp README.md
> %{buildroot}/%{_datadir}/doc/%{package}-%{version}/README.md
>      cp dir1/README.md
> %{buildroot}/%{_datadir}/doc/%{package}-%{version}/dir1/README.md
>      # ...
>
>      %files
>      %doc %{_datadir}/doc/%{package}-%{version}/README.md
>      %doc %{_datadir}/doc/%{package}-%{version}/dir1/README.md
>      # ...
>
> [1]: https://rpm-software-management.github.io/rpm/manual/spec.html
>
> Otto

I'm reading that documentation. It says *nothing* about path
stripping, a behavior which has apparently changed sometime since RHEL
7 or its ancestorFedora 12. So if this is expected behavior, I'd like
to see it documented.

Does anyone know how to turn it off for '%doc' and ''%license'? It
doesn't seem to be in the macros, and diving into the C code to get
this change reverted for a future release of rpm seems.... like a very
long term goal. It seems to me to be unwelcome and undesirable
behavior for precisely the kind of situation of 'ansible tarball has
more than 300 README.md files'. And given my previous concerns about
that very large bundle, I suspect I'll not have good success getting
the authors to discard it and use a more typical factored python
submodule distribution.
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux