GHA: appimage7: Maintenance update
Upgrade Tcl to 8.6.16 Use versioning to include tag, indication of timestamp and git hash. Rename to include '7' in the labeling (as it is EL7 based) Improve log output to keep information about versions used. Update README.md a little.
This commit is contained in:
parent
ea5f1ed3f1
commit
6c952f98eb
|
|
@ -1,28 +0,0 @@
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
name: CI-appimage
|
||||
|
||||
jobs:
|
||||
build_appimage:
|
||||
name: Build AppImage
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: |
|
||||
export VERSION_NUM=$(ruby -e "print '$GITHUB_REF'.split('/')[2]")
|
||||
echo ::set-output name=value::${VERSION_NUM}
|
||||
- name: Build project
|
||||
run: |
|
||||
cd appimage
|
||||
make
|
||||
cp Magic-x86_64.AppImage /tmp/Magic-${{ steps.get_version.outputs.value }}-x86_64.AppImage
|
||||
- name: Upload Release Asset
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: /tmp/Magic-${{ steps.get_version.outputs.value }}-x86_64.AppImage
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
workflow_dispatch:
|
||||
|
||||
name: CI-appimage7
|
||||
|
||||
jobs:
|
||||
build_appimage7:
|
||||
name: Build AppImage EL7
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # action-gh-release
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 149 # enough to cover between tags
|
||||
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: |
|
||||
git show -s
|
||||
version=$(cat VERSION) # 8.9.999
|
||||
version_tstamp=$(git show -s "--format=%cs" | tr -d '-') # YYYYMMDD
|
||||
version_hash=$(git show -s "--format=%h") # abcdefg
|
||||
version_num=$(ruby -e "print '$GITHUB_REF'.split('/')[2]") # legacy version method: master
|
||||
echo "version=${version}"
|
||||
echo "version_tstamp=${version_tstamp}"
|
||||
echo "version_hash=${version_hash}"
|
||||
echo "version_num=${version_num}"
|
||||
VERSION_NUM="${version}~${version_tstamp}~${version_hash}"
|
||||
echo "VERSION_NUM=${VERSION_NUM}" >> $GITHUB_ENV
|
||||
echo "MAGIC_APPIMAGE_OUTPUT_FILENAME=Magic-${VERSION_NUM}-x86_64-EL7.AppImage" >> $GITHUB_ENV
|
||||
# Is this GHA being run due to a push-on-tag ? if so we make a GitHub release, otherwise we just publish artifact
|
||||
github_tag=$(echo -n "$GITHUB_REF" | sed -e 's#refs/tags/##') # 8.9.999
|
||||
echo "github_tag=$github_tag"
|
||||
if echo -n "$GITHUB_REF" | egrep -q "^refs/tags/" # check prefix
|
||||
then
|
||||
if [ -n "$github_tag" ]
|
||||
then
|
||||
echo "MY_GITHUB_TAG=${github_tag}" >> $GITHUB_ENV
|
||||
fi
|
||||
fi
|
||||
# ubuntu-latest on GHA (now needs explicit dependencies for AppImageTool)
|
||||
sudo apt-get install -y libfuse2 desktop-file-utils
|
||||
|
||||
- name: Build project
|
||||
run: |
|
||||
cd appimage
|
||||
make
|
||||
|
||||
ln -v Magic-x86_64.AppImage "${MAGIC_APPIMAGE_OUTPUT_FILENAME}"
|
||||
ls -l *.AppImage
|
||||
sha256sum *.AppImage
|
||||
pwd
|
||||
|
||||
- name: Create RELEASE-NOTES.txt
|
||||
run: |
|
||||
cd appimage
|
||||
# Find the last tag (that does not match the current GITHUB_REF)
|
||||
echo GITHUB_REF=$GITHUB_REF
|
||||
echo GITHUB_SHA=$GITHUB_SHA
|
||||
git fetch --tags --no-progress --quiet # fetch-tags: true # did not work
|
||||
git_describe=$(git describe $GITHUB_SHA | sed -e 's#-#+#')
|
||||
|
||||
# RELEASE-NOTES-EL7.txt
|
||||
echo "### ${MAGIC_APPIMAGE_OUTPUT_FILENAME} commit ${git_describe}" | sed -e 's#~#\\~#g' > RELEASE-NOTES-EL7.txt
|
||||
echo "" >> RELEASE-NOTES-EL7.txt
|
||||
echo "This release is based on EL7 (CentOS7), the AppImage format is designed to run on a wide range of Linux distributions." >> RELEASE-NOTES-EL7.txt
|
||||
echo "" >> RELEASE-NOTES-EL7.txt
|
||||
echo "See documentation at https://github.com/${GITHUB_REPOSITORY}/blob/${GITHUB_SHA:0:8}/appimage/README.md" >> RELEASE-NOTES-EL7.txt
|
||||
echo "" >> RELEASE-NOTES-EL7.txt
|
||||
length_info=$(stat "--format=%s bytes" "${MAGIC_APPIMAGE_OUTPUT_FILENAME}")
|
||||
sha256_info=$(sha256sum "${MAGIC_APPIMAGE_OUTPUT_FILENAME}" | cut -d ' ' -f1)
|
||||
echo "| | |" >> RELEASE-NOTES-EL7.txt
|
||||
echo "| :-------- | :------ |" >> RELEASE-NOTES-EL7.txt
|
||||
echo "| File Name | ${MAGIC_APPIMAGE_OUTPUT_FILENAME} |" | sed -e 's#~#\\~#g' >> RELEASE-NOTES-EL7.txt
|
||||
echo "| File Length | ${length_info} |" >> RELEASE-NOTES-EL7.txt
|
||||
echo "| File SHA256 | ${sha256_info} |" >> RELEASE-NOTES-EL7.txt
|
||||
echo "" >> RELEASE-NOTES-EL7.txt
|
||||
|
||||
# RELEASE-NOTES-CL.txt
|
||||
git_previous_tag=$(git describe --tags --abbrev=0 ${GITHUB_SHA}~1)
|
||||
if [ -n "${git_previous_tag}" ]
|
||||
then
|
||||
echo "### Change Log (since previous tag):" > RELEASE-NOTES-CL.txt
|
||||
echo "\`\`\`" >> RELEASE-NOTES-CL.txt
|
||||
git log --oneline --no-color --no-decorate "refs/tags/${git_previous_tag}..${GITHUB_REF}" >> RELEASE-NOTES-CL.txt
|
||||
echo "\`\`\`" >> RELEASE-NOTES-CL.txt
|
||||
else
|
||||
echo "### Change Log (last commit only):" > RELEASE-NOTES-CL.txt
|
||||
echo "\`\`\`" >> RELEASE-NOTES-CL.txt
|
||||
git log --oneline -n1 --no-color --no-decorate "${GITHUB_REF}" >> RELEASE-NOTES-CL.txt
|
||||
echo "\`\`\`" >> RELEASE-NOTES-CL.txt
|
||||
fi
|
||||
echo "" >> RELEASE-NOTES-CL.txt
|
||||
|
||||
#echo "### Build Info:" > RELEASE-NOTES-BI.txt
|
||||
# FIXME extract package version info and DSO symvers into RELEASE-NOTES.txt
|
||||
#echo "" >> RELEASE-NOTES-BI.txt
|
||||
|
||||
cat RELEASE-NOTES-CL.txt >> RELEASE-NOTES-EL7.txt
|
||||
cat RELEASE-NOTES-EL7.txt
|
||||
|
||||
# RELEASE-NOTES-DOCS.txt
|
||||
echo "See documentation at https://github.com/${GITHUB_REPOSITORY}/blob/${GITHUB_SHA:0:8}/appimage/7/README.md" >> RELEASE-NOTES-DOCS.txt
|
||||
echo "See documentation at https://github.com/${GITHUB_REPOSITORY}/blob/${GITHUB_SHA:0:8}/appimage/8/README.md" >> RELEASE-NOTES-DOCS.txt
|
||||
echo "See documentation at https://github.com/${GITHUB_REPOSITORY}/blob/${GITHUB_SHA:0:8}/appimage/9/README.md" >> RELEASE-NOTES-DOCS.txt
|
||||
echo "See documentation at https://github.com/${GITHUB_REPOSITORY}/blob/${GITHUB_SHA:0:8}/appimage/10/README.md" >> RELEASE-NOTES-DOCS.txt
|
||||
|
||||
# RELEASE-NOTES-GH.txt (this is shared for all AppImage for one tag)
|
||||
echo "### commit ${git_describe}" | sed -e 's#~#\\~#g' > RELEASE-NOTES-GH.txt
|
||||
echo "" >> RELEASE-NOTES-GH.txt
|
||||
cat RELEASE-NOTES-DOCS.txt >> RELEASE-NOTES-GH.txt
|
||||
cat RELEASE-NOTES-CL.txt >> RELEASE-NOTES-GH.txt
|
||||
|
||||
# Show in action/artifact output
|
||||
echo "## RELEASE NOTES" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
cat RELEASE-NOTES-EL7.txt >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- name: Upload Release Asset
|
||||
if: ${{ env.MY_GITHUB_TAG != '' }} # if: ${{ github.ref_type == 'tag' }}
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
body_path: ${{ github.workspace }}/appimage/RELEASE-NOTES-GH.txt
|
||||
files: |
|
||||
${{ github.workspace }}/appimage/${{env.MAGIC_APPIMAGE_OUTPUT_FILENAME}}
|
||||
${{ github.workspace }}/appimage/RELEASE-NOTES-EL7.txt
|
||||
|
||||
- name: Upload Artifact
|
||||
#if: ${{ env.MY_GITHUB_TAG == '' }} # commented out to always upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{env.MAGIC_APPIMAGE_OUTPUT_FILENAME}}
|
||||
path: |
|
||||
${{ github.workspace }}/appimage/${{env.MAGIC_APPIMAGE_OUTPUT_FILENAME}}
|
||||
|
|
@ -13,21 +13,24 @@ RUN ls -l /etc/yum.repos.d/ \
|
|||
&& yum -y update \
|
||||
&& rm -f /tmp/CentOS-Base.repo.old
|
||||
|
||||
# Build Dependencies
|
||||
RUN yum install -y cairo-devel freeglut-devel gcc make tcsh
|
||||
# Build Dependencies (and dump version to logging)
|
||||
RUN yum install -y cairo-devel freeglut-devel gcc make tcsh \
|
||||
&& echo "### rpm -qa:" \
|
||||
&& rpm -qa | sort \
|
||||
&& echo ""
|
||||
|
||||
# Tcl/Tk
|
||||
WORKDIR /tcl
|
||||
RUN curl -L https://prdownloads.sourceforge.net/tcl/tcl8.6.12-src.tar.gz | tar --strip-components=1 -xzC . \
|
||||
RUN curl -L https://prdownloads.sourceforge.net/tcl/tcl8.6.16-src.tar.gz | tar --strip-components=1 -xzC . \
|
||||
&& cd unix \
|
||||
&& ./configure --prefix=/prefix \
|
||||
&& make \
|
||||
&& make install
|
||||
|
||||
WORKDIR /tk
|
||||
RUN curl -L https://prdownloads.sourceforge.net/tcl/tk8.6.12-src.tar.gz | tar --strip-components=1 -xzC . \
|
||||
RUN curl -L https://prdownloads.sourceforge.net/tcl/tk8.6.16-src.tar.gz | tar --strip-components=1 -xzC . \
|
||||
&& cd unix \
|
||||
&& ./configure --prefix=/prefix --with-tcl=/prefix/lib\
|
||||
&& ./configure --prefix=/prefix --with-tcl=/prefix/lib \
|
||||
&& make \
|
||||
&& make install
|
||||
|
||||
|
|
@ -49,7 +52,17 @@ RUN ./configure \
|
|||
&& make -j$(nproc) \
|
||||
&& make install
|
||||
|
||||
# Produce summary of what was created and confirm their DSOs
|
||||
RUN echo "### filesystem:" \
|
||||
find /prefix -printf "%y/%M/%m %i/%n %l %u/%U %g/%G %s/%b %T+/%T@\t%p\n"; \
|
||||
ls -lR /prefix; \
|
||||
find /prefix -type f -perm /111 -exec bash -c "echo \#\#\# {}; ldd -v {}" \; 2>/dev/null; \
|
||||
for name in libgcc_s libstdc++ libpng liblzma libxml2 libz libcairo libGL libGLU; do \
|
||||
find /lib64 /usr/lib64 -maxdepth 2 -name "*.so" -name "${name}*" -exec bash -c "echo \#\#\# {}; ldd -v {}" \; 2>/dev/null; \
|
||||
done; \
|
||||
echo "###"
|
||||
|
||||
WORKDIR /
|
||||
RUN tar -czf /prefix.tar.gz -C ./prefix .
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
CMD ["/bin/bash"]
|
||||
|
|
|
|||
|
|
@ -1,25 +1,35 @@
|
|||
RESOURCES = $(shell find rsc/ -type f)
|
||||
ARCH = $(shell uname -m)
|
||||
MAGIC_SRC_ROOT = ..
|
||||
RESOURCES := $(shell find rsc/ -type f)
|
||||
ARCH := $(shell uname -m)
|
||||
APPIMAGE = Magic-$(ARCH).AppImage
|
||||
VERSION_MAGIC := $(shell cat $(MAGIC_SRC_ROOT)/VERSION)
|
||||
VERSION_TSTAMP := $(shell git show -s "--format=%cs" | tr -d '-')
|
||||
VERSION_HASH := $(shell git show-ref --hash=7 remotes/origin/HEAD)
|
||||
VERSION_NUM ?= $(VERSION_MAGIC)~$(VERSION_TSTAMP)~$(VERSION_HASH)
|
||||
VERSION := $(VERSION_NUM)
|
||||
|
||||
all: $(APPIMAGE)
|
||||
|
||||
.PHONY: prefix/bin/magic
|
||||
prefix/bin/magic: Dockerfile Makefile
|
||||
@echo "APPIMAGE=$(APPIMAGE)"
|
||||
@echo "VERSION=$(VERSION)"
|
||||
@echo "ARCH=$(ARCH)"
|
||||
@echo "RESOURCES=$(RESOURCES)"
|
||||
rm -rf prefix
|
||||
docker build -t magic_build -f ./Dockerfile ..
|
||||
docker build -t magic_build -f ./Dockerfile $(MAGIC_SRC_ROOT)
|
||||
id=$$(docker create magic_build) ; \
|
||||
docker cp $$id:/prefix ./prefix ; \
|
||||
docker rm -v $$id
|
||||
mkdir -p prefix/lib/tcl8.6.12
|
||||
cp -r prefix/lib/tcl8.6 prefix/lib/tcl8.6.12/library
|
||||
mkdir -p prefix/lib/tcl8.6.16
|
||||
cp -r prefix/lib/tcl8.6 prefix/lib/tcl8.6.16/library
|
||||
|
||||
appimagetool:
|
||||
curl -L https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage > ./appimagetool
|
||||
chmod +x ./appimagetool
|
||||
|
||||
$(APPIMAGE): prefix/bin/magic appimagetool $(RESOURCES)
|
||||
cp $(RESOURCES) ./prefix
|
||||
cp $(RESOURCES) ./prefix/
|
||||
./appimagetool prefix
|
||||
|
||||
PREFIX ?= /usr/local
|
||||
|
|
@ -30,4 +40,4 @@ install:
|
|||
clean:
|
||||
rm -f *.AppImage
|
||||
rm -f prefix.tar.gz
|
||||
rm -rf prefix
|
||||
rm -rf prefix
|
||||
|
|
|
|||
|
|
@ -3,22 +3,107 @@ This is an AppImage that runs on all GNU/Linux platforms with:
|
|||
* FUSE
|
||||
* This excludes non-privileged Docker containers unfortunately, unless pre-extracted.
|
||||
* GLIBC 2.17+
|
||||
* Cairo 1.8+
|
||||
* Cairo 1.15+
|
||||
* Supports all Linux x86_64 CPUs
|
||||
|
||||
That's most Linux distributions released in 2016 or later.
|
||||
This AppImage build is based on EL7 (via CentOS 7)
|
||||
|
||||
CentOS 7 was first released on 07 July 2014 and went end-of-life on 30 June 2024.
|
||||
|
||||
# Version Info
|
||||
|
||||
See the AppImage main binary file naming, release tag information and AppInfo metadata
|
||||
for the exact magic version inside the archive. When starting AppImage by default the
|
||||
Tcl console banner can also provide version information, also using the `version` Tcl
|
||||
command.
|
||||
|
||||
# Build Info
|
||||
A Dockerfile on CentOS 7 (needed for older glibc) image builds Tcl, Tk and Magic.
|
||||
|
||||
The final build is then packaged into an AppImage using AppImageTool on the host machine.
|
||||
* Based on CentOS 7 (EL7)
|
||||
* Tcl/Tk 8.6.16
|
||||
* and Magic 8.x
|
||||
* all default modules enabled, but without OpenGL (includes Display drivers cairo/X11)
|
||||
|
||||
# FAQ: How to use
|
||||
|
||||
Download the *.AppImage file relevant to your platform and run:
|
||||
|
||||
```
|
||||
chmod +x Magic-x86_64.AppImage
|
||||
./Magic-x86_64.AppImage
|
||||
```
|
||||
|
||||
Example startup with command line options:
|
||||
|
||||
```
|
||||
./Magic-x86_64.AppImage -d XR -T scmos
|
||||
```
|
||||
|
||||
|
||||
# Building Requirements
|
||||
|
||||
* A reasonably recent GNU/Linux host
|
||||
* GNU make
|
||||
* Docker 20+
|
||||
* Git
|
||||
* curl
|
||||
|
||||
The final build is then packaged into an AppImage using AppImageTool on the host machine.
|
||||
|
||||
# Build Instructions
|
||||
`make`
|
||||
|
||||
# Installation Instructions
|
||||
`make install`
|
||||
|
||||
# FAQ: Is my CPU supported ?
|
||||
|
||||
Supports all x86_64 CPUs. The Linux ABI in use is the original x86-64 ABI (v1).
|
||||
|
||||
Use the command `/lib64/ld-linux-x86-64.so.2 --help` to see which CPUs your
|
||||
Linux distribtion supports (and your CPU) look for the word "supported".
|
||||
|
||||
# FAQ: The DSO versioning link dependencies?
|
||||
|
||||
The information here provides an outline of what versions to expect from EL7
|
||||
of the major dependencies, to assist you in a compatibility check with your
|
||||
Linux distribution of choice.
|
||||
|
||||
The actual versions in our public releases can differ slightly inline with
|
||||
the EL7 support compatibility and ABI versioning policies for the support
|
||||
lifecycle of the distribution.
|
||||
|
||||
The most important items are the Direct Dependencies and the availabilty
|
||||
of a suitable graphics DSO as per your '-d' choice.
|
||||
|
||||
Direct Runtime Dependencies (from /prefix/**):
|
||||
|
||||
| DSO Filename | DSO Symbol Version | Related Packages |
|
||||
| :--------------------- | :------------------ | :------------------- |
|
||||
| libc.so.6 | GLIBC_2.14 | glibc-2.17-326 |
|
||||
| libz.so.1 | ZLIB_1.2.2 | zlib-1.2.7-21 |
|
||||
|
||||
Optional/Modular Runtime Dependencies (depending on graphics mode):
|
||||
|
||||
| DSO Filename | DSO Symbol Version | Related Packages |
|
||||
| :--------------------- | :------------------ | :------------------- |
|
||||
| libcairo.so.2 | | |
|
||||
| libcairo.so.2.11512.0 | | cairo-1.15.12-4 |
|
||||
| libGL.so.1 | | |
|
||||
| libglvnd-glx-1:1.0.1-0 | | mesa-libGL-18.3.4-12 |
|
||||
| libGLU.so.1 | | mesa-libGLU-9.0.0-4 |
|
||||
|
||||
Transitive/Third-Party Runtime Dependencies (for information only):
|
||||
|
||||
| DSO Filename | DSO Symbol Version | Related Packages |
|
||||
| :--------------------- | :------------------ | :------------------- |
|
||||
| libc.so.6 | GLIBC_2.35 | glibc-2.17-326 |
|
||||
| libstdc++.so.6 | GLIBCXX_3.4 | gcc-4.8.5-44 |
|
||||
| libstdc++.so.6 | CXXABI_1.3.9 | gcc-4.8.5-44 |
|
||||
| libgcc_s.so.1 | | |
|
||||
| libgcc_s-4.8.5-20150702.so.1 | GCC_4.2.0 | libgcc-4.8.5-44 |
|
||||
| libxml2.so.2 | LIBXML2_2.6.0 | libxml2-2.9.1-6 |
|
||||
| libpng15.so.15 | | |
|
||||
| libpng15.so.15.13.0 | PNG16_0 | libpng-1:1.5.13-8 |
|
||||
| liblzma.so.5 | XZ_5.0 | xz-libs-5.2.2-2 |
|
||||
| libz.so.1 | ZLIB_1.2.9 | zlib-1.2.7-21 |
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ export PATH="${CURDIR}/bin":$PATH
|
|||
export LD_LIBRARY_PATH=${CURDIR}/lib:$LD_LIBRARY_PATH
|
||||
export CAD_ROOT="${CURDIR}/lib"
|
||||
export MAGIC_WISH="${CURDIR}/bin/wish"
|
||||
exec "${CURDIR}/bin/magic" $@
|
||||
exec "${CURDIR}/bin/magic" $@
|
||||
|
|
|
|||
Loading…
Reference in New Issue