Commit 98b8a26a authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

fix(rpmlint): also look for rpmlintrc file in the RPM_SOURCE_DIR

parent ba4f95f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ It uses the following variables:
| `lint-disabled` / `RPM_LINT_DISABLED` | Set to `true` to disable the `lint` analysis                                                | _none_ (enabled)  |
| `lint-opts` / `RPM_LINT_OPTS`         | [`rpmlint` options](https://linux.die.net/man/1/rpmlint)                                    | `--info`          |

If a rpmlint rc file (`rpmlintrc`, `.rpmlintrc` or `.rpmlint`) is found at the root of your repository,
If a rpmlint rc file (`rpmlintrc`, `.rpmlintrc` or `.rpmlint`) is found in your `source-dir` / `RPM_SOURCE_DIR` or at the root of your repository,
it will be automatically used by the template.

## Extra - Recommended resources
+3 −3
Original line number Diff line number Diff line
@@ -448,8 +448,8 @@ rpm-build:
          ${tbc_version:+--define="tbc_version $tbc_version"} \
          --undefine=_disable_source_fetch \
          --define="_topdir $CI_PROJECT_DIR/rpmbuild" \
          --define="_sourcedir \
          $CI_PROJECT_DIR/$RPM_SOURCE_DIR" $RPM_BUILD_OPTS $RPM_SPEC_FILE || exit_code=$?
          --define="_sourcedir $CI_PROJECT_DIR/$RPM_SOURCE_DIR" \
          $RPM_BUILD_OPTS $RPM_SPEC_FILE || exit_code=$?
        if [[ $exit_code -ne 11 ]]
        then
          exit $exit_code
@@ -481,7 +481,7 @@ rpm-lint:
  script:
    # maybe use custom rpmlint file
    - |
      rpmlintrc=$(ls -1 "rpmlintrc" 2>/dev/null || ls -1 ".rpmlintrc" 2>/dev/null || ls -1 ".rpmlint" 2>/dev/null || echo "")
      rpmlintrc=$(ls -1 "$RPM_SOURCE_DIR/rpmlintrc" 2>/dev/null || ls -1 "$RPM_SOURCE_DIR/.rpmlintrc" 2>/dev/null || ls -1 "$RPM_SOURCE_DIR/.rpmlint" 2>/dev/null || ls -1 "rpmlintrc" 2>/dev/null || ls -1 ".rpmlintrc" 2>/dev/null || ls -1 ".rpmlint" 2>/dev/null || echo "")
      if [[ "$rpmlintrc" ]]
      then
        log_info "Custom \\e[33;1m${rpmlintrc}\\e[0m file found: use"