#132 Add support for rpmlint 2.X
Merged by fbo. Opened by fbo.
fbo/zuul-distro-jobs rpmlint2  into  master

Download 132.patch

rpmlint 2.X detects and loads rpmlintrc file

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

rebased onto de77904e012a6462dbcffbf1013e069e5401bdae

Build succeeded.

rebased onto 12fa106b8d255bb4987876e8d879289785248d3d

Build succeeded.

rpmlint 2.X detects and loads rpmlintrc file

Are you sure?

I think we still need to pass it via the -c option:

$ rpmlint ./python3.11.spec ./results_python3.11/3.11.0~b4/1.fc37/python*
...
=========== 10 packages and 1 specfiles checked; 98 errors, 325 warnings, 98 badness; has taken 36.6 s ==========
$ rpmlint -c python3.11.rpmlintrc ./python3.11.spec ./results_python3.11/3.11.0~b4/1.fc37/python*
...
============= 10 packages and 1 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 10.3 s ============

Well I need to double check, because during my testing I saw that rpmlint detected the rpmlintrc file w/o passing the "-c" parameter.

```[root@982903cd21af src]# rpmlint python3.11.spec

=================================================================================== rpmlint session starts ==================================================================================
rpmlint: 2.2.0
configuration:
/usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
/etc/xdg/rpmlint/fedora.toml
/etc/xdg/rpmlint/licenses.toml
/etc/xdg/rpmlint/scoring.toml
/etc/xdg/rpmlint/users-groups.toml
/etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: python3.11.rpmlintrc <--------
checks: 32, packages: 1

```

Then I will rework this patch on Monday.

That autodetection only seems to work if I pass the spec file only. Also, it seems to be parsed using the rpmlint 1.1 syntax.

So maybe we can do it this way:

  • if there is rpmlintrc file, use --rpmlintrc xxx.rpmlintrc -- that should work for packages without need for much changes.
  • If there is rpmlint.toml, use -c rpmlint.toml -- that should work for packages that want to use new config format.

We should also probably check if some bodhi testes don't already do something similar.

1 new commit added

  • Support for both -c and -r option for rpmlint2

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

We should also probably check if some bodhi testes don't already do something similar.

It seems that bodhi testes don't actually run rpmlint.

2 new commits added

  • Support for both -c and -r option for rpmlint2
  • Add support for rpmlint 2.X

Build succeeded.

@churchyard thanks for checking that and providing guidance ! :) I'm updating the patch accordingly.

From my basic testing the PR seems to behave as expected.
I see that you are running https://src.fedoraproject.org/rpms/python3.11/pull-request/69 to validate with the toml config.
Do you mind to open another PR with the depends-on but by keeping the rpmlintrc file ?

https://src.fedoraproject.org/rpms/python3.11/pull-request/70

Looking at your PR, I see that it failed due to "desktop-file-validate" from package desktop-file-utils which is not a Require of rpmlint.

I'll add an install step for that package in that role playbook. I'll push a new commit here.

However a bug should be opened on https://bugzilla.redhat.com/enter_bug.cgi?component=rpmlint&product=Fedora

1 new commit added

  • Add desktop-file-utils deps which is missing from rpmlint package reqs

Build succeeded.

However a bug should be opened on https://bugzilla.redhat.com/enter_bug.cgi?component=rpmlint&product=Fedora

Happy to do that but I n longer see the error you got.

Here is the console log: https://fedora.softwarefactory-project.io/zuul/build/d7d709ce480e4cebbf96a2e93e71200c/console

where you should see:
(none): E: fatal error while reading python3-idle-3.11.0~b5-1.fc37.x86_64.rpm: [Errno 2] No such file or directory: 'desktop-file-validate'

Here is the console log: https://fedora.softwarefactory-project.io/zuul/build/d7d709ce480e4cebbf96a2e93e71200c/console

where you should see:
(none): E: fatal error while reading python3-idle-3.11.0~b5-1.fc37.x86_64.rpm: [Errno 2] No such file or directory: 'desktop-file-validate'

https://src.fedoraproject.org/rpms/rpmlint/pull-request/26

Pull-Request has been merged by fbo

Metadata