Compare commits
No commits in common. "8f38894da044f17f6a8fb185639778d5fa8896c9" and "1f7fac9ee7d236a61a4cb3a7d111a2925762d9f6" have entirely different histories.
8f38894da0
...
1f7fac9ee7
8 changed files with 38 additions and 50 deletions
|
@ -1,7 +1,7 @@
|
||||||
pkgbase = discord-electron-openasar
|
pkgbase = discord-electron-openasar
|
||||||
pkgdesc = Discord packaged with OpenAsar using system provided electron (v28) for increased security and performance
|
pkgdesc = Discord packaged with OpenAsar using system provided electron (v24) for increased security and performance
|
||||||
pkgver = 0.0.39+824
|
pkgver = 0.0.39+824
|
||||||
pkgrel = 2
|
pkgrel = 1
|
||||||
url = https://discord.com
|
url = https://discord.com
|
||||||
install = discord-electron-openasar.install
|
install = discord-electron-openasar.install
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
|
@ -11,7 +11,7 @@ pkgbase = discord-electron-openasar
|
||||||
makedepends = nodejs
|
makedepends = nodejs
|
||||||
makedepends = curl
|
makedepends = curl
|
||||||
makedepends = python-html2text
|
makedepends = python-html2text
|
||||||
depends = electron28
|
depends = electron24
|
||||||
depends = libxss
|
depends = libxss
|
||||||
depends = unzip
|
depends = unzip
|
||||||
optdepends = libpulse: Pulseaudio support
|
optdepends = libpulse: Pulseaudio support
|
||||||
|
@ -25,7 +25,7 @@ pkgbase = discord-electron-openasar
|
||||||
source = discord-launcher.sh
|
source = discord-launcher.sh
|
||||||
source = git+https://github.com/goosemod/openasar.git#commit=9f68f8dcb61a5c0c469930aab504dd03aa05f060
|
source = git+https://github.com/goosemod/openasar.git#commit=9f68f8dcb61a5c0c469930aab504dd03aa05f060
|
||||||
sha512sums = 9f18aea5d82f5db4efa9db9babbc440b24e47dc80df18df5cc58d99d677f1c0863df21ed96d69896785f8fbe0dc0ff1f7317398b8f39606289da79f5a38074f1
|
sha512sums = 9f18aea5d82f5db4efa9db9babbc440b24e47dc80df18df5cc58d99d677f1c0863df21ed96d69896785f8fbe0dc0ff1f7317398b8f39606289da79f5a38074f1
|
||||||
sha512sums = e68467468e9ebfe7aae873442998bda03212598a87d9af1b9ac976fdbafc81eb376e7770dccca6eb943d579f39717a0473fa4f0a46a0c3e436460688827a2dc7
|
sha512sums = 723250b70c7f5367701675c6581e9eac2143263910c4ffc35957a6ab858492c5febe89ea0d46fce19ac1416c23d9ca3953e48b9db5aa174b4a401fb6efa5daf5
|
||||||
sha512sums = SKIP
|
sha512sums = SKIP
|
||||||
|
|
||||||
pkgname = discord-electron-openasar
|
pkgname = discord-electron-openasar
|
||||||
|
|
|
@ -8,8 +8,8 @@ pkgname=discord-electron-openasar
|
||||||
_pkgname=discord
|
_pkgname=discord
|
||||||
pkgver=0.0.39+824
|
pkgver=0.0.39+824
|
||||||
_pkgver=${pkgver%%+*}
|
_pkgver=${pkgver%%+*}
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
_electronver=28
|
_electronver=24
|
||||||
_electronname="electron${_electronver}"
|
_electronname="electron${_electronver}"
|
||||||
pkgdesc="Discord packaged with OpenAsar using system provided electron (v${_electronver}) for increased security and performance"
|
pkgdesc="Discord packaged with OpenAsar using system provided electron (v${_electronver}) for increased security and performance"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
|
@ -31,7 +31,7 @@ source=("https://dl.discordapp.net/apps/linux/${_pkgver}/${_pkgname}-${_pkgver}.
|
||||||
'discord-launcher.sh'
|
'discord-launcher.sh'
|
||||||
"git+https://github.com/goosemod/openasar.git#commit=9f68f8dcb61a5c0c469930aab504dd03aa05f060")
|
"git+https://github.com/goosemod/openasar.git#commit=9f68f8dcb61a5c0c469930aab504dd03aa05f060")
|
||||||
sha512sums=('9f18aea5d82f5db4efa9db9babbc440b24e47dc80df18df5cc58d99d677f1c0863df21ed96d69896785f8fbe0dc0ff1f7317398b8f39606289da79f5a38074f1'
|
sha512sums=('9f18aea5d82f5db4efa9db9babbc440b24e47dc80df18df5cc58d99d677f1c0863df21ed96d69896785f8fbe0dc0ff1f7317398b8f39606289da79f5a38074f1'
|
||||||
'e68467468e9ebfe7aae873442998bda03212598a87d9af1b9ac976fdbafc81eb376e7770dccca6eb943d579f39717a0473fa4f0a46a0c3e436460688827a2dc7'
|
'723250b70c7f5367701675c6581e9eac2143263910c4ffc35957a6ab858492c5febe89ea0d46fce19ac1416c23d9ca3953e48b9db5aa174b4a401fb6efa5daf5'
|
||||||
'SKIP')
|
'SKIP')
|
||||||
|
|
||||||
_krisp_b2sum='310e3d5ad2311ceace91d20004a677c1a1e49fa1cd5c0458ee5bdb31c01c49df68cac625e66dadcaddf90c67568cde22c2cec3c0b6bca8385225141a8d8d53c1'
|
_krisp_b2sum='310e3d5ad2311ceace91d20004a677c1a1e49fa1cd5c0458ee5bdb31c01c49df68cac625e66dadcaddf90c67568cde22c2cec3c0b6bca8385225141a8d8d53c1'
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
post_upgrade() {
|
post_upgrade() {
|
||||||
# return if old package version is greater than or equal to 0.0.39+824-2...
|
|
||||||
(( $(vercmp $2 '0.0.39+824-2') >= 0 )) && return
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
==> In order to patch Krisp noise suppression support set 'PATCH_KRISP=true'
|
|
||||||
in '~/.config/discord.conf' in addition to having 'rizin' installed.
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# return if old package version is greater than or equal to 0.0.27+809-5...
|
# return if old package version is greater than or equal to 0.0.27+809-5...
|
||||||
(( $(vercmp $2 '0.0.27+809-5') >= 0 )) && return
|
(( $(vercmp $2 '0.0.27+809-5') >= 0 )) && return
|
||||||
|
|
||||||
|
@ -26,9 +18,8 @@ EOF
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
==> For Krisp noise suppression support consider installing 'rizin' and
|
==> For Krisp noise suppression support consider installing 'rizin'. Restart
|
||||||
setting 'PATCH_KRISP=true' in '~/.config/discord.conf'. Restart your
|
your Discord client after installation or update to apply the patch.
|
||||||
Discord client afterwards to apply the patch.
|
|
||||||
==> Additional Electron flags can be set in '~/.config/discord-flags.conf'.
|
==> Additional Electron flags can be set in '~/.config/discord-flags.conf'.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,26 +5,29 @@ set -euo pipefail
|
||||||
declare -a flags
|
declare -a flags
|
||||||
|
|
||||||
|
|
||||||
[[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@.conf" ]] && source "${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@.conf"
|
|
||||||
|
|
||||||
flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@-flags.conf"
|
flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@-flags.conf"
|
||||||
krisp_bin="${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@/@PKGVER@/modules/@PKGNAME@_krisp/@PKGNAME@_krisp.node"
|
krisp_bin="${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@/@PKGVER@/modules/@PKGNAME@_krisp/@PKGNAME@_krisp.node"
|
||||||
krisp_b2=@KRISPB2@
|
krisp_b2=@KRISPB2@
|
||||||
|
|
||||||
if hash rizin &> /dev/null && [[ "${PATCH_KRISP}" == true ]]; then
|
if hash rizin &> /dev/null; then
|
||||||
# Patch Krisp binary to ignore signature check
|
# Patch Krisp binary to ignore signature check
|
||||||
if [[ -w "${krisp_bin}" && $(b2sum "${krisp_bin}" | head -c 128) == $krisp_b2 ]]; then
|
if [[ -f "${krisp_bin}" && $(b2sum "${krisp_bin}" | head -c 128) == $krisp_b2 ]]; then
|
||||||
addr=$(rz-find -x '4881ec00010000' "${krisp_bin}" | head -n1)
|
addr=$(rz-find -x '4881ec00010000' "${krisp_bin}" | head -n1)
|
||||||
rizin -q -w -c "s $addr + 0x30 ; wao nop" "${krisp_bin}" &> /dev/null
|
rizin -q -w -c "s $addr + 0x30 ; wao nop" "${krisp_bin}" &> /dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -w "${flags_file}" ]]; then
|
if [[ -f "${flags_file}" ]]; then
|
||||||
# Replacing because old flag does not work
|
|
||||||
if grep -q '\--ignore-gpu-blacklist' "${flags_file}"; then
|
if grep -q '\--ignore-gpu-blacklist' "${flags_file}"; then
|
||||||
sed -i "s|--ignore-gpu-blacklist|--ignore-gpu-blocklist|" "${flags_file}"
|
sed -i "s|--ignore-gpu-blacklist|--ignore-gpu-blocklist|" "${flags_file}"
|
||||||
fi
|
fi
|
||||||
mapfile -t < "${flags_file}"
|
mapfile -t < "${flags_file}"
|
||||||
|
else
|
||||||
|
cat > "${flags_file}" <<EOF
|
||||||
|
#--ignore-gpu-blocklist
|
||||||
|
#--enable-gpu-rasterization
|
||||||
|
#--enable-zero-copy
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for line in "${MAPFILE[@]}"; do
|
for line in "${MAPFILE[@]}"; do
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
pkgbase = discord-electron
|
pkgbase = discord-electron
|
||||||
pkgdesc = Discord using system provided electron (v27) for increased security and performance
|
pkgdesc = Discord using system provided electron (v24) for increased security and performance
|
||||||
pkgver = 0.0.39
|
pkgver = 0.0.39
|
||||||
pkgrel = 2
|
pkgrel = 1
|
||||||
url = https://discord.com
|
url = https://discord.com
|
||||||
install = discord-electron.install
|
install = discord-electron.install
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
|
@ -9,7 +9,7 @@ pkgbase = discord-electron
|
||||||
makedepends = asar
|
makedepends = asar
|
||||||
makedepends = curl
|
makedepends = curl
|
||||||
makedepends = python-html2text
|
makedepends = python-html2text
|
||||||
depends = electron27
|
depends = electron24
|
||||||
depends = libxss
|
depends = libxss
|
||||||
optdepends = libpulse: Pulseaudio support
|
optdepends = libpulse: Pulseaudio support
|
||||||
optdepends = libappindicator-gtk3: Systray indicator support
|
optdepends = libappindicator-gtk3: Systray indicator support
|
||||||
|
@ -21,6 +21,6 @@ pkgbase = discord-electron
|
||||||
source = https://dl.discordapp.net/apps/linux/0.0.39/discord-0.0.39.tar.gz
|
source = https://dl.discordapp.net/apps/linux/0.0.39/discord-0.0.39.tar.gz
|
||||||
source = discord-launcher.sh
|
source = discord-launcher.sh
|
||||||
sha512sums = 9f18aea5d82f5db4efa9db9babbc440b24e47dc80df18df5cc58d99d677f1c0863df21ed96d69896785f8fbe0dc0ff1f7317398b8f39606289da79f5a38074f1
|
sha512sums = 9f18aea5d82f5db4efa9db9babbc440b24e47dc80df18df5cc58d99d677f1c0863df21ed96d69896785f8fbe0dc0ff1f7317398b8f39606289da79f5a38074f1
|
||||||
sha512sums = e68467468e9ebfe7aae873442998bda03212598a87d9af1b9ac976fdbafc81eb376e7770dccca6eb943d579f39717a0473fa4f0a46a0c3e436460688827a2dc7
|
sha512sums = 723250b70c7f5367701675c6581e9eac2143263910c4ffc35957a6ab858492c5febe89ea0d46fce19ac1416c23d9ca3953e48b9db5aa174b4a401fb6efa5daf5
|
||||||
|
|
||||||
pkgname = discord-electron
|
pkgname = discord-electron
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
pkgname=discord-electron
|
pkgname=discord-electron
|
||||||
_pkgname=discord
|
_pkgname=discord
|
||||||
pkgver=0.0.39
|
pkgver=0.0.39
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
_electronver=27
|
_electronver=24
|
||||||
_electronname="electron${_electronver}"
|
_electronname="electron${_electronver}"
|
||||||
pkgdesc="Discord using system provided electron (v${_electronver}) for increased security and performance"
|
pkgdesc="Discord using system provided electron (v${_electronver}) for increased security and performance"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
|
@ -36,7 +36,7 @@ optdepends=(
|
||||||
source=("https://dl.discordapp.net/apps/linux/${pkgver}/${_pkgname}-${pkgver}.tar.gz"
|
source=("https://dl.discordapp.net/apps/linux/${pkgver}/${_pkgname}-${pkgver}.tar.gz"
|
||||||
'discord-launcher.sh')
|
'discord-launcher.sh')
|
||||||
sha512sums=('9f18aea5d82f5db4efa9db9babbc440b24e47dc80df18df5cc58d99d677f1c0863df21ed96d69896785f8fbe0dc0ff1f7317398b8f39606289da79f5a38074f1'
|
sha512sums=('9f18aea5d82f5db4efa9db9babbc440b24e47dc80df18df5cc58d99d677f1c0863df21ed96d69896785f8fbe0dc0ff1f7317398b8f39606289da79f5a38074f1'
|
||||||
'e68467468e9ebfe7aae873442998bda03212598a87d9af1b9ac976fdbafc81eb376e7770dccca6eb943d579f39717a0473fa4f0a46a0c3e436460688827a2dc7')
|
'723250b70c7f5367701675c6581e9eac2143263910c4ffc35957a6ab858492c5febe89ea0d46fce19ac1416c23d9ca3953e48b9db5aa174b4a401fb6efa5daf5')
|
||||||
|
|
||||||
_krisp_b2sum='310e3d5ad2311ceace91d20004a677c1a1e49fa1cd5c0458ee5bdb31c01c49df68cac625e66dadcaddf90c67568cde22c2cec3c0b6bca8385225141a8d8d53c1'
|
_krisp_b2sum='310e3d5ad2311ceace91d20004a677c1a1e49fa1cd5c0458ee5bdb31c01c49df68cac625e66dadcaddf90c67568cde22c2cec3c0b6bca8385225141a8d8d53c1'
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
post_upgrade() {
|
post_upgrade() {
|
||||||
# return if old package version is greater than or equal to 0.0.39-1...
|
|
||||||
(( $(vercmp $2 '0.0.39-2') >= 0 )) && return
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
==> In order to patch Krisp noise suppression support set 'PATCH_KRISP=true'
|
|
||||||
in '~/.config/discord.conf' in addition to having 'rizin' installed.
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# return if old package version is greater than or equal to 0.0.27-5...
|
# return if old package version is greater than or equal to 0.0.27-5...
|
||||||
(( $(vercmp $2 '0.0.27-5') >= 0 )) && return
|
(( $(vercmp $2 '0.0.27-5') >= 0 )) && return
|
||||||
|
|
||||||
|
@ -26,10 +18,9 @@ EOF
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
==> For Krisp noise suppression support consider installing 'rizin' and
|
==> For Krisp noise suppression support consider installing 'rizin'. Restart
|
||||||
setting 'PATCH_KRISP=true' in '~/.config/discord.conf'. Restart your
|
your Discord client after installation or update to apply the patch.
|
||||||
Discord client afterwards to apply the patch.
|
==> In case of performance problems consider adding or uncommenting Electron
|
||||||
==> In case of performance problems consider setting additional flags
|
flags in '~/.config/discord-flags.conf'.
|
||||||
in '~/.config/discord-flags.conf'.
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,26 +5,29 @@ set -euo pipefail
|
||||||
declare -a flags
|
declare -a flags
|
||||||
|
|
||||||
|
|
||||||
[[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@.conf" ]] && source "${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@.conf"
|
|
||||||
|
|
||||||
flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@-flags.conf"
|
flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@-flags.conf"
|
||||||
krisp_bin="${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@/@PKGVER@/modules/@PKGNAME@_krisp/@PKGNAME@_krisp.node"
|
krisp_bin="${XDG_CONFIG_HOME:-$HOME/.config}/@PKGNAME@/@PKGVER@/modules/@PKGNAME@_krisp/@PKGNAME@_krisp.node"
|
||||||
krisp_b2=@KRISPB2@
|
krisp_b2=@KRISPB2@
|
||||||
|
|
||||||
if hash rizin &> /dev/null && [[ "${PATCH_KRISP}" == true ]]; then
|
if hash rizin &> /dev/null; then
|
||||||
# Patch Krisp binary to ignore signature check
|
# Patch Krisp binary to ignore signature check
|
||||||
if [[ -w "${krisp_bin}" && $(b2sum "${krisp_bin}" | head -c 128) == $krisp_b2 ]]; then
|
if [[ -f "${krisp_bin}" && $(b2sum "${krisp_bin}" | head -c 128) == $krisp_b2 ]]; then
|
||||||
addr=$(rz-find -x '4881ec00010000' "${krisp_bin}" | head -n1)
|
addr=$(rz-find -x '4881ec00010000' "${krisp_bin}" | head -n1)
|
||||||
rizin -q -w -c "s $addr + 0x30 ; wao nop" "${krisp_bin}" &> /dev/null
|
rizin -q -w -c "s $addr + 0x30 ; wao nop" "${krisp_bin}" &> /dev/null
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -w "${flags_file}" ]]; then
|
if [[ -f "${flags_file}" ]]; then
|
||||||
# Replacing because old flag does not work
|
|
||||||
if grep -q '\--ignore-gpu-blacklist' "${flags_file}"; then
|
if grep -q '\--ignore-gpu-blacklist' "${flags_file}"; then
|
||||||
sed -i "s|--ignore-gpu-blacklist|--ignore-gpu-blocklist|" "${flags_file}"
|
sed -i "s|--ignore-gpu-blacklist|--ignore-gpu-blocklist|" "${flags_file}"
|
||||||
fi
|
fi
|
||||||
mapfile -t < "${flags_file}"
|
mapfile -t < "${flags_file}"
|
||||||
|
else
|
||||||
|
cat > "${flags_file}" <<EOF
|
||||||
|
#--ignore-gpu-blocklist
|
||||||
|
#--enable-gpu-rasterization
|
||||||
|
#--enable-zero-copy
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for line in "${MAPFILE[@]}"; do
|
for line in "${MAPFILE[@]}"; do
|
||||||
|
|
Loading…
Reference in a new issue