diff options
Diffstat (limited to 'community-testing')
20 files changed, 908 insertions, 0 deletions
diff --git a/community-testing/collectd/PKGBUILD b/community-testing/collectd/PKGBUILD new file mode 100644 index 000000000..54138c3db --- /dev/null +++ b/community-testing/collectd/PKGBUILD @@ -0,0 +1,86 @@ +# $Id: PKGBUILD 56069 2011-09-30 09:15:09Z ebelanger $ +# Maintainer: Gaetan Bisson <bisson@archlinux.org> +# Contributor: Gerhard Brauer <gerhard.brauer@web.de> + +pkgname=collectd +pkgver=5.0.0 +pkgrel=7 +pkgdesc='Daemon which collects system performance statistics periodically' +arch=('i686' 'x86_64') +url='http://collectd.org/' +license=('GPL') +options=('!libtool') +backup=('etc/collectd.conf') + +optdepends=('curl: apache, ascent, curl, nginx, and write_http plugins' + 'libdbi: dbi plugin' + 'libesmtp: notify_email plugin' + 'libgcrypt: encryption and authentication for network plugin' + 'iptables: iptables plugin' + 'libmemcached: memcachec plugin' + 'libmysqlclient: mysql plugin' + 'iproute2: netlink plugin' + 'net-snmp: snmp plugin' + 'libnotify: notify_desktop plugin' + 'liboping: ping plugin' + 'libpcap: dns plugin' + 'perl: perl plugin' + 'postgresql-libs: postgresql plugin' + 'python2: python plugin' + 'rrdtool: rrdtool and rrdcached plugins' + 'lm_sensors: lm_sensors and sensors plugins' + 'libvirt: libvirt plugin' + 'libxml2: ascent and libvirt plugins' + 'xmms: xmms plugin' + 'yajl: curl_json plugin') + +makedepends=('curl' 'libdbi' 'libesmtp' 'libgcrypt' 'iptables' 'libmemcached' + 'libmysqlclient' 'iproute2' 'net-snmp' 'libnotify' 'liboping' + 'libpcap' 'postgresql-libs' 'python2' 'rrdtool' 'lm_sensors' + 'libvirt' 'libxml2' 'xmms' 'yajl') + +depends=('libtool') + +source=("${url}files/${pkgname}-${pkgver}.tar.gz" + 'libnotify-0.7.patch' + 'yajl-2.x.patch' + 'libperl.patch' + 'rc.d') +sha1sums=('026e5121348f0e525dedb3844fe61c7713994bb7' + 'f6fed097c16f6c9c90b9a32a5b8e48d54b35b337' + 'd3854c39c9596b4f6dcf67a9eb8decea4d17120d' + 'b221352447b2d42cade4a65ced322bcff8a40366' + '0f441718d5519cb043b1130e5a1d0379078adbcc') + +install=install + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + patch -p1 -i ../libperl.patch + autoconf + + sed -i 's/ipt_error_target/bozo_error_target/g' src/owniptc/libiptc.c + patch -p1 -i ../libnotify-0.7.patch + patch -p1 -i ../yajl-2.x.patch + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --enable-static=no \ + --with-python=/usr/bin/python2 + + sed -i 's/ -Werror//g' */Makefile* */*/Makefile* + + make all +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make DESTDIR="${pkgdir}" install + + install -D -m 755 ../rc.d "${pkgdir}/etc/rc.d/${pkgname}" + install -D -m 644 contrib/collectd2html.pl "${pkgdir}"/usr/share/collectd/collectd2html.pl +} diff --git a/community-testing/collectd/install b/community-testing/collectd/install new file mode 100644 index 000000000..54cc0e1b3 --- /dev/null +++ b/community-testing/collectd/install @@ -0,0 +1,8 @@ +post_install() { + cat <<EOF +==> Customize your /etc/collectd.conf (you really want to). +==> Then start and stop the daemon using: /etc/rc.d/collectd +==> To see some result of collected data, use the Perl script: +==> /usr/share/collectd/collectd2html.pl +EOF +} diff --git a/community-testing/collectd/libnotify-0.7.patch b/community-testing/collectd/libnotify-0.7.patch new file mode 100644 index 000000000..5ea67047a --- /dev/null +++ b/community-testing/collectd/libnotify-0.7.patch @@ -0,0 +1,12 @@ +diff -aur old/src/notify_desktop.c new/src/notify_desktop.c +--- old/src/notify_desktop.c 2011-03-07 23:50:24.096691200 +0100 ++++ new/src/notify_desktop.c 2011-03-07 23:52:35.486691201 +0100 +@@ -95,7 +95,7 @@ + : (NOTIF_WARNING == n->severity) ? "WARNING" + : (NOTIF_OKAY == n->severity) ? "OKAY" : "UNKNOWN"); + +- notification = notify_notification_new (summary, n->message, NULL, NULL); ++ notification = notify_notification_new (summary, n->message, NULL); + if (NULL == notification) { + log_err ("Failed to create a new notification."); + return -1; diff --git a/community-testing/collectd/libperl.patch b/community-testing/collectd/libperl.patch new file mode 100644 index 000000000..d6184f29d --- /dev/null +++ b/community-testing/collectd/libperl.patch @@ -0,0 +1,30 @@ +diff -aur old/configure.in new/configure.in +--- old/configure.in 2011-09-29 20:38:56.725672831 +1000 ++++ new/configure.in 2011-09-29 20:39:07.975658829 +1000 +@@ -2810,11 +2810,13 @@ + then + SAVE_CFLAGS="$CFLAGS" + SAVE_LDFLAGS="$LDFLAGS" ++ SAVE_LIBS="$LIBS" + dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string) + PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts` + PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts` + CFLAGS="$CFLAGS $PERL_CFLAGS" + LDFLAGS="$LDFLAGS $PERL_LDFLAGS" ++ LIBS="$LIBS -L/usr/lib/perl5/core_perl/CORE -lperl" + + AC_CACHE_CHECK([for libperl], + [c_cv_have_libperl], +@@ -2833,7 +2835,10 @@ + Nullsv); + ]]), + [c_cv_have_libperl="yes"], +- [c_cv_have_libperl="no"] ++ [ ++ c_cv_have_libperl="no" ++ LIBS="$SAVE_LIBS" ++ ] + ) + ) + +Only in new: configure.in.orig diff --git a/community-testing/collectd/rc.d b/community-testing/collectd/rc.d new file mode 100644 index 000000000..442f2324a --- /dev/null +++ b/community-testing/collectd/rc.d @@ -0,0 +1,39 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +name=collectd +prog="/usr/sbin/collectdmon" + +PID=$(pidof -o %PPID $prog) + +case "$1" in +start) + stat_busy "Starting $name daemon" + [[ -z "$PID" ]] && $prog \ + && { add_daemon $name; stat_done; } \ + || { stat_fail; exit 1; } + ;; +stop) + stat_busy "Stopping $name daemon" + [[ -n "$PID" ]] && kill $PID &>/dev/null \ + && { rm_daemon $name; stat_done; } \ + || { stat_fail; exit 1; } + ;; +restart) + $0 stop + sleep 2 + $0 start + ;; +reload) + stat_busy "Sending SIGHUP to $name daemon" + [[ -n "$PID" ]] && kill -HUP $PID &>/dev/null \ + && { stat_done; } \ + || { stat_fail; exit 1; } + ;; +*) + echo "usage: $0 {start|stop|restart|reload}" + exit 1 + ;; +esac diff --git a/community-testing/collectd/yajl-2.x.patch b/community-testing/collectd/yajl-2.x.patch new file mode 100644 index 000000000..b90543dfe --- /dev/null +++ b/community-testing/collectd/yajl-2.x.patch @@ -0,0 +1,57 @@ +--- old/src/curl_json.c 2011-04-25 20:43:00.972938855 -0400 ++++ new/src/curl_json.c 2011-04-25 20:46:03.859938860 -0400 +@@ -98,8 +98,7 @@ + return (0); + + status = yajl_parse(db->yajl, (unsigned char *)buf, len); +- if ((status != yajl_status_ok) +- && (status != yajl_status_insufficient_data)) ++ if ((status != yajl_status_ok)) + { + unsigned char *msg = + yajl_get_error(db->yajl, /* verbose = */ 1, +@@ -130,7 +129,7 @@ + /* "number" may not be null terminated, so copy it into a buffer before + * parsing. */ + static int cj_cb_number (void *ctx, +- const char *number, unsigned int number_len) ++ const char *number, size_t number_len) + { + char buffer[number_len + 1]; + +@@ -159,7 +158,7 @@ + } /* int cj_cb_number */ + + static int cj_cb_map_key (void *ctx, const unsigned char *val, +- unsigned int len) ++ size_t len) + { + cj_t *db = (cj_t *)ctx; + c_avl_tree_t *tree; +@@ -187,7 +186,7 @@ + } + + static int cj_cb_string (void *ctx, const unsigned char *val, +- unsigned int len) ++ size_t len) + { + cj_t *db = (cj_t *)ctx; + char str[len + 1]; +@@ -697,7 +696,7 @@ + char *url; + yajl_handle yprev = db->yajl; + +- db->yajl = yajl_alloc (&ycallbacks, NULL, NULL, (void *)db); ++ db->yajl = yajl_alloc (&ycallbacks, NULL, (void *)db); + if (db->yajl == NULL) + { + ERROR ("curl_json plugin: yajl_alloc failed."); +@@ -730,7 +729,7 @@ + return (-1); + } + +- status = yajl_parse_complete (db->yajl); ++ status = yajl_complete_parse (db->yajl); + if (status != yajl_status_ok) + { + unsigned char *errmsg; diff --git a/community-testing/gedit-plugins/PKGBUILD b/community-testing/gedit-plugins/PKGBUILD new file mode 100644 index 000000000..990935604 --- /dev/null +++ b/community-testing/gedit-plugins/PKGBUILD @@ -0,0 +1,33 @@ +# $Id: PKGBUILD 56011 2011-09-28 20:24:07Z ibiru $ +#Maintainer: Ionut Biru <ibiru@archlinux.org> +#Contributor: Hugo Doria <hugo@archlinux.org> +#Contributor: Sergej Chodarev <sergejx@centrum.sk> +#Contributor: zhuqin <zhuqin83@gmail.com> + +pkgname=gedit-plugins +pkgver=3.2.0 +pkgrel=1 +pkgdesc="Set of plugins for gedit" +arch=('i686' 'x86_64') +license=('GPL') +url="http://live.gnome.org/GeditPlugins" +depends=('gedit' 'dbus-python') +optdepends=('gucharmap: for charmap plugin') +makedepends=('intltool' 'gnome-doc-utils') +options=('!libtool' '!emptydirs') +install=gedit-plugins.install +source=(ftp://ftp.gnome.org/pub/gnome/sources/gedit-plugins/3.2/$pkgname-$pkgver.tar.xz) +sha256sums=('c8d617a107478dba6ef0ab16e87707c5526e97eefab24a65891dbf9aa32e7839') + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr --sysconfdir=/etc --with-plugins=all \ + --disable-schemas-compile + + make +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir install +} diff --git a/community-testing/gedit-plugins/gedit-plugins.install b/community-testing/gedit-plugins/gedit-plugins.install new file mode 100644 index 000000000..d5bcc00ae --- /dev/null +++ b/community-testing/gedit-plugins/gedit-plugins.install @@ -0,0 +1,23 @@ +pkgname=gedit-plugins + +post_install() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas +} + +pre_upgrade() { + if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then + usr/sbin/gconfpkg --uninstall ${pkgname} + fi +} + +post_upgrade() { + post_install $1 +} + + +post_remove() { + post_install $1 +} + + +# vim:set ts=2 sw=2 et: diff --git a/community-testing/gnome-packagekit/PKGBUILD b/community-testing/gnome-packagekit/PKGBUILD new file mode 100644 index 000000000..c129e1d67 --- /dev/null +++ b/community-testing/gnome-packagekit/PKGBUILD @@ -0,0 +1,43 @@ +# $Id: PKGBUILD 56094 2011-10-01 00:56:14Z jconder $ +# Maintainer: Jonathan Conder <jonno.conder@gmail.com> + +pkgname=gnome-packagekit +pkgver=3.2.0 +pkgrel=1 +pkgdesc='Collection of graphical tools for PackageKit to be used in the GNOME desktop' +arch=('i686' 'x86_64') +url='http://www.packagekit.org/' +license=('GPL') +depends=('dconf' 'desktop-file-utils' 'gnome-menus' 'gtk3' + 'hicolor-icon-theme' 'libnotify' 'packagekit') +makedepends=('gconf' 'gtk-doc' 'intltool' 'libcanberra' 'upower') +optdepends=('gnome-settings-daemon-updates: update and message notifications') +options=('!emptydirs' '!libtool') +install="$pkgname.install" +source=("http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz" + 'arch.patch') +sha256sums=('a91efca58ac0781f925927772281e72abf16314ef3b9577bf42f8ab3f5b5c0e9' + '9c809ac3c8bbf870442e7bc4123c70b144930a287b28626be1b8bae95edf71ac') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + patch -Np1 -i "$srcdir/arch.patch" + sed -i 's@python@python2@' 'python/enum-convertor.py' + + export PYTHON=/usr/bin/python2 + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --disable-gtk-doc \ + --disable-schemas-compile \ + --disable-scrollkeeper + make -s +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make -s DESTDIR="$pkgdir" install + + rm -rf "$pkgdir/usr/lib/gnome-settings-daemon-3.0/gtk-modules" +} diff --git a/community-testing/gnome-packagekit/arch.patch b/community-testing/gnome-packagekit/arch.patch new file mode 100644 index 000000000..bf4cd91c4 --- /dev/null +++ b/community-testing/gnome-packagekit/arch.patch @@ -0,0 +1,28 @@ +diff -Nru a/data/gpk-install-local-file.desktop.in b/data/gpk-install-local-file.desktop.in +--- a/data/gpk-install-local-file.desktop.in 2011-03-23 23:15:41.000000000 +1300 ++++ b/data/gpk-install-local-file.desktop.in 2011-04-10 01:04:51.606666671 +1200 +@@ -8,5 +8,5 @@ + Icon=system-software-install + StartupNotify=true + NoDisplay=true +-MimeType=application/x-rpm;application/x-redhat-package-manager;application/x-servicepack;application/x-deb; ++MimeType=application/x-xz-compressed-tar;application/x-servicepack; + +diff -Nru a/data/org.gnome.packagekit.gschema.xml b/data/org.gnome.packagekit.gschema.xml +--- a/data/org.gnome.packagekit.gschema.xml 2011-03-28 21:49:37.000000000 +1300 ++++ b/data/org.gnome.packagekit.gschema.xml 2011-04-10 02:37:29.433333340 +1200 +@@ -104,14 +104,4 @@ + <description>When displaying UI from a session DBus request, force these options to be turned on.</description> + </key> + </schema> +- <schema id="org.gnome.settings-daemon" path="/org/gnome/settings-daemon/"> +- <child name="gtk-modules" schema="gnome-settings-daemon.gtk-modules"/> +- </schema> +- <schema id="gnome-settings-daemon.gtk-modules" path="/org/gnome/settings-daemon/gtk-modules/"> +- <key name="pk-gtk-module" type="b"> +- <default>true</default> +- <summary>GTK+ module for font installation</summary> +- <description>This key determines if applications should be able to prompt for fonts.</description> +- </key> +- </schema> + </schemalist> diff --git a/community-testing/gnome-packagekit/gnome-packagekit.install b/community-testing/gnome-packagekit/gnome-packagekit.install new file mode 100644 index 000000000..620670d57 --- /dev/null +++ b/community-testing/gnome-packagekit/gnome-packagekit.install @@ -0,0 +1,19 @@ +post_install() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + update-desktop-database -q +} + +pre_upgrade() { + if (( $(vercmp $2 2.91.90) < 0 )); then + usr/sbin/gconfpkg --uninstall gnome-packagekit + fi +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/community-testing/gnome-settings-daemon-updates/PKGBUILD b/community-testing/gnome-settings-daemon-updates/PKGBUILD new file mode 100644 index 000000000..cb2f33a9b --- /dev/null +++ b/community-testing/gnome-settings-daemon-updates/PKGBUILD @@ -0,0 +1,42 @@ +# $Id: PKGBUILD 56096 2011-10-01 00:59:35Z jconder $ +# Maintainer: Jonathan Conder <jonno.conder@gmail.com> + +_pkgname=gnome-settings-daemon +pkgname=$_pkgname-updates +pkgver=3.2.0 +pkgrel=1 +pkgdesc="Updates plugin for the GNOME Settings daemon" +arch=('i686' 'x86_64') +url="http://www.gnome.org" +license=('GPL') +depends=('gnome-packagekit' "$_pkgname") +makedepends=('intltool' 'gtk-doc' 'gnome-desktop') +options=('!emptydirs' '!libtool') +install=$_pkgname.install +source=("http://ftp.gnome.org/pub/gnome/sources/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.xz" + 'arch.patch') +sha256sums=('a85242ce60b9c9bb3fbad124ee06430a408f39fa31d2d4ea29dc179db724447b' + 'e5029915c423f72256c4170f917363c385b6fcd180b87ceba0d7bb11a841d7e9') + +build() { + cd "$srcdir/$_pkgname-$pkgver" + patch -Np1 -i "$srcdir/arch.patch" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib/gnome-settings-daemon \ + --disable-static \ + --enable-pulse \ + --with-pnpids=/usr/share/libgnome-desktop-3.0/pnp.ids + #https://bugzilla.gnome.org/show_bug.cgi?id=656231 + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + make -s +} + +package() { + cd "$srcdir/$_pkgname-$pkgver" + make -C 'plugins/updates' DESTDIR="${pkgdir}" install + + _schema='org.gnome.settings-daemon.plugins.updates.gschema.xml' + install -D -m644 "data/$_schema" "$pkgdir/usr/share/glib-2.0/schemas/$_schema" +} diff --git a/community-testing/gnome-settings-daemon-updates/arch.patch b/community-testing/gnome-settings-daemon-updates/arch.patch new file mode 100644 index 000000000..f405d7593 --- /dev/null +++ b/community-testing/gnome-settings-daemon-updates/arch.patch @@ -0,0 +1,321 @@ +diff --git a/data/org.gnome.settings-daemon.plugins.updates.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.updates.gschema.xml.in.in +index c09096a..3fa4159 100644 +--- a/data/org.gnome.settings-daemon.plugins.updates.gschema.xml.in.in ++++ b/data/org.gnome.settings-daemon.plugins.updates.gschema.xml.in.in +@@ -31,7 +31,7 @@ + <_description>Automatically download updates in the background without confirmation. Updates will be auto-downloaded when using wired network connnections, and also WiFi if 'connection-use-wifi' is enabled and mobile broadband if 'connection-use-mobile' is enabled.</_description> + </key> + <key name="auto-update-type" enum="org.gnome.settings-daemon.GsdUpdateType"> +- <default>'security'</default> ++ <default>'none'</default> + <_summary>Automatically install these types of updates</_summary> + <_description>Automatically install these types of updates.</_description> + </key> +@@ -56,7 +56,7 @@ + <_description>The last time we notified the user about non-critical updates. Value is in seconds since the epoch, or zero for never.</_description> + </key> + <key name="frequency-get-upgrades" type="i"> +- <default>604800</default> ++ <default>0</default> + <_summary>How often to check for distribution upgrades</_summary> + <_description>How often to check for distribution upgrades. Value is in seconds.</_description> + </key> +diff --git a/plugins/updates/Makefile.am b/plugins/updates/Makefile.am +index 9510c65..191092d 100644 +--- a/plugins/updates/Makefile.am ++++ b/plugins/updates/Makefile.am +@@ -15,7 +15,9 @@ libupdates_la_SOURCES = \ + gsd-updates-firmware.h \ + gsd-updates-firmware.c \ + gsd-updates-manager.h \ +- gsd-updates-manager.c ++ gsd-updates-manager.c \ ++ gsd-updates-watch.h \ ++ gsd-updates-watch.c + + libupdates_la_CPPFLAGS = \ + -I$(top_srcdir)/gnome-settings-daemon \ +diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c +index 90ea246..d79455c 100644 +--- a/plugins/updates/gsd-updates-manager.c ++++ b/plugins/updates/gsd-updates-manager.c +@@ -32,6 +32,7 @@ + #include "gsd-updates-manager.h" + #include "gsd-updates-firmware.h" + #include "gsd-updates-refresh.h" ++#include "gsd-updates-watch.h" + #include "gsd-updates-common.h" + #include "gnome-settings-profile.h" + +@@ -46,6 +47,7 @@ struct GsdUpdatesManagerPrivate + GCancellable *cancellable; + GsdUpdatesRefresh *refresh; + GsdUpdatesFirmware *firmware; ++ GsdUpdatesWatch *watch; + GSettings *settings_ftp; + GSettings *settings_gsd; + GSettings *settings_http; +@@ -1359,6 +1361,9 @@ gsd_updates_manager_start (GsdUpdatesManager *manager, + g_signal_connect (manager->priv->refresh, "get-updates", + G_CALLBACK (due_get_updates_cb), manager); + ++ /* watch transaction progress */ ++ manager->priv->watch = gsd_updates_watch_new (); ++ + /* get http settings */ + manager->priv->settings_http = g_settings_new ("org.gnome.system.proxy.http"); + g_signal_connect (manager->priv->settings_http, "changed", +@@ -1464,6 +1469,10 @@ gsd_updates_manager_stop (GsdUpdatesManager *manager) + g_object_unref (manager->priv->firmware); + manager->priv->firmware = NULL; + } ++ if (manager->priv->watch != NULL) { ++ g_object_unref (manager->priv->watch); ++ manager->priv->watch = NULL; ++ } + if (manager->priv->proxy_session != NULL) { + g_object_unref (manager->priv->proxy_session); + manager->priv->proxy_session = NULL; +diff --git a/plugins/updates/gsd-updates-watch.c b/plugins/updates/gsd-updates-watch.c +new file mode 100644 +index 0000000..892acad +--- /dev/null ++++ b/plugins/updates/gsd-updates-watch.c +@@ -0,0 +1,179 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 2007-2011 Richard Hughes <richard@hughsie.com> ++ * ++ * Licensed under the GNU General Public License Version 2 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ */ ++ ++#include "config.h" ++ ++#include <unistd.h> ++#include <glib/gi18n.h> ++#include <packagekit-glib2/packagekit.h> ++#include <libnotify/notify.h> ++ ++#include "gsd-updates-watch.h" ++ ++#define GSD_UPDATES_WATCH_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_UPDATES_WATCH, GsdUpdatesWatchPrivate)) ++ ++struct GsdUpdatesWatchPrivate ++{ ++ PkTransactionList *tlist; ++ PkClient *client; ++}; ++ ++G_DEFINE_TYPE (GsdUpdatesWatch, gsd_updates_watch, G_TYPE_OBJECT) ++ ++static void ++gsd_updates_watch_message_cb (PkMessage *item, GsdUpdatesWatch *watch) ++{ ++ NotifyNotification *notification; ++ gchar *details = NULL; ++ const gchar *title, *message; ++ GError *error = NULL; ++ ++ g_return_if_fail (PK_IS_MESSAGE (item)); ++ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); ++ ++ g_object_get (item, "details", &details, NULL); ++ title = _("More information"); ++ message = details; ++ ++ /* use a better title if available */ ++ if (g_str_has_prefix (details, "<b>")) { ++ gchar *end = g_strstr_len (details, -1, "</b>\n"); ++ if (end != NULL && g_strstr_len (details, end - details, "\n") == NULL) { ++ title = details + 3; ++ *end = '\0'; ++ message = end + 5; ++ } ++ } ++ ++ /* display a notification */ ++ notification = notify_notification_new (title, message, NULL); ++ notify_notification_set_app_name (notification, _("Software Updates")); ++ notify_notification_set_timeout (notification, NOTIFY_EXPIRES_NEVER); ++ notify_notification_set_urgency (notification, NOTIFY_URGENCY_NORMAL); ++ ++ if (!notify_notification_show (notification, &error)) { ++ g_warning ("error: %s", error->message); ++ g_error_free (error); ++ } ++ ++ g_free (details); ++} ++ ++static void ++gsd_updates_watch_adopt_cb (PkClient *client, GAsyncResult *res, GsdUpdatesWatch *watch) ++{ ++ PkResults *results; ++ PkProgress *progress = NULL; ++ guint uid; ++ GPtrArray *array; ++ GError *error = NULL; ++ ++ g_return_if_fail (PK_IS_CLIENT (client)); ++ g_return_if_fail (G_IS_ASYNC_RESULT (res)); ++ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); ++ ++ results = pk_client_generic_finish (client, res, &error); ++ if (results == NULL) { ++ g_warning ("failed to adopt: %s", error->message); ++ g_error_free (error); ++ goto out; ++ } ++ ++ g_object_get (results, "progress", &progress, NULL); ++ g_object_get (progress, "uid", &uid, NULL); ++ ++ /* only display messages from the same user */ ++ if (uid != getuid ()) { ++ g_printerr ("ignoring messages\n"); ++ goto out; ++ } ++ ++ array = pk_results_get_message_array (results); ++ g_ptr_array_foreach (array, (GFunc) gsd_updates_watch_message_cb, watch); ++ g_ptr_array_unref (array); ++ ++out: ++ if (progress != NULL) { ++ g_object_unref (progress); ++ } ++ if (results != NULL) { ++ g_object_unref (results); ++ } ++} ++ ++static void ++gsd_updates_watch_tlist_added_cb (PkTransactionList *tlist, const gchar *tid, GsdUpdatesWatch *watch) ++{ ++ g_return_if_fail (PK_IS_TRANSACTION_LIST (tlist)); ++ g_return_if_fail (tid != NULL); ++ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); ++ ++ /* listen for messages */ ++ pk_client_adopt_async (watch->priv->client, tid, NULL, NULL, NULL, ++ (GAsyncReadyCallback) gsd_updates_watch_adopt_cb, watch); ++} ++ ++static void ++gsd_updates_watch_init (GsdUpdatesWatch *watch) ++{ ++ g_return_if_fail (GSD_IS_UPDATES_WATCH (watch)); ++ ++ watch->priv = GSD_UPDATES_WATCH_GET_PRIVATE (watch); ++ watch->priv->tlist = pk_transaction_list_new (); ++ watch->priv->client = pk_client_new (); ++ ++ g_signal_connect (watch->priv->tlist, "added", ++ G_CALLBACK (gsd_updates_watch_tlist_added_cb), watch); ++} ++ ++static void ++gsd_updates_watch_finalize (GObject *object) ++{ ++ GsdUpdatesWatch *watch; ++ ++ g_return_if_fail (GSD_IS_UPDATES_WATCH (object)); ++ ++ watch = GSD_UPDATES_WATCH (object); ++ g_return_if_fail (watch->priv != NULL); ++ ++ if (watch->priv->tlist != NULL) { ++ g_object_unref (watch->priv->tlist); ++ } ++ if (watch->priv->client != NULL) { ++ g_object_unref (watch->priv->client); ++ } ++ ++ G_OBJECT_CLASS (gsd_updates_watch_parent_class)->finalize (object); ++} ++ ++GsdUpdatesWatch * ++gsd_updates_watch_new (void) ++{ ++ return GSD_UPDATES_WATCH (g_object_new (GSD_TYPE_UPDATES_WATCH, NULL)); ++} ++ ++static void ++gsd_updates_watch_class_init (GsdUpdatesWatchClass *klass) ++{ ++ GObjectClass *object_class = G_OBJECT_CLASS (klass); ++ object_class->finalize = gsd_updates_watch_finalize; ++ g_type_class_add_private (klass, sizeof (GsdUpdatesWatchPrivate)); ++} +diff --git a/plugins/updates/gsd-updates-watch.h b/plugins/updates/gsd-updates-watch.h +new file mode 100644 +index 0000000..d90976e +--- /dev/null ++++ b/plugins/updates/gsd-updates-watch.h +@@ -0,0 +1,52 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- ++ * ++ * Copyright (C) 2007-2011 Richard Hughes <richard@hughsie.com> ++ * ++ * Licensed under the GNU General Public License Version 2 ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ */ ++ ++#ifndef __GSD_UPDATES_WATCH_H ++#define __GSD_UPDATES_WATCH_H ++ ++#include <glib-object.h> ++ ++G_BEGIN_DECLS ++ ++#define GSD_TYPE_UPDATES_WATCH (gsd_updates_watch_get_type ()) ++#define GSD_UPDATES_WATCH(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GSD_TYPE_UPDATES_WATCH, GsdUpdatesWatch)) ++#define GSD_UPDATES_WATCH_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GSD_TYPE_UPDATES_WATCH, GsdUpdatesWatchClass)) ++#define GSD_IS_UPDATES_WATCH(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_UPDATES_WATCH)) ++ ++typedef struct GsdUpdatesWatchPrivate GsdUpdatesWatchPrivate; ++ ++typedef struct ++{ ++ GObject parent; ++ GsdUpdatesWatchPrivate *priv; ++} GsdUpdatesWatch; ++ ++typedef struct ++{ ++ GObjectClass parent_class; ++} GsdUpdatesWatchClass; ++ ++GType gsd_updates_watch_get_type (void); ++GsdUpdatesWatch *gsd_updates_watch_new (void); ++ ++G_END_DECLS ++ ++#endif /* __GSD_UPDATES_WATCH_H */ diff --git a/community-testing/gnome-settings-daemon-updates/gnome-settings-daemon.install b/community-testing/gnome-settings-daemon-updates/gnome-settings-daemon.install new file mode 100644 index 000000000..24072f316 --- /dev/null +++ b/community-testing/gnome-settings-daemon-updates/gnome-settings-daemon.install @@ -0,0 +1,11 @@ +post_install() { + usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/community-testing/gtkdialog/PKGBUILD b/community-testing/gtkdialog/PKGBUILD new file mode 100644 index 000000000..65b0dee6a --- /dev/null +++ b/community-testing/gtkdialog/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 55973 2011-09-27 21:01:09Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: dojo <joerg.doll[at]gmx.de> + +pkgname=gtkdialog +pkgver=0.8.0 +pkgrel=1 +pkgdesc="Gtkdialog is a small utility for fast and easy GUI building." +arch=('i686' 'x86_64') +#url="http://linux.pte.hu/~pipas/gtkdialog/" +url="http://code.google.com/p/gtkdialog/" +license=("GPL") +makedepends=('pkgconfig') +depends=('gtk2' 'libglade') +install=gtkdialog.install +options=('zipman') +source=(http://gtkdialog.googlecode.com/files/gtkdialog-$pkgver.tar.gz) +md5sums=('a1f0c459a610ac3892342efbec27d93d') + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info + make +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir install + rm -f $pkgdir/usr/share/info/dir + mkdir -p $pkgdir/usr/share/doc/$pkgname + cp -a examples $pkgdir/usr/share/doc/$pkgname/examples +} diff --git a/community-testing/gtkdialog/gtkdialog.install b/community-testing/gtkdialog/gtkdialog.install new file mode 100644 index 000000000..f74f0882b --- /dev/null +++ b/community-testing/gtkdialog/gtkdialog.install @@ -0,0 +1,20 @@ +infodir=/usr/share/info +filelist=(gtkdialog.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/community-testing/rsyslog/PKGBUILD b/community-testing/rsyslog/PKGBUILD new file mode 100644 index 000000000..6ebf58514 --- /dev/null +++ b/community-testing/rsyslog/PKGBUILD @@ -0,0 +1,52 @@ +# $Id: PKGBUILD 56071 2011-09-30 09:15:21Z ebelanger $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> + +pkgname=rsyslog +pkgver=5.8.5 +pkgrel=2 +pkgdesc="An enhanced multi-threaded syslogd with a focus on security and reliability" +url="http://www.rsyslog.com/" +arch=('i686' 'x86_64') +license=('GPL3') +depends=('zlib') +makedepends=('postgresql-libs>=8.4.1' 'libmysqlclient' 'net-snmp' 'gnutls') +optdepends=('postgresql-libs: PostgreSQL Database Support' + 'libmysqlclient: MySQL Database Support' + 'net-snmp' + 'gnutls') +backup=('etc/rsyslog.conf' \ + 'etc/logrotate.d/rsyslog' + 'etc/conf.d/rsyslog') +options=('strip' 'zipman' '!libtool') +source=("http://www.rsyslog.com/files/download/rsyslog/rsyslog-$pkgver.tar.gz" + 'rsyslog' + 'rsyslog.logrotate' + 'rsyslog.conf.d') +md5sums=('a73cb577cb4bc5b9c8f0d217eb054ad2' + 'a18bbcbb6ebdaa13a6ec6d9f3d9eb2da' + '8065db4bef3061a4f000ba58779f6829' + '1a0cd4530dd5d1439456d5ae230574d9') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr \ + --enable-mysql \ + --enable-pgsql \ + --enable-mail \ + --enable-imfile \ + --enable-imtemplate \ + --enable-snmp \ + --enable-gnutls \ + --enable-inet \ + --with-systemdsystemunitdir=/lib/systemd/system + make +} +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make install DESTDIR=${pkgdir} + # Install Daemons and Configuration Files + install -D -m755 ${srcdir}/${pkgname} ${pkgdir}/etc/rc.d/${pkgname}d + install -D -m644 ${pkgname}.conf ${pkgdir}/etc/${pkgname}.conf + install -D -m644 $srcdir/${pkgname}.logrotate ${pkgdir}/etc/logrotate.d/${pkgname} + install -D -m644 ${srcdir}/${pkgname}.conf.d ${pkgdir}/etc/conf.d/${pkgname} +} diff --git a/community-testing/rsyslog/rsyslog b/community-testing/rsyslog/rsyslog new file mode 100755 index 000000000..ee0145418 --- /dev/null +++ b/community-testing/rsyslog/rsyslog @@ -0,0 +1,39 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/rsyslog + +PID=`pidof -o %PPID /usr/sbin/rsyslogd` +case "$1" in + start) + stat_busy "Starting RSyslogd" + [ -z "$PID" ] && /usr/sbin/rsyslogd $RSYSLOGD_ARGS + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon rsyslogd + stat_done + fi + ;; + stop) + stat_busy "Stopping RSyslogd" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm -f /var/run/rsyslogd.pid + rm -f /var/rsyslogd.persist + rm_daemon rsyslogd + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/community-testing/rsyslog/rsyslog.conf.d b/community-testing/rsyslog/rsyslog.conf.d new file mode 100644 index 000000000..e39f8c3b9 --- /dev/null +++ b/community-testing/rsyslog/rsyslog.conf.d @@ -0,0 +1,6 @@ +# +# Parameters to be passed to rsyslogd +# This should almost certainly include at least the current compatability +# level, e.g. -c4 +# +RSYSLOGD_ARGS="-c4" diff --git a/community-testing/rsyslog/rsyslog.logrotate b/community-testing/rsyslog/rsyslog.logrotate new file mode 100644 index 000000000..76306c560 --- /dev/null +++ b/community-testing/rsyslog/rsyslog.logrotate @@ -0,0 +1,7 @@ +/var/log/messages /var/log/secure /var/log/maillog /var/log/cron /var/log/spooler /var/log/boot.log { + missingok + sharedscripts + postrotate + /usr/bin/killall -HUP /usr/sbin/rsyslogd + endscript +} |