#426 fix: update rpmlint options for 2.1.0
Merged 2 years ago by ngompa. Opened 2 years ago by ankursinha.
ankursinha/FedoraReview fix/issue-425  into  master

file modified
+4 -1
@@ -64,11 +64,14 @@ 

  

          arg: filenames, list of filenames to run rpmlint on

          """

+ 

          rpmlint_cfg = tempfile.NamedTemporaryFile(delete=False)

          rpmlint_cfg.write(b'addFilter("unknown-key")')

          rpmlint_cfg.close()

  

-         cmd = "rpmlint -f " + rpmlint_cfg.name + " " + " ".join(filenames)

+         # see: https://github.com/rpm-software-management/rpmlint/issues/794

+         cmd = ("rpmlint --ignore-unused-rpmlintrc --rpmlintrc " +

+                rpmlint_cfg.name + " " + " ".join(filenames))

          out = "Checking: "

          sep = "\n" + " " * len(out)

          out += sep.join([os.path.basename(f) for f in filenames])

file modified
+1 -1
@@ -44,7 +44,7 @@ 

  

  _RPMLINT_SCRIPT = (

      " mock  @config@ --chroot "

-     """ "echo 'rpmlint:'; rpmlint @rpm_names@; echo 'rpmlint-done:'" """

+     """ "echo 'rpmlint:'; rpmlint --installed @rpm_names@; echo 'rpmlint-done:'" """

  )

  

  

Fixes #425

  • rpmlint 2.1.0 seems to have changed some options: --installed is now for installed files, so tweaked that

  • Setting the "unknown-key" filter causes an error with rpmlint 2.1.0---I'm not sure why this is (someone with more rpmlint knowledge will have to work on that). So for the time being, I've just commented that out.

@ngompa : would you have an idea about the second one? (and the first one too :D )?

I'm not really sure about the "unknown-key" filter thing, that sounds like a bug. Could you file it with rpmlint upstream? https://github.com/rpm-software-management/rpmlint

Sure, submitted: https://github.com/rpm-software-management/rpmlint/issues/794

Can we merge this in the meantime, or do we want to wait for this bug to be fixed first? (I don't know what the purpose of this filter in FedoraReview is, but if it isn't too important, we could skip it for the moment to at least get the other bits working?)

This filter is for ignoring the check for whether the package is signed with a key that we don't know about. That is, it's a key that isn't in the rpm keyring.

1 new commit added

  • fix: ignore unused rpmlintrc options
2 years ago

Thanks. I added the new --ignore-unused-rpmlintrc option to the command now, and re-enabled the filter. We'll need to wait for a new rpmlint release now, I guess.

rebased onto 218c6ae

2 years ago

Pull-Request has been merged by ngompa

2 years ago