Skip to content

Commit

Permalink
debian: prepare for https://download.jitsi.org/stable/ repo
Browse files Browse the repository at this point in the history
Now requires fpm to be available in path, as the electron-builder
packages fpm version is too old for --deb-generate-changes parameter
  • Loading branch information
csett86 committed Mar 25, 2022
1 parent bc71f95 commit 9cd12aa
Show file tree
Hide file tree
Showing 7 changed files with 311 additions and 123 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Prepare for debian package
run: |
sudo gem install fpm
- name: Build it
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -29,7 +32,9 @@ jobs:
with:
name: linux-binaries
path: |
dist/jitsi-meet-amd64.deb
dist/*.deb
dist/*.changes
dist/*.buildinfo
dist/jitsi-meet-x86_64.AppImage
dist/latest-linux.yml
build-mac:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ npm install --global --production windows-build-tools

<details><summary>Extra dependencies for GNU/Linux</summary>

X11, PNG and zlib development packages are necessary. On Debian-like systems then can be installed as follows:
X11, PNG and zlib development packages are necessary. In addition fpm is required. On Debian-like systems then can be installed as follows:

```bash
sudo apt install libx11-dev zlib1g-dev libpng-dev libxtst-dev
sudo gem install fpm
```
</details>

Expand Down
43 changes: 43 additions & 0 deletions build-debian-meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* global process */

const { stat, readFile, writeFile, rename } = require('fs/promises');
const { createHash } = require('crypto');
const packageJson = require('./package.json');

exports.default = async function(context) {
const dateFormat = await import('dateformat');

const { outDir } = context;

if (process.platform !== 'linux') {
return;
}

const triplet = `${packageJson.name}_${packageJson.version}_amd64`;
const debName = `${outDir}/${triplet}.deb`;
const buildInfo = `${outDir}/${triplet}.buildinfo`;
const changes = `${outDir}/${triplet}.changes`;
const sizeInBytes = (await stat(debName)).size;
const debfile = await readFile(debName);
const md5sum = createHash('md5').update(debfile)
.digest('hex');
const sha1sum = createHash('sha1').update(debfile)
.digest('hex');
const sha256sum = createHash('sha256').update(debfile)
.digest('hex');
let template = (await readFile(`${outDir}/../debian/${packageJson.name}.buildinfo`)).toString();

template = template.replace(/__SIZE__/g, sizeInBytes);
template = template.replace(/__FILE__/g, debName);
template = template.replace(/__NAME__/g, packageJson.name);
template = template.replace('__VERSION__', packageJson.version);
template = template.replace('__DATE__', dateFormat.default(new Date(), 'ddd, dd mmm yyyy HH:MM:ss o'));
template = template.replace('__MD5__', md5sum);
template = template.replace('__SHA1__', sha1sum);
template = template.replace('__SHA256__', sha256sum);
await writeFile(buildInfo, template);

await rename(`${outDir}/../${triplet}.changes`, changes);

return [ buildInfo, changes ];
};
163 changes: 163 additions & 0 deletions debian/jitsi-meet-electron.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
Format: 1.0
Source: __NAME__
Binary: __NAME__
Architecture: amd64
Version: __VERSION__
Checksums-Md5:
__MD5__ __SIZE__ __FILE__
Checksums-Sha1:
__SHA1__ __SIZE__ __FILE__
Checksums-Sha256:
__SHA256__ __SIZE__ __FILE__
Build-Origin: Ubuntu
Build-Architecture: amd64
Build-Date: __DATE__
Build-Tainted-By:
merged-usr-via-symlinks
Installed-Build-Depends:
autoconf (= 2.69-11.1),
automake (= 1:1.16.1-4ubuntu6),
autopoint (= 0.19.8.1-10build1),
autotools-dev (= 20180224.1),
base-files (= 11ubuntu5.5),
base-passwd (= 3.5.47),
bash (= 5.0-6ubuntu1.1),
binutils (= 2.34-6ubuntu1.3),
binutils-common (= 2.34-6ubuntu1.3),
binutils-x86-64-linux-gnu (= 2.34-6ubuntu1.3),
bsdmainutils (= 11.1.2ubuntu3),
bsdutils (= 1:2.34-0.1ubuntu9.3),
build-essential (= 12.8ubuntu1.1),
bzip2 (= 1.0.8-2),
coreutils (= 8.30-3ubuntu2),
cpp (= 4:9.3.0-1ubuntu2),
cpp-9 (= 9.4.0-1ubuntu1~20.04),
dash (= 0.5.10.2-6),
debconf (= 1.5.73),
debhelper (= 12.10ubuntu1),
debianutils (= 4.9.1),
dh-autoreconf (= 19),
dh-strip-nondeterminism (= 1.7.0-1),
diffutils (= 1:3.7-3),
dpkg (= 1.19.7ubuntu3),
dpkg-dev (= 1.19.7ubuntu3),
dwz (= 0.13-5),
file (= 1:5.38-4),
findutils (= 4.7.0-1ubuntu1),
g++ (= 4:9.3.0-1ubuntu2),
g++-9 (= 9.4.0-1ubuntu1~20.04),
gcc (= 4:9.3.0-1ubuntu2),
gcc-10-base (= 10.3.0-1ubuntu1~20.04),
gcc-9 (= 9.4.0-1ubuntu1~20.04),
gcc-9-base (= 9.4.0-1ubuntu1~20.04),
gettext (= 0.19.8.1-10build1),
gettext-base (= 0.19.8.1-10build1),
grep (= 3.4-1),
groff-base (= 1.22.4-4build1),
gzip (= 1.10-0ubuntu4),
hostname (= 3.23),
init-system-helpers (= 1.57),
install-info (= 6.7.0.dfsg.2-5),
intltool-debian (= 0.35.0+20060710.5),
libacl1 (= 2.2.53-6),
libarchive-zip-perl (= 1.67-2),
libasan5 (= 9.4.0-1ubuntu1~20.04),
libatomic1 (= 10.3.0-1ubuntu1~20.04),
libattr1 (= 1:2.4.48-5),
libaudit-common (= 1:2.8.5-2ubuntu6),
libaudit1 (= 1:2.8.5-2ubuntu6),
libbinutils (= 2.34-6ubuntu1.3),
libblkid1 (= 2.34-0.1ubuntu9.3),
libbsd0 (= 0.10.0-1),
libbz2-1.0 (= 1.0.8-2),
libc-bin (= 2.31-0ubuntu9.7),
libc-dev-bin (= 2.31-0ubuntu9.7),
libc6 (= 2.31-0ubuntu9.7),
libc6-dev (= 2.31-0ubuntu9.7),
libcap-ng0 (= 0.7.9-2.1build1),
libcc1-0 (= 10.3.0-1ubuntu1~20.04),
libcroco3 (= 0.6.13-1),
libcrypt-dev (= 1:4.4.10-10ubuntu4),
libcrypt1 (= 1:4.4.10-10ubuntu4),
libctf-nobfd0 (= 2.34-6ubuntu1.3),
libctf0 (= 2.34-6ubuntu1.3),
libdb5.3 (= 5.3.28+dfsg1-0.6ubuntu2),
libdebconfclient0 (= 0.251ubuntu1),
libdebhelper-perl (= 12.10ubuntu1),
libdpkg-perl (= 1.19.7ubuntu3),
libelf1 (= 0.176-1.1build1),
libffi7 (= 3.3-4),
libfile-stripnondeterminism-perl (= 1.7.0-1),
libgcc-9-dev (= 9.4.0-1ubuntu1~20.04),
libgcc-s1 (= 10.3.0-1ubuntu1~20.04),
libgcrypt20 (= 1.8.5-5ubuntu1.1),
libgdbm-compat4 (= 1.18.1-5),
libgdbm6 (= 1.18.1-5),
libglib2.0-0 (= 2.64.6-1~ubuntu20.04.4),
libgmp10 (= 2:6.2.0+dfsg-4),
libgomp1 (= 10.3.0-1ubuntu1~20.04),
libgpg-error0 (= 1.37-1),
libicu66 (= 66.1-2ubuntu2.1),
libisl22 (= 0.22.1-1),
libitm1 (= 10.3.0-1ubuntu1~20.04),
liblsan0 (= 10.3.0-1ubuntu1~20.04),
liblz4-1 (= 1.9.2-2ubuntu0.20.04.1),
liblzma5 (= 5.2.4-1ubuntu1),
libmagic-mgc (= 1:5.38-4),
libmagic1 (= 1:5.38-4),
libmount1 (= 2.34-0.1ubuntu9.3),
libmpc3 (= 1.1.0-1),
libmpfr6 (= 4.0.2-1),
libpam-modules (= 1.3.1-5ubuntu4.3),
libpam-modules-bin (= 1.3.1-5ubuntu4.3),
libpam-runtime (= 1.3.1-5ubuntu4.3),
libpam0g (= 1.3.1-5ubuntu4.3),
libpcre2-8-0 (= 10.34-7),
libpcre3 (= 2:8.39-12build1),
libperl5.30 (= 5.30.0-9ubuntu0.2),
libpipeline1 (= 1.5.2-2build1),
libquadmath0 (= 10.3.0-1ubuntu1~20.04),
libseccomp2 (= 2.5.1-1ubuntu1~20.04.2),
libselinux1 (= 3.0-1build2),
libsigsegv2 (= 2.12-2),
libsmartcols1 (= 2.34-0.1ubuntu9.3),
libstdc++-9-dev (= 9.4.0-1ubuntu1~20.04),
libstdc++6 (= 10.3.0-1ubuntu1~20.04),
libsub-override-perl (= 0.09-2),
libsystemd0 (= 245.4-4ubuntu3.15),
libtinfo6 (= 6.2-0ubuntu2),
libtool (= 2.4.6-14),
libtsan0 (= 10.3.0-1ubuntu1~20.04),
libubsan1 (= 10.3.0-1ubuntu1~20.04),
libuchardet0 (= 0.0.6-3build1),
libudev1 (= 245.4-4ubuntu3.15),
libunistring2 (= 0.9.10-2),
libuuid1 (= 2.34-0.1ubuntu9.3),
libxml2 (= 2.9.10+dfsg-5ubuntu0.20.04.2),
libzstd1 (= 1.4.4+dfsg-3ubuntu0.1),
linux-libc-dev (= 5.4.0-105.119),
login (= 1:4.8.1-1ubuntu5.20.04.1),
lsb-base (= 11.1.0ubuntu2),
m4 (= 1.4.18-4),
make (= 4.2.1-1.2),
man-db (= 2.9.1-1),
mawk (= 1.3.4.20200120-2),
ncurses-base (= 6.2-0ubuntu2),
ncurses-bin (= 6.2-0ubuntu2),
patch (= 2.7.6-6),
perl (= 5.30.0-9ubuntu0.2),
perl-base (= 5.30.0-9ubuntu0.2),
perl-modules-5.30 (= 5.30.0-9ubuntu0.2),
po-debconf (= 1.0.21),
sed (= 4.7-1),
sensible-utils (= 0.0.12+nmu1),
sysvinit-utils (= 2.96-2.1ubuntu1),
tar (= 1.30+dfsg-7ubuntu0.20.04.2),
tzdata (= 2021e-0ubuntu0.20.04),
util-linux (= 2.34-0.1ubuntu9.3),
xz-utils (= 5.2.4-1ubuntu1),
zlib1g (= 1:1.2.11.dfsg-2ubuntu1.2)
Environment:
DEB_BUILD_OPTIONS="parallel=4"
LANG="de_DE.UTF-8"
SOURCE_DATE_EPOCH="1647873000"
1 change: 1 addition & 0 deletions electron-builder.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
USE_SYSTEM_FPM=true
Loading

0 comments on commit 9cd12aa

Please sign in to comment.