mirror of
https://github.com/bisq-network/bisq.git
synced 2025-01-19 05:44:05 +01:00
Update linux packaging process
The 64bitBuild.sh script has been renamed to package.sh and has been updated so that it is capable of performing the complete packaging process without having to rely on the jar first being built and prepped from the MacOS scripts. However, it does support having the jar previously built and prepped and will look for a prepped jar in the desktop/package folder. If not found, it will build and prep it prior to packaging. Additionally, the Bruntime option passed to javapackager is unnecessary and has been removed. The Bruntime option is valid only when the -native option is set to jnlp. Also, the prepare-system.sh script was removed as it did not appear to be doing anything useful. Finally, a release.sh script has been added that will perform the release process of copying necessary files to a versioned release folder and generating/verifying signatures. Windows and MacOS packaged installers should be copied to their appropriate package folders prior to executing this script if they are to be included in this release process, otherwise only the Linux files will be included.
This commit is contained in:
parent
1835ea84ce
commit
fd775eb128
@ -1,53 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd ../../
|
||||
mkdir -p deploy
|
||||
|
||||
set -e
|
||||
|
||||
# Edit version
|
||||
version=0.9.1
|
||||
|
||||
sharedDir="/media/sf_vm_shared_ubuntu"
|
||||
|
||||
dir="/home/$USER/Desktop/build"
|
||||
mkdir -p $dir
|
||||
|
||||
cp "$sharedDir/Bisq-$version.jar" "$dir/Bisq-$version.jar"
|
||||
chmod o+rx "$dir/Bisq-$version.jar"
|
||||
|
||||
# Note: fakeroot needs to be installed on Linux
|
||||
|
||||
# TODO: need to add the licenses back again as soon as it is working with our build setup
|
||||
#-BlicenseFile=LICENSE \
|
||||
#-srcfiles package/linux/LICENSE \
|
||||
|
||||
$JAVA_HOME/bin/javapackager \
|
||||
-deploy \
|
||||
-Bruntime="$JAVA_HOME/jre" \
|
||||
-BappVersion=$version \
|
||||
-Bcategory=Network \
|
||||
-Bemail=contact@bisq.network \
|
||||
-BlicenseType=GPLv3 \
|
||||
-Bicon=package/linux/icon.png \
|
||||
-native deb \
|
||||
-name Bisq \
|
||||
-title Bisq \
|
||||
-vendor Bisq \
|
||||
-outdir deploy \
|
||||
-srcdir $dir \
|
||||
-srcfiles "Bisq-$version.jar" \
|
||||
-appclass bisq.desktop.app.BisqAppMain \
|
||||
-BjvmOptions=-Xss1280k \
|
||||
-outfile Bisq \
|
||||
-v
|
||||
|
||||
# uncomment because the build VM does not support alien
|
||||
#sudo alien -r -c -k deploy/bundles/bisq-$version.deb
|
||||
|
||||
cp "deploy/bisq-$version.deb" "/home/$USER/Desktop/Bisq-64bit-$version.deb"
|
||||
mv "deploy/bisq-$version.deb" "/media/sf_vm_shared_ubuntu/Bisq-64bit-$version.deb"
|
||||
rm -r deploy/
|
||||
rm -r $dir
|
||||
|
||||
cd package/linux
|
105
desktop/package/linux/package.sh
Normal file
105
desktop/package/linux/package.sh
Normal file
@ -0,0 +1,105 @@
|
||||
#!/usr/bin/env bash
|
||||
# Requirements:
|
||||
# - OracleJDK 10 installed
|
||||
# Note: OpenJDK 10 does not have the javapackager util, so must use OracleJDK
|
||||
# Prior to running this script:
|
||||
# - Update version below
|
||||
# - Ensure JAVA_HOME below is pointing to OracleJDK 10 directory
|
||||
|
||||
version=0.9.1-SNAPSHOT
|
||||
JAVA_HOME=/usr/lib/jvm/jdk-10.0.2
|
||||
base_dir=$( cd "$(dirname "$0")" ; pwd -P )/../../..
|
||||
|
||||
cd $base_dir
|
||||
|
||||
set -e
|
||||
|
||||
echo Installing required packages
|
||||
apt install -y fakeroot
|
||||
|
||||
if [ ! -f "$base_dir/desktop/package/desktop-$version-all.jar" ]; then
|
||||
echo Building application
|
||||
./gradlew :desktop:clean :desktop:build -x test shadowJar
|
||||
jar_file=$base_dir/desktop/build/libs/desktop-$version-all.jar
|
||||
if [ ! -f "$jar_file" ]; then
|
||||
echo No jar file available at $jar_file
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tmp=$base_dir/desktop/build/libs/tmp
|
||||
echo Extracting jar file to $tmp
|
||||
if [ -d "$tmp" ]; then
|
||||
rm -rf $tmp
|
||||
fi
|
||||
mkdir -p $tmp
|
||||
unzip -o -q $jar_file -d $tmp
|
||||
|
||||
echo Deleting problematic module config from extracted jar
|
||||
# Strip out Java 9 module configuration used in the fontawesomefx library as it causes javapackager to stop
|
||||
# because of this existing module information, since it is not used as a module.
|
||||
# Sometimes module-info.class does not exist - TODO check why and if still needed
|
||||
if [ -f "$tmp/module-info.class" ]; then
|
||||
rm -f $tmp/module-info.class
|
||||
fi
|
||||
|
||||
jar_file=$base_dir/desktop/package/desktop-$version-all.jar
|
||||
echo Zipping jar again without module config to $jar_file
|
||||
cd $tmp; zip -r -q -X $jar_file *
|
||||
cd $base_dir; rm -rf $tmp
|
||||
|
||||
echo SHA256 before stripping jar file:
|
||||
shasum -a256 $jar_file | awk '{print $1}'
|
||||
|
||||
echo Making deterministic jar by stripping out parameters and comments that contain dates
|
||||
# Jar file created from https://github.com/ManfredKarrer/tools
|
||||
# TODO Is this step still necessary? Since we are using preserveFileTimestamps and reproducibleFileOrder in build.gradle
|
||||
java -jar $base_dir/desktop/package/tools-1.0.jar $jar_file
|
||||
|
||||
echo SHA256 after stripping jar file:
|
||||
shasum -a256 $jar_file | awk '{print $1}' | tee $base_dir/desktop/package/desktop-$version-all.jar.txt
|
||||
|
||||
chmod o+rx "$base_dir/desktop/package/desktop-$version-all.jar"
|
||||
fi
|
||||
|
||||
if [ -f "$base_dir/desktop/package/linux/bisq-$version.deb" ]; then
|
||||
rm "$base_dir/desktop/package/linux/bisq-$version.deb"
|
||||
fi
|
||||
|
||||
# TODO: add the license as soon as it is working with our build setup
|
||||
#-BlicenseFile=LICENSE \
|
||||
#-srcfiles package/linux/LICENSE \
|
||||
|
||||
echo Generating deb package
|
||||
$JAVA_HOME/bin/javapackager \
|
||||
-deploy \
|
||||
-BappVersion=$version \
|
||||
-Bcategory=Network \
|
||||
-Bemail=contact@bisq.network \
|
||||
-BlicenseType=GPLv3 \
|
||||
-Bicon=$base_dir/desktop/package/linux/icon.png \
|
||||
-native deb \
|
||||
-name Bisq \
|
||||
-title "The decentralized exchange network." \
|
||||
-vendor Bisq \
|
||||
-outdir $base_dir/desktop/package/linux \
|
||||
-srcdir $base_dir/desktop/package \
|
||||
-srcfiles desktop-$version-all.jar \
|
||||
-appclass bisq.desktop.app.BisqAppMain \
|
||||
-BjvmOptions=-Xss1280k \
|
||||
-outfile Bisq-$version \
|
||||
-v
|
||||
|
||||
if [ ! -f "$base_dir/desktop/package/linux/bisq-$version.deb" ]; then
|
||||
echo No deb file found at $base_dir/desktop/package/linux/bisq-$version.deb
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ -f "$base_dir/desktop/package/linux/Bisq-$version.deb" ]; then
|
||||
rm "$base_dir/desktop/package/linux/Bisq-$version.deb"
|
||||
fi
|
||||
mv $base_dir/desktop/package/linux/bisq-$version.deb $base_dir/desktop/package/linux/Bisq-$version.deb
|
||||
|
||||
echo SHA256 of $base_dir/desktop/package/linux/Bisq-$version.deb:
|
||||
shasum -a256 $base_dir/desktop/package/linux/Bisq-$version.deb | awk '{print $1}' | tee $base_dir/desktop/package/linux/Bisq-$version.deb.txt
|
||||
|
||||
echo Done!
|
@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Install dependencies necessary for releasing Bisq on Debian-like systems.
|
||||
#
|
||||
cd $(dirname ${0})
|
||||
set -eu
|
||||
|
||||
echo "Updating OS.."
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
sudo apt-get dist-upgrade
|
||||
|
||||
echo "Done."
|
68
desktop/package/linux/release.sh
Executable file
68
desktop/package/linux/release.sh
Executable file
@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
# Requirements:
|
||||
# - GPG signing key has been created
|
||||
# Prior to running this script:
|
||||
# - Update version below
|
||||
|
||||
version=0.9.1-SNAPSHOT
|
||||
base_dir=$( cd "$(dirname "$0")" ; pwd -P )/../../..
|
||||
package_dir=$base_dir/desktop/package
|
||||
release_dir=$base_dir/desktop/release/$version
|
||||
|
||||
dmg=Bisq-$version.dmg
|
||||
deb=Bisq-$version.deb
|
||||
exe=Bisq-$version.exe
|
||||
|
||||
read -p "Enter email address used for gpg signing: " gpg_user
|
||||
|
||||
echo Creating release directory
|
||||
if [ -d "$release_dir" ]; then
|
||||
rm -fr "$release_dir"
|
||||
fi
|
||||
mkdir -p "$release_dir"
|
||||
|
||||
echo Copying files to release folder
|
||||
# sig key mkarrer
|
||||
cp "$package_dir/F379A1C6.asc" "$release_dir"
|
||||
# sig key cbeams
|
||||
cp "$package_dir/5BC5ED73.asc" "$release_dir"
|
||||
# sig key Christoph Atteneder
|
||||
cp "$package_dir/29CDFD3B.asc" "$release_dir"
|
||||
# signing key
|
||||
cp "$package_dir/signingkey.asc" "$release_dir"
|
||||
if [ -f "$package_dir/macosx/$dmg" ]; then
|
||||
cp "$package_dir/macosx/$dmg" "$release_dir"
|
||||
cp "$package_dir/macosx/$dmg.txt" "$release_dir"
|
||||
fi
|
||||
if [ -f "$package_dir/linux/$deb" ]; then
|
||||
cp "$package_dir/linux/$deb" "$release_dir"
|
||||
cp "$package_dir/linux/$deb.txt" "$release_dir"
|
||||
fi
|
||||
if [ -f "$package_dir/windows/$exe" ]; then
|
||||
cp "$package_dir/windows/$exe" "$release_dir"
|
||||
cp "$package_dir/windows/$exe.txt" "$release_dir"
|
||||
fi
|
||||
|
||||
echo Creating signatures
|
||||
if [ -f "$release_dir/$dmg" ]; then
|
||||
gpg --digest-algo SHA256 --local-user $gpg_user --output "$release_dir/$dmg.asc" --detach-sig --armor "$release_dir/$dmg"
|
||||
fi
|
||||
if [ -f "$release_dir/$deb" ]; then
|
||||
gpg --digest-algo SHA256 --local-user $gpg_user --output "$release_dir/$deb.asc" --detach-sig --armor "$release_dir/$deb"
|
||||
fi
|
||||
if [ -f "$release_dir/$exe" ]; then
|
||||
gpg --digest-algo SHA256 --local-user $gpg_user --output "$release_dir/$exe.asc" --detach-sig --armor "$release_dir/$exe"
|
||||
fi
|
||||
|
||||
echo Verifying signatures
|
||||
if [ -f "$release_dir/$dmg" ]; then
|
||||
gpg --digest-algo SHA256 --verify "$release_dir/$dmg.asc"
|
||||
fi
|
||||
if [ -f "$release_dir/$deb" ]; then
|
||||
gpg --digest-algo SHA256 --verify "$release_dir/$deb.asc"
|
||||
fi
|
||||
if [ -f "$release_dir/$exe" ]; then
|
||||
gpg --digest-algo SHA256 --verify "$release_dir/$exe.asc"
|
||||
fi
|
||||
|
||||
echo Done!
|
Loading…
Reference in New Issue
Block a user