Added patches

This commit is contained in:
Gerben Jan Dijkman 2021-08-21 20:46:40 +02:00
parent 523ba1b8d5
commit b73d9d209c
5 changed files with 107 additions and 5 deletions

View File

@ -0,0 +1,49 @@
From e88f5dee0cbb7fa0851b43a5ded5d94256c756d2 Mon Sep 17 00:00:00 2001
From: Arnaud Ferraris <arnaud.ferraris@gmail.com>
Date: Sat, 21 Mar 2020 03:00:34 +0100
Subject: [PATCH] system-prompt: allow blank passwords
---
src/system-prompt.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/system-prompt.c b/src/system-prompt.c
index 30aa3f1..bd06ee0 100644
--- a/src/system-prompt.c
+++ b/src/system-prompt.c
@@ -256,8 +256,6 @@ phosh_system_prompt_password_async (GcrPrompt *prompt,
priv->task = g_task_new (self, NULL, callback, user_data);
g_task_set_source_tag (priv->task, phosh_system_prompt_password_async);
- if (!gtk_entry_get_text_length (GTK_ENTRY (priv->entry_password)))
- gtk_widget_set_sensitive (priv->btn_continue, FALSE);
gtk_widget_set_sensitive (priv->grid, TRUE);
obj = G_OBJECT (self);
@@ -315,7 +313,6 @@ phosh_system_prompt_confirm_async (GcrPrompt *prompt,
priv->task = g_task_new (self, NULL, callback, user_data);
g_task_set_source_tag (priv->task, phosh_system_prompt_confirm_async);
- gtk_widget_set_sensitive (priv->btn_continue, TRUE);
gtk_widget_set_sensitive (priv->grid, TRUE);
obj = G_OBJECT (self);
@@ -392,7 +389,6 @@ prompt_complete (PhoshSystemPrompt *self)
g_task_return_pointer (res, (gpointer)password, NULL);
g_object_unref (res);
- gtk_widget_set_sensitive (priv->btn_continue, FALSE);
gtk_widget_set_sensitive (priv->grid, FALSE);
return TRUE;
@@ -451,7 +447,6 @@ on_password_changed (PhoshSystemPrompt *self,
if (!gtk_entry_get_text_length (GTK_ENTRY (editable)))
return;
- gtk_widget_set_sensitive (priv->btn_continue, TRUE);
password = gtk_entry_get_text (GTK_ENTRY (editable));
/*
--
2.24.1

View File

@ -0,0 +1,14 @@
diff -Npur a/data/phosh.in b/data/phosh.in
--- a/data/phosh.in 2021-03-20 13:53:32.367786000 +0100
+++ b/data/phosh.in 2021-03-20 13:55:19.327789721 +0100
@@ -56,6 +56,10 @@ elif [ -f /etc/phosh/rootston.ini ]; th
PHOC_INI=/etc/phosh/rootston.ini
fi
+# Set proper locale according to /etc/locale.conf
+source /etc/locale.conf
+export LANG=$LANG
+
# Run gnome-session through a login shell so it picks
# variables from /etc/profile.d (XDG_*)
[ -n "$WLR_BACKENDS" ] || WLR_BACKENDS=drm,libinput

View File

@ -0,0 +1,22 @@
From: Daniel Dehennin <daniel.dehennin@baby-gnu.org>
Date: Wed, 17 Mar 2021 17:38:58 +0100
Subject: Fix locale issue in Service file
* data/phosh.service (Environment): do not override user language
setting.
---
data/phosh.service | 1 -
1 file changed, 1 deletion(-)
diff --git a/data/phosh.service b/data/phosh.service
index fa18137..a585696 100644
--- a/data/phosh.service
+++ b/data/phosh.service
@@ -25,7 +25,6 @@ Before=graphical.target
ConditionPathExists=/dev/tty0
[Service]
-Environment=LANG=C.UTF-8
Environment=XDG_CURRENT_DESKTOP=GNOME:Phosh
Environment=XDG_SESSION_DESKTOP=phosh
Environment=XDG_SESSION_TYPE=wayland

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Name=On-screen keyboard
Comment=Default on-screen keyboard
Exec=/usr/bin/phosh-osk-stub
Categories=GNOME;Core;
OnlyShowIn=GNOME;
NoDisplay=true
X-GNOME-Autostart-Phase=Panel
X-GNOME-Provides=inputmethod
X-GNOME-Autostart-Notify=true
X-GNOME-AutoRestart=true

View File

@ -32,6 +32,8 @@ DEPEND="
gnome-base/gnome-desktop gnome-base/gnome-desktop
gnome-base/gnome-session gnome-base/gnome-session
x11-themes/gnome-backgrounds x11-themes/gnome-backgrounds
gnome-base/gnome-keyring
gnome-base/gnome-shell
x11-wm/phoc x11-wm/phoc
systemd? ( sys-apps/systemd ) systemd? ( sys-apps/systemd )
sys-power/upower sys-power/upower
@ -42,6 +44,12 @@ BDEPEND="
dev-util/meson dev-util/meson
" "
PATCHES=(
${FILESDIR}/0001-system-prompt-allow-blank-passwords.patch
${FILESDIR}/0002-fix-locale-issue.patch
${FILESDIR}/0003-fix-locale-issue-in-service-file-1.patch
)
src_prepare() { src_prepare() {
default default
eapply_user eapply_user
@ -56,11 +64,8 @@ src_install() {
meson_src_install meson_src_install
newpamd "${FILESDIR}"/pam_phosh 'phosh' newpamd "${FILESDIR}"/pam_phosh 'phosh'
systemd_newunit "${FILESDIR}"/phosh.service 'phosh.service' systemd_newunit "${FILESDIR}"/phosh.service 'phosh.service'
insinto /usr/share/applications/
DOC_CONTENTS="To amend the existing password policy please see the man 5 passwdqc.conf doins "${FILESDIR}"/sm.puri.OSK0.desktop
page and then edit the /etc/security/passwdqc.conf file to change enforce=none
to allow use digit only password as phosh only support passcode for now"
readme.gentoo_create_doc
} }
pkg_postinst() { pkg_postinst() {