Skip to content

Commit 0ffdff6

Browse files
committed
[linux] Fix Manager crash when running on Wayland
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
1 parent c9237c2 commit 0ffdff6

10 files changed

Lines changed: 194 additions & 22 deletions

File tree

.github/workflows/debrepo/package_depends.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ function exit_usage() {
2626
exit 1
2727
}
2828

29-
case "$1_$2" in
30-
"focal_linux_client" | "jammy_linux_client" | "noble_linux_client" | "resolute_linux_client" | "buster_linux_client" | "bullseye_linux_client" | "bookworm_linux_client" | "trixie_linux_client")
29+
case "$2" in
30+
"client")
3131
echo "libc6,libxss1 (>= 1.2.3),ca-certificates,libatomic1"
3232
;;
33+
"manager")
34+
echo "libc6,libnotify4,libx11-6,xkb-data"
35+
;;
3336
*) echo "libc6"
3437
;;
3538

.github/workflows/linux-package.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ env:
4040
HOMEPAGE: https://boinc.berkeley.edu/
4141
DESCRIPTION: BOINC lets you help cutting-edge science research using your computer. The BOINC app, running on your computer, downloads scientific computing jobs and runs them invisibly in the background. It's easy and safe.
4242
BASEREPO: https://boinc.berkeley.edu/dl/linux # no trailing slash
43-
AUTOCONF_WITH_VERSION: autoconf-2.70
43+
AUTOCONF_WITH_VERSION: autoconf-2.73
44+
BISON_WITH_VERSION: bison-3.8.2
4445

4546
jobs:
4647
prepare-binaries:
@@ -65,8 +66,10 @@ jobs:
6566
- name: Cache dependencies
6667
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae
6768
with:
68-
path: ${{ env.AUTOCONF_WITH_VERSION }}.tar.gz
69-
key: ${{ env.AUTOCONF_WITH_VERSION }}.tar.gz
69+
path: |
70+
${{ env.AUTOCONF_WITH_VERSION }}.tar.gz
71+
${{ env.BISON_WITH_VERSION }}.tar.gz
72+
key: ${{ env.AUTOCONF_WITH_VERSION }}_${{ env.BISON_WITH_VERSION }}
7073

7174
- name: Check if build is running from origin repo
7275
if: ${{ success() && env.AWS_ACCESS_KEY_ID != 0 && env.AWS_SECRET_ACCESS_KEY != 0 }}
@@ -111,6 +114,19 @@ jobs:
111114
cd ..
112115
autoconf --version
113116
117+
- name: Install updated version of bison
118+
run: |
119+
if [ ! -f ${{ env.BISON_WITH_VERSION }}.tar.gz ]; then
120+
curl https://ftp.gnu.org/gnu/bison/${{ env.BISON_WITH_VERSION }}.tar.gz -o ${{ env.BISON_WITH_VERSION }}.tar.gz
121+
fi
122+
tar -xzf ${{ env.BISON_WITH_VERSION }}.tar.gz
123+
cd ${{ env.BISON_WITH_VERSION }}
124+
./configure --prefix=/usr
125+
make -j $(nproc --all)
126+
make install
127+
cd ..
128+
bison --version
129+
114130
- name: Install aws cli tool
115131
run: |
116132
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
@@ -238,7 +254,7 @@ jobs:
238254
run: |
239255
# Derive the package dependencies for the selected package / os / release combination selected
240256
cd ${{ github.workspace }}/.github/workflows/debrepo/
241-
PKG_DEPS=$(bash package_depends.sh ${{ matrix.os }} linux_${{ matrix.type }})
257+
PKG_DEPS=$(bash package_depends.sh ${{ matrix.os }} ${{ matrix.type }})
242258
echo "Dependencies: ${PKG_DEPS}"
243259
244260
# Produce the package DEB definition
@@ -389,7 +405,7 @@ jobs:
389405
if: ${{ success() && matrix.type == 'client' }}
390406
run: |
391407
# Derive the package dependencies for the selected package / os / release combination selected
392-
PKG_DEPS=$(bash .github/workflows/rpmrepo/package_depends.sh ${{ matrix.os }} linux_${{ matrix.type }})
408+
PKG_DEPS=$(bash .github/workflows/rpmrepo/package_depends.sh ${{ matrix.os }} ${{ matrix.type }})
393409
PKG_FILELIST=$(bash .github/workflows/rpmrepo/package_filelist.sh ${{ matrix.os }} linux_${{ matrix.type }})
394410
BOINCUSER=boinc
395411
BOINCGROUP=boinc
@@ -590,7 +606,7 @@ jobs:
590606
if: ${{ success() && matrix.type == 'manager' }}
591607
run: |
592608
# Derive the package dependencies for the selected package / os / release combination selected
593-
PKG_DEPS=$(bash .github/workflows/rpmrepo/package_depends.sh ${{ matrix.os }} linux_${{ matrix.type }})
609+
PKG_DEPS=$(bash .github/workflows/rpmrepo/package_depends.sh ${{ matrix.os }} ${{ matrix.type }})
594610
PKG_FILELIST=$(bash .github/workflows/rpmrepo/package_filelist.sh ${{ matrix.os }} linux_${{ matrix.type }})
595611
596612
cd rpmbuild
@@ -755,8 +771,8 @@ jobs:
755771
if: success()
756772
run: |
757773
apt update
758-
apt install -y $(find ./ -type f -name "boinc-client*.deb" -printf "%p\n")
759-
apt install -y $(find ./ -type f -name "boinc-manager*.deb" -printf "%p\n")
774+
DEBIAN_FRONTEND=noninteractive apt install -y $(find ./ -type f -name "boinc-client*.deb" -printf "%p\n")
775+
DEBIAN_FRONTEND=noninteractive apt install -y $(find ./ -type f -name "boinc-manager*.deb" -printf "%p\n")
760776
761777
- name: Run integration tests
762778
if: success()
@@ -851,8 +867,8 @@ jobs:
851867
if: success()
852868
run: |
853869
apt update
854-
apt install -y $(find ./ -type f -name "boinc-client*.deb" -printf "%p\n")
855-
apt install -y $(find ./ -type f -name "boinc-manager*.deb" -printf "%p\n")
870+
DEBIAN_FRONTEND=noninteractive apt install -y $(find ./ -type f -name "boinc-client*.deb" -printf "%p\n")
871+
DEBIAN_FRONTEND=noninteractive apt install -y $(find ./ -type f -name "boinc-manager*.deb" -printf "%p\n")
856872
857873
- name: Run integration tests
858874
if: success()

.github/workflows/rpmrepo/package_depends.sh

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,35 @@ function exit_usage() {
2323
exit 1
2424
}
2525

26-
case "$1_$2" in
26+
case "$1" in
2727
# fedora distros
28-
"fc37_linux_client" | "fc38_linux_client" | "fc39_linux_client" | "fc40_linux_client" | "fc41_linux_client" | "fc42_linux_client" | "fc43_linux_client" | "fc44_linux_client")
29-
echo "glibc,libXScrnSaver >= 1.2.3,ca-certificates,libatomic"
28+
"fc37" | "fc38" | "fc39" | "fc40" | "fc41" | "fc42" | "fc43" | "fc44")
29+
case "$2" in
30+
"client")
31+
echo "glibc,libXScrnSaver >= 1.2.3,ca-certificates,libatomic"
32+
;;
33+
"manager")
34+
echo "glibc,libnotify,libX11,xkeyboard-config"
35+
;;
36+
*) echo "glibc"
37+
;;
38+
esac
3039
;;
3140
# opensuse distros
32-
"suse15_4_linux_client" | "suse15_5_linux_client" | "suse15_6_linux_client" | "suse16_0_linux_client")
33-
echo "glibc,libXss1 >= 1.2.2,ca-certificates,libatomic1"
41+
"suse15_4" | "suse15_5" | "suse15_6" | "suse16_0")
42+
case "$2" in
43+
"client")
44+
echo "glibc,libXss1 >= 1.2.2,ca-certificates,libatomic1"
45+
;;
46+
"manager")
47+
echo "glibc,libnotify4,libX11-6,xkeyboard-config"
48+
;;
49+
*) echo "glibc"
50+
;;
51+
esac
3452
;;
35-
3653
*) echo "glibc"
3754
;;
38-
3955
esac
4056

4157
exit 0
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/tools/how-to-type.c b/tools/how-to-type.c
2+
index 72aea1b..783373a 100644
3+
--- a/tools/how-to-type.c
4+
+++ b/tools/how-to-type.c
5+
@@ -26,7 +26,9 @@
6+
#include <getopt.h>
7+
#include <stdbool.h>
8+
#include <stdlib.h>
9+
+#ifdef HAVE_UNISTD_H
10+
#include <unistd.h>
11+
+#endif
12+
#include <errno.h>
13+
14+
#include "xkbcommon/xkbcommon.h"
15+
diff --git a/tools/tools-common.c b/tools/tools-common.c
16+
index 8eb3f4b..8b22307 100644
17+
--- a/tools/tools-common.c
18+
+++ b/tools/tools-common.c
19+
@@ -42,6 +42,7 @@
20+
#ifdef _WIN32
21+
#include <io.h>
22+
#include <windows.h>
23+
+#include <process.h>
24+
#else
25+
#include <unistd.h>
26+
#include <termios.h>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
diff --git a/meson.build b/meson.build
2+
index 92483c54..26230102 100644
3+
--- a/meson.build
4+
+++ b/meson.build
5+
@@ -853,6 +853,7 @@ configure_file(input: 'test/xkeyboard-config-test.py.in',
6+
configuration: xkct_config)
7+
8+
# Tests
9+
+if false
10+
test_env = environment()
11+
test_env.set('XKB_LOG_LEVEL', 'debug')
12+
test_env.set('XKB_LOG_VERBOSITY', '10')
13+
@@ -1372,6 +1373,7 @@ if get_option('enable-x11')
14+
env: bench_env,
15+
)
16+
endif
17+
+endif
18+
19+
20+
# Documentation.
21+
@@ -1505,7 +1507,9 @@ if meson.version().version_compare('>=0.62.0')
22+
'rules': get_option('default-rules'),
23+
'variant': get_option('default-variant'),
24+
}, section: 'Defaults')
25+
+if false
26+
summary({
27+
'merge-modes': has_merge_modes_tests,
28+
}, section: 'Tests')
29+
endif
30+
+endif
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS)
2+
message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet!")
3+
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
4+
else()
5+
6+
set(PATCHES "")
7+
if(VCPKG_TARGET_IS_WINDOWS)
8+
#vcpkg_check_linkage(ONLY_STATIC_LIBRARY) # Meson is not able to automatically export symbols for DLLs
9+
set(PATCHES build.patch)
10+
endif()
11+
12+
vcpkg_from_github(
13+
OUT_SOURCE_PATH SOURCE_PATH
14+
REPO xkbcommon/libxkbcommon
15+
REF "xkbcommon-${VERSION}"
16+
SHA512 450c33fe26af6b847cf7516685d0df63c2ba0126887e27595c40fe80e4d0487009aa6cdf38ff1270d595c7900cbf3c11e7aa4f9cff80fa361742b5ebb10d83bd
17+
HEAD_REF master
18+
PATCHES
19+
disable-test.patch
20+
${PATCHES}
21+
)
22+
23+
vcpkg_find_acquire_program(FLEX)
24+
get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY )
25+
vcpkg_add_to_path(PREPEND "${FLEX_DIR}")
26+
27+
vcpkg_find_acquire_program(BISON)
28+
get_filename_component(BISON_DIR "${BISON}" DIRECTORY )
29+
vcpkg_add_to_path(PREPEND "${BISON_DIR}")
30+
31+
set(OPTIONS "")
32+
if(VCPKG_TARGET_IS_WINDOWS)
33+
list(APPEND OPTIONS -Denable-xkbregistry=false)
34+
endif()
35+
if(VCPKG_TARGET_IS_LINUX)
36+
list(APPEND OPTIONS -Dxkb-config-root=/usr/share/X11/xkb)
37+
list(APPEND OPTIONS -Dx-locale-root=/usr/share/X11/locale)
38+
endif()
39+
40+
vcpkg_configure_meson(
41+
SOURCE_PATH "${SOURCE_PATH}"
42+
OPTIONS ${OPTIONS}
43+
-Denable-wayland=false
44+
-Denable-docs=false
45+
-Denable-tools=false
46+
)
47+
vcpkg_install_meson()
48+
vcpkg_fixup_pkgconfig()
49+
vcpkg_copy_pdbs()
50+
51+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
52+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
53+
54+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
55+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
56+
endif()
57+
58+
# Handle copyright
59+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
60+
endif()
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "libxkbcommon",
3+
"version": "1.13.1",
4+
"description": "keymap handling library for toolkits and window systems",
5+
"homepage": "https://xkbcommon.org/",
6+
"license": null,
7+
"dependencies": [
8+
"getopt",
9+
"libx11",
10+
{
11+
"name": "vcpkg-tool-meson",
12+
"host": true
13+
},
14+
{
15+
"name": "wayland",
16+
"platform": "linux"
17+
},
18+
"xcb",
19+
"xcb-render-util"
20+
]
21+
}

win_build/boinc_cli.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<PreprocessorDefinitions>_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
1818
</ClCompile>
1919
<Link>
20-
<AdditionalDependencies>libcrypto.lib;libssl.lib;wsock32.lib;winhttp.lib;winmm.lib;sensapi.lib;userenv.lib;shell32.lib;secur32.lib;wtsapi32.lib;Ws2_32.Lib;Crypt32.Lib;Wldap32.Lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
20+
<AdditionalDependencies>libcrypto.lib;libssl.lib;wsock32.lib;winhttp.lib;winmm.lib;sensapi.lib;userenv.lib;shell32.lib;secur32.lib;wtsapi32.lib;Ws2_32.Lib;Crypt32.Lib;Wldap32.Lib;Iphlpapi.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
2121
<AdditionalDependencies Condition="'$(Platform)'=='x64'">nvapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
2222
<AdditionalDependencies Condition="'$(Configuration)'=='Debug'">zsd.lib;libcurl-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
2323
<AdditionalDependencies Condition="'$(Configuration)'=='Release'">zs.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>

win_build/crypt_prog.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<PreprocessorDefinitions>_CONSOLE;_USE_CURL;USE_SSL;USE_SSLEAY;USE_OPENSSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
1717
</ClCompile>
1818
<Link>
19-
<AdditionalDependencies>libcrypto.lib;libssl.lib;wsock32.lib;wininet.lib;winmm.lib;libboinc.lib;Crypt32.Lib;%(AdditionalDependencies)</AdditionalDependencies>
19+
<AdditionalDependencies>libcrypto.lib;libssl.lib;wsock32.lib;wininet.lib;winmm.lib;libboinc.lib;Crypt32.Lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
2020
<AdditionalDependencies Condition="'$(Configuration)'=='Debug'">libcurl-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
2121
<AdditionalDependencies Condition="'$(Configuration)'=='Release'">libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
2222
<SubSystem>Console</SubSystem>

win_build/sim.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<PreprocessorDefinitions>_CONSOLE;SIM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
1818
</ClCompile>
1919
<Link>
20-
<AdditionalDependencies>wsock32.lib;wininet.lib;winmm.lib;oldnames.lib;libcrypto.lib;libssl.lib;Ws2_32.Lib;Crypt32.Lib;Wldap32.Lib;Iphlpapi.lib;Secur32.lib;%(AdditionalDependencies)</AdditionalDependencies>
20+
<AdditionalDependencies>wsock32.lib;wininet.lib;winmm.lib;oldnames.lib;libcrypto.lib;libssl.lib;Ws2_32.Lib;Crypt32.Lib;Wldap32.Lib;Iphlpapi.lib;Secur32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
2121
<AdditionalDependencies Condition="'$(Configuration)'=='Debug'">zsd.lib;libcurl-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
2222
<AdditionalDependencies Condition="'$(Configuration)'=='Release'">zs.lib;libcurl.lib;%(AdditionalDependencies)</AdditionalDependencies>
2323
<SubSystem>Console</SubSystem>

0 commit comments

Comments
 (0)