Fix POSIX portability, Source0 naming, and License tags in RPM specs and e2e tests - #5
Conversation
…tests Co-authored-by: ayanimea <13433370+ayanimea@users.noreply.github.com>
|
@copilot CI/CD build fails: |
There was a problem hiding this comment.
Pull request overview
This PR addresses three categories of issues in RPM spec metadata and shell script portability:
- Corrects
packnamefromXneetoxneein both EL6 and EL8 spec files, fixingSource0URL and%setupdirectory references to match the lowercase upstream tarball naming. - Corrects the
Licensetags fromGPLv2+/GPL-2.0-or-latertoGPLv3+/GPL-3.0-or-later, matching the actual GPLv3 text in theCOPYINGfile. - Replaces non-POSIX
head -3with POSIX-complianthead -n 3intests/e2e_cnee.shfor compatibility on minimal EL6 environments.
Changes:
head -3replaced with POSIX-complianthead -n 3in two places in the test scriptpacknamemacro changed fromXneetoxneein both spec filesLicensetags corrected from GPLv2+/GPL-2.0-or-later to GPLv3+/GPL-3.0-or-later in both spec files, removing the now-redundant explanatory comments
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tests/e2e_cnee.sh |
Two head -3 → head -n 3 for POSIX portability |
build/SPECS/cnee-el8.spec |
packname lowercased, License updated to GPL-3.0-or-later |
build/SPECS/cnee-el6.spec |
packname lowercased, License updated to GPLv3+ |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,16 +1,12 @@ | |||
| %define packname Xnee | |||
| %define packname xnee | |||
There was a problem hiding this comment.
The packname change from Xnee to xnee introduces a mismatch between the spec file and the CI pipeline in .github/workflows/el8.yml.
After this change, Source0 resolves to .../xnee-%{version}.tar.gz and %setup -q -n %{packname}-%{version} expects a top-level directory named xnee-<version> inside the archive. However, the CI workflow (.github/workflows/el8.yml, lines 64–65) creates the source tarball with:
git archive --prefix="Xnee-${XNEE_VERSION}/" HEAD | gzip > "Xnee-${XNEE_VERSION}.tar.gz"
and copies it as Xnee-${XNEE_VERSION}.tar.gz (line 76) into $HOME/rpmbuild/SOURCES/. RPM rpmbuild will fail because it cannot find a source file named xnee-<version>.tar.gz, and even if the filename were matched, %setup would fail to find the expected directory xnee-<version> inside the archive (the archive root is Xnee-<version>/).
Either the CI workflow must also be updated to produce xnee-${XNEE_VERSION}.tar.gz / --prefix="xnee-${XNEE_VERSION}/", or the packname in the spec should remain Xnee to match the CI-produced tarball.
| %define packname xnee | |
| %define packname Xnee |
| @@ -1,16 +1,12 @@ | |||
| %define packname Xnee | |||
| %define packname xnee | |||
There was a problem hiding this comment.
The same packname change from Xnee to xnee creates an identical mismatch with the CI pipeline in .github/workflows/el6.yml.
After this change, Source0 resolves to .../xnee-%{version}.tar.gz and %setup -q -n %{packname}-%{version} expects a directory named xnee-<version> inside the archive. However, the EL6 CI workflow (.github/workflows/el6.yml, lines 119–120, 150) creates and copies a tarball named Xnee-${XNEE_VERSION}.tar.gz with an archive prefix Xnee-<version>/. This will cause rpmbuild to fail at the %prep stage: the source file xnee-<version>.tar.gz will not be found, and %setup would also fail to find the xnee-<version> directory inside the archive.
The CI workflows need to be updated to use lowercase xnee-${XNEE_VERSION}.tar.gz / --prefix="xnee-${XNEE_VERSION}/" to match the updated spec, or the spec packname should stay as Xnee.
| %define packname xnee | |
| %define packname Xnee |
Co-authored-by: ayanimea <13433370+ayanimea@users.noreply.github.com>
... Fixed in commit 8ab4c68. The workflows were creating and copying the tarball as |
head -3→head -n 3intests/e2e_cnee.shxneeel6.ymlworkflow (Xnee→xnee) to match specel8.ymlworkflow (Xnee→xnee) to match spec💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.