mirror of
https://github.com/3proxy/3proxy.git
synced 2026-08-26 09:55:48 +08:00
Build deb packages in an Ubuntu 22.04 container
dpkg-buildpackage ran on the runner itself, so the packages inherited its ABI. On ubuntu-latest that means glibc 2.38 and libssl3t64, which restricts the packages to Ubuntu 24.04 and newer - Debian 12, Debian 13 and Ubuntu 22.04 cannot install them. Nothing in the source needs glibc 2.38. The floor comes from the build host: gcc 13 with glibc 2.38 redirects sscanf and strtol to __isoc23_ variants, and arc4random arrived in glibc 2.36. Build in an Ubuntu 22.04 container instead. That lowers the dependencies to libc6 (>= 2.34) and libssl3, and libssl3t64 declares Provides: libssl3, so one package covers Ubuntu 22.04 and later as well as Debian 12 and later. Verified by installing on all four. The armhf cross build moves into the same container, keeping the cross toolchain on PATH so that install -s uses the ARM strip rather than the host one.
This commit is contained in:
parent
b19e310956
commit
8fba7ffc40
27
.github/workflows/build-rpm-arm64.yml
vendored
27
.github/workflows/build-rpm-arm64.yml
vendored
@ -75,18 +75,25 @@ jobs:
|
||||
path: "*.rpm"
|
||||
- name: debbuild
|
||||
run: |
|
||||
ret=`pwd`
|
||||
cd ~/debian/
|
||||
docker run --rm \
|
||||
-v "$HOME/debian:/debian" \
|
||||
-e RELEASE="$RELEASE" -e VERSION="$VERSION" \
|
||||
ubuntu:22.04 bash -c '
|
||||
set -e
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update
|
||||
apt-get install -y build-essential debhelper fakeroot libssl-dev libpcre2-dev libpam0g-dev
|
||||
cd /debian
|
||||
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
||||
cd 3proxy-$RELEASE
|
||||
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " *3proxy $RELEASE build" >>debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
|
||||
echo "">>debian/changelog
|
||||
dpkg-buildpackage
|
||||
cd $ret
|
||||
{ echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium"
|
||||
echo " "
|
||||
echo " *3proxy $RELEASE build"
|
||||
echo " "
|
||||
echo " -- z3APA3A <3apa3a@3proxy.org> $(date "+%a, %d %b %Y %H:%M:%S %z")"
|
||||
echo ""
|
||||
} > debian/changelog
|
||||
dpkg-buildpackage'
|
||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_arm64.deb ./3proxy-$RELEASE.arm64.deb
|
||||
- name: Get artifact deb
|
||||
uses: actions/upload-artifact@v7
|
||||
|
||||
67
.github/workflows/build-rpm-armhf.yml
vendored
67
.github/workflows/build-rpm-armhf.yml
vendored
@ -27,33 +27,6 @@ jobs:
|
||||
pwd
|
||||
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
|
||||
echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
|
||||
- name: Linux libraries
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo dpkg --add-architecture armhf
|
||||
echo "Types: deb" > ~/ubuntu.sources
|
||||
echo "URIs: http://archive.ubuntu.com/ubuntu/" >> ~/ubuntu.sources
|
||||
echo "Suites: noble noble-updates noble-backports" >> ~/ubuntu.sources
|
||||
echo "Components: main restricted universe multiverse" >> ~/ubuntu.sources
|
||||
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >> ~/ubuntu.sources
|
||||
echo "Architectures: amd64" >> ~/ubuntu.sources
|
||||
echo "" >> ~/ubuntu.sources
|
||||
echo "Types: deb" >> ~/ubuntu.sources
|
||||
echo "URIs: http://security.ubuntu.com/ubuntu/" >> ~/ubuntu.sources
|
||||
echo "Suites: noble-security" >> ~/ubuntu.sources
|
||||
echo "Components: main restricted universe multiverse" >> ~/ubuntu.sources
|
||||
echo "Architectures: amd64" >> ~/ubuntu.sources
|
||||
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >> ~/ubuntu.sources
|
||||
echo "" >> ~/ubuntu.sources
|
||||
echo "Types: deb" >>~/ubuntu.sources
|
||||
echo "URIs: http://ports.ubuntu.com/ubuntu-ports/" >>~/ubuntu.sources
|
||||
echo "Suites: noble noble-updates" >>~/ubuntu.sources
|
||||
echo "Components: main restricted universe multiverse" >>~/ubuntu.sources
|
||||
echo "Architectures: armhf" >>~/ubuntu.sources
|
||||
echo "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" >>~/ubuntu.sources
|
||||
sudo cp ~/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources
|
||||
sudo apt update
|
||||
sudo apt install libssl3t64:armhf openssl:armhf libssl-dev:armhf libpam0g:armhf libpam0g-dev:armhf libpcre2-dev:armhf rpm crossbuild-essential-armhf build-essential debhelper
|
||||
- name: configure deb env
|
||||
run: |
|
||||
mkdir ~/debian
|
||||
@ -64,24 +37,34 @@ jobs:
|
||||
cp ~/rpmbuild/SOURCES/3proxy-$RELEASE.tar.gz ~/debian/3proxy_$RELEASE.orig.tar.gz
|
||||
- name: debbuild
|
||||
run: |
|
||||
ret=`pwd`
|
||||
cd ~/debian/
|
||||
docker run --rm \
|
||||
-v "$HOME/debian:/debian" \
|
||||
-e RELEASE="$RELEASE" -e VERSION="$VERSION" \
|
||||
ubuntu:22.04 bash -c '
|
||||
set -e
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
dpkg --add-architecture armhf
|
||||
sed -i "s|^deb |deb [arch=amd64] |" /etc/apt/sources.list
|
||||
{ echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse"
|
||||
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse"
|
||||
} >> /etc/apt/sources.list
|
||||
apt-get update
|
||||
apt-get install -y crossbuild-essential-armhf build-essential debhelper fakeroot \
|
||||
libssl-dev:armhf libpcre2-dev:armhf libpam0g-dev:armhf
|
||||
cd /debian
|
||||
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
||||
cd 3proxy-$RELEASE
|
||||
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " *3proxy $RELEASE build" >>debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
|
||||
echo "">>debian/changelog
|
||||
PATH=/usr/arm-linux-gnueabihf/bin:$PATH
|
||||
export PATH=$PATH
|
||||
CC=arm-linux-gnueabihf-gcc
|
||||
export CC=$CC
|
||||
export RPATH=/usr/arm-linux-gnueabihf/lib:$RPATH
|
||||
{ echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium"
|
||||
echo " "
|
||||
echo " *3proxy $RELEASE build"
|
||||
echo " "
|
||||
echo " -- z3APA3A <3apa3a@3proxy.org> $(date "+%a, %d %b %Y %H:%M:%S %z")"
|
||||
echo ""
|
||||
} > debian/changelog
|
||||
export PATH=/usr/arm-linux-gnueabihf/bin:$PATH
|
||||
export CC=arm-linux-gnueabihf-gcc
|
||||
export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib:$LD_LIBRARY_PATH
|
||||
dpkg-buildpackage
|
||||
cd $ret
|
||||
dpkg-buildpackage'
|
||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_armhf.deb ./3proxy-$RELEASE.arm.deb
|
||||
- name: Get artifact deb
|
||||
uses: actions/upload-artifact@v7
|
||||
|
||||
27
.github/workflows/build-rpm-x86-64.yml
vendored
27
.github/workflows/build-rpm-x86-64.yml
vendored
@ -75,18 +75,25 @@ jobs:
|
||||
path: "*.rpm"
|
||||
- name: debbuild
|
||||
run: |
|
||||
ret=`pwd`
|
||||
cd ~/debian/
|
||||
docker run --rm \
|
||||
-v "$HOME/debian:/debian" \
|
||||
-e RELEASE="$RELEASE" -e VERSION="$VERSION" \
|
||||
ubuntu:22.04 bash -c '
|
||||
set -e
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update
|
||||
apt-get install -y build-essential debhelper fakeroot libssl-dev libpcre2-dev libpam0g-dev
|
||||
cd /debian
|
||||
tar xzf 3proxy_$RELEASE.orig.tar.gz
|
||||
cd 3proxy-$RELEASE
|
||||
echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium" >debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " *3proxy $RELEASE build" >>debian/changelog
|
||||
echo " " >>debian/changelog
|
||||
echo " -- z3APA3A <3apa3a@3proxy.org> "`date "+%a, %d %b %Y %H:%M:%S %z"` >>debian/changelog
|
||||
echo "">>debian/changelog
|
||||
dpkg-buildpackage
|
||||
cd $ret
|
||||
{ echo "3proxy ($RELEASE-$VERSION) buster; urgency=medium"
|
||||
echo " "
|
||||
echo " *3proxy $RELEASE build"
|
||||
echo " "
|
||||
echo " -- z3APA3A <3apa3a@3proxy.org> $(date "+%a, %d %b %Y %H:%M:%S %z")"
|
||||
echo ""
|
||||
} > debian/changelog
|
||||
dpkg-buildpackage'
|
||||
cp ~/debian/3proxy_$RELEASE-"$VERSION"_amd64.deb ./3proxy-$RELEASE.x86_64.deb
|
||||
- name: Get artifact deb
|
||||
uses: actions/upload-artifact@v7
|
||||
|
||||
Loading…
Reference in New Issue
Block a user