Compare commits

...

2 Commits

Author SHA1 Message Date
91f5184fde misc: bump daemon
Change-Id: If69c8d3a94c31d72254dac205bf1f6a35e1edf35
2023-01-30 09:54:51 -05:00
30d0560765 packaging: Update release tarball name and version scheme.
* extras/packaging/gnu-linux/scripts/release-version.sh: Add script
for deriving (reproducibly) a release version.  The format will follow
a 'YYYYMMDD.X' scheme, where 'YYYYMMDD' is the date of the last commit
on the current branch, and 'X' the number of releases tagged that day,
starting from zero.  Example: the first stable release with a newest
commit date of 2023-01-02 would have a version of '20230102.0', the
subsequent one '20230102.1', and so on.  This is derived by counting
the number of git tags with the prefix 'TYPE/YYYYMMDD', where 'TYPE'
is the release type: either 'stable', 'beta', or 'nightly'.
* extras/packaging/gnu-linux/Jenkinsfile: Call the above new script to
derive the release version to use for tagging.
* extras/packaging/gnu-linux/Makefile: Switch from the previous
'jami_YYYYMMDD.hhmm.COMMIT.tar.gz' tarball filename format to
'jami-YYYYMMDD.X.tar.gz'.  The new format is shorter, omits the
unnecessary and confusing commit id, and uses dash instead of
underscore.  Also, it contains everything in a top-level directory
with the same name as the tarball (without the .tar.gz extensions),
so that 'jami-YYYYMMDD.X.tar.gz' nicely extracts to 'jami-YYYYMMDD.X'.
With these changes, our release tarballs will follow more closely the
related instructions from the GNU maintainers manual:
https://www.gnu.org/prep/maintain/html_node/Distribution-tar-Files.html
Lastly, this change inadvertently 'fixes' a recent issue where the
'extras/ci/client-qt-gnulinux' subdirectory and its contents would be
moved to top-level in the tarball due to one of the tarball transforms
matching the 'client-qt' in the directory's name, replacing the
'extras/ci/client-qt' prefix with 'client-qt', thereby resulting in
'client-qt-gnulinux' being moved to the tarball's top-level.
* .gitignore: Ignore tarballs.manifest and jami-*.tar.gz files.
* extras/packaging/gnu-linux/tarballs.manifest: Drop file accidentally
checked into git.

Change-Id: I2695f560c0bc5e61fb99dc0244f8fbb8e7026a62
2023-01-30 09:54:29 -05:00
6 changed files with 60 additions and 37 deletions

4
.gitignore vendored
View File

@ -36,3 +36,7 @@ src/app/constant/JamiResources.qml
# macOS
.DS_Store
# releases
tarballs.manifest
jami-*.tar.gz

2
daemon

Submodule daemon updated: 33f089ef50...1b650458ac

View File

@ -140,8 +140,8 @@ make -f extras/packaging/gnu-linux/Makefile portable-release-tarball .tarball-ve
sshagent(credentials: [JENKINS_SSH_KEY, DL_SSH_KEY]) {
echo "Publishing to git repository..."
script {
def wantedTag = sh (
script: "echo ${params.CHANNEL}/\$(date +\"%Y%m%d\")",
def wantedTag = "${params.CHANNEL}/" + sh (
script: "./extras/packaging/gnu-linux/scripts/release-version.sh ${params.CHANNEL}",
returnStdout: true
).trim()
sh """

View File

@ -27,17 +27,17 @@ export TARBALLS ?= /var/cache/jami
TARBALL_VERSION := $(shell cat $(CURDIR)/.tarball-version 2> /dev/null)
ifeq ($(TARBALL_VERSION),)
LAST_COMMIT_DATE := $(shell git log -1 --format=%cd --date=format:'%Y%m%d.%H%M')
COMMIT_ID := $(shell git rev-parse --short HEAD)
RELEASE_VERSION := $(LAST_COMMIT_DATE).$(COMMIT_ID)
RELEASE_VERSION := $(shell ./extras/packaging/gnu-linux/scripts/release-version.sh)
else
$(warning Using version from the .tarball-version file: $(TARBALL_VERSION))
RELEASE_VERSION := $(TARBALL_VERSION)
endif
RELEASE_TARBALL_FILENAME := jami_$(RELEASE_VERSION).tar.gz
RELEASE_DIRNAME := jami-$(RELEASE_VERSION)
RELEASE_TARBALL_FILENAME := $(RELEASE_DIRNAME).tar.gz
# Export for consumption in child processes.
export RELEASE_VERSION
export RELEASE_DIRNAME
export RELEASE_TARBALL_FILENAME
# Debian versions
@ -78,7 +78,7 @@ TAR_REPRODUCIBILITY_OPTIONS = \
echo $(RELEASE_VERSION) > $@
purge-release-tarballs:
rm -f jami_*.tar.* tarballs.manifest
rm -f jami-*.tar.* tarballs.manifest
release-tarball:
rm -f "$(RELEASE_TARBALL_FILENAME)" tarballs.manifest
@ -123,27 +123,27 @@ ifeq ($(TARBALL_VERSION),)
$(RELEASE_TARBALL_FILENAME): tarballs.manifest
# Prepare the sources of the top repository and relevant submodules.
rm -f "$@"
mkdir $(TMPDIR)/client-qt
git archive HEAD | tar xf - -C $(TMPDIR)/client-qt
mkdir $(TMPDIR)/$(RELEASE_DIRNAME)
git archive HEAD | tar xf - -C $(TMPDIR)/$(RELEASE_DIRNAME)
for m in \
./daemon \
. \
./3rdparty/SortFilterProxyModel; do \
(cd "$$m" && git archive --prefix "$$m/" HEAD \
| tar xf - -C $(TMPDIR)/client-qt); \
| tar xf - -C $(TMPDIR)/$(RELEASE_DIRNAME)); \
done
# Create the base archive.
tar -cf $(TMPDIR)/client-qt.tar $(TMPDIR)/client-qt \
--transform 's,.*/client-qt,client-qt,' \
tar -cf $(TMPDIR)/$(RELEASE_DIRNAME).tar $(TMPDIR)/$(RELEASE_DIRNAME) \
--transform "s,.*/$(RELEASE_DIRNAME),$(RELEASE_DIRNAME)," \
$(TAR_REPRODUCIBILITY_OPTIONS)
# Append the cached tarballs listed in the manifest.
tar --append --file $(TMPDIR)/client-qt.tar \
tar --append --file $(TMPDIR)/$(RELEASE_DIRNAME).tar \
--files-from $< \
--transform 's,^.*/,client-qt/daemon/contrib/tarballs/,' \
$(TAR_REPRODUCIBILITY_OPTIONS)
--transform "s,^.*/,$(RELEASE_DIRNAME)/daemon/contrib/tarballs/," \
$(TAR_REPRODUCIBILITY_OPTIONS)
# Compress the tarball and move it into place.
gzip --no-name $(TMPDIR)/client-qt.tar
mv $(TMPDIR)/client-qt.tar.gz "$@"
gzip --no-name $(TMPDIR)/$(RELEASE_DIRNAME).tar
mv $(TMPDIR)/$(RELEASE_DIRNAME).tar.gz "$@"
rm -rf $(TMPDIR)
else
# If TARBALL_VERSION is defined, assume it's already been generated,
@ -189,6 +189,7 @@ $(1)-docker-image-file := .docker-image-$$($(1)-docker-image-name)
$(1)-docker-run-command := docker run \
--rm --privileged --security-opt apparmor=docker-default \
-e RELEASE_VERSION="$(RELEASE_VERSION)" \
-e RELEASE_DIRNAME="$(RELEASE_DIRNAME)" \
-e RELEASE_TARBALL_FILENAME="$(RELEASE_TARBALL_FILENAME)" \
-e DEBIAN_VERSION="$(DEBIAN_VERSION)" \
-e DEBIAN_QT_VERSION="$(DEBIAN_QT_VERSION)" \
@ -296,8 +297,7 @@ env:
clean:
rm -rf env
rm -rf docs/build
rm -f jami_*.tar.gz
rm -f jami-*.tar.gz
rm -rf extras/packaging/gnu-linux/packages
rm -f Makefile.packaging.distro_targets
rm -f .docker-image-*
rm -rf client-qt/daemon/contrib/tarballs/*
rm -rf daemon/contrib/tarballs/*

View File

@ -0,0 +1,35 @@
#!/bin/sh
#
# Copyright (C) 2023 Savoir-faire Linux Inc.
#
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# This script is used in the packaging containers to build a snap
# package on an ubuntu base distro.
if [ $# -gt 1 ]; then
echo "Usage: $0 {stable,beta,nightly}"
exit 1
fi
# default to stable if no release type given
release_type=${1:-stable}
last_commit_date=$(git log -1 --format=%cd --date=format:'%Y%m%d')
same_day_releases=$(git tag -l "${release_type}/${last_commit_date}*" | wc -l)
release_counter=${same_day_releases:-0}
release_version=${last_commit_date}.${release_counter}
printf "${release_version}"

View File

@ -1,16 +0,0 @@
/home/amarok/Projects/jami/daemon/contrib/tarballs/asio-asio-1-22-1.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/ffmpeg-n5.0.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/ffnvcodec-n11.1.5.1.tar.xz
/home/amarok/Projects/jami/daemon/contrib/tarballs/fmt-9.1.0.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/gmp-6.2.1.tar.bz2
/home/amarok/Projects/jami/daemon/contrib/tarballs/http-parser-2.9.4.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/libarchive-3.6.0.tar.xz
/home/amarok/Projects/jami/daemon/contrib/tarballs/libgit2-v1.1.0.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/libnatpmp-20150609.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/opendht-af7d88b057fa4c84ab9096c6a1932bd5d34634ef.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/pjproject-513a3f14c44b2c2652f9219ec20dea64b236b713.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/restinio-bbaa034dbcc7555ce67df0f8a1475591a7441733.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/secp256k1-0b7024185045a49a1a6a4c5615bf31c94f63d9c4.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/pupnp-release-1.14.13.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/libvpx-v1.12.0.tar.gz
/home/amarok/Projects/jami/daemon/contrib/tarballs/webrtc-audio-processing-v0.3.1.tar.gz