diff options
author | Xiao-Long Chen | 2015-06-08 19:54:03 -0400 |
---|---|---|
committer | Xiao-Long Chen | 2015-06-08 19:54:03 -0400 |
commit | 066a08e31b29b5f2fd4497e1b1b7c7cacb536b28 (patch) | |
tree | 064fb32937072d8fead32b78338aa13f11827b14 | |
download | aur-066a08e31b29b5f2fd4497e1b1b7c7cacb536b28.tar.gz |
Import from old AUR
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | 0001-Support-setting-reading-LightDM-autologin-setings.patch | 232 | ||||
-rw-r--r-- | PKGBUILD | 87 |
3 files changed, 347 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cd8232a2f12b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +# Generated by makepkg 4.2.0 +# Wed Dec 31 22:47:44 UTC 2014 +pkgbase = accountsservice-ubuntu + pkgdesc = D-Bus interface for user account query and manipulation + pkgver = 0.6.39 + pkgrel = 1 + url = http://cgit.freedesktop.org/accountsservice/ + arch = i686 + arch = x86_64 + license = GPL3 + makedepends = intltool + makedepends = gobject-introspection + makedepends = vala + depends = glib2 + depends = polkit + depends = systemd + depends = lightdm-ubuntu + provides = accountsservice=0.6.39 + conflicts = accountsservice + source = http://cgit.freedesktop.org/accountsservice/snapshot/accountsservice-0.6.39.tar.xz + source = https://launchpad.net/ubuntu/+archive/primary/+files/accountsservice_0.6.37-1ubuntu9.debian.tar.xz + source = 0001-Support-setting-reading-LightDM-autologin-setings.patch + sha512sums = 95010b312650eaa629a8ef5ea29a0fd1b8c256c67e645e7b35d77967306ea7591f507d3c2df385ea3393cbb26fa4c798716d301bcbfd9dbb350a6f9172810db8 + sha512sums = b6c51ec1ca513100f109629ddd0c2b6575e5cba8f5ef5c39399ae8bc8a53078a22b522747cd659ed96de217555fbda5238de06f698c6d94a530eacd2b807a615 + sha512sums = 0ba299e57a1629993f19bbc07178262bd07040f64e61df78c7b16596956be8037c6aff087505ece9d2f65c1bc66c8628ab09bcdb6ba9e2e4b2a6e937dd6cb2df + +pkgname = accountsservice-ubuntu + diff --git a/0001-Support-setting-reading-LightDM-autologin-setings.patch b/0001-Support-setting-reading-LightDM-autologin-setings.patch new file mode 100644 index 000000000000..355c4c5ce522 --- /dev/null +++ b/0001-Support-setting-reading-LightDM-autologin-setings.patch @@ -0,0 +1,232 @@ +From f39b69c0495b9bdf83a5aeb05e7794c1b6b6ca86 Mon Sep 17 00:00:00 2001 +From: Xiao-Long Chen <chenxiaolong@cxl.epac.to> +Date: Thu, 10 Apr 2014 22:19:02 -0400 +Subject: [PATCH] Support setting/reading LightDM autologin setings + +Author: Michael Terry <michael.terry@canonical.com> +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=40020 +Bug-Ubuntu: https://launchpad.net/bugs/798962 +Reviewed-by: Alessio Treglia <alessio@debian.org> +Last-Update: 2012-04-30 +--- + src/daemon.c | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 145 insertions(+), 14 deletions(-) + +diff --git a/src/daemon.c b/src/daemon.c +index e55ea9e..9051b9d 100644 +--- a/src/daemon.c ++++ b/src/daemon.c +@@ -49,6 +49,7 @@ + #define PATH_SHADOW "/etc/shadow" + #define PATH_GROUP "/etc/group" + #define PATH_GDM_CUSTOM "/etc/gdm/custom.conf" ++#define PATH_LIGHTDM_CONFIG "/etc/lightdm/lightdm.conf" + + enum { + PROP_0, +@@ -67,6 +68,7 @@ struct DaemonPrivate { + GFileMonitor *shadow_monitor; + GFileMonitor *group_monitor; + GFileMonitor *gdm_monitor; ++ GFileMonitor *lightdm_monitor; + GFileMonitor *wtmp_monitor; + + guint reload_id; +@@ -534,9 +536,19 @@ daemon_init (Daemon *daemon) + wtmp_helper_get_path_for_monitor (), + on_users_monitor_changed); + +- daemon->priv->gdm_monitor = setup_monitor (daemon, +- PATH_GDM_CUSTOM, +- on_gdm_monitor_changed); ++ if (g_file_test ("/etc/gdm", G_FILE_TEST_EXISTS)) ++ { ++ daemon->priv->gdm_monitor = setup_monitor (daemon, ++ PATH_GDM_CUSTOM, ++ on_gdm_monitor_changed); ++ } ++ ++ if (g_file_test ("/etc/lightdm", G_FILE_TEST_EXISTS)) ++ { ++ daemon->priv->lightdm_monitor = setup_monitor (daemon, ++ PATH_LIGHTDM_CONFIG, ++ on_gdm_monitor_changed); ++ } + + queue_reload_users (daemon); + queue_reload_autologin (daemon); +@@ -1273,10 +1285,10 @@ daemon_local_check_auth (Daemon *daemon, + } + + gboolean +-load_autologin (Daemon *daemon, +- gchar **name, +- gboolean *enabled, +- GError **error) ++load_autologin_gdm (Daemon *daemon, ++ gchar **name, ++ gboolean *enabled, ++ GError **error) + { + GKeyFile *keyfile; + GError *local_error; +@@ -1319,23 +1331,90 @@ load_autologin (Daemon *daemon, + return TRUE; + } + +-static gboolean +-save_autologin (Daemon *daemon, +- const gchar *name, +- gboolean enabled, ++gboolean ++load_autologin_lightdm (Daemon *daemon, ++ gchar **name, ++ gboolean *enabled, ++ GError **error) ++{ ++ GKeyFile *keyfile; ++ ++ keyfile = g_key_file_new (); ++ if (!g_key_file_load_from_file (keyfile, ++ PATH_LIGHTDM_CONFIG, ++ G_KEY_FILE_KEEP_COMMENTS, ++ error)) { ++ g_key_file_free (keyfile); ++ return FALSE; ++ } ++ ++ *name = g_key_file_get_string (keyfile, "SeatDefaults", "autologin-user", error); ++ *enabled = (*error == NULL && (*name) && (*name)[0] != 0); ++ ++ g_key_file_free (keyfile); ++ ++ return (*error == NULL); ++} ++ ++gboolean ++load_autologin (Daemon *daemon, ++ gchar **name, ++ gboolean *enabled, + GError **error) + { ++ GDBusConnection *connection; ++ GVariant *reply; ++ ++ /* First, determine whether we should load GDM or LightDM values by ++ checking if GDM is running. */ ++ connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); ++ reply = g_dbus_connection_call_sync (connection, ++ "org.freedesktop.DBus", ++ "/", ++ "org.freedesktop.DBus", ++ "GetNameOwner", ++ g_variant_new ("(s)", "org.gnome.DisplayManager"), ++ G_VARIANT_TYPE ("(s)"), ++ G_DBUS_CALL_FLAGS_NO_AUTO_START, ++ -1, ++ NULL, ++ NULL); ++ g_object_unref (connection); ++ ++ if (reply != NULL) { ++ g_variant_unref (reply); ++ return load_autologin_gdm (daemon, name, enabled, error); ++ } else { ++ return load_autologin_lightdm (daemon, name, enabled, error); ++ } ++} ++ ++static gboolean ++save_autologin_gdm (Daemon *daemon, ++ const gchar *name, ++ gboolean enabled, ++ GError **error) ++{ + GKeyFile *keyfile; + gchar *data; + gboolean result; ++ GError *local_error = NULL; ++ ++ if (!g_file_test ("/etc/gdm", G_FILE_TEST_EXISTS)) ++ return TRUE; /* not an error, just not installed */ + + keyfile = g_key_file_new (); + if (!g_key_file_load_from_file (keyfile, + PATH_GDM_CUSTOM, + G_KEY_FILE_KEEP_COMMENTS, +- error)) { +- g_key_file_free (keyfile); +- return FALSE; ++ &local_error)) { ++ /* It's OK for custom.conf to not exist, we will make it */ ++ if (!g_error_matches (local_error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) { ++ g_propagate_error (error, local_error); ++ g_key_file_free (keyfile); ++ return FALSE; ++ } ++ g_error_free (local_error); + } + + g_key_file_set_string (keyfile, "daemon", "AutomaticLoginEnable", enabled ? "True" : "False"); +@@ -1350,6 +1429,58 @@ save_autologin (Daemon *daemon, + return result; + } + ++static gboolean ++save_autologin_lightdm (Daemon *daemon, ++ const gchar *name, ++ gboolean enabled, ++ GError **error) ++{ ++ GKeyFile *keyfile; ++ gchar *data; ++ gboolean result; ++ GError *local_error = NULL; ++ ++ if (!g_file_test ("/etc/lightdm", G_FILE_TEST_EXISTS)) ++ return TRUE; /* not an error, just not installed */ ++ ++ keyfile = g_key_file_new (); ++ if (!g_key_file_load_from_file (keyfile, ++ PATH_LIGHTDM_CONFIG, ++ G_KEY_FILE_KEEP_COMMENTS, ++ &local_error)) { ++ /* It's OK for custom.conf to not exist, we will make it */ ++ if (!g_error_matches (local_error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) { ++ g_propagate_error (error, local_error); ++ g_key_file_free (keyfile); ++ return FALSE; ++ } ++ g_error_free (local_error); ++ } ++ ++ g_key_file_set_string (keyfile, "SeatDefaults", "autologin-user", enabled ? name : ""); ++ ++ data = g_key_file_to_data (keyfile, NULL, NULL); ++ result = g_file_set_contents (PATH_LIGHTDM_CONFIG, data, -1, error); ++ ++ g_key_file_free (keyfile); ++ g_free (data); ++ ++ return result; ++} ++ ++static gboolean ++save_autologin (Daemon *daemon, ++ const gchar *name, ++ gboolean enabled, ++ GError **error) ++{ ++ if (!save_autologin_gdm (daemon, name, enabled, error)) ++ return FALSE; ++ if (!save_autologin_lightdm (daemon, name, enabled, error)) ++ return FALSE; ++ return TRUE; ++} ++ + gboolean + daemon_local_set_automatic_login (Daemon *daemon, + User *user, +-- +1.9.2 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..747ad7b7f525 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,87 @@ +# Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to> +# Contributor: Ionut Biru <ibiru@archlinux.org> + +# vercheck-pkgbuild: auto +# vercheck-ubuntu: name=${pkgname%-*}, repo=utopic +# vercheck-archlinux: name=${pkgname%-*}, repo=extra, arch=x86_64 +# vercheck#freedesktop: name=${pkgname%-*}, majorver=3.14 +# vercheck#ppa: name=${pkgname%-*}, url=ppa:gnome3-team/gnome3-staging + +pkgname=accountsservice-ubuntu +_ubuntu_rel=1ubuntu9 +_ubuntu_ver=0.6.37 +pkgver=0.6.39 +pkgrel=1 +pkgdesc="D-Bus interface for user account query and manipulation" +arch=(i686 x86_64) +url="http://cgit.freedesktop.org/accountsservice/" +license=(GPL3) +depends=(glib2 polkit systemd lightdm-ubuntu) +makedepends=(intltool gobject-introspection vala) +provides=("accountsservice=${pkgver}") +conflicts=(accountsservice) +source=("http://cgit.freedesktop.org/accountsservice/snapshot/accountsservice-${pkgver}.tar.xz" + "https://launchpad.net/ubuntu/+archive/primary/+files/accountsservice_${_ubuntu_ver:-${pkgver}}-${_ubuntu_rel}.debian.tar.xz" + 0001-Support-setting-reading-LightDM-autologin-setings.patch) +sha512sums=('95010b312650eaa629a8ef5ea29a0fd1b8c256c67e645e7b35d77967306ea7591f507d3c2df385ea3393cbb26fa4c798716d301bcbfd9dbb350a6f9172810db8' + 'b6c51ec1ca513100f109629ddd0c2b6575e5cba8f5ef5c39399ae8bc8a53078a22b522747cd659ed96de217555fbda5238de06f698c6d94a530eacd2b807a615' + '0ba299e57a1629993f19bbc07178262bd07040f64e61df78c7b16596956be8037c6aff087505ece9d2f65c1bc66c8628ab09bcdb6ba9e2e4b2a6e937dd6cb2df') + +prepare() { + cd "accountsservice-${pkgver}" + + #patch -p1 -i ../0001-Support-setting-reading-LightDM-autologin-setings.patch + + # Apply Ubuntu patches + # Disable patches + sed -i \ + `# We have refreshed versions` \ + -e '/0007-add-lightdm-support.patch/d' \ + `# Arch Linux uses wheel group for system administration` \ + -e '/0002-create-and-manage-groups-like-on-a-ubuntu-system.patch/d' \ + `# adduser is Debian-specific` \ + -e '/0006-adduser_instead_of_useradd.patch/d' \ + `# Language patches are still pretty specific to Ubuntu, though` \ + `# Ubuntu is trying to get them merged upstream` \ + -e '/0001-formats-locale-property.patch/d' \ + -e '/0009-language-tools.patch/d' \ + -e '/0010-set-language.patch/d' \ + -e '/0012-add-keyboard-layout-support.patch/d' \ + `# Ubuntu-specific` \ + -e '/0021-support-extrausers.patch/d' \ + -e '/0016-add-input-sources-support.patch/d' \ + `# We do not need a pin-based authentication method` \ + -e '/0014-pam-pin.patch/d' \ + -e '/0015-pam-pin-ubuntu.patch/d' \ + `# Applied upstream` \ + -e '/0022-fix-desktop-centric-polkit-policy.patch/d' \ + `# Does not apply cleanly` \ + -e '/0013-add-has-message-support.patch/d' \ + ../debian/patches/series + + for i in $(grep -v '#' ../debian/patches/series); do + msg "Applying ${i} ..." + patch -p1 -i "../debian/patches/${i}" + done +} + +build() { + cd "accountsservice-${pkgver}" + + ./autogen.sh \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libexecdir=/usr/lib/accountsservice \ + --with-systemdsystemunitdir=/usr/lib/systemd/system \ + --localstatedir=/var \ + --disable-static \ + --enable-systemd + + make +} + +package() { + cd "accountsservice-${pkgver}" + + make DESTDIR="${pkgdir}" install +} |