Skip to content

Commit 8908c59

Browse files
authored
use polyfill-glibc to run on very old distros (#1)
1 parent 0dfd2e0 commit 8908c59

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/blank.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Make AppImage
2727
run: |
28-
sudo apt install wget tar
28+
sudo apt install wget tar git ninja-build
2929
chmod +x ./*-appimage.sh
3030
./*-appimage.sh
3131
mkdir dist

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ This repo takes the [official fastfetch binaries ](https://github.com/fastfetch-
77

88
No libraries or other dependencies are bundled in, since the official binaries are already portable enough.
99

10+
[polyfill-glibc](https://github.com/corsix/polyfill-glibc) is used to allow fastfetch to run on:
11+
12+
* **glibc 2.17** ~ubuntu 14.04 era for `x86_64`.
13+
14+
* **glibc 2.28** ~ubuntu 19.04 era for `aarch64`.
15+
1016
-----------------------------------------------------------------------------------------------------------------
1117

1218
# Why should I use this?

fastfetch-appimage.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export URUNTIME_PRELOAD=1 # really needed here
1111
# fastfetch uses amd64 instead of x86_64
1212
if [ "$(uname -m)" = 'x86_64' ]; then
1313
ARCH=amd64
14+
glibcver=2.17
15+
else
16+
glibcver=2.28
1417
fi
1518

1619
tarball_url=$(wget "$REPO" -O - | sed 's/[()",{} ]/\n/g' \
@@ -46,9 +49,15 @@ Categories=System
4649
Hidden=true' > ./AppDir/fastfetch.desktop
4750
touch ./AppDir/fastfetch.png ./AppDir/.DirIcon
4851

52+
# get polyfil glibc so that fastfetch can work on older distros
53+
54+
git clone https://github.com/corsix/polyfill-glibc.git && (
55+
cd ./polyfill-glibc
56+
ninja polyfill-glibc
57+
)
58+
./polyfill-glibc/polyfill-glibc --target-glibc="$glibcver" ./AppDir/usr/bin/*
4959

5060
wget "$APPIMAGETOOL" -O ./appimagetool
5161
chmod +x ./appimagetool
5262
./appimagetool -n -u "$UPINFO" ./AppDir
5363

54-

0 commit comments

Comments
 (0)