Re: old RPM code in my package - safe to remove this bit ?

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

 



On Thu, Nov 30, 2023 at 1:19 AM Tom Hughes via devel
<devel@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> It hasn't been needed for a long time.

Good, thanks. Off it goes. :)

> It's just making %license an alias for %doc if your building
> for a release old enough that %license isn't supported, as
> detected by checking if %licensedir is defined.

Why is it checked through the %licensedir macro, and not the %license
VFT instead?
If %doc VFT could be used as an actual value for a macro, I'd assume
it could be used in conditional too. (to verify whether such VFT
exists)

Michal

--

Michal Schorm
Software Engineer
Core Services - Databases Team
Red Hat

--

On Thu, Nov 30, 2023 at 1:19 AM Tom Hughes via devel
<devel@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> On 30/11/2023 00:14, Michal Schorm wrote:
>
> > I've stumbled upon this piece of code in my package:
> >    # Define license macro if not present
> >    %{!?_licensedir:%global license %doc}
> >
> > https://src.fedoraproject.org/rpms/mariadb/blob/rawhide/f/mariadb.spec#_322
> >
> > Git blame points out 7 year old commit:
> > https://src.fedoraproject.org/rpms/mariadb/c/e3d4b2f14e5e0cb7b42b468ffb9de6ff39e3d248?branch=rawhide
> >
> > The RPM docs says the %license 'Virtual File Attribute' was added in
> > version 4.11, which has been added to Fedora years before the commit
> > above:
> > https://src.fedoraproject.org/rpms/rpm/c/2970ed07c98c8929eca0bdfebda389af5a2ef92d?branch=rawhide
> >
> > I tried to remove the line and I haven't noticed any differences in
> > output of "rpm -q -d <rpm>" and "rpm -q -L <rpm>" before and after.
> >
> > I'm not even sure what the line is trying to do - I read it as "under
> > some condition, create %license global macro with value %doc".
>
> It's just making %license an alias for %doc if your building
> for a release old enough that %license isn't supported, as
> detected by checking if %licensedir is defined.
>
> It hasn't been needed for a long time.
>
> Tom
>
> --
> Tom Hughes (tom@xxxxxxxxxx)
> http://compton.nu/
> --
> _______________________________________________
> 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, report it: https://pagure.io/fedora-infrastructure/new_issue
--
_______________________________________________
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, report it: https://pagure.io/fedora-infrastructure/new_issue




[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