summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYidaozhan Ya2023-08-27 07:46:33 +0800
committerYidaozhan Ya2023-08-27 07:46:33 +0800
commit728f858782567d4d65eefa5ee1d5eb2f40de48e8 (patch)
treedbf2e812bcaafeedc30919aee4662925917ed0ad
parent89e771dd2f04c5dbb2616404d9b59d1ff26f2ca1 (diff)
downloadaur-728f858782567d4d65eefa5ee1d5eb2f40de48e8.tar.gz
[fix] 修复 systemd-homed 兼容问题; 在没有时区时报错
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD20
-rwxr-xr-xstart.sh27
3 files changed, 41 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 496d34d461eb..5cb704ffede8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = linuxqq-nt-bwrap
pkgdesc = New Linux QQ based on Electron, with bubblewrap sandbox and some tweaks
pkgver = 3.1.2_13107
- pkgrel = 5
+ pkgrel = 6
url = https://im.qq.com/linuxqq/index.shtml
install = linuxqq-nt-bwrap.install
arch = x86_64
@@ -33,15 +33,15 @@ pkgbase = linuxqq-nt-bwrap
source = start.sh
source = config.json
source = xdg-open.sh
- sha256sums = 4e1514ae8a666732c21f7f89455141f67e3a6f8290b0f97ea503c39f2c419f0e
+ sha256sums = 755895c2d45c8de793bdf4467c7e4dd3fc8f181dfb1eb2ccf9eed841ff8e0184
sha256sums = 182e3cc60e9c7f4643043c398f42b7d021bce4e79490e043de195056aa851481
sha256sums = 78a573867355fb4c3e728d0c8ac0746d47fa7d64f90ee2b62ee9f0ccae095edb
source_x86_64 = https://dldir1.qq.com/qqfile/qq/QQNT/2355235c/linuxqq_3.1.1-11223_amd64.deb
- source_x86_64 = 3.1.2-13107-x86_64.zip.zip::https://qqpatch.gtimg.cn/hotUpdate_new/release/linux-x64/3.1.2-13107/c893f6be/3.1.2-13107.zip.zip
+ source_x86_64 = https://qqpatch.gtimg.cn/hotUpdate_new/release/linux-x64/3.1.2-13107/c893f6be/3.1.2-13107.zip.zip
sha256sums_x86_64 = 4c1810ef357e8ee077292808217bafc67626be79ccff5ff05341248a8a48aaf6
sha256sums_x86_64 = 7a1d235b714864b0b62e39f10adbd4bd3b890017168a39e9c97a346931901b35
source_aarch64 = https://dldir1.qq.com/qqfile/qq/QQNT/2355235c/linuxqq_3.1.1-11223_arm64.deb
- source_aarch64 = 3.1.2-13107-aarch64.zip.zip::https://qqpatch.gtimg.cn/hotUpdate_new/release/linux-arm64/3.1.2-13107/c893f6be/3.1.2-13107.zip.zip
+ source_aarch64 = https://qqpatch.gtimg.cn/hotUpdate_new/release/linux-arm64/3.1.2-13107/c893f6be/3.1.2-13107.zip.zip
sha256sums_aarch64 = d5b6bf200ffe5ffb3b8d4b48861dceb011d4ecc3e0806ac04ac04fc7c7ae041b
sha256sums_aarch64 = 49a356b051b1fae89f132475128447f184f2385384773114ae9392f19200d7da
diff --git a/PKGBUILD b/PKGBUILD
index acaffa978b75..c79c39575996 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@ _update_pkgver_hash=c893f6be
pkgname=linuxqq-nt-bwrap
pkgver="${_update_pkgver}"
-pkgrel=5
+pkgrel=6
pkgdesc="New Linux QQ based on Electron, with bubblewrap sandbox and some tweaks"
arch=('x86_64' 'aarch64') # 龙架构版本停留在 3.1.0 未更新,故不纳入此包中
url='https://im.qq.com/linuxqq/index.shtml'
@@ -27,17 +27,17 @@ conflicts=('linuxqq')
options=('!emptydirs')
install="${pkgname}.install"
source_x86_64=("https://dldir1.qq.com/qqfile/qq/QQNT/${_base_pkgver_hash}/linuxqq_${_base_pkgver//_/-}_amd64.deb" # 底包
- "${pkgver//_/-}-x86_64.zip.zip::https://qqpatch.gtimg.cn/hotUpdate_new/release/linux-x64/${pkgver//_/-}/${_update_pkgver_hash}/${pkgver//_/-}.zip.zip" ) # 热更新补丁
+ "https://qqpatch.gtimg.cn/hotUpdate_new/release/linux-x64/${pkgver//_/-}/${_update_pkgver_hash}/${pkgver//_/-}.zip.zip" ) # 热更新补丁
source_aarch64=("https://dldir1.qq.com/qqfile/qq/QQNT/${_base_pkgver_hash}/linuxqq_${_base_pkgver//_/-}_arm64.deb" # 底包
- "${pkgver//_/-}-aarch64.zip.zip::https://qqpatch.gtimg.cn/hotUpdate_new/release/linux-arm64/${pkgver//_/-}/${_update_pkgver_hash}/${pkgver//_/-}.zip.zip" ) # 热更新补丁
+ "https://qqpatch.gtimg.cn/hotUpdate_new/release/linux-arm64/${pkgver//_/-}/${_update_pkgver_hash}/${pkgver//_/-}.zip.zip" ) # 热更新补丁
source=('start.sh' 'config.json' 'xdg-open.sh')
-sha256sums=('4e1514ae8a666732c21f7f89455141f67e3a6f8290b0f97ea503c39f2c419f0e'
- '182e3cc60e9c7f4643043c398f42b7d021bce4e79490e043de195056aa851481'
- '78a573867355fb4c3e728d0c8ac0746d47fa7d64f90ee2b62ee9f0ccae095edb')
-sha256sums_x86_64=('4c1810ef357e8ee077292808217bafc67626be79ccff5ff05341248a8a48aaf6'
- '7a1d235b714864b0b62e39f10adbd4bd3b890017168a39e9c97a346931901b35')
-sha256sums_aarch64=('d5b6bf200ffe5ffb3b8d4b48861dceb011d4ecc3e0806ac04ac04fc7c7ae041b'
- '49a356b051b1fae89f132475128447f184f2385384773114ae9392f19200d7da')
+sha256sums=('755895c2d45c8de793bdf4467c7e4dd3fc8f181dfb1eb2ccf9eed841ff8e0184' # start.sh
+ '182e3cc60e9c7f4643043c398f42b7d021bce4e79490e043de195056aa851481' # config.json
+ '78a573867355fb4c3e728d0c8ac0746d47fa7d64f90ee2b62ee9f0ccae095edb') # xdg-open.sh
+sha256sums_x86_64=('4c1810ef357e8ee077292808217bafc67626be79ccff5ff05341248a8a48aaf6' # 底包
+ '7a1d235b714864b0b62e39f10adbd4bd3b890017168a39e9c97a346931901b35') # 热更新补丁
+sha256sums_aarch64=('d5b6bf200ffe5ffb3b8d4b48861dceb011d4ecc3e0806ac04ac04fc7c7ae041b' # 底包
+ '49a356b051b1fae89f132475128447f184f2385384773114ae9392f19200d7da') # 热更新补丁
package() {
# 解压程序包
diff --git a/start.sh b/start.sh
index a11ac5c8ff9e..7423472188b2 100755
--- a/start.sh
+++ b/start.sh
@@ -1,5 +1,30 @@
#!/bin/bash
+function command_exists() {
+ local command="$1"
+ command -v "${command}" >/dev/null 2>&1
+}
+
+function show_error_dialog() {
+ title="linuxqq-nt-bwrap"
+ if command_exists kdialog; then
+ kdialog --error "$1" --title "$title" --icon qq
+ elif command_exists zenity; then
+ zenity --error --title "$title" --icon-name qq --text "$1"
+ else
+ all_off="$(tput sgr0)"
+ bold="${all_off}$(tput bold)"
+ blue="${bold}$(tput setaf 4)"
+ yellow="${bold}$(tput setaf 3)"
+ printf "${blue}==>${yellow} ${bold} $1${all_off}\n"
+ fi
+}
+
+if [ -e "/etc/localtime" ]; then
+ show_error_dialog "/etc/localtime 未找到。\n请先设置系统时区。"
+ exit 1
+fi
+
USER_RUN_DIR="/run/user/$(id -u)"
XAUTHORITY="${XAUTHORITY:-$HOME/.Xauthority}"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
@@ -79,6 +104,8 @@ bwrap --new-session --cap-drop ALL --unshare-user-try --unshare-pid --unshare-cg
--dev-bind /dev /dev \
--ro-bind /sys /sys \
--ro-bind /etc/passwd /etc/passwd \
+ --ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \
+ --ro-bind-try /run/systemd/userdb /run/systemd/userdb \
--ro-bind /etc/resolv.conf /etc/resolv.conf \
--ro-bind /etc/localtime /etc/localtime \
--proc /proc \