jenkinsci / packaging

Native packaging for Jenkins
https://jenkins.io
42 stars 83 forks source link

Diagnostic message "no matches found: [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" following installation instructions #458

Closed hakre closed 7 months ago

hakre commented 7 months ago

When following the (current) installation instructions on https://pkg.jenkins.io/debian/ a diagnostic message is given:

no matches found: [signed-by=/usr/share/keyrings/jenkins-keyring.asc]

It is in the second installation step:

Then add a Jenkins apt repository entry:

  echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
    https://pkg.jenkins.io/debian binary/ | sudo tee \
    /etc/apt/sources.list.d/jenkins.list > /dev/null

The message stems from the shell expanding the glob expression (square brackets).

Jenkins and plugins versions report

Environment Shell, Debian based system.

What Operating System are you using (both controller, and any agents involved in the problem)?

Irrelevant, this is before operating Jenkins on the system.

Reproduction steps

  1. Follow the installation instructions on a Debian based system
  2. Specifically the second one.

Expected Results

Command should not expand glob expression in square brackets.

Actual Results

Command expands glob expression in square brackets.

Anything else?

Originally reported in https://community.jenkins.io/t/venue-for-issue-patch-on-installation-instructions/13851

The diagnostic message given irritates users that copy and paste the installation instructions unmodified into their shell and submit the command.

Best practices should be followed which includes quoting parameters to prevent unintended glob expansion. Many interactive shells have the option to expand globs enabled by default.

Are you interested in contributing a fix?

Yes, already in preparation. Mark Waite already referenced the two repositories to apply changes to.

hakre commented 7 months ago

@MarkEWaite: Thanks for merging, while progressing I've now found out that https://pkg.jenkins.io/debian-stable/ is also affected. Will extend.

For

[DIR]   [debian-rc/](https://pkg.jenkins.io/debian-rc/) 2016-04-07 04:19    -    
[DIR]   [debian-stable-rc/](https://pkg.jenkins.io/debian-stable-rc/)   2016-02-04 19:46    -

I see old dates, otherwise noticed instructions are with sudo apt-key add - and therefore do not have this same issue, however they may require streamlining as using apt-key add is not recommended any longer(?). No idea about that, so won't touch for an update until further notice.

hakre commented 7 months ago

I eventually found it in the Makefile, debian-stable is likely fixed as well with #459. I'm a bit limited for building this locally and could not spot any HTML rendering the CI output, so therefore would pause here for now hoping someone else can review better.

MarkEWaite commented 7 months ago

For

[DIR] [debian-rc/](https://pkg.jenkins.io/debian-rc/) 2016-04-07 04:19    -    
[DIR] [debian-stable-rc/](https://pkg.jenkins.io/debian-stable-rc/)   2016-02-04 19:46    -

I see old dates, otherwise noticed instructions are with sudo apt-key add - and therefore do not have this same issue, however they may require streamlining as using apt-key add is not recommended any longer(?). No idea about that, so won't touch for an update until further notice.

Thanks. I agree that those directories do not need to be updated. Those directories are no longer used for Jenkins delivery. They describe the delivery process that was used at the time they were last updated (in 2016).

We only deliver Jenkins release candidates through the Jenkins war file. If we chose in the future to again deliver a release candidate in one or more of the package formats (DEB, RPM, MSI), we'd update the instructions in those directories to match the release candidates.

We don't delete them because they are part of the history of Jenkins and it has generally not been helpful to delete history.

hakre commented 7 months ago

Thanks for the clarifications @MarkEWaite and all your support during the fly.