From 75a4a592e5ccda30715f93563d741b83e0dcf39e Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 25 Apr 2011 13:37:00 +0000 Subject: Slackware 13.37 Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun! --- source/l/ConsoleKit/ConsoleKit.SlackBuild | 51 +++-- .../consolekit-0.2.10-cleanup_console_tags.patch | 65 +++++++ source/l/ConsoleKit/consolekit-0.4.2-revert.patch | 210 +++++++++++++++++++++ source/l/ConsoleKit/doinst.sh | 13 +- .../consolekit-0.2.10-cleanup_console_tags.patch | 65 ------- .../patches/consolekit-dbus-permissions.patch | 175 ----------------- .../patches/consolekit-skipvalidation.patch | 12 -- source/l/ConsoleKit/rc.consolekit | 34 ++++ 8 files changed, 344 insertions(+), 281 deletions(-) create mode 100644 source/l/ConsoleKit/consolekit-0.2.10-cleanup_console_tags.patch create mode 100644 source/l/ConsoleKit/consolekit-0.4.2-revert.patch delete mode 100644 source/l/ConsoleKit/patches/consolekit-0.2.10-cleanup_console_tags.patch delete mode 100644 source/l/ConsoleKit/patches/consolekit-dbus-permissions.patch delete mode 100644 source/l/ConsoleKit/patches/consolekit-skipvalidation.patch create mode 100644 source/l/ConsoleKit/rc.consolekit (limited to 'source/l/ConsoleKit') diff --git a/source/l/ConsoleKit/ConsoleKit.SlackBuild b/source/l/ConsoleKit/ConsoleKit.SlackBuild index db40f139..a1f7ae50 100755 --- a/source/l/ConsoleKit/ConsoleKit.SlackBuild +++ b/source/l/ConsoleKit/ConsoleKit.SlackBuild @@ -25,16 +25,15 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=ConsoleKit -VERSION=${VERSION:-20100129} +VERSION=${VERSION:-0.4.3} BUILD=${BUILD:-1} + NUMJOBS=${NUMJOBS:--j6} -# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) export ARCH=i486 ;; arm*) export ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; esac fi @@ -61,10 +60,9 @@ rm -rf $PKG mkdir -p $TMP $PKG cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1 cd $PRGNAM-$VERSION || exit 1 -# Make sure ownerships and permissions are sane: chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -72,20 +70,23 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -## Not sure what of these we need now - no time to look yet -# Thanks to the GSB project for the patch hints :-) -# http://bugs.freedesktop.org/show_bug.cgi?id=19020 -# http://bugs.freedesktop.org/show_bug.cgi?id=20471 -#zcat $CWD/patches/consolekit-dbus-permissions.patch.gz | patch -p1 || exit 1 -# Prevent make install from erroring out on docbook validation -#zcat $CWD/patches/consolekit-skipvalidation.patch.gz | patch -p1 || exit 1 # Clean up at_console compat files, bug #257761 -zcat $CWD/patches/consolekit-0.2.10-cleanup_console_tags.patch.gz | patch -p1 || exit 1 +zcat $CWD/consolekit-0.2.10-cleanup_console_tags.patch.gz | patch -p1 || exit 1 + +# Revert "Only set sessions to be is-local=true if set by a trusted party" +# http://cgit.freedesktop.org/ConsoleKit/commit/?id=4f88228f31a63c026c424a92827f26ad7535275c +# Here are the bug reports: +# http://bugs.gentoo.org/show_bug.cgi?id=336634 +# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597937 +# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598150 +# https://bugs.freedesktop.org/show_bug.cgi?id=28377 +# This is neither ideal nor maintainable long-term, but I don't know what else +# we can reasonably do right now... --rworkman +zcat $CWD/consolekit-0.4.2-revert.patch.gz | patch -p1 || exit 1 -# Configure: CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -./autogen.sh \ +./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ @@ -98,7 +99,6 @@ CXXFLAGS="$SLKCFLAGS" \ --disable-static \ --build=$ARCH-slackware-linux -# Build and install: make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG @@ -110,27 +110,22 @@ chmod 0755 $PKG/usr/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck # Let's not clobber config files mv $PKG/etc/ConsoleKit/seats.d/00-primary.seat \ $PKG/etc/ConsoleKit/seats.d/00-primary.seat.new -mv $PKG/etc/dbus-1/system.d/ConsoleKit.conf \ - $PKG/etc/dbus-1/system.d/ConsoleKit.conf.new -# Strip binaries: +# Add an init script +mkdir -p $PKG/etc/rc.d +cat $CWD/rc.consolekit > $PKG/etc/rc.d/rc.consolekit.new +chmod 0755 $PKG/etc/rc.d/rc.consolekit.new + find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -# Compress and link manpages, if any: -( cd $PKG/usr/man || exit 1 - find . -type f -exec gzip -9 {} \; - for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done -) +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $(find $PKG/usr/man -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done -# Add a documentation directory: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README TODO \ $PKG/usr/doc/$PRGNAM-$VERSION -( - cd $PKG/usr/doc/$PRGNAM-$VERSION ; ln -s /usr/share/gtk-doc/html/polkit-1 html -) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/source/l/ConsoleKit/consolekit-0.2.10-cleanup_console_tags.patch b/source/l/ConsoleKit/consolekit-0.2.10-cleanup_console_tags.patch new file mode 100644 index 00000000..d1699d90 --- /dev/null +++ b/source/l/ConsoleKit/consolekit-0.2.10-cleanup_console_tags.patch @@ -0,0 +1,65 @@ +# http://patches.ubuntu.com/by-release/extracted/ubuntu/c/consolekit/0.2.10-1ubuntu9/ +--- a/src/main.c 2008-07-25 03:19:34.000000000 +0200 ++++ b/src/main.c 2008-07-26 00:25:13.000000000 +0200 +@@ -149,6 +149,43 @@ + unlink (CONSOLE_KIT_PID_FILE); + } + ++#define CONSOLE_TAGS_DIR "/var/run/console" ++ ++static void ++delete_console_tags (void) ++{ ++ GDir *dir; ++ GError *error = NULL; ++ const gchar *name; ++ ++ g_debug ("Cleaning up %s", CONSOLE_TAGS_DIR); ++ ++ dir = g_dir_open (CONSOLE_TAGS_DIR, 0, &error); ++ if (dir == NULL) { ++ g_debug ("Couldn't open directory %s: %s", CONSOLE_TAGS_DIR, ++ error->message); ++ g_error_free (error); ++ return; ++ } ++ while ((name = g_dir_read_name (dir)) != NULL) { ++ gchar *file; ++ file = g_build_filename (CONSOLE_TAGS_DIR, name, NULL); ++ ++ g_debug ("Removing tag file: %s", file); ++ if (unlink (file) == -1) { ++ g_warning ("Couldn't delete tag file: %s", file); ++ } ++ g_free (file); ++ } ++} ++ ++static void ++cleanup (void) ++{ ++ delete_console_tags (); ++ delete_pid (); ++} ++ + /* copied from nautilus */ + static int debug_log_pipes[2]; + +@@ -229,7 +266,7 @@ + snprintf (pid, sizeof (pid), "%lu\n", (long unsigned) getpid ()); + written = write (pf, pid, strlen (pid)); + close (pf); +- g_atexit (delete_pid); ++ g_atexit (cleanup); + } else { + g_warning ("Unable to write pid file %s: %s", + CONSOLE_KIT_PID_FILE, +@@ -312,6 +349,8 @@ + + g_debug ("initializing console-kit-daemon %s", VERSION); + ++ delete_console_tags (); ++ + create_pid_file (); + + manager = ck_manager_new (); diff --git a/source/l/ConsoleKit/consolekit-0.4.2-revert.patch b/source/l/ConsoleKit/consolekit-0.4.2-revert.patch new file mode 100644 index 00000000..cb1f461d --- /dev/null +++ b/source/l/ConsoleKit/consolekit-0.4.2-revert.patch @@ -0,0 +1,210 @@ +Revert upstream http://cgit.freedesktop.org/ConsoleKit/commit/?id=4f88228f31a63c026c424a92827f26ad7535275c +which renders ConsoleKit unusable. + +diff -ur ConsoleKit-0.4.2.orig/src/ck-manager.c ConsoleKit-0.4.2/src/ck-manager.c +--- ConsoleKit-0.4.2.orig/src/ck-manager.c 2010-09-03 16:54:31.000000000 +0300 ++++ ConsoleKit-0.4.2/src/ck-manager.c 2010-09-10 00:02:32.000000000 +0300 +@@ -1660,175 +1660,12 @@ + dbus_g_method_return (context, cookie); + } + +-enum { +- PROP_STRING, +- PROP_BOOLEAN, +-}; +- +-#define CK_TYPE_PARAMETER_STRUCT (dbus_g_type_get_struct ("GValueArray", \ +- G_TYPE_STRING, \ +- G_TYPE_VALUE, \ +- G_TYPE_INVALID)) +- +-static gboolean +-_get_parameter (GPtrArray *parameters, +- const char *name, +- int prop_type, +- gpointer *value) +-{ +- gboolean ret; +- int i; +- +- if (parameters == NULL) { +- return FALSE; +- } +- +- ret = FALSE; +- +- for (i = 0; i < parameters->len && ret == FALSE; i++) { +- gboolean res; +- GValue val_struct = { 0, }; +- char *prop_name; +- GValue *prop_val; +- +- g_value_init (&val_struct, CK_TYPE_PARAMETER_STRUCT); +- g_value_set_static_boxed (&val_struct, g_ptr_array_index (parameters, i)); +- +- res = dbus_g_type_struct_get (&val_struct, +- 0, &prop_name, +- 1, &prop_val, +- G_MAXUINT); +- if (! res) { +- g_debug ("Unable to extract parameter input"); +- goto cont; +- } +- +- if (prop_name == NULL) { +- g_debug ("Skipping NULL parameter"); +- goto cont; +- } +- +- if (strcmp (prop_name, name) != 0) { +- goto cont; +- } +- +- switch (prop_type) { +- case PROP_STRING: +- if (value != NULL) { +- *value = g_value_dup_string (prop_val); +- } +- break; +- case PROP_BOOLEAN: +- if (value != NULL) { +- *(gboolean *)value = g_value_get_boolean (prop_val); +- } +- break; +- default: +- g_assert_not_reached (); +- break; +- } +- +- ret = TRUE; +- +- cont: +- g_free (prop_name); +- if (prop_val != NULL) { +- g_value_unset (prop_val); +- g_free (prop_val); +- } +- } +- +- return ret; +-} +- +-static gboolean +-_verify_login_session_id_is_local (CkManager *manager, +- const char *login_session_id) +-{ +- GHashTableIter iter; +- const char *id; +- CkSession *session; +- +- g_return_val_if_fail (CK_IS_MANAGER (manager), FALSE); +- +- /* If any local session exists for the given login session id +- then that means a trusted party has vouched for the +- original login */ +- +- g_debug ("Looking for local sessions for login-session-id=%s", login_session_id); +- +- session = NULL; +- g_hash_table_iter_init (&iter, manager->priv->sessions); +- while (g_hash_table_iter_next (&iter, (gpointer *)&id, (gpointer *)&session)) { +- if (session != NULL) { +- gboolean is_local; +- char *sessid; +- +- sessid = NULL; +- g_object_get (session, +- "login-session-id", &sessid, +- "is-local", &is_local, +- NULL); +- if (g_strcmp0 (sessid, login_session_id) == 0 && is_local) { +- g_debug ("CkManager: found is-local=true on %s", id); +- return TRUE; +- } +- } +- } +- +- return FALSE; +-} +- +-static void +-add_param_boolean (GPtrArray *parameters, +- const char *key, +- gboolean value) +-{ +- GValue val = { 0, }; +- GValue param_val = { 0, }; +- +- g_value_init (&val, G_TYPE_BOOLEAN); +- g_value_set_boolean (&val, value); +- g_value_init (¶m_val, CK_TYPE_PARAMETER_STRUCT); +- g_value_take_boxed (¶m_val, +- dbus_g_type_specialized_construct (CK_TYPE_PARAMETER_STRUCT)); +- dbus_g_type_struct_set (¶m_val, +- 0, key, +- 1, &val, +- G_MAXUINT); +- g_value_unset (&val); +- +- g_ptr_array_add (parameters, g_value_get_boxed (¶m_val)); +-} +- + static void + verify_and_open_session_for_leader (CkManager *manager, + CkSessionLeader *leader, +- GPtrArray *parameters, ++ const GPtrArray *parameters, + DBusGMethodInvocation *context) + { +- /* Only allow a local session if originating from an existing +- local session. Effectively this means that only trusted +- parties can create local sessions. */ +- +- g_debug ("CkManager: verifying session for leader"); +- +- if (parameters != NULL && ! _get_parameter (parameters, "is-local", PROP_BOOLEAN, NULL)) { +- gboolean is_local; +- char *login_session_id; +- +- g_debug ("CkManager: is-local has not been set, will inherit from existing login-session-id if available"); +- +- is_local = FALSE; +- +- if (_get_parameter (parameters, "login-session-id", PROP_STRING, (gpointer *) &login_session_id)) { +- is_local = _verify_login_session_id_is_local (manager, login_session_id); +- g_debug ("CkManager: found is-local=%s", is_local ? "true" : "false"); +- } +- +- add_param_boolean (parameters, "is-local", is_local); +- } +- + open_session_for_leader (manager, + leader, + parameters, +diff -ur ConsoleKit-0.4.2.orig/tools/ck-collect-session-info.c ConsoleKit-0.4.2/tools/ck-collect-session-info.c +--- ConsoleKit-0.4.2.orig/tools/ck-collect-session-info.c 2010-09-03 16:54:31.000000000 +0300 ++++ ConsoleKit-0.4.2/tools/ck-collect-session-info.c 2010-09-10 00:06:30.000000000 +0300 +@@ -274,7 +274,8 @@ + si->x11_display_device = ck_process_stat_get_tty (xorg_stat); + ck_process_stat_free (xorg_stat); + +- /* don't set is-local here - let the daemon do that */ ++ si->is_local = TRUE; ++ si->is_local_is_set = TRUE; + + g_free (si->remote_host_name); + si->remote_host_name = NULL; +@@ -303,6 +304,13 @@ + + fill_x11_info (si); + ++ if (! si->is_local_is_set) { ++ /* FIXME: how should we set this? */ ++ /* non x11 sessions must be local I guess */ ++ si->is_local = TRUE; ++ si->is_local_is_set = TRUE; ++ } ++ + res = ck_unix_pid_get_login_session_id (si->pid, &si->login_session_id); + if (! res) { + si->login_session_id = NULL; diff --git a/source/l/ConsoleKit/doinst.sh b/source/l/ConsoleKit/doinst.sh index 217d7605..c13a36e3 100644 --- a/source/l/ConsoleKit/doinst.sh +++ b/source/l/ConsoleKit/doinst.sh @@ -11,6 +11,17 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + config etc/ConsoleKit/seats.d/00-primary.seat.new -config etc/dbus-1/system.d/ConsoleKit.conf.new +preserve_perms etc/rc.d/rc.consolekit.new diff --git a/source/l/ConsoleKit/patches/consolekit-0.2.10-cleanup_console_tags.patch b/source/l/ConsoleKit/patches/consolekit-0.2.10-cleanup_console_tags.patch deleted file mode 100644 index d1699d90..00000000 --- a/source/l/ConsoleKit/patches/consolekit-0.2.10-cleanup_console_tags.patch +++ /dev/null @@ -1,65 +0,0 @@ -# http://patches.ubuntu.com/by-release/extracted/ubuntu/c/consolekit/0.2.10-1ubuntu9/ ---- a/src/main.c 2008-07-25 03:19:34.000000000 +0200 -+++ b/src/main.c 2008-07-26 00:25:13.000000000 +0200 -@@ -149,6 +149,43 @@ - unlink (CONSOLE_KIT_PID_FILE); - } - -+#define CONSOLE_TAGS_DIR "/var/run/console" -+ -+static void -+delete_console_tags (void) -+{ -+ GDir *dir; -+ GError *error = NULL; -+ const gchar *name; -+ -+ g_debug ("Cleaning up %s", CONSOLE_TAGS_DIR); -+ -+ dir = g_dir_open (CONSOLE_TAGS_DIR, 0, &error); -+ if (dir == NULL) { -+ g_debug ("Couldn't open directory %s: %s", CONSOLE_TAGS_DIR, -+ error->message); -+ g_error_free (error); -+ return; -+ } -+ while ((name = g_dir_read_name (dir)) != NULL) { -+ gchar *file; -+ file = g_build_filename (CONSOLE_TAGS_DIR, name, NULL); -+ -+ g_debug ("Removing tag file: %s", file); -+ if (unlink (file) == -1) { -+ g_warning ("Couldn't delete tag file: %s", file); -+ } -+ g_free (file); -+ } -+} -+ -+static void -+cleanup (void) -+{ -+ delete_console_tags (); -+ delete_pid (); -+} -+ - /* copied from nautilus */ - static int debug_log_pipes[2]; - -@@ -229,7 +266,7 @@ - snprintf (pid, sizeof (pid), "%lu\n", (long unsigned) getpid ()); - written = write (pf, pid, strlen (pid)); - close (pf); -- g_atexit (delete_pid); -+ g_atexit (cleanup); - } else { - g_warning ("Unable to write pid file %s: %s", - CONSOLE_KIT_PID_FILE, -@@ -312,6 +349,8 @@ - - g_debug ("initializing console-kit-daemon %s", VERSION); - -+ delete_console_tags (); -+ - create_pid_file (); - - manager = ck_manager_new (); diff --git a/source/l/ConsoleKit/patches/consolekit-dbus-permissions.patch b/source/l/ConsoleKit/patches/consolekit-dbus-permissions.patch deleted file mode 100644 index 0cab2858..00000000 --- a/source/l/ConsoleKit/patches/consolekit-dbus-permissions.patch +++ /dev/null @@ -1,175 +0,0 @@ -diff -up ConsoleKit-0.3.0/data/ConsoleKit.conf.consolekit ConsoleKit-0.3.0/data/ConsoleKit.conf ---- ConsoleKit-0.3.0/data/ConsoleKit.conf.consolekit 2008-04-19 01:39:49.000000000 -0400 -+++ ConsoleKit-0.3.0/data/ConsoleKit.conf 2009-04-08 11:40:33.347814036 -0400 -@@ -8,88 +8,131 @@ - - - -- -- -- -+ - - - - -- -- -- -+ -+ -+ -+ - - -- -- -- -- -- -- -+ -- -- -- -- -- -- - -- -- -- -- -- -- - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -+ - - diff --git a/source/l/ConsoleKit/patches/consolekit-skipvalidation.patch b/source/l/ConsoleKit/patches/consolekit-skipvalidation.patch deleted file mode 100644 index c4bf89d7..00000000 --- a/source/l/ConsoleKit/patches/consolekit-skipvalidation.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up ConsoleKit-0.3.0/doc/dbus/Makefile.in.skipvalidation ConsoleKit-0.3.0/doc/dbus/Makefile.in ---- ConsoleKit-0.3.0/doc/dbus/Makefile.in.skipvalidation 2009-02-27 20:17:36.784329106 -0500 -+++ ConsoleKit-0.3.0/doc/dbus/Makefile.in 2009-02-27 20:18:15.701316733 -0500 -@@ -427,7 +427,7 @@ uninstall-am: uninstall-htmldocDATA - - - @DOCBOOK_DOCS_ENABLED_TRUE@ConsoleKit.html : $(SPEC_XML_FILES) --@DOCBOOK_DOCS_ENABLED_TRUE@ $(XMLTO) xhtml-nochunks -m $(top_srcdir)/doc/dbus/config.xsl ConsoleKit.xml -+@DOCBOOK_DOCS_ENABLED_TRUE@ $(XMLTO) --skip-validation xhtml-nochunks -m $(top_srcdir)/doc/dbus/config.xsl ConsoleKit.xml - - org.freedesktop.ConsoleKit.Manager.ref.xml : $(top_srcdir)/src/org.freedesktop.ConsoleKit.Manager.xml spec-to-docbook.xsl - $(XSLTPROC) $(top_srcdir)/doc/dbus/spec-to-docbook.xsl $< | tail -n +2 > $@ diff --git a/source/l/ConsoleKit/rc.consolekit b/source/l/ConsoleKit/rc.consolekit new file mode 100644 index 00000000..a1937569 --- /dev/null +++ b/source/l/ConsoleKit/rc.consolekit @@ -0,0 +1,34 @@ +#!/bin/sh +# +# /etc/rc.d/rc.consolekit +# +# Start/stop consolekit-kit daemon. +# +# This daemon is used by polkit's console auth agent. + +# Start consolekit: +ck_start() { + echo "Starting ConsoleKit daemon: /usr/sbin/console-kit-daemon" + /usr/sbin/console-kit-daemon +} + +# Stop consolekit: +ck_stop() { + if [ -r /var/run/ConsoleKit/pid ]; then + kill -HUP $(cat /var/run/ConsoleKit/pid) + rm -f /var/run/ConsoleKit/pid + else + killall -HUP -q console-kit-daemon + fi +} + +case "$1" in +'start') + ck_start + ;; +'stop') + ck_stop + ;; +*) + echo "Usage: $0 start|stop" +esac -- cgit v1.2.3