Merge pull request #1574 from JulianGro/server_packaging

Fix Debian and RPM server packaging
This commit is contained in:
Julian Groß 2025-05-29 23:12:49 +02:00 committed by GitHub
commit a7a341e2b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 49 additions and 57 deletions

View File

@ -186,30 +186,23 @@ Overte Interface AppImages are built using [linuxdeploy](https://github.com/linu
```bash ```bash
cd overte cd overte
mkdir build mkdir build
cd build rm -rf build/*
rm -rf * conan install . -s build_type=Release -b missing -pr:b=default -of build
``` ```
Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds. Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds.
```bash ```bash
OVERTE_USE_SYSTEM_QT=true cmake .. -DOVERTE_CPU_ARCHITECTURE=-msse3 -DVCPKG_BUILD_TYPE=release -DSERVER_ONLY=true -DBUILD_TOOLS=true cmake --preset conan-release -DOVERTE_CPU_ARCHITECTURE=-msse3
``` ```
4. Build 4. Build
```bash ```bash
make domain-server assignment-client oven -j$(nproc) cmake --build --preset conan-release --target domain-server assignment-client oven
``` ```
5. Create Debian package 5. Create Debian package
```bash ```bash
cd ../pkg-scripts cd pkg-scripts
``` DEBVERSION="1-experimental-debian-11" DEBEMAIL="julian.gro@overte.org" DEBFULLNAME="Julian Groß" ./make-deb-server
For Debian 11 and Ubuntu 22.04:
```bash
OVERTE_USE_SYSTEM_QT="true" DEBVERSION="1-experimental-debian-11" DEBEMAIL="julian.gro@overte.org" DEBFULLNAME="Julian Groß" ./make-deb-server
```
For Ubuntu 18.04 and 20.04:
```bash
DEBVERSION="1-experimental-ubuntu-18.04" DEBEMAIL="julian.gro@overte.org" DEBFULLNAME="Julian Groß" ./make-deb-server
``` ```
##### RPM package ##### RPM package
@ -225,23 +218,23 @@ DEBVERSION="1-experimental-ubuntu-18.04" DEBEMAIL="julian.gro@overte.org" DEBFUL
```bash ```bash
cd overte cd overte
mkdir build mkdir build
cd build rm -rf build/*
rm -rf * conan install . -s build_type=Release -b missing -pr:b=default -of build
``` ```
Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds. Add `PRODUCTION_BUILD=1` to below command for release and release candidate builds.
```bash ```bash
OVERTE_USE_SYSTEM_QT=true cmake .. -DOVERTE_CPU_ARCHITECTURE=-msse3 -DVCPKG_BUILD_TYPE=release -DSERVER_ONLY=true -DBUILD_TOOLS=true cmake --preset conan-release -DOVERTE_CPU_ARCHITECTURE=-msse3 -DSERVER_ONLY=true -DBUILD_TOOLS=true
``` ```
4. Build 4. Build
```bash ```bash
make domain-server assignment-client oven -j$(nproc) cmake --build --preset conan-release --target domain-server assignment-client oven
``` ```
5. Create RPM package 5. Create RPM package
```bash ```bash
cd ../pkg-scripts cd pkg-scripts
``` ```
```bash ```bash
OVERTE_USE_SYSTEM_QT="true" RPMVERSION="1.experimental" ./make-rpm-server RPMVERSION="1.experimental" ./make-rpm-server
``` ```

View File

@ -25,10 +25,10 @@ chrpath -d $DEB_BUILD_ROOT/*
# TODO: get Qt from Conan if building without system Qt # TODO: get Qt from Conan if building without system Qt
# hack: we get libnode.so.108 from conan-libs folder, because the dpkg command at the end of this file cannot always find libnode # Hack: Create libnode.so from libnode.so.108
cp $OVERTE/build/conanlibs/Release/libnode.so.108 $DEB_BUILD_ROOT # We don't fail on error, in case libnode is provided by the system already.
# hack: we get libttb.so.12 from conan-libs folder, because the dpkg command at the end of this file cannot always find libtbb12 ln -s $OVERTE/build/conanlibs/Release/libnode.so.* $OVERTE/build/conanlibs/Release/libnode.so || True
cp $OVERTE/build/conanlibs/Release/libttb.so.12 $DEB_BUILD_ROOT cp $OVERTE/build/conanlibs/Release/*.so $DEB_BUILD_ROOT
strip --strip-all $DEB_BUILD_ROOT/* strip --strip-all $DEB_BUILD_ROOT/*
cp $OVERTE/pkg-scripts/new-server $DEB_BUILD_ROOT cp $OVERTE/pkg-scripts/new-server $DEB_BUILD_ROOT
@ -79,11 +79,8 @@ done
find resources -type f -exec sh -c 'echo {} opt/overte/$(dirname "{}") >> debian/install' \; find resources -type f -exec sh -c 'echo {} opt/overte/$(dirname "{}") >> debian/install' \;
find plugins -type f -exec sh -c 'echo {} opt/overte/$(dirname "{}") >> debian/install' \; find plugins -type f -exec sh -c 'echo {} opt/overte/$(dirname "{}") >> debian/install' \;
if [ ! "$OVERTE_USE_SYSTEM_QT" ]; then # We look for *.so.*.*.* as well, in case Qt is there.
SOFILES=`ls *.so *.so.*.*.* | grep -Po '^(.+\.so(\.\d+)?)' | sed 's/\./\\\./g' | paste -d'|' -s` SOFILES=`ls *.so *.so.*.*.* | grep -Po '^(.+\.so(\.\d+)?)' | sed 's/\./\\\./g' | paste -d'|' -s`
else
SOFILES=`ls *.so | grep -Po '^(.+\.so(\.\d+)?)' | sed 's/\./\\\./g' | paste -d'|' -s`
fi
# dpkg -S can only find packages which are already installed on the system. # dpkg -S can only find packages which are already installed on the system.
DEPENDS=`find * -path debian -prune -o -type f -executable -exec sh -c 'objdump -p {} | grep NEEDED' \; \ DEPENDS=`find * -path debian -prune -o -type f -executable -exec sh -c 'objdump -p {} | grep NEEDED' \; \

View File

@ -13,9 +13,12 @@ VERSION=${RPMVERSION//-}
# TODO: Handle Qt built by Conan # TODO: Handle Qt built by Conan
# Hack: Create libnode.so from libnode.so.108
# We don't fail on error, in case libnode is provided by the system already.
ln -s $OVERTE/build/conanlibs/Release/libnode.so.* $OVERTE/build/conanlibs/Release/libnode.so || True
SOFILES=`ls \ SOFILES=`ls \
$OVERTE/build/libraries/*/*.so \ $OVERTE/build/libraries/*/*.so \
$OVERTE/build/conanlibs/Release/libnode.so* \ $OVERTE/build/conanlibs/Release/*.so \
| sed 's/\./\\\./g' \ | sed 's/\./\\\./g' \
| paste -d'|' -s` | paste -d'|' -s`
@ -24,8 +27,7 @@ DEPENDS=mesa-libGL,`ls \
$OVERTE/build/domain-server/domain-server \ $OVERTE/build/domain-server/domain-server \
$OVERTE/build/tools/oven/oven \ $OVERTE/build/tools/oven/oven \
$OVERTE/build/libraries/*/*.so \ $OVERTE/build/libraries/*/*.so \
$OVERTE/build/conanlibs/Release/libnode.so* \ $OVERTE/build/conanlibs/Release/*.so \
$OVERTE/build/conanlibs/Release/libtbb.so* \
$OVERTE/build/assignment-client/plugins/*.so \ $OVERTE/build/assignment-client/plugins/*.so \
$OVERTE/build/assignment-client/plugins/*/*.so \ $OVERTE/build/assignment-client/plugins/*/*.so \
| xargs -I {} sh -c 'objdump -p {} | grep NEEDED' \ | xargs -I {} sh -c 'objdump -p {} | grep NEEDED' \