From b73d9d209c23f16d9fbf682c49715c5f9b6f2572 Mon Sep 17 00:00:00 2001 From: Gerben Jan Dijkman Date: Sat, 21 Aug 2021 20:46:40 +0200 Subject: [PATCH] Added patches --- ...-system-prompt-allow-blank-passwords.patch | 49 +++++++++++++++++++ .../phosh/files/0002-fix-locale-issue.patch | 14 ++++++ ...3-fix-locale-issue-in-service-file-1.patch | 22 +++++++++ gui-wm/phosh/files/sm.puri.OSK0.desktop | 12 +++++ gui-wm/phosh/phosh-0.13.0.ebuild | 15 ++++-- 5 files changed, 107 insertions(+), 5 deletions(-) create mode 100644 gui-wm/phosh/files/0001-system-prompt-allow-blank-passwords.patch create mode 100644 gui-wm/phosh/files/0002-fix-locale-issue.patch create mode 100644 gui-wm/phosh/files/0003-fix-locale-issue-in-service-file-1.patch create mode 100644 gui-wm/phosh/files/sm.puri.OSK0.desktop diff --git a/gui-wm/phosh/files/0001-system-prompt-allow-blank-passwords.patch b/gui-wm/phosh/files/0001-system-prompt-allow-blank-passwords.patch new file mode 100644 index 0000000..e10824d --- /dev/null +++ b/gui-wm/phosh/files/0001-system-prompt-allow-blank-passwords.patch @@ -0,0 +1,49 @@ +From e88f5dee0cbb7fa0851b43a5ded5d94256c756d2 Mon Sep 17 00:00:00 2001 +From: Arnaud Ferraris +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 + diff --git a/gui-wm/phosh/files/0002-fix-locale-issue.patch b/gui-wm/phosh/files/0002-fix-locale-issue.patch new file mode 100644 index 0000000..9d2d3a0 --- /dev/null +++ b/gui-wm/phosh/files/0002-fix-locale-issue.patch @@ -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 diff --git a/gui-wm/phosh/files/0003-fix-locale-issue-in-service-file-1.patch b/gui-wm/phosh/files/0003-fix-locale-issue-in-service-file-1.patch new file mode 100644 index 0000000..d11fa9e --- /dev/null +++ b/gui-wm/phosh/files/0003-fix-locale-issue-in-service-file-1.patch @@ -0,0 +1,22 @@ +From: Daniel Dehennin +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 diff --git a/gui-wm/phosh/files/sm.puri.OSK0.desktop b/gui-wm/phosh/files/sm.puri.OSK0.desktop new file mode 100644 index 0000000..e4a8753 --- /dev/null +++ b/gui-wm/phosh/files/sm.puri.OSK0.desktop @@ -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 diff --git a/gui-wm/phosh/phosh-0.13.0.ebuild b/gui-wm/phosh/phosh-0.13.0.ebuild index e557012..12171dd 100644 --- a/gui-wm/phosh/phosh-0.13.0.ebuild +++ b/gui-wm/phosh/phosh-0.13.0.ebuild @@ -32,6 +32,8 @@ DEPEND=" gnome-base/gnome-desktop gnome-base/gnome-session x11-themes/gnome-backgrounds + gnome-base/gnome-keyring + gnome-base/gnome-shell x11-wm/phoc systemd? ( sys-apps/systemd ) sys-power/upower @@ -42,6 +44,12 @@ BDEPEND=" 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() { default eapply_user @@ -56,11 +64,8 @@ src_install() { meson_src_install newpamd "${FILESDIR}"/pam_phosh 'phosh' systemd_newunit "${FILESDIR}"/phosh.service 'phosh.service' - - DOC_CONTENTS="To amend the existing password policy please see the man 5 passwdqc.conf - 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 + insinto /usr/share/applications/ + doins "${FILESDIR}"/sm.puri.OSK0.desktop } pkg_postinst() {