Date: Sunday, February 12, 2023 @ 19:46:33
  Author: ainola
Revision: 1400140

archrelease: copy trunk to community-testing-x86_64

Added:
  sway/repos/community-testing-x86_64/
  sway/repos/community-testing-x86_64/50-systemd-user.conf
    (from rev 1400139, sway/trunk/50-systemd-user.conf)
  sway/repos/community-testing-x86_64/PKGBUILD
    (from rev 1400139, sway/trunk/PKGBUILD)
  sway/repos/community-testing-x86_64/keys/
  sway/repos/community-testing-x86_64/sway.install
    (from rev 1400139, sway/trunk/sway.install)
  sway/repos/community-testing-x86_64/sys_nice_user_xkb_configs.patch
    (from rev 1400139, sway/trunk/sys_nice_user_xkb_configs.patch)

---------------------------------+
 50-systemd-user.conf            |    7 ++
 PKGBUILD                        |   91 ++++++++++++++++++++++++++++++++++++++
 sway.install                    |   23 +++++++++
 sys_nice_user_xkb_configs.patch |   27 +++++++++++
 4 files changed, 148 insertions(+)

Copied: sway/repos/community-testing-x86_64/50-systemd-user.conf (from rev 
1400139, sway/trunk/50-systemd-user.conf)
===================================================================
--- community-testing-x86_64/50-systemd-user.conf                               
(rev 0)
+++ community-testing-x86_64/50-systemd-user.conf       2023-02-12 19:46:33 UTC 
(rev 1400140)
@@ -0,0 +1,7 @@
+# sway does not set DISPLAY/WAYLAND_DISPLAY in the systemd user environment
+# See FS#63021
+# Adapted from xorg's 50-systemd-user.sh, which achieves a similar goal.
+
+exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK 
XDG_CURRENT_DESKTOP
+exec hash dbus-update-activation-environment 2>/dev/null && \
+     dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY 
SWAYSOCK XDG_CURRENT_DESKTOP

Copied: sway/repos/community-testing-x86_64/PKGBUILD (from rev 1400139, 
sway/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD                           (rev 0)
+++ community-testing-x86_64/PKGBUILD   2023-02-12 19:46:33 UTC (rev 1400140)
@@ -0,0 +1,91 @@
+# Maintainer: Brett Cornwall <[email protected]>
+# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
+# Contributor: Alexander F. Rødseth <[email protected]>
+
+pkgname=sway
+pkgver=1.8.1
+epoch=1
+pkgrel=1
+pkgdesc='Tiling Wayland compositor and replacement for the i3 window manager'
+arch=(x86_64)
+url='https://swaywm.org/'
+license=(MIT)
+depends=(
+  'cairo'
+  'gdk-pixbuf2'
+  'libevdev.so'
+  'libinput'
+  'libjson-c.so'
+  'libudev.so'
+  'libwayland-server.so'
+  'libwlroots.so'
+  'libxcb'
+  'libxkbcommon.so'
+  'pango'
+  'pcre2'
+  'ttf-font'
+)
+makedepends=(meson ninja scdoc setconf wayland-protocols)
+backup=(
+  etc/sway/config
+  etc/sway/config.d/50-systemd-user.conf
+)
+optdepends=(
+  'bemenu: Wayland-native alternative to dmenu'
+  'dmenu: Application launcher used in default config'
+  'foot: Terminal emulator used in the default configuration'
+  'i3status: Status line generation'
+  'mako: Lightweight notification daemon'
+  'polkit: System privilege control. Required if not using seatd service'
+  'swaybg: Wallpaper tool for sway'
+  'swayidle: Idle management daemon'
+  'swaylock: Screen locker'
+  'waybar: Highly customizable bar'
+  'xorg-xwayland: X11 support'
+)
+source=("https://github.com/swaywm/sway/releases/download/$pkgver/sway-$pkgver.tar.gz";
+        
"https://github.com/swaywm/sway/releases/download/$pkgver/sway-$pkgver.tar.gz.sig";
+        "50-systemd-user.conf"
+        "sys_nice_user_xkb_configs.patch")
+install=sway.install
+sha512sums=('1504312a199608532e22336c5031e8f4749f5102ab321d13d97a1f93d49c8ec435e9097af729d8f7dfa81e2e96cee7de91cf4c04b6a7b7151ea740a1e43eb086'
+            'SKIP'
+            
'c2b7d808f4231f318e03789015624fd4cf32b81434b15406570b4e144c0defc54e216d881447e6fd9fc18d7da608cccb61c32e0e1fab2f1fe2750acf812d3137'
+            
'156719e93d0213d1b54ce6e3a9b2dcc9246da5689dd2d3281546f9c042cbc69072f99b087e112fe777dcd786d2b9d1be1e1c9200feddffb5e2d16f8dfb27515d')
+validpgpkeys=('34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48'  # Simon Ser
+              '9DDA3B9FA5D58DD5392C78E652CB6609B22DA89A') # Drew DeVault
+
+prepare() {
+  cd "$pkgname-$pkgver"
+
+  # Enable user xkb configs with cap_sys_nice - otherwise user xkb configs will
+  # break.
+  #
+  # This patch was originally at
+  # 
https://github.com/swaywm/sway/commit/2f2cdd60def006f6d3cbe318f9edd7d68fcb239a.patch
+  # but failed to apply correctly to meson.build. We don't need that part of
+  # the patch so just drop it.
+  patch -p1 < ../sys_nice_user_xkb_configs.patch
+
+  # Set the version information to 'Arch Linux' instead of 'makepkg'
+  sed -i "s/branch \\\'@1@\\\'/Arch Linux/g" meson.build
+}
+
+build() {
+  mkdir -p build
+  arch-meson build "$pkgname-$pkgver" -D sd-bus-provider=libsystemd -D 
werror=false -D b_ndebug=true
+  ninja -C build
+}
+
+package() {
+  DESTDIR="$pkgdir" ninja -C build install
+  install -Dm644 "$pkgname-$pkgver/LICENSE" 
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -Dm644 50-systemd-user.conf -t "$pkgdir/etc/sway/config.d/"
+
+  for util in autoname-workspaces.py inactive-windows-transparency.py 
grimshot; do
+    install -Dm755 "$pkgname-$pkgver/contrib/$util" -t \
+                   "$pkgdir/usr/share/$pkgname/scripts"
+  done
+}
+
+# vim: ts=2 sw=2 et

Copied: sway/repos/community-testing-x86_64/sway.install (from rev 1400139, 
sway/trunk/sway.install)
===================================================================
--- community-testing-x86_64/sway.install                               (rev 0)
+++ community-testing-x86_64/sway.install       2023-02-12 19:46:33 UTC (rev 
1400140)
@@ -0,0 +1,23 @@
+post_install() {
+cat << EOD
+Sway requires additional setup for privilege escalation. Without this setup,
+sway will fail to start with session activation permission failures. Choose one
+of the two available options (In alphabetical, not recommended, order):
+
+1. polkit: This will make sway "just work" right after installation but may be
+           a weightier solution than desired.
+
+2. seatd: Already required as a sway dependency, this is a lighter-weight
+          solution but requires some user configuration: Enabling the service,
+          adding your user to the "seat" group, then logging out/in again.
+
+Either option should provide the same functionality/stability. Refer to the
+Sway wiki page for information.
+EOD
+
+    setcap cap_sys_nice+ep usr/bin/sway
+}
+
+post_upgrade() {
+    setcap cap_sys_nice+ep usr/bin/sway
+}

Copied: sway/repos/community-testing-x86_64/sys_nice_user_xkb_configs.patch 
(from rev 1400139, sway/trunk/sys_nice_user_xkb_configs.patch)
===================================================================
--- community-testing-x86_64/sys_nice_user_xkb_configs.patch                    
        (rev 0)
+++ community-testing-x86_64/sys_nice_user_xkb_configs.patch    2023-02-12 
19:46:33 UTC (rev 1400140)
@@ -0,0 +1,27 @@
+diff --git a/sway/config.c b/sway/config.c
+index 1f2bb68604..f5efa98a8e 100644
+--- a/sway/config.c
++++ b/sway/config.c
+@@ -37,7 +37,7 @@ struct sway_config *config = NULL;
+ 
+ static struct xkb_state *keysym_translation_state_create(
+               struct xkb_rule_names rules) {
+-      struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
++      struct xkb_context *context = 
xkb_context_new(XKB_CONTEXT_NO_SECURE_GETENV);
+       struct xkb_keymap *xkb_keymap = xkb_keymap_new_from_names(
+               context,
+               &rules,
+diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
+index 3f4a7289b9..45a588ecbf 100644
+--- a/sway/input/keyboard.c
++++ b/sway/input/keyboard.c
+@@ -754,7 +754,7 @@ static void handle_xkb_context_log(struct xkb_context 
*context,
+ 
+ struct xkb_keymap *sway_keyboard_compile_keymap(struct input_config *ic,
+               char **error) {
+-      struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
++      struct xkb_context *context = 
xkb_context_new(XKB_CONTEXT_NO_SECURE_GETENV);
+       if (!sway_assert(context, "cannot create XKB context")) {
+               return NULL;
+       }
+

Reply via email to