From 46264d49036780a9606452ae53377365e585f329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Dami=C3=A1n=20Schonborn?= Date: Wed, 18 Jan 2017 17:15:43 -0300 Subject: [PATCH] Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Federico Damián Schonborn --- Makefile | 1 + ...support-for-stateless-lightdm-gtk-greeter.patch | 52 ++++++++++++++++ package.yml | 21 +++++++ pspec_x86_64.xml | 72 ++++++++++++++++++++++ 4 files changed, 146 insertions(+) create mode 100644 Makefile create mode 100644 files/0001-Add-support-for-stateless-lightdm-gtk-greeter.patch create mode 100644 package.yml create mode 100644 pspec_x86_64.xml diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0a42375 --- /dev/null +++ b/Makefile @@ -0,0 +1 @@ +include ../Makefile.common diff --git a/files/0001-Add-support-for-stateless-lightdm-gtk-greeter.patch b/files/0001-Add-support-for-stateless-lightdm-gtk-greeter.patch new file mode 100644 index 0000000..c0c2528 --- /dev/null +++ b/files/0001-Add-support-for-stateless-lightdm-gtk-greeter.patch @@ -0,0 +1,52 @@ +From 518fd3534e132f0b0811607a239ec1ec27ffd158 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Federico=20Dami=C3=A1n=20Schonborn?= + +Date: Wed, 18 Jan 2017 15:52:21 -0300 +Subject: [PATCH] Add support for stateless lightdm-gtk-greeter +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In any distribution using an stateless lightdm-gtk-greeter, the +configuration file stored in configdir doesn't exists in first place +because the greeter by default uses the files placed in datadir, so +the program doesn't allow saving changes because the file doesn't +exists and thus we don't have write permissions, so it can't be +written. + +This patch adds a permission check over configdir if the file doesn't +exists and the creation of an empty file (after writing, obviously) +and the needed directory if neccessary, so this can work as expected. + +Signed-off-by: Federico Damián Schonborn +--- + lightdm_gtk_greeter_settings/Config.py | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/lightdm_gtk_greeter_settings/Config.py b/lightdm_gtk_greeter_settings/Config.py +index e21bc63..c2c5211 100644 +--- a/lightdm_gtk_greeter_settings/Config.py ++++ b/lightdm_gtk_greeter_settings/Config.py +@@ -149,12 +149,19 @@ class Config: + else: + config_section[key] = values[-1][1] + ++ # Create an empty file if it does not exists ++ if not os.path.exists(self._output_path): ++ os.makedirs(os.path.dirname(self._output_path)) + with open(self._output_path, 'w') as file: + config_file.write(file) + + def is_writable(self): ++ # self._output_path does exists and we have write permissions (normal behaviour) + if os.path.exists(self._output_path) and os.access(self._output_path, os.W_OK): + return True ++ # self._output_path does not exits but we have write permissions in configdir (for stateless support) ++ elif os.access(os.path.dirname(os.path.dirname(self._output_path)), os.W_OK): ++ return True + return os.access(os.path.dirname(self._output_path), os.W_OK | os.X_OK) + + def items(self): +-- +2.11.0 + diff --git a/package.yml b/package.yml new file mode 100644 index 0000000..d7c33b7 --- /dev/null +++ b/package.yml @@ -0,0 +1,21 @@ +name : lightdm-gtk-greeter-settings +version : 1.2.1 +release : 1 +source : + - https://launchpad.net/lightdm-gtk-greeter-settings/1.2/1.2.1/+download/lightdm-gtk-greeter-settings-1.2.1.tar.gz : ab91027b56ca0e0c98a38169acc453c08801bc4937dc1a53bd6e98b7aaceea96 +license : GPL-3.0 +component : system.utils +summary : Dialog for modifying the settings of lightdm-gtk-greeter +description: | + Just a small dialog to make it easier for users to modify the settings of lightdm-gtk-greeter. +builddeps : + - python-distutils-extra + - python3-gobject-devel +rundeps : + - python3-gobject +setup : | + %patch -p1 < $pkgfiles/0001-Add-support-for-stateless-lightdm-gtk-greeter.patch +build : | + %python3_setup +install : | + %python3_install diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml new file mode 100644 index 0000000..9f9554a --- /dev/null +++ b/pspec_x86_64.xml @@ -0,0 +1,72 @@ + + + lightdm-gtk-greeter-settings + + Federico Damián Schonborn + federico.d.schonborn@protonmail.com + + GPL-3.0 + system.utils + Dialog for modifying the settings of lightdm-gtk-greeter + Just a small dialog to make it easier for users to modify the settings of lightdm-gtk-greeter. + + https://solus-project.com/sources/README.Solus + + + lightdm-gtk-greeter-settings + Dialog for modifying the settings of lightdm-gtk-greeter + Just a small dialog to make it easier for users to modify the settings of lightdm-gtk-greeter. + + system.utils + + /usr/bin + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings-1.2.1-py3.5.egg-info + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/Config.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/GtkGreeterSettingsWindow.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/IconChooserDialog.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/IconEntry.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/IndicatorPropertiesDialog.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/IndicatorsEntry.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/MonitorsGroup.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/MultiheadSetupDialog.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/OptionEntry.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/OptionGroup.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/PositionEntry.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__init__.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/Config.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/GtkGreeterSettingsWindow.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/IconChooserDialog.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/IconEntry.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/IndicatorPropertiesDialog.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/IndicatorsEntry.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/MonitorsGroup.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/MultiheadSetupDialog.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/OptionEntry.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/OptionGroup.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/PositionEntry.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/__init__.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/__pycache__/helpers.cpython-35.pyc + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/helpers.py + /usr/lib/python3.5/site-packages/lightdm_gtk_greeter_settings/installation_config.py + /usr/share/applications/lightdm-gtk-greeter-settings.desktop + /usr/share/doc + /usr/share/icons/hicolor/16x16/apps/lightdm-gtk-greeter-settings.png + /usr/share/icons/hicolor/24x24/apps/lightdm-gtk-greeter-settings.png + /usr/share/icons/hicolor/48x48/apps/lightdm-gtk-greeter-settings.png + /usr/share/icons/hicolor/64x64/apps/lightdm-gtk-greeter-settings.png + /usr/share/icons/hicolor/scalable/apps/lightdm-gtk-greeter-settings.svg + /usr/share/lightdm-gtk-greeter-settings + /usr/share/locale + /usr/share/polkit-1/actions/com.ubuntu.pkexec.lightdm-gtk-greeter-settings.policy + + + + + 2017-01-18 + 1.2.1 + Packaging update + Federico Damián Schonborn + federico.d.schonborn@protonmail.com + + + \ No newline at end of file -- 2.11.0