diff options
author | fossdd | 2024-02-08 19:36:55 +0000 |
---|---|---|
committer | fossdd | 2024-02-08 19:36:55 +0000 |
commit | a298b38d86f1715b044b190e709ce5008e1034b0 (patch) | |
tree | 7266a91720d3ef191470da2e20ab33359e1a66d1 | |
parent | f08db11124ce616d922b38020284ccb24b64f856 (diff) | |
download | aur-a298b38d86f1715b044b190e709ce5008e1034b0.tar.gz |
Initial commit for swaylock-no-password
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | do-not-validate-password.patch | 62 |
3 files changed, 109 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..63e958724d6e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = swaylock-no-password + pkgdesc = Screen locker for Wayland (without password validation) + pkgver = 1.7.2 + pkgrel = 1 + url = https://github.com/swaywm/swaylock + arch = x86_64 + license = MIT + makedepends = meson + makedepends = scdoc + makedepends = wayland-protocols + makedepends = git + depends = cairo + depends = libxkbcommon + depends = pam + depends = wayland + depends = gdk-pixbuf2 + provides = swaylock + conflicts = swaylock + backup = etc/pam.d/swaylock + source = https://github.com/swaywm/swaylock/releases/download/v1.7.2/swaylock-1.7.2.tar.gz + source = https://github.com/swaywm/swaylock/releases/download/v1.7.2/swaylock-1.7.2.tar.gz.sig + source = do-not-validate-password.patch + validpgpkeys = 9DDA3B9FA5D58DD5392C78E652CB6609B22DA89A + validpgpkeys = 34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48 + sha256sums = bf965d47fb6fc1402f854d4679d21a9459713fc0f330bc607c9585db097b4304 + sha256sums = SKIP + sha256sums = eb953413acc5d3c7f5e3078d668794b7beebfb819d267ee1dd4d3d76d52bc976 + +pkgname = swaylock-no-password @@ -1,11 +1,13 @@ -# Maintainer: Brett Cornwall <ainola@archlinux.org> +# Maintainer: fossdd <fossdd@pwned.life> +# Contributor: Brett Cornwall <ainola@archlinux.org> # Contributor: gilbus -pkgname=swaylock +pkgname=swaylock-no-password +_pkgname=swaylock pkgver=1.7.2 pkgrel=1 license=("MIT") -pkgdesc="Screen locker for Wayland" +pkgdesc="Screen locker for Wayland (without password validation)" makedepends=( 'meson' 'scdoc' @@ -19,24 +21,32 @@ depends=( 'wayland' 'gdk-pixbuf2' # For images other than PNG ) +conflicts=(swaylock) +provides=(swaylock) arch=('x86_64') url="https://github.com/swaywm/swaylock" backup=('etc/pam.d/swaylock') -source=("$url/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz"{,.sig}) +source=("$url/releases/download/v$pkgver/$_pkgname-$pkgver.tar.gz"{,.sig} + 'do-not-validate-password.patch') sha256sums=('bf965d47fb6fc1402f854d4679d21a9459713fc0f330bc607c9585db097b4304' - 'SKIP') + 'SKIP' + 'eb953413acc5d3c7f5e3078d668794b7beebfb819d267ee1dd4d3d76d52bc976') validpgpkeys=( "9DDA3B9FA5D58DD5392C78E652CB6609B22DA89A" # Drew DeVault "34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48" # Simon Ser ) +prepare() { + patch --directory="$_pkgname-$pkgver" --forward --strip=1 --input="${srcdir}/do-not-validate-password.patch" +} + build() { - arch-meson "$pkgname-$pkgver" build + arch-meson "$_pkgname-$pkgver" build ninja -C build } package() { DESTDIR="$pkgdir/" ninja -C build install - install -Dm644 "$pkgname-$pkgver/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname" - install -Dm644 "$pkgname-$pkgver/README.md" -t "$pkgdir/usr/share/doc/$pkgname" + install -Dm644 "$_pkgname-$pkgver/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname" + install -Dm644 "$_pkgname-$pkgver/README.md" -t "$pkgdir/usr/share/doc/$pkgname" } diff --git a/do-not-validate-password.patch b/do-not-validate-password.patch new file mode 100644 index 000000000000..cbe883ca67ec --- /dev/null +++ b/do-not-validate-password.patch @@ -0,0 +1,62 @@ + password.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/password.c b/password.c +index a3e7674..b8d9167 100644 +--- a/password.c ++++ b/password.c +@@ -107,6 +107,7 @@ void swaylock_handle_key(struct swaylock_state *state, + break; + case XKB_KEY_Delete: + case XKB_KEY_BackSpace: ++ if (false) { + if (backspace(&state->password)) { + state->auth_state = AUTH_STATE_BACKSPACE; + } else { +@@ -115,12 +116,15 @@ void swaylock_handle_key(struct swaylock_state *state, + damage_state(state); + schedule_indicator_clear(state); + schedule_password_clear(state); ++ } + break; + case XKB_KEY_Escape: ++ if (false) { + clear_password_buffer(&state->password); + state->auth_state = AUTH_STATE_CLEAR; + damage_state(state); + schedule_indicator_clear(state); ++ } + break; + case XKB_KEY_Caps_Lock: + case XKB_KEY_Shift_L: +@@ -133,10 +137,12 @@ void swaylock_handle_key(struct swaylock_state *state, + case XKB_KEY_Alt_R: + case XKB_KEY_Super_L: + case XKB_KEY_Super_R: ++ if (false) { + state->auth_state = AUTH_STATE_INPUT_NOP; + damage_state(state); + schedule_indicator_clear(state); + schedule_password_clear(state); ++ } + break; + case XKB_KEY_m: /* fallthrough */ + case XKB_KEY_d: +@@ -148,7 +154,7 @@ void swaylock_handle_key(struct swaylock_state *state, + // fallthrough + case XKB_KEY_c: /* fallthrough */ + case XKB_KEY_u: +- if (state->xkb.control) { ++ if (false) { + clear_password_buffer(&state->password); + state->auth_state = AUTH_STATE_CLEAR; + damage_state(state); +@@ -157,7 +163,7 @@ void swaylock_handle_key(struct swaylock_state *state, + } + // fallthrough + default: +- if (codepoint) { ++ if (false) { + append_ch(&state->password, codepoint); + state->auth_state = AUTH_STATE_INPUT; + damage_state(state); |