Skip to content

Commit

Permalink
signal-desktop: add 7.37.0
Browse files Browse the repository at this point in the history
needs a patch for a patch
wwwutz committed Jan 10, 2025
1 parent c5217ad commit 5e26cb4
Showing 2 changed files with 79 additions and 31 deletions.
91 changes: 60 additions & 31 deletions signal-desktop-7.37.0-0.build.sh
Original file line number Diff line number Diff line change
@@ -27,10 +27,11 @@ NODEVMAP["7.5.1"]="20.9.0" # good
NODEVMAP["7.16.0"]="20.11.1" # good
NODEVMAP["7.28.0"]="20.17.0" # good
NODEVMAP["7.29.0-beta.1"]="20.17.0" # good
NODEVMAP["7.37.0"]="20.17.0" # good
NODEVMAP["7.37.0"]="20.18.1" # good

# error signal-desktop@7.16.0: The engine "node" is incompatible with this module. Expected version "20.11.1". Got "20.15.1"
# error signal-desktop@7.29.0-beta.1: The engine "node" is incompatible with this module. Expected version "20.17.0". Got "20.11.1"
# error signal-desktop@7.37.0: The engine "node" is incompatible with this module. Expected version "20.18.1". Got "20.17.0"

NODEVERSION=${NODEVMAP[${VERSION}]}

@@ -67,14 +68,14 @@ for i in "${_CLEANUP[@]}"; do
done

cat >>${HOME}/.wgetrc <<'_EOW_'
http_proxy = beehive:3128
https_proxy = beehive:3128
ftp_proxy = beehive:3128
#http_proxy = beehive:3128
#https_proxy = beehive:3128
#ftp_proxy = beehive:3128
check-certificate = quiet
_EOW_

git config --global http.proxy http://beehive:3128
git config --global https.proxy https://beehive.molgen.mpg.de:3128
#git config --global http.proxy http://beehive:3128
#git config --global https.proxy https://beehive.molgen.mpg.de:3128
git config --global advice.detachedHead false
git config --global http.sslVerify false
git config --global pack.threads 24
@@ -83,34 +84,37 @@ exec </dev/null

NODEPREFIX=/scratch/local2/${USER}/signal-build/node-${NODEVERSION}

SRCURL="https://beehive.molgen.mpg.de/8996b90d5544c80c6ddc91efbcacc72f/node-v3.0.0-30761-g019efe1453.tar"

PKGARC=${SRCURL##*/}

pushd ${BUILDDIR}

if [ ! -d ${NODEPREFIX} ]; then

# git tar file schon da ? wget it
test -e "${PKGARC}" || wget -nv "${SRCURL}"
SRCURL="https://beehive.molgen.mpg.de/66b4ab021b6929201ea921bd0bd35237/node-v20.18.1.tar.gz"

test -d node-git || mkdir node-git && tar -x --directory=node-git --strip-components=1 -f ${PKGARC}
# BUILD_PKG=${BUILD_node}
BUILD_PKG=node-v${NODEVERSION}

pushd node-git
# im node git, version auschecken
mkdir -p ${NODEPREFIX}

git clean -d --force
git checkout "v${NODEVERSION}"
cat >${NODEPREFIX}/profile <<-EOF
PATH=${NODEPREFIX}/bin:\$PATH
npm_config_cache=${NODEPREFIX}/cache
EOF

# bauen nach
CFLAGS='-O2 -fPIC' \
./configure \
--prefix=${NODEPREFIX}

make -j $(nproc)
make install
test -e "${BUILD_PKG}.tar.gz" || wget -nv "${SRCURL}" -O "${BUILD_PKG}.tar.gz"
test -d "${BUILD_PKG}" || mkdir -pv "${BUILD_PKG}" && tar -xf "${BUILD_PKG}.tar.gz" --strip-components=1 -C "${BUILD_PKG}"

popd
. "${PREFIX}/profile"

pushd "${BUILD_PKG}"

CFLAGS='-O2 -fPIC' \
./configure --prefix=${NODEPREFIX}

make -j $(nproc)

make install
popd

fi

@@ -151,9 +155,14 @@ export PATH
############ git-lfs installed ############

# now go for signal
# git clone, git describe, tar cf
# git clone https://github.com/signalapp/Signal-Desktop.git
# ( cd Signal-Desktop; git describe )
# tar cf

# get patch


SRCURL[0]="https://beehive.molgen.mpg.de/6754c1d4c92fcfd3c1adc6929c93f46a/Signal-Desktop-v6.31.0-beta.1-1447-g76a77a9b7.tar"
SRCURL="https://beehive.molgen.mpg.de/387c2a99b5f6a280b317a44fd79cbcaa/Signal-Desktop-v6.31.0-beta.1-1675-g5f611b74f.tar"

PKGARC=${SRCURL##*/}

@@ -169,12 +178,32 @@ git-lfs install
git clean -d --force
git checkout tags/v${VERSION}

# allow higher node versions
#sed 's#"node": "#&>=#' -i package.json

# dirty...
rm -v patches/socks-proxy-agent+8.0.1.patch
mv -v patches/@types+express+4.17.18.patch patches/@types+express+4.17.21.patch
# der versucht backbone-min.js.map zu löschen, welches nicht existiert

# patches/backbone+1.6.0.patch
# **ERROR** Failed to apply patch for package backbone at path

# node_modules/backbone

# /scratch/local2/build/signal-build/7.37.0/Signal-Desktop> patch --dry-run -p1 < patches/backbone+1.6.0.patch
#File node_modules/backbone/backbone-min.js is read-only; trying to patch anyway
#checking file node_modules/backbone/backbone-min.js
#The next patch would delete the file node_modules/backbone/backbone-min.js.map,
#which does not exist! Assume -R? [n] y
#checking file node_modules/backbone/backbone-min.js.map
#File node_modules/backbone/backbone-min.map is read-only; trying to patch anyway
#checking file node_modules/backbone/backbone-min.map
#File node_modules/backbone/backbone.js is read-only; trying to patch anyway
#checking file node_modules/backbone/backbone.js

# get patch
PATCHURL+=("https://beehive.molgen.mpg.de/ef2cdf225dbdd9b912d06756368a65d1/signal-desktop-7.37.0-0.build.sh.patch")
wget -nv ${PATCHURL}

# patch
patch --forward --strip=1 --input=${PATCHURL##*/}


# workaround https://github.com/yarnpkg/yarn/issues/7584
cat >$HOME/.yarnrc <<EOF0
19 changes: 19 additions & 0 deletions signal-desktop-7.37.0-0.build.sh.patch

Large diffs are not rendered by default.

0 comments on commit 5e26cb4

Please sign in to comment.