Skip to content

Fix POSIX portability, Source0 naming, and License tags in RPM specs and e2e tests - #5

Merged
ayanimea merged 3 commits into
feature-alma8from
copilot/sub-pr-2
Mar 8, 2026
Merged

Fix POSIX portability, Source0 naming, and License tags in RPM specs and e2e tests#5
ayanimea merged 3 commits into
feature-alma8from
copilot/sub-pr-2

Conversation

Copilot AI commented Mar 8, 2026

Copy link
Copy Markdown
  • Fix head -3head -n 3 in tests/e2e_cnee.sh
  • Fix Source0 / packname in specs to use lowercase xnee
  • Fix License tags in both specs
  • Fix tarball name in el6.yml workflow (Xneexnee) to match spec
  • Fix tarball name in el8.yml workflow (Xneexnee) to match spec
  • Code review — no issues found

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…tests

Co-authored-by: ayanimea <13433370+ayanimea@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Actions workflows for EL 6 and 8 Fix POSIX portability, Source0 naming, and License tags in RPM specs and e2e tests Mar 8, 2026
@ayanimea
ayanimea requested a review from Copilot March 8, 2026 13:00
@ayanimea

ayanimea commented Mar 8, 2026

Copy link
Copy Markdown
Owner

@copilot CI/CD build fails:

Dependency Updated:
  glibc.x86_64 0:2.12-1.212.el6_10.3  glibc-common.x86_64 0:2.12-1.212.el6_10.3 

Complete!
+ '[' x86_64 = i686 ']'
+ cd /workspace
++ grep AC_INIT configure.in
++ awk 'BEGIN {FS=","} { print $2 }'
++ tr -d ' '
+ XNEE_VERSION=4.0
+ XNEE_RELEASE=1
+ mkdir -p /root/rpmbuild/BUILD /root/rpmbuild/RPMS /root/rpmbuild/SOURCES /root/rpmbuild/SPECS /root/rpmbuild/SRPMS
+ cp Xnee-4.0.tar.gz /root/rpmbuild/SOURCES/
+ sed -e s/XNEE_VERSION/4.0/g -e s/XNEE_RELEASE/1/g build/SPECS/cnee-el6.spec
+ '[' x86_64 = i686 ']'
+ rpmbuild -ba /root/rpmbuild/SPECS/cnee.spec
error: File /root/rpmbuild/SOURCES/xnee-4.0.tar.gz: No such file or directory
Error: Process completed with exit code 1.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses three categories of issues in RPM spec metadata and shell script portability:

  1. Corrects packname from Xnee to xnee in both EL6 and EL8 spec files, fixing Source0 URL and %setup directory references to match the lowercase upstream tarball naming.
  2. Corrects the License tags from GPLv2+/GPL-2.0-or-later to GPLv3+/GPL-3.0-or-later, matching the actual GPLv3 text in the COPYING file.
  3. Replaces non-POSIX head -3 with POSIX-compliant head -n 3 in tests/e2e_cnee.sh for compatibility on minimal EL6 environments.

Changes:

  • head -3 replaced with POSIX-compliant head -n 3 in two places in the test script
  • packname macro changed from Xnee to xnee in both spec files
  • License tags 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 -3head -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.

Comment thread build/SPECS/cnee-el8.spec
@@ -1,16 +1,12 @@
%define packname Xnee
%define packname xnee

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
%define packname xnee
%define packname Xnee

Copilot uses AI. Check for mistakes.
Comment thread build/SPECS/cnee-el6.spec
@@ -1,16 +1,12 @@
%define packname Xnee
%define packname xnee

Copilot AI Mar 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
%define packname xnee
%define packname Xnee

Copilot uses AI. Check for mistakes.
Co-authored-by: ayanimea <13433370+ayanimea@users.noreply.github.com>

Copilot AI commented Mar 8, 2026

Copy link
Copy Markdown
Author

@copilot CI/CD build fails:

...

Fixed in commit 8ab4c68. The workflows were creating and copying the tarball as Xnee-${XNEE_VERSION}.tar.gz (uppercase), but after the packname change the spec now expects xnee-${XNEE_VERSION}.tar.gz (lowercase). Updated both el6.yml and el8.yml to use the lowercase name consistently in both the git archive and cp steps.

@ayanimea
ayanimea marked this pull request as ready for review March 8, 2026 13:11
@ayanimea
ayanimea merged commit 6f646ae into feature-alma8 Mar 8, 2026
6 checks passed
@ayanimea
ayanimea deleted the copilot/sub-pr-2 branch March 8, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants