rpmlint %forgeautosetup support (was: Re: F38 Proposal: SPDX License Phase 1 (Self-Contained Change proposal))

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

 



Hi,

Sergey Mende wrote:
>> Mildly related, I've been working on getting rpmlint updated
>> to 2.3.0 and now 2.4.0.  I filed a PR to get comments from
>> other rpmlint maintainers and (hopefully) catch any bugs I
>> may have introduced:
>> 
>>     https://src.fedoraproject.org/rpms/rpmlint/pull-request/27
>
> A bit off topic, but it would be nice to make rpmlint
> recognize `forgeautosetup` (a simple change of
> `autosetup_regex` in rpmlint/checks/SpecCheck.py). I doubt
> that this change would be accepted upstream as it is
> fedora-specific. What you would suggest to get it through.
> Sorry for that simple question, I am quite new here, so
> not familiar with all workflows yet.

Ahh, that affects spec files which use %forgeautosetup and
have patches, right?  They get `patch-not-applied` warnings.

It may be worth asking upstream.  Such a trivial adjustment¹
to the regex might be acceptable.  If not, perhaps they'll
have a good idea for how to best override that downstream.

It appears that would require a patch at the moment, while
it would be nicer if we could adjust the regex in a config
file.

¹ The patch would look like this, for anyone curious:
diff --git i/rpmlint/checks/SpecCheck.py w/rpmlint/checks/SpecCheck.py
index 71d3ede6..95b4635e 100644
--- i/rpmlint/checks/SpecCheck.py
+++ w/rpmlint/checks/SpecCheck.py
@@ -71,7 +71,7 @@ setup_regex = re.compile(r'%setup\b')  # intentionally no whitespace before!
 setup_q_regex = re.compile(r' -[A-Za-z]*q')
 setup_t_regex = re.compile(r' -[A-Za-z]*T')
 setup_ab_regex = re.compile(r' -[A-Za-z]*[ab]')
-autosetup_regex = re.compile(r'^\s*%autosetup(\s.*|$)')
+autosetup_regex = re.compile(r'^\s*%(forge)?autosetup(\s.*|$)')
 autosetup_n_regex = re.compile(r' -[A-Za-z]*N')
 autopatch_regex = re.compile(r'^\s*%autopatch(?:\s|$)')


-- 
Todd

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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