Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/deploy-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: robinraju/release-downloader@4bdb8ee081c9ee08a35320794dd461312ac9e4ad
# v1.12
- uses: robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05
with:
repository: "${{ github.repository }}"
tag: "${{ github.event.inputs.tag || inputs.tag }}"
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/maven-and-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@ jobs:
env:
DEBIAN_FRONTEND: noninteractive
run: |
# Remove broken packages from pre-installed php in Actions image
# No longer needed in ubuntu-22.04
sudo apt-get remove -y libpcre2-dev libicu-dev icu-devtools
sudo apt-add-repository ppa:ondrej/php -y
sudo apt-get install -y aptitude
echo "Get::allow-downgrades \"true\";" | sudo tee /etc/apt/apt.conf.d/99-downgrades
echo "Get::Assume-Yes \"true\";" | sudo tee -a /etc/apt/apt.conf.d/99-downgrades
sudo ./resources/ubuntu-build-image/ppa-purge.sh ppa:ondrej/php -y true
if [ "${{ matrix.arch }}" != "x86" ] && [ "${{ matrix.arch }}" != "x86-64" ]; then
sudo cp -f resources/ubuntu-build-image/ports-sources.list /etc/apt/sources.list
fi
Expand Down Expand Up @@ -228,7 +220,8 @@ jobs:
resources/deb-build.sh \
"${{ needs.version.outputs.version }}" \
"${{ matrix.dist.dist }}" \
"${{ matrix.arch }}"
"${{ matrix.arch }}" \
"dev+maven@jitsi.org"

- name: Upload package as artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -441,7 +434,8 @@ jobs:

- name: Create release
if: github.ref == 'refs/heads/master'
uses: ncipollo/release-action@37c87f6b53fb46d40450c3cac428aa83c8d0055f
# v1.16.0
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174
with:
artifacts: "target/*.jar,debian-releases.tar"
allowUpdates: true
Expand Down
10 changes: 5 additions & 5 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Vcs-Git: https://github.com/jitsi/libjitsi.git
Vcs-Browser: https://github.com/jitsi/libjitsi
Standards-Version: 4.5.0
Build-Depends:
debhelper (>= 11),
debhelper (>= 11) <!nocheck> | debhelper:native <cross>,
dpkg-dev (>= 1.16.1),
libtool,
cmake,
git,
default-jdk,
libtool <!nocheck> | libtool:native <cross>,
cmake <!nocheck> | cmake:native <cross>,
git <!nocheck> | git:native <cross>,
default-jdk <!nocheck> | default-jdk:native <cross>,
libasound2-dev,
libpulse-dev,
libx11-dev,
Expand Down
3 changes: 3 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
%:
dh $@ -Scmake --sourcedirectory src/native

export JAVA_HOME ?= /usr/lib/jvm/default-java

override_dh_auto_configure:
dh_auto_configure -- \
-DJAVA_HOME="$(JAVA_HOME)" \
-DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \
-DCMAKE_INSTALL_LIBDIR="lib/$(DEB_HOST_MULTIARCH)/jni" \
-DJITSI_BUILD_DEBIAN=ON \
Expand Down
85 changes: 60 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</licenses>

<properties>
<bouncycastle.version>1.77</bouncycastle.version>
<bouncycastle.version>1.78.1</bouncycastle.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand All @@ -69,7 +69,7 @@
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.13.0</version>
<version>5.17.0</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
Expand All @@ -94,12 +94,12 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jitsi-utils</artifactId>
<version>1.0-126-g02b0c86</version>
<version>1.0-147-g12d0b20</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jitsi-srtp</artifactId>
<version>1.1-15-ga19c05a</version>
<version>1.1-21-g66f32c3</version>
</dependency>
<dependency>
<groupId>org.opentelecoms.sdp</groupId>
Expand Down Expand Up @@ -127,26 +127,26 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.19.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>24.0.1</version>
<version>26.0.2-1</version>
<scope>provided</scope>
</dependency>

<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.3</version>
<version>5.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.4.0</version>
<version>5.17.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -158,11 +158,35 @@
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.16.0</version>
<version>2.19.1</version>
<configuration>
<ruleSet>
<ignoreVersions>
Expand Down Expand Up @@ -213,7 +237,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.14.0</version>
<configuration>
<release>11</release>
<compilerArgs>
Expand All @@ -224,45 +248,56 @@
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<version>3.12.0</version>
<configuration>
<doclint>-missing</doclint>
<source>11</source>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<excludeResources>true</excludeResources>
</configuration>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<artifactId>maven-site-plugin</artifactId>
<version>3.21.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.1</version>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<excludeResources>true</excludeResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.3</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand Down
38 changes: 31 additions & 7 deletions resources/deb-build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
#!/usr/bin/env bash
if [ "$#" -ne 4 ]; then
echo "Usage: $0 <VERSION> <DIST> <ARCH> <GPG_ID>"
echo " VERSION: Source package version, e.g. 2.14.123-gcaffee"
echo " DIST: Debian/Ubuntu distribution name (e.g. focal or bullseye)"
echo " ARCH: Architecture (e.g. amd64, aarch64)"
echo " GPG_ID: id for package signing"
exit 1
fi;

set -e
set -x
VERSION=$1
DIST=$2
ARCH=$3
GPG_ID=$4
PROJECT_DIR="$(realpath "$(dirname "$0")/../")"
cd "${PROJECT_DIR}" || exit
# export for sbuildrc sourcing
Expand All @@ -13,29 +23,43 @@ mkdir -p "${BUILD_DIR}"
# use tmpfs for sbuild
sudo tee -a /etc/fstab < "${PROJECT_DIR}/resources/sbuild-tmpfs"

# --skip-security because: https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/1955116
if [[ "${ARCH}" != "amd64" ]]; then
mk-sbuild "${DIST}" --target "${ARCH}" --skip-security --type=file --debootstrap-include=ca-certificates || sbuild-update -udc "${DIST}"-amd64-"${ARCH}"
# For non-amd64, set mirror for ports if needed
if [[ "${ARCH}" == "arm64" || "${ARCH}" == "ppc64el" ]]; then
if ubuntu-distro-info --all | grep -Fqxi "${DIST}"; then
export DEBOOTSTRAP_MIRROR=http://ports.ubuntu.com/ubuntu-ports
fi
fi

# Create native chroot for the target architecture (using QEMU for emulation)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this the LLMs suggestion? I'm surprised this built, because when I wrote this originally the qemu builds were broken while installing Java and ca-certificates. It was also painfully slow to do anything at all, let alone produce a successful build...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, llm and this was the only successful build I managed to produce, was about to test it tomorrow.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested few scenarios on a linux machine and seems everything works as expected. I will proceed with updating jigasi and testing it on meet.jit.si

mk-sbuild "${DIST}" --arch="${ARCH}" --type=file --skip-proposed || sbuild-update -udc "${DIST}"-"${ARCH}"

# union-type= is not valid for type=file, remove to prevent warnings
sudo sed -i s/union-type=.*//g "/etc/schroot/chroot.d/sbuild-${DIST}-${ARCH}"
else
if debian-distro-info --all | grep -Fqxi "${DIST}"; then
export DEBOOTSTRAP_MIRROR=${DEBOOTSTRAP_MIRROR:-$UBUNTUTOOLS_DEBIAN_MIRROR}
elif ubuntu-distro-info --all | grep -Fqxi "${DIST}"; then
export DEBOOTSTRAP_MIRROR=${DEBOOTSTRAP_MIRROR:-$UBUNTUTOOLS_UBUNTU_MIRROR}
fi
mk-sbuild "${DIST}" --skip-security --type=file --debootstrap-include=ca-certificates || sbuild-update -udc "${DIST}"-amd64
mk-sbuild "${DIST}" --type=file --debootstrap-include=ca-certificates || sbuild-update -udc "${DIST}"-amd64

# union-type= is not valid for type=file, remove to prevent warnings
sudo sed -i s/union-type=.*//g "/etc/schroot/chroot.d/sbuild-${DIST}-amd64"
fi

mvn -B versions:set -DnewVersion="${VERSION}" -DgenerateBackupPoms=false
"${PROJECT_DIR}/resources/deb-gen-source.sh" "${VERSION}" "${DIST}"
export SBUILD_CONFIG="${PROJECT_DIR}/resources/sbuildrc"
if [[ "${ARCH}" != "amd64" ]]; then
sbuild --dist "${DIST}" --no-arch-all --host "${ARCH}" "${PROJECT_DIR}"/../libjitsi_*.dsc
else
if [[ "${ARCH}" == "amd64" ]]; then
sbuild --dist "${DIST}" --arch-all "${PROJECT_DIR}"/../libjitsi_*.dsc
cp "${PROJECT_DIR}"/../libjitsi_* "$BUILD_DIR"
else
# Native build in QEMU-emulated chroot
sbuild --dist "${DIST}" --no-arch-all --arch="${ARCH}" "${PROJECT_DIR}"/../libjitsi_*.dsc
fi

debsign -S -edev+maven@jitsi.org "${BUILD_DIR}"/*.changes --re-sign -p"${PROJECT_DIR}"/resources/gpg-wrap.sh
debsign -S -e"${GPG_ID}" "${BUILD_DIR}"/*.changes --re-sign -p"${PROJECT_DIR}"/resources/gpg-wrap.sh

#make build files readable for Windows and archivable for GitHub Actions
rename 's|:|-|g' "$BUILD_DIR"/*.build
5 changes: 4 additions & 1 deletion resources/deb-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ fi

sudo apt-get install -y \
debhelper \
aptitude \
sbuild \
schroot \
apt-utils \
aptitude \
qemu-user-static \
binfmt-support \
"$DEVTOOLS_PACKAGE" \
"$UBUNTUTOOLS_PACKAGE" \
debian-archive-keyring \
Expand Down
6 changes: 5 additions & 1 deletion resources/sbuildrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ $verbose = 1;
$batch_mode = 1;
$build_dir = $ENV{'BUILD_DIR'};
$run_lintian = 0;
$apt_update = 0;
$apt_update = 1;
$apt_distupgrade = 0;
$build_dep_resolver = 'apt';
$resolve_alternatives = 1;
$mailto = '';
$mailprog = '';

# don't remove this, Perl needs it:
1;
2 changes: 1 addition & 1 deletion resources/ubuntu-build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal
FROM ubuntu:jammy

ARG ARCH=x86-64
ARG JAVA_VERSION=11
Expand Down
Loading