forked from hesa/gnu-xnee
-
Notifications
You must be signed in to change notification settings - Fork 0
Port to EL 6 and 8 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
4dbe837
Initial plan
Copilot 839293e
feat: add EL8 CI/CD workflow and RPM spec for Enterprise Linux 8 support
Copilot 16b8bad
fix: add texinfo dep, correct RPM spec files section, add missing cne…
Copilot e2e6878
fix: remove dead enum variable instances causing -fno-common linker e…
Copilot 821ebec
feat: add e2e tests for cnee; clean up committed build artifacts; fix…
Copilot 9eeef53
chore: remove all remaining tracked build artifacts from repository
Copilot e88fb76
fix: restore accidentally deleted source files (Makefile.am, acconfig…
Copilot 2c048a4
chore: remove remaining tracked binary build artifacts; extend .gitig…
Copilot 8c8cdd7
fix: static X11 linking, git archive dist, clean autotools/* EXTRA_DI…
Copilot 96fb723
fix: remove accidentally committed xnee-3.20/ dist dir; add dist dirs…
Copilot c71f070
fix: remove libX11-static/libXtst-static (not in EL8 repos); use dyna…
Copilot 6705b68
fix: correct makeinfo invocation in man target (cnee.texinfo not cnee…
Copilot cb8229a
chore: plan - fix spec %files and workflow SRPM collection for comple…
Copilot 645fb94
fix: complete RPM generation on AlmaLinux 8 - fix spec %files and col…
Copilot 0f4cbc0
feat: add workflow_dispatch trigger to allow manual workflow runs
Copilot 0876080
fix: git safe.directory for container, untrack generated sh files, qu…
Copilot 0ac74c8
fix: add %{?_isa} to Requires/BuildRequires to prevent i686 lib pull-…
Copilot f01b05c
test: add record/replay e2e tests using Xvfb virtual display; install…
Copilot 277e906
fix: kill Xvfb on exit in e2e trap; pin upload-artifact to SHA in wor…
Copilot 9a68ab4
fix: guard trap cleanup with || true to ensure it always completes
Copilot c65ca5e
chore: bump version to 4.0 — major migration release
Copilot 8be52ae
fix: remove generated man pages from vcs, fix typos in .in sources
Copilot 294cc69
Update doc/version.texi
ayanimea d54ae0a
Update build/SPECS/cnee-el8.spec
ayanimea ec829a3
Update doc/stamp-vti
ayanimea 036469b
fix: use correct X11 socket path in display availability check
Copilot 8a5118c
feat: add EL6 RPM spec and CI workflow
Copilot b656d99
fix(ci): EL6 checkout failure + add i686 matrix builds for EL6 and EL8
Copilot 1a8f400
fix(ci): EL6 checkout failure + i686/x86_64 matrix builds
Copilot 4d45929
fix(ci): extract shared CentOS 6 vault repo helper to eliminate dupli…
Copilot 764e48d
Merge pull request #1 from ayanimea/copilot/port-xnee-to-rhel8
ayanimea 014c32d
Initial plan
Copilot ee76d69
fix: apply review feedback - ERE grep, non-empty file check, version …
Copilot f01e9b7
docs: update dates to 2026 in INSTALL and man pages
Copilot 919d68e
Update INSTALL
ayanimea ffdd713
Merge pull request #3 from ayanimea/copilot/sub-pr-2
ayanimea 7ef76cb
Initial plan
Copilot 9372b7f
Fix review comments: portable CC in INSTALL, mktemp guard in e2e test…
Copilot 95570a0
Use exit status to guard mktemp in e2e test script
Copilot 50ad74c
Merge pull request #4 from ayanimea/copilot/sub-pr-2
ayanimea afd27c3
Initial plan
Copilot f879561
Fix head -3 portability, Source0 name, and License tags in specs and …
Copilot 8ab4c68
Fix tarball name in workflows to match lowercase spec packname (xnee)
Copilot 6f646ae
Merge pull request #5 from ayanimea/copilot/sub-pr-2
ayanimea b286e7b
Initial plan
Copilot 79179a4
build: add perl as explicit dependency in EL6/EL8 workflows and spec …
Copilot 51b08bf
Merge pull request #6 from ayanimea/copilot/sub-pr-2
ayanimea 82c96f3
Initial plan
Copilot 08857ac
Fix cnee_demo.c extern redeclaration and add Makefile.gdoc no-op comment
Copilot 0c26b08
Update doc/Makefile.gdoc
ayanimea d892f1e
Merge pull request #7 from ayanimea/copilot/sub-pr-2
ayanimea 985f924
Initial plan
Copilot c872afa
Fix version assertion case sensitivity and Makefile.am cnee.texinfo i…
Copilot b47751d
Merge pull request #8 from ayanimea/copilot/sub-pr-2
ayanimea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,185 @@ | ||
| name: Enterprise Linux 6 CI/CD | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["**"] | ||
| pull_request: | ||
| branches: ["**"] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-and-package-el6: | ||
| name: Build and package on Enterprise Linux 6 (${{ matrix.arch }}) | ||
| # Run on the Ubuntu host so that actions/checkout (Node 20) works; all | ||
| # CentOS 6 work is done via explicit `docker run centos:6` invocations | ||
| # below. Using `container:` at job level would inject Node 20 into the | ||
| # CentOS 6 container, which fails because CentOS 6 ships glibc 2.12 and | ||
| # Node 20 requires glibc >= 2.17. | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| strategy: | ||
| matrix: | ||
| arch: [x86_64, i686] | ||
|
|
||
| steps: | ||
| - name: Checkout source | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
|
||
| - name: Write shared CentOS 6 vault repo helper | ||
| run: | | ||
| # CentOS 6 reached EOL; vault.centos.org returns 403 on HTTP so HTTPS | ||
| # is required. The x86_64 vault repos are correct for both arches: | ||
| # CentOS 6 multilib ships i686 packages in the same repositories. | ||
| # Use printf to avoid a nested heredoc that would break YAML parsing. | ||
| cat > "$RUNNER_TEMP/setup-el6-repos.sh" << 'SETUP' | ||
| setup_centos6_vault_repos() { | ||
| printf '%s\n' \ | ||
| '[base]' \ | ||
| 'name=CentOS-6 - Base' \ | ||
| 'baseurl=https://vault.centos.org/6.10/os/x86_64/' \ | ||
| 'gpgcheck=1' \ | ||
| 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6' \ | ||
| '' \ | ||
| '[updates]' \ | ||
| 'name=CentOS-6 - Updates' \ | ||
| 'baseurl=https://vault.centos.org/6.10/updates/x86_64/' \ | ||
| 'gpgcheck=1' \ | ||
| 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6' \ | ||
| '' \ | ||
| '[extras]' \ | ||
| 'name=CentOS-6 - Extras' \ | ||
| 'baseurl=https://vault.centos.org/6.10/extras/x86_64/' \ | ||
| 'gpgcheck=1' \ | ||
| 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6' \ | ||
| > /etc/yum.repos.d/CentOS-Base.repo | ||
| } | ||
| SETUP | ||
|
|
||
| - name: Build and test inside CentOS 6 container | ||
| run: | | ||
| cat > "$RUNNER_TEMP/build-el6.sh" << 'SCRIPT' | ||
| set -ex | ||
| # shellcheck source=/dev/null | ||
| . /setup-el6-repos.sh | ||
| setup_centos6_vault_repos | ||
|
|
||
| # Install base build dependencies | ||
| yum install -y \ | ||
| gcc make autoconf automake libtool pkgconfig perl \ | ||
| libX11-devel libXtst-devel texinfo rpm-build git | ||
|
|
||
| # 32-bit (i686) extras and compiler wrapper | ||
| if [ "$TARGET_ARCH" = "i686" ]; then | ||
| # libgcc.i686 provides /lib/libgcc_s.so.1 needed by gcc -m32 | ||
| yum install -y \ | ||
| libgcc.i686 glibc-devel.i686 \ | ||
| libX11-devel.i686 libXtst-devel.i686 | ||
| # Provide i686-redhat-linux-gnu-gcc so --host= works with autoconf | ||
| printf '#!/bin/sh\nexec gcc -m32 "$@"\n' \ | ||
| > /usr/local/bin/i686-redhat-linux-gnu-gcc | ||
| chmod +x /usr/local/bin/i686-redhat-linux-gnu-gcc | ||
| ln -sf /usr/local/bin/i686-redhat-linux-gnu-gcc \ | ||
| /usr/local/bin/i686-redhat-linux-gnu-g++ | ||
| # CFLAGS/LDFLAGS are for this build+test step only. | ||
| # The RPM step drives -m32 via rpmbuild --define "optflags ..." | ||
| # so these are intentionally not set there. | ||
| export CFLAGS="-m32 -march=i686 -mtune=generic" | ||
| export LDFLAGS="-m32" | ||
| CONFIGURE_HOST="--host=i686-redhat-linux-gnu --build=x86_64-redhat-linux-gnu" | ||
| else | ||
| CONFIGURE_HOST="" | ||
| fi | ||
|
|
||
| cd /workspace | ||
| make -f Makefile.cvs generate | ||
| # word-split of $CONFIGURE_HOST is intentional (empty or two flags) | ||
| # shellcheck disable=SC2086 | ||
| ./configure --disable-gui --disable-doc --disable-xinput2 \ | ||
| $CONFIGURE_HOST | ||
| make | ||
| make -C cnee/src man | ||
| chmod +x tests/e2e_cnee.sh | ||
| ./tests/e2e_cnee.sh ./cnee/src/cnee | ||
| SCRIPT | ||
| docker run --rm \ | ||
| -e TARGET_ARCH="${{ matrix.arch }}" \ | ||
| -v "$PWD:/workspace" \ | ||
| -v "$RUNNER_TEMP/build-el6.sh:/build.sh:ro" \ | ||
| -v "$RUNNER_TEMP/setup-el6-repos.sh:/setup-el6-repos.sh:ro" \ | ||
| centos:6 bash /build.sh | ||
|
|
||
| - name: Create source distribution | ||
| run: | | ||
| XNEE_VERSION=$(grep 'AC_INIT' configure.in \ | ||
| | awk 'BEGIN {FS=","} { print $2 }' \ | ||
| | tr -d ' ') | ||
| # git safe.directory was added in git 2.35.2; ignore errors on older git. | ||
| git config --global --add safe.directory "$(pwd)" 2>/dev/null || true | ||
| git archive --prefix="xnee-${XNEE_VERSION}/" HEAD \ | ||
| | gzip > "xnee-${XNEE_VERSION}.tar.gz" | ||
|
|
||
| - name: Build RPM inside CentOS 6 container | ||
| run: | | ||
| cat > "$RUNNER_TEMP/rpm-el6.sh" << 'SCRIPT' | ||
| set -ex | ||
| # shellcheck source=/dev/null | ||
| . /setup-el6-repos.sh | ||
| setup_centos6_vault_repos | ||
|
|
||
| yum install -y \ | ||
| gcc make autoconf automake libtool pkgconfig perl \ | ||
| libX11-devel libXtst-devel texinfo rpm-build | ||
|
|
||
| if [ "$TARGET_ARCH" = "i686" ]; then | ||
| yum install -y \ | ||
| libgcc.i686 glibc-devel.i686 \ | ||
| libX11-devel.i686 libXtst-devel.i686 | ||
| printf '#!/bin/sh\nexec gcc -m32 "$@"\n' \ | ||
| > /usr/local/bin/i686-redhat-linux-gnu-gcc | ||
| chmod +x /usr/local/bin/i686-redhat-linux-gnu-gcc | ||
| ln -sf /usr/local/bin/i686-redhat-linux-gnu-gcc \ | ||
| /usr/local/bin/i686-redhat-linux-gnu-g++ | ||
| fi | ||
|
|
||
| cd /workspace | ||
| XNEE_VERSION=$(grep 'AC_INIT' configure.in \ | ||
| | awk 'BEGIN {FS=","} { print $2 }' | tr -d ' ') | ||
| XNEE_RELEASE=1 | ||
| mkdir -p "$HOME/rpmbuild"/{BUILD,RPMS,SOURCES,SPECS,SRPMS} | ||
| cp "xnee-${XNEE_VERSION}.tar.gz" "$HOME/rpmbuild/SOURCES/" | ||
| sed \ | ||
| -e "s/XNEE_VERSION/${XNEE_VERSION}/g" \ | ||
| -e "s/XNEE_RELEASE/${XNEE_RELEASE}/g" \ | ||
| build/SPECS/cnee-el6.spec \ | ||
| > "$HOME/rpmbuild/SPECS/cnee.spec" | ||
|
|
||
| if [ "$TARGET_ARCH" = "i686" ]; then | ||
| # Set host to i686 so %configure uses our wrapper gcc. | ||
| # Do not export CFLAGS/LDFLAGS here to avoid polluting %configure. | ||
| rpmbuild -ba \ | ||
| --define "_host i686-redhat-linux-gnu" \ | ||
| --define "_host_alias i686-redhat-linux-gnu" \ | ||
| --define "_target_cpu i686" \ | ||
| --define "optflags -O2 -g -m32 -march=i686 -mtune=generic" \ | ||
| "$HOME/rpmbuild/SPECS/cnee.spec" | ||
| else | ||
| rpmbuild -ba "$HOME/rpmbuild/SPECS/cnee.spec" | ||
| fi | ||
|
|
||
| find "$HOME/rpmbuild/RPMS" "$HOME/rpmbuild/SRPMS" -name "*.rpm" \ | ||
| -exec cp {} /workspace/ \; | ||
| SCRIPT | ||
| docker run --rm \ | ||
| -e TARGET_ARCH="${{ matrix.arch }}" \ | ||
| -v "$PWD:/workspace" \ | ||
| -v "$RUNNER_TEMP/rpm-el6.sh:/rpm.sh:ro" \ | ||
| -v "$RUNNER_TEMP/setup-el6-repos.sh:/setup-el6-repos.sh:ro" \ | ||
| centos:6 bash /rpm.sh | ||
|
|
||
| - name: Upload RPM artifact | ||
| uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4 | ||
| with: | ||
| name: cnee-el6-${{ matrix.arch }}-rpm | ||
| path: "*.rpm" | ||
| if-no-files-found: error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| name: Enterprise Linux 8 CI/CD | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["**"] | ||
| pull_request: | ||
| branches: ["**"] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-and-package-el8: | ||
| name: Build and package on Enterprise Linux 8 | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| container: | ||
| image: almalinux:8 | ||
|
|
||
| steps: | ||
| - name: Enable PowerTools and install build dependencies | ||
| run: | | ||
| dnf install -y dnf-plugins-core | ||
| dnf config-manager --set-enabled powertools | ||
| dnf install -y \ | ||
| gcc \ | ||
| make \ | ||
| autoconf \ | ||
| automake \ | ||
| libtool \ | ||
| pkgconfig \ | ||
| perl \ | ||
| libX11-devel \ | ||
| libXtst-devel \ | ||
| texinfo \ | ||
| rpm-build \ | ||
| git \ | ||
| xorg-x11-server-Xvfb | ||
|
|
||
| - name: Checkout source | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
|
||
| - name: Build XNee | ||
| run: | | ||
| make -f Makefile.cvs generate | ||
| ./configure --disable-gui --disable-doc --disable-xinput2 | ||
| make | ||
| make -C cnee/src man | ||
|
|
||
| - name: Run e2e tests | ||
| run: | | ||
| chmod +x tests/e2e_cnee.sh | ||
| ./tests/e2e_cnee.sh ./cnee/src/cnee | ||
|
|
||
| - name: Create source distribution | ||
| run: | | ||
| XNEE_VERSION=$(grep 'AC_INIT' configure.in \ | ||
| | awk 'BEGIN {FS=","} { print $2 }' \ | ||
| | tr -d ' ') | ||
| # Inside the AlmaLinux container git runs as root while the checkout | ||
| # directory is owned by the runner user – mark it safe to allow | ||
| # git archive to work. | ||
| git config --global --add safe.directory "$(pwd)" | ||
| # Use git archive to avoid the doc/Makefile.am dia→png generation | ||
| # that make dist triggers even with --disable-doc. | ||
| git archive --prefix="xnee-${XNEE_VERSION}/" HEAD \ | ||
| | gzip > "xnee-${XNEE_VERSION}.tar.gz" | ||
|
|
||
| - name: Build RPM package | ||
| run: | | ||
| XNEE_VERSION=$(grep 'AC_INIT' configure.in \ | ||
| | awk 'BEGIN {FS=","} { print $2 }' \ | ||
| | tr -d ' ') | ||
| XNEE_RELEASE=1 | ||
|
|
||
| mkdir -p "$HOME/rpmbuild"/{BUILD,RPMS,SOURCES,SPECS,SRPMS} | ||
|
|
||
| cp "xnee-${XNEE_VERSION}.tar.gz" "$HOME/rpmbuild/SOURCES/" | ||
|
|
||
| sed \ | ||
| -e "s/XNEE_VERSION/${XNEE_VERSION}/g" \ | ||
| -e "s/XNEE_RELEASE/${XNEE_RELEASE}/g" \ | ||
| build/SPECS/cnee-el8.spec \ | ||
| > "$HOME/rpmbuild/SPECS/cnee.spec" | ||
|
|
||
| rpmbuild -ba "$HOME/rpmbuild/SPECS/cnee.spec" | ||
|
|
||
| # Copy built binary RPMs and SRPM to the workspace for artifact upload | ||
| find "$HOME/rpmbuild/RPMS" "$HOME/rpmbuild/SRPMS" -name "*.rpm" -exec cp {} . \; | ||
|
|
||
| - name: Upload RPM artifact | ||
| uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4 | ||
| with: | ||
| name: cnee-el8-rpm | ||
| path: "*.rpm" | ||
| if-no-files-found: error | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| # Autoconf / Automake generated files | ||
| Makefile | ||
| Makefile.in | ||
| aclocal.m4 | ||
| autom4te.cache/ | ||
| autotools/compile | ||
| autotools/config.guess | ||
| autotools/config.sub | ||
| autotools/depcomp | ||
| autotools/install-sh | ||
| autotools/ltmain.sh | ||
| autotools/mdate-sh | ||
| autotools/missing | ||
| autotools/texinfo.tex | ||
| config.h | ||
| config.h.in~ | ||
| config.log | ||
| config.status | ||
| configure | ||
| libtool | ||
| stamp-h.in | ||
| stamp-h1 | ||
|
|
||
| # Build artifacts | ||
| *.o | ||
| *.lo | ||
| *.la | ||
| *.a | ||
| *.so | ||
| *.so.* | ||
| .libs/ | ||
| .deps/ | ||
|
|
||
| # Generated binaries | ||
| cnee/src/cnee | ||
| gnee/src/gnee | ||
| pnee/src/pnee | ||
| libxnee/test/libtest | ||
| libxnee/test/testcallback | ||
| libxnee/test/testdisplay | ||
| libxnee/test/testfeedback | ||
| libxnee/test/testprint | ||
| libxnee/test/testsetget | ||
|
|
||
| # Generated documentation | ||
| cnee/src/cnee.1 | ||
| cnee/src/cnee.texi | ||
| cnee/src/cnee.texinfo | ||
| cnee/src/cnee.info | ||
| man/xnee.1 | ||
| gnee/man/gnee.1 | ||
| pnee/man/pnee.1 | ||
| doc/xnee.info | ||
| doc/xnee.info-* | ||
|
|
||
| # Autoconf backup files | ||
| configure~ | ||
| config.h.in~ | ||
|
|
||
| # Generated data files | ||
| share/xnee.sh | ||
| examples/simple_bash.sh | ||
|
|
||
| # Distribution archives | ||
| *.tar.gz | ||
| *.tar.bz2 | ||
| config.xnee | ||
|
|
||
| # RPM build outputs | ||
| *.rpm | ||
|
|
||
| # texinfo version stamp (generated by make) | ||
| doc/stamp-vti | ||
|
|
||
| # make dist extraction directories | ||
| xnee-*/ | ||
| Xnee-*.tar.gz |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.