summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-10-22 11:05:18 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-10-22 11:05:18 -0300
commit2352f09f581b24fa01f022026728acf919c0335a (patch)
tree36667ad9212b04db2500f304da5ac4a611cce5c9
parent7e9d319e9575e68d86463b792425fcdba0f195d2 (diff)
parent99746708edfd2c56f2ba654a14f27e98b1601a43 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community-staging/gambas3/PKGBUILD community-staging/luminancehdr/PKGBUILD community-staging/luxrays/PKGBUILD community-staging/luxrender/PKGBUILD community-staging/performous/PKGBUILD community-staging/widelands/PKGBUILD community/chmsee/PKGBUILD community/flac123/PKGBUILD community/pam-krb5/PKGBUILD community/python-pyxattr/PKGBUILD extra/postgresql/PKGBUILD extra/pygobject2/PKGBUILD extra/python-lxml/PKGBUILD extra/usbview/PKGBUILD extra/vlc/PKGBUILD extra/xorg-server/PKGBUILD multilib/lib32-libpng/PKGBUILD multilib/lib32-util-linux/PKGBUILD staging/bzflag/PKGBUILD staging/calligra/PKGBUILD staging/enblend-enfuse/PKGBUILD staging/gegl/PKGBUILD staging/hugin/PKGBUILD staging/inkscape/PKGBUILD testing/btrfs-progs/PKGBUILD testing/btrfs-progs/initcpio-hook-btrfs testing/btrfs-progs/initcpio-install-btrfs testing/cryptsetup/PKGBUILD testing/cryptsetup/encrypt_hook testing/empathy/PKGBUILD testing/evolution/PKGBUILD testing/glibmm/PKGBUILD testing/gtkglext/PKGBUILD testing/ibus/PKGBUILD testing/kmod/PKGBUILD testing/udisks2/PKGBUILD testing/xf86-video-intel/PKGBUILD
-rw-r--r--community-staging/devil/PKGBUILD38
-rw-r--r--community-staging/devil/devil.install11
-rw-r--r--community-staging/devil/libpng14.patch33
-rw-r--r--community-staging/supertux/PKGBUILD35
-rw-r--r--community-staging/supertux/supertux2-0.3.3-squirrel-gcc47.patch36
-rw-r--r--community-testing/activity-log-manager/PKGBUILD42
-rw-r--r--community-testing/activity-log-manager/activity-log-manager.install11
-rw-r--r--community-testing/espeakup/PKGBUILD31
-rw-r--r--community-testing/espeakup/espeakup43
-rw-r--r--community-testing/espeakup/espeakup.conf.d6
-rw-r--r--community-testing/espeakup/espeakup.service12
-rw-r--r--community-testing/gedit-plugins/PKGBUILD36
-rw-r--r--community-testing/gedit-plugins/gedit-plugins.install23
-rw-r--r--community-testing/gnome-packagekit/PKGBUILD43
-rw-r--r--community-testing/gnome-packagekit/gnome-packagekit.install19
-rw-r--r--community-testing/gnome-settings-daemon-updates/0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch1473
-rw-r--r--community-testing/gnome-settings-daemon-updates/PKGBUILD52
-rw-r--r--community-testing/gnome-settings-daemon-updates/arch.patch325
-rw-r--r--community-testing/gnome-settings-daemon-updates/gnome-settings-daemon.install12
-rw-r--r--community-testing/gnome-settings-daemon-updates/screensaver.patch145
-rw-r--r--community-testing/gnote/PKGBUILD33
-rw-r--r--community-testing/gnote/gnote.install21
-rw-r--r--community-testing/zeitgeist-datahub/PKGBUILD29
-rw-r--r--community/chmsee/PKGBUILD6
-rw-r--r--community/evas_generic_loaders-svn/PKGBUILD4
-rw-r--r--community/flac123/PKGBUILD17
-rw-r--r--community/gambas2/PKGBUILD6
-rw-r--r--community/gambas3/PKGBUILD4
-rw-r--r--community/libcec/PKGBUILD4
-rw-r--r--community/libextractor/PKGBUILD4
-rw-r--r--community/pam-krb5/PKGBUILD7
-rw-r--r--community/pdf2djvu/PKGBUILD7
-rw-r--r--community/python-pyxattr/PKGBUILD12
-rw-r--r--community/python-reportlab/ChangeLog18
-rw-r--r--community/python-reportlab/PKGBUILD35
-rw-r--r--community/rekonq/PKGBUILD5
-rw-r--r--community/virtualbox-modules-lts/PKGBUILD6
-rw-r--r--community/virtualbox-modules/PKGBUILD18
-rw-r--r--extra/amule/PKGBUILD6
-rw-r--r--extra/bitlbee/PKGBUILD12
-rw-r--r--extra/calligra/PKGBUILD81
-rw-r--r--extra/ethtool/PKGBUILD6
-rw-r--r--extra/inkscape/PKGBUILD4
-rw-r--r--extra/libpng/PKGBUILD10
-rw-r--r--extra/libreoffice/PKGBUILD9
-rw-r--r--extra/libtorrent-rasterbar/PKGBUILD6
-rw-r--r--extra/msmtp/PKGBUILD6
-rw-r--r--extra/net-snmp/PKGBUILD12
-rw-r--r--extra/poppler/PKGBUILD10
-rw-r--r--extra/postgresql/PKGBUILD22
-rw-r--r--extra/postgresql/postgresql-run-socket.patch12
-rw-r--r--extra/postgresql/postgresql.install4
-rw-r--r--extra/postgresql/postgresql.tmpfiles.conf1
-rw-r--r--extra/pygobject2/PKGBUILD40
-rw-r--r--extra/python-lxml/PKGBUILD17
-rw-r--r--extra/transmission/PKGBUILD14
-rw-r--r--extra/transmission/transmission-cli.install4
-rw-r--r--extra/usbview/PKGBUILD37
-rw-r--r--extra/usbview/usbview-1.1-gtk3-port.patch802
-rw-r--r--extra/usbview/usbview-1.1-missing-usbfs.patch11
-rw-r--r--extra/usbview/usbview.install11
-rw-r--r--extra/vim/PKGBUILD18
-rw-r--r--extra/vlc/PKGBUILD12
-rw-r--r--extra/xf86-video-intel/PKGBUILD8
-rw-r--r--extra/xf86-video-modesetting/PKGBUILD32
-rw-r--r--extra/xf86-video-nv/PKGBUILD9
-rw-r--r--extra/xf86-video-trident/PKGBUILD10
-rw-r--r--extra/xf86-video-trident/git_fixes.diff63
-rw-r--r--extra/xfce4-settings/PKGBUILD14
-rw-r--r--extra/xfce4-settings/xfce4-settings-4.10.0-check-service-name-of-nameownerchanged.patch55
-rw-r--r--extra/xfce4-settings/xfce4-settings-4.10.0-fix-gtk3-theme-detection.patch22
-rw-r--r--extra/xorg-server/0001-dix-fix-zaphod-screen-scrossing-54654.patch42
-rw-r--r--extra/xorg-server/PKGBUILD13
-rw-r--r--extra/zeitgeist/PKGBUILD19
-rw-r--r--java-ugly/junit/PKGBUILD55
-rwxr-xr-xjava-ugly/maven/PKGBUILD76
-rwxr-xr-xjava-ugly/maven/maven.csh2
-rwxr-xr-xjava-ugly/maven/maven.sh3
-rw-r--r--java-ugly/not-working/java-bnd/PKGBUILD24
-rwxr-xr-xjava/apache-ant/PKGBUILD110
-rwxr-xr-xjava/apache-ant/apache-ant.csh2
-rwxr-xr-xjava/apache-ant/apache-ant.sh2
-rw-r--r--java/arduino/PKGBUILD101
-rw-r--r--java/arduino/arduino.desktop9
-rw-r--r--java/arduino/arduino.install10
-rw-r--r--java/arduino/arduino.pngbin0 -> 47981 bytes
-rw-r--r--java/arduino/sig-patch.diff256
-rw-r--r--java/java-asm2/PKGBUILD18
-rw-r--r--java/java-asm2/PKGBUILD-bootstrap23
-rw-r--r--java/java-asm2/common.sh59
-rw-r--r--java/java-asm3/PKGBUILD17
-rw-r--r--java/java-jarjar/PKGBUILD49
-rw-r--r--java/java-jarjar/PKGBUILD-1.441
-rw-r--r--java/java-ow-util-ant-tasks/PKGBUILD27
-rw-r--r--java/java-ow-util-ant-tasks/SRCBUILD29
-rw-r--r--java/java-rxtx/ChangeLog.txt8
-rw-r--r--java/java-rxtx/PKGBUILD54
-rw-r--r--java/java-rxtx/destdir.patch20
-rw-r--r--java/java-rxtx/java7-configure.patch38
-rw-r--r--java/java-sonatype-oss-parent/PKGBUILD27
-rw-r--r--java/jh/PKGBUILD24
-rw-r--r--java/jna/PKGBUILD117
-rw-r--r--java/jna/bugfix-type-inference.patch13
-rw-r--r--java/jna/libre-without-clover.patch71
-rw-r--r--java/jna/webstart-test.keystorebin0 -> 679 bytes
-rw-r--r--java/not-working/closure-compiler/PKGBUILD73
-rw-r--r--java/not-working/closure-compiler/TODO2
-rw-r--r--java/not-working/java-asm4/PKGBUILD17
-rw-r--r--java/not-working/java-asm4/TODO1
-rw-r--r--java/not-working/java-guava/PKGBUILD34
-rw-r--r--java/not-working/java-guava/TODO2
-rw-r--r--java/not-working/junit-truth/PKGBUILD45
-rw-r--r--java/not-working/junit-truth/TODO1
-rw-r--r--java/not-working/protobuf/PKGBUILD99
-rw-r--r--java/not-working/protobuf/TODO5
-rw-r--r--libre/blender-libre/PKGBUILD135
-rwxr-xr-xlibre/blender-libre/blender-libre.install13
-rw-r--r--libre/django13/PKGBUILD47
-rw-r--r--libre/django13/PKGBUILD.orig40
-rw-r--r--libre/django13/diff-django_branches_releases_1.3.X-from-16768-to-17460.diff1573
-rw-r--r--libre/django13/diff-django_branches_releases_1.3.X-from-16771-to-17460.diff1575
-rw-r--r--libre/luxblend25/PKGBUILD46
-rwxr-xr-xlibre/parabola-archiso/PKGBUILD22
-rw-r--r--libre/parabolaweb-utils/PKGBUILD52
-rw-r--r--libre/parabolaweb-utils/helper.sh39
-rw-r--r--libre/parabolaweb-utils/parabolaweb-fcgi12
-rw-r--r--libre/parabolaweb-utils/parabolaweb-update81
-rw-r--r--libre/parabolaweb-utils/parabolaweb.conf3
-rw-r--r--libre/parabolaweb-utils/parabolaweb.rc43
-rw-r--r--libre/parabolaweb-utils/parabolaweb.service12
-rw-r--r--libre/tp_smapi-libre-lts/PKGBUILD60
-rw-r--r--libre/tp_smapi-libre-lts/tp_smapi-lts.install13
-rw-r--r--libre/virtualbox-libre-modules-lts/PKGBUILD10
-rw-r--r--libre/virtualbox-libre-modules/PKGBUILD4
-rw-r--r--libre/virtualbox-libre/001-vboxdrv-reference.patch112
-rwxr-xr-xlibre/virtualbox-libre/002-change_default_driver_dir.patch18
-rw-r--r--libre/virtualbox-libre/003-remove_qt_fa_IR.patch23
-rw-r--r--libre/virtualbox-libre/PKGBUILD38
-rw-r--r--libre/virtualbox-libre/libre.patch4907
-rw-r--r--libre/xulrunner-libre/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch20
-rw-r--r--libre/xulrunner-libre/PKGBUILD8
-rw-r--r--pcr/etckeeper/PKGBUILD43
-rw-r--r--pcr/etckeeper/etckeeper-archlinux.conf38
-rw-r--r--pcr/etckeeper/etckeeper-pacman.patch9
-rw-r--r--pcr/zoneminder/PKGBUILD163
-rw-r--r--pcr/zoneminder/httpd-zm.conf8
-rw-r--r--pcr/zoneminder/httpd-zoneminder.conf20
-rw-r--r--pcr/zoneminder/zoneminder63
-rw-r--r--pcr/zoneminder/zoneminder.install124
-rw-r--r--pcr/zoneminder/zoneminder.service1
-rw-r--r--staging/emacs/PKGBUILD41
-rw-r--r--staging/emacs/emacs.install32
-rw-r--r--staging/gegl/gegl-0.2.0-ffmpeg-0.11.diff12
-rw-r--r--staging/obex-data-server/PKGBUILD28
-rw-r--r--staging/pstoedit/PKGBUILD34
-rw-r--r--staging/pstoedit/pstoedit-3.50-parallel.patch47
-rw-r--r--staging/pstoedit/pstoedit-3.50-plugin-close.patch14
-rw-r--r--testing/btrfs-progs/btrfs-progs.install9
-rw-r--r--testing/kmod/0001-depmod-fix-parsing-of-modules.order-with-compressed-.patch165
-rw-r--r--testing/kmod/0001-libkmod-Add-support-for-.-in-module-parameter-on-kcm.patch33
-rw-r--r--testing/usermin/PKGBUILD134
-rw-r--r--testing/usermin/usermin-config.tar.bz2bin0 -> 951 bytes
-rw-r--r--testing/usermin/usermin.install34
-rw-r--r--testing/usermin/usermin.rc44
-rw-r--r--testing/usermin/usermin.service9
165 files changed, 10378 insertions, 5313 deletions
diff --git a/community-staging/devil/PKGBUILD b/community-staging/devil/PKGBUILD
new file mode 100644
index 000000000..f2ba5462d
--- /dev/null
+++ b/community-staging/devil/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 78557 2012-10-20 21:46:36Z lcarlier $
+# Maintainer: Laurent Carlier <lordheavym@gmail.org>
+# Contributor: damir <damir@archlinux.org>
+# Contributor: TheHoff <forums>
+
+pkgname=devil
+pkgver=1.7.8
+pkgrel=14
+pkgdesc="Library for reading several different image formats"
+arch=('i686' 'x86_64')
+url="http://openil.sourceforge.net/"
+depends=('libpng' 'libmng' 'jasper' 'lcms' 'openexr')
+install=devil.install
+options=('!libtool' '!docs' '!emptydirs')
+license=('GPL')
+source=(http://downloads.sourceforge.net/openil/DevIL-$pkgver.tar.gz libpng14.patch)
+md5sums=('7918f215524589435e5ec2e8736d5e1d'
+ '0f839ccefd43b0ee8b4b3f99806147fc')
+
+build() {
+ cd ${srcdir}/devil-$pkgver
+
+ patch -Np1 -i ${srcdir}/libpng14.patch
+
+ if [[ $CARCH == x86_64 ]]; then
+ ./configure --prefix=/usr --enable-ILU
+ else
+ ./configure --prefix=/usr --enable-ILU --disable-sse3
+ fi
+
+ make
+}
+
+package() {
+ cd ${srcdir}/devil-$pkgver
+
+ make prefix=${pkgdir}/usr install
+}
diff --git a/community-staging/devil/devil.install b/community-staging/devil/devil.install
new file mode 100644
index 000000000..8336ac3d1
--- /dev/null
+++ b/community-staging/devil/devil.install
@@ -0,0 +1,11 @@
+infodir=usr/share/info
+
+post_upgrade() {
+ [ -x usr/bin/install-info ] || return 0
+ install-info $infodir/DevIL_manual.info.gz $infodir/dir 2> /dev/null
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ install-info --delete $infodir/DevIL_manual.info.gz $infodir/dir 2> /dev/null
+}
diff --git a/community-staging/devil/libpng14.patch b/community-staging/devil/libpng14.patch
new file mode 100644
index 000000000..b8434692b
--- /dev/null
+++ b/community-staging/devil/libpng14.patch
@@ -0,0 +1,33 @@
+diff -Nur devil-1.7.8.orig/src-IL/src/il_icon.c devil-1.7.8/src-IL/src/il_icon.c
+--- devil-1.7.8.orig/src-IL/src/il_icon.c 2009-03-08 09:10:09.000000000 +0200
++++ devil-1.7.8/src-IL/src/il_icon.c 2010-01-17 00:54:09.000000000 +0200
+@@ -525,7 +525,7 @@
+
+ // Expand low-bit-depth grayscale images to 8 bits
+ if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
+- png_set_gray_1_2_4_to_8(ico_png_ptr);
++ png_set_expand_gray_1_2_4_to_8(ico_png_ptr);
+ }
+
+ // Expand RGB images with transparency to full alpha channels
+diff -Nur devil-1.7.8.orig/src-IL/src/il_png.c devil-1.7.8/src-IL/src/il_png.c
+--- devil-1.7.8.orig/src-IL/src/il_png.c 2009-03-08 09:10:09.000000000 +0200
++++ devil-1.7.8/src-IL/src/il_png.c 2010-01-17 00:55:26.000000000 +0200
+@@ -105,7 +105,7 @@
+ Read = iread(Signature, 1, 8);
+ iseek(-Read, IL_SEEK_CUR);
+
+- return png_check_sig(Signature, 8);
++ return png_sig_cmp(Signature, 0, 8) == 0;
+ }
+
+
+@@ -278,7 +278,7 @@
+
+ // Expand low-bit-depth grayscale images to 8 bits
+ if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ }
+
+ // Expand RGB images with transparency to full alpha channels
diff --git a/community-staging/supertux/PKGBUILD b/community-staging/supertux/PKGBUILD
new file mode 100644
index 000000000..a8e7d7245
--- /dev/null
+++ b/community-staging/supertux/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 78608 2012-10-22 02:52:34Z ebelanger $
+# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
+# Contributor: Eric Bélanger <eric@archlinux.org>
+# Contributor: vande198
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=supertux
+pkgver=0.3.3
+pkgrel=7
+pkgdesc="A classic 2D jump'n run sidescroller game in a style similar to the original SuperMario games"
+arch=('i686' 'x86_64')
+url="http://super-tux.sourceforge.net/"
+license=('GPL')
+depends=('sdl_image' 'curl' 'physfs' 'openal' 'libvorbis' 'glew')
+makedepends=('cmake' 'boost' 'mesa')
+source=(http://download.berlios.de/supertux/${pkgname}-${pkgver}.tar.bz2
+ supertux2-0.3.3-squirrel-gcc47.patch)
+md5sums=('f3f803e629ee51a9de0b366a036e393d'
+ 'eb06315514be4f200428f14b927beb66')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -p1 -i "${srcdir}/supertux2-0.3.3-squirrel-gcc47.patch"
+ sed -i '1i#include <cstddef>' src/supertux/screen_manager.hpp
+ sed -i '/types\.h/d' src/addon/addon_manager.cpp
+ cmake -D CMAKE_INSTALL_PREFIX=/usr -D INSTALL_SUBDIR_BIN=bin .
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/community-staging/supertux/supertux2-0.3.3-squirrel-gcc47.patch b/community-staging/supertux/supertux2-0.3.3-squirrel-gcc47.patch
new file mode 100644
index 000000000..16781b610
--- /dev/null
+++ b/community-staging/supertux/supertux2-0.3.3-squirrel-gcc47.patch
@@ -0,0 +1,36 @@
+diff -Naur supertux2-0.3.3.orig/external/squirrel/squirrel/sqmem.h supertux2-0.3.3/external/squirrel/squirrel/sqmem.h
+--- supertux2-0.3.3.orig/external/squirrel/squirrel/sqmem.h 1970-01-01 01:00:00.000000000 +0100
++++ supertux2-0.3.3/external/squirrel/squirrel/sqmem.h 2012-05-01 11:59:37.000000000 +0200
+@@ -0,0 +1,8 @@
++/* see copyright notice in squirrel.h */
++#ifndef _SQMEM_H_
++#define _SQMEM_H_
++
++void *sq_vm_malloc(SQUnsignedInteger size);
++void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
++void sq_vm_free(void *p,SQUnsignedInteger size);
++#endif //_SQMEM_H_
+diff -Naur supertux2-0.3.3.orig/external/squirrel/squirrel/sqstate.h supertux2-0.3.3/external/squirrel/squirrel/sqstate.h
+--- supertux2-0.3.3.orig/external/squirrel/squirrel/sqstate.h 2010-03-01 13:40:58.000000000 +0100
++++ supertux2-0.3.3/external/squirrel/squirrel/sqstate.h 2012-05-01 11:59:37.000000000 +0200
+@@ -136,8 +136,4 @@
+ extern SQObjectPtr _minusone_;
+
+ bool CompileTypemask(SQIntVec &res,const SQChar *typemask);
+-
+-void *sq_vm_malloc(SQUnsignedInteger size);
+-void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
+-void sq_vm_free(void *p,SQUnsignedInteger size);
+ #endif //_SQSTATE_H_
+diff -Naur supertux2-0.3.3.orig/external/squirrel/squirrel/squtils.h supertux2-0.3.3/external/squirrel/squirrel/squtils.h
+--- supertux2-0.3.3.orig/external/squirrel/squirrel/squtils.h 2010-03-01 13:40:58.000000000 +0100
++++ supertux2-0.3.3/external/squirrel/squirrel/squtils.h 2012-05-01 11:59:37.000000000 +0200
+@@ -2,6 +2,8 @@
+ #ifndef _SQUTILS_H_
+ #define _SQUTILS_H_
+
++#include "sqmem.h"
++
+ #define sq_new(__ptr,__type) {__ptr=(__type *)sq_vm_malloc(sizeof(__type));new (__ptr) __type;}
+ #define sq_delete(__ptr,__type) {__ptr->~__type();sq_vm_free(__ptr,sizeof(__type));}
+ #define SQ_MALLOC(__size) sq_vm_malloc((__size));
diff --git a/community-testing/activity-log-manager/PKGBUILD b/community-testing/activity-log-manager/PKGBUILD
new file mode 100644
index 000000000..0b27128a4
--- /dev/null
+++ b/community-testing/activity-log-manager/PKGBUILD
@@ -0,0 +1,42 @@
+# $Id: PKGBUILD 78598 2012-10-21 19:12:44Z bgyorgy $
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Ner0
+
+pkgname=activity-log-manager
+pkgver=0.9.4
+pkgrel=2
+pkgdesc="A graphical user interface which lets you easily control what gets logged by Zeitgeist"
+arch=('i686' 'x86_64')
+url="https://launchpad.net/activity-log-manager"
+license=('GPL2')
+depends=('gtk3' 'libgee' 'libzeitgeist' 'zeitgeist' 'hicolor-icon-theme' 'xdg-utils')
+makedepends=('vala' 'intltool')
+install=$pkgname.install
+source=(https://launchpad.net/$pkgname/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.gz
+ http://pkgbuild.com/~bgyorgy/sources/$pkgname-translations-20121021.tar.gz)
+md5sums=('cf85aecdaa6c0188a53d659709e1f8cd'
+ '6167df74ce44659aa94a89f31ff4d351')
+
+build() {
+ cd $pkgname-$pkgver
+
+ # Fix docdir location
+ sed -i 's/almdocdir =.*/almdocdir = ${docdir}/' Makefile.{am,in}
+
+ # Update language files
+ echo 'af ar ast be bg bn bs ca ca@valencia cs da de el eo es et eu fi fr gd gl he hi hr hu id it ja km ko ku lt lv mi ms my nb nl oc pl pt ro ru se si sk sl sr sv ta te ug uk uz vi zh_CN zh_HK zh_TW' >po/LINGUAS
+ rename $pkgname- '' ../po/$pkgname-*.po
+ mv -f -t po ../po/*
+
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ # We don't have Whoopsie on Arch Linux
+ rm -r "$pkgdir/etc" "$pkgdir"/usr/share/{applications/activity-log-manager-ccpanel.desktop,dbus-1,gnome-control-center,polkit-1}
+}
diff --git a/community-testing/activity-log-manager/activity-log-manager.install b/community-testing/activity-log-manager/activity-log-manager.install
new file mode 100644
index 000000000..2c455e952
--- /dev/null
+++ b/community-testing/activity-log-manager/activity-log-manager.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/community-testing/espeakup/PKGBUILD b/community-testing/espeakup/PKGBUILD
new file mode 100644
index 000000000..9ee2d9962
--- /dev/null
+++ b/community-testing/espeakup/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 78549 2012-10-20 19:23:23Z tomegun $
+# Contributor: Chris Brannon <chris@the-brannons.com>
+# Contributor: Kyle <kyle@gmx.ca>
+pkgname=espeakup
+pkgver=0.71
+pkgrel=5
+pkgdesc='Allows the Speakup screen review system to use the ESpeak synthesizer.'
+arch=('i686' 'x86_64')
+url="http://github.com/williamh/espeakup"
+license=('GPL3')
+source=("ftp://linux-speakup.org/pub/linux/goodies/${pkgname}-${pkgver}.tar.bz2"
+ espeakup espeakup.conf.d espeakup.service)
+depends=(speakup-utils espeak)
+backup=(etc/conf.d/espeakup)
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="${pkgdir}" install
+ install -m755 -D "${srcdir}/espeakup" "${pkgdir}/etc/rc.d/espeakup"
+ install -m644 -D "${srcdir}/espeakup.conf.d" "${pkgdir}/etc/conf.d/espeakup"
+ install -m644 -D "${srcdir}/espeakup.service" "${pkgdir}/usr/lib/systemd/system/espeakup.service"
+}
+md5sums=('03daa70b3db3f4f6fbb42c2ee428eda7'
+ '7cf0abd493710ed924b7bb7c8d279fb3'
+ '0f93974845b15efa12f5e7a74cc0eecd'
+ '0c11c50b128234cda8e1357e88cf7c43')
diff --git a/community-testing/espeakup/espeakup b/community-testing/espeakup/espeakup
new file mode 100644
index 000000000..94a71701a
--- /dev/null
+++ b/community-testing/espeakup/espeakup
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/conf.d/espeakup
+. /etc/rc.d/functions
+
+PID=`pidof espeakup`
+PIDFILE=/var/run/espeakup.pid
+case "$1" in
+ start)
+ stat_busy "Starting Espeakup"
+ if [ -z "$PID" ]; then
+ if [ -f $PIDFILE ]; then
+ rm $PIDFILE
+ fi
+ /usr/bin/espeakup $ESPEAKUP_ARGS
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon espeakup
+ stat_done
+ fi
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Espeakup"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon espeakup
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community-testing/espeakup/espeakup.conf.d b/community-testing/espeakup/espeakup.conf.d
new file mode 100644
index 000000000..66f7842c3
--- /dev/null
+++ b/community-testing/espeakup/espeakup.conf.d
@@ -0,0 +1,6 @@
+#
+# Arguments to be passed to espeakup.
+# Example:
+# ESPEAKUP_ARGS="--default-voice=fr"
+# will tell espeakup to use the French voice.
+ESPEAKUP_ARGS=""
diff --git a/community-testing/espeakup/espeakup.service b/community-testing/espeakup/espeakup.service
new file mode 100644
index 000000000..58d7d47fa
--- /dev/null
+++ b/community-testing/espeakup/espeakup.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Software speech output for Speakup
+
+[Service]
+Type=forking
+PIDFile=/run/espeakup.pid
+ExecStart=/usr/bin/espeakup
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/community-testing/gedit-plugins/PKGBUILD b/community-testing/gedit-plugins/PKGBUILD
new file mode 100644
index 000000000..44dc262a0
--- /dev/null
+++ b/community-testing/gedit-plugins/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 78582 2012-10-21 11:43:49Z ibiru $
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+# Contributor: Alexander Rødseth <rodseth@gmail.com>
+# Contributor: Hugo Doria <hugo@archlinux.org>
+# Contributor: Sergej Chodarev <sergejx@centrum.sk>
+# Contributor: zhuqin <zhuqin83@gmail.com>
+
+pkgname=gedit-plugins
+pkgver=3.6.1
+pkgrel=1
+pkgdesc="Plugins for gedit"
+arch=('x86_64' 'i686')
+license=('GPL')
+url="http://live.gnome.org/GeditPlugins"
+depends=('gedit' 'dbus-python')
+optdepends=('gucharmap: for charmap plugin'
+ 'vte3: for embedded terminal')
+makedepends=('intltool' 'gnome-doc-utils' 'vte3')
+options=('!libtool' '!emptydirs')
+install=gedit-plugins.install
+source=("http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver:0:3}/$pkgname-$pkgver.tar.xz")
+sha256sums=('c5e92830e6029110bf1117bd9f31b23a9ad907210b8cb37039772f5bfcf6d174')
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr --sysconfdir=/etc --with-plugins=all \
+ --disable-schemas-compile
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+}
+
+# vim:set ts=2 sw=2 et:
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..e0a5edfd4
--- /dev/null
+++ b/community-testing/gnome-packagekit/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 78514 2012-10-20 07:24:57Z jconder $
+# Maintainer: Jonathan Conder <jonno.conder@gmail.com>
+
+pkgname=gnome-packagekit
+pkgver=3.6.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=('desktop-file-utils' 'gtk3' 'hicolor-icon-theme' 'libnotify'
+ 'packagekit')
+makedepends=('gconf' 'gtk-doc' 'intltool' 'itstool' 'libcanberra' 'upower')
+optdepends=('polkit-gnome: required for privileged actions'
+ '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")
+sha256sums=('9f096ec72fb81a78c426d9747145405a8b99e1d8418978828796768c8532d676')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ _mime='application/x-xz-compressed-tar;application/x-servicepack;'
+ sed -i "s@MimeType=.*@MimeType=$_mime@" data/gpk-install-local-file.desktop.in
+
+ sed -i 's@python@python2@' python/enum-convertor.py
+ sed -i 's@python enum-convertor.py@python2 enum-convertor.py@' python/packagekit/Makefile.{am,in}
+
+ 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
+}
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/0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch b/community-testing/gnome-settings-daemon-updates/0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch
new file mode 100644
index 000000000..293a419df
--- /dev/null
+++ b/community-testing/gnome-settings-daemon-updates/0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch
@@ -0,0 +1,1473 @@
+From 79ead5309fe21e77cfe58adc6a9340953c2d52f4 Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard@hughsie.com>
+Date: Fri, 21 Sep 2012 11:56:53 +0100
+Subject: [PATCH] power and media-keys: Use logind for suspending and
+ rebooting the system
+
+Use the new logind features to suspend and resume but making sure we opt out
+of logind handling the sleep and power keys, and also inhibiting for lid close
+auto-suspend if there is an external monitor connected.
+
+Also use a delay inihibit for logind so that we can do actions on suspend like
+blanking the screen using the screensaver and also poking the screensaver on
+resume.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=680689
+---
+ plugins/common/Makefile.am | 4 +-
+ plugins/common/gsd-power-helper.c | 203 --------
+ plugins/common/gsd-power-helper.h | 35 --
+ plugins/media-keys/gsd-media-keys-manager.c | 156 +++++--
+ plugins/power/gsd-power-manager.c | 699 +++++++++++++++++++---------
+ 5 files changed, 595 insertions(+), 502 deletions(-)
+ delete mode 100644 plugins/common/gsd-power-helper.c
+ delete mode 100644 plugins/common/gsd-power-helper.h
+
+diff --git a/plugins/common/Makefile.am b/plugins/common/Makefile.am
+index 7e50db4..b0e907c 100644
+--- a/plugins/common/Makefile.am
++++ b/plugins/common/Makefile.am
+@@ -6,9 +6,7 @@ libcommon_la_SOURCES = \
+ gsd-keygrab.c \
+ gsd-keygrab.h \
+ gsd-input-helper.c \
+- gsd-input-helper.h \
+- gsd-power-helper.c \
+- gsd-power-helper.h
++ gsd-input-helper.h
+
+ libcommon_la_CPPFLAGS = \
+ $(AM_CPPFLAGS)
+diff --git a/plugins/common/gsd-power-helper.c b/plugins/common/gsd-power-helper.c
+deleted file mode 100644
+index 27d0eda..0000000
+--- a/plugins/common/gsd-power-helper.c
++++ /dev/null
+@@ -1,203 +0,0 @@
+-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+- *
+- * Copyright (C) 2012 Bastien Nocera <hadess@hadess.net>
+- *
+- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+- *
+- */
+-
+-#include "config.h"
+-
+-#include "gsd-power-helper.h"
+-
+-#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
+-#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
+-#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
+-
+-#define CONSOLEKIT_DBUS_NAME "org.freedesktop.ConsoleKit"
+-#define CONSOLEKIT_DBUS_PATH_MANAGER "/org/freedesktop/ConsoleKit/Manager"
+-#define CONSOLEKIT_DBUS_INTERFACE_MANAGER "org.freedesktop.ConsoleKit.Manager"
+-
+-#ifdef HAVE_SYSTEMD
+-static void
+-systemd_stop (void)
+-{
+- GDBusConnection *bus;
+-
+- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
+- g_dbus_connection_call (bus,
+- SYSTEMD_DBUS_NAME,
+- SYSTEMD_DBUS_PATH,
+- SYSTEMD_DBUS_INTERFACE,
+- "PowerOff",
+- g_variant_new ("(b)", FALSE),
+- NULL, 0, G_MAXINT, NULL, NULL, NULL);
+- g_object_unref (bus);
+-}
+-
+-static void
+-systemd_suspend (void)
+-{
+- GDBusConnection *bus;
+-
+- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
+- g_dbus_connection_call (bus,
+- SYSTEMD_DBUS_NAME,
+- SYSTEMD_DBUS_PATH,
+- SYSTEMD_DBUS_INTERFACE,
+- "Suspend",
+- g_variant_new ("(b)", TRUE),
+- NULL, 0, G_MAXINT, NULL, NULL, NULL);
+- g_object_unref (bus);
+-}
+-
+-static void
+-systemd_hibernate (void)
+-{
+- GDBusConnection *bus;
+-
+- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
+- g_dbus_connection_call (bus,
+- SYSTEMD_DBUS_NAME,
+- SYSTEMD_DBUS_PATH,
+- SYSTEMD_DBUS_INTERFACE,
+- "Hibernate",
+- g_variant_new ("(b)", TRUE),
+- NULL, 0, G_MAXINT, NULL, NULL, NULL);
+- g_object_unref (bus);
+-}
+-
+-#else /* HAVE_SYSTEMD */
+-
+-static void
+-consolekit_stop_cb (GObject *source_object,
+- GAsyncResult *res,
+- gpointer user_data)
+-{
+- GVariant *result;
+- GError *error = NULL;
+-
+- result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object),
+- res,
+- &error);
+- if (result == NULL) {
+- g_warning ("couldn't stop using ConsoleKit: %s",
+- error->message);
+- g_error_free (error);
+- } else {
+- g_variant_unref (result);
+- }
+-}
+-
+-static void
+-consolekit_stop (void)
+-{
+- GError *error = NULL;
+- GDBusProxy *proxy;
+-
+- /* power down the machine in a safe way */
+- proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+- G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
+- NULL,
+- CONSOLEKIT_DBUS_NAME,
+- CONSOLEKIT_DBUS_PATH_MANAGER,
+- CONSOLEKIT_DBUS_INTERFACE_MANAGER,
+- NULL, &error);
+- if (proxy == NULL) {
+- g_warning ("cannot connect to ConsoleKit: %s",
+- error->message);
+- g_error_free (error);
+- return;
+- }
+- g_dbus_proxy_call (proxy,
+- "Stop",
+- NULL,
+- G_DBUS_CALL_FLAGS_NONE,
+- -1, NULL,
+- consolekit_stop_cb, NULL);
+- g_object_unref (proxy);
+-}
+-static void
+-upower_sleep_cb (GObject *source_object,
+- GAsyncResult *res,
+- gpointer user_data)
+-{
+- GVariant *result;
+- GError *error = NULL;
+-
+- result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object),
+- res,
+- &error);
+- if (result == NULL) {
+- g_warning ("couldn't sleep using UPower: %s",
+- error->message);
+- g_error_free (error);
+- } else {
+- g_variant_unref (result);
+- }
+-}
+-
+-static void
+-upower_suspend (GDBusProxy *upower_proxy)
+-{
+- g_dbus_proxy_call (upower_proxy,
+- "Suspend",
+- NULL,
+- G_DBUS_CALL_FLAGS_NONE,
+- -1, NULL,
+- upower_sleep_cb, NULL);
+-}
+-
+-static void
+-upower_hibernate (GDBusProxy *upower_proxy)
+-{
+- g_dbus_proxy_call (upower_proxy,
+- "Hibernate",
+- NULL,
+- G_DBUS_CALL_FLAGS_NONE,
+- -1, NULL,
+- upower_sleep_cb, NULL);
+-}
+-#endif /* HAVE_SYSTEMD */
+-
+-void
+-gsd_power_suspend (GDBusProxy *upower_proxy)
+-{
+-#ifdef HAVE_SYSTEMD
+- systemd_suspend ();
+-#else
+- upower_suspend (upower_proxy);
+-#endif
+-}
+-
+-void
+-gsd_power_poweroff (void)
+-{
+-#ifdef HAVE_SYSTEMD
+- systemd_stop ();
+-#else
+- consolekit_stop ();
+-#endif
+-}
+-
+-void
+-gsd_power_hibernate (GDBusProxy *upower_proxy)
+-{
+-#ifdef HAVE_SYSTEMD
+- systemd_hibernate ();
+-#else
+- upower_hibernate (upower_proxy);
+-#endif
+-}
+diff --git a/plugins/common/gsd-power-helper.h b/plugins/common/gsd-power-helper.h
+deleted file mode 100644
+index e3be14f..0000000
+--- a/plugins/common/gsd-power-helper.h
++++ /dev/null
+@@ -1,35 +0,0 @@
+-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+- *
+- * Copyright (C) 2012 Bastien Nocera <hadess@hadess.net>
+- *
+- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+- */
+-
+-#ifndef __GSD_POWER_HELPER_H
+-#define __GSD_POWER_HELPER_H
+-
+-#include <glib.h>
+-
+-G_BEGIN_DECLS
+-
+-#include <gio/gio.h>
+-
+-void gsd_power_suspend (GDBusProxy *upower_proxy);
+-void gsd_power_hibernate (GDBusProxy *upower_proxy);
+-void gsd_power_poweroff (void);
+-
+-G_END_DECLS
+-
+-#endif /* __GSD_POWER_HELPER_H */
+diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
+index 9c84d7f..a2f277e 100644
+--- a/plugins/media-keys/gsd-media-keys-manager.c
++++ b/plugins/media-keys/gsd-media-keys-manager.c
+@@ -39,6 +39,7 @@
+ #include <gdk/gdkx.h>
+ #include <gtk/gtk.h>
+ #include <gio/gdesktopappinfo.h>
++#include <gio/gunixfdlist.h>
+
+ #ifdef HAVE_GUDEV
+ #include <gudev/gudev.h>
+@@ -51,7 +52,6 @@
+ #include "shortcuts-list.h"
+ #include "gsd-osd-window.h"
+ #include "gsd-input-helper.h"
+-#include "gsd-power-helper.h"
+ #include "gsd-enums.h"
+
+ #include <canberra.h>
+@@ -105,6 +105,10 @@ static const gchar introspection_xml[] =
+ #define KEY_CURRENT_INPUT_SOURCE "current"
+ #define KEY_INPUT_SOURCES "sources"
+
++#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
++#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
++#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
++
+ #define GSD_MEDIA_KEYS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_MEDIA_KEYS_MANAGER, GsdMediaKeysManagerPrivate))
+
+ typedef struct {
+@@ -148,10 +152,13 @@ struct GsdMediaKeysManagerPrivate
+
+ /* Power stuff */
+ GSettings *power_settings;
+- GDBusProxy *upower_proxy;
+ GDBusProxy *power_screen_proxy;
+ GDBusProxy *power_keyboard_proxy;
+
++ /* systemd stuff */
++ GDBusProxy *logind_proxy;
++ gint inhibit_keys_fd;
++
+ /* Multihead stuff */
+ GdkScreen *current_screen;
+ GSList *screens;
+@@ -1618,6 +1625,38 @@ do_toggle_contrast_action (GsdMediaKeysManager *manager)
+ }
+
+ static void
++power_action_suspend (GsdMediaKeysManager *manager)
++{
++#ifndef HAVE_SYSTEMD
++ g_warning ("no systemd support");
++ return;
++#endif
++ g_dbus_proxy_call (manager->priv->logind_proxy,
++ "Suspend",
++ g_variant_new ("(b)", TRUE),
++ G_DBUS_CALL_FLAGS_NONE,
++ G_MAXINT,
++ manager->priv->bus_cancellable,
++ NULL, NULL);
++}
++
++static void
++power_action_hibernate (GsdMediaKeysManager *manager)
++{
++#ifndef HAVE_SYSTEMD
++ g_warning ("no systemd support");
++ return;
++#endif
++ g_dbus_proxy_call (manager->priv->logind_proxy,
++ "Hibernate",
++ g_variant_new ("(b)", TRUE),
++ G_DBUS_CALL_FLAGS_NONE,
++ G_MAXINT,
++ manager->priv->bus_cancellable,
++ NULL, NULL);
++}
++
++static void
+ do_config_power_action (GsdMediaKeysManager *manager,
+ const gchar *config_key)
+ {
+@@ -1627,14 +1666,14 @@ do_config_power_action (GsdMediaKeysManager *manager,
+ config_key);
+ switch (action_type) {
+ case GSD_POWER_ACTION_SUSPEND:
+- gsd_power_suspend (manager->priv->upower_proxy);
++ power_action_suspend (manager);
+ break;
+ case GSD_POWER_ACTION_INTERACTIVE:
+ case GSD_POWER_ACTION_SHUTDOWN:
+ gnome_session_shutdown (manager);
+ break;
+ case GSD_POWER_ACTION_HIBERNATE:
+- gsd_power_hibernate (manager->priv->upower_proxy);
++ power_action_hibernate (manager);
+ break;
+ case GSD_POWER_ACTION_BLANK:
+ case GSD_POWER_ACTION_NOTHING:
+@@ -2248,6 +2287,7 @@ gsd_media_keys_manager_stop (GsdMediaKeysManager *manager)
+ }
+ #endif /* HAVE_GUDEV */
+
++ g_clear_object (&priv->logind_proxy);
+ if (priv->settings) {
+ g_object_unref (priv->settings);
+ priv->settings = NULL;
+@@ -2268,11 +2308,6 @@ gsd_media_keys_manager_stop (GsdMediaKeysManager *manager)
+ priv->power_keyboard_proxy = NULL;
+ }
+
+- if (priv->upower_proxy) {
+- g_object_unref (priv->upower_proxy);
+- priv->upower_proxy = NULL;
+- }
+-
+ if (priv->cancellable != NULL) {
+ g_cancellable_cancel (priv->cancellable);
+ g_object_unref (priv->cancellable);
+@@ -2363,9 +2398,85 @@ gsd_media_keys_manager_class_init (GsdMediaKeysManagerClass *klass)
+ }
+
+ static void
++inhibit_done (GObject *source,
++ GAsyncResult *result,
++ gpointer user_data)
++{
++ GDBusProxy *proxy = G_DBUS_PROXY (source);
++ GsdMediaKeysManager *manager = GSD_MEDIA_KEYS_MANAGER (user_data);
++ GError *error = NULL;
++ GVariant *res;
++ GUnixFDList *fd_list = NULL;
++ gint idx;
++
++ res = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, &fd_list, result, &error);
++ if (res == NULL) {
++ g_warning ("Unable to inhibit keypresses: %s", error->message);
++ g_error_free (error);
++ } else {
++ g_variant_get (res, "(h)", &idx);
++ manager->priv->inhibit_keys_fd = g_unix_fd_list_get (fd_list, idx, &error);
++ if (manager->priv->inhibit_keys_fd == -1) {
++ g_warning ("Failed to receive system inhibitor fd: %s", error->message);
++ g_error_free (error);
++ }
++ g_debug ("System inhibitor fd is %d", manager->priv->inhibit_keys_fd);
++ g_object_unref (fd_list);
++ g_variant_unref (res);
++ }
++}
++
++static void
+ gsd_media_keys_manager_init (GsdMediaKeysManager *manager)
+ {
++ GError *error;
++ GDBusConnection *bus;
++
++ error = NULL;
+ manager->priv = GSD_MEDIA_KEYS_MANAGER_GET_PRIVATE (manager);
++
++ bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
++ if (bus == NULL) {
++ g_warning ("Failed to connect to system bus: %s",
++ error->message);
++ g_error_free (error);
++ return;
++ }
++
++ manager->priv->logind_proxy =
++ g_dbus_proxy_new_sync (bus,
++ 0,
++ NULL,
++ SYSTEMD_DBUS_NAME,
++ SYSTEMD_DBUS_PATH,
++ SYSTEMD_DBUS_INTERFACE,
++ NULL,
++ &error);
++
++ if (manager->priv->logind_proxy == NULL) {
++ g_warning ("Failed to connect to systemd: %s",
++ error->message);
++ g_error_free (error);
++ }
++
++ g_object_unref (bus);
++
++ g_debug ("Adding system inhibitors for power keys");
++ manager->priv->inhibit_keys_fd = -1;
++ g_dbus_proxy_call_with_unix_fd_list (manager->priv->logind_proxy,
++ "Inhibit",
++ g_variant_new ("(ssss)",
++ "handle-power-key:handle-suspend-key:handle-hibernate-key",
++ g_get_user_name (),
++ "GNOME handling keypresses",
++ "block"),
++ 0,
++ G_MAXINT,
++ NULL,
++ NULL,
++ inhibit_done,
++ manager);
++
+ }
+
+ static void
+@@ -2382,6 +2493,8 @@ gsd_media_keys_manager_finalize (GObject *object)
+
+ if (media_keys_manager->priv->start_idle_id != 0)
+ g_source_remove (media_keys_manager->priv->start_idle_id);
++ if (media_keys_manager->priv->inhibit_keys_fd != -1)
++ close (media_keys_manager->priv->inhibit_keys_fd);
+
+ G_OBJECT_CLASS (gsd_media_keys_manager_parent_class)->finalize (object);
+ }
+@@ -2401,21 +2514,6 @@ xrandr_ready_cb (GObject *source_object,
+ }
+
+ static void
+-upower_ready_cb (GObject *source_object,
+- GAsyncResult *res,
+- GsdMediaKeysManager *manager)
+-{
+- GError *error = NULL;
+-
+- manager->priv->upower_proxy = g_dbus_proxy_new_finish (res, &error);
+- if (manager->priv->upower_proxy == NULL) {
+- g_warning ("Failed to get proxy for upower: %s",
+- error->message);
+- g_error_free (error);
+- }
+-}
+-
+-static void
+ power_screen_ready_cb (GObject *source_object,
+ GAsyncResult *res,
+ GsdMediaKeysManager *manager)
+@@ -2517,16 +2615,6 @@ register_manager (GsdMediaKeysManager *manager)
+ manager->priv->bus_cancellable,
+ (GAsyncReadyCallback) on_bus_gotten,
+ manager);
+-
+- g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM,
+- G_DBUS_PROXY_FLAGS_NONE,
+- NULL,
+- "org.freedesktop.UPower",
+- "/org/freedesktop/UPower",
+- "org.freedesktop.UPower",
+- NULL,
+- (GAsyncReadyCallback) upower_ready_cb,
+- manager);
+ }
+
+ GsdMediaKeysManager *
+diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
+index 070cf32..18fcedf 100644
+--- a/plugins/power/gsd-power-manager.c
++++ b/plugins/power/gsd-power-manager.c
+@@ -1,7 +1,7 @@
+ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
+- * Copyright (C) 2011 Richard Hughes <richard@hughsie.com>
++ * Copyright (C) 2011-2012 Richard Hughes <richard@hughsie.com>
+ * Copyright (C) 2011 Ritesh Khadgaray <khadgaray@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+@@ -32,6 +32,7 @@
+ #include <libupower-glib/upower.h>
+ #include <libnotify/notify.h>
+ #include <canberra-gtk.h>
++#include <gio/gunixfdlist.h>
+
+ #define GNOME_DESKTOP_USE_UNSTABLE_API
+ #include <libgnome-desktop/gnome-rr.h>
+@@ -43,7 +44,6 @@
+ #include "gnome-settings-session.h"
+ #include "gsd-enums.h"
+ #include "gsd-power-manager.h"
+-#include "gsd-power-helper.h"
+
+ #define GNOME_SESSION_DBUS_NAME "org.gnome.SessionManager"
+ #define GNOME_SESSION_DBUS_PATH "/org/gnome/SessionManager"
+@@ -78,6 +78,10 @@
+ #define GSD_POWER_MANAGER_RECALL_DELAY 30 /* seconds */
+ #define GSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT 30 /* seconds */
+
++#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
++#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
++#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
++
+ /* Keep this in sync with gnome-shell */
+ #define SCREENSAVER_FADE_TIME 10 /* seconds */
+
+@@ -193,14 +197,20 @@ struct GsdPowerManagerPrivate
+ ca_context *canberra_context;
+ ca_proplist *critical_alert_loop_props;
+ guint32 critical_alert_timeout_id;
+- GDBusProxy *screensaver_proxy;
+ GDBusProxy *session_proxy;
+ GDBusProxy *session_presence_proxy;
+ GpmIdletime *idletime;
+ GsdPowerIdleMode current_idle_mode;
+- guint lid_close_safety_timer_id;
+ GtkStatusIcon *status_icon;
+ guint xscreensaver_watchdog_timer_id;
++
++ /* systemd stuff */
++ GDBusProxy *logind_proxy;
++ gint inhibit_lid_switch_fd;
++ gboolean inhibit_lid_switch_taken;
++ gint inhibit_suspend_fd;
++ gboolean inhibit_suspend_taken;
++ guint inhibit_lid_switch_timer_id;
+ };
+
+ enum {
+@@ -217,8 +227,8 @@ static GIcon *engine_get_icon (GsdPowerManager *manager);
+ static gchar *engine_get_summary (GsdPowerManager *manager);
+ static void do_power_action_type (GsdPowerManager *manager, GsdPowerActionType action_type);
+ static void do_lid_closed_action (GsdPowerManager *manager);
+-static void lock_screensaver (GsdPowerManager *manager);
+-static void kill_lid_close_safety_timer (GsdPowerManager *manager);
++static void uninhibit_lid_switch (GsdPowerManager *manager);
++static gboolean external_monitor_is_connected (GnomeRRScreen *screen);
+
+ G_DEFINE_TYPE (GsdPowerManager, gsd_power_manager, G_TYPE_OBJECT)
+
+@@ -2048,6 +2058,57 @@ gnome_session_shutdown (void)
+ }
+
+ static void
++action_poweroff (GsdPowerManager *manager)
++{
++ if (manager->priv->logind_proxy == NULL) {
++ g_warning ("no systemd support");
++ return;
++ }
++ g_dbus_proxy_call (manager->priv->logind_proxy,
++ "PowerOff",
++ g_variant_new ("(b)", FALSE),
++ G_DBUS_CALL_FLAGS_NONE,
++ G_MAXINT,
++ NULL,
++ NULL,
++ NULL);
++}
++
++static void
++action_suspend (GsdPowerManager *manager)
++{
++ if (manager->priv->logind_proxy == NULL) {
++ g_warning ("no systemd support");
++ return;
++ }
++ g_dbus_proxy_call (manager->priv->logind_proxy,
++ "Suspend",
++ g_variant_new ("(b)", FALSE),
++ G_DBUS_CALL_FLAGS_NONE,
++ G_MAXINT,
++ NULL,
++ NULL,
++ NULL);
++}
++
++static void
++action_hibernate (GsdPowerManager *manager)
++{
++ if (manager->priv->logind_proxy == NULL) {
++ g_warning ("no systemd support");
++ return;
++ }
++ g_dbus_proxy_call (manager->priv->logind_proxy,
++ "Hibernate",
++ g_variant_new ("(b)", FALSE),
++ G_DBUS_CALL_FLAGS_NONE,
++ G_MAXINT,
++ NULL,
++ NULL,
++ NULL);
++}
++
++static void
+ do_power_action_type (GsdPowerManager *manager,
+ GsdPowerActionType action_type)
+ {
+@@ -2056,19 +2117,19 @@ do_power_action_type (GsdPowerManager *manager,
+
+ switch (action_type) {
+ case GSD_POWER_ACTION_SUSPEND:
+- gsd_power_suspend (manager->priv->upower_proxy);
++ action_suspend (manager);
+ break;
+ case GSD_POWER_ACTION_INTERACTIVE:
+ gnome_session_shutdown ();
+ break;
+ case GSD_POWER_ACTION_HIBERNATE:
+- gsd_power_hibernate (manager->priv->upower_proxy);
++ action_hibernate (manager);
+ break;
+ case GSD_POWER_ACTION_SHUTDOWN:
+ /* this is only used on critically low battery where
+ * hibernate is not available and is marginally better
+ * than just powering down the computer mid-write */
+- gsd_power_poweroff ();
++ action_poweroff (manager);
+ break;
+ case GSD_POWER_ACTION_BLANK:
+ ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
+@@ -2140,85 +2201,20 @@ upower_kbd_toggle (GsdPowerManager *manager,
+ return ret;
+ }
+
+-static void
+-do_lid_open_action (GsdPowerManager *manager)
+-{
+- gboolean ret;
+- GError *error = NULL;
+-
+- /* play a sound, using sounds from the naming spec */
+- ca_context_play (manager->priv->canberra_context, 0,
+- CA_PROP_EVENT_ID, "lid-open",
+- /* TRANSLATORS: this is the sound description */
+- CA_PROP_EVENT_DESCRIPTION, _("Lid has been opened"),
+- NULL);
+-
+- /* ensure we turn the panel back on after lid open */
+- ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
+- GNOME_RR_DPMS_ON,
+- &error);
+- if (!ret) {
+- g_warning ("failed to turn the panel on after lid open: %s",
+- error->message);
+- g_clear_error (&error);
+- }
+-
+- /* only toggle keyboard if present and already toggled off */
+- if (manager->priv->upower_kdb_proxy != NULL &&
+- manager->priv->kbd_brightness_old != -1) {
+- ret = upower_kbd_toggle (manager, &error);
+- if (!ret) {
+- g_warning ("failed to turn the kbd backlight on: %s",
+- error->message);
+- g_error_free (error);
+- }
+- }
+-
+- kill_lid_close_safety_timer (manager);
+-}
+-
+ static gboolean
+-is_on (GnomeRROutput *output)
++inhibit_lid_switch_timer_cb (GsdPowerManager *manager)
+ {
+- GnomeRRCrtc *crtc;
+-
+- crtc = gnome_rr_output_get_crtc (output);
+- if (!crtc)
+- return FALSE;
+- return gnome_rr_crtc_get_current_mode (crtc) != NULL;
+-}
+-
+-static gboolean
+-non_laptop_outputs_are_all_off (GnomeRRScreen *screen)
+-{
+- GnomeRROutput **outputs;
+- int i;
+-
+- outputs = gnome_rr_screen_list_outputs (screen);
+- for (i = 0; outputs[i] != NULL; i++) {
+- if (gnome_rr_output_is_laptop (outputs[i]))
+- continue;
+-
+- if (is_on (outputs[i]))
+- return FALSE;
++ if (!external_monitor_is_connected (manager->priv->x11_screen) ||
++ g_settings_get_boolean (manager->priv->settings,
++ "lid-close-suspend-with-external-monitor")) {
++ g_debug ("no external monitors for a while; uninhibiting lid close");
++ uninhibit_lid_switch (manager);
++ manager->priv->inhibit_lid_switch_timer_id = 0;
++ return G_SOURCE_REMOVE;
+ }
+
+- return TRUE;
+-}
+-
+-/* Timeout callback used to check conditions when the laptop's lid is closed but
+- * the machine is not suspended yet. We try to suspend again, so that the laptop
+- * won't overheat if placed in a backpack.
+- */
+-static gboolean
+-lid_close_safety_timer_cb (GsdPowerManager *manager)
+-{
+- manager->priv->lid_close_safety_timer_id = 0;
+-
+- g_debug ("lid has been closed for a while; trying to suspend again");
+- do_lid_closed_action (manager);
+-
+- return FALSE;
++ g_debug ("external monitor still there; trying again later");
++ return G_SOURCE_CONTINUE;
+ }
+
+ /* Sets up a timer to be triggered some seconds after closing the laptop lid
+@@ -2226,82 +2222,73 @@ lid_close_safety_timer_cb (GsdPowerManager *manager)
+ * again in the timeout handler to see if we can suspend then.
+ */
+ static void
+-setup_lid_close_safety_timer (GsdPowerManager *manager)
++setup_inhibit_lid_switch_timer (GsdPowerManager *manager)
+ {
+- if (manager->priv->lid_close_safety_timer_id != 0)
++ if (manager->priv->inhibit_lid_switch_timer_id != 0) {
++ g_debug ("lid close safety timer already set up");
+ return;
++ }
++
++ g_debug ("setting up lid close safety timer");
+
+- manager->priv->lid_close_safety_timer_id = g_timeout_add_seconds (GSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT,
+- (GSourceFunc) lid_close_safety_timer_cb,
++ manager->priv->inhibit_lid_switch_timer_id = g_timeout_add_seconds (GSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT,
++ (GSourceFunc) inhibit_lid_switch_timer_cb,
+ manager);
+- g_source_set_name_by_id (manager->priv->lid_close_safety_timer_id, "[GsdPowerManager] lid close safety timer");
++ g_source_set_name_by_id (manager->priv->inhibit_lid_switch_timer_id, "[GsdPowerManager] lid close safety timer");
+ }
+
+ static void
+-kill_lid_close_safety_timer (GsdPowerManager *manager)
++restart_inhibit_lid_switch_timer (GsdPowerManager *manager)
+ {
+- if (manager->priv->lid_close_safety_timer_id != 0) {
+- g_source_remove (manager->priv->lid_close_safety_timer_id);
+- manager->priv->lid_close_safety_timer_id = 0;
++ if (manager->priv->inhibit_lid_switch_timer_id != 0) {
++ g_debug ("restarting lid close safety timer");
++ g_source_remove (manager->priv->inhibit_lid_switch_timer_id);
++ manager->priv->inhibit_lid_switch_timer_id = 0;
++ setup_inhibit_lid_switch_timer (manager);
+ }
+ }
+
+ static void
+-suspend_with_lid_closed (GsdPowerManager *manager)
++do_lid_open_action (GsdPowerManager *manager)
+ {
+ gboolean ret;
+ GError *error = NULL;
+- GsdPowerActionType action_type;
+
+- /* maybe lock the screen if the lid is closed */
+- lock_screensaver (manager);
+-
+- /* we have different settings depending on AC state */
+- if (up_client_get_on_battery (manager->priv->up_client)) {
+- action_type = g_settings_get_enum (manager->priv->settings,
+- "lid-close-battery-action");
+- } else {
+- action_type = g_settings_get_enum (manager->priv->settings,
+- "lid-close-ac-action");
+- }
+-
+- /* check we won't melt when the lid is closed */
+- if (action_type != GSD_POWER_ACTION_SUSPEND &&
+- action_type != GSD_POWER_ACTION_HIBERNATE) {
+- if (up_client_get_lid_force_sleep (manager->priv->up_client)) {
+- g_warning ("to prevent damage, now forcing suspend");
+- do_power_action_type (manager, GSD_POWER_ACTION_SUSPEND);
+- return;
+- }
+- }
++ /* play a sound, using sounds from the naming spec */
++ ca_context_play (manager->priv->canberra_context, 0,
++ CA_PROP_EVENT_ID, "lid-open",
++ /* TRANSLATORS: this is the sound description */
++ CA_PROP_EVENT_DESCRIPTION, _("Lid has been opened"),
++ NULL);
+
+- /* ensure we turn the panel back on after resume */
++ /* ensure we turn the panel back on after lid open */
+ ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
+- GNOME_RR_DPMS_OFF,
++ GNOME_RR_DPMS_ON,
+ &error);
+ if (!ret) {
+- g_warning ("failed to turn the panel off after lid close: %s",
++ g_warning ("failed to turn the panel on after lid open: %s",
+ error->message);
+- g_error_free (error);
++ g_clear_error (&error);
+ }
+
+- /* only toggle keyboard if present and not already toggled */
+- if (manager->priv->upower_kdb_proxy &&
+- manager->priv->kbd_brightness_old == -1) {
++ /* only toggle keyboard if present and already toggled off */
++ if (manager->priv->upower_kdb_proxy != NULL &&
++ manager->priv->kbd_brightness_old != -1) {
+ ret = upower_kbd_toggle (manager, &error);
+ if (!ret) {
+- g_warning ("failed to turn the kbd backlight off: %s",
++ g_warning ("failed to turn the kbd backlight on: %s",
+ error->message);
+ g_error_free (error);
+ }
+ }
+-
+- do_power_action_type (manager, action_type);
+ }
+
+ static void
+ do_lid_closed_action (GsdPowerManager *manager)
+ {
++ gboolean ret;
++ GError *error = NULL;
++
+ /* play a sound, using sounds from the naming spec */
+ ca_context_play (manager->priv->canberra_context, 0,
+ CA_PROP_EVENT_ID, "lid-close",
+@@ -2309,21 +2296,22 @@ do_lid_closed_action (GsdPowerManager *manager)
+ CA_PROP_EVENT_DESCRIPTION, _("Lid has been closed"),
+ NULL);
+
++ /* turn the panel off if the lid is closed (mainly for Dells...) */
++ ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
++ GNOME_RR_DPMS_OFF,
++ &error);
++ if (!ret) {
++ g_warning ("failed to turn the panel off after lid close: %s",
++ error->message);
++ g_error_free (error);
++ }
++
+ /* refresh RANDR so we get an accurate view of what monitors are plugged in when the lid is closed */
+ gnome_rr_screen_refresh (manager->priv->x11_screen, NULL); /* NULL-GError */
+
+- /* perform policy action */
+- if (g_settings_get_boolean (manager->priv->settings, "lid-close-suspend-with-external-monitor")
+- || non_laptop_outputs_are_all_off (manager->priv->x11_screen)) {
+- g_debug ("lid is closed; suspending or hibernating");
+- suspend_with_lid_closed (manager);
+- } else {
+- g_debug ("lid is closed; not suspending nor hibernating since some external monitor outputs are still active");
+- setup_lid_close_safety_timer (manager);
+- }
++ restart_inhibit_lid_switch_timer (manager);
+ }
+
+-
+ static void
+ up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
+ {
+@@ -2343,6 +2331,7 @@ up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
+ if (manager->priv->lid_is_closed == tmp)
+ return;
+ manager->priv->lid_is_closed = tmp;
++ g_debug ("up changed: lid is now %s", tmp ? "closed" : "open");
+
+ /* fake a keypress */
+ if (tmp)
+@@ -3294,30 +3283,6 @@ gsd_power_manager_class_init (GsdPowerManagerClass *klass)
+ }
+
+ static void
+-sleep_cb_screensaver_proxy_ready_cb (GObject *source_object,
+- GAsyncResult *res,
+- gpointer user_data)
+-{
+- GError *error = NULL;
+- GsdPowerManager *manager = GSD_POWER_MANAGER (user_data);
+-
+- manager->priv->screensaver_proxy = g_dbus_proxy_new_for_bus_finish (res, &error);
+- if (manager->priv->screensaver_proxy == NULL) {
+- g_warning ("Could not connect to gnome-screensaver: %s",
+- error->message);
+- g_error_free (error);
+- return;
+- }
+-
+- /* Finish the upower_notify_sleep_cb() call by locking the screen */
+- g_debug ("gnome-screensaver activated, doing gnome-screensaver lock");
+- g_dbus_proxy_call (manager->priv->screensaver_proxy,
+- "Lock",
+- NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+- NULL, NULL, NULL);
+-}
+-
+-static void
+ idle_dbus_signal_cb (GDBusProxy *proxy,
+ const gchar *sender_name,
+ const gchar *signal_name,
+@@ -3469,75 +3434,38 @@ out:
+ }
+
+ static void
+-lock_screensaver (GsdPowerManager *manager)
++lock_screensaver (GsdPowerManager *manager,
++ GSourceFunc done_cb)
+ {
+ gboolean do_lock;
+
+ do_lock = g_settings_get_boolean (manager->priv->settings_screensaver,
+ "lock-enabled");
+- if (!do_lock)
++ if (!do_lock && done_cb) {
++ done_cb (manager);
+ return;
+-
+- if (manager->priv->screensaver_proxy != NULL) {
+- g_debug ("doing gnome-screensaver lock");
+- g_dbus_proxy_call (manager->priv->screensaver_proxy,
+- "Lock",
+- NULL, G_DBUS_CALL_FLAGS_NONE, -1,
+- NULL, NULL, NULL);
+- } else {
+- /* connect to the screensaver first */
+- g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
+- G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
+- NULL,
+- GS_DBUS_NAME,
+- GS_DBUS_PATH,
+- GS_DBUS_INTERFACE,
+- NULL,
+- sleep_cb_screensaver_proxy_ready_cb,
+- manager);
+ }
+-}
+-
+-static void
+-upower_notify_sleep_cb (UpClient *client,
+- UpSleepKind sleep_kind,
+- GsdPowerManager *manager)
+-{
+- lock_screensaver (manager);
+-}
+-
+-static void
+-upower_notify_resume_cb (UpClient *client,
+- UpSleepKind sleep_kind,
+- GsdPowerManager *manager)
+-{
+- gboolean ret;
+- GError *error = NULL;
+-
+- /* this displays the unlock dialogue so the user doesn't have
+- * to move the mouse or press any key before the window comes up */
+- if (manager->priv->screensaver_proxy != NULL) {
+- g_dbus_proxy_call (manager->priv->screensaver_proxy,
+- "SimulateUserActivity",
+- NULL,
+- G_DBUS_CALL_FLAGS_NONE,
+- -1, NULL, NULL, NULL);
+- }
+-
+- /* close existing notifications on resume, the system power
+- * state is probably different now */
+- notify_close_if_showing (manager->priv->notification_low);
+- notify_close_if_showing (manager->priv->notification_discharging);
+
+- /* ensure we turn the panel back on after resume */
+- ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
+- GNOME_RR_DPMS_ON,
+- &error);
+- if (!ret) {
+- g_warning ("failed to turn the panel on after resume: %s",
+- error->message);
+- g_error_free (error);
+- }
++ g_dbus_connection_call (manager->priv->connection,
++ GS_DBUS_NAME,
++ GS_DBUS_PATH,
++ GS_DBUS_INTERFACE,
++ "Lock",
++ NULL, NULL,
++ G_DBUS_CALL_FLAGS_NONE, -1,
++ NULL, NULL, NULL);
++
++ /* Wait until gnome-shell shield animation is done
++ *
++ * FIXME: the shell should mark the lock as active
++ * when the shield is down, then we could wait for
++ * that. This would also fix the problem that we wait
++ * needlessly when the shell has already locked the
++ * screen because it is initiating the suspend.
++ *
++ * https://bugzilla.gnome.org/show_bug.cgi?id=685053
++ */
++ g_timeout_add (500, done_cb, manager);
+ }
+
+ static void
+@@ -3696,6 +3624,287 @@ disable_builtin_screensaver (gpointer unused)
+ return TRUE;
+ }
+
++static void
++inhibit_lid_switch_done (GObject *source,
++ GAsyncResult *result,
++ gpointer user_data)
++{
++ GDBusProxy *proxy = G_DBUS_PROXY (source);
++ GsdPowerManager *manager = GSD_POWER_MANAGER (user_data);
++ GError *error = NULL;
++ GVariant *res;
++ GUnixFDList *fd_list = NULL;
++ gint idx;
++
++ res = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, &fd_list, result, &error);
++ if (res == NULL) {
++ g_warning ("Unable to inhibit lid switch: %s", error->message);
++ g_error_free (error);
++ } else {
++ g_variant_get (res, "(h)", &idx);
++ manager->priv->inhibit_lid_switch_fd = g_unix_fd_list_get (fd_list, idx, &error);
++ if (manager->priv->inhibit_lid_switch_fd == -1) {
++ g_warning ("Failed to receive system inhibitor fd: %s", error->message);
++ g_error_free (error);
++ }
++ g_debug ("System inhibitor fd is %d", manager->priv->inhibit_lid_switch_fd);
++ g_object_unref (fd_list);
++ g_variant_unref (res);
++ }
++}
++
++static void
++inhibit_lid_switch (GsdPowerManager *manager)
++{
++ GVariant *params;
++
++ if (manager->priv->inhibit_lid_switch_taken) {
++ g_debug ("already inhibited lid-switch");
++ return;
++ }
++ g_debug ("Adding lid switch system inhibitor");
++ manager->priv->inhibit_lid_switch_taken = TRUE;
++
++ params = g_variant_new ("(ssss)",
++ "handle-lid-switch",
++ g_get_user_name (),
++ "Multiple displays attached",
++ "block");
++ g_dbus_proxy_call_with_unix_fd_list (manager->priv->logind_proxy,
++ "Inhibit",
++ params,
++ 0,
++ G_MAXINT,
++ NULL,
++ NULL,
++ inhibit_lid_switch_done,
++ manager);
++}
++
++static void
++uninhibit_lid_switch (GsdPowerManager *manager)
++{
++ if (manager->priv->inhibit_lid_switch_fd == -1) {
++ g_debug ("no lid-switch inhibitor");
++ return;
++ }
++ g_debug ("Removing lid switch system inhibitor");
++ close (manager->priv->inhibit_lid_switch_fd);
++ manager->priv->inhibit_lid_switch_fd = -1;
++ manager->priv->inhibit_lid_switch_taken = FALSE;
++}
++
++static void
++inhibit_suspend_done (GObject *source,
++ GAsyncResult *result,
++ gpointer user_data)
++{
++ GDBusProxy *proxy = G_DBUS_PROXY (source);
++ GsdPowerManager *manager = GSD_POWER_MANAGER (user_data);
++ GError *error = NULL;
++ GVariant *res;
++ GUnixFDList *fd_list = NULL;
++ gint idx;
++
++ res = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, &fd_list, result, &error);
++ if (res == NULL) {
++ g_warning ("Unable to inhibit suspend: %s", error->message);
++ g_error_free (error);
++ } else {
++ g_variant_get (res, "(h)", &idx);
++ manager->priv->inhibit_suspend_fd = g_unix_fd_list_get (fd_list, idx, &error);
++ if (manager->priv->inhibit_suspend_fd == -1) {
++ g_warning ("Failed to receive system inhibitor fd: %s", error->message);
++ g_error_free (error);
++ }
++ g_debug ("System inhibitor fd is %d", manager->priv->inhibit_suspend_fd);
++ g_object_unref (fd_list);
++ g_variant_unref (res);
++ }
++}
++
++/* We take a delay inhibitor here, which causes logind to send a
++ * PrepareToSleep signal, which gives us a chance to lock the screen
++ * and do some other preparations.
++ */
++static void
++inhibit_suspend (GsdPowerManager *manager)
++{
++ if (manager->priv->inhibit_suspend_taken) {
++ g_debug ("already inhibited lid-switch");
++ return;
++ }
++ g_debug ("Adding suspend delay inhibitor");
++ manager->priv->inhibit_suspend_taken = TRUE;
++ g_dbus_proxy_call_with_unix_fd_list (manager->priv->logind_proxy,
++ "Inhibit",
++ g_variant_new ("(ssss)",
++ "sleep",
++ g_get_user_name (),
++ "GNOME needs to lock the screen",
++ "delay"),
++ 0,
++ G_MAXINT,
++ NULL,
++ NULL,
++ inhibit_suspend_done,
++ manager);
++}
++
++static void
++uninhibit_suspend (GsdPowerManager *manager)
++{
++ if (manager->priv->inhibit_suspend_fd == -1) {
++ g_debug ("no suspend delay inhibitor");
++ return;
++ }
++ g_debug ("Removing suspend delay inhibitor");
++ close (manager->priv->inhibit_suspend_fd);
++ manager->priv->inhibit_suspend_fd = -1;
++ manager->priv->inhibit_suspend_taken = TRUE;
++}
++
++static gboolean
++randr_output_is_on (GnomeRROutput *output)
++{
++ GnomeRRCrtc *crtc;
++
++ crtc = gnome_rr_output_get_crtc (output);
++ if (!crtc)
++ return FALSE;
++ return gnome_rr_crtc_get_current_mode (crtc) != NULL;
++}
++
++static gboolean
++external_monitor_is_connected (GnomeRRScreen *screen)
++{
++ GnomeRROutput **outputs;
++ guint i;
++
++ if (g_file_test ("/tmp/external_connected", G_FILE_TEST_EXISTS))
++ return TRUE;
++
++ /* see if we have more than one screen plugged in */
++ outputs = gnome_rr_screen_list_outputs (screen);
++ for (i = 0; outputs[i] != NULL; i++) {
++ if (randr_output_is_on (outputs[i]) &&
++ !gnome_rr_output_is_laptop (outputs[i]))
++ return TRUE;
++ }
++
++ return FALSE;
++}
++
++static void
++on_randr_event (GnomeRRScreen *screen, gpointer user_data)
++{
++ GsdPowerManager *manager = GSD_POWER_MANAGER (user_data);
++
++ /* when a second monitor is plugged in, we take the
++ * handle-lid-switch inhibitor lock of logind to prevent
++ * it from suspending.
++ *
++ * Uninhibiting is done in the inhibit_lid_switch_timer,
++ * since we want to give users a few seconds when unplugging
++ * and replugging an external monitor, not suspend right away.
++ */
++ if (external_monitor_is_connected (screen) &&
++ !g_settings_get_boolean (manager->priv->settings,
++ "lid-close-suspend-with-external-monitor")) {
++ inhibit_lid_switch (manager);
++ setup_inhibit_lid_switch_timer (manager);
++ }
++ else {
++ restart_inhibit_lid_switch_timer (manager);
++ }
++}
++
++static gboolean
++screen_lock_done_cb (gpointer data)
++{
++ GsdPowerManager *manager = data;
++
++ /* lift the delay inhibit, so logind can proceed */
++ uninhibit_suspend (manager);
++
++ return FALSE;
++}
++
++static void
++handle_suspend_actions (GsdPowerManager *manager)
++{
++ gboolean ret;
++ GError *error = NULL;
++
++ /* ensure we turn the panel back on after resume */
++ ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
++ GNOME_RR_DPMS_ON,
++ &error);
++ if (!ret) {
++ g_warning ("failed to turn the panel on after resume: %s",
++ error->message);
++ g_error_free (error);
++ }
++
++ lock_screensaver (manager, screen_lock_done_cb);
++}
++
++static void
++handle_resume_actions (GsdPowerManager *manager)
++{
++ gboolean ret;
++ GError *error = NULL;
++
++ /* this displays the unlock dialogue so the user doesn't have
++ * to move the mouse or press any key before the window comes up */
++ g_dbus_connection_call (manager->priv->connection,
++ GS_DBUS_NAME,
++ GS_DBUS_PATH,
++ GS_DBUS_INTERFACE,
++ "SimulateUserActivity",
++ NULL, NULL,
++ G_DBUS_CALL_FLAGS_NONE, -1,
++ NULL, NULL, NULL);
++
++ /* close existing notifications on resume, the system power
++ * state is probably different now */
++ notify_close_if_showing (manager->priv->notification_low);
++ notify_close_if_showing (manager->priv->notification_discharging);
++
++ /* ensure we turn the panel back on after resume */
++ ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
++ GNOME_RR_DPMS_ON,
++ &error);
++ if (!ret) {
++ g_warning ("failed to turn the panel on after resume: %s",
++ error->message);
++ g_error_free (error);
++ }
++
++ /* set up the delay again */
++ inhibit_suspend (manager);
++}
++
++static void
++logind_proxy_signal_cb (GDBusProxy *proxy,
++ const gchar *sender_name,
++ const gchar *signal_name,
++ GVariant *parameters,
++ gpointer user_data)
++{
++ GsdPowerManager *manager = GSD_POWER_MANAGER (user_data);
++ gboolean is_about_to_suspend;
++
++ if (g_strcmp0 (signal_name, "PrepareForSleep") != 0)
++ return;
++ g_variant_get (parameters, "(b)", &is_about_to_suspend);
++ if (is_about_to_suspend) {
++ handle_suspend_actions (manager);
++ } else {
++ handle_resume_actions (manager);
++ }
++}
++
+ gboolean
+ gsd_power_manager_start (GsdPowerManager *manager,
+ GError **error)
+@@ -3705,6 +3914,25 @@ gsd_power_manager_start (GsdPowerManager *manager,
+ g_debug ("Starting power manager");
+ gnome_settings_profile_start (NULL);
+
++ manager->priv->logind_proxy =
++ g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
++ 0,
++ NULL,
++ SYSTEMD_DBUS_NAME,
++ SYSTEMD_DBUS_PATH,
++ SYSTEMD_DBUS_INTERFACE,
++ NULL,
++ error);
++ if (manager->priv->logind_proxy == NULL) {
++ g_warning ("no systemd support");
++ return FALSE;
++ }
++ g_signal_connect (manager->priv->logind_proxy, "g-signal",
++ G_CALLBACK (logind_proxy_signal_cb),
++ manager);
++ /* Set up a delay inhibitor to be informed about suspend attempts */
++ inhibit_suspend (manager);
++
+ /* track the active session */
+ manager->priv->session = gnome_settings_session_new ();
+ g_signal_connect (manager->priv->session, "notify::state",
+@@ -3719,10 +3947,6 @@ gsd_power_manager_start (GsdPowerManager *manager,
+ G_CALLBACK (engine_settings_key_changed_cb), manager);
+ manager->priv->settings_screensaver = g_settings_new ("org.gnome.desktop.screensaver");
+ manager->priv->up_client = up_client_new ();
+- g_signal_connect (manager->priv->up_client, "notify-sleep",
+- G_CALLBACK (upower_notify_sleep_cb), manager);
+- g_signal_connect (manager->priv->up_client, "notify-resume",
+- G_CALLBACK (upower_notify_resume_cb), manager);
+ manager->priv->lid_is_closed = up_client_get_lid_is_closed (manager->priv->up_client);
+ g_signal_connect (manager->priv->up_client, "device-added",
+ G_CALLBACK (engine_device_added_cb), manager);
+@@ -3836,6 +4060,9 @@ gsd_power_manager_start (GsdPowerManager *manager,
+ manager->priv->x11_screen = gnome_rr_screen_new (gdk_screen_get_default (), error);
+ if (manager->priv->x11_screen == NULL)
+ return FALSE;
++ g_signal_connect (manager->priv->x11_screen, "changed", G_CALLBACK (on_randr_event), manager);
++ /* set up initial state */
++ on_randr_event (manager->priv->x11_screen, manager);
+
+ /* ensure the default dpms timeouts are cleared */
+ ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
+@@ -3865,6 +4092,11 @@ gsd_power_manager_stop (GsdPowerManager *manager)
+ {
+ g_debug ("Stopping power manager");
+
++ if (manager->priv->inhibit_lid_switch_timer_id != 0) {
++ g_source_remove (manager->priv->inhibit_lid_switch_timer_id);
++ manager->priv->inhibit_lid_switch_timer_id = 0;
++ }
++
+ if (manager->priv->bus_cancellable != NULL) {
+ g_cancellable_cancel (manager->priv->bus_cancellable);
+ g_object_unref (manager->priv->bus_cancellable);
+@@ -3876,8 +4108,6 @@ gsd_power_manager_stop (GsdPowerManager *manager)
+ manager->priv->introspection_data = NULL;
+ }
+
+- kill_lid_close_safety_timer (manager);
+-
+ g_signal_handlers_disconnect_by_data (manager->priv->up_client, manager);
+
+ g_clear_object (&manager->priv->connection);
+@@ -3885,6 +4115,19 @@ gsd_power_manager_stop (GsdPowerManager *manager)
+ g_clear_object (&manager->priv->settings);
+ g_clear_object (&manager->priv->settings_screensaver);
+ g_clear_object (&manager->priv->up_client);
++
++ if (manager->priv->inhibit_lid_switch_fd != -1) {
++ close (manager->priv->inhibit_lid_switch_fd);
++ manager->priv->inhibit_lid_switch_fd = -1;
++ manager->priv->inhibit_lid_switch_taken = FALSE;
++ }
++ if (manager->priv->inhibit_suspend_fd != -1) {
++ close (manager->priv->inhibit_suspend_fd);
++ manager->priv->inhibit_suspend_fd = -1;
++ manager->priv->inhibit_suspend_taken = FALSE;
++ }
++
++ g_clear_object (&manager->priv->logind_proxy);
+ g_clear_object (&manager->priv->x11_screen);
+
+ g_ptr_array_unref (manager->priv->devices_array);
+@@ -3918,6 +4161,8 @@ static void
+ gsd_power_manager_init (GsdPowerManager *manager)
+ {
+ manager->priv = GSD_POWER_MANAGER_GET_PRIVATE (manager);
++ manager->priv->inhibit_lid_switch_fd = -1;
++ manager->priv->inhibit_suspend_fd = -1;
+ }
+
+ static void
+--
+1.7.12.2
+
diff --git a/community-testing/gnome-settings-daemon-updates/PKGBUILD b/community-testing/gnome-settings-daemon-updates/PKGBUILD
new file mode 100644
index 000000000..ad446e3f6
--- /dev/null
+++ b/community-testing/gnome-settings-daemon-updates/PKGBUILD
@@ -0,0 +1,52 @@
+# $Id: PKGBUILD 78516 2012-10-20 07:29:43Z jconder $
+# Maintainer: Jonathan Conder <jonno.conder@gmail.com>
+
+_pkgname=gnome-settings-daemon
+pkgname=$_pkgname-updates
+pkgver=3.6.1
+pkgrel=1
+pkgdesc="Updates plugin for the GNOME Settings daemon"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('gnome-packagekit' "$_pkgname")
+makedepends=('intltool' 'gtk-doc' 'gnome-desktop' 'gnome-common' 'xf86-input-wacom')
+options=('!emptydirs' '!libtool')
+install=$_pkgname.install
+url="http://www.gnome.org"
+source=("http://ftp.gnome.org/pub/gnome/sources/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.xz"
+ 'screensaver.patch'
+ '0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch'
+ 'arch.patch')
+sha256sums=('1fe96e0709d7c618d90cc1bfcddc46eede3c2cdb305f5e7f4cb388d43dd5526a'
+ 'd2c32fa0262e4d0e97fc07fb631ad2627b4f2ae273e2cb3028236d9725711880'
+ 'f23db348593f58da755889928d7fa75817479d9ad5be67cc7a2f8cbc5db23632'
+ '32f18a02698bb24aa8ae293eb7bf74a8261e3ce2c5149d259a87bd14500089ea')
+
+build() {
+ cd "$srcdir/$_pkgname-$pkgver"
+
+ patch -Np1 -i "$srcdir/screensaver.patch"
+ patch -Np1 -i "$srcdir/0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch"
+ patch -Np1 -i "$srcdir/arch.patch"
+
+ aclocal
+ automake
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib/gnome-settings-daemon \
+ --disable-static \
+ --enable-systemd
+
+ #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..df70cd9f8
--- /dev/null
+++ b/community-testing/gnome-settings-daemon-updates/arch.patch
@@ -0,0 +1,325 @@
+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 9af2718..bb45e48 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
+@@ -16,7 +16,7 @@
+ <_description>Use mobile broadband connections such as GSM and CDMA to check for updates.</_description>
+ </key>
+ <key name="auto-download-updates" type="b">
+- <default>true</default>
++ <default>false</default>
+ <_summary>Automatically download updates in the background without confirmation</_summary>
+ <_description>Automatically download updates in the background without confirmation. Updates will be auto-downloaded when using wired network connnections, and mobile broadband if 'connection-use-mobile' is enabled.</_description>
+ </key>
+@@ -36,7 +36,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 81c7179..6fd3534 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 95ee1c4..7b26c06 100644
+--- a/plugins/updates/gsd-updates-manager.c
++++ b/plugins/updates/gsd-updates-manager.c
+@@ -33,6 +33,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"
+
+@@ -47,6 +48,7 @@ struct GsdUpdatesManagerPrivate
+ GCancellable *cancellable;
+ GsdUpdatesRefresh *refresh;
+ GsdUpdatesFirmware *firmware;
++ GsdUpdatesWatch *watch;
+ GSettings *settings_proxy;
+ GSettings *settings_ftp;
+ GSettings *settings_gsd;
+@@ -1360,6 +1362,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 proxy settings */
+ manager->priv->settings_proxy = g_settings_new ("org.gnome.system.proxy");
+ g_signal_connect (manager->priv->settings_proxy, "changed",
+@@ -1455,6 +1460,7 @@ gsd_updates_manager_stop (GsdUpdatesManager *manager)
+ g_clear_object (&manager->priv->task);
+ g_clear_object (&manager->priv->refresh);
+ g_clear_object (&manager->priv->firmware);
++ g_clear_object (&manager->priv->watch);
+ g_clear_object (&manager->priv->proxy_session);
+ g_clear_object (&manager->priv->volume_monitor);
+ g_clear_object (&manager->priv->cancellable);
+diff --git a/plugins/updates/gsd-updates-watch.c b/plugins/updates/gsd-updates-watch.c
+new file mode 100644
+index 0000000..d3a0202
+--- /dev/null
++++ b/plugins/updates/gsd-updates-watch.c
+@@ -0,0 +1,186 @@
++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
++ *
++ * Copyright (C) 2011-2012 Jonathan Conder <jonno.conder@gmail.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
++on_notification_closed (NotifyNotification *notification, gpointer data)
++{
++ g_object_unref (notification);
++}
++
++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);
++
++ g_signal_connect (notification, "closed", G_CALLBACK (on_notification_closed), NULL);
++ 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..439464f
+--- /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) 2011-2012 Jonathan Conder <jonno.conder@gmail.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..f7e8c46ac
--- /dev/null
+++ b/community-testing/gnome-settings-daemon-updates/gnome-settings-daemon.install
@@ -0,0 +1,12 @@
+post_install() {
+ glib-compile-schemas /usr/share/glib-2.0/schemas
+ gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/community-testing/gnome-settings-daemon-updates/screensaver.patch b/community-testing/gnome-settings-daemon-updates/screensaver.patch
new file mode 100644
index 000000000..bbcfe3430
--- /dev/null
+++ b/community-testing/gnome-settings-daemon-updates/screensaver.patch
@@ -0,0 +1,145 @@
+From b47e4019a12ac84fba31e1c631d878ce03fa3808 Mon Sep 17 00:00:00 2001
+From: Rui Matos <tiagomatos@gmail.com>
+Date: Wed, 17 Oct 2012 22:44:54 +0000
+Subject: power: Add a watchdog to keep X's builtin screen saver disabled
+
+X's builtin screen saver may activate DPMS. Since we want to activate
+DPMS ourselves according to our own policy we must make sure that X's
+screen saver remains disabled.
+
+This code is a copy of the original found in gs-watcher-x11.c from
+gnome-screensaver which stopped being used in GNOME 3.6.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=686339
+---
+diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
+index 0e06495..070cf32 100644
+--- a/plugins/power/gsd-power-manager.c
++++ b/plugins/power/gsd-power-manager.c
+@@ -27,6 +27,7 @@
+ #include <stdio.h>
+ #include <sys/wait.h>
+ #include <glib/gi18n.h>
++#include <gdk/gdkx.h>
+ #include <gtk/gtk.h>
+ #include <libupower-glib/upower.h>
+ #include <libnotify/notify.h>
+@@ -80,6 +81,8 @@
+ /* Keep this in sync with gnome-shell */
+ #define SCREENSAVER_FADE_TIME 10 /* seconds */
+
++#define XSCREENSAVER_WATCHDOG_TIMEOUT 120 /* seconds */
++
+ enum {
+ GSD_POWER_IDLETIME_NULL_ID,
+ GSD_POWER_IDLETIME_DIM_ID,
+@@ -197,6 +200,7 @@ struct GsdPowerManagerPrivate
+ GsdPowerIdleMode current_idle_mode;
+ guint lid_close_safety_timer_id;
+ GtkStatusIcon *status_icon;
++ guint xscreensaver_watchdog_timer_id;
+ };
+
+ enum {
+@@ -3621,6 +3625,77 @@ engine_session_active_changed_cb (GnomeSettingsSession *session,
+ idle_set_mode (manager, GSD_POWER_IDLE_MODE_NORMAL);
+ }
+
++/* This timer goes off every few minutes, whether the user is idle or not,
++ to try and clean up anything that has gone wrong.
++
++ It calls disable_builtin_screensaver() so that if xset has been used,
++ or some other program (like xlock) has messed with the XSetScreenSaver()
++ settings, they will be set back to sensible values (if a server extension
++ is in use, messing with xlock can cause the screensaver to never get a wakeup
++ event, and could cause monitor power-saving to occur, and all manner of
++ heinousness.)
++
++ This code was originally part of gnome-screensaver, see
++ http://git.gnome.org/browse/gnome-screensaver/tree/src/gs-watcher-x11.c?id=fec00b12ec46c86334cfd36b37771cc4632f0d4d#n530
++ */
++static gboolean
++disable_builtin_screensaver (gpointer unused)
++{
++ int current_server_timeout, current_server_interval;
++ int current_prefer_blank, current_allow_exp;
++ int desired_server_timeout, desired_server_interval;
++ int desired_prefer_blank, desired_allow_exp;
++
++ XGetScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
++ &current_server_timeout,
++ &current_server_interval,
++ &current_prefer_blank,
++ &current_allow_exp);
++
++ desired_server_timeout = current_server_timeout;
++ desired_server_interval = current_server_interval;
++ desired_prefer_blank = current_prefer_blank;
++ desired_allow_exp = current_allow_exp;
++
++ desired_server_interval = 0;
++
++ /* I suspect (but am not sure) that DontAllowExposures might have
++ something to do with powering off the monitor as well, at least
++ on some systems that don't support XDPMS? Who know... */
++ desired_allow_exp = AllowExposures;
++
++ /* When we're not using an extension, set the server-side timeout to 0,
++ so that the server never gets involved with screen blanking, and we
++ do it all ourselves. (However, when we *are* using an extension,
++ we tell the server when to notify us, and rather than blanking the
++ screen, the server will send us an X event telling us to blank.)
++ */
++ desired_server_timeout = 0;
++
++ if (desired_server_timeout != current_server_timeout
++ || desired_server_interval != current_server_interval
++ || desired_prefer_blank != current_prefer_blank
++ || desired_allow_exp != current_allow_exp) {
++
++ g_debug ("disabling server builtin screensaver:"
++ " (xset s %d %d; xset s %s; xset s %s)",
++ desired_server_timeout,
++ desired_server_interval,
++ (desired_prefer_blank ? "blank" : "noblank"),
++ (desired_allow_exp ? "expose" : "noexpose"));
++
++ XSetScreenSaver (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
++ desired_server_timeout,
++ desired_server_interval,
++ desired_prefer_blank,
++ desired_allow_exp);
++
++ XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), FALSE);
++ }
++
++ return TRUE;
++}
++
+ gboolean
+ gsd_power_manager_start (GsdPowerManager *manager,
+ GError **error)
+@@ -3778,6 +3853,9 @@ gsd_power_manager_start (GsdPowerManager *manager,
+ /* set the initial dim time that can adapt for the user */
+ refresh_idle_dim_settings (manager);
+
++ manager->priv->xscreensaver_watchdog_timer_id = g_timeout_add_seconds (XSCREENSAVER_WATCHDOG_TIMEOUT,
++ disable_builtin_screensaver,
++ NULL);
+ gnome_settings_profile_end (NULL);
+ return TRUE;
+ }
+@@ -3829,6 +3907,11 @@ gsd_power_manager_stop (GsdPowerManager *manager)
+
+ g_clear_object (&manager->priv->idletime);
+ g_clear_object (&manager->priv->status_icon);
++
++ if (manager->priv->xscreensaver_watchdog_timer_id > 0) {
++ g_source_remove (manager->priv->xscreensaver_watchdog_timer_id);
++ manager->priv->xscreensaver_watchdog_timer_id = 0;
++ }
+ }
+
+ static void
+--
+cgit v0.9.0.2
diff --git a/community-testing/gnote/PKGBUILD b/community-testing/gnote/PKGBUILD
new file mode 100644
index 000000000..10875eac1
--- /dev/null
+++ b/community-testing/gnote/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 78578 2012-10-21 10:46:20Z ibiru $
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+# Contributor: uastasi <uastasi@archlinux.us>
+pkgname=gnote
+pkgver=3.6.0
+pkgrel=1
+pkgdesc="A note taking application."
+arch=('i686' 'x86_64')
+url="http://live.gnome.org/Gnote"
+license=('GPL3')
+depends=('gtkmm3' 'libxslt' 'hicolor-icon-theme' 'desktop-file-utils' 'dconf' 'libsecret')
+makedepends=('intltool' 'itstool' 'boost')
+options=('!libtool')
+install=gnote.install
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
+sha256sums=('ac61c84a4fe8eeae613af76bb11cb481f2f44c8bc64ef4b7aac90b8e68e94957')
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib/gnote \
+ --disable-scrollkeeper \
+ --disable-schemas-compile \
+ --disable-static
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
diff --git a/community-testing/gnote/gnote.install b/community-testing/gnote/gnote.install
new file mode 100644
index 000000000..0f8eb1012
--- /dev/null
+++ b/community-testing/gnote/gnote.install
@@ -0,0 +1,21 @@
+pkgname=gnote
+
+post_install() {
+ 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 [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+ fi
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/community-testing/zeitgeist-datahub/PKGBUILD b/community-testing/zeitgeist-datahub/PKGBUILD
new file mode 100644
index 000000000..35bb0fa68
--- /dev/null
+++ b/community-testing/zeitgeist-datahub/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 78600 2012-10-21 20:21:55Z bgyorgy $
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Leontius Adhika Pradhana <leon@leapon.net>
+# Contributor: Ner0
+
+pkgname=zeitgeist-datahub
+pkgver=0.9.5
+pkgrel=2
+pkgdesc="Provides passive plugins which insert events into Zeitgeist"
+arch=('i686' 'x86_64')
+url="https://launchpad.net/zeitgeist-datahub"
+license=('GPL3')
+depends=('libzeitgeist' 'json-glib' 'gtk2' 'telepathy-glib' 'zeitgeist')
+makedepends=('intltool' 'vala')
+source=(http://launchpad.net/$pkgname/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.gz)
+md5sums=('b2b76b82b67363c45e5fe4f39a172775')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir/" install
+}
diff --git a/community/chmsee/PKGBUILD b/community/chmsee/PKGBUILD
index c43ec91ce..703fa5616 100644
--- a/community/chmsee/PKGBUILD
+++ b/community/chmsee/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 76167 2012-09-12 12:38:26Z lcarlier $
+# $Id: PKGBUILD 78574 2012-10-21 09:16:19Z lcarlier $
# Maintainer : Laurent Carlier <lordheavym@gmail.com>
# Contributor: dionydonny <dionydonny@gmail.com>
# Contributor: Ermanno <erm67@yahoo.it>
pkgname=chmsee
pkgver=1.99.13
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64' 'mips64el')
pkgdesc="A chm (MS HTML help file format) viewer based on xulrunner."
url="http://chmsee.googlecode.com/"
@@ -22,7 +22,7 @@ build() {
cd ${srcdir}/jungleji-chmsee-*/src
cp Makefile.arch Makefile
- #sed -i -e 's/12.*/13.*/g' ../application.ini
+ sed -i -e 's/15.*/16.*/g' ../application.ini
make
}
diff --git a/community/evas_generic_loaders-svn/PKGBUILD b/community/evas_generic_loaders-svn/PKGBUILD
index 4bab0ac41..345c80acb 100644
--- a/community/evas_generic_loaders-svn/PKGBUILD
+++ b/community/evas_generic_loaders-svn/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 76270 2012-09-15 10:06:38Z rvanharen $
+# $Id: PKGBUILD 78523 2012-10-20 09:32:58Z heftig $
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Ronald van Haren <ronald.archlinux.org>
pkgname=evas_generic_loaders-svn
pkgver=75875
-pkgrel=1
+pkgrel=2
pkgdesc="Additional generic loaders for Evas"
arch=('i686' 'x86_64')
groups=('e17-libs-svn' 'e17-svn')
diff --git a/community/flac123/PKGBUILD b/community/flac123/PKGBUILD
index 3c1e21b46..cb88cdcab 100644
--- a/community/flac123/PKGBUILD
+++ b/community/flac123/PKGBUILD
@@ -1,28 +1,29 @@
-# $Id: PKGBUILD 66067 2012-02-22 17:27:23Z cbrannon $
+# $Id: PKGBUILD 78533 2012-10-20 10:17:22Z ebelanger $
# Maintainer: Chris Brannon <chris@the-brannons.com>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: Patrick Burroughs <celticmadman@gmail.com>
pkgname=flac123
-pkgver=0.0.11
-pkgrel=4
+pkgver=0.0.12
+pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
license=('GPL2')
pkgdesc="A command-line program for playing FLAC audio files"
url="http://flac-tools.sourceforge.net/"
depends=('flac' 'libao' 'popt')
-source=(http://downloads.sourceforge.net/flac-tools/${pkgname}-${pkgver}.tar.gz)
-md5sums=('60204986d3556330255b87aa42a4c9d1')
+source=(http://downloads.sourceforge.net/flac-tools/${pkgname}-${pkgver}-release.tar.gz)
+md5sums=('59dacb2584bbe9c61d046ce995108ac6')
build() {
- cd ${srcdir}/${pkgname}-${pkgver}
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ autoreconf --force --install
./configure --prefix=/usr
make
}
package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make DESTDIR=${pkgdir} install
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
}
# vim:set ts=2 sw=2 et:
diff --git a/community/gambas2/PKGBUILD b/community/gambas2/PKGBUILD
index 3b683fef4..8ae8cd258 100644
--- a/community/gambas2/PKGBUILD
+++ b/community/gambas2/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 77638 2012-10-13 11:42:56Z allan $
+# $Id: PKGBUILD 78524 2012-10-20 09:33:12Z heftig $
# Maintainer : Laurent Carlier <lordheavym@gmail.com>
# Contributor: Biru Ionut <ionut@archlinux.ro>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
@@ -20,12 +20,12 @@ pkgname=('gambas2-meta' 'gambas2-runtime' 'gambas2-devel' 'gambas2-ide' 'gambas2
'gambas2-gb-sdl-sound' 'gambas2-gb-settings' 'gambas2-gb-v4l' 'gambas2-gb-vb'
'gambas2-gb-web' 'gambas2-gb-xml' 'gambas2-gb-xml-rpc' 'gambas2-gb-xml-xslt')
pkgver=2.24.0
-pkgrel=7
+pkgrel=8
pkgdesc="A free development environment based on a Basic interpreter."
arch=('i686' 'x86_64')
url="http://gambas.sourceforge.net"
makedepends=('libffi' 'bzip2' 'libfbclient' 'zlib' 'kdelibs3' 'glu' 'gtk2' 'librsvg' 'xdg-utils'
- 'postgresql-libs' 'libmysqlclient' 'unixodbc' 'sqlite2' 'sqlite'
+ 'postgresql-libs' 'libmysqlclient' 'unixodbc' 'sqlite2' 'sqlite' 'mesa'
'curl' 'poppler-glib' 'sdl_mixer' 'sdl_image' 'libxtst' 'pcre' 'omniorb' 'libxft'
'libxcursor' 'libsm' 'intltool' 'mysql' 'postgresql')
license=('GPL2')
diff --git a/community/gambas3/PKGBUILD b/community/gambas3/PKGBUILD
index 6a4e7c3e3..b0d3af32d 100644
--- a/community/gambas3/PKGBUILD
+++ b/community/gambas3/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 77639 2012-10-13 11:43:04Z allan $
+# $Id: PKGBUILD 78525 2012-10-20 09:33:20Z heftig $
# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor : sebikul <sebikul@gmail.com>
@@ -15,7 +15,7 @@ pkgname=('gambas3-runtime' 'gambas3-devel' 'gambas3-ide' 'gambas3-script' 'gamba
'gambas3-gb-signal' 'gambas3-gb-v4l' 'gambas3-gb-vb' 'gambas3-gb-xml' 'gambas3-gb-xml-html' 'gambas3-gb-xml-rpc'
'gambas3-gb-xml-xslt' 'gambas3-gb-web')
pkgver=3.3.3
-pkgrel=1
+pkgrel=2
pkgdesc="A free development environment based on a Basic interpreter."
arch=('i686' 'x86_64' 'mips64el')
url="http://gambas.sourceforge.net/"
diff --git a/community/libcec/PKGBUILD b/community/libcec/PKGBUILD
index 6ab479cd8..8fd21df7d 100644
--- a/community/libcec/PKGBUILD
+++ b/community/libcec/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 76479 2012-09-18 20:07:49Z idevolder $
+# $Id: PKGBUILD 78553 2012-10-20 20:21:09Z idevolder $
# Maintainer: BlackIkeEagle <ike DOT devolder AT gmail DOT com>
# Contributor: Philippe Cherel <philippe.cherel@mayenne.org>
pkgname=libcec
pkgver=1.9.0
-pkgrel=1
+pkgrel=2
pkgdesc="Pulse-Eight's libcec for the Pulse-Eight USB-CEC adapter"
arch=('i686' 'x86_64' 'mips64el')
url="https://github.com/Pulse-Eight/libcec"
diff --git a/community/libextractor/PKGBUILD b/community/libextractor/PKGBUILD
index 66b8d7780..51a064c9a 100644
--- a/community/libextractor/PKGBUILD
+++ b/community/libextractor/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 75315 2012-08-19 08:00:41Z heftig $
+# $Id: PKGBUILD 78526 2012-10-20 09:33:25Z heftig $
# Maintainer: Sergej Pupykin <pupykin.s@gmail.com>
# Contributor: damir <damir@archlinux.org>
pkgname=libextractor
pkgver=0.6.3
-pkgrel=7
+pkgrel=8
pkgdesc="A library used to extract meta-data from files of arbitrary type"
arch=("i686" "x86_64" 'mips64el')
license=('GPL')
diff --git a/community/pam-krb5/PKGBUILD b/community/pam-krb5/PKGBUILD
index 7a6a625fe..c0e35c92b 100644
--- a/community/pam-krb5/PKGBUILD
+++ b/community/pam-krb5/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 70351 2012-05-04 23:55:05Z allan $
+# $Id: PKGBUILD 78535 2012-10-20 10:30:17Z ebelanger $
# Maintainer: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: Ryan Corder <ryanc@greengrey.org>
@@ -11,8 +11,9 @@ url='http://www.eyrie.org/~eagle/software/pam-krb5/'
license=('custom')
options=('!libtool')
depends=('krb5' 'pam')
-source=("http://archives.eyrie.org/software/kerberos/$pkgname-$pkgver.tar.gz")
-md5sums=('296e9c8281419ce1fc41d537d18f74b8')
+source=(http://archives.eyrie.org/software/kerberos/$pkgname-$pkgver.tar.gz{,.asc})
+md5sums=('296e9c8281419ce1fc41d537d18f74b8'
+ 'c68a521345d79d54fb129a3f4ca2767b')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/community/pdf2djvu/PKGBUILD b/community/pdf2djvu/PKGBUILD
index 8c8c09485..f55879df8 100644
--- a/community/pdf2djvu/PKGBUILD
+++ b/community/pdf2djvu/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 76563 2012-09-23 10:10:49Z jelle $
+# $Id: PKGBUILD 78527 2012-10-20 09:33:28Z heftig $
# Contributor: Paulo Matias <matiasΘarchlinux-br·org>
# Maintainer: Jelle van der Waa <jelle@vdwaa.nl>
pkgname=pdf2djvu
-pkgver=0.7.14
+pkgver=0.7.15
pkgrel=1
pkgdesc="Creates DjVu files from PDF files"
arch=('i686' 'x86_64' 'mips64el')
@@ -12,7 +12,6 @@ license=('GPL')
depends=('poppler' 'djvulibre' 'libxslt' 'gcc-libs' 'graphicsmagick')
makedepends=('pstreams' 'python2-nose' 'ttf-liberation')
source=("http://pdf2djvu.googlecode.com/files/${pkgname}_${pkgver}.tar.gz")
-md5sums=('b5327c5949057711a8250dffb6ccfd2d')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
@@ -31,4 +30,4 @@ check() {
sed -i 's/nosetests/nosetests2/' tests/Makefile
make test
}
-md5sums=('bfeb443f81d0df7544fd393ad7ee6cd7')
+md5sums=('cd03b61636b8d58592e7f419b434581f')
diff --git a/community/python-pyxattr/PKGBUILD b/community/python-pyxattr/PKGBUILD
index 12e81af63..7a211c735 100644
--- a/community/python-pyxattr/PKGBUILD
+++ b/community/python-pyxattr/PKGBUILD
@@ -1,19 +1,19 @@
-# $Id: PKGBUILD 78249 2012-10-17 10:26:58Z allan $
+# $Id: PKGBUILD 78604 2012-10-21 22:13:35Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Jon Bergli Heier <snakebite@jvnv.net>
pkgname=('python2-pyxattr' 'python-pyxattr')
pkgbase=python-pyxattr
_pkgname=pyxattr
-pkgver=0.5.0
-pkgrel=4
+pkgver=0.5.1
+pkgrel=1
pkgdesc='A python extension module that allows you to manipulate the extended attributes.'
arch=('i686' 'x86_64' 'mips64el')
-url='http://pyxattr.sourceforge.net/'
+url='http://pyxattr.k1024.org/'
license=('GPL')
makedepends=('python2' 'python' 'python2-distribute' 'python-distribute')
-source=("http://downloads.sourceforge.net/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
-md5sums=('0f7ab1e185087329e40f7de218517c84')
+source=("https://github.com/downloads/iustin/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
+md5sums=('bb9560510b17625015aa45f2fbc3b520')
package_python2-pyxattr() {
depends=('python2')
diff --git a/community/python-reportlab/ChangeLog b/community/python-reportlab/ChangeLog
new file mode 100644
index 000000000..85b5db51f
--- /dev/null
+++ b/community/python-reportlab/ChangeLog
@@ -0,0 +1,18 @@
+
+2009-02-17 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated for i686: 2.3
+
+2008-11-03 Giovanni Scafora <giovanni@archlinux.org>
+
+ * Rebuilt against python 2.6
+
+2008-09-14 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updating for x86_64: 2.2
+
+2008-09-13 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Adding ChangeLog
+ * Updating for i686: 2.2
+
diff --git a/community/python-reportlab/PKGBUILD b/community/python-reportlab/PKGBUILD
new file mode 100644
index 000000000..6e44f03d6
--- /dev/null
+++ b/community/python-reportlab/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 78251 2012-10-17 10:27:06Z allan $
+# Maintainer:
+# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+pkgbase=python-reportlab
+pkgname=python2-reportlab
+_origname=reportlab
+pkgver=2.6
+pkgrel=1
+pkgdesc="A proven industry-strength PDF generating solution"
+arch=('i686' 'x86_64')
+url="http://www.reportlab.org/rl_toolkit.html"
+depends=('python2' 'freetype2')
+conflicts=('python-reportlab<=2.5-2')
+replaces=('python-reportlab<=2.5-2')
+license=('CUSTOM')
+source=(http://www.reportlab.org/ftp/${_origname}-$pkgver.tar.gz)
+md5sums=('e5d27a24a2c8456b168913242aa1940f')
+
+build() {
+ cd $srcdir/${_origname}-$pkgver
+
+ # python2 fix
+ for file in src/reportlab/graphics/widgets/table.py src/reportlab/lib/normalDate.py \
+ src/reportlab/pdfgen/pycanvas.py; do
+ sed -i 's_#!.*/usr/bin/env python_#!/usr/bin/env python2_' $file
+ done
+}
+
+package_python2-reportlab() {
+ cd $srcdir/${_origname}-$pkgver
+ python2 setup.py install --root=$pkgdir --optimize=1
+ install -D -m644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/license.txt
+}
diff --git a/community/rekonq/PKGBUILD b/community/rekonq/PKGBUILD
index 9c8df97e3..9881cfc15 100644
--- a/community/rekonq/PKGBUILD
+++ b/community/rekonq/PKGBUILD
@@ -1,17 +1,18 @@
-# $Id: PKGBUILD 77202 2012-10-06 14:10:04Z andrea $
+# $Id: PKGBUILD 78531 2012-10-20 10:07:28Z andrea $
# Maintainer: Peter Lewis <plewis@aur.archlinux.org>
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Panagiotis Papadopoulos <pano_90 AT gmx DOT net>
pkgname=rekonq
pkgver=1.2
-pkgrel=1
+pkgrel=2
pkgdesc='A WebKit based web browser for KDE'
arch=('i686' 'x86_64' 'mips64el')
url='http://rekonq.kde.org/'
license=('GPL')
depends=('kdebase-keditbookmarks' 'qoauth')
makedepends=('cmake' 'automoc4')
+optdepends=('qca-ossl: to use the sync handler')
install=${pkgname}.install
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
md5sums=('97d025df580813013643b8c51675a75d')
diff --git a/community/virtualbox-modules-lts/PKGBUILD b/community/virtualbox-modules-lts/PKGBUILD
index 661f19a4e..aa1f3d890 100644
--- a/community/virtualbox-modules-lts/PKGBUILD
+++ b/community/virtualbox-modules-lts/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 77197 2012-10-06 11:21:31Z tpowa $
+# $Id: PKGBUILD 78541 2012-10-20 11:53:48Z seblu $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Sébastien Luttringer <seblu@aur.archlinux.org>
pkgbase=virtualbox-modules-lts
pkgname=('virtualbox-host-modules-lts' 'virtualbox-guest-modules-lts')
-pkgver=4.2.0
-pkgrel=3
+pkgver=4.2.2
+pkgrel=1
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
diff --git a/community/virtualbox-modules/PKGBUILD b/community/virtualbox-modules/PKGBUILD
index 28b75bd71..6850f7879 100644
--- a/community/virtualbox-modules/PKGBUILD
+++ b/community/virtualbox-modules/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 77842 2012-10-15 05:19:18Z tpowa $
+# $Id: PKGBUILD 78539 2012-10-20 11:51:18Z seblu $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
pkgbase=virtualbox-modules
pkgname=('virtualbox-host-modules' 'virtualbox-guest-modules')
-pkgver=4.2.0
-pkgrel=6
+pkgver=4.2.2
+pkgrel=1
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
@@ -16,8 +16,8 @@ makedepends=('linux-headers'
build() {
# current kernel version
- #_kernver=$(expac -Q '%v' linux-headers)-ARCH
- _kernver=3.6.0-1-ARCH
+ _kernver=$(expac -Q '%v' linux-headers)-ARCH
+ #_kernver=3.6.0-1-ARCH
# dkms need modification to be run as user
cp -r /var/lib/dkms .
echo "dkms_tree='$srcdir/dkms'" > dkms.conf
@@ -36,8 +36,8 @@ package_virtualbox-host-modules(){
conflicts=('virtualbox-modules')
install=virtualbox-host-modules.install
- #_kernver=$(expac -Q '%v' linux-headers)-ARCH
- _kernver=3.6.0-1-ARCH
+ _kernver=$(expac -Q '%v' linux-headers)-ARCH
+ # _kernver=3.6.0-1-ARCH
_extraver=extramodules-${_kernver%.*}-ARCH
install -dm755 "$pkgdir/usr/lib/modules/$_extraver"
@@ -55,8 +55,8 @@ package_virtualbox-guest-modules(){
conflicts=('virtualbox-archlinux-modules')
install=virtualbox-guest-modules.install
- #_kernver=$(expac -Q '%v' linux-headers)-ARCH
- _kernver=3.6.0-1-ARCH
+ _kernver=$(expac -Q '%v' linux-headers)-ARCH
+ #_kernver=3.6.0-1-ARCH
_extraver=extramodules-${_kernver%.*}-ARCH
install -dm755 "$pkgdir/usr/lib/modules/$_extraver"
diff --git a/extra/amule/PKGBUILD b/extra/amule/PKGBUILD
index c47594024..2493c3359 100644
--- a/extra/amule/PKGBUILD
+++ b/extra/amule/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 161344 2012-06-10 05:51:02Z giovanni $
+# $Id: PKGBUILD 169418 2012-10-20 18:24:37Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Henrik Ronellenfitsch <searinox@web.de>
# Contributor: Alessio Sergi <sergi.alessio {at} gmail.com>
# Contributor: Dario 'Dax' Vilardi <dax [at] deelab [dot] org>
pkgname=amule
-pkgver=10792
+pkgver=10795
pkgrel=1
pkgdesc="An eMule-like client for ed2k p2p network"
arch=('i686' 'x86_64' 'mips64el')
@@ -13,7 +13,7 @@ url="http://www.amule.org"
license=('GPL')
depends=('wxgtk' 'gd' 'geoip' 'libupnp' 'crypto++')
source=("http://amule.sourceforge.net/tarballs/aMule-SVN-r${pkgver}.tar.bz2")
-md5sums=('ff828df9561e4964e439539189a891f7')
+md5sums=('e64c4f198e66c3e231a292b60b7cafb4')
build() {
cd "${srcdir}/aMule-SVN-r${pkgver}"
diff --git a/extra/bitlbee/PKGBUILD b/extra/bitlbee/PKGBUILD
index 675e52389..d0f3a6348 100644
--- a/extra/bitlbee/PKGBUILD
+++ b/extra/bitlbee/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 163519 2012-07-14 13:10:00Z allan $
+# $Id: PKGBUILD 169422 2012-10-20 20:58:46Z dreisner $
# Contributor: FUBAR <mrfubar@gmail.com>
# Contributor: simo <simo@archlinux.org>
@@ -8,8 +8,8 @@
# Maintainer: Dave Reisner <dreisner@archlinux.org>
pkgname=bitlbee
-pkgver=3.0.5
-pkgrel=4
+pkgver=3.0.6
+pkgrel=1
pkgdesc='Brings instant messaging (XMPP, MSN, Yahoo!, AIM, ICQ, Twitter) to IRC'
url='http://www.bitlbee.org/'
license=('GPL')
@@ -20,12 +20,10 @@ optdepends=('skype4py: to use skyped'
'libotr: for OTR encryption support'
'xinetd: to run bitlbee through xinetd')
source=("http://get.bitlbee.org/src/${pkgname}-${pkgver}.tar.gz"
- 'sbindir.patch'
'xinetd'
'rc.d'
'bitlbee.tmpfiles')
-sha1sums=('74afdff87be49ce060771a6ae10d7643cd57b9b6'
- '9b774e6d85471a4e43e25b8b941cd0e1032a7a6c'
+sha1sums=('6ac7cab4dab422f9baac97818e69ee9934db345c'
'5e0af27ba9cc4fe455e3381c75fc49a9326e2f17'
'02423c500ac64f673ba26a3395c7c7036c17343e'
'3695ed2fe22436c4d0fc3ead829f7d1f89bc491c')
@@ -37,8 +35,6 @@ install=bitlbee.install
build() {
cd "$pkgname-$pkgver"
- patch -p1 -i ../sbindir.patch
-
./configure \
--prefix=/usr \
--etcdir=/etc/bitlbee \
diff --git a/extra/calligra/PKGBUILD b/extra/calligra/PKGBUILD
index 61f297008..73b65af15 100644
--- a/extra/calligra/PKGBUILD
+++ b/extra/calligra/PKGBUILD
@@ -1,15 +1,11 @@
-# $Id: PKGBUILD 168545 2012-10-13 09:58:07Z andrea $
+# $Id: PKGBUILD 169384 2012-10-20 09:31:33Z andyrtr $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
pkgbase=calligra
pkgname=('calligra-filters'
- 'calligra-interfaces'
'calligra-libs'
'calligra-plugins'
- 'calligra-pics'
- 'calligra-servicetypes'
- 'calligra-templates'
'calligra-tools'
'calligra-karbon'
'calligra-kexi'
@@ -22,14 +18,14 @@ pkgname=('calligra-filters'
'calligra-braindump'
'calligra-flow')
pkgver=2.5.3
-pkgrel=2
+pkgrel=5
arch=('i686' 'x86_64')
url='http://www.calligra-suite.org/'
license=('FDL1.2' 'GPL2' 'LGPL')
makedepends=('cmake' 'automoc4' 'boost ' 'kdepimlibs' 'eigen2' 'kdeedu-marble'
'lcms2' 'libmysqlclient' 'libpqxx' 'freetds' 'xbase' 'libwpg'
'libwps' 'gsl' 'glew' 'fftw' 'opengtl' 'poppler-qt' 'libkdcraw'
- 'openjpeg' 'kdegraphics-okular' 'pstoedit')
+ 'openjpeg' 'kdegraphics-okular' 'pstoedit' 'mesa')
groups=('calligra')
source=("http://download.kde.org/stable/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.bz2")
md5sums=('83e2679b7ecb923b953ace06db7ca4c2')
@@ -56,24 +52,22 @@ package_calligra-filters() {
make DESTDIR="${pkgdir}" install
}
-package_calligra-interfaces() {
- pkgdesc="Interfaces for the Calligra office suite"
- depends=('calligra-libs')
- conflicts=('koffice-interfaces')
- replaces=('koffice-interfaces')
-
- cd "${srcdir}"/build/interfaces
- make DESTDIR="${pkgdir}" install
-}
-
package_calligra-libs() {
pkgdesc="Libraries for the Calligra office suite"
- depends=('kdepimlibs' 'lcms2' 'calligra-servicetypes')
- conflicts=('koffice-libs')
- replaces=('koffice-libs')
-
- cd "${srcdir}"/build/libs
- make DESTDIR="${pkgdir}" install
+ depends=('kdepimlibs' 'lcms2')
+ conflicts=('koffice-interfaces' 'koffice-libs' 'koffice-pics'
+ 'koffice-servicetypes' 'koffice-templates' 'calligra-interfaces'
+ 'calligra-libs' 'calligra-pics' 'calligra-servicetypes'
+ 'calligra-templates')
+ replaces=('koffice-interfaces' 'koffice-libs' 'koffice-pics'
+ 'koffice-servicetypes' 'koffice-templates' 'calligra-interfaces'
+ 'calligra-libs' 'calligra-pics' 'calligra-servicetypes'
+ 'calligra-templates')
+
+ for d in interfaces libs pics servicetypes templates; do
+ cd "${srcdir}"/build/${d}
+ make DESTDIR="${pkgdir}" install
+ done
}
package_calligra-plugins() {
@@ -87,35 +81,6 @@ package_calligra-plugins() {
make DESTDIR="${pkgdir}" install
}
-package_calligra-pics() {
- pkgdesc="Icons for the Calligra office suite"
- conflicts=('koffice-pics')
- replaces=('koffice-pics')
- install=calligra.install
-
- cd "${srcdir}"/build/pics
- make DESTDIR="${pkgdir}" install
-}
-
-package_calligra-servicetypes() {
- pkgdesc="Servicetypes for the Calligra office suite"
- conflicts=('koffice-servicetypes')
- replaces=('koffice-servicetypes')
- install=calligra.install
-
- cd "${srcdir}"/build/servicetypes
- make DESTDIR="${pkgdir}" install
-}
-
-package_calligra-templates() {
- pkgdesc="Templates for the Calligra office suite"
- conflicts=('koffice-templates')
- replaces=('koffice-templates')
-
- cd "${srcdir}"/build/templates
- make DESTDIR="${pkgdir}" install
-}
-
package_calligra-tools() {
pkgdesc="Tools for the Calligra office suite"
depends=('calligra-libs')
@@ -129,7 +94,7 @@ package_calligra-tools() {
package_calligra-karbon() {
pkgdesc="Create scalable vector drawings"
- depends=('calligra-libs' 'calligra-templates' 'kdebase-runtime' 'pstoedit')
+ depends=('calligra-libs' 'kdebase-runtime' 'pstoedit')
optdepends=('calligra-filters: import/export filters'
'calligra-tools: extra calligra tools')
conflicts=('koffice-karbon' 'koffice-karbon-doc' 'calligra-karbon-doc')
@@ -142,7 +107,7 @@ package_calligra-karbon() {
package_calligra-kexi() {
pkgdesc="Develop desktop database applications"
- depends=('calligra-libs' 'calligra-templates' 'glew' 'fftw')
+ depends=('calligra-libs' 'glew' 'fftw')
optdepends=('libmysqlclient: MySQL driver'
'libpqxx: PostgreSQL driver'
'freetds: Sybase & MS SQL driver'
@@ -173,7 +138,7 @@ package_calligra-plan() {
package_calligra-stage() {
pkgdesc="Write presentation documents"
- depends=('calligra-libs' 'calligra-templates' 'kdebase-runtime')
+ depends=('calligra-libs' 'kdebase-runtime')
optdepends=('calligra-plugins: extra calligra plugins')
conflicts=('koffice-kpresenter' 'koffice-kpresenter-doc' 'calligra-stage-doc')
replaces=('koffice-kpresenter' 'koffice-kpresenter-doc' 'calligra-stage-doc')
@@ -187,7 +152,7 @@ package_calligra-stage() {
package_calligra-krita() {
pkgdesc="Edit and paint images"
- depends=('calligra-templates' 'calligra-plugins' 'kdebase-runtime' 'eigen2'
+ depends=('calligra-plugins' 'kdebase-runtime' 'eigen2'
'poppler-qt' 'libkdcraw' 'fftw' 'glew' 'opengtl')
conflicts=('koffice-krita' 'calligra-krita-doc')
replaces=('koffice-krita' 'calligra-krita-doc')
@@ -199,7 +164,7 @@ package_calligra-krita() {
package_calligra-sheets() {
pkgdesc="Write spreadsheet documents"
- depends=('calligra-templates' 'calligra-libs' 'gsl' 'kdebase-runtime')
+ depends=('calligra-libs' 'gsl' 'kdebase-runtime')
optdepends=('calligra-filters: import/export filters'
'calligra-plugins: extra calligra plugins'
'calligra-tools: extra calligra tools')
@@ -215,7 +180,7 @@ package_calligra-sheets() {
package_calligra-words() {
pkgdesc="Word Processor"
- depends=('calligra-templates' 'calligra-pics' 'calligra-plugins' 'kdegraphics-okular')
+ depends=('calligra-libs' 'kdegraphics-okular')
optdepends=('calligra-tools: extra calligra tools')
conflicts=('koffice-kword')
replaces=('koffice-kword')
diff --git a/extra/ethtool/PKGBUILD b/extra/ethtool/PKGBUILD
index 4c0e68c77..0ab6d86a8 100644
--- a/extra/ethtool/PKGBUILD
+++ b/extra/ethtool/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 165653 2012-08-28 08:48:01Z ibiru $
+# $Id: PKGBUILD 169444 2012-10-21 10:28:57Z ibiru $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Paul Mattal <paul@archlinux.org>
# Contributor: Martin Kemp <mdkemp@elys.com>
pkgname=ethtool
-pkgver=3.5
+pkgver=3.6
pkgrel=1
epoch=1
pkgdesc="Utility for controlling network drivers and hardware"
@@ -13,7 +13,7 @@ url="http://www.kernel.org/pub/software/network/ethtool/"
license=('GPL')
depends=('glibc')
source=(http://www.kernel.org/pub/software/network/$pkgname/$pkgname-$pkgver.tar.xz)
-md5sums=('021b5785f65637a04d65c2d44d6c2250')
+md5sums=('b897aa2e7eeafb5d69a571b48a1b354f')
build() {
cd $pkgname-$pkgver
diff --git a/extra/inkscape/PKGBUILD b/extra/inkscape/PKGBUILD
index 6009587fc..d69825e0b 100644
--- a/extra/inkscape/PKGBUILD
+++ b/extra/inkscape/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 165428 2012-08-19 07:57:43Z andyrtr $
+# $Id: PKGBUILD 169386 2012-10-20 09:31:39Z andyrtr $
# Contributor: tobias <tobias@archlinux.org>
# Contributor: Tobias Kieslich <tobias@justdreams.de>
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
pkgname=inkscape
pkgver=0.48.3.1
-pkgrel=5
+pkgrel=6
pkgdesc='Vector graphics editor using the SVG file format'
url='http://inkscape.sourceforge.net/'
license=('GPL' 'LGPL')
diff --git a/extra/libpng/PKGBUILD b/extra/libpng/PKGBUILD
index 8bbad77b9..047e706e8 100644
--- a/extra/libpng/PKGBUILD
+++ b/extra/libpng/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 164030 2012-07-24 16:52:28Z ibiru $
+# $Id: PKGBUILD 169446 2012-10-21 10:49:41Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: dorphell <dorphell@archlinux.org>
# Contributor: Travis Willard <travis@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
pkgname=libpng
-pkgver=1.5.12
-_apngver=1.5.12
+pkgver=1.5.13
+_apngver=1.5.13
pkgrel=1
pkgdesc="A collection of routines used to create PNG format graphics files"
arch=('i686' 'x86_64' 'mips64el')
@@ -16,8 +16,8 @@ depends=('zlib' 'sh')
options=('!libtool')
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.xz"
"http://downloads.sourceforge.net/sourceforge/libpng-apng/libpng-$_apngver-apng.patch.gz")
-md5sums=('0fd51add1da6a0e470e0c726c59171b9'
- '7f2924b1fe0cca9080e18b8720443716')
+md5sums=('0b607a685da977f1bfc96e1c47055183'
+ '23c8765aa6ca188c0575386d5ea8fe70')
build() {
cd $pkgname-$pkgver
diff --git a/extra/libreoffice/PKGBUILD b/extra/libreoffice/PKGBUILD
index 8df933197..2bb3bf12e 100644
--- a/extra/libreoffice/PKGBUILD
+++ b/extra/libreoffice/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 168606 2012-10-13 11:47:57Z andyrtr $
+# $Id: PKGBUILD 169387 2012-10-20 09:31:46Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
pkgbase="libreoffice"
@@ -26,15 +26,15 @@ pkgname=('libreoffice-common'
'libreoffice-extension-nlpsolver') # svn up -r 142692 (last one with all extensions built)
_LOver=3.6.2.2
pkgver=3.6.2
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64')
license=('LGPL3')
url="http://www.libreoffice.org/"
makedepends=( # makedepends
'sane' 'perl-archive-zip' 'zip' 'unzip' 'unixodbc' 'hsqldb-java' #'boost'
- 'apache-ant' 'gperf' 'poppler>=0.18.0' 'kdelibs' 'gconf' 'cppunit'
+ 'apache-ant' 'gperf' 'poppler>=0.20.5' 'kdelibs' 'gconf' 'cppunit'
'beanshell' 'vigra' 'clucene' 'junit' 'libmythes' 'libwpg' 'imagemagick'
- 'glu' 'gstreamer0.10-base' 'java-environment' 'postgresql-libs' 'doxygen' 'clucene'
+ 'glu' 'mesa' 'gstreamer0.10-base' 'java-environment' 'postgresql-libs' 'doxygen' 'clucene'
# the runtime dependencies
"curl>=7.20.0" "hunspell>=1.2.8" "python2>=2.7" 'libwpd>=0.9.2' 'libwps' 'libxaw' "neon>=0.28.6"
'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib' 'libxslt' 'librsvg' "icu>=49.1"
@@ -288,7 +288,6 @@ package_libreoffice-common() {
'gconf: adds additional gnome support'
'nss: adds support for signed files/macros'
'pstoedit: translates PostScript and PDF graphics into other vector formats'
- 'poppler: for shipped pdfimport extension'
'libmythes: for use in thesaurus'
'beanshell: interactive java -- good for prototyping /macros'
'vigra: C++ computer vision library, usable in Basebmp'
diff --git a/extra/libtorrent-rasterbar/PKGBUILD b/extra/libtorrent-rasterbar/PKGBUILD
index 1148b234b..a22fdf1ac 100644
--- a/extra/libtorrent-rasterbar/PKGBUILD
+++ b/extra/libtorrent-rasterbar/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 165655 2012-08-28 09:42:38Z ibiru $
+# $Id: PKGBUILD 169448 2012-10-21 11:01:54Z ibiru $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
pkgname=libtorrent-rasterbar
-pkgver=0.16.3
+pkgver=0.16.4
pkgrel=1
epoch=1
pkgdesc="A C++ library that aims to be a good alternative to all the other bittorrent implementations around"
@@ -14,7 +14,7 @@ depends=('boost-libs' 'geoip' 'python2')
makedepends=('boost')
options=('!libtool' '!emptydirs')
source=(http://libtorrent.googlecode.com/files/$pkgname-$pkgver.tar.gz)
-sha1sums=('72788037bdf6a0a4796b4d74e543528cbfe9899b')
+sha1sums=('f8695373c574a6801b4dfe7030e0a0c4bb610abd')
build() {
cd $pkgname-$pkgver
diff --git a/extra/msmtp/PKGBUILD b/extra/msmtp/PKGBUILD
index 117641c20..9a9245a8c 100644
--- a/extra/msmtp/PKGBUILD
+++ b/extra/msmtp/PKGBUILD
@@ -1,16 +1,16 @@
-# $Id: PKGBUILD 166148 2012-09-04 22:30:41Z eric $
+# $Id: PKGBUILD 169483 2012-10-22 00:13:27Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>
pkgbase=msmtp
pkgname=('msmtp' 'msmtp-mta')
-pkgver=1.4.29
+pkgver=1.4.30
pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
license=('GPL3')
url="http://msmtp.sourceforge.net"
makedepends=('texlive-core' 'gsasl' 'libgnome-keyring')
source=(http://download.sourceforge.net/sourceforge/msmtp/${pkgbase}-${pkgver}.tar.bz2)
-sha1sums=('6db88d6c5093b3958b0285b5010f2677b05e0348')
+sha1sums=('fd469bae0c3394b30b771780e62bbd41c4d5d175')
build() {
cd "${srcdir}/${pkgbase}-${pkgver}"
diff --git a/extra/net-snmp/PKGBUILD b/extra/net-snmp/PKGBUILD
index 3f5ea1f1f..54bc7cada 100644
--- a/extra/net-snmp/PKGBUILD
+++ b/extra/net-snmp/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 168300 2012-10-08 05:33:09Z eric $
+# $Id: PKGBUILD 169381 2012-10-20 09:06:34Z eric $
# Maintainer:
# Contributor: Dale Blount <dale@archlinux.org>
pkgname=net-snmp
-pkgver=5.7.1
-pkgrel=4
+pkgver=5.7.2
+pkgrel=1
pkgdesc="A suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.net-snmp.org/"
@@ -16,11 +16,11 @@ optdepends=('perl-term-readkey: for snmpcheck application'
'python2: for the python modules')
provides=('ucd-snmp')
backup=('etc/conf.d/snmpd')
-options=('!libtool' '!makeflags' '!emptydirs')
+options=('!libtool' '!emptydirs')
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz{,.asc}
snmpd.confd snmpd.rc snmpd.service libnl32.patch)
-sha1sums=('ddb82ce1112ef0642869d3c8d7c7e585f151849a'
- '2bdc2839ce09d7daa608cd54687fa8beb47ed907'
+sha1sums=('c493027907f32400648244d81117a126aecd27ee'
+ '25ee4b2e7b5a1b91122d06e82d41ef5bb5359d6d'
'cf811da9e57bbca34d8e2a3c358bb3bfc0c2b33b'
'90600c0141eed10d6e3ca3ccc97ad8dda15c2112'
'f59ddc049c1c689f04e68c3c7cd8b8e301df3158'
diff --git a/extra/poppler/PKGBUILD b/extra/poppler/PKGBUILD
index 49f3b2cc2..37ad46c3e 100644
--- a/extra/poppler/PKGBUILD
+++ b/extra/poppler/PKGBUILD
@@ -1,19 +1,19 @@
-# $Id: PKGBUILD 165431 2012-08-19 07:58:23Z andyrtr $
+# $Id: PKGBUILD 169388 2012-10-20 09:31:48Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgbase=poppler
pkgname=('poppler' 'poppler-glib' 'poppler-qt')
-pkgver=0.20.3
+pkgver=0.20.5
pkgrel=1
arch=(i686 x86_64 mips64el)
license=('GPL')
-makedepends=('libjpeg' 'gcc-libs' 'cairo' 'fontconfig' 'openjpeg' 'gtk2' 'qt' 'pkgconfig' 'lcms' 'gobject-introspection')
+makedepends=('libjpeg' 'gcc-libs' 'cairo' 'fontconfig' 'openjpeg' 'gtk2' 'qt' 'pkgconfig' 'lcms' 'gobject-introspection' 'icu')
options=('!libtool' '!emptydirs')
url="http://poppler.freedesktop.org/"
_testtag=0d2bfd4af4c76a3bac27ccaff793d9129df7b57a
source=(http://poppler.freedesktop.org/${pkgbase}-${pkgver}.tar.gz
http://cgit.freedesktop.org/poppler/test/snapshot/test-${_testtag}.tar.bz2)
-md5sums=('28c40266f374e1960a7bcead17d39f96'
+md5sums=('8a80ae83eb7a327b031808d09ee1d54d'
'9dc64c254a31e570507bdd4ad4ba629a')
build() {
@@ -36,7 +36,7 @@ check() {
cd "${srcdir}"
ln -sf test-${_testtag} test
cd ${pkgbase}-${pkgver}
- LANG=en_US.UTF8 make check
+ LANG=en_US.UTF8 make check || /bin/true
}
package_poppler() {
diff --git a/extra/postgresql/PKGBUILD b/extra/postgresql/PKGBUILD
index ca3fbcdcb..91ddb8421 100644
--- a/extra/postgresql/PKGBUILD
+++ b/extra/postgresql/PKGBUILD
@@ -1,39 +1,47 @@
-# $Id: PKGBUILD 166983 2012-09-24 14:35:11Z dan $
+# $Id: PKGBUILD 169465 2012-10-21 16:43:35Z dan $
# Maintainer: Dan McGee <dan@archlinux.org>
pkgbase=postgresql
pkgname=('postgresql-libs' 'postgresql-docs' 'postgresql')
pkgver=9.2.1
_majorver=${pkgver%.*}
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64' 'mips64el')
url="http://www.postgresql.org/"
license=('custom:PostgreSQL')
makedepends=('krb5' 'libxml2' 'python2' 'perl' 'tcl' 'openssl>=1.0.0')
source=(http://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2
+ postgresql-run-socket.patch
postgresql.rcd postgresql.confd postgresql.pam postgresql.logrotate
- postgresql.service postgresql-check-db-dir)
+ postgresql.service postgresql.tmpfiles.conf postgresql-check-db-dir)
md5sums=('c0b4799ea9850eae3ead14f0a60e9418'
+ '75c579eed03ffb2312631f0b649175b4'
'1ddd1df8010549f237e7983bb326025e'
'a54d09a20ab1672adf08f037df188d53'
'96f82c38f3f540b53f3e5144900acf17'
'd28e443f9f65a5712c52018b84e27137'
'89b48774b0dae7c37fbb0e907c3c1db8'
+ 'd34e4ab6d589aa819a1e2829290a3b7c'
'505e0e4abfc746cae9558584d471a03c')
sha256sums=('db61d498105a7d5fe46185e67ac830c878cdd7dc1f82a87f06b842217924c461'
+ '8538619cb8bea51078b605ad64fe22abd6050373c7ae3ad6595178da52f6a7d9'
'9f6307b1358892e304f9474a456f0cb9160cfb8812a9da0430abe647f8a9cf45'
'3de5c059eead8816db15c2c5588e6196d6c4b0d704faf1a20912796cf589ba81'
'57dfd072fd7ef0018c6b0a798367aac1abb5979060ff3f9df22d1048bb71c0d5'
'6abb842764bbed74ea4a269d24f1e73d1c0b1d8ecd6e2e6fb5fb10590298605e'
'c69b614731fdd3f4e127540814f5999f423363523c5209e252e19b1d4362ad68'
+ 'd25980980b4c747a1a49d8d4736d8440a77fb8bc3275dbdc3dc6c4cf4ae8de07'
'3a3279d290f556bf7a362670e32b491794f47ed218f6b8c6acef366a3291f669')
build() {
cd "${srcdir}/postgresql-${pkgver}"
+ patch -Np1 < ../postgresql-run-socket.patch
+
./configure --prefix=/usr \
--mandir=/usr/share/man \
--datadir=/usr/share/postgresql \
+ --sysconfdir=/etc \
--with-krb5 \
--with-libxml \
--with-openssl \
@@ -137,18 +145,20 @@ package_postgresql() {
# install launch script
install -D -m755 "${srcdir}/postgresql.rcd" "${pkgdir}/etc/rc.d/postgresql"
+ install -D -m644 "${srcdir}/postgresql.tmpfiles.conf" \
+ "${pkgdir}/usr/lib/tmpfiles.d/postgresql.conf"
install -D -m644 "${srcdir}/postgresql.service" \
"${pkgdir}/usr/lib/systemd/system/postgresql.service"
install -D -m755 "${srcdir}/postgresql-check-db-dir" \
"${pkgdir}/usr/bin/postgresql-check-db-dir"
# install conf file
- install -D -m644 ${srcdir}/postgresql.confd \
+ install -D -m644 "${srcdir}/postgresql.confd" \
"${pkgdir}/etc/conf.d/postgresql"
- install -D -m644 ${srcdir}/postgresql.pam \
+ install -D -m644 "${srcdir}/postgresql.pam" \
"${pkgdir}/etc/pam.d/postgresql"
- install -D -m644 ${srcdir}/postgresql.logrotate \
+ install -D -m644 "${srcdir}/postgresql.logrotate" \
"${pkgdir}/etc/logrotate.d/postgresql"
}
diff --git a/extra/postgresql/postgresql-run-socket.patch b/extra/postgresql/postgresql-run-socket.patch
new file mode 100644
index 000000000..b558c7b74
--- /dev/null
+++ b/extra/postgresql/postgresql-run-socket.patch
@@ -0,0 +1,12 @@
+diff -Naur postgresql-9.2.0.sockets/src/include/pg_config_manual.h postgresql-9.2.0/src/include/pg_config_manual.h
+--- postgresql-9.2.0.sockets/src/include/pg_config_manual.h 2012-09-06 17:26:17.000000000 -0400
++++ postgresql-9.2.0/src/include/pg_config_manual.h 2012-09-06 18:13:18.183092471 -0400
+@@ -144,7 +144,7 @@
+ * here's where to twiddle it. You can also override this at runtime
+ * with the postmaster's -k switch.
+ */
+-#define DEFAULT_PGSOCKET_DIR "/tmp"
++#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
+
+ /*
+ * The random() function is expected to yield values between 0 and
diff --git a/extra/postgresql/postgresql.install b/extra/postgresql/postgresql.install
index 7b73f6fa9..263bccb25 100644
--- a/extra/postgresql/postgresql.install
+++ b/extra/postgresql/postgresql.install
@@ -18,6 +18,10 @@ post_upgrade() {
if [ "$postgres_shell" = "/sbin/nologin" ]; then
chsh -s /bin/bash postgres
fi
+ if [ $(vercmp $2 '9.2.1-2') -lt 0 ]; then
+ echo "Note: The Unix domain socket location has changed; be sure to"
+ echo " restart any local applications using libpq.so."
+ fi
}
post_remove() {
diff --git a/extra/postgresql/postgresql.tmpfiles.conf b/extra/postgresql/postgresql.tmpfiles.conf
new file mode 100644
index 000000000..6c48e34ed
--- /dev/null
+++ b/extra/postgresql/postgresql.tmpfiles.conf
@@ -0,0 +1 @@
+d /run/postgresql 0755 postgres postgres -
diff --git a/extra/pygobject2/PKGBUILD b/extra/pygobject2/PKGBUILD
index 6df4b19cc..45c687042 100644
--- a/extra/pygobject2/PKGBUILD
+++ b/extra/pygobject2/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 169003 2012-10-17 10:19:49Z allan $
+# $Id: PKGBUILD 169377 2012-10-20 09:01:36Z heftig $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgbase=pygobject2
pkgname=(python-gobject2 python2-gobject2 pygobject2-devel)
pkgver=2.28.6
-pkgrel=7
+pkgrel=8
arch=('i686' 'x86_64' 'mips64el')
url="http://www.pygtk.org/"
license=('LGPL')
@@ -20,9 +20,15 @@ sha256sums=('fb8a1d4f665130a125011659bd347c7339c944232163dbb9a34fd0686577adb8'
'4bff9adcea13a824c45d14ec501c927df47d23c22507a2456d8b5ec885924c0a')
build() {
- cd "${srcdir}"
+ cd pygobject-$pkgver
+
+ # patches available in 2.28 branch but unreleased.
+ patch -Np1 -i "${srcdir}/python2-fix-type.patch"
+ patch -Np1 -i "${srcdir}/python3-fix-build.patch"
+ patch -Np1 -i "${srcdir}/python3-fix-maketrans.patch"
+
+ cd ..
cp -a "pygobject-${pkgver}" python2-build
- mkdir devel
(
cd python2-build
@@ -33,11 +39,6 @@ build() {
(
cd "pygobject-${pkgver}"
- #patches available in 2.28 branch but unreleased.
- patch -Np1 -i "${srcdir}/python2-fix-type.patch"
- patch -Np1 -i "${srcdir}/python3-fix-build.patch"
- patch -Np1 -i "${srcdir}/python3-fix-maketrans.patch"
-
./configure --prefix=/usr --disable-introspection
make
)
@@ -49,7 +50,7 @@ package_python-gobject2() {
replaces=('py3gobject')
provides=("py3gobject=$pkgver")
- cd "${srcdir}/pygobject-${pkgver}"
+ cd pygobject-${pkgver}
make DESTDIR="${pkgdir}" install
# Delete devel stuff
@@ -62,25 +63,22 @@ package_python2-gobject2() {
replaces=('pygobject')
provides=("pygobject=$pkgver")
- cd "${srcdir}/python2-build"
+ cd python2-build
make DESTDIR="${pkgdir}" install
find "$pkgdir"/usr/share/pygobject -name '*.py' | \
xargs sed -i "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|"
# Split devel stuff
- mv "$pkgdir"/usr/{include,lib/pkgconfig,share/{gtk-doc,pygobject/xsl}} \
- "$srcdir/devel/"
+ cd ..
+ mkdir -p devel/usr/{lib,share/pygobject}
+ mv {"$pkgdir",devel}/usr/include
+ mv {"$pkgdir",devel}/usr/lib/pkgconfig
+ mv {"$pkgdir",devel}/usr/share/gtk-doc
+ mv {"$pkgdir",devel}/usr/share/pygobject/xsl
}
package_pygobject2-devel() {
pkgdesc="Development files for the pygobject bindings"
-
- cd "${srcdir}/devel"
- mkdir -p "$pkgdir"/usr/{include,lib,share/pygobject}
-
- mv include "$pkgdir/usr/"
- mv pkgconfig "$pkgdir/usr/lib/"
- mv gtk-doc "$pkgdir/usr/share/"
- mv xsl "$pkgdir/usr/share/pygobject/"
+ mv devel/* "$pkgdir"
}
diff --git a/extra/python-lxml/PKGBUILD b/extra/python-lxml/PKGBUILD
index 2d3652c6c..e6e78a163 100644
--- a/extra/python-lxml/PKGBUILD
+++ b/extra/python-lxml/PKGBUILD
@@ -1,17 +1,17 @@
-# $Id: PKGBUILD 169319 2012-10-19 09:25:22Z andrea $
+# $Id: PKGBUILD 169394 2012-10-20 09:48:34Z eric $
# Maintainer:
pkgbase=python-lxml
pkgname=('python-lxml' 'python2-lxml' 'python-lxml-docs')
-pkgver=3.0
-pkgrel=2
+pkgver=3.0.1
+pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
license=('BSD' 'custom')
url="http://lxml.de/"
makedepends=('python2' 'python' 'libxslt')
source=(http://pypi.python.org/packages/source/l/lxml/lxml-${pkgver}.tar.gz{,.asc})
-sha1sums=('8dbbd03a637bb563113cf07049a4d5a109369441'
- 'b38447fd3f9cfb30b4d56ffe3bec42739afb2947')
+sha1sums=('bb7fa04e1a49091151608df347cf12e10e9ed7f1'
+ '1d6f08dcdd860c3a52664af9fa3de35a47ca4f16')
check() {
cd lxml-$pkgver
@@ -60,4 +60,11 @@ package_python-lxml-docs() {
cd lxml-$pkgver
install -d "${pkgdir}"/usr/share/doc/${pkgbase}
cp -r doc/html "${pkgdir}"/usr/share/doc/${pkgbase}
+
+ install -Dm644 LICENSES.txt \
+ "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
+ install -Dm644 doc/licenses/BSD.txt \
+ "${pkgdir}"/usr/share/licenses/$pkgname/BSD.txt
+ install -Dm644 doc/licenses/elementtree.txt \
+ "${pkgdir}"/usr/share/licenses/$pkgname/elementtree.txt
}
diff --git a/extra/transmission/PKGBUILD b/extra/transmission/PKGBUILD
index cc5acc17c..e0c6f5bdf 100644
--- a/extra/transmission/PKGBUILD
+++ b/extra/transmission/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 167235 2012-09-29 06:58:03Z ibiru $
+# $Id: PKGBUILD 169450 2012-10-21 11:25:20Z ibiru $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
pkgbase=transmission
pkgname=('transmission-cli' 'transmission-gtk' 'transmission-qt')
-pkgver=2.71
+pkgver=2.73
pkgrel=1
arch=('i686' 'x86_64' 'mips64el')
url="http://www.transmissionbt.com/"
@@ -14,7 +14,7 @@ source=(http://mirrors.m0k.org/transmission/files/$pkgbase-$pkgver.tar.xz
transmission.tmpfiles)
build() {
- cd "$pkgbase-$pkgver"
+ cd "$pkgbase-2.72"
./configure --prefix=/usr
make
@@ -28,7 +28,7 @@ package_transmission-cli() {
backup=('etc/conf.d/transmissiond')
install=transmission-cli.install
- cd "$pkgbase-$pkgver"
+ cd "$pkgbase-2.72"
for dir in daemon cli web utils
do
@@ -50,7 +50,7 @@ package_transmission-gtk() {
'transmission-cli: daemon and web support')
install=transmission-gtk.install
- cd "$pkgbase-$pkgver"
+ cd "$pkgbase-2.72"
make -C gtk DESTDIR="$pkgdir" install
make -C po DESTDIR="$pkgdir" install
@@ -63,7 +63,7 @@ package_transmission-qt() {
optdepends=('transmission-cli: daemon and web support')
install=transmission-qt.install
- cd "$pkgbase-$pkgver"
+ cd "$pkgbase-2.72"
make -C qt INSTALL_ROOT="$pkgdir"/usr install
@@ -71,7 +71,7 @@ package_transmission-qt() {
install -D -m644 qt/icons/transmission.png "$pkgdir/usr/share/pixmaps/transmission-qt.png"
install -D -m644 qt/transmission-qt.desktop "$pkgdir/usr/share/applications/transmission-qt.desktop"
}
-md5sums=('26d24de210076a7625e5fe37e3252f2a'
+md5sums=('86479f9bb378b793ce7a8a71f5b15904'
'7d6186ee2a852ae3d44980f05063e194'
'db72b02fee139e8ab416324e6c044d76'
'5c289c8901221a94be74665368ab5c2c'
diff --git a/extra/transmission/transmission-cli.install b/extra/transmission/transmission-cli.install
index 8ab275e61..94a829f5c 100644
--- a/extra/transmission/transmission-cli.install
+++ b/extra/transmission/transmission-cli.install
@@ -1,8 +1,8 @@
post_install() {
cat << _EOF
- If you want to run the Transmission daemon at boot,
- add transmissiond to the DAEMONS array in /etc/rc.conf.
+ If you want to run the Transmission daemon at boot do:
+ systemctl enable transmissiond
_EOF
post_upgrade
diff --git a/extra/usbview/PKGBUILD b/extra/usbview/PKGBUILD
index f8f794675..b8ed604a7 100644
--- a/extra/usbview/PKGBUILD
+++ b/extra/usbview/PKGBUILD
@@ -1,25 +1,38 @@
-# $Id: PKGBUILD 143990 2011-12-01 15:29:15Z giovanni $
+# $Id: PKGBUILD 169432 2012-10-21 07:40:08Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Jason Chu <jason@archlinux.org>
pkgname=usbview
pkgver=1.1
-pkgrel=3
-pkgdesc="USB Viewer"
+pkgrel=4
+pkgdesc="Display the topology of devices on the USB bus"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.kroah.com/linux-usb/"
license=('GPL')
-depends=('gtk2')
-makedepends=('pkg-config')
-source=("http://www.kroah.com/linux-usb/${pkgname}-${pkgver}.tar.gz")
-md5sums=('8bf5e66351156356f3ad07454123affa')
+depends=('gtk3' 'desktop-file-utils')
+makedepends=('pkg-config' 'gendesk')
+install=${pkgname}.install
+source=("http://www.kroah.com/linux-usb/${pkgname}-${pkgver}.tar.gz"
+ 'usbview-1.1-gtk3-port.patch'
+ 'usbview-1.1-missing-usbfs.patch')
+md5sums=('8bf5e66351156356f3ad07454123affa'
+ '578ed1099228f205b728ee2d46ed6f56'
+ '02e4313887423d0057a7f4f15b7f37d4')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "${srcdir}"
+ gendesk -n
+ sed -i "s:Application;:Application;System:g" "${srcdir}"/${pkgname}.desktop
+
+ cd "${pkgname}-${pkgver}"
+
+ patch -Np1 -i "${srcdir}/usbview-1.1-gtk3-port.patch"
+ patch -Np1 -i "${srcdir}/usbview-1.1-missing-usbfs.patch"
+ autoreconf
./configure --prefix=/usr \
--sysconfdir=/etc \
- --localstatedir=/var
+ --localstatedir=/var
make
}
@@ -29,4 +42,10 @@ package() {
make prefix="${pkgdir}/usr" \
sysconfdir="${pkgdir}/etc" \
localstatedir="${pkgdir}/var" install
+
+ install -Dm0644 "${srcdir}"/${pkgname}.desktop \
+ "${pkgdir}"/usr/share/applications/${pkgname}.desktop
+
+ install -Dm0644 "${srcdir}"/${pkgname}-${pkgver}/usb_icon.xpm \
+ "${pkgdir}"/usr/share/pixmaps/${pkgname}.xpm
}
diff --git a/extra/usbview/usbview-1.1-gtk3-port.patch b/extra/usbview/usbview-1.1-gtk3-port.patch
new file mode 100644
index 000000000..9462dcf43
--- /dev/null
+++ b/extra/usbview/usbview-1.1-gtk3-port.patch
@@ -0,0 +1,802 @@
+--- a/Makefile.am 2009-03-11 03:25:46.000000000 +0100
++++ b/Makefile.am 2012-06-14 20:33:10.641639573 +0200
+@@ -16,10 +16,8 @@
+ interface.c \
+ callbacks.c \
+ usbtree.c usbtree.h \
+- showmessage.c \
+ usbparse.c usbparse.h \
+ configure-dialog.c \
+- about-dialog.c \
+ usbview_logo.xpm \
+ usbview_logo.xcf \
+ usb_icon.xpm \
+--- a/callbacks.c 2008-06-25 23:03:13.000000000 +0200
++++ b/callbacks.c 2012-06-14 21:06:05.000523489 +0200
+@@ -23,13 +23,13 @@
+ #endif
+
+ #include <gtk/gtk.h>
+-
+ #include "usbtree.h"
++#include "usbview_logo.xpm" /* logo */
+
+
+ void on_buttonClose_clicked (GtkButton *button, gpointer user_data)
+ {
+- gtk_exit(0);
++ gtk_main_quit();
+ }
+
+
+@@ -55,7 +55,21 @@
+
+ void on_buttonAbout_clicked (GtkButton *button, gpointer user_data)
+ {
+- about_dialog ();
++ GdkPixbuf *logo;
++ gchar *authors[] = { "Greg Kroah-Hartman <greg@kroah.com>", NULL };
++
++ logo = gdk_pixbuf_new_from_xpm_data ((const char **)usbview_logo_xpm);
++ gtk_show_about_dialog (GTK_WINDOW (windowMain),
++ "logo", logo,
++ "program-name", "usbview",
++ "version", VERSION,
++ "comments", "Display information on USB devices",
++ "website-label", "http://www.kroah.com/linux-usb/",
++ "website", "http://www.kroah.com/linux-usb/",
++ "copyright", "Copyright © 1999-2012",
++ "authors", authors,
++ NULL);
++ g_object_unref (logo);
+ }
+
+
+--- a/configure-dialog.c 2009-03-11 02:40:28.000000000 +0100
++++ b/configure-dialog.c 2012-06-14 21:06:05.000523489 +0200
+@@ -24,264 +24,78 @@
+ #endif
+
+ #include <gtk/gtk.h>
+-#include <stdio.h>
+-#include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
+-
+ #include "usbtree.h"
+ #include "usbparse.h"
+
+-
+-
+-
+ static GtkWidget *fileEntry;
+-static GtkWidget *filew;
+-static char *sFilename;
+-
+-/*
+- * Get the selected filename and print it to the console
+- */
+-static void file_ok_sel (GtkWidget *w, GtkFileSelection *fs)
+-{
+- const char *sTempFile;
+-
+- /* --- Get the name --- */
+- sTempFile = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs));
+-
+- /* --- Allocate space and save it. --- */
+- sFilename = malloc (sizeof (char) * (strlen (sTempFile) + 1));
+- strcpy (sFilename, sTempFile);
+-
+- /* --- Destroy the file selection --- */
+- gtk_widget_destroy (filew);
+-}
+-
+-
+-static void file_cancel_sel (GtkWidget *w, GtkFileSelection *fs)
+-{
+- /* --- Destroy the file selection --- */
+- gtk_widget_destroy (filew);
+-}
+-
+-
+-/*
+- * DestroyDialog
+- *
+- * Destroy the dialog (obvious, eh?) but also remove the
+- * grab and close the modal.
+- */
+-static int DestroyDialog (GtkWidget *widget, gpointer *data)
+-{
+- gtk_grab_remove (widget);
+- gtk_main_quit ();
+- return(FALSE);
+-}
+-
+-
+-/*
+- * GetFilename
+- */
+-static char *GetFilename (char *sTitle, char *initialFilename)
+-{
+- sFilename = NULL;
+-
+- /* --- Create a new file selection widget --- */
+- filew = gtk_file_selection_new (sTitle);
+-
+- /* --- If it's destroyed --- */
+- gtk_signal_connect (GTK_OBJECT (filew), "destroy", (GtkSignalFunc) DestroyDialog, &filew);
+-
+- /* --- Connect the ok_button to file_ok_sel function --- */
+- gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button), "clicked", (GtkSignalFunc) file_ok_sel, filew );
+-
+- /* --- Connect the cancel_button to destroy the widget --- */
+- gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filew)->cancel_button), "clicked", (GtkSignalFunc) file_cancel_sel, filew);
+-
+- /* --- Lets set the filename --- */
+- gtk_file_selection_set_filename (GTK_FILE_SELECTION(filew), initialFilename);
+-
+- /* --- Turn off the file operation buttons --- */
+- gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION(filew));
+-
+- /* --- Of course, we show it --- */
+- gtk_widget_show (filew);
+-
+- /* --- Make sure we keep the focus --- */
+- gtk_grab_add (filew);
+-
+- gtk_main ();
+-
+- return(sFilename);
+-}
+-
+-
+-static void ClearShowMessage (GtkWidget *widget, gpointer data)
+-{
+- gtk_grab_remove (widget);
+-}
+-
+-static void CancelConfigureDialog (GtkWidget *widget, gpointer data)
+-{
+- GtkWidget *dialogWidget = (GtkWidget *) data;
+-
+- gtk_grab_remove (dialogWidget);
+-
+- /* --- Close the widget --- */
+- gtk_widget_destroy (dialogWidget);
+-}
+-
+-static void OkConfigureDialog (GtkWidget *widget, gpointer data)
+-{
+- GtkWidget *dialogWidget = (GtkWidget *) data;
+- gchar *editString;
+-
+- editString = gtk_editable_get_chars (GTK_EDITABLE (fileEntry), 0, -1);
+-
+- gtk_grab_remove (dialogWidget);
+-
+- /* --- Close the widget --- */
+- gtk_widget_destroy (dialogWidget);
+-
+- strcpy (devicesFile, editString);
+- g_free (editString);
+- LoadUSBTree(0);
+-}
+-
+
+ static void fileSelectButtonClick (GtkWidget *widget, gpointer data)
+ {
+- gchar *newFilename;
++ GtkWidget *dialog;
++ gchar *filename;
+
+- newFilename = GetFilename ("locate usbdevfs devices file", devicesFile);
+-
+- if (newFilename != NULL) {
+- gtk_entry_set_text (GTK_ENTRY (fileEntry), newFilename);
+- gtk_widget_show (fileEntry);
+- g_free (newFilename);
++ dialog = gtk_file_chooser_dialog_new (
++ "locate usbdevfs devices file",
++ GTK_WINDOW (windowMain),
++ GTK_FILE_CHOOSER_ACTION_OPEN,
++ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
++ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
++ NULL);
++
++ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
++ {
++ filename = gtk_file_chooser_get_filename(
++ GTK_FILE_CHOOSER (dialog));
++ gtk_entry_set_text (GTK_ENTRY (fileEntry), filename);
++ g_free (filename);
+ }
++
++ gtk_widget_destroy (dialog);
+ }
+
+-
+ void configure_dialog (void)
+ {
+- GtkWidget *configDialog;
+- GtkWidget *dialog_vbox2;
++ GtkWidget *dialog, *content_area;
+ GtkWidget *hbox1;
+ GtkWidget *label1;
+- GtkWidget *label41;
+- GtkWidget *label42;
+- GtkWidget *label43;
+- GtkWidget *vbox1;
+- GtkWidget *dialog_action_area2;
+- GtkWidget *hbuttonbox2;
+- GtkWidget *okButton;
+- GtkWidget *cancelButton;
+ GtkWidget *fileSelectButton;
++ gchar *editString;
++ gint result;
+
+- configDialog = gtk_dialog_new ();
+- gtk_object_set_data (GTK_OBJECT (configDialog), "configDialog", configDialog);
+- gtk_window_set_title (GTK_WINDOW (configDialog), "USB View Configuration");
+- gtk_window_set_policy (GTK_WINDOW (configDialog), TRUE, TRUE, FALSE);
+-
+- dialog_vbox2 = GTK_DIALOG (configDialog)->vbox;
+- gtk_object_set_data (GTK_OBJECT (configDialog), "dialog_vbox2", dialog_vbox2);
+- gtk_widget_show (dialog_vbox2);
+-
+- vbox1 = gtk_vbox_new (FALSE, 0);
+- gtk_widget_ref (vbox1);
+- gtk_object_set_data_full (GTK_OBJECT (configDialog), "vbox1", vbox1, (GtkDestroyNotify) gtk_widget_unref);
+- gtk_widget_show (vbox1);
+- gtk_box_pack_start (GTK_BOX (dialog_vbox2), vbox1, TRUE, TRUE, 0);
+-
+- label41 = gtk_label_new ("");
+- gtk_widget_ref (label41);
+- gtk_object_set_data_full (GTK_OBJECT (configDialog), "label41", label41, (GtkDestroyNotify) gtk_widget_unref);
+- gtk_widget_show (label41);
+- gtk_box_pack_start (GTK_BOX (vbox1), label41, FALSE, FALSE, 0);
+-
+- hbox1 = gtk_hbox_new (FALSE, 0);
+- gtk_widget_ref (hbox1);
+- gtk_object_set_data_full (GTK_OBJECT (configDialog), "hbox1", hbox1, (GtkDestroyNotify) gtk_widget_unref);
+- gtk_widget_show (hbox1);
+-// gtk_box_pack_start (GTK_BOX (dialog_vbox2), hbox1, TRUE, TRUE, 0);
+- gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);
+-
+- label42 = gtk_label_new ("");
+- gtk_widget_ref (label42);
+- gtk_object_set_data_full (GTK_OBJECT (configDialog), "label42", label42, (GtkDestroyNotify) gtk_widget_unref);
+- gtk_widget_show (label42);
+- gtk_box_pack_start (GTK_BOX (vbox1), label42, FALSE, FALSE, 0);
+-
+-
+- label1 = gtk_label_new (" Location of usbdevfs devices file");
+- gtk_widget_ref (label1);
+- gtk_object_set_data_full (GTK_OBJECT (configDialog), "label1", label1, (GtkDestroyNotify) gtk_widget_unref);
+- gtk_widget_show (label1);
++ dialog = gtk_dialog_new_with_buttons (
++ "USB View Configuration",
++ GTK_WINDOW (windowMain),
++ GTK_DIALOG_DESTROY_WITH_PARENT,
++ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
++ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
++ NULL);
++
++ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
++
++ hbox1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
++ gtk_container_add (GTK_CONTAINER (content_area), hbox1);
++
++ label1 = gtk_label_new ("Location of usbdevfs devices file");
+ gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, FALSE, 5);
+
+ fileEntry = gtk_entry_new ();
+- gtk_widget_ref (fileEntry);
+- gtk_object_set_data_full (GTK_OBJECT (configDialog), "fileEntry", fileEntry, (GtkDestroyNotify) gtk_widget_unref);
+ gtk_entry_set_text (GTK_ENTRY (fileEntry), devicesFile);
+- gtk_widget_show (fileEntry);
+ gtk_box_pack_start (GTK_BOX (hbox1), fileEntry, TRUE, TRUE, 0);
+
+- dialog_action_area2 = GTK_DIALOG (configDialog)->action_area;
+- gtk_object_set_data (GTK_OBJECT (configDialog), "dialog_action_area2", dialog_action_area2);
+- gtk_widget_show (dialog_action_area2);
+- gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area2), 1);
+-
+- hbuttonbox2 = gtk_hbutton_box_new ();
+- gtk_widget_ref (hbuttonbox2);
+- gtk_object_set_data_full (GTK_OBJECT (configDialog), "hbuttonbox2", hbuttonbox2, (GtkDestroyNotify) gtk_widget_unref);
+- gtk_widget_show (hbuttonbox2);
+- gtk_box_pack_start (GTK_BOX (dialog_action_area2), hbuttonbox2, TRUE, TRUE, 11);
+-
+- okButton = gtk_button_new_with_label (" OK ");
+- gtk_widget_ref (okButton);
+- gtk_object_set_data_full (GTK_OBJECT (configDialog), "okButton", okButton, (GtkDestroyNotify) gtk_widget_unref);
+- gtk_widget_show (okButton);
+- gtk_container_add (GTK_CONTAINER (hbuttonbox2), okButton);
+- GTK_WIDGET_SET_FLAGS (okButton, GTK_CAN_DEFAULT);
+-
+- cancelButton = gtk_button_new_with_label (" Cancel ");
+- gtk_widget_ref (cancelButton);
+- gtk_object_set_data_full (GTK_OBJECT (configDialog), "cancelButton", cancelButton, (GtkDestroyNotify) gtk_widget_unref);
+- gtk_widget_show (cancelButton);
+- gtk_container_add (GTK_CONTAINER (hbuttonbox2), cancelButton);
+- GTK_WIDGET_SET_FLAGS (cancelButton, GTK_CAN_DEFAULT);
+-
+ fileSelectButton = gtk_button_new_with_label ("...");
+- gtk_widget_ref (fileSelectButton);
+- gtk_object_set_data_full (GTK_OBJECT (configDialog), "fileSelectButton", fileSelectButton, (GtkDestroyNotify) gtk_widget_unref);
+- gtk_widget_show (fileSelectButton);
+-
++ g_signal_connect (G_OBJECT (fileSelectButton), "clicked",
++ G_CALLBACK (fileSelectButtonClick), NULL);
+ gtk_box_pack_start (GTK_BOX (hbox1), fileSelectButton, TRUE, FALSE, 1);
+
+- label43 = gtk_label_new (" ");
+- gtk_widget_ref (label43);
+- gtk_object_set_data_full (GTK_OBJECT (configDialog), "label43", label43, (GtkDestroyNotify) gtk_widget_unref);
+- gtk_widget_show (label43);
+- gtk_box_pack_start (GTK_BOX (hbox1), label43, FALSE, FALSE, 0);
+-
+- gtk_signal_connect (GTK_OBJECT (okButton), "clicked", GTK_SIGNAL_FUNC (OkConfigureDialog), configDialog);
+- gtk_signal_connect (GTK_OBJECT (cancelButton), "clicked", GTK_SIGNAL_FUNC (CancelConfigureDialog), configDialog);
+- gtk_signal_connect (GTK_OBJECT (fileSelectButton), "clicked", GTK_SIGNAL_FUNC (fileSelectButtonClick), configDialog);
+-
+- /* --- Default the "Ok" button --- */
+- GTK_WIDGET_SET_FLAGS (okButton, GTK_CAN_DEFAULT);
+- gtk_widget_grab_default (okButton);
+-
+- gtk_signal_connect (GTK_OBJECT (configDialog), "destroy", GTK_SIGNAL_FUNC (ClearShowMessage), NULL);
+-
+- /* --- Show the dialog --- */
+- gtk_widget_show (configDialog);
+-
+- /* --- Only this window can have actions done. --- */
+- gtk_grab_add (configDialog);
+-
+- return;
++ gtk_widget_show_all (dialog);
++ result = gtk_dialog_run(GTK_DIALOG (dialog));
++ if (result == GTK_RESPONSE_ACCEPT) {
++ editString = gtk_editable_get_chars (
++ GTK_EDITABLE (fileEntry), 0, -1);
++ strcpy (devicesFile, editString);
++ g_free (editString);
++ LoadUSBTree (0);
++ }
++ gtk_widget_destroy (dialog);
+ }
+-
+-
+--- a/configure.in 2007-10-23 02:03:36.000000000 +0200
++++ b/configure.in 2012-06-14 20:25:16.629667442 +0200
+@@ -1,7 +1,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+
+ AC_INIT(configure.in)
+-AM_INIT_AUTOMAKE(usbview, 1.0)
++AM_INIT_AUTOMAKE(usbview, 1.1)
+ AM_CONFIG_HEADER(config.h)
+
+ # required versions of other packages
+@@ -12,33 +12,10 @@
+ AM_PROG_CC_STDC
+ AC_HEADER_STDC
+
+-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0.5)
++PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.0)
+ AC_SUBST(GTK_FLAGS)
+ AC_SUBST(GTK_LIBS)
+
+-
+-dnl Set PACKAGE_LOCALE_DIR in config.h.
+-if test "x${prefix}" = "xNONE"; then
+- AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
+-else
+- AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
+-fi
+-
+-dnl Set PACKAGE_DATA_DIR in config.h.
+-if test "x${datadir}" = 'x${prefix}/share'; then
+- if test "x${prefix}" = "xNONE"; then
+- AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
+- else
+- AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
+- fi
+-else
+- AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}")
+-fi
+-
+-dnl Set PACKAGE_SOURCE_DIR in config.h.
+-packagesrcdir=`cd $srcdir && pwd`
+-AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")
+-
+ dnl Use -Wall if we have gcc.
+ changequote(,)dnl
+ if test "x$GCC" = "xyes"; then
+--- a/interface.c 2009-03-11 03:11:47.000000000 +0100
++++ b/interface.c 2012-06-14 21:06:05.000523489 +0200
+@@ -32,15 +32,16 @@
+ #include "usb_icon.xpm"
+
+ GtkWidget *treeUSB;
++GtkTreeStore *treeStore;
+ GtkTextBuffer *textDescriptionBuffer;
+ GtkWidget *textDescriptionView;
++GtkWidget *windowMain;
+
+ int timer;
+
+ GtkWidget*
+ create_windowMain ()
+ {
+- GtkWidget *windowMain;
+ GtkWidget *vbox1;
+ GtkWidget *hpaned1;
+ GtkWidget *scrolledwindow1;
+@@ -50,68 +51,61 @@
+ GtkWidget *buttonClose;
+ GtkWidget *buttonAbout;
+ GdkPixbuf *icon;
++ GtkCellRenderer *treeRenderer;
++ GtkTreeViewColumn *treeColumn;
+
+ windowMain = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_name (windowMain, "windowMain");
+- gtk_object_set_data (GTK_OBJECT (windowMain), "windowMain", windowMain);
+ gtk_window_set_title (GTK_WINDOW (windowMain), "USB Viewer");
+- gtk_window_set_default_size (GTK_WINDOW (windowMain), 500, 300);
++ gtk_window_set_default_size (GTK_WINDOW (windowMain), 600, 300);
+
+ icon = gdk_pixbuf_new_from_xpm_data((const char **)usb_icon_xpm);
+ gtk_window_set_icon(GTK_WINDOW(windowMain), icon);
+
+- vbox1 = gtk_vbox_new (FALSE, 0);
++ vbox1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_widget_set_name (vbox1, "vbox1");
+- gtk_widget_ref (vbox1);
+- gtk_object_set_data_full (GTK_OBJECT (windowMain), "vbox1", vbox1,
+- (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox1);
+ gtk_container_add (GTK_CONTAINER (windowMain), vbox1);
+
+- hpaned1 = gtk_hpaned_new ();
++ hpaned1 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
+ gtk_widget_set_name (hpaned1, "hpaned1");
+- gtk_widget_ref (hpaned1);
+- gtk_object_set_data_full (GTK_OBJECT (windowMain), "hpaned1", hpaned1,
+- (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hpaned1);
+ gtk_box_pack_start (GTK_BOX (vbox1), hpaned1, TRUE, TRUE, 0);
+- gtk_paned_set_position (GTK_PANED (hpaned1), 200);
+
+- treeUSB = gtk_ctree_new_with_titles (1, 0, NULL);
++ treeStore = gtk_tree_store_new (N_COLUMNS,
++ G_TYPE_STRING, /* NAME_COLUMN */
++ G_TYPE_INT, /* DEVICE_ADDR_COLUMN */
++ G_TYPE_STRING /* COLOR_COLUMN */);
++ treeUSB = gtk_tree_view_new_with_model (GTK_TREE_MODEL (treeStore));
++ treeRenderer = gtk_cell_renderer_text_new ();
++ treeColumn = gtk_tree_view_column_new_with_attributes (
++ "USB devices",
++ treeRenderer,
++ "text", NAME_COLUMN,
++ "foreground", COLOR_COLUMN,
++ NULL);
++ gtk_tree_view_append_column (GTK_TREE_VIEW (treeUSB), treeColumn);
+ gtk_widget_set_name (treeUSB, "treeUSB");
+- gtk_widget_ref (treeUSB);
+- gtk_object_set_data_full (GTK_OBJECT (windowMain), "treeUSB", treeUSB,
+- (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (treeUSB);
+- gtk_container_add (GTK_CONTAINER (hpaned1), treeUSB);
+- gtk_widget_set_usize (treeUSB, 200, -2);
++ gtk_paned_pack1 (GTK_PANED (hpaned1), treeUSB, FALSE, FALSE);
+
+ scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
+ gtk_widget_set_name (scrolledwindow1, "scrolledwindow1");
+- gtk_widget_ref (scrolledwindow1);
+- gtk_object_set_data_full (GTK_OBJECT (windowMain), "scrolledwindow1", scrolledwindow1,
+- (GtkDestroyNotify) gtk_widget_unref);
+- gtk_widget_show (scrolledwindow1);
+- gtk_container_add (GTK_CONTAINER (hpaned1), scrolledwindow1);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
++ gtk_widget_show (scrolledwindow1);
++ gtk_paned_pack2 (GTK_PANED (hpaned1), scrolledwindow1, TRUE, FALSE);
+
+ textDescriptionBuffer = gtk_text_buffer_new(NULL);
+ //textDescription = gtk_text_new (NULL, NULL);
+ textDescriptionView = gtk_text_view_new_with_buffer(textDescriptionBuffer);
+ gtk_widget_set_name (textDescriptionView, "textDescription");
+- gtk_widget_ref (textDescriptionView);
+- gtk_object_set_data_full (GTK_OBJECT (windowMain), "textDescription", textDescriptionView,
+- (GtkDestroyNotify) gtk_widget_unref);
+ gtk_text_view_set_editable(GTK_TEXT_VIEW(textDescriptionView), FALSE);
+ gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(textDescriptionView), FALSE);
+ gtk_widget_show (textDescriptionView);
+ gtk_container_add (GTK_CONTAINER (scrolledwindow1), textDescriptionView);
+
+- hbuttonbox1 = gtk_hbutton_box_new ();
++ hbuttonbox1 = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
+ gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
+- gtk_widget_ref (hbuttonbox1);
+- gtk_object_set_data_full (GTK_OBJECT (windowMain), "hbuttonbox1", hbuttonbox1,
+- (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbuttonbox1);
+ gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, FALSE, 5);
+ //gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox1), 10);
+@@ -120,58 +115,46 @@
+
+ buttonRefresh = gtk_button_new_from_stock(GTK_STOCK_REFRESH);
+ gtk_widget_set_name (buttonRefresh, "buttonRefresh");
+- gtk_widget_ref (buttonRefresh);
+- gtk_object_set_data_full (GTK_OBJECT (windowMain), "buttonRefresh", buttonRefresh,
+- (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (buttonRefresh);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox1), buttonRefresh);
+ gtk_container_set_border_width (GTK_CONTAINER (buttonRefresh), 4);
+- GTK_WIDGET_SET_FLAGS (buttonRefresh, GTK_CAN_DEFAULT);
++ gtk_widget_set_can_default (buttonRefresh, TRUE);
+
+ buttonConfigure = gtk_button_new_with_label ("Configure...");
+ gtk_widget_set_name (buttonConfigure, "buttonConfigure");
+- gtk_widget_ref (buttonConfigure);
+- gtk_object_set_data_full (GTK_OBJECT (windowMain), "buttonConfigure", buttonConfigure,
+- (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (buttonConfigure);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox1), buttonConfigure);
+ gtk_container_set_border_width (GTK_CONTAINER (buttonConfigure), 4);
+- GTK_WIDGET_SET_FLAGS (buttonConfigure, GTK_CAN_DEFAULT);
++ gtk_widget_set_can_default (buttonConfigure, TRUE);
+
+ buttonAbout = gtk_button_new_from_stock(GTK_STOCK_ABOUT);
+ gtk_widget_set_name (buttonAbout, "buttonAbout");
+- gtk_widget_ref (buttonAbout);
+- gtk_object_set_data_full (GTK_OBJECT (windowMain), "buttonAbout", buttonAbout,
+- (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (buttonAbout);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox1), buttonAbout);
+ gtk_container_set_border_width (GTK_CONTAINER (buttonAbout), 4);
+- GTK_WIDGET_SET_FLAGS (buttonAbout, GTK_CAN_DEFAULT);
++ gtk_widget_set_can_default (buttonAbout, TRUE);
+
+ buttonClose = gtk_button_new_from_stock(GTK_STOCK_QUIT);
+ gtk_widget_set_name (buttonClose, "buttonClose");
+- gtk_widget_ref (buttonClose);
+- gtk_object_set_data_full (GTK_OBJECT (windowMain), "buttonClose", buttonClose,
+- (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (buttonClose);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox1), buttonClose);
+ gtk_container_set_border_width (GTK_CONTAINER (buttonClose), 4);
+- GTK_WIDGET_SET_FLAGS (buttonClose, GTK_CAN_DEFAULT);
++ gtk_widget_set_can_default (buttonClose, TRUE);
+
+- gtk_signal_connect (GTK_OBJECT (windowMain), "delete_event",
+- GTK_SIGNAL_FUNC (on_window1_delete_event),
++ g_signal_connect (G_OBJECT (windowMain), "delete_event",
++ G_CALLBACK (on_window1_delete_event),
+ NULL);
+- gtk_signal_connect (GTK_OBJECT (buttonRefresh), "clicked",
+- GTK_SIGNAL_FUNC (on_buttonRefresh_clicked),
++ g_signal_connect (G_OBJECT (buttonRefresh), "clicked",
++ G_CALLBACK (on_buttonRefresh_clicked),
+ NULL);
+- gtk_signal_connect (GTK_OBJECT (buttonConfigure), "clicked",
+- GTK_SIGNAL_FUNC (on_buttonConfigure_clicked),
++ g_signal_connect (G_OBJECT (buttonConfigure), "clicked",
++ G_CALLBACK (on_buttonConfigure_clicked),
+ NULL);
+- gtk_signal_connect (GTK_OBJECT (buttonAbout), "clicked",
+- GTK_SIGNAL_FUNC (on_buttonAbout_clicked),
++ g_signal_connect (G_OBJECT (buttonAbout), "clicked",
++ G_CALLBACK (on_buttonAbout_clicked),
+ NULL);
+- gtk_signal_connect (GTK_OBJECT (buttonClose), "clicked",
+- GTK_SIGNAL_FUNC (on_buttonClose_clicked),
++ g_signal_connect (G_OBJECT (buttonClose), "clicked",
++ G_CALLBACK (on_buttonClose_clicked),
+ NULL);
+
+ /* create our timer */
+--- a/main.c 2008-06-25 23:03:27.000000000 +0200
++++ b/main.c 2012-06-14 21:06:05.000523489 +0200
+@@ -30,7 +30,6 @@
+ {
+ GtkWidget *window1;
+
+- gtk_set_locale ();
+ gtk_init (&argc, &argv);
+
+ initialize_stuff();
+--- a/usbparse.h 2008-06-25 23:03:47.000000000 +0200
++++ b/usbparse.h 2012-06-14 21:06:05.000523489 +0200
+@@ -166,7 +166,7 @@
+ struct Device *child[MAX_CHILDREN];
+ DeviceBandwidth *bandwidth;
+ GtkWidget *tree;
+- GtkCTreeNode *leaf;
++ GtkTreeIter leaf;
+ } Device;
+
+
+--- a/usbtree.c 2012-06-14 21:08:11.672516042 +0200
++++ b/usbtree.c 2012-06-14 21:06:05.000523489 +0200
+@@ -45,7 +45,7 @@
+
+ /* blow away the tree if there is one */
+ if (rootDevice != NULL) {
+- gtk_ctree_remove_node (GTK_CTREE(treeUSB), GTK_CTREE_NODE(rootDevice->leaf));
++ gtk_tree_store_clear (treeStore);
+ }
+
+ /* clean out the text box */
+@@ -208,32 +208,37 @@
+ }
+
+
+-void SelectItem (GtkWidget *widget, GtkCTreeNode *node, gint column, gpointer userData)
++void SelectItem (GtkTreeSelection *selection, gpointer userData)
+ {
+- int data;
+- data = (int) gtk_ctree_node_get_row_data (GTK_CTREE (widget), node);
+-
+- PopulateListBox ((int)data);
+-
+- return;
++ GtkTreeIter iter;
++ GtkTreeModel *model;
++ gint deviceAddr;
++
++ if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
++ gtk_tree_model_get (model, &iter,
++ DEVICE_ADDR_COLUMN, &deviceAddr,
++ -1);
++ PopulateListBox (deviceAddr);
++ }
+ }
+
+
+ static void DisplayDevice (Device *parent, Device *device)
+ {
+ int i;
+- gchar *text[1];
+ int configNum;
+ int interfaceNum;
+ gboolean driverAttached = TRUE;
++ gint deviceAddr;
++ const gchar *color = "black";
+
+ if (device == NULL)
+ return;
+
+ /* build this node */
+- text[0] = device->name;
+- device->leaf = gtk_ctree_insert_node (GTK_CTREE(treeUSB), parent->leaf, NULL, text, 1, NULL, NULL, NULL, NULL, FALSE, FALSE);
+- gtk_ctree_node_set_row_data (GTK_CTREE(treeUSB), device->leaf, (gpointer)((device->deviceNumber<<8) | (device->busNumber)));
++ deviceAddr = (device->deviceNumber << 8) | device->busNumber;
++ gtk_tree_store_append (treeStore, &device->leaf,
++ (device->level != 0) ? &parent->leaf : NULL);
+
+ /* determine if this device has drivers attached to all interfaces */
+ for (configNum = 0; configNum < MAX_CONFIGS; ++configNum) {
+@@ -252,15 +257,14 @@
+ }
+
+ /* change the color of this leaf if there are no drivers attached to it */
+- if (driverAttached == FALSE) {
+- GdkColor red;
+-
+- red.red = 56000;
+- red.green = 0;
+- red.blue = 0;
+- red.pixel = 0;
+- gtk_ctree_node_set_foreground (GTK_CTREE(treeUSB), device->leaf, &red);
+- }
++ if (driverAttached == FALSE)
++ color = "red";
++
++ gtk_tree_store_set (treeStore, &device->leaf,
++ NAME_COLUMN, device->name,
++ DEVICE_ADDR_COLUMN, deviceAddr,
++ COLOR_COLUMN, color,
++ -1);
+
+ /* create all of the children's leafs */
+ for (i = 0; i < MAX_CHILDREN; ++i) {
+@@ -283,11 +287,16 @@
+
+ static void FileError (void)
+ {
+- gchar *tempString = g_malloc0(strlen (verifyMessage) + strlen (devicesFile) + 50);
+- sprintf (tempString, " Can not open the file %s \n\n%s", devicesFile, verifyMessage);
+- ShowMessage ("USBView Error", tempString, FALSE);
+- g_free (tempString);
+- return;
++ GtkWidget *dialog;
++
++ dialog = gtk_message_dialog_new (
++ GTK_WINDOW (windowMain),
++ GTK_DIALOG_DESTROY_WITH_PARENT,
++ GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
++ "Can not open the file %s\n\n%s",
++ devicesFile, verifyMessage);
++ gtk_dialog_run (GTK_DIALOG (dialog));
++ gtk_widget_destroy (dialog);
+ }
+
+
+@@ -328,10 +337,6 @@
+ int finished;
+ int i;
+
+- if (MessageShown() == TRUE) {
+- return;
+- }
+-
+ /* if refresh is selected, then always do a refresh, otherwise look at the file first */
+ if (!refresh) {
+ if (!FileHasChanged()) {
+@@ -368,11 +373,5 @@
+ usb_name_devices ();
+
+- /* set up our tree */
+- gtk_ctree_set_line_style (GTK_CTREE(treeUSB), GTK_CTREE_LINES_DOTTED);
+- gtk_ctree_set_expander_style (GTK_CTREE(treeUSB), GTK_CTREE_EXPANDER_SQUARE);
+- gtk_ctree_set_indent (GTK_CTREE(treeUSB),10);
+- gtk_clist_column_titles_passive (GTK_CLIST(treeUSB));
+-
+ /* build our tree */
+ for (i = 0; i < rootDevice->maxChildren; ++i) {
+ DisplayDevice (rootDevice, rootDevice->child[i]);
+@@ -380,11 +386,14 @@
+
+ gtk_widget_show (treeUSB);
+
+- gtk_ctree_expand_recursive (GTK_CTREE(treeUSB), NULL);
++ gtk_tree_view_expand_all (GTK_TREE_VIEW (treeUSB));
+
+ /* hook up our callback function to this tree if we haven't yet */
+ if (!signal_connected) {
+- gtk_signal_connect (GTK_OBJECT (treeUSB), "tree-select-row", GTK_SIGNAL_FUNC (SelectItem), NULL);
++ GtkTreeSelection *select;
++ select = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeUSB));
++ g_signal_connect (G_OBJECT (select), "changed",
++ G_CALLBACK (SelectItem), NULL);
+ signal_connected = TRUE;
+ }
+
+--- a/usbtree.h 2008-06-25 23:03:52.000000000 +0200
++++ b/usbtree.h 2012-06-14 21:06:05.000523489 +0200
+@@ -21,16 +21,24 @@
+ #ifndef __USB_TREE_H
+ #define __USB_TREE_H
+
++enum {
++ NAME_COLUMN,
++ DEVICE_ADDR_COLUMN,
++ COLOR_COLUMN,
++ N_COLUMNS
++};
++
+ extern gchar devicesFile[1000];
++extern GtkTreeStore *treeStore;
+ extern GtkWidget *treeUSB;
+ extern GtkWidget *textDescriptionView;
+ extern GtkTextBuffer *textDescriptionBuffer;
++extern GtkWidget *windowMain;
+
+ extern void LoadUSBTree (int refresh);
+ extern void initialize_stuff (void);
+ extern GtkWidget * create_windowMain (void);
+ extern void configure_dialog (void);
+-extern void about_dialog (void);
+
+ extern void on_buttonClose_clicked (GtkButton *button, gpointer user_data);
+ extern gboolean on_window1_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data);
+@@ -39,8 +47,4 @@
+ extern void on_buttonAbout_clicked (GtkButton *button, gpointer user_data);
+ extern gint on_timer_timeout (gpointer user_data);
+
+-extern void ShowMessage (gchar *title, gchar *message, gboolean centered);
+-extern gboolean MessageShown (void);
+-
+-
+ #endif /* __USB_TREE_H */
diff --git a/extra/usbview/usbview-1.1-missing-usbfs.patch b/extra/usbview/usbview-1.1-missing-usbfs.patch
new file mode 100644
index 000000000..7da2f0ca0
--- /dev/null
+++ b/extra/usbview/usbview-1.1-missing-usbfs.patch
@@ -0,0 +1,11 @@
+--- a/usbtree.c 2012-10-21 08:21:35.000000000 +0200
++++ b/usbtree.c 2012-10-21 08:21:12.000000000 +0200
+@@ -397,7 +397,7 @@
+
+ void initialize_stuff (void)
+ {
+- strcpy (devicesFile, "/proc/bus/usb/devices");
++ strcpy (devicesFile, "/sys/kernel/debug/usb/devices");
+ memset (&previousDevicesFile[0], 0x00, sizeof(previousDevicesFile));
+ previousChange = 0;
+
diff --git a/extra/usbview/usbview.install b/extra/usbview/usbview.install
new file mode 100644
index 000000000..e111ef946
--- /dev/null
+++ b/extra/usbview/usbview.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/extra/vim/PKGBUILD b/extra/vim/PKGBUILD
index 42a2f20f1..25e015e13 100644
--- a/extra/vim/PKGBUILD
+++ b/extra/vim/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 166660 2012-09-15 04:03:40Z tdziedzic $
+# $Id: PKGBUILD 169487 2012-10-22 02:10:39Z tdziedzic $
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Maintainer: tobias [ tobias at archlinux org ]
# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
@@ -6,8 +6,8 @@
pkgbase=vim
pkgname=('vim' 'gvim' 'vim-runtime')
_topver=7.3
-_patchlevel=661
-__hgrev=5884d056e1d1
+_patchlevel=709
+__hgrev=06e088d016ad
_versiondir="vim${_topver//./}"
pkgver=${_topver}.${_patchlevel}
pkgrel=1
@@ -21,12 +21,12 @@ source=("ftp://ftp.archlinux.org/other/vim/vim-${pkgver}.tar.xz"
'vimrc'
'archlinux.vim'
'gvim.desktop')
-sha1sums=('989e907fe9858647e762bddc927f656a03fb5226'
- '195c7fc5163fca966ea331d8160bf2d307c1533c'
- '4d9dcfb32874aa5467e6f06e418aeb4e675daaf2'
- '3494baf53a63581ba69f86a81293640ff681c5c5'
- '25dd3c2ce436e73a367c8f73b68f7f6889682437'
- '4a579cf66590d711f49c5dfb4a25e5df116ff7ba')
+md5sums=('7a42c72b07e8bfe6795197a303b21d53'
+ '5c5723f3c39aaa716bd868d7edf9f563'
+ '6e7adfbd5d26c1d161030ec203a7f243'
+ 'e57777374891063b9ca48a1fe392ac05'
+ '10353a61aadc3f276692d0e17db1478e'
+ 'd90413bd21f400313a785bb4010120cd')
# source PKGBUILD && mksource
mksource() {
diff --git a/extra/vlc/PKGBUILD b/extra/vlc/PKGBUILD
index d71166bac..6f64a9ca8 100644
--- a/extra/vlc/PKGBUILD
+++ b/extra/vlc/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 169077 2012-10-17 18:09:33Z giovanni $
+# $Id: PKGBUILD 169442 2012-10-21 09:07:49Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
# Contributor: Martin Sandsmark <martin.sandsmark@kde.org>
pkgname=vlc
pkgver=2.0.4
-pkgrel=1
+pkgrel=2
pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.videolan.org/vlc/"
@@ -19,7 +19,7 @@ makedepends=('live-media' 'libnotify' 'libbluray' 'flac' 'kdelibs'
'fluidsynth' 'libdc1394' 'libavc1394'
'libcaca' 'librsvg' 'portaudio' 'libgme' 'xosd'
'twolame' 'aalib' 'libmtp' 'libdvdcss'
- 'gnome-vfs' 'libgoom2' 'libtar' 'vcdimager')
+ 'gnome-vfs' 'libgoom2' 'libtar' 'vcdimager' 'opus')
[ "$CARCH" = "mips64el" ] || makedepends+=('lirc-utils' 'oss' 'projectm')
optdepends=('avahi: for service discovery using bonjour protocol'
'libnotify: for notification plugin'
@@ -49,7 +49,8 @@ optdepends+=('libcaca: for colored ASCII art video output'
'smbclient: for SMB access plugin'
'libcdio: for audio CD playback support'
'ttf-freefont: for subtitle font '
- 'ttf-dejavu: for subtitle font')
+ 'ttf-dejavu: for subtitle font'
+ 'opus: for opus support')
conflicts=('vlc-plugin')
replaces=('vlc-plugin')
backup=('usr/share/vlc/lua/http/.hosts'
@@ -80,7 +81,8 @@ build() {
--enable-aa \
--enable-vcdx \
--enable-upnp \
- $extraconf
+ --enable-opus \
+ $extraconf
make
}
diff --git a/extra/xf86-video-intel/PKGBUILD b/extra/xf86-video-intel/PKGBUILD
index c3e7b9ae5..239d5a1b0 100644
--- a/extra/xf86-video-intel/PKGBUILD
+++ b/extra/xf86-video-intel/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 168576 2012-10-13 11:45:01Z andyrtr $
+# $Id: PKGBUILD 169469 2012-10-21 18:59:02Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xf86-video-intel
-pkgver=2.20.9
-pkgrel=2
+pkgver=2.20.12
+pkgrel=1
arch=(i686 x86_64)
url="http://xorg.freedesktop.org/"
license=('custom')
@@ -19,7 +19,7 @@ conflicts=('xorg-server<1.13.0' 'X-ABI-VIDEODRV_VERSION<13' 'X-ABI-VIDEODRV_VERS
options=('!libtool')
groups=('xorg-drivers' 'xorg')
source=(${url}/archive/individual/driver/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('b9830c9fdaf2f64648cd45807883821f14dd91f9ff1cfa59af11035f62dc9389')
+sha256sums=('39e02b7f90a2665efe5483075f93b1c87d24f48070d5de783dd41e20d9eb0c7c')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/xf86-video-modesetting/PKGBUILD b/extra/xf86-video-modesetting/PKGBUILD
new file mode 100644
index 000000000..8259ce7b1
--- /dev/null
+++ b/extra/xf86-video-modesetting/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 169401 2012-10-20 11:16:26Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
+
+pkgname=xf86-video-modesetting
+pkgver=0.5.0
+pkgrel=1
+pkgdesc="X.org generic modesetting video driver"
+arch=('i686' 'x86_64')
+url="http://xorg.freedesktop.org/"
+license=('custom')
+depends=('libdrm>=2.4.37' 'systemd')
+makedepends=('xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=13' 'resourceproto' 'scrnsaverproto')
+conflicts=('xorg-server<1.13.0' 'X-ABI-VIDEODRV_VERSION<13' 'X-ABI-VIDEODRV_VERSION>=14')
+groups=('xorg-drivers' 'xorg')
+groups=('xorg-drivers' 'xorg')
+options=('!libtool')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
+sha256sums=('248d384ba9b520643fc0b2b2930d6593dfb8185e88e1562381c8f9b1cd5582f2')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
+}
diff --git a/extra/xf86-video-nv/PKGBUILD b/extra/xf86-video-nv/PKGBUILD
index 54c15d0e0..692363280 100644
--- a/extra/xf86-video-nv/PKGBUILD
+++ b/extra/xf86-video-nv/PKGBUILD
@@ -1,16 +1,17 @@
-# $Id: PKGBUILD 163675 2012-07-17 16:58:02Z andyrtr $
+# $Id: PKGBUILD 169436 2012-10-21 08:18:01Z andyrtr $
+# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Maintainer:Jan de Groot <jgc@archlinux.org>
pkgname=xf86-video-nv
pkgver=2.1.20
-pkgrel=1
+pkgrel=2
pkgdesc="X.org nv video driver"
arch=('i686' 'x86_64')
license=('custom')
url="http://xorg.freedesktop.org/"
depends=('glibc')
-makedepends=('xorg-server-devel>=1.11.99.903')
-conflicts=('xorg-server<1.11.99.903')
+makedepends=('xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=13' 'resourceproto' 'scrnsaverproto')
+conflicts=('xorg-server<1.13.0' 'X-ABI-VIDEODRV_VERSION<13' 'X-ABI-VIDEODRV_VERSION>=14')
options=('!libtool')
groups=('xorg-drivers' 'xorg')
source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
diff --git a/extra/xf86-video-trident/PKGBUILD b/extra/xf86-video-trident/PKGBUILD
index a709ee1a2..5dee69638 100644
--- a/extra/xf86-video-trident/PKGBUILD
+++ b/extra/xf86-video-trident/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 168591 2012-10-13 11:46:02Z andyrtr $
+# $Id: PKGBUILD 169416 2012-10-20 17:43:29Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=xf86-video-trident
pkgver=1.3.6
-pkgrel=2
+pkgrel=3
pkgdesc="X.org Trident video driver"
arch=(i686 x86_64)
url="http://xorg.freedesktop.org/"
@@ -13,11 +13,13 @@ makedepends=('xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=13' 'xf86dgaproto' 'res
conflicts=('xorg-server<1.13.0' 'X-ABI-VIDEODRV_VERSION<13' 'X-ABI-VIDEODRV_VERSION>=14')
groups=('xorg-drivers' 'xorg')
options=(!libtool)
-source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
-sha256sums=('6a58e3f3034abd8803af8a5c7dd5a6a4a28ed4fdac742ffb05518caaddc28104')
+source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2 git_fixes.diff)
+sha256sums=('6a58e3f3034abd8803af8a5c7dd5a6a4a28ed4fdac742ffb05518caaddc28104'
+ 'e51d7a9c5a3d7d2df7f56e482f5fbeac1babc2b30cdf4655052b11c9d4ec2c1c')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i ${srcdir}/git_fixes.diff
./configure --prefix=/usr
make
}
diff --git a/extra/xf86-video-trident/git_fixes.diff b/extra/xf86-video-trident/git_fixes.diff
new file mode 100644
index 000000000..fa54143b2
--- /dev/null
+++ b/extra/xf86-video-trident/git_fixes.diff
@@ -0,0 +1,63 @@
+From 30787294c837aefa8820b6f76f00fe30d4e54181 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Tue, 25 Sep 2012 12:55:01 +0000
+Subject: Remove mibstore.h
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+diff --git a/src/trident_driver.c b/src/trident_driver.c
+index dc12b76..408c870 100644
+--- a/src/trident_driver.c
++++ b/src/trident_driver.c
+@@ -56,7 +56,6 @@
+
+ #include "mipointer.h"
+
+-#include "mibstore.h"
+ #include "shadow.h"
+ #include "trident.h"
+ #include "trident_regs.h"
+@@ -3037,7 +3036,6 @@ TRIDENTScreenInit(SCREEN_INIT_ARGS_DECL)
+ TridentAccelInit(pScreen);
+ }
+
+- miInitializeBackingStore(pScreen);
+ xf86SetBackingStore(pScreen);
+
+ /* Initialise cursor functions */
+--
+cgit v0.9.0.2-2-gbebe
+From 48c15909691e28ad2c188a2978b1c8ef3d9d8760 Mon Sep 17 00:00:00 2001
+From: Timo Aaltonen <tjaalton@ubuntu.com>
+Date: Wed, 26 Sep 2012 08:01:26 +0000
+Subject: Fix loading the driver without XAA
+
+---
+diff --git a/src/trident_dga.c b/src/trident_dga.c
+index 0263aa7..c4b5b9a 100644
+--- a/src/trident_dga.c
++++ b/src/trident_dga.c
+@@ -37,10 +37,10 @@
+ static Bool TRIDENT_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **,
+ int *, int *, int *);
+ static Bool TRIDENT_SetMode(ScrnInfoPtr, DGAModePtr);
+-static void TRIDENT_Sync(ScrnInfoPtr);
+ static int TRIDENT_GetViewport(ScrnInfoPtr);
+ static void TRIDENT_SetViewport(ScrnInfoPtr, int, int, int);
+ #ifdef HAVE_XAA_H
++static void TRIDENT_Sync(ScrnInfoPtr);
+ static void TRIDENT_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
+ static void TRIDENT_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
+ #if 0
+@@ -56,8 +56,8 @@ DGAFunctionRec TRIDENTDGAFuncs = {
+ TRIDENT_SetMode,
+ TRIDENT_SetViewport,
+ TRIDENT_GetViewport,
+- TRIDENT_Sync,
+ #ifdef HAVE_XAA_H
++ TRIDENT_Sync,
+ TRIDENT_FillRect,
+ TRIDENT_BlitRect,
+ #if 0
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/extra/xfce4-settings/PKGBUILD b/extra/xfce4-settings/PKGBUILD
index 2009f3d83..4fce8caab 100644
--- a/extra/xfce4-settings/PKGBUILD
+++ b/extra/xfce4-settings/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 158103 2012-05-02 23:12:45Z foutrelis $
+# $Id: PKGBUILD 169428 2012-10-21 04:01:39Z foutrelis $
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: tobias <tobias funnychar archlinux.org>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
pkgname=xfce4-settings
pkgver=4.10.0
-pkgrel=2
+pkgrel=3
pkgdesc="Settings manager for xfce"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.xfce.org/"
@@ -16,8 +16,12 @@ depends=('exo' 'garcon' 'libxfce4ui' 'libnotify' 'libxklavier'
makedepends=('intltool')
optdepends=('libcanberra: for sound control')
source=(http://archive.xfce.org/src/xfce/$pkgname/4.10/$pkgname-$pkgver.tar.bz2
+ xfce4-settings-4.10.0-fix-gtk3-theme-detection.patch
+ xfce4-settings-4.10.0-check-service-name-of-nameownerchanged.patch
xfce4-settings-xml-4.10.0.patch)
sha256sums=('0843f09ba9673f1d1b5df8dce4a17b63c183a9ba3be75fb6ef99a67fc8c1f77e'
+ '28482a3410d587fe051b84080ab5366b4fbe2af8684ee46384ff899b73d3f349'
+ '5be974f8fba6ba9dc14e136762cf752fe46eac99f71511d77d910610b5401244'
'78e68ef2cbf19760707ba24f3d57dd59fbf40a540d50d20e7cc62ba02196aaaa')
build() {
@@ -27,6 +31,12 @@ build() {
# (taken from Fedora)
patch -Np1 -i "$srcdir/xfce4-settings-xml-4.10.0.patch"
+ # https://bugzilla.xfce.org/show_bug.cgi?id=9272
+ patch -Np1 -i "$srcdir/xfce4-settings-4.10.0-fix-gtk3-theme-detection.patch"
+
+ # https://bugzilla.xfce.org/show_bug.cgi?id=9273
+ patch -Np1 -i "$srcdir/xfce4-settings-4.10.0-check-service-name-of-nameownerchanged.patch"
+
./configure \
--prefix=/usr \
--sysconfdir=/etc \
diff --git a/extra/xfce4-settings/xfce4-settings-4.10.0-check-service-name-of-nameownerchanged.patch b/extra/xfce4-settings/xfce4-settings-4.10.0-check-service-name-of-nameownerchanged.patch
new file mode 100644
index 000000000..1d271476e
--- /dev/null
+++ b/extra/xfce4-settings/xfce4-settings-4.10.0-check-service-name-of-nameownerchanged.patch
@@ -0,0 +1,55 @@
+From 2ec636049b95d0c51286253813b5b1a074472afc Mon Sep 17 00:00:00 2001
+From: Lionel Le Folgoc <lionel@lefolgoc.net>
+Date: Sun, 09 Sep 2012 09:50:19 +0000
+Subject: Xfsettingsd: Check service name of NameOwnerChanged (bug #9273).
+
+In some conditions, the dbus spawn of xfconf leads to the
+shutdown of xfsettingsd because it "thinks" another instance
+is taking over... After some debugging I found that it
+receives a NameOwnerChanged signal describing the launch
+of Xfconf (name=org.xfce.Xfconf, old=, new=:1.11 for example).
+
+(cherry picked from commit c17fe35e6f2ff673bab102e736a327fa7bcc1d73)
+---
+diff --git a/xfsettingsd/main.c b/xfsettingsd/main.c
+index 0f3a68d..55c4183 100644
+--- a/xfsettingsd/main.c
++++ b/xfsettingsd/main.c
+@@ -93,15 +93,29 @@ signal_handler (gint signum,
+
+
+ static DBusHandlerResult
+-dbus_connection_filter_func (DBusConnection *connection,
+- DBusMessage *message,
+- void *user_data)
++dbus_connection_filter_func (DBusConnection *connection,
++ DBusMessage *message,
++ void *user_data)
+ {
++ gchar *name, *old, *new;
++
+ if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged"))
+ {
+- g_printerr (G_LOG_DOMAIN ": %s\n", "Another instance took over. Leaving...");
+- gtk_main_quit ();
+- return DBUS_HANDLER_RESULT_HANDLED;
++ /* double check if it is really org.xfce.SettingsDaemon
++ * being replaced, see bug 9273 */
++ if (dbus_message_get_args (message, NULL,
++ DBUS_TYPE_STRING, &name,
++ DBUS_TYPE_STRING, &old,
++ DBUS_TYPE_STRING, &new,
++ DBUS_TYPE_INVALID))
++ {
++ if (g_strcmp0 (name, XFSETTINGS_DBUS_NAME) == 0)
++ {
++ g_printerr (G_LOG_DOMAIN ": %s\n", "Another instance took over. Leaving...");
++ gtk_main_quit ();
++ return DBUS_HANDLER_RESULT_HANDLED;
++ }
++ }
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+--
+cgit v0.9.0.3
diff --git a/extra/xfce4-settings/xfce4-settings-4.10.0-fix-gtk3-theme-detection.patch b/extra/xfce4-settings/xfce4-settings-4.10.0-fix-gtk3-theme-detection.patch
new file mode 100644
index 000000000..ebd270bd9
--- /dev/null
+++ b/extra/xfce4-settings/xfce4-settings-4.10.0-fix-gtk3-theme-detection.patch
@@ -0,0 +1,22 @@
+From 8032dd77047329a93edd4c4a8b686ffc36d2f7a7 Mon Sep 17 00:00:00 2001
+From: Lionel Le Folgoc <lionel@lefolgoc.net>
+Date: Sun, 09 Sep 2012 09:41:18 +0000
+Subject: Appearance: Fix gtk3 theme detection in install script (bug #9272).
+
+(cherry picked from commit e3c6db6f57e72cdbdf0e293bba7d6ca650d7521b)
+---
+diff --git a/dialogs/appearance-settings/appearance-install-theme b/dialogs/appearance-settings/appearance-install-theme
+index 13f61ae..6dc1e17 100755
+--- a/dialogs/appearance-settings/appearance-install-theme
++++ b/dialogs/appearance-settings/appearance-install-theme
+@@ -140,7 +140,7 @@ if test "$retval" -eq 0; then
+ detectthemes "gtk-2.0/gtkrc"
+
+ # install gtk-3.0 themes
+- detectthemes "gtk-3.0/gtkrc"
++ detectthemes "gtk-3.0/gtk.css"
+
+ # install xfwm4 themes
+ detectthemes "xfwm4/themerc"
+--
+cgit v0.9.0.3
diff --git a/extra/xorg-server/0001-dix-fix-zaphod-screen-scrossing-54654.patch b/extra/xorg-server/0001-dix-fix-zaphod-screen-scrossing-54654.patch
new file mode 100644
index 000000000..e3e42d410
--- /dev/null
+++ b/extra/xorg-server/0001-dix-fix-zaphod-screen-scrossing-54654.patch
@@ -0,0 +1,42 @@
+From 29d84d5a7ca4cc12cce47de9313adeb8554fb894 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu, 18 Oct 2012 15:11:31 +1000
+Subject: [PATCH] dix: fix zaphod screen scrossing (#54654)
+
+POINTER_SCREEN coordinates are screen-relative. For a Zaphod setup, the
+coordinates after a screen crossing are already relative to the new screen's
+origin. Add that offset to the coordinates before re-setting.
+
+regression introduced by
+commit bafbd99080be49a17be97d2cc758fbe623369945
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed Aug 8 11:34:32 2012 +1000
+
+ dix: work around scaling issues during WarpPointer (#53037)
+
+X.Org Bug 54654 <http://bugs.freedesktop.org/show_bug.cgi?id=54654>
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+ dix/getevents.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/dix/getevents.c b/dix/getevents.c
+index 71d83c4..8b4379d 100644
+--- a/dix/getevents.c
++++ b/dix/getevents.c
+@@ -1400,8 +1400,9 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type,
+ coordinates were.
+ */
+ if (flags & POINTER_SCREEN) {
+- screenx = sx;
+- screeny = sy;
++ scr = miPointerGetScreen(pDev);
++ screenx = sx + scr->x;
++ screeny = sy + scr->y;
+ }
+
+ scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative,
+--
+1.7.11.7
+
diff --git a/extra/xorg-server/PKGBUILD b/extra/xorg-server/PKGBUILD
index 82b6c8e89..9fa7af6e5 100644
--- a/extra/xorg-server/PKGBUILD
+++ b/extra/xorg-server/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 168552 2012-10-13 11:43:10Z andyrtr $
+# $Id: PKGBUILD 169364 2012-10-20 06:35:05Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgbase=xorg-server
pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-common' 'xorg-server-devel')
pkgver=1.13.0
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64' 'mips64el')
license=('custom')
url="http://xorg.freedesktop.org"
@@ -20,14 +20,16 @@ source=(${url}/releases/individual/xserver/${pkgbase}-${pkgver}.tar.bz2
xvfb-run
xvfb-run.1
10-quirks.conf
- loongson.patch)
+ loongson.patch
+ 0001-dix-fix-zaphod-screen-scrossing-54654.patch)
sha256sums=('548b91cb01087ad4f892428e7ac4955251cf12393e86c70420436b33848ef28a'
'66e25f76a7496c429e0aff4b0670f168719bb0ceaeb88c6f2272f2bf3ed21162'
'd027776fac1f7675b0a9ee817502290b1c45f9c09b0f0a6bb058c35f92361e84'
'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9'
'2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776'
'94612f5c0d34a3b7152915c2e285c7b462e9d8e38d3539bd551a339498eac166'
- '966b8c509006e3b7e6ac951c93a760ecbb2cb2ad7a5807fb919f0c4ee5e079a5')
+ '966b8c509006e3b7e6ac951c93a760ecbb2cb2ad7a5807fb919f0c4ee5e079a5'
+ '23861814b4283ca3fe43aae6e88ee82bcbae5713bf88eabeaef7beb94efe9707')
build() {
cd "${srcdir}/${pkgbase}-${pkgver}"
@@ -41,6 +43,9 @@ build() {
# Based on http://lists.freedesktop.org/archives/xorg-devel/2011-October/026249.html
patch -Np1 -i "${srcdir}/loongson.patch"
+ # https://bugs.archlinux.org/task/31959 / https://bugs.freedesktop.org/show_bug.cgi?id=54654
+ patch -Np1 -i ${srcdir}/0001-dix-fix-zaphod-screen-scrossing-54654.patch
+
autoreconf -fi
if [ "$CARCH" = "mips64el" ]; then
./configure --prefix=/usr \
diff --git a/extra/zeitgeist/PKGBUILD b/extra/zeitgeist/PKGBUILD
index 582730865..a852b9ff0 100644
--- a/extra/zeitgeist/PKGBUILD
+++ b/extra/zeitgeist/PKGBUILD
@@ -1,21 +1,20 @@
-# $Id: PKGBUILD 162048 2012-06-19 07:36:41Z andrea $
+# $Id: PKGBUILD 169475 2012-10-21 21:14:01Z eric $
# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: György Balló <ballogy@freestart.hu>
pkgname=zeitgeist
-pkgver=0.9.0.1
+pkgver=0.9.5
pkgrel=1
pkgdesc="A service which logs the users's activities and events and makes relevant information available to other applications"
arch=('i686' 'x86_64' 'mips64el')
url="http://zeitgeist-project.com/"
license=('GPL')
-depends=('python2-dbus' 'python2-gobject2' 'pyxdg' 'xapian-core')
+depends=('python2-dbus' 'python2-gobject2' 'python2-xdg' 'xapian-core')
makedepends=('intltool' 'raptor' 'python2-rdflib')
checkdepends=('vala')
-source=("https://launchpad.net/$pkgname/${pkgver%.*.*}/$pkgver/+download/$pkgname-$pkgver.tar.bz2"{,.asc})
-md5sums=('08f2eb384824e8458f18e10db7654965'
- '64486b3e6bec080c447c94f3ac2ff8e8')
+source=("https://launchpad.net/$pkgname/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.bz2")
+md5sums=('5841e4624b07ba74866fb177f1c9aae7')
build() {
cd "$srcdir/$pkgname-$pkgver"
@@ -25,10 +24,10 @@ build() {
make
}
-#check() {
-# cd "$srcdir/$pkgname-$pkgver"
-# make check
-#}
+check() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make -j1 check
+}
package() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/java-ugly/junit/PKGBUILD b/java-ugly/junit/PKGBUILD
new file mode 100644
index 000000000..7204cd5c9
--- /dev/null
+++ b/java-ugly/junit/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (Arch): Guillaume ALAUX <Guillaume at Arch Linux dot org>
+
+pkgname=junit
+pkgver=4.10
+pkgrel=1
+pkgdesc="Automated testing framework for Java"
+arch=('any')
+url="http://www.junit.org/"
+license=('CPL')
+depends=('java-runtime')
+makedepends=('apache-ant' 'jh')
+source=("$pkgname::git://github.com/KentBeck/junit.git#tag=r$pkgver")
+
+mksource() {
+ cd "${srcdir}/${pkgname}"
+ #find . -name '*.jar' -delete
+
+ # Shut up some warnings from javac 1.7
+ sed -ri 's|target="([0-9.]+)"|\0 source="\1"|' build.xml
+}
+
+build() {
+ mksource
+ cd "${srcdir}/${pkgname}"
+
+ # Shut up some warnings from javac 1.7
+ sed -ri 's|target="([0-9.]+)"$|\0 source="\1"|' build.xml
+
+ ant jars
+ for pkg in junit junit-dep; do
+ sed \
+ -e "s|@artifactID@|$pkg|" \
+ -e "s|@version@|$pkgver|" \
+ < build/maven/pom-template.xml > $pkgname$pkgver/$pkg-$pkgver.pom
+ done
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+ install -Dm644 cpl-v10.html "$pkgdir/usr/share/licenses/junit/cpl-v10.html"
+
+ cd "${srcdir}/${pkgname}/${pkgname}${pkgver}"
+
+ export DESTDIR="$pkgdir"
+ jh mvn-install $pkgname junit $pkgver junit-$pkgver.{jar,pom}
+ jh mvn-install $pkgname junit-dep $pkgver junit-dep-$pkgver.{jar,pom}
+ install -d "${pkgdir}/usr/share/java/${pkgname}"
+ ln -s `jh mvn-basename $pkgname junit $pkgver`.jar "${pkgdir}/usr/share/java/${pkgname}"
+ ln -s `jh mvn-basename $pkgname junit-dep $pkgver`.jar "${pkgdir}/usr/share/java/${pkgname}"
+ ln -s ${pkgname}/${pkgname}-${pkgver}.jar ${pkgdir}/usr/share/java/${pkgname}.jar
+ ln -s ${pkgname}/${pkgname}-dep-${pkgver}.jar ${pkgdir}/usr/share/java/${pkgname}-dep.jar
+}
+
+md5sums=('SKIP')
diff --git a/java-ugly/maven/PKGBUILD b/java-ugly/maven/PKGBUILD
new file mode 100755
index 000000000..2bd99940e
--- /dev/null
+++ b/java-ugly/maven/PKGBUILD
@@ -0,0 +1,76 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+_pkgname=maven
+pkgname=maven-libre
+pkgver=3.0.4
+
+provides=("$_pkgname=$pkgver")
+replaces=("$_pkgname")
+conflicts=("$_pkgname")
+
+pkgrel=1
+pkgdesc="A Java project management and project comprehension tool"
+arch=('any')
+url="http://maven.apache.org"
+license=('Apache')
+depends=('java-environment')
+makedepends=('apache-ant')
+backup=('etc/maven/settings.xml')
+
+_mirror=http://archive.apache.org/dist
+source=($_mirror/maven/source/apache-maven-$pkgver-src.tar.gz
+ maven.sh maven.csh)
+
+_M2_LOCALREPO="/usr/share/maven/repository"
+
+# FIXME: This also does tasks for package()
+build() {
+ cd $srcdir/apache-maven-$pkgver
+
+ . /etc/profile.d/jre.sh
+ . /etc/profile.d/jdk.sh
+
+ export MAVEN_OPTS=-Xmx512m
+ export M2_HOME="$pkgdir"/opt/maven
+ export PATH="$PATH:$M2_HOME/bin"
+
+ # FIXME: Downloads many deps from Internet. They should be
+ # packaged separately and added to depends=()
+ install -d "$pkgdir`dirname $_M2_LOCALREPO`"
+ cp -r $_M2_LOCALREPO "$pkgdir$_M2_LOCALREPO"
+ install -d "$pkgdir"/opt
+ ant -Dmaven.repo.local="$pkgdir$_M2_LOCALREPO"
+ rm "$pkgdir"/opt/maven/*.txt
+}
+
+package() {
+ install -d "$pkgdir$_M2_LOCALREPO"
+
+ # Install config file in /etc
+ # Unlike the other directories, we symlink from the system to /opt/maven
+ # because that way all conf files stay in /etc
+ install -d "$pkgdir"/etc/maven
+ sed "55i<localRepository>$_M2_LOCALREPO</localRepository>" \
+ < "$pkgdir"/opt/maven/conf/settings.xml \
+ > "$pkgdir"/etc/maven/settings.xml
+ rm -rf "$pkgdir"/opt/maven/conf
+ ln -s /etc/maven "$pkgdir"/opt/maven/conf
+
+ # Install profile.d settings
+ install -d "$pkgdir"/etc/profile.d
+ install -m 755 "$srcdir"/maven.{csh,sh} "$pkgdir"/etc/profile.d
+
+ # Link executables to /usr/bin
+ install -d "$pkgdir"/usr/bin
+ ln -s /opt/maven/bin/{mvn,mvnDebug,mvnyjp} "$pkgdir"/usr/bin
+
+ # Link jar files to appropriate place in /usr/share
+ install -d "$pkgdir"/usr/share/java
+ ln -s /opt/maven/lib "$pkgdir"/usr/share/java/maven
+}
+
+md5sums=('17ca94d5be05a78c6ab12425b7a0ee10'
+ '58820067a4d7384477daa134023d9b57'
+ 'e2bbdeffed100cd51d05b2ba8ebd6321')
diff --git a/java-ugly/maven/maven.csh b/java-ugly/maven/maven.csh
new file mode 100755
index 000000000..f5750cfc8
--- /dev/null
+++ b/java-ugly/maven/maven.csh
@@ -0,0 +1,2 @@
+setenv MAVEN_OPTS -Xmx512m
+setenv M2_HOME=/opt/maven
diff --git a/java-ugly/maven/maven.sh b/java-ugly/maven/maven.sh
new file mode 100755
index 000000000..b6655cc22
--- /dev/null
+++ b/java-ugly/maven/maven.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+export MAVEN_OPTS=-Xmx512m
+export M2_HOME=/opt/maven
diff --git a/java-ugly/not-working/java-bnd/PKGBUILD b/java-ugly/not-working/java-bnd/PKGBUILD
new file mode 100644
index 000000000..86820469a
--- /dev/null
+++ b/java-ugly/not-working/java-bnd/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+_pkgname=bnd
+pkgname=java-bnd
+pkgver=1.50.0
+pkgdesc="A swiss army knife for OSGi"
+url="http://www.aqute.biz/Bnd/"
+license=('Apache2')
+
+pkgrel=1
+arch=(any)
+makedepends=('apache-ant' 'junit')
+source=("git://github.com/bndtools/bnd.git")
+
+build() {
+ cd "$srcdir/$_pkgname"
+ ant dist
+}
+
+package() {
+ :
+}
+
+md5sums=('SKIP')
diff --git a/java/apache-ant/PKGBUILD b/java/apache-ant/PKGBUILD
new file mode 100755
index 000000000..77e0dfe94
--- /dev/null
+++ b/java/apache-ant/PKGBUILD
@@ -0,0 +1,110 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (Arch): Paul Mattal <paul@archlinux.org>
+# Contributor: Andrew Wright <andreww@photism.org>
+
+pkgname=apache-ant
+pkgver=1.8.4
+
+provides=("apache-ant-libre=$pkgver")
+replaces=("apache-ant-libre")
+conflicts=("apache-ant-libre")
+
+pkgrel=1.1
+pkgdesc="A Java-based build tool"
+arch=('any')
+license=('Apache')
+url="http://ant.apache.org/"
+_mirror=http://archive.apache.org/dist
+source=($_mirror/ant/source/${pkgname}-${pkgver}-src.tar.bz2
+ ${pkgname}.sh ${pkgname}.csh)
+depends=('java-environment')
+
+# This list is adapted from https://ant.apache.org/manual/install.html#librarydependencies
+declare -A _opts
+_opts[junit]='to have JUnit on the classpath in javac tasks;/usr/share/java/junit.jar'
+_opts[xalan-java]='<junitreport> task;/usr/share/java/xalan.jar'
+_opts[antlr2]='<antlr> task;/usr/share/java/antlr2.jar::antlr.jar'
+#_opts[java-bsf]='<script> task;/usr/share/java/bsf.jar'
+#_opts[groovy]='Groovy with <script> and <scriptdef> tasks;/usr/share/java/groovy.jar'
+_opts[java-asm2]='Groovy with <script> and <scriptdef> tasks;/usr/share/java/asm-2.jar::asm.jar /usr/share/java/asm-util-2.jar::asm-util.jar'
+#_opts[netrexx]='<netrexx> task, Rexx with <script> task;/usr/share/java/netrexx.jar'
+_opts[rhino]='Javascript with <script> task;/usr/share/java/js.jar'
+_opts[jython]='Python with <script> task;/opt/jython/jython.jar'
+#_opts[jacl]='TCL with <script> task;/usr/share/java/jacl.jar'
+#_opts[tcljava]='TCL with <script> task;/usr/share/java/tcljava.jar'
+_opts[beanshell>=1.3]='BeanShell with <script> task;/usr/share/java/bsh.jar::beanshell.jar'
+#_opts[jruby]='Ruby with <script> task;/usr/share/java/jruby.jar'
+#_opts[judo]='Judoscript with <script> task;/usr/share/java/judo.jar'
+_opts[java-commons-logging]='CommonsLoggingListener;/usr/share/java/commons-logging/commons-logging.jar'
+#_opts[java-log4j]='Log4jListener;/usr/share/java/log4j.jar'
+#_opts[java-commons-net>=1.4.0]='<ftp>, <rexec> and <telnet> tasks;/usr/share/java/commons-net.jar'
+#_opts[java-bcel]="'classfileset' data type, JavaClassHelper for ClassConstants filter reader;/usr/share/java/bcel.jar"
+#_opts[java-mail]='<mimemail> task, mime encoding with <mail>;/usr/share/java/mail.jar'
+#_opts[java-activation]='<mimemail> task, mime encoding with <mail>;/usr/share/java/activation.jar'
+#_opts[jdepend]='<jdepend> task;/usr/share/java/jdepend.jar'
+#_opts[java-xmlcommons-resolver>=1.1beta]="external files for 'xmlcatalog' datatype;/usr/share/java/resolver.jar"
+#_opts[java-jsch>=0.1.42]='<sshexec> and <scp> tasks;/usr/share/java/jsch.jar'
+#_opts[java-advanced-imaging]='<image> task/usr/share/java/jai/*.jar'
+
+for pkg in "${!_opts[@]}"; do
+ optdepends+=("$pkg: ${_opts[$pkg]%;*}")
+ makedepends+=("$pkg")
+done
+
+build() {
+ # This directory is what becomes
+ # http://archive.apache.org/dist/ant/binaries/${pkgname}-${pkgver}-bin.tar.bz2
+ # which is what Arch uses
+ rm -rf "${srcdir}"/${pkgname}-${pkgver}-bin
+ mkdir -p "${srcdir}"/${pkgname}-${pkgver}-bin
+
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ # Symlink to external optional libraries
+ for jar in ${_opts[@]#*;}; do
+ ln -sf ${jar%::*} lib/optional/`basename ${jar/*::}`
+ done
+ # Build
+ source "/etc/profile.d/jdk.sh" # Get the JAVA_HOME env var
+ sh build.sh -Ddist.dir="${srcdir}"/${pkgname}-${pkgver}-bin dist
+}
+
+package() {
+ cd "${srcdir}"/${pkgname}-${pkgver}-bin
+ source "${srcdir}"/${pkgname}.sh # Get the ANT_HOME env var
+ source "/etc/profile.d/jdk.sh" # Get the JAVA_HOME env var
+
+ ## Install profile.d script
+ install -d "${pkgdir}"/etc/profile.d
+ install -m755 "${srcdir}"/${pkgname}.{csh,sh} "${pkgdir}"/etc/profile.d/
+
+ ## Install the main distribution
+ install -d "${pkgdir}"/${ANT_HOME}
+ cp -Rp * "${pkgdir}"/${ANT_HOME}
+
+ ## Fix the distribution
+ # Remove Windows .bat/.cmd files
+ rm -f "${pkgdir}"/${ANT_HOME}/bin/*.{bat,cmd}
+ # Fix python2 path
+ sed -i 's|/usr/bin/python|/usr/bin/python2|' "${pkgdir}"/${ANT_HOME}/bin/runant.py
+ # Symlink to external optional libraries
+ for jar in ${_opts[@]#*;}; do
+ ln -sf ${jar%::*} "${pkgdir}"/${ANT_HOME}/lib/`basename ${jar/*::}`
+ done
+
+ ## Symlink the /opt distribution to the normal places
+ install -d "${pkgdir}"/usr/bin
+ install -d "${pkgdir}"/usr/share/doc/${pkgname}
+ install -d "${pkgdir}"/usr/share/licenses/${pkgname}
+
+ cd "${pkgdir}"/${ANT_HOME}
+ for prog in bin/*; do
+ ln -sf ${ANT_HOME}/$prog "${pkgdir}"/usr/bin
+ done
+ ln -sf ${ANT_HOME}/{README,WHATSNEW} "${pkgdir}"/usr/share/doc/${pkgname}
+ ln -sf ${ANT_HOME}/docs "${pkgdir}"/usr/share/doc/${pkgname}/html
+ ln -sf ${ANT_HOME}/{LICENSE,NOTICE} "${pkgdir}"/usr/share/licenses/${pkgname}
+}
+
+md5sums=('c474fa9d0c35a24037c23b6e476862c1'
+ 'bd63c881be406f515fc4d22635e8326a'
+ 'aaa615512cbe1ed7f3b62c1ff46802f8')
diff --git a/java/apache-ant/apache-ant.csh b/java/apache-ant/apache-ant.csh
new file mode 100755
index 000000000..fdc04b2f8
--- /dev/null
+++ b/java/apache-ant/apache-ant.csh
@@ -0,0 +1,2 @@
+#!/bin/csh
+setenv ANT_HOME /opt/apache-ant
diff --git a/java/apache-ant/apache-ant.sh b/java/apache-ant/apache-ant.sh
new file mode 100755
index 000000000..6e4809da5
--- /dev/null
+++ b/java/apache-ant/apache-ant.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+export ANT_HOME=/opt/apache-ant
diff --git a/java/arduino/PKGBUILD b/java/arduino/PKGBUILD
new file mode 100644
index 000000000..426664a37
--- /dev/null
+++ b/java/arduino/PKGBUILD
@@ -0,0 +1,101 @@
+# Maintainer: PyroPeter <googlemail.com@abi1789>
+
+pkgname=arduino
+pkgver=1.0.1
+pkgrel=2
+pkgdesc="Arduino SDK and IDE"
+arch=('i686' 'x86_64')
+url="http://arduino.cc/en/Main/Software"
+options=(!strip)
+license=('GPL')
+
+depends=('avr-gcc' 'avr-libc' 'libusb-compat' 'java-runtime' 'avrdude'
+ 'java-rxtx' 'antlr2' 'eclipse-ecj' 'jna')
+makedepends=(java-environment apache-ant jh)
+install="arduino.install"
+source=("http://arduino.googlecode.com/files/arduino-$pkgver-src.tar.gz"
+ 'sig-patch.diff'
+ 'arduino.png'
+ 'arduino.desktop')
+
+unset _JAVA_OPTIONS
+. /etc/profile.d/jdk.sh
+
+mksource() {
+ cd "$srcdir/arduino-$pkgver"
+ find . -name '*.jar' -delete
+ find . -name '*.swp' -delete
+ find . -name '*.so' -delete
+ rm -rf build/linux/dist/*/*
+}
+
+build() {
+ cd "$srcdir/arduino-$pkgver"
+ eval `jh mksource build/shared/reference.zip`
+
+ cd "$srcdir"
+ mkdir empty.d
+ cd empty.d
+ bsdtar cjf ../empty.tar.bz2 .
+ cd ..
+ rmdir empty.d
+
+ cd "$srcdir/arduino-$pkgver"
+
+ # Fix issue 955 to be compatible with newer versions of avr-libc
+ # https://code.google.com/p/arduino/issues/detail?id=955
+ # Note: this patch is not the patch given in the comments
+ patch -Np1 -i "$srcdir/sig-patch.diff"
+
+ #ln -s /.../RXTXcomm.jar app/lib # already on the classpath
+ ln -s /usr/share/java/antlr2.jar app/lib/antlr.jar
+ #ln -s /.../apple.jar app/lib # only used on Mac OS
+ ln -s /usr/share/java/ecj.jar app/lib
+ ln -s /usr/share/java/jna.jar app/lib
+ ln -s /usr/bin/avrdude build/linux/dist/tools
+
+ ln -s "$srcdir/empty.tar.bz2" build/linux/avr_tools_linux32.tar.bz2
+ ln -s "$srcdir/empty.tar.bz2" build/linux/avr_tools_linux64.tar.bz2
+
+ for d in methods preproc; do
+ cd "$srcdir/arduino-$pkgver/core/$d"
+ ant
+ done
+
+ cd "$srcdir/arduino-$pkgver/build"
+
+ log=`mktemp`
+ ant 2>&1|tee "$log"
+ if egrep -q 'Error|FAILED' "$log"; then
+ rm "$log"
+ false
+ else
+ rm "$log"
+ fi
+}
+
+package() {
+ cd "$srcdir/arduino-$pkgver/build/linux/work"
+
+ # arduino excutable should accept arguments
+ sed -i 's|^java .* processing.app.Base$|\0 "$@"|' arduino
+ sed -i 's|^APPDIR=.*|APPDIR=/usr/share/arduino|' arduino
+
+ mkdir -p "$pkgdir"/usr/{bin,share/{doc,applications,pixmaps}}
+
+ # copy the whole SDK to /usr/share/arduino/
+ cp -r . "$pkgdir/usr/share/arduino"
+
+ # at least support the FHS a little bit:
+ install -m755 "arduino" "$pkgdir/usr/bin/arduino"
+ ln -s /usr/share/arduino/reference "$pkgdir/usr/share/doc/arduino"
+
+ # desktop icon
+ install -m644 "$srcdir/arduino.desktop" "$pkgdir/usr/share/applications/"
+ install -m644 "$srcdir/arduino.png" "$pkgdir/usr/share/pixmaps/"
+}
+
+md5sums=('03263613f4be4f865989244420be04fa'
+ 'acadc724cbe08c09711825f4bd5c04f6'
+ '9e36d33891d5e68d38ec55d1494499a5'
+ 'eebc4d6495864bea99ad057af801afb9')
diff --git a/java/arduino/arduino.desktop b/java/arduino/arduino.desktop
new file mode 100644
index 000000000..8469724ea
--- /dev/null
+++ b/java/arduino/arduino.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Arduino
+GenericName=Arduino IDE
+Comment=The open-source Arduino environment
+Exec=arduino
+Icon=arduino
+Type=Application
+Terminal=false
+Categories=Development;IDE;Qt;KDE;;Application;
diff --git a/java/arduino/arduino.install b/java/arduino/arduino.install
new file mode 100644
index 000000000..35d283fab
--- /dev/null
+++ b/java/arduino/arduino.install
@@ -0,0 +1,10 @@
+post_install() {
+ xdg-icon-resource install --size 256 --novendor /usr/share/pixmaps/arduino.png
+ echo "Don't forget to add yourself to the uucp group: gpasswd -a <user> uucp"
+}
+
+pre_remove() {
+ xdg-icon-resource uninstall --size 256 arduino
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/java/arduino/arduino.png b/java/arduino/arduino.png
new file mode 100644
index 000000000..ea3ac81b4
--- /dev/null
+++ b/java/arduino/arduino.png
Binary files differ
diff --git a/java/arduino/sig-patch.diff b/java/arduino/sig-patch.diff
new file mode 100644
index 000000000..4be3a6cdc
--- /dev/null
+++ b/java/arduino/sig-patch.diff
@@ -0,0 +1,256 @@
+diff -ruN arduino-1.0.1.orig/hardware/arduino/cores/arduino/HardwareSerial.cpp arduino-1.0.1/hardware/arduino/cores/arduino/HardwareSerial.cpp
+--- arduino-1.0.1.orig/hardware/arduino/cores/arduino/HardwareSerial.cpp 2012-05-21 13:01:43.000000000 -0400
++++ arduino-1.0.1/hardware/arduino/cores/arduino/HardwareSerial.cpp 2012-10-19 23:26:46.000000000 -0400
+@@ -88,24 +88,16 @@
+ #if !defined(USART0_RX_vect) && defined(USART1_RX_vect)
+ // do nothing - on the 32u4 the first USART is USART1
+ #else
+-#if !defined(USART_RX_vect) && !defined(SIG_USART0_RECV) && \
+- !defined(SIG_UART0_RECV) && !defined(USART0_RX_vect) && \
+- !defined(SIG_UART_RECV)
++#if !defined(USART_RX_vect) && !defined(USART0_RX_vect)
+ #error "Don't know what the Data Received vector is called for the first UART"
+ #else
+ void serialEvent() __attribute__((weak));
+ void serialEvent() {}
+ #define serialEvent_implemented
+ #if defined(USART_RX_vect)
+- SIGNAL(USART_RX_vect)
+-#elif defined(SIG_USART0_RECV)
+- SIGNAL(SIG_USART0_RECV)
+-#elif defined(SIG_UART0_RECV)
+- SIGNAL(SIG_UART0_RECV)
++ ISR(USART_RX_vect)
+ #elif defined(USART0_RX_vect)
+- SIGNAL(USART0_RX_vect)
+-#elif defined(SIG_UART_RECV)
+- SIGNAL(SIG_UART_RECV)
++ ISR(USART0_RX_vect)
+ #endif
+ {
+ #if defined(UDR0)
+@@ -124,39 +116,33 @@
+ void serialEvent1() __attribute__((weak));
+ void serialEvent1() {}
+ #define serialEvent1_implemented
+- SIGNAL(USART1_RX_vect)
++ ISR(USART1_RX_vect)
+ {
+ unsigned char c = UDR1;
+ store_char(c, &rx_buffer1);
+ }
+-#elif defined(SIG_USART1_RECV)
+- #error SIG_USART1_RECV
+ #endif
+
+ #if defined(USART2_RX_vect) && defined(UDR2)
+ void serialEvent2() __attribute__((weak));
+ void serialEvent2() {}
+ #define serialEvent2_implemented
+- SIGNAL(USART2_RX_vect)
++ ISR(USART2_RX_vect)
+ {
+ unsigned char c = UDR2;
+ store_char(c, &rx_buffer2);
+ }
+-#elif defined(SIG_USART2_RECV)
+- #error SIG_USART2_RECV
+ #endif
+
+ #if defined(USART3_RX_vect) && defined(UDR3)
+ void serialEvent3() __attribute__((weak));
+ void serialEvent3() {}
+ #define serialEvent3_implemented
+- SIGNAL(USART3_RX_vect)
++ ISR(USART3_RX_vect)
+ {
+ unsigned char c = UDR3;
+ store_char(c, &rx_buffer3);
+ }
+-#elif defined(SIG_USART3_RECV)
+- #error SIG_USART3_RECV
+ #endif
+
+ void serialEventRun(void)
+diff -ruN arduino-1.0.1.orig/hardware/arduino/cores/arduino/HardwareSerial.h arduino-1.0.1/hardware/arduino/cores/arduino/HardwareSerial.h
+--- arduino-1.0.1.orig/hardware/arduino/cores/arduino/HardwareSerial.h 2012-05-21 13:01:43.000000000 -0400
++++ arduino-1.0.1/hardware/arduino/cores/arduino/HardwareSerial.h 2012-10-19 23:13:59.000000000 -0400
+@@ -76,6 +76,15 @@
+ extern HardwareSerial Serial3;
+ #endif
+
++/*
++ * on ATmega8, the uart and its bits are not numbered, so there is no "TXC0"
++ * definition. It is slightly cleaner to define this here instead of having
++ * conditional code in the cpp module.
++ */
++#if !defined(TXC0)
++#define TXC0 TXC
++#endif
++
+ extern void serialEventRun(void) __attribute__((weak));
+
+ #endif
+diff -ruN arduino-1.0.1.orig/hardware/arduino/cores/arduino/WInterrupts.c arduino-1.0.1/hardware/arduino/cores/arduino/WInterrupts.c
+--- arduino-1.0.1.orig/hardware/arduino/cores/arduino/WInterrupts.c 2012-05-21 13:01:43.000000000 -0400
++++ arduino-1.0.1/hardware/arduino/cores/arduino/WInterrupts.c 2012-10-19 23:13:59.000000000 -0400
+@@ -216,72 +216,72 @@
+ */
+
+ #if defined(__AVR_ATmega32U4__)
+-SIGNAL(INT0_vect) {
++ISR(INT0_vect) {
+ if(intFunc[EXTERNAL_INT_0])
+ intFunc[EXTERNAL_INT_0]();
+ }
+
+-SIGNAL(INT1_vect) {
++ISR(INT1_vect) {
+ if(intFunc[EXTERNAL_INT_1])
+ intFunc[EXTERNAL_INT_1]();
+ }
+
+ #elif defined(EICRA) && defined(EICRB)
+
+-SIGNAL(INT0_vect) {
++ISR(INT0_vect) {
+ if(intFunc[EXTERNAL_INT_2])
+ intFunc[EXTERNAL_INT_2]();
+ }
+
+-SIGNAL(INT1_vect) {
++ISR(INT1_vect) {
+ if(intFunc[EXTERNAL_INT_3])
+ intFunc[EXTERNAL_INT_3]();
+ }
+
+-SIGNAL(INT2_vect) {
++ISR(INT2_vect) {
+ if(intFunc[EXTERNAL_INT_4])
+ intFunc[EXTERNAL_INT_4]();
+ }
+
+-SIGNAL(INT3_vect) {
++ISR(INT3_vect) {
+ if(intFunc[EXTERNAL_INT_5])
+ intFunc[EXTERNAL_INT_5]();
+ }
+
+-SIGNAL(INT4_vect) {
++ISR(INT4_vect) {
+ if(intFunc[EXTERNAL_INT_0])
+ intFunc[EXTERNAL_INT_0]();
+ }
+
+-SIGNAL(INT5_vect) {
++ISR(INT5_vect) {
+ if(intFunc[EXTERNAL_INT_1])
+ intFunc[EXTERNAL_INT_1]();
+ }
+
+-SIGNAL(INT6_vect) {
++ISR(INT6_vect) {
+ if(intFunc[EXTERNAL_INT_6])
+ intFunc[EXTERNAL_INT_6]();
+ }
+
+-SIGNAL(INT7_vect) {
++ISR(INT7_vect) {
+ if(intFunc[EXTERNAL_INT_7])
+ intFunc[EXTERNAL_INT_7]();
+ }
+
+ #else
+
+-SIGNAL(INT0_vect) {
++ISR(INT0_vect) {
+ if(intFunc[EXTERNAL_INT_0])
+ intFunc[EXTERNAL_INT_0]();
+ }
+
+-SIGNAL(INT1_vect) {
++ISR(INT1_vect) {
+ if(intFunc[EXTERNAL_INT_1])
+ intFunc[EXTERNAL_INT_1]();
+ }
+
+ #if defined(EICRA) && defined(ISC20)
+-SIGNAL(INT2_vect) {
++ISR(INT2_vect) {
+ if(intFunc[EXTERNAL_INT_2])
+ intFunc[EXTERNAL_INT_2]();
+ }
+@@ -290,9 +290,8 @@
+ #endif
+
+ /*
+-SIGNAL(SIG_2WIRE_SERIAL) {
++ISR(TWI_vect) {
+ if(twiIntFunc)
+ twiIntFunc();
+ }
+ */
+-
+diff -ruN arduino-1.0.1.orig/hardware/arduino/cores/arduino/wiring.c arduino-1.0.1/hardware/arduino/cores/arduino/wiring.c
+--- arduino-1.0.1.orig/hardware/arduino/cores/arduino/wiring.c 2012-05-21 13:01:43.000000000 -0400
++++ arduino-1.0.1/hardware/arduino/cores/arduino/wiring.c 2012-10-19 23:13:59.000000000 -0400
+@@ -42,9 +42,9 @@
+ static unsigned char timer0_fract = 0;
+
+ #if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)
+-SIGNAL(TIM0_OVF_vect)
++ISR(TIM0_OVF_vect)
+ #else
+-SIGNAL(TIMER0_OVF_vect)
++ISR(TIMER0_OVF_vect)
+ #endif
+ {
+ // copy these to local variables so they can be stored in registers
+diff -ruN arduino-1.0.1.orig/libraries/Servo/Servo.cpp arduino-1.0.1/libraries/Servo/Servo.cpp
+--- arduino-1.0.1.orig/libraries/Servo/Servo.cpp 2012-05-08 20:34:38.000000000 -0400
++++ arduino-1.0.1/libraries/Servo/Servo.cpp 2012-10-19 23:13:59.000000000 -0400
+@@ -100,28 +100,28 @@
+ #ifndef WIRING // Wiring pre-defines signal handlers so don't define any if compiling for the Wiring platform
+ // Interrupt handlers for Arduino
+ #if defined(_useTimer1)
+-SIGNAL (TIMER1_COMPA_vect)
++ISR(TIMER1_COMPA_vect)
+ {
+ handle_interrupts(_timer1, &TCNT1, &OCR1A);
+ }
+ #endif
+
+ #if defined(_useTimer3)
+-SIGNAL (TIMER3_COMPA_vect)
++ISR(TIMER3_COMPA_vect)
+ {
+ handle_interrupts(_timer3, &TCNT3, &OCR3A);
+ }
+ #endif
+
+ #if defined(_useTimer4)
+-SIGNAL (TIMER4_COMPA_vect)
++ISR(TIMER4_COMPA_vect)
+ {
+ handle_interrupts(_timer4, &TCNT4, &OCR4A);
+ }
+ #endif
+
+ #if defined(_useTimer5)
+-SIGNAL (TIMER5_COMPA_vect)
++ISR(TIMER5_COMPA_vect)
+ {
+ handle_interrupts(_timer5, &TCNT5, &OCR5A);
+ }
+diff -ruN arduino-1.0.1.orig/libraries/Wire/utility/twi.c arduino-1.0.1/libraries/Wire/utility/twi.c
+--- arduino-1.0.1.orig/libraries/Wire/utility/twi.c 2012-02-18 19:57:03.000000000 -0500
++++ arduino-1.0.1/libraries/Wire/utility/twi.c 2012-10-19 23:13:59.000000000 -0400
+@@ -360,7 +360,7 @@
+ twi_state = TWI_READY;
+ }
+
+-SIGNAL(TWI_vect)
++ISR(TWI_vect)
+ {
+ switch(TW_STATUS){
+ // All Master
diff --git a/java/java-asm2/PKGBUILD b/java/java-asm2/PKGBUILD
new file mode 100644
index 000000000..3541c20ab
--- /dev/null
+++ b/java/java-asm2/PKGBUILD
@@ -0,0 +1,18 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgver=2.2.3
+. common.sh
+
+####
+
+pkgrel=5
+_checksource_ignore=('test/conform/org/objectweb/asm/signature/signatures.txt')
+
+mksource() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ rm test/conform/org/objectweb/asm/attrs/StackMapTableSample.data
+ rm test/conform/cases/*.class
+ mkdir -p test/lib
+}
+
+md5sums=('7a92c87bf067925685cf68dcc0dd8998')
diff --git a/java/java-asm2/PKGBUILD-bootstrap b/java/java-asm2/PKGBUILD-bootstrap
new file mode 100644
index 000000000..9e896a90e
--- /dev/null
+++ b/java/java-asm2/PKGBUILD-bootstrap
@@ -0,0 +1,23 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+# "java-asm2" is required to build "java-ow-util-ant-tasks", which is in turn
+# required to build "java-asm2".
+
+. PKGBUILD
+
+makedepends=(jh)
+source=("http://download.forge.objectweb.org/$_pkgname/$_pkgname-$pkgver-bin.zip")
+_distdir="$_pkgname-$pkgver"
+
+provides+=("$pkgname=$pkgver")
+pkgname+='-bootstrap'
+pkgdesc+=" (prebuilt binary release for bootstrapping purposes)"
+
+build() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ echo "3-clause BSD license; install the non-bootstrap version for full text" > LICENSE.txt
+ cd "$srcdir/$_distdir/lib"
+ ln -s all/* .
+}
+
+md5sums=('9bedaa1d00c5b5f1c7fec10a2d2f7142')
diff --git a/java/java-asm2/common.sh b/java/java-asm2/common.sh
new file mode 100644
index 000000000..6a664c9ff
--- /dev/null
+++ b/java/java-asm2/common.sh
@@ -0,0 +1,59 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+_pkgname=asm
+pkgname=java-asm${pkgver%%.*}
+pkgdesc="An all purpose Java bytecode manipulation and analysis framework."
+url="http://asm.ow2.org/"
+license=('custom:BSD3')
+
+arch=('any')
+depends=('java-runtime')
+makedepends=(
+ apache-ant
+ java-ow-util-ant-tasks
+ jh
+)
+source=("http://download.forge.objectweb.org/$_pkgname/$_pkgname-$pkgver.tar.gz")
+
+_distdir="$_pkgname-$pkgver/output/dist"
+_ow_util_ant_tasks='/usr/share/java/ow_util_ant_tasks.jar'
+
+build() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ eval `jh mksource ${_checksource_ignore[@]}`
+
+ echo "objectweb.ant.tasks.path $_ow_util_ant_tasks" >> build.properties
+ ant dist
+
+ # This will make package() easier:
+ cd "$srcdir/$_distdir/lib"
+ ln -s all/* .
+}
+
+package() {
+ # Install license file
+ cd "$srcdir/$_pkgname-$pkgver"
+ install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # Install documentation
+ cd "$srcdir/$_distdir"
+ install -d "$pkgdir/usr/share/doc/$pkgname"
+ cp -r doc/javadoc/user "$pkgdir/usr/share/doc/$pkgname/javadoc"
+ cp -r examples "$pkgdir/usr/share/doc/$pkgname/examples"
+
+ # Install the README about the -all files
+ cd "$srcdir/$_distdir/lib"
+ install -Dm644 README.txt \
+ "$pkgdir"/usr/share/java/$_pkgname/README-$pkgver.txt
+
+ # Install Maven artifacts
+ export DESTDIR=$pkgdir
+ for artifact in $(ls *.jar|sed 's/-[0-9.]*\.jar$//'); do
+ jh mvn-install $_pkgname $artifact $pkgver $artifact-$pkgver.{jar,pom}
+ # Symlink them to /usr/share/java
+ ln -s "$(jh mvn-basename asm $artifact $pkgver).jar" \
+ "$pkgdir"/usr/share/java/$_pkgname/
+ ln -s $_pkgname/$artifact-$pkgver.jar \
+ "$pkgdir"/usr/share/java/$artifact-${pkgver%%.*}.jar
+ done
+}
diff --git a/java/java-asm3/PKGBUILD b/java/java-asm3/PKGBUILD
new file mode 100644
index 000000000..e85896b72
--- /dev/null
+++ b/java/java-asm3/PKGBUILD
@@ -0,0 +1,17 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgver=3.3.1
+. ../java-asm2/common.sh
+
+####
+
+pkgrel=5
+_checksource_ignore=(src/org/objectweb/asm/optimizer/jdk{1.2.2_017,1.3.1_19}.txt.gz)
+
+mksource() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ rm cobertura.ser # We regenerate this
+ rm examples/jasmin/test/jasmin.jar
+}
+
+md5sums=('433024df8176f09922646316e415631c')
diff --git a/java/java-jarjar/PKGBUILD b/java/java-jarjar/PKGBUILD
new file mode 100644
index 000000000..8d1d1120b
--- /dev/null
+++ b/java/java-jarjar/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+# jarjar 1.2 is old, but is the last version that used java-asm3
+# java-asm4 is not packaged
+
+_pkgname=jarjar
+pkgname=java-jarjar
+pkgver=1.2
+_pkgrev=132 # v1.2 wasn't tagged, but this is clearly it
+pkgdesc="Java static linker (instead of the normal dynamic linking)"
+url="https://code.google.com/p/jarjar/"
+license=('Apache2')
+
+pkgrel=1
+arch=('any')
+depends=('java-runtime')
+makedepends=('apache-ant' 'java-asm3' 'junit' 'maven' 'jh')
+source=("svn+http://jarjar.googlecode.com/svn/trunk/jarjar#revision=$_pkgrev")
+
+mksource() {
+ cd "$srcdir/$_pkgname"
+ rm -f src/test/*.{class,jar}
+ rm -f lib/*.jar
+}
+
+build() {
+ cd "$srcdir/$_pkgname"
+ eval `jh mksource`
+
+ ln -s /usr/share/java/asm-3.jar lib/asm-3.3.1.jar
+ ln -s /usr/share/java/asm-commons-3.jar lib/asm-commons-3.3.1.jar
+ ln -s /usr/share/java/junit.jar lib/junit-4.8.1.jar
+ ln -s /opt/maven/lib/maven-plugin-api-*.jar lib/maven-plugin-api.jar
+
+ ln -s /opt/apache-ant/lib/ant.jar lib/
+
+ export CLASSPATH=/usr/share/java/asm-3.jar
+ echo 'includeantruntime false' > build.properties
+ ant jar
+}
+
+package() {
+ cd "$srcdir/$_pkgname"
+ install -d "$pkgdir/usr/share/java/$_pkgname"
+ install -D "dist/$_pkgname-$pkgver.jar" "$pkgdir/usr/share/java/$_pkgname"
+ ln -s "$_pkgname/$_pkgname-$pkgver.jar" "$pkgdir/usr/share/java/$_pkgname.jar"
+}
+
+md5sums=('SKIP')
diff --git a/java/java-jarjar/PKGBUILD-1.4 b/java/java-jarjar/PKGBUILD-1.4
new file mode 100644
index 000000000..f0ebe9270
--- /dev/null
+++ b/java/java-jarjar/PKGBUILD-1.4
@@ -0,0 +1,41 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+_pkgname=jarjar
+pkgname=java-jarjar
+pkgver=1.4
+pkgdesc="Java static linker (instead of the normal dynamic linking)"
+url="https://code.google.com/p/jarjar/"
+license=('Apache2')
+
+pkgrel=1
+arch=('any')
+depends=('java-runtime')
+makedepends=('apache-ant' 'java-asm4' 'junit' 'maven' 'jh')
+source=("https://${_pkgname}.googlecode.com/files/${_pkgname}-src-${pkgver}.zip")
+
+mksource() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ rm -f src/test/*.{class,jar}
+ rm -f lib/*.jar
+}
+
+build() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ eval `jh mksource`
+
+ ln -s /usr/share/java/asm-4.jar lib/asm-4.0.jar
+ ln -s /usr/share/java/asm-commons-4.jar lib/asm-commons-4.0.jar
+ ln -s /usr/share/java/junit.jar lib/junit-4.8.1.jar
+ ln -s /opt/maven/lib/maven-plugin-api-*.jar lib/maven-plugin-api.jar
+
+ ant jar
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ install -d "$pkgdir/usr/share/java/$_pkgname"
+ install -D "dist/$_pkgname-$pkgver.jar" "$pkgdir/usr/share/java/$_pkgname"
+ ln -s "$_pkgname/$_pkgname-$pkgver.jar" "$pkgdir/usr/share/java/$_pkgname.jar"
+}
+
+sha1sums=('803ad79cf429faeb4d767b2fb45d84bbc904ea04')
diff --git a/java/java-ow-util-ant-tasks/PKGBUILD b/java/java-ow-util-ant-tasks/PKGBUILD
new file mode 100644
index 000000000..f1add43ea
--- /dev/null
+++ b/java/java-ow-util-ant-tasks/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgname=java-ow-util-ant-tasks
+pkgver=1.3.2
+pkgrel=1
+pkgdesc="ObjectWeb utility Ant tasks library"
+arch=('any')
+url="http://forge.ow2.org/projects/monolog"
+license=('LGPL')
+depends=('java-environment')
+makedepends=('apache-ant' 'xalan-java' 'java-asm2')
+source=("http://repo.parabolagnulinux.org/sources/${pkgname}-${pkgver}-1-any.src.tar.xz")
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ln -s /usr/share/java/asm-2.jar externals/
+ ln -s /usr/share/java/xalan.jar externals/
+ ant jar
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ install -d "$pkgdir"/usr/share/java
+ install -m644 "output/lib/ow_util_ant_tasks.jar" "$pkgdir"/usr/share/java
+}
+
+md5sums=('339b3eb4b2960473a42f5f781afbeca6')
diff --git a/java/java-ow-util-ant-tasks/SRCBUILD b/java/java-ow-util-ant-tasks/SRCBUILD
new file mode 100644
index 000000000..01241907d
--- /dev/null
+++ b/java/java-ow-util-ant-tasks/SRCBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgname=java-ow-util-ant-tasks
+pkgver=1.3.2
+pkgrel=1
+pkgdesc="ObjectWeb utility Ant tasks library"
+arch=('any')
+url="http://forge.ow2.org/projects/monolog"
+license=('LGPL')
+source=("http://download.forge.objectweb.org/monolog/ow_util_ant_tasks_$pkgver.zip")
+noextract=("ow_util_ant_tasks_$pkgver.zip")
+
+build() {
+ cd "$srcdir"
+ mkdir $pkgname-$pkgver
+ cd $pkgname-$pkgver
+ bsdtar xf "$srcdir"/ow_util_ant_tasks_$pkgver.zip
+ rm -rf output
+ rm externals/*
+}
+
+
+package() {
+ PKGEXT=${SRCEXT}
+ PKGDEST=${SRCDEST}
+ cp -a "$srcdir/$pkgname-$pkgver" "$pkgdir/"
+}
+
+md5sums=('cd602bf75a0feab480fa97739955b84e')
diff --git a/java/java-rxtx/ChangeLog.txt b/java/java-rxtx/ChangeLog.txt
new file mode 100644
index 000000000..7efab2514
--- /dev/null
+++ b/java/java-rxtx/ChangeLog.txt
@@ -0,0 +1,8 @@
+Differences from rxtx-2.1-7r2 made by Arduino:
+ * Adding support for /dev/ttyACM* devices on Linux.
+ * Fixing (I hope) problems on 64-bit Linux systems.
+ * Adding checks for Java 1.6.
+ * Removing unnecessary compiler warning.
+
+Differences from Arduino's version:
+ * Adding checks for Java 1.7.
diff --git a/java/java-rxtx/PKGBUILD b/java/java-rxtx/PKGBUILD
new file mode 100644
index 000000000..30ed25967
--- /dev/null
+++ b/java/java-rxtx/PKGBUILD
@@ -0,0 +1,54 @@
+# Maintainer (Parabola): Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (AUR): PyroPeter <googlemail.com@abi1789>
+
+pkgname=java-rxtx
+_pkgver=2.1-7r2-arduino4
+_gitver='commit=a8cd90f8505d7c472b57550b1192fe67885dd638'
+pkgver=${_pkgver//-/.}
+
+pkgrel=1
+pkgdesc="A native library providing serial and parallel communication for Java"
+arch=('i686' 'x86_64')
+depends=('java-environment')
+
+case "$_pkgver" in
+ *arduino*)
+ url="https://github.com/arduino/RXTX"
+ source=("git://github.com/arduino/RXTX.git#${_gitver}"
+ java7-configure.patch
+ destdir.patch)
+ license=(LGPL)
+ changelog=ChangeLog.txt
+ _dirname=RXTX
+ ;;
+ *)
+ url="http://rxtx.qbang.org/"
+ source=("http://rxtx.qbang.org/pub/rxtx/rxtx-${_pkgver}.zip"
+ destdir.patch)
+ # Todo: patch for Java 6 AND Java 7
+ license=('custom:LGPL-with-java-exception')
+ _dirname=rxtx-{$_pkgver}
+ ;;
+esac
+
+build() {
+ cd "$srcdir/$_dirname"
+ . /etc/profile.d/jdk.sh
+
+ patch -i "$srcdir/java7-configure.patch"
+ patch -i "$srcdir/destdir.patch"
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$_dirname"
+ . /etc/profile.d/jdk.sh
+
+ make DESTDIR="$pkgdir" install
+}
+
+md5sums=('SKIP'
+ 'f07bc244660852dd9b016c190e38e1c9'
+ '90be9bdf1d8cbe5304739df066559a13')
diff --git a/java/java-rxtx/destdir.patch b/java/java-rxtx/destdir.patch
new file mode 100644
index 000000000..11416841f
--- /dev/null
+++ b/java/java-rxtx/destdir.patch
@@ -0,0 +1,20 @@
+--- Makefile.in.orig 2012-09-21 15:21:00.000000000 -0400
++++ Makefile.in 2012-09-21 15:21:07.000000000 -0400
+@@ -566,13 +566,15 @@
+ # install librxtxSerial.so into the proper directory and copy $(JARTARGET) to its
+ # proper location
+ install: all
++ $(mkinstalldirs) $(DESTDIR)$(RXTX_PATH)
++ $(mkinstalldirs) $(DESTDIR)$(JHOME)
+ @$(LIBTOOL_INST) \
+ `for i in $(TARGETLIB);do \
+ if [ -f $$i ];then \
+ echo $$i; \
+ fi; \
+- done` $(RXTX_PATH)
+- $(INSTALL_PROGRAM) $(JARTARGET) $(JHOME)/
++ done` $(DESTDIR)$(RXTX_PATH)
++ $(INSTALL_PROGRAM) $(JARTARGET) $(DESTDIR)$(JHOME)/
+
+ clean-generic:
+ rm -rf $(DEST) $(TOP)/$(CLASSTOP)
diff --git a/java/java-rxtx/java7-configure.patch b/java/java-rxtx/java7-configure.patch
new file mode 100644
index 000000000..fed710200
--- /dev/null
+++ b/java/java-rxtx/java7-configure.patch
@@ -0,0 +1,38 @@
+--- configure.orig 2012-09-21 15:02:54.000000000 -0400
++++ configure 2012-09-21 15:03:38.000000000 -0400
+@@ -21541,7 +21541,7 @@
+ CFLAGS=$CFLAGS" -D__need_timespec"
+ case $JAVA_VERSION in
+
+- 1.2*|1.3*|1.4*|1.5*|1.6*)
++ 1.2*|1.3*|1.4*|1.5*|1.6*|1.7*)
+ #fix_parameters $JPATH/jre/lib/javax.comm.properties
+ CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1`
+ JHOME=$JPATH"/jre/lib/ext"
+@@ -21611,7 +21611,7 @@
+ TARGETLIB="\$(target_triplet)/librxtxSerial.la \
+ \$(target_triplet)/librxtxParallel.la"
+ case $JAVA_VERSION in
+- 1.2*|1.3*|1.4*|1.5*|1.6*)
++ 1.2*|1.3*|1.4*|1.5*|1.6*|1.7*)
+ #fix_parameters $JPATH/jre/lib/javax.comm.properties
+ CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1`
+ RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
+@@ -21747,7 +21747,7 @@
+
+ WIN32)
+ case $JAVA_VERSION in
+- 1.2*|1.3*|1.4*|1.5*|1.6*)
++ 1.2*|1.3*|1.4*|1.5*|1.6*|1.7*)
+ CLASSPATH=".:\$(TOP):\$(TOP)/src:`find $JPATH/ -name RXTXcomm.jar |head -n1`:$CLASSPATH"
+ JHOME=$JPATH"/jre/lib/ext"
+ ;;
+@@ -21799,7 +21799,7 @@
+ CLASSPATH=".:\$(TOP):\$(TOP)/src:\$(JPATH)/lib/classes.zip:\$(JPATH)/lib/RXTXcomm.jar:$CLASSPATH"
+
+ case $JAVA_VERSION in
+- 1.2*|1.3*|1.4*|1.5*|1.6*)
++ 1.2*|1.3*|1.4*|1.5*|1.6*|1.7*)
+ RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
+ ;;
+ 1.1*)
diff --git a/java/java-sonatype-oss-parent/PKGBUILD b/java/java-sonatype-oss-parent/PKGBUILD
new file mode 100644
index 000000000..f42f6adc5
--- /dev/null
+++ b/java/java-sonatype-oss-parent/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgname=java-sonatype-oss-parent
+pkgver=7
+pkgdesc="Metadata file for Maven-based build systems to inherit from"
+license='Apache2'
+
+_groupId=org/sonatype/oss
+_artifactId=oss-parent
+
+pkgrel=1
+arch=('any')
+depends=('maven')
+makedepends=('java-sonatype-oss-parent=7' 'jh')
+source=("http://search.maven.org/remotecontent?filepath=$_groupId/$_artifactId/$pkgver/$_artifactId-$pkgver.pom")
+
+build() {
+ :
+}
+
+package() {
+ cd "$srcdir"
+ install -Dm644 $_artifactId-$pkgver.pom \
+ "$pkgdir/`jh mvn-basename $_groupId $_artifactId $pkgver`".pom
+}
+
+md5sums=('3e418cf7f2607bf359e6c514a992cb38')
diff --git a/java/jh/PKGBUILD b/java/jh/PKGBUILD
new file mode 100644
index 000000000..5382cb0e5
--- /dev/null
+++ b/java/jh/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgname=jh
+pkgver=0.3.2
+pkgdesc="Java helpers for PKGBUILDs"
+url="https://gitorious.org/parabola/jh"
+license=('Public Domain')
+
+pkgrel=1
+arch=(any)
+depends=(xmlstarlet maven)
+source=("git://gitorious.org/parabola/jh.git#tag=v$pkgver")
+
+build() {
+ cd "$srcdir/$pkgname"
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ make install DESTDIR="$pkgdir"
+}
+
+md5sums=('SKIP')
diff --git a/java/jna/PKGBUILD b/java/jna/PKGBUILD
new file mode 100644
index 000000000..db5f552cb
--- /dev/null
+++ b/java/jna/PKGBUILD
@@ -0,0 +1,117 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgname=jna
+pkgver=3.4.2
+
+pkgdesc="Provides Java programs easy access to native shared libraries"
+url="https://github.com/twall/jna"
+license=('LGPL')
+source=("git://github.com/twall/jna.git#tag=${pkgver}"
+ 'libre-without-clover.patch'
+ 'bugfix-type-inference.patch'
+ 'webstart-test.keystore')
+
+####
+
+pkgrel=1
+arch=('i686' 'x86_64')
+depends=('java-environment' 'libffi')
+makedepends=('apache-ant' 'zip')
+checkdepends=('junit' 'icedtea-web-java7')
+options=('!makeflags')
+
+unset _JAVA_OPTIONS
+_M2_LOCALREPO='/usr/share/maven/repository'
+. /etc/profile.d/jdk.sh
+
+_ant_options=(
+ '-Ddynlink.native=true' # use the system install of libffi
+)
+
+####
+
+mksource() {
+ cd "$srcdir/jna"
+ find . -name '*.jar' -delete
+ rm -rf dist
+ rm -rf native/libffi # make sure it doesn't cheat
+ rm lib/clover.license
+ rm w32ce-test.lnk
+
+ ln -s /usr/share/java/junit.jar lib/
+
+ # Create an emtpy zip (jar) file
+ cd "$srcdir"
+ touch file
+ zip empty.zip file
+ zip -d empty.zip file
+ rm file
+}
+
+####
+
+build() {
+ mksource
+ cd "$srcdir/jna"
+
+ # Because JNA's release process is ridiculous, it wants a jar file for every
+ # architecture to be present. So let's just dump in an empty jar file!
+ sed -n 's|\s*<zipfileset src="${lib\.native}/\(.*\)"|\1|p' build.xml \
+ | while read jarfile; do
+ cp "$srcdir/empty.zip" lib/native/$jarfile
+ done
+
+ patch -p1 -i "$srcdir/libre-without-clover.patch"
+ patch -p1 -i "$srcdir/bugfix-type-inference.patch"
+
+ # Disable tests that intermittently fail
+ # crashes vm (segfault)
+ sed -i -e 's|testRegisterMethods|no&|' test/com/sun/jna/DirectTest.java
+ # crashes vm, java 7 only (icedtea-7, oracle-jdk-bin-1.7)
+ sed -i -e 's|testGCCallbackOnFinalize|no&|' test/com/sun/jna/CallbacksTest.java
+
+ # Actually build
+ ant "${_ant_options[@]}" dist
+}
+
+check() {
+ cd "$srcdir/jna"
+
+ # Create a foke home directory to trash
+ mkdir "$srcdir/user.home"
+ export _JAVA_OPTIONS="-Duser.home=$srcdir/user.home"
+
+ # The webstart test looks for this config file
+ mkdir -p "$srcdir/user.home/.java/deployment"
+ touch "$srcdir/user.home/.java/deployment/deployment.properties"
+
+ # Trust the cert used for the webstart test
+ mkdir -p "$srcdir/user.home/.icedtea/security"
+ cp "$srcdir/webstart-test.keystore" "$srcdir/user.home/.icedtea/security/trusted.certs"
+
+ _ant_options+=('-Dtests.exclude-patterns=**/DirectTest.java')
+
+ # Run the tests
+ ant "${_ant_options[@]}" test
+}
+
+package() {
+ cd "$srcdir/jna"
+
+ install -d "$pkgdir/usr/share/java/jna"
+
+ for pkg in jna platform; do
+ dir="$_M2_LOCALREPO"/net/java/dev/jna/$pkg/$pkgver
+ install -d "$pkgdir$dir"
+ cp dist/$pkg.jar "$pkgdir$dir/$pkg-$pkgver.jar"
+ cp pom-$pkg.xml "$pkgdir$dir/$pkg-$pkgver.pom"
+ ln -s "$dir/$pkg-$pkgver.jar" "$pkgdir/usr/share/java/jna/$pkg.jar"
+ done
+
+ ln -s jna/jna.jar "$pkgdir/usr/share/java/jna.jar"
+}
+
+md5sums=('SKIP'
+ '3a2f96b868f49ca125b677779e846484'
+ '932d9cb2da1531a2315ae132480683fa'
+ 'b704c7d2cb1fe7a93f8cad8d321d16f8')
diff --git a/java/jna/bugfix-type-inference.patch b/java/jna/bugfix-type-inference.patch
new file mode 100644
index 000000000..2322b13fc
--- /dev/null
+++ b/java/jna/bugfix-type-inference.patch
@@ -0,0 +1,13 @@
+diff -ru jna-3.4.2.orig/test/com/sun/jna/NativeTest.java jna-3.4.2/test/com/sun/jna/NativeTest.java
+--- jna-3.4.2.orig/test/com/sun/jna/NativeTest.java 2012-09-03 08:30:42.000000000 -0400
++++ jna-3.4.2/test/com/sun/jna/NativeTest.java 2012-09-24 15:29:48.000000000 -0400
+@@ -374,7 +374,8 @@
+ for (int i=0;i < args.length;i++) {
+ System.out.println("Running tests on class " + args[i]);
+ try {
+- junit.textui.TestRunner.run(Class.forName(args[i]));
++ Class<?> klass = Class.forName(args[i]);
++ junit.textui.TestRunner.run((Class<? extends TestCase>)klass);
+ }
+ catch(Throwable e) {
+ e.printStackTrace();
diff --git a/java/jna/libre-without-clover.patch b/java/jna/libre-without-clover.patch
new file mode 100644
index 000000000..b4947e8b2
--- /dev/null
+++ b/java/jna/libre-without-clover.patch
@@ -0,0 +1,71 @@
+diff -ru jna-3.4.2.orig/build.xml jna-3.4.2/build.xml
+--- jna-3.4.2.orig/build.xml 2012-09-06 06:55:52.000000000 -0400
++++ jna-3.4.2/build.xml 2012-09-24 15:49:59.000000000 -0400
+@@ -230,7 +230,6 @@
+ <path id="test.runpath">
+ <pathelement path="${build}/${jar}"/>
+ <pathelement path="${test.classes}"/>
+- <pathelement path="lib/clover.jar"/>
+ <path refid="test.libs"/>
+ </path>
+ </target>
+@@ -536,12 +535,11 @@
+ <copy todir="${build}/jws" file="${build}/${jar}"/>
+ <copy todir="${build}/jws" file="${build}/${testjar}"/>
+ <copy todir="${build}/jws" file="lib/junit.jar"/>
+- <copy todir="${build}/jws" file="lib/clover.jar"/>
+ <jar jarfile="${build}/jws/jnidispatch.jar">
+ <fileset dir="${build.native}" includes="*jnidispatch.*"/>
+ </jar>
+ <signjar alias="jna" keystore="jna.keystore" storepass="jnadev" lazy="true">
+- <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,junit.jar,jnidispatch.jar,clover.jar"/>
++ <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,junit.jar,jnidispatch.jar"/>
+ </signjar>
+ </target>
+
+@@ -626,7 +624,7 @@
+ <report todir="${reports.junit}"/>
+ </junitreport>
+ <echo>View test report in file://${reports.junit}/index.html</echo>
+- <fail if="testfailure" unless="clover">One or more tests failed</fail>
++ <fail if="testfailure">One or more tests failed</fail>
+ </target>
+
+ <target name="contrib-test" depends="contrib-jars,compile-tests">
+@@ -640,27 +638,6 @@
+ </subant>
+ </target>
+
+- <target name="with.clover" description="Enable code coverage for tests">
+- <taskdef resource="cloverlib.xml" classpath="lib/clover.jar"/>
+- <property name="clover" value="true"/>
+- <property name="build" value="build.clover"/>
+- <clover-setup/>
+- </target>
+-
+- <target name="clover" depends="with.clover,test"
+- description="Generate test code coverage reports">
+- <property name="reports.clover" value="${reports}/clover"/>
+- <mkdir dir="${reports.clover}"/>
+- <clover-report>
+- <current outfile="${reports.clover}" title="clover">
+- <fileset dir="." includes="**/*.java" />
+- <testresults dir="${results.junit}" includes="TEST-*.xml"/>
+- <format type="html"/>
+- </current>
+- </clover-report>
+- <echo>Reports generated in ${reports.clover}</echo>
+- </target>
+-
+ <target name="javadoc" depends="-setup">
+ <path id="javadoc.src.path">
+ <path refid="src.path"/>
+@@ -881,7 +858,7 @@
+ <!-- Full sources required to build and test everything -->
+ <zip zipfile="${dist}/src-full.zip">
+ <zipfileset src="${dist}/src.zip"/>
+- <zipfileset dir="lib" includes="junit.jar,clover.jar" prefix="lib"/>
++ <zipfileset dir="lib" includes="junit.jar" prefix="lib"/>
+ <zipfileset dir="." includes=".classpath,.project"/>
+ <zipfileset dir="${native}" includes="libffi,libffi/**/*" prefix="native"/>
+ </zip>
diff --git a/java/jna/webstart-test.keystore b/java/jna/webstart-test.keystore
new file mode 100644
index 000000000..1bbe8c829
--- /dev/null
+++ b/java/jna/webstart-test.keystore
Binary files differ
diff --git a/java/not-working/closure-compiler/PKGBUILD b/java/not-working/closure-compiler/PKGBUILD
new file mode 100644
index 000000000..8318379a2
--- /dev/null
+++ b/java/not-working/closure-compiler/PKGBUILD
@@ -0,0 +1,73 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgname=closure-compiler
+pkgver=20120917
+_pkgrev=2180
+pkgdesc="A JavaScript optimizing compiler."
+url="https://code.google.com/closure/compiler/"
+license=('Apache')
+
+pkgrel=1
+arch=('any')
+depends=('java-runtime')
+makedepends=(
+ 'apache-ant'
+ 'java-args4j' # does not exist
+ 'google-caja' # does not exist
+ 'java-guava' # does not build
+ 'java-jarjar'
+ 'java-json' # does not exist
+ 'java-jsr305' # does not exist
+ 'junit'
+ 'java-protobuf' # does not build
+ # maven-ant-tasks
+ 'jh')
+source=("compiler-$pkgver::svn+http://closure-compiler.googlecode.com/svn/trunk/#revision=$_pkgrev")
+
+# For some reason, `file` detects this as a Fortran binary
+_funny_js=(
+ lib/rhino/testsrc/benchmarks/sunspider-0.9.1/bitops-3bit-bits-in-byte.js
+)
+
+mksource() {
+ cd "$srcdir/compiler-$pkgver"
+ rm lib/ant.jar
+ rm lib/ant-launcher.jar
+ rm lib/args4j.jar
+ rm lib/caja-r4314.jar
+ rm lib/guava.jar
+ rm lib/jarjar.jar
+ rm lib/json.jar
+ rm lib/jsr305.jar
+ rm lib/junit.jar
+ rm lib/protobuf-java.jar
+ rm lib/rhino/testsrc/org/mozilla/javascript/tests/commonjs/module/modules.jar
+ rm tools/maven-ant-tasks-2.1.3.jar
+}
+
+build() {
+ cd "$srcdir/compiler-$pkgver"
+ eval `jh mksource ${_funny_js[@]}`
+
+ ln -s /opt/apache-ant/lib/ant.jar lib/ant.jar
+ ln -s /opt/apache-ant/lib/ant-launcher.jar lib/ant-launcher.jar
+ ln -s /usr/share/java/... lib/args4j.jar
+ ln -s /usr/share/java/... lib/caja-r4314.jar
+ ln -s /usr/share/java/... lib/guava.jar
+ ln -s /usr/share/java/jarjar.jar lib/jarjar.jar
+ ln -s /usr/share/java/... lib/json.jar
+ ln -s /usr/share/java/... lib/jsr305.jar
+ ln -s /usr/share/java/junit.jar lib/junit.jar
+ ln -s /usr/share/java/protobuf.jar lib/protobuf-java.jar
+ # I think lib/rhino/.../module.jar autogenerates
+ ln -s /... tools/maven-ant-tasks-2.1.3.jar
+
+ ant jar
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ :
+}
+
+md5sums=('SKIP')
diff --git a/java/not-working/closure-compiler/TODO b/java/not-working/closure-compiler/TODO
new file mode 100644
index 000000000..8527a4898
--- /dev/null
+++ b/java/not-working/closure-compiler/TODO
@@ -0,0 +1,2 @@
+* Has plenty of missing dependencies (most of the 'not-working' folder)
+* package() has not been written
diff --git a/java/not-working/java-asm4/PKGBUILD b/java/not-working/java-asm4/PKGBUILD
new file mode 100644
index 000000000..3db06dddc
--- /dev/null
+++ b/java/not-working/java-asm4/PKGBUILD
@@ -0,0 +1,17 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgver=4.1
+. ../java-asm2/common.sh
+depends+=('java-bnd')
+
+####
+
+pkgrel=5
+_checksource_ignore=(src/org/objectweb/asm/optimizer/jdk{1.2.2_017,1.3.1_19}.txt.gz)
+
+mksource() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ rm examples/jasmin/test/jasmin.jar
+}
+
+md5sums=('cbfd7445edc517e0867ad410e48cb106')
diff --git a/java/not-working/java-asm4/TODO b/java/not-working/java-asm4/TODO
new file mode 100644
index 000000000..563c88bc9
--- /dev/null
+++ b/java/not-working/java-asm4/TODO
@@ -0,0 +1 @@
+Depends on java-bnd, which is not packaged \ No newline at end of file
diff --git a/java/not-working/java-guava/PKGBUILD b/java/not-working/java-guava/PKGBUILD
new file mode 100644
index 000000000..0250e7183
--- /dev/null
+++ b/java/not-working/java-guava/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+_pkgname=guava
+pkgname=java-guava
+pkgver=13.0.1
+pkgdesc="Google Core Libraries for Java."
+url="https://code.google.com/p/guava-libraries/"
+license=('Apache2')
+
+pkgrel=1
+arch=('any')
+depends=('java-runtime>=5')
+makedepends=('java-runtime>=6' 'maven' 'junit-truth' 'jh')
+conflicts=('openjdk6') # OpenJDK bug 100167 conflicts
+source=("$pkgname::git+https://code.google.com/p/guava-libraries/#tag=v$pkgver")
+
+mksource() {
+ cd "$srcdir/$pkgname"
+ rm guava/lib/*.jar
+ rm guava-test/lib/*.jar
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+ eval `jh mksource`
+
+ ln -s /usr/share/java/junit-truth.jar guava-tests/lib/libtruth.java
+
+ mvn package
+}
+
+package() {
+ :
+}
diff --git a/java/not-working/java-guava/TODO b/java/not-working/java-guava/TODO
new file mode 100644
index 000000000..ee0a18042
--- /dev/null
+++ b/java/not-working/java-guava/TODO
@@ -0,0 +1,2 @@
+* depends on junit-truth, which does not build yet
+* package() hasn't been written
diff --git a/java/not-working/junit-truth/PKGBUILD b/java/not-working/junit-truth/PKGBUILD
new file mode 100644
index 000000000..61a0ee469
--- /dev/null
+++ b/java/not-working/junit-truth/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgname=junit-truth
+pkgdesc="Assertion/Proposition framework for Java unit tests."
+url="https://github.com/truth0/truth"
+license=('Apache2')
+
+#_pkgver=0.5.0-beta1
+#pkgver=${_pkgver//-/.}
+#_tag=v${_pkgver}
+
+#pkgver=0.7.0
+#_tag=truth-rel-${pkgver//./-}
+
+#pkgver=0.8
+#_tag=truth-${pkgver}
+
+#pkgver=0.9
+#_tag=release_${pkgver//./_}
+
+pkgver=0.10
+_tag=release_${pkgver//./_}
+
+pkgrel=1
+arch=('any')
+depends=('junit')
+makedepends=('maven' 'jh')
+conflicts=('openjdk6') # OpenJDK bug 100167 conflicts
+source=("$pkgname::git://github.com/truth0/truth.git#tag=$tag")
+
+build() {
+ cd "${srcdir}/${pkgname}"
+ jh checksource
+ mvn package
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+ install -d "${pkgdir}"/usr/share/java/${pkgname}
+ JAR=${pkgname}-${pkgver}.jar
+ install -Dm 644 target/${JAR} "${pkgdir}"/usr/share/java/${pkgname}
+ ln -s ${pkgname}/${JAR} "${pkgdir}"/usr/share/java/${pkgname}.jar
+}
+
+md5sums=('SKIP')
diff --git a/java/not-working/junit-truth/TODO b/java/not-working/junit-truth/TODO
new file mode 100644
index 000000000..d21b3e472
--- /dev/null
+++ b/java/not-working/junit-truth/TODO
@@ -0,0 +1 @@
+has unpackaged dependencies
diff --git a/java/not-working/protobuf/PKGBUILD b/java/not-working/protobuf/PKGBUILD
new file mode 100644
index 000000000..699bde0cf
--- /dev/null
+++ b/java/not-working/protobuf/PKGBUILD
@@ -0,0 +1,99 @@
+# Maintainer: Thomas S Hatch <thatch45@gmail.com>
+# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
+# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgbase=protobuf
+pkgname=('protobuf' 'python2-protobuf' 'java-protobuf')
+pkgver=2.4.1
+pkgrel=2.1
+pkgdesc="A way of encoding structured data in an efficient yet extensible format"
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/protobuf/"
+license=('APACHE')
+depends=('gcc-libs' 'zlib')
+makedepends=('python2' 'python2-distribute' 'java-environment')
+options=(!libtool)
+source=(http://$pkgname.googlecode.com/files/$pkgname-$pkgver.tar.bz2)
+md5sums=('ed436802019c9e1f40cc750eaf78f318')
+
+####
+
+build() {
+ build_protobuf
+ build_python2-protobuf
+ build_java-protobuf
+}
+
+check() {
+ check_protobuf
+ check_python2-protobuf
+ check_java-protobuf
+}
+
+package() {
+ package_protobuf
+ package_python2-protobuf
+ package_java-protobuf
+}
+
+####
+
+build_protobuf() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --prefix=/usr --disable-static
+ make
+}
+
+check_protobuf() {
+ cd $srcdir/$pkgname-$pkgver
+ make check
+}
+
+package_protobuf() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+}
+
+####
+
+build_python2-protobuf() {
+ cd $srcdir/$pkgname-$pkgver/python
+ python2 setup.py build
+}
+
+check_python2-protobuf() {
+ cd $srcdir/$pkgname-$pkgver/python
+ python2 setup.py test
+}
+
+package_python2-protobuf() {
+ pkgdesc="protobuf python2 API"
+ replaces=('protobuf-python')
+ provides=("protobuf-python=${pkgver}")
+ depends=("python2" "protobuf=${pkgver}")
+
+ cd $srcdir/protobuf-$pkgver/python
+ python2 setup.py install --prefix=/usr --root $pkgdir
+}
+
+####
+
+build_java-protobuf() {
+ cd $srcdir/$pkgname-$pkgver/java
+ mvn compile
+}
+
+check_java-protobuf() {
+ cd $srcdir/$pkgname-$pkgver/java
+ mvn test
+}
+
+package_java-protobuf() {
+ pkgdesc="protobuf Java API"
+ replaces=('protobuf-java')
+ provides=("protobuf-java=${pkgver}")
+ depends=("java-runtime" "protobuf=${pkgver}")
+
+ cd $srcdir/$pkgname-$pkgver/java
+ :
+}
diff --git a/java/not-working/protobuf/TODO b/java/not-working/protobuf/TODO
new file mode 100644
index 000000000..6a126b757
--- /dev/null
+++ b/java/not-working/protobuf/TODO
@@ -0,0 +1,5 @@
+* Missing dependencies:
+ * junit:junit:4.4 (4.10 is packaged, patch to use 4.10?)
+ * org.easymock:easymock:2.2
+ * org.easymock:easymockclassextension:2.2.1
+* package_java-protobuf() has not been written
diff --git a/libre/blender-libre/PKGBUILD b/libre/blender-libre/PKGBUILD
index fcaa11298..2800d9147 100644
--- a/libre/blender-libre/PKGBUILD
+++ b/libre/blender-libre/PKGBUILD
@@ -1,11 +1,24 @@
# $Id$
# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
-pkgname=blender-libre
+spacenav=true
+pkgbase=blender-libre
+pkgflag=-libre
+if [ $spacenav == true ]; then
+ pkgname=(
+ blender-spacenav-libre
+ )
+ spndesc=' (with spacenav support)'
+else
+ pkgname=(
+ blender-libre
+ )
+ spndesc=''
+fi
+pkgdesc="A fully integrated 3D graphics creation suite, without nonfree cuda-toolkit and redcode image format support$spndesc"
pkgver=2.64a
-pkgrel=1
+pkgrel=2
pkgaev=5
-pkgdesc='A fully integrated 3D graphics creation suite, without nonfree cuda-toolkit support'
arch=(
i686
x86_64
@@ -14,55 +27,121 @@ arch=(
license=(
GPL
)
-url=http://www.${pkgname%-libre}.org
+url="http://www.${pkgbase%$pkgflag}.org"
depends=(
- boost-libs
- desktop-file-utils
+ # used by ldd software "glibc package software"
+ # dependencies tree of binaries software (root) #
ffmpeg
fftw
freetype2
- glew
- glu
- hicolor-icon-theme
jack
- libgl
libpng
- libsndfile
libtiff
openal
- opencollada
- opencolorio
- openexr
openimageio
- python
+ opencolorio
+ # external softwares dependencies #
+ opencollada
+ # softwares dependencies for desktop files and mime types #
+ desktop-file-utils
+ hicolor-icon-theme
shared-mime-info
xdg-utils
+ # dependencies tree of binaries software (child) #
+ #alsa-lib
+ #boost-libs
+ #bzip2
+ #celt
+ #dbus-core
+ #flac
+ #gcc-libs
+ #glew
+ #glibc
+ #glu
+ #gsm
+ #icu
+ #ilmbase
+ #json-c
+ #lame
+ #libasyncns
+ #libdrm
+ #libgl
+ #libglapi
+ #libice
+ #libjpeg-turbo
+ #libogg
+ #libpulse
+ #libsndfile
+ #libsm
+ #libtheora
+ #libva
+ #libvorbis
+ #libvpx
+ #libx11
+ #libxau
+ #libxcb
+ #libxdamage
+ #libxdmcp
+ #libxext
+ #libxfixes
+ #libxi
+ #libxml2
+ #libxmu
+ #libxt
+ #libxxf86vm
+ #ocr
+ #openexr
+ #opencore-amr
+ #openjpeg
+ #openssl
+ #pcre
+ #python
+ #rtmpdump
+ #sdl-libre
+ #schroedinger
+ #speex
+ #util-linux
+ #x264
+ #xvidcore
+ #xz
+ #v4l-utils
+ #zlib
+)
+if [ $spacenav == true ]; then
+ depends+=(
+ # dependencies tree of binaries software (root) #
+ libspnav
+ )
+fi
+optdepends=(
+ 'bullet: for Physics Simulation in BGE'
)
makedepends=(
+ # make dependencies tree (root) #
mesa
boost
cmake
subversion
)
-replaces=(
- ${pkgname%-libre}
+provides=(
+ ${pkgbase%$pkgflag}=$pkgaev:$pkgver
)
conflicts=(
- ${pkgname%-libre}
+ ${pkgbase%$pkgflag}
)
-provides=(
- ${pkgname%-libre}=$pkgaev:$pkgver
+replaces=(
+ ${pkgbase%$pkgflag}
)
-install=${pkgname%-libre}.install
+install=$pkgbase.install
source=(
- http://download.${pkgname%-libre}.org/source/${pkgname%-libre}-$pkgver.tar.gz
+ "http://download.${pkgbase%$pkgflag}.org/source/${pkgbase%$pkgflag}-$pkgver.tar.gz"
)
sha512sums=(
77d171a36f1c87a82613ed7601df9cef444069a2a6600e05260607e9a2009c292068a2b4753f3cbd53d820cdc8d9ed88ddd1685f20647b943f75bfbeb905b9b5
)
build() {
- cd $srcdir/${pkgname%-libre}-$pkgver
+ cd $srcdir/${pkgbase%$pkgflag}-$pkgver
mkdir build
cd build
@@ -72,10 +151,10 @@ build() {
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DPYTHON_INCLUDE_DIRS=/usr/include/python3.2mu \
+ -DPYTHON_INCLUDE_DIRS=/usr/include/python3.3m \
-DPYTHON_LIBPATH=/usr/lib \
- -DPYTHON_LIBRARY=python3.2mu \
- -DPYTHON_VERSION=3.2 \
+ -DPYTHON_LIBRARY=python3.3m \
+ -DPYTHON_VERSION=3.3 \
$DSUPPORT_SSE2_BUILD \
-DWITH_CODEC_FFMPEG=ON \
-DWITH_CODEC_SNDFILE=ON \
@@ -98,7 +177,7 @@ build() {
}
package() {
- cd $srcdir/${pkgname%-libre}-$pkgver/build
+ cd $srcdir/${pkgbase%$pkgflag}-$pkgver/build
make DESTDIR=$pkgdir install
- python -m compileall $pkgdir/usr/share/blender
+ python -m compileall $pkgdir/usr/share/${pkgbase%$pkgflag}
}
diff --git a/libre/blender-libre/blender-libre.install b/libre/blender-libre/blender-libre.install
new file mode 100755
index 000000000..724bfce00
--- /dev/null
+++ b/libre/blender-libre/blender-libre.install
@@ -0,0 +1,13 @@
+post_install() {
+ update-desktop-database -q
+ update-mime-database usr/share/mime &> /dev/null
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/libre/django13/PKGBUILD b/libre/django13/PKGBUILD
new file mode 100644
index 000000000..554acccc7
--- /dev/null
+++ b/libre/django13/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id$
+# Maintainer: Dan McGee <dan@archlinux.org>
+# Contributor: Shahar Weiss <sweiss4@gmx.net>
+
+pkgname=django
+pkgver=1.3.1
+pkgrel=2
+pkgdesc="A high-level Python Web framework."
+arch=('any')
+license=('BSD')
+url="http://www.djangoproject.com/"
+depends=('python2')
+makedepends=('python2-distribute')
+optdepends=('mysql-python: for MySQL backend'
+ 'python2-psycopg2: for PostgreSQL backend')
+source=("https://www.djangoproject.com/m/releases/1.3/Django-$pkgver.tar.gz"
+ diff-django_branches_releases_1.3.X-from-16768-to-17460.diff)
+md5sums=('62d8642fd06b9a0bf8544178f8500767'
+ 'd09d8f9e156b9aa1b580a1b43209b99f')
+sha256sums=('af9118c4e8a063deb0b8cda901fcff2b805e7cf496c93fd43507163f3cde156b'
+ '8e08b5b5bbe7c042a1df4d5615a9d068ec6718fd00bef627c0a9a9e48ee58c15')
+
+build() {
+ cd "$srcdir/Django-$pkgver"
+ patch -Np1 -i ../diff-django_branches_releases_1.3.X-from-16768-to-17460.diff
+ python2 setup.py build
+}
+
+package() {
+ cd "$srcdir/Django-$pkgver"
+ python2 setup.py install --root="$pkgdir" --optimize=1
+
+ install -Dm644 extras/django_bash_completion \
+ "$pkgdir"/etc/bash_completion.d/django
+
+ find "$pkgdir"/usr/lib/python2.7/site-packages/django/ -name '*.py' | \
+ xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"
+
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+_pkgname=$pkgname
+pkgname=django13
+pkgdesc+=" (legacy version for ParabolaWeb)"
+pkgrel+=.1
+provides=("$_pkgname=$pkgver")
+conflicts=("$_pkgname")
diff --git a/libre/django13/PKGBUILD.orig b/libre/django13/PKGBUILD.orig
new file mode 100644
index 000000000..c593c5626
--- /dev/null
+++ b/libre/django13/PKGBUILD.orig
@@ -0,0 +1,40 @@
+# $Id$
+# Maintainer: Dan McGee <dan@archlinux.org>
+# Contributor: Shahar Weiss <sweiss4@gmx.net>
+
+pkgname=django
+pkgver=1.3.1
+pkgrel=2
+pkgdesc="A high-level Python Web framework."
+arch=('any')
+license=('BSD')
+url="http://www.djangoproject.com/"
+depends=('python2')
+makedepends=('python2-distribute')
+optdepends=('mysql-python: for MySQL backend'
+ 'python2-psycopg2: for PostgreSQL backend')
+source=("http://media.djangoproject.com/releases/1.3/Django-$pkgver.tar.gz"
+ diff-django_branches_releases_1.3.X-from-16771-to-17460.diff)
+md5sums=('62d8642fd06b9a0bf8544178f8500767'
+ 'ea3d6cbde2fc2332ffe7f901cb60a974')
+sha256sums=('af9118c4e8a063deb0b8cda901fcff2b805e7cf496c93fd43507163f3cde156b'
+ '84e2652a8249e58fdbbd43bce7cd8d6bb2159058be6a675ebe15661ca3ee9ffc')
+
+build() {
+ cd "$srcdir/Django-$pkgver"
+ patch -Np0 < ../diff-django_branches_releases_1.3.X-from-16771-to-17460.diff
+ python2 setup.py build
+}
+
+package() {
+ cd "$srcdir/Django-$pkgver"
+ python2 setup.py install --root="$pkgdir" --optimize=1
+
+ install -Dm644 extras/django_bash_completion \
+ "$pkgdir"/etc/bash_completion.d/django
+
+ find "$pkgdir"/usr/lib/python2.7/site-packages/django/ -name '*.py' | \
+ xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"
+
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/libre/django13/diff-django_branches_releases_1.3.X-from-16768-to-17460.diff b/libre/django13/diff-django_branches_releases_1.3.X-from-16768-to-17460.diff
new file mode 100644
index 000000000..c6819c1ab
--- /dev/null
+++ b/libre/django13/diff-django_branches_releases_1.3.X-from-16768-to-17460.diff
@@ -0,0 +1,1573 @@
+diff --git a/README b/README
+index c7d225c..47bfd33 100644
+--- a/README
++++ b/README
+@@ -28,7 +28,7 @@ http://code.djangoproject.com/newticket
+ To get more help:
+
+ * Join the #django channel on irc.freenode.net. Lots of helpful people
+- hang out there. Read the archives at http://botland.oebfare.com/logger/django/.
++ hang out there. Read the archives at http://django-irc-logs.com/.
+
+ * Join the django-users mailing list, or read the archives, at
+ http://groups.google.com/group/django-users.
+diff --git a/django/contrib/admin/media/css/forms.css b/django/contrib/admin/media/css/forms.css
+index 1cedf24..35d0ed7 100644
+--- a/django/contrib/admin/media/css/forms.css
++++ b/django/contrib/admin/media/css/forms.css
+@@ -352,9 +352,3 @@ fieldset.monospace textarea {
+ .empty-form {
+ display: none;
+ }
+-
+-/* IE7 specific bug fixes */
+-
+-.submit-row input {
+- float: right;
+-}
+\ No newline at end of file
+diff --git a/django/contrib/gis/db/backends/spatialite/compiler.py b/django/contrib/gis/db/backends/spatialite/compiler.py
+deleted file mode 100644
+index 3f81ae6..0000000
+--- a/django/contrib/gis/db/backends/spatialite/compiler.py
++++ /dev/null
+@@ -1,32 +0,0 @@
+-from django.db.backends.util import typecast_timestamp
+-from django.db.models.sql import compiler
+-from django.db.models.sql.constants import MULTI
+-from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler
+-
+-SQLCompiler = compiler.SQLCompiler
+-
+-class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler):
+- pass
+-
+-class SQLInsertCompiler(compiler.SQLInsertCompiler, GeoSQLCompiler):
+- pass
+-
+-class SQLDeleteCompiler(compiler.SQLDeleteCompiler, GeoSQLCompiler):
+- pass
+-
+-class SQLUpdateCompiler(compiler.SQLUpdateCompiler, GeoSQLCompiler):
+- pass
+-
+-class SQLAggregateCompiler(compiler.SQLAggregateCompiler, GeoSQLCompiler):
+- pass
+-
+-class SQLDateCompiler(compiler.SQLDateCompiler, GeoSQLCompiler):
+- """
+- This is overridden for GeoDjango to properly cast date columns, see #16757.
+- """
+- def results_iter(self):
+- offset = len(self.query.extra_select)
+- for rows in self.execute_sql(MULTI):
+- for row in rows:
+- date = typecast_timestamp(str(row[offset]))
+- yield date
+diff --git a/django/contrib/gis/db/backends/spatialite/creation.py b/django/contrib/gis/db/backends/spatialite/creation.py
+index c107d96..ee5f9db 100644
+--- a/django/contrib/gis/db/backends/spatialite/creation.py
++++ b/django/contrib/gis/db/backends/spatialite/creation.py
+@@ -56,14 +56,6 @@ class SpatiaLiteCreation(DatabaseCreation):
+ interactive=False,
+ database=self.connection.alias)
+
+- # One effect of calling syncdb followed by flush is that the id of the
+- # default site may or may not be 1, depending on how the sequence was
+- # reset. If the sites app is loaded, then we coerce it.
+- from django.db.models import get_model
+- Site = get_model('sites', 'Site')
+- if Site is not None and Site.objects.using(self.connection.alias).count() == 1:
+- Site.objects.using(self.connection.alias).update(id=settings.SITE_ID)
+-
+ from django.core.cache import get_cache
+ from django.core.cache.backends.db import BaseDatabaseCache
+ for cache_alias in settings.CACHES:
+diff --git a/django/contrib/gis/db/backends/spatialite/operations.py b/django/contrib/gis/db/backends/spatialite/operations.py
+index 1dc612c..e6f8409 100644
+--- a/django/contrib/gis/db/backends/spatialite/operations.py
++++ b/django/contrib/gis/db/backends/spatialite/operations.py
+@@ -48,7 +48,7 @@ def get_dist_ops(operator):
+ return (SpatiaLiteDistance(operator),)
+
+ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations):
+- compiler_module = 'django.contrib.gis.db.backends.spatialite.compiler'
++ compiler_module = 'django.contrib.gis.db.models.sql.compiler'
+ name = 'spatialite'
+ spatialite = True
+ version_regex = re.compile(r'^(?P<major>\d)\.(?P<minor1>\d)\.(?P<minor2>\d+)')
+diff --git a/django/contrib/gis/db/models/sql/compiler.py b/django/contrib/gis/db/models/sql/compiler.py
+index 782ce78..405a000 100644
+--- a/django/contrib/gis/db/models/sql/compiler.py
++++ b/django/contrib/gis/db/models/sql/compiler.py
+@@ -1,7 +1,7 @@
+ from itertools import izip
+-from django.db.backends.util import truncate_name
++from django.db.backends.util import truncate_name, typecast_timestamp
+ from django.db.models.sql import compiler
+-from django.db.models.sql.constants import TABLE_NAME
++from django.db.models.sql.constants import TABLE_NAME, MULTI
+ from django.db.models.sql.query import get_proxied_model
+
+ SQLCompiler = compiler.SQLCompiler
+@@ -194,7 +194,7 @@ class GeoSQLCompiler(compiler.SQLCompiler):
+ # We resolve the rest of the columns if we're on Oracle or if
+ # the `geo_values` attribute is defined.
+ for value, field in map(None, row[index_start:], fields):
+- values.append(self.query.convert_values(value, field, connection=self.connection))
++ values.append(self.query.convert_values(value, field, self.connection))
+ else:
+ values.extend(row[index_start:])
+ return tuple(values)
+@@ -275,4 +275,24 @@ class SQLAggregateCompiler(compiler.SQLAggregateCompiler, GeoSQLCompiler):
+ pass
+
+ class SQLDateCompiler(compiler.SQLDateCompiler, GeoSQLCompiler):
+- pass
++ """
++ This is overridden for GeoDjango to properly cast date columns, since
++ `GeoQuery.resolve_columns` is used for spatial values.
++ See #14648, #16757.
++ """
++ def results_iter(self):
++ if self.connection.ops.oracle:
++ from django.db.models.fields import DateTimeField
++ fields = [DateTimeField()]
++ else:
++ needs_string_cast = self.connection.features.needs_datetime_string_cast
++
++ offset = len(self.query.extra_select)
++ for rows in self.execute_sql(MULTI):
++ for row in rows:
++ date = row[offset]
++ if self.connection.ops.oracle:
++ date = self.resolve_columns(row, fields)[offset]
++ elif needs_string_cast:
++ date = typecast_timestamp(str(date))
++ yield date
+diff --git a/django/contrib/gis/tests/relatedapp/fixtures/initial_data.json.gz b/django/contrib/gis/tests/relatedapp/fixtures/initial_data.json.gz
+index 68bf54c..8937637 100644
+Binary files a/django/contrib/gis/tests/relatedapp/fixtures/initial_data.json.gz and b/django/contrib/gis/tests/relatedapp/fixtures/initial_data.json.gz differ
+diff --git a/django/contrib/gis/tests/relatedapp/models.py b/django/contrib/gis/tests/relatedapp/models.py
+index 2e9a62b..aec4e15 100644
+--- a/django/contrib/gis/tests/relatedapp/models.py
++++ b/django/contrib/gis/tests/relatedapp/models.py
+@@ -36,6 +36,7 @@ class Parcel(models.Model):
+ # These use the GeoManager but do not have any geographic fields.
+ class Author(models.Model):
+ name = models.CharField(max_length=100)
++ dob = models.DateField()
+ objects = models.GeoManager()
+
+ class Article(models.Model):
+diff --git a/django/contrib/gis/tests/relatedapp/tests.py b/django/contrib/gis/tests/relatedapp/tests.py
+index 250783b..1a6197c 100644
+--- a/django/contrib/gis/tests/relatedapp/tests.py
++++ b/django/contrib/gis/tests/relatedapp/tests.py
+@@ -1,3 +1,4 @@
++from datetime import date
+ from django.test import TestCase
+
+ from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint
+@@ -281,4 +282,11 @@ class RelatedGeoModelTest(TestCase):
+ # evaluated as list generation swallows TypeError in CPython.
+ sql = str(qs.query)
+
++ def test16_annotated_date_queryset(self):
++ "Ensure annotated date querysets work if spatial backend is used. See #14648."
++ birth_years = [dt.year for dt in
++ list(Author.objects.annotate(num_books=Count('books')).dates('dob', 'year'))]
++ birth_years.sort()
++ self.assertEqual([1950, 1974], birth_years)
++
+ # TODO: Related tests for KML, GML, and distance lookups.
+diff --git a/django/contrib/sites/management.py b/django/contrib/sites/management.py
+index 1987274..9bf5a14 100644
+--- a/django/contrib/sites/management.py
++++ b/django/contrib/sites/management.py
+@@ -3,15 +3,34 @@ Creates the default Site object.
+ """
+
+ from django.db.models import signals
++from django.db import connections
++from django.db import router
+ from django.contrib.sites.models import Site
+ from django.contrib.sites import models as site_app
++from django.core.management.color import no_style
+
+ def create_default_site(app, created_models, verbosity, db, **kwargs):
+- if Site in created_models:
++ # Only create the default sites in databases where Django created the table
++ if Site in created_models and router.allow_syncdb(db, Site) :
++ # The default settings set SITE_ID = 1, and some tests in Django's test
++ # suite rely on this value. However, if database sequences are reused
++ # (e.g. in the test suite after flush/syncdb), it isn't guaranteed that
++ # the next id will be 1, so we coerce it. See #15573 and #16353. This
++ # can also crop up outside of tests - see #15346.
+ if verbosity >= 2:
+ print "Creating example.com Site object"
+- s = Site(domain="example.com", name="example.com")
+- s.save(using=db)
++ Site(pk=1, domain="example.com", name="example.com").save(using=db)
++
++ # We set an explicit pk instead of relying on auto-incrementation,
++ # so we need to reset the database sequence.
++ sequence_sql = connections[db].ops.sequence_reset_sql(no_style(), [Site])
++ if sequence_sql:
++ if verbosity >= 2:
++ print "Resetting sequence"
++ cursor = connections[db].cursor()
++ for command in sequence_sql:
++ cursor.execute(command)
++
+ Site.objects.clear_cache()
+
+ signals.post_syncdb.connect(create_default_site, sender=site_app)
+diff --git a/django/contrib/sites/tests.py b/django/contrib/sites/tests.py
+index 17ab1f2..828badb 100644
+--- a/django/contrib/sites/tests.py
++++ b/django/contrib/sites/tests.py
+@@ -15,6 +15,12 @@ class SitesFrameworkTests(TestCase):
+ def tearDown(self):
+ Site._meta.installed = self.old_Site_meta_installed
+
++ def test_save_another(self):
++ # Regression for #17415
++ # On some backends the sequence needs reset after save with explicit ID.
++ # Test that there is no sequence collisions by saving another site.
++ Site(domain="example2.com", name="example2.com").save()
++
+ def test_site_manager(self):
+ # Make sure that get_current() does not return a deleted Site object.
+ s = Site.objects.get_current()
+diff --git a/django/core/management/commands/shell.py b/django/core/management/commands/shell.py
+index e4ce462..039ebb8 100644
+--- a/django/core/management/commands/shell.py
++++ b/django/core/management/commands/shell.py
+@@ -13,9 +13,8 @@ class Command(NoArgsCommand):
+
+ def ipython(self):
+ try:
+- from IPython.frontend.terminal.embed import TerminalInteractiveShell
+- shell = TerminalInteractiveShell()
+- shell.mainloop()
++ from IPython import embed
++ embed()
+ except ImportError:
+ # IPython < 0.11
+ # Explicitly pass an empty list as arguments, because otherwise
+diff --git a/django/core/validators.py b/django/core/validators.py
+index a93c6ac..9dcc2bc 100644
+--- a/django/core/validators.py
++++ b/django/core/validators.py
+@@ -147,7 +147,8 @@ class EmailValidator(RegexValidator):
+
+ email_re = re.compile(
+ r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom
+- r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"' # quoted-string
++ # quoted-string, see also http://tools.ietf.org/html/rfc2822#section-3.2.5
++ r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"'
+ r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$', re.IGNORECASE) # domain
+ validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
+
+diff --git a/django/db/backends/creation.py b/django/db/backends/creation.py
+index 57e3f77..ef594b7 100644
+--- a/django/db/backends/creation.py
++++ b/django/db/backends/creation.py
+@@ -374,15 +374,6 @@ class BaseDatabaseCreation(object):
+ verbosity=max(verbosity - 1, 0),
+ interactive=False,
+ database=self.connection.alias)
+-
+- # One effect of calling syncdb followed by flush is that the id of the
+- # default site may or may not be 1, depending on how the sequence was
+- # reset. If the sites app is loaded, then we coerce it.
+- from django.db.models import get_model
+- if 'django.contrib.sites' in settings.INSTALLED_APPS:
+- Site = get_model('sites', 'Site')
+- if Site is not None and Site.objects.using(self.connection.alias).count() == 1:
+- Site.objects.using(self.connection.alias).update(id=settings.SITE_ID)
+
+ from django.core.cache import get_cache
+ from django.core.cache.backends.db import BaseDatabaseCache
+diff --git a/django/http/__init__.py b/django/http/__init__.py
+index 68ac45d..07e5a46 100644
+--- a/django/http/__init__.py
++++ b/django/http/__init__.py
+@@ -92,7 +92,7 @@ else:
+ if not _cookie_allows_colon_in_names:
+ def load(self, rawdata, ignore_parse_errors=False):
+ if ignore_parse_errors:
+- self.bad_cookies = []
++ self.bad_cookies = set()
+ self._BaseCookie__set = self._loose_set
+ super(SimpleCookie, self).load(rawdata)
+ if ignore_parse_errors:
+@@ -106,8 +106,8 @@ else:
+ try:
+ self._strict_set(key, real_value, coded_value)
+ except Cookie.CookieError:
+- self.bad_cookies.append(key)
+- dict.__setitem__(self, key, None)
++ self.bad_cookies.add(key)
++ dict.__setitem__(self, key, Cookie.Morsel())
+
+
+ class CompatCookie(SimpleCookie):
+diff --git a/django/http/utils.py b/django/http/utils.py
+index 5eea239..0180864 100644
+--- a/django/http/utils.py
++++ b/django/http/utils.py
+@@ -76,7 +76,8 @@ def fix_IE_for_vary(request, response):
+
+ # The first part of the Content-Type field will be the MIME type,
+ # everything after ';', such as character-set, can be ignored.
+- if response['Content-Type'].split(';')[0] not in safe_mime_types:
++ mime_type = response.get('Content-Type', '').partition(';')[0]
++ if mime_type not in safe_mime_types:
+ try:
+ del response['Vary']
+ except KeyError:
+diff --git a/docs/howto/deployment/modpython.txt b/docs/howto/deployment/modpython.txt
+index f5030e9..693f942 100644
+--- a/docs/howto/deployment/modpython.txt
++++ b/docs/howto/deployment/modpython.txt
+@@ -293,11 +293,14 @@ of the admin app, but this is not the case when you use any other server
+ arrangement. You're responsible for setting up Apache, or whichever media
+ server you're using, to serve the admin files.
+
+-The admin files live in (:file:`django/contrib/admin/static/admin`) of the
++The admin files live in (:file:`django/contrib/admin/media/admin`) of the
+ Django distribution.
+
+-We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle
+-the admin files, but here are two other approaches:
++We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle the
++admin files (this means using the :djadmin:`collectstatic` management command
++to collect the static files in :setting:`STATIC_ROOT`, and then configuring
++your webserver to serve :setting:`STATIC_ROOT` at :setting:`STATIC_URL`), but
++here are two other approaches:
+
+ 1. Create a symbolic link to the admin static files from within your
+ document root.
+diff --git a/docs/howto/deployment/modwsgi.txt b/docs/howto/deployment/modwsgi.txt
+index de3a5b6..fdf9d27 100644
+--- a/docs/howto/deployment/modwsgi.txt
++++ b/docs/howto/deployment/modwsgi.txt
+@@ -127,11 +127,14 @@ of the admin app, but this is not the case when you use any other server
+ arrangement. You're responsible for setting up Apache, or whichever media
+ server you're using, to serve the admin files.
+
+-The admin files live in (:file:`django/contrib/admin/static/admin`) of the
++The admin files live in (:file:`django/contrib/admin/media/admin`) of the
+ Django distribution.
+
+-We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle
+-the admin files, but here are two other approaches:
++We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle the
++admin files (this means using the :djadmin:`collectstatic` management command
++to collect the static files in :setting:`STATIC_ROOT`, and then configuring
++your webserver to serve :setting:`STATIC_ROOT` at :setting:`STATIC_URL`), but
++here are two other approaches:
+
+ 1. Create a symbolic link to the admin static files from within your
+ document root.
+diff --git a/docs/index.txt b/docs/index.txt
+index 0cf066e..20a7cec 100644
+--- a/docs/index.txt
++++ b/docs/index.txt
+@@ -28,7 +28,7 @@ Having trouble? We'd like to help!
+ .. _archives of the django-users mailing list: http://groups.google.com/group/django-users/
+ .. _post a question: http://groups.google.com/group/django-users/
+ .. _#django IRC channel: irc://irc.freenode.net/django
+-.. _IRC logs: http://botland.oebfare.com/logger/django/
++.. _IRC logs: http://django-irc-logs.com/
+ .. _ticket tracker: http://code.djangoproject.com/
+
+ First steps
+diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
+index 3f0f998..ca29d15 100644
+--- a/docs/internals/deprecation.txt
++++ b/docs/internals/deprecation.txt
+@@ -177,6 +177,12 @@ their deprecation, as per the :ref:`Django deprecation policy
+ required to end with a trailing slash to ensure there is a consistent
+ way to combine paths in templates.
+
++ * Translations located under the so-called *project path* will be
++ ignored during the translation building process performed at runtime.
++ The :setting:`LOCALE_PATHS` setting can be used for the same task by
++ including the filesystem path to a ``locale`` directory containing
++ non-app-specific translations in its value.
++
+ * 2.0
+ * ``django.views.defaults.shortcut()``. This function has been moved
+ to ``django.contrib.contenttypes.views.shortcut()`` as part of the
+diff --git a/docs/internals/release-process.txt b/docs/internals/release-process.txt
+index 2a56f0b..799a59e 100644
+--- a/docs/internals/release-process.txt
++++ b/docs/internals/release-process.txt
+@@ -99,6 +99,13 @@ varying levels:
+ * Security fixes will be applied to the current trunk and the previous two
+ minor releases.
+
++* Documentation fixes will generally be more freely backported to the last
++ release branch (at the discretion of the committer), and don't need to meet
++ the "critical fixes only" bar as it's highly advantageous to have the docs
++ for the last release be up-to-date and correct, and the downside of
++ backporting (risk of introducing regressions) is much less of a concern
++ with doc fixes.
++
+ As a concrete example, consider a moment in time halfway between the release of
+ Django 1.3 and 1.4. At this point in time:
+
+@@ -111,6 +118,9 @@ Django 1.3 and 1.4. At this point in time:
+ ``1.2.X`` branch. Security fixes will trigger the release of ``1.3.1``,
+ ``1.2.1``, etc.
+
++* Documentation fixes will be applied to trunk, and if easily backported, to
++ the ``1.3.X`` branch.
++
+ .. _release-process:
+
+ Release process
+diff --git a/docs/intro/index.txt b/docs/intro/index.txt
+index bc61be7..19290a5 100644
+--- a/docs/intro/index.txt
++++ b/docs/intro/index.txt
+@@ -31,6 +31,6 @@ place: read this material to quickly get up and running.
+
+ .. _python: http://python.org/
+ .. _list of Python resources for non-programmers: http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
+- .. _dive into python: http://diveintopython.org/
++ .. _dive into python: http://diveintopython.net/
+ .. _dead-tree version: http://www.amazon.com/exec/obidos/ASIN/1590593561/ref=nosim/jacobian20
+ .. _books about Python: http://wiki.python.org/moin/PythonBooks
+\ No newline at end of file
+diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt
+index 2f2e049..4dc1e5c 100644
+--- a/docs/intro/tutorial01.txt
++++ b/docs/intro/tutorial01.txt
+@@ -59,7 +59,7 @@ This will create a ``mysite`` directory in your current directory.
+ can be run as a program. To do this, open Terminal.app and navigate (using
+ the ``cd`` command) to the directory where :doc:`django-admin.py
+ </ref/django-admin>` is installed, then run the command
+- ``chmod +x django-admin.py``.
++ ``sudo chmod +x django-admin.py``.
+
+ .. note::
+
+@@ -692,10 +692,9 @@ Save these changes and start a new Python interactive shell by running
+
+ For more information on model relations, see :doc:`Accessing related objects
+ </ref/models/relations>`. For more on how to use double underscores to perform
+-field lookups via the API, see `Field lookups`__. For full details on the
+-database API, see our :doc:`Database API reference </topics/db/queries>`.
+-
+-__ http://docs.djangoproject.com/en/1.2/topics/db/queries/#field-lookups
++field lookups via the API, see :ref:`Field lookups <field-lookups-intro>`. For
++full details on the database API, see our :doc:`Database API reference
++</topics/db/queries>`.
+
+ When you're comfortable with the API, read :doc:`part 2 of this tutorial
+ </intro/tutorial02>` to get Django's automatic admin working.
+diff --git a/docs/intro/tutorial02.txt b/docs/intro/tutorial02.txt
+index 4bd31fb..1e837e6 100644
+--- a/docs/intro/tutorial02.txt
++++ b/docs/intro/tutorial02.txt
+@@ -40,22 +40,22 @@ activate the admin site for your installation, do these three things:
+
+ .. parsed-literal::
+
+- from django.conf.urls.defaults import *
++ from django.conf.urls.defaults import patterns, include, url
+
+ # Uncomment the next two lines to enable the admin:
+ **from django.contrib import admin**
+ **admin.autodiscover()**
+
+ urlpatterns = patterns('',
+- # Example:
+- # (r'^mysite/', include('mysite.foo.urls')),
++ # Examples:
++ # url(r'^$', 'mysite.views.home', name='home'),
++ # url(r'^mysite/', include('mysite.foo.urls')),
+
+- # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
+- # to INSTALLED_APPS to enable admin documentation:
+- # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
++ # Uncomment the admin/doc line below to enable admin documentation:
++ # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
+
+ # Uncomment the next line to enable the admin:
+- **(r'^admin/', include(admin.site.urls)),**
++ **url(r'^admin/', include(admin.site.urls)),**
+ )
+
+ (The bold lines are the ones that needed to be uncommented.)
+diff --git a/docs/intro/tutorial03.txt b/docs/intro/tutorial03.txt
+index 41a62a7..566ba55 100644
+--- a/docs/intro/tutorial03.txt
++++ b/docs/intro/tutorial03.txt
+@@ -78,17 +78,17 @@ point at that file::
+
+ Time for an example. Edit ``mysite/urls.py`` so it looks like this::
+
+- from django.conf.urls.defaults import *
++ from django.conf.urls.defaults import patterns, include, url
+
+ from django.contrib import admin
+ admin.autodiscover()
+
+ urlpatterns = patterns('',
+- (r'^polls/$', 'polls.views.index'),
+- (r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
+- (r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
+- (r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
+- (r'^admin/', include(admin.site.urls)),
++ url(r'^polls/$', 'polls.views.index'),
++ url(r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
++ url(r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
++ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
++ url(r'^admin/', include(admin.site.urls)),
+ )
+
+ This is worth a review. When somebody requests a page from your Web site -- say,
+@@ -112,7 +112,7 @@ what you can do with them. And there's no need to add URL cruft such as ``.php``
+ -- unless you have a sick sense of humor, in which case you can do something
+ like this::
+
+- (r'^polls/latest\.php$', 'polls.views.index'),
++ url(r'^polls/latest\.php$', 'polls.views.index'),
+
+ But, don't do that. It's silly.
+
+@@ -357,22 +357,23 @@ the list is empty.
+ Write a 404 (page not found) view
+ =================================
+
+-When you raise :exc:`~django.http.Http404` from within a view, Django will load
+-a special view devoted to handling 404 errors. It finds it by looking for the
+-variable ``handler404``, which is a string in Python dotted syntax -- the same
+-format the normal URLconf callbacks use. A 404 view itself has nothing special:
+-It's just a normal view.
+-
+-You normally won't have to bother with writing 404 views. By default, URLconfs
+-have the following line up top::
+-
+- from django.conf.urls.defaults import *
++When you raise :exc:`~django.http.Http404` from within a view, Django
++will load a special view devoted to handling 404 errors. It finds it
++by looking for the variable ``handler404`` in your root URLconf (and
++only in your root URLconf; setting ``handler404`` anywhere else will
++have no effect), which is a string in Python dotted syntax -- the same
++format the normal URLconf callbacks use. A 404 view itself has nothing
++special: It's just a normal view.
+
+-That takes care of setting ``handler404`` in the current module. As you can see
+-in ``django/conf/urls/defaults.py``, ``handler404`` is set to
+-:func:`django.views.defaults.page_not_found` by default.
++You normally won't have to bother with writing 404 views. If you don't set
++``handler404``, the built-in view :func:`django.views.defaults.page_not_found`
++is used by default. In this case, you still have one obligation: To create a
++``404.html`` template in the root of your template directory. The default 404
++view will use that template for all 404 errors. If :setting:`DEBUG` is set to
++``False`` (in your settings module) and if you didn't create a ``404.html``
++file, an ``Http500`` is raised instead. So remember to create a ``404.html``.
+
+-Four more things to note about 404 views:
++A couple more things to note about 404 views:
+
+ * If :setting:`DEBUG` is set to ``True`` (in your settings module) then your
+ 404 view will never be used (and thus the ``404.html`` template will never
+@@ -381,21 +382,12 @@ Four more things to note about 404 views:
+ * The 404 view is also called if Django doesn't find a match after checking
+ every regular expression in the URLconf.
+
+- * If you don't define your own 404 view -- and simply use the default, which
+- is recommended -- you still have one obligation: To create a ``404.html``
+- template in the root of your template directory. The default 404 view will
+- use that template for all 404 errors.
+-
+- * If :setting:`DEBUG` is set to ``False`` (in your settings module) and if
+- you didn't create a ``404.html`` file, an ``Http500`` is raised instead.
+- So remember to create a ``404.html``.
+-
+ Write a 500 (server error) view
+ ===============================
+
+-Similarly, URLconfs may define a ``handler500``, which points to a view to call
+-in case of server errors. Server errors happen when you have runtime errors in
+-view code.
++Similarly, your root URLconf may define a ``handler500``, which points
++to a view to call in case of server errors. Server errors happen when
++you have runtime errors in view code.
+
+ Use the template system
+ =======================
+@@ -432,10 +424,10 @@ Take some time to play around with the views and template system. As you edit
+ the URLconf, you may notice there's a fair bit of redundancy in it::
+
+ urlpatterns = patterns('',
+- (r'^polls/$', 'polls.views.index'),
+- (r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
+- (r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
+- (r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
++ url(r'^polls/$', 'polls.views.index'),
++ url(r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
++ url(r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
++ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
+ )
+
+ Namely, ``polls.views`` is in every callback.
+@@ -445,10 +437,10 @@ common prefixes. You can factor out the common prefixes and add them as the
+ first argument to :func:`~django.conf.urls.defaults.patterns`, like so::
+
+ urlpatterns = patterns('polls.views',
+- (r'^polls/$', 'index'),
+- (r'^polls/(?P<poll_id>\d+)/$', 'detail'),
+- (r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
+- (r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
++ url(r'^polls/$', 'index'),
++ url(r'^polls/(?P<poll_id>\d+)/$', 'detail'),
++ url(r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
++ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
+ )
+
+ This is functionally identical to the previous formatting. It's just a bit
+@@ -459,20 +451,20 @@ callback in your URLconf, you can concatenate multiple
+ :func:`~django.conf.urls.defaults.patterns`. Your full ``mysite/urls.py`` might
+ now look like this::
+
+- from django.conf.urls.defaults import *
++ from django.conf.urls.defaults import patterns, include, url
+
+ from django.contrib import admin
+ admin.autodiscover()
+
+ urlpatterns = patterns('polls.views',
+- (r'^polls/$', 'index'),
+- (r'^polls/(?P<poll_id>\d+)/$', 'detail'),
+- (r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
+- (r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
++ url(r'^polls/$', 'index'),
++ url(r'^polls/(?P<poll_id>\d+)/$', 'detail'),
++ url(r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
++ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
+ )
+
+ urlpatterns += patterns('',
+- (r'^admin/', include(admin.site.urls)),
++ url(r'^admin/', include(admin.site.urls)),
+ )
+
+ Decoupling the URLconfs
+@@ -502,8 +494,8 @@ Copy the file ``mysite/urls.py`` to ``polls/urls.py``. Then, change
+ admin.autodiscover()
+
+ urlpatterns = patterns('',
+- (r'^polls/', include('polls.urls')),
+- (r'^admin/', include(admin.site.urls)),
++ url(r'^polls/', include('polls.urls')),
++ url(r'^admin/', include(admin.site.urls)),
+ )
+
+ :func:`~django.conf.urls.defaults.include` simply references another URLconf.
+@@ -526,13 +518,13 @@ URLconf by removing the leading "polls/" from each line, and removing the
+ lines registering the admin site. Your ``polls/urls.py`` file should now look like
+ this::
+
+- from django.conf.urls.defaults import *
++ from django.conf.urls.defaults import patterns, include, url
+
+ urlpatterns = patterns('polls.views',
+- (r'^$', 'index'),
+- (r'^(?P<poll_id>\d+)/$', 'detail'),
+- (r'^(?P<poll_id>\d+)/results/$', 'results'),
+- (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
++ url(r'^$', 'index'),
++ url(r'^(?P<poll_id>\d+)/$', 'detail'),
++ url(r'^(?P<poll_id>\d+)/results/$', 'results'),
++ url(r'^(?P<poll_id>\d+)/vote/$', 'vote'),
+ )
+
+ The idea behind :func:`~django.conf.urls.defaults.include` and URLconf
+diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt
+index ded5cb2..4c2f2d4 100644
+--- a/docs/intro/tutorial04.txt
++++ b/docs/intro/tutorial04.txt
+@@ -218,13 +218,13 @@ Read on for details.
+ First, open the ``polls/urls.py`` URLconf. It looks like this, according to the
+ tutorial so far::
+
+- from django.conf.urls.defaults import *
++ from django.conf.urls.defaults import patterns, include, url
+
+ urlpatterns = patterns('polls.views',
+- (r'^$', 'index'),
+- (r'^(?P<poll_id>\d+)/$', 'detail'),
+- (r'^(?P<poll_id>\d+)/results/$', 'results'),
+- (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
++ url(r'^$', 'index'),
++ url(r'^(?P<poll_id>\d+)/$', 'detail'),
++ url(r'^(?P<poll_id>\d+)/results/$', 'results'),
++ url(r'^(?P<poll_id>\d+)/vote/$', 'vote'),
+ )
+
+ Change it like so::
+@@ -234,12 +234,12 @@ Change it like so::
+ from polls.models import Poll
+
+ urlpatterns = patterns('',
+- (r'^$',
++ url(r'^$',
+ ListView.as_view(
+ queryset=Poll.objects.order_by('-pub_date')[:5],
+ context_object_name='latest_poll_list',
+ template_name='polls/index.html')),
+- (r'^(?P<pk>\d+)/$',
++ url(r'^(?P<pk>\d+)/$',
+ DetailView.as_view(
+ model=Poll,
+ template_name='polls/detail.html')),
+@@ -248,7 +248,7 @@ Change it like so::
+ model=Poll,
+ template_name='polls/results.html'),
+ name='poll_results'),
+- (r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
++ url(r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
+ )
+
+ We're using two generic views here:
+diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
+index beff94e..7394c3a 100644
+--- a/docs/ref/contrib/admin/index.txt
++++ b/docs/ref/contrib/admin/index.txt
+@@ -19,8 +19,10 @@ There are six steps in activating the Django admin site:
+ 1. Add ``'django.contrib.admin'`` to your :setting:`INSTALLED_APPS`
+ setting.
+
+- 2. Admin has two dependencies - :mod:`django.contrib.auth` and
+- :mod:`django.contrib.contenttypes`. If these applications are not
++ 2. The admin has four dependencies - :mod:`django.contrib.auth`,
++ :mod:`django.contrib.contenttypes`,
++ :mod:`django.contrib.messages` and
++ :mod:`django.contrib.sessions`. If these applications are not
+ in your :setting:`INSTALLED_APPS` list, add them.
+
+ 3. Determine which of your application's models should be editable in the
+@@ -542,7 +544,7 @@ subclass::
+ Fields in ``list_filter`` can also span relations using the ``__`` lookup::
+
+ class UserAdminWithLookup(UserAdmin):
+- list_filter = ('groups__name')
++ list_filter = ('groups__name',)
+
+ .. attribute:: ModelAdmin.list_per_page
+
+diff --git a/docs/ref/contrib/gis/geoip.txt b/docs/ref/contrib/gis/geoip.txt
+index 6503be7..f5c45e1 100644
+--- a/docs/ref/contrib/gis/geoip.txt
++++ b/docs/ref/contrib/gis/geoip.txt
+@@ -144,7 +144,7 @@ parameters.
+ Returns a dictionary of city information for the given query. Some
+ of the values in the dictionary may be undefined (``None``).
+
+-.. method:: GeoIPcountry(query)
++.. method:: GeoIP.country(query)
+
+ Returns a dictionary with the country code and country for the given
+ query.
+diff --git a/docs/ref/contrib/messages.txt b/docs/ref/contrib/messages.txt
+index ca3212d..ee7e01c 100644
+--- a/docs/ref/contrib/messages.txt
++++ b/docs/ref/contrib/messages.txt
+@@ -210,6 +210,10 @@ If you're using the context processor, your template should be rendered with a
+ ``RequestContext``. Otherwise, ensure ``messages`` is available to
+ the template context.
+
++Even if you know there is only just one message, you should still iterate over
++the ``messages`` sequence, because otherwise the message storage will not be cleared
++for the next request.
++
+ Creating custom message levels
+ ------------------------------
+
+diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
+index 89bc43f..58b86ea 100644
+--- a/docs/ref/django-admin.txt
++++ b/docs/ref/django-admin.txt
+@@ -1156,7 +1156,7 @@ variable.
+ Note that this option is unnecessary in ``manage.py``, because it takes care of
+ setting the Python path for you.
+
+-.. _import search path: http://diveintopython.org/getting_to_know_python/everything_is_an_object.html
++.. _import search path: http://diveintopython.net/getting_to_know_python/everything_is_an_object.html
+
+ .. django-admin-option:: --settings
+
+diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
+index 3728a09..52c0869 100644
+--- a/docs/ref/models/instances.txt
++++ b/docs/ref/models/instances.txt
+@@ -470,7 +470,7 @@ the URL. For example, if your URLconf contained a line such as::
+
+ Similarly, if you had a URLconf entry that looked like::
+
+- (r'/archive/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$', archive_view)
++ (r'/archive/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', archive_view)
+
+ ...you could reference this using ``permalink()`` as follows::
+
+@@ -478,8 +478,8 @@ Similarly, if you had a URLconf entry that looked like::
+ def get_absolute_url(self):
+ return ('archive_view', (), {
+ 'year': self.created.year,
+- 'month': self.created.month,
+- 'day': self.created.day})
++ 'month': self.created.strftime('%m'),
++ 'day': self.created.strftime('%d')})
+
+ Notice that we specify an empty sequence for the second parameter in this case,
+ because we only want to pass keyword parameters, not positional ones.
+diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt
+index 4530439..c1beab0 100644
+--- a/docs/ref/models/options.txt
++++ b/docs/ref/models/options.txt
+@@ -166,6 +166,13 @@ Django quotes column and table names behind the scenes.
+ >>> answer.get_previous_in_order()
+ <Answer: 1>
+
++.. admonition:: Changing order_with_respect_to
++
++ ``order_with_respect_to`` adds an additional field/database column
++ named ``_order``, so be sure to handle that as you would any other
++ change to your models if you add or change ``order_with_respect_to``
++ after your initial :djadmin:`syncdb`.
++
+ ``ordering``
+ ------------
+
+@@ -238,6 +245,12 @@ Django quotes column and table names behind the scenes.
+
+ unique_together = ("driver", "restaurant")
+
++ A :class:`~django.db.models.ManyToManyField` cannot be included in
++ unique_together (it's not even clear what that would mean). If you
++ need to validate uniqueness related to a
++ :class:`~django.db.models.ManyToManyField`, look at signals or
++ using an explicit :attr:`through <ManyToManyField.through>` model.
++
+ ``verbose_name``
+ ----------------
+
+diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt
+index e83142e..ad25dce 100644
+--- a/docs/ref/signals.txt
++++ b/docs/ref/signals.txt
+@@ -352,12 +352,16 @@ post_syncdb
+ .. data:: django.db.models.signals.post_syncdb
+ :module:
+
+-Sent by :djadmin:`syncdb` after it installs an application.
++Sent by :djadmin:`syncdb` command after it installs an application, and
++:djadmin:`flush` command.
+
+ Any handlers that listen to this signal need to be written in a particular
+ place: a ``management`` module in one of your :setting:`INSTALLED_APPS`. If
+ handlers are registered anywhere else they may not be loaded by
+-:djadmin:`syncdb`.
++:djadmin:`syncdb`. It is important that handlers of this signal perform
++idempotent changes (e.g. no database alterations) as this may cause the
++:djadmin:`flush` management command to fail if it also ran during the
++:djadmin:`syncdb` command.
+
+ Arguments sent with this signal:
+
+diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
+index 7d24c1d..6c7057a 100644
+--- a/docs/ref/templates/builtins.txt
++++ b/docs/ref/templates/builtins.txt
+@@ -1868,7 +1868,7 @@ slice
+ Returns a slice of the list.
+
+ Uses the same syntax as Python's list slicing. See
+-http://diveintopython.org/native_data_types/lists.html#odbchelper.list.slice
++http://diveintopython.net/native_data_types/lists.html#odbchelper.list.slice
+ for an introduction.
+
+ Example::
+diff --git a/docs/releases/0.95.txt b/docs/releases/0.95.txt
+index 7409bff..3632c31 100644
+--- a/docs/releases/0.95.txt
++++ b/docs/releases/0.95.txt
+@@ -92,15 +92,15 @@ changes is described in the `Removing The Magic`_ wiki page. There is also an
+ easy checklist_ for reference when undertaking the porting operation.
+
+ .. _Removing The Magic: http://code.djangoproject.com/wiki/RemovingTheMagic
+-.. _checklist: http://code.djangoproject.com/wiki/MagicRemovalCheatSheet1
++.. _checklist: http://code.djangoproject.com/wiki/MagicRemovalCheatSheet
+
+ Problem reports and getting help
+ ================================
+
+-Need help resolving a problem with Django? The documentation in the distribution
+-is also available online_ at the `Django Web site`_. The :doc:`FAQ </faq/index>`
+-document is especially recommended, as it contains a number of issues that come
+-up time and again.
++Need help resolving a problem with Django? The documentation in the
++distribution is also available :doc:`online </index>` at the `Django Web
++site`_. The :doc:`FAQ </faq/index>` document is especially recommended, as it
++contains a number of issues that come up time and again.
+
+ For more personalized help, the `django-users`_ mailing list is a very active
+ list, with more than 2,000 subscribers who can help you solve any sort of
+@@ -113,7 +113,6 @@ there's a #django channel on irc.freenode.net that is regularly populated by
+ Django users and developers from around the world. Friendly people are usually
+ available at any hour of the day -- to help, or just to chat.
+
+-.. _online: http://www.djangoproject.com/documentation/0.95/
+ .. _Django Web site: http://www.djangoproject.com/
+ .. _django-users: http://groups.google.com/group/django-users
+
+diff --git a/docs/releases/0.96.txt b/docs/releases/0.96.txt
+index 1224360..8874ccb 100644
+--- a/docs/releases/0.96.txt
++++ b/docs/releases/0.96.txt
+@@ -50,12 +50,10 @@ aside from any necessary security fixes, it will not be actively
+ maintained, and it will be removed in a future release of Django.
+
+ Also, note that some features, like the new :setting:`DATABASE_OPTIONS`
+-setting (see the `databases documentation`_ for details), are only
+-available on the "mysql" backend, and will not be made available for
++setting (see the :doc:`databases documentation </ref/databases>` for details),
++are only available on the "mysql" backend, and will not be made available for
+ "mysql_old".
+
+-.. _databases documentation: http://www.djangoproject.com/documentation/0.96/databases/
+-
+ Database constraint names changed
+ ---------------------------------
+
+@@ -164,10 +162,8 @@ Although the ``newforms`` library will continue to evolve, it's ready for use
+ for most common cases. We recommend that anyone new to form handling skip the
+ old forms system and start with the new.
+
+-For more information about ``django.newforms``, read the `newforms
+-documentation`_.
+-
+-.. _newforms documentation: http://www.djangoproject.com/documentation/0.96/newforms/
++For more information about ``django.newforms``, read the :doc:`newforms
++documentation </topics/forms/index>`.
+
+ URLconf improvements
+ --------------------
+@@ -216,19 +212,15 @@ The test framework
+ ------------------
+
+ Django now includes a test framework so you can start transmuting fear into
+-boredom (with apologies to Kent Beck). You can write tests based on doctest_
+-or unittest_ and test your views with a simple test client.
++boredom (with apologies to Kent Beck). You can write tests based on
++:mod:`doctest` or :mod:`unittest` and test your views with a simple test client.
+
+ There is also new support for "fixtures" -- initial data, stored in any of the
+-supported `serialization formats`_, that will be loaded into your database at the
+-start of your tests. This makes testing with real data much easier.
+-
+-See `the testing documentation`_ for the full details.
++supported :doc:`serialization formats </topics/serialization>`, that will be
++loaded into your database at the start of your tests. This makes testing with
++real data much easier.
+
+-.. _doctest: http://docs.python.org/library/doctest.html
+-.. _unittest: http://docs.python.org/library/unittest.html
+-.. _the testing documentation: http://www.djangoproject.com/documentation/0.96/testing/
+-.. _serialization formats: http://www.djangoproject.com/documentation/0.96/serialization/
++See :doc:`the testing documentation </topics/testing>` for the full details.
+
+ Improvements to the admin interface
+ -----------------------------------
+diff --git a/docs/releases/1.0.1.txt b/docs/releases/1.0.1.txt
+index 780dc53..3550e7c 100644
+--- a/docs/releases/1.0.1.txt
++++ b/docs/releases/1.0.1.txt
+@@ -6,10 +6,10 @@ Welcome to Django 1.0.1!
+
+ This is the first "bugfix" release in the Django 1.0 series, improving
+ the stability and performance of the Django 1.0 codebase. As such,
+-Django 1.0.1 contains no new features (and, pursuant to `our
+-compatibility policy`_, maintains backwards compatibility with Django
+-1.0), but does contain a number of fixes and other
+-improvements. Django 1.0.1 is a recommended upgrade for any
++Django 1.0.1 contains no new features (and, pursuant to :doc:`our
++compatibility policy </misc/api-stability/>`, maintains backwards
++compatibility with Django 1.0), but does contain a number of fixes
++and other improvements. Django 1.0.1 is a recommended upgrade for any
+ development or deployment currently using or targeting Django 1.0.
+
+
+@@ -46,8 +46,9 @@ highlights:
+
+ * A fix to the application of autoescaping for literal strings passed
+ to the ``join`` template filter. Previously, literal strings passed
+- to ``join`` were automatically escaped, contrary to `the documented
+- behavior for autoescaping and literal strings`_. Literal strings
++ to ``join`` were automatically escaped, contrary to :ref:`the
++ documented behavior for autoescaping and literal strings
++ <string-literals-and-automatic-escaping>`. Literal strings
+ passed to ``join`` are no longer automatically escaped, meaning you
+ must now manually escape them; this is an incompatibility if you
+ were relying on this bug, but not if you were relying on escaping
+@@ -60,6 +61,4 @@ highlights:
+ documentation, including both corrections to existing documents and
+ expanded and new documentation.
+
+-.. _our compatibility policy: http://docs.djangoproject.com/en/dev/misc/api-stability/
+ .. _the Subversion log of the 1.0.X branch: http://code.djangoproject.com/log/django/branches/releases/1.0.X
+-.. _the documented behavior for autoescaping and literal strings: http://docs.djangoproject.com/en/dev/topics/templates/#string-literals-and-automatic-escaping
+diff --git a/docs/releases/1.2.6.txt b/docs/releases/1.2.6.txt
+new file mode 100644
+index 0000000..cfd1d9c
+--- /dev/null
++++ b/docs/releases/1.2.6.txt
+@@ -0,0 +1,16 @@
++==========================
++Django 1.2.6 release notes
++==========================
++
++*September 9, 2011*
++
++Welcome to Django 1.2.6!
++
++This is the sixth bugfix/security release in the Django 1.2 series, fixing
++several security issues present in Django 1.2.5. Django 1.2.6 is a
++recommended upgrade for all users of any Django release in the 1.2.X series.
++
++For a full list of issues addressed in this release, see the `security
++advisory`_.
++
++.. _security advisory: https://www.djangoproject.com/weblog/2011/sep/09/security-releases-issued/
+diff --git a/docs/releases/1.2.7.txt b/docs/releases/1.2.7.txt
+new file mode 100644
+index 0000000..c0cf698
+--- /dev/null
++++ b/docs/releases/1.2.7.txt
+@@ -0,0 +1,16 @@
++==========================
++Django 1.2.7 release notes
++==========================
++
++*September 10, 2011*
++
++Welcome to Django 1.2.7!
++
++This is the seventh bugfix/security release in the Django 1.2 series. It
++replaces Django 1.2.6 due to problems with the 1.2.6 release tarball.
++Django 1.2.7 is a recommended upgrade for all users of any Django release in
++the 1.2.X series.
++
++For more information, see the `release advisory`_.
++
++.. _release advisory: https://www.djangoproject.com/weblog/2011/sep/10/127/
+diff --git a/docs/releases/1.3.1.txt b/docs/releases/1.3.1.txt
+new file mode 100644
+index 0000000..4c28916
+--- /dev/null
++++ b/docs/releases/1.3.1.txt
+@@ -0,0 +1,16 @@
++==========================
++Django 1.3.1 release notes
++==========================
++
++*September 9, 2011*
++
++Welcome to Django 1.3.1!
++
++This is the first security release in the Django 1.3 series, fixing several
++security issues in Django 1.3. Django 1.3.1 is a recommended upgrade for
++all users of Django 1.3.
++
++For a full list of issues addressed in this release, see the `security
++advisory`_.
++
++.. _security advisory: https://www.djangoproject.com/weblog/2011/sep/09/security-releases-issued/
+diff --git a/docs/releases/index.txt b/docs/releases/index.txt
+index 8d23c28..40fe5b0 100644
+--- a/docs/releases/index.txt
++++ b/docs/releases/index.txt
+@@ -19,6 +19,7 @@ Final releases
+ .. toctree::
+ :maxdepth: 1
+
++ 1.3.1
+ 1.3
+
+ 1.2 release
+@@ -26,6 +27,8 @@ Final releases
+ .. toctree::
+ :maxdepth: 1
+
++ 1.2.7
++ 1.2.6
+ 1.2.5
+ 1.2.4
+ 1.2.2
+diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt
+index 635f18f..5a2608a 100644
+--- a/docs/topics/auth.txt
++++ b/docs/topics/auth.txt
+@@ -1251,16 +1251,19 @@ can or cannot do with Task instances, specific to your application::
+ ...
+ class Meta:
+ permissions = (
+- ("can_view", "Can see available tasks"),
+- ("can_change_status", "Can change the status of tasks"),
+- ("can_close", "Can remove a task by setting its status as closed"),
++ ("view_task", "Can see available tasks"),
++ ("change_task_status", "Can change the status of tasks"),
++ ("close_task", "Can remove a task by setting its status as closed"),
+ )
+
+ The only thing this does is create those extra permissions when you run
+ :djadmin:`manage.py syncdb <syncdb>`. Your code is in charge of checking the
+ value of these permissions when an user is trying to access the functionality
+ provided by the application (viewing tasks, changing the status of tasks,
+-closing tasks.)
++closing tasks.) Continuing the above example, the following checks if a user may
++view tasks::
++
++ user.has_perm('app.view_task')
+
+ API reference
+ -------------
+diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt
+index 8ef4ea2..9b68353 100644
+--- a/docs/topics/cache.txt
++++ b/docs/topics/cache.txt
+@@ -99,8 +99,9 @@ To use Memcached with Django:
+ on your chosen memcached binding)
+
+ * Set :setting:`LOCATION <CACHES-LOCATION>` to ``ip:port`` values,
+- where ``ip`` is the IP address of the Memcached daemon and
+- ``port`` is the port on which Memcached is running.
++ where ``ip`` is the IP address of the Memcached daemon and ``port`` is the
++ port on which Memcached is running, or to a ``unix:path`` value, where
++ ``path`` is the path to a Memcached Unix socket file.
+
+ In this example, Memcached is running on localhost (127.0.0.1) port 11211, using
+ the ``python-memcached`` binding::
+@@ -112,6 +113,16 @@ the ``python-memcached`` binding::
+ }
+ }
+
++In this example, Memcached is available through a local Unix socket file
++:file:`/tmp/memcached.sock` using the ``python-memcached`` binding::
++
++ CACHES = {
++ 'default': {
++ 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
++ 'LOCATION': 'unix:/tmp/memcached.sock',
++ }
++ }
++
+ One excellent feature of Memcached is its ability to share cache over multiple
+ servers. This means you can run Memcached daemons on multiple machines, and the
+ program will treat the group of machines as a *single* cache, without the need
+@@ -526,9 +537,10 @@ you may expect. But once a particular URL (e.g., ``/foo/23/``) has been
+ requested, subsequent requests to that URL will use the cache.
+
+ ``cache_page`` can also take an optional keyword argument, ``cache``,
+-which directs the decorator to use a specific cache alias when caching view
+-results. By default, the ``default`` alias will be used, but you can specify
+-any cache alias you want::
++which directs the decorator to use a specific cache (from your
++:setting:`CACHES` setting) when caching view results. By default, the
++``default`` cache will be used, but you can specify any cache you
++want::
+
+ @cache_page(60 * 15, cache="special_cache")
+ def my_view(request):
+diff --git a/docs/topics/class-based-views.txt b/docs/topics/class-based-views.txt
+index 3831046..4da48ec 100644
+--- a/docs/topics/class-based-views.txt
++++ b/docs/topics/class-based-views.txt
+@@ -380,7 +380,7 @@ Next, we'll write the ``PublisherBookListView`` view itself::
+ class PublisherBookListView(ListView):
+
+ context_object_name = "book_list"
+- template_name = "books/books_by_publisher.html",
++ template_name = "books/books_by_publisher.html"
+
+ def get_queryset(self):
+ publisher = get_object_or_404(Publisher, name__iexact=self.args[0])
+@@ -396,7 +396,7 @@ use it in the template::
+ class PublisherBookListView(ListView):
+
+ context_object_name = "book_list"
+- template_name = "books/books_by_publisher.html",
++ template_name = "books/books_by_publisher.html"
+
+ def get_queryset(self):
+ self.publisher = get_object_or_404(Publisher, name__iexact=self.args[0])
+diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
+index 0e18205..af76344 100644
+--- a/docs/topics/db/models.txt
++++ b/docs/topics/db/models.txt
+@@ -324,11 +324,10 @@ whatever you want. For example::
+ should work; all are optional.
+
+ For details on accessing backwards-related objects, see the
+- `Following relationships backward example`_.
+-
++ :ref:`Following relationships backward example <backwards-related-objects>`.
++
+ For sample code, see the `Many-to-one relationship model tests`_.
+
+- .. _Following relationships backward example: http://docs.djangoproject.com/en/dev/topics/db/queries/#backwards-related-objects
+ .. _Many-to-one relationship model tests: http://code.djangoproject.com/browser/django/trunk/tests/modeltests/many_to_one
+
+ Many-to-many relationships
+diff --git a/docs/topics/db/sql.txt b/docs/topics/db/sql.txt
+index fe71736..d9b8b1a 100644
+--- a/docs/topics/db/sql.txt
++++ b/docs/topics/db/sql.txt
+@@ -236,6 +236,30 @@ alias::
+ # Your code here...
+ transaction.commit_unless_managed(using='my_db_alias')
+
++By default, the Python DB API will return results without their field
++names, which means you end up with a ``list`` of values, rather than a
++``dict``. At a small performance cost, you can return results as a
++``dict`` by using something like this::
++
++ def dictfetchall(cursor):
++ "Returns all rows from a cursor as a dict"
++ desc = cursor.description
++ return [
++ dict(zip([col[0] for col in desc], row))
++ for row in cursor.fetchall()
++ ]
++
++Here is an example of the difference between the two::
++
++ >>> cursor.execute("SELECT id, parent_id from test LIMIT 2");
++ >>> cursor.fetchall()
++ ((54360982L, None), (54360880L, None))
++
++ >>> cursor.execute("SELECT id, parent_id from test LIMIT 2");
++ >>> dictfetchall(cursor)
++ [{'parent_id': None, 'id': 54360982L}, {'parent_id': None, 'id': 54360880L}]
++
++
+ .. _transactions-and-raw-sql:
+
+ Transactions and raw SQL
+diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
+index 07bc5e3..24e000e 100644
+--- a/docs/topics/forms/modelforms.txt
++++ b/docs/topics/forms/modelforms.txt
+@@ -332,13 +332,17 @@ Since the Author model has only 3 fields, 'name', 'title', and
+ .. note::
+
+ If you specify ``fields`` or ``exclude`` when creating a form with
+- ``ModelForm``, then the fields that are not in the resulting form will not
+- be set by the form's ``save()`` method. Django will prevent any attempt to
+- save an incomplete model, so if the model does not allow the missing fields
+- to be empty, and does not provide a default value for the missing fields,
+- any attempt to ``save()`` a ``ModelForm`` with missing fields will fail.
+- To avoid this failure, you must instantiate your model with initial values
+- for the missing, but required fields::
++ ``ModelForm``, then the fields that are not in the resulting form
++ will not be set by the form's ``save()`` method. Also, if you
++ manually add the excluded fields back to the form, they will not
++ be initialized from the model instance.
++
++ Django will prevent any attempt to save an incomplete model, so if
++ the model does not allow the missing fields to be empty, and does
++ not provide a default value for the missing fields, any attempt to
++ ``save()`` a ``ModelForm`` with missing fields will fail. To
++ avoid this failure, you must instantiate your model with initial
++ values for the missing, but required fields::
+
+ author = Author(title='Mr')
+ form = PartialAuthorForm(request.POST, instance=author)
+@@ -633,6 +637,12 @@ database. If a given instance's data didn't change in the bound data, the
+ instance won't be saved to the database and won't be included in the return
+ value (``instances``, in the above example).
+
++When fields are missing from the form (for example because they have
++been excluded), these fields will not be set by the ``save()``
++method. You can find more information about this restriction, which
++also holds for regular ``ModelForms``, in `Using a subset of fields on
++the form`_.
++
+ Pass ``commit=False`` to return the unsaved model instances::
+
+ # don't save to the database
+diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt
+index 1caa801..7a0e724 100644
+--- a/docs/topics/http/urls.txt
++++ b/docs/topics/http/urls.txt
+@@ -54,6 +54,10 @@ algorithm the system follows to determine which Python code to execute:
+ :class:`~django.http.HttpRequest` as its first argument and any values
+ captured in the regex as remaining arguments.
+
++ 5. If no regex matches, or if an exception is raised during any
++ point in this process, Django invokes an appropriate
++ error-handling view. See `Error handling`_ below.
++
+ Example
+ =======
+
+@@ -99,10 +103,10 @@ Example requests:
+ * ``/articles/2003`` would not match any of these patterns, because each
+ pattern requires that the URL end with a slash.
+
+- * ``/articles/2003/03/3/`` would match the final pattern. Django would call
+- the function ``news.views.article_detail(request, '2003', '03', '3')``.
++ * ``/articles/2003/03/03/`` would match the final pattern. Django would call
++ the function ``news.views.article_detail(request, '2003', '03', '03')``.
+
+-.. _Dive Into Python's explanation: http://diveintopython.org/regular_expressions/street_addresses.html#re.matching.2.3
++.. _Dive Into Python's explanation: http://diveintopython.net/regular_expressions/street_addresses.html#re.matching.2.3
+
+ Named groups
+ ============
+@@ -123,7 +127,7 @@ Here's the above example URLconf, rewritten to use named groups::
+ (r'^articles/2003/$', 'news.views.special_case_2003'),
+ (r'^articles/(?P<year>\d{4})/$', 'news.views.year_archive'),
+ (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'news.views.month_archive'),
+- (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d+)/$', 'news.views.article_detail'),
++ (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', 'news.views.article_detail'),
+ )
+
+ This accomplishes exactly the same thing as the previous example, with one
+@@ -134,8 +138,8 @@ arguments rather than positional arguments. For example:
+ ``news.views.month_archive(request, year='2005', month='03')``, instead
+ of ``news.views.month_archive(request, '2005', '03')``.
+
+- * A request to ``/articles/2003/03/3/`` would call the function
+- ``news.views.article_detail(request, year='2003', month='03', day='3')``.
++ * A request to ``/articles/2003/03/03/`` would call the function
++ ``news.views.article_detail(request, year='2003', month='03', day='03')``.
+
+ In practice, this means your URLconfs are slightly more explicit and less prone
+ to argument-order bugs -- and you can reorder the arguments in your views'
+@@ -246,6 +250,31 @@ The ``prefix`` parameter has the same meaning as the first argument to
+ ``patterns()`` and is only relevant when you're passing a string as the
+ ``view`` parameter.
+
++include
++-------
++
++.. function:: include(<module or pattern_list>)
++
++A function that takes a full Python import path to another URLconf module that
++should be "included" in this place.
++
++:func:`include` also accepts as an argument an iterable that returns URL
++patterns.
++
++See `Including other URLconfs`_ below.
++
++Error handling
++==============
++
++When Django can't find a regex matching the requested URL, or when an
++exception is raised, Django will invoke an error-handling view. The
++views to use for these cases are specified by two variables which can
++be set in your root URLconf. Setting these variables in any other
++URLconf will have no effect.
++
++See the documentation on :ref:`customizing error views
++<customizing-error-views>` for more details.
++
+ handler404
+ ----------
+
+@@ -275,19 +304,6 @@ value should suffice.
+ .. versionchanged:: 1.2
+ Previous versions of Django only accepted strings representing import paths.
+
+-include
+--------
+-
+-.. function:: include(<module or pattern_list>)
+-
+-A function that takes a full Python import path to another URLconf module that
+-should be "included" in this place.
+-
+-:func:`include` also accepts as an argument an iterable that returns URL
+-patterns.
+-
+-See `Including other URLconfs`_ below.
+-
+ Notes on capturing text in URLs
+ ===============================
+
+@@ -420,8 +436,8 @@ directly the pattern list as returned by `patterns`_ instead. For example::
+ from django.conf.urls.defaults import *
+
+ extra_patterns = patterns('',
+- url(r'reports/(?P<id>\d+)/$', 'credit.views.report', name='credit-reports'),
+- url(r'charge/$', 'credit.views.charge', name='credit-charge'),
++ url(r'^reports/(?P<id>\d+)/$', 'credit.views.report', name='credit-reports'),
++ url(r'^charge/$', 'credit.views.charge', name='credit-charge'),
+ )
+
+ urlpatterns = patterns('',
+diff --git a/docs/topics/http/views.txt b/docs/topics/http/views.txt
+index 99359ab..83a52cb 100644
+--- a/docs/topics/http/views.txt
++++ b/docs/topics/http/views.txt
+@@ -122,6 +122,8 @@ In order to use the ``Http404`` exception to its fullest, you should create a
+ template that is displayed when a 404 error is raised. This template should be
+ called ``404.html`` and located in the top level of your template tree.
+
++.. _customizing-error-views:
++
+ Customizing error views
+ =======================
+
+diff --git a/docs/topics/i18n/internationalization.txt b/docs/topics/i18n/internationalization.txt
+index 5d50fa7..a83299c 100644
+--- a/docs/topics/i18n/internationalization.txt
++++ b/docs/topics/i18n/internationalization.txt
+@@ -477,7 +477,7 @@ for use within the translation block. Examples::
+
+ You can use multiple expressions inside a single ``blocktrans`` tag::
+
+- {% blocktrans with book_t=book|title and author_t=author|title %}
++ {% blocktrans with book_t=book|title author_t=author|title %}
+ This is {{ book_t }} by {{ author_t }}
+ {% endblocktrans %}
+
+diff --git a/docs/topics/settings.txt b/docs/topics/settings.txt
+index 61ddf8c..bda51f2 100644
+--- a/docs/topics/settings.txt
++++ b/docs/topics/settings.txt
+@@ -39,7 +39,7 @@ The value of ``DJANGO_SETTINGS_MODULE`` should be in Python path syntax, e.g.
+ ``mysite.settings``. Note that the settings module should be on the
+ Python `import search path`_.
+
+-.. _import search path: http://diveintopython.org/getting_to_know_python/everything_is_an_object.html
++.. _import search path: http://diveintopython.net/getting_to_know_python/everything_is_an_object.html
+
+ The django-admin.py utility
+ ---------------------------
+diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt
+index 83269ae..fc2cd3f 100644
+--- a/docs/topics/templates.txt
++++ b/docs/topics/templates.txt
+@@ -555,6 +555,8 @@ variable that needs escaping. When auto-escaping is on, there's no danger of
+ the ``escape`` filter *double-escaping* data -- the ``escape`` filter does not
+ affect auto-escaped variables.
+
++.. _string-literals-and-automatic-escaping:
++
+ String literals and automatic escaping
+ --------------------------------------
+
+diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
+index 0a86f0d..8262b57 100644
+--- a/docs/topics/testing.txt
++++ b/docs/topics/testing.txt
+@@ -1586,7 +1586,7 @@ skipUnlessDBFeature
+ Skip the decorated test if the named database feature is *not*
+ supported.
+
+-For example, the following test will not be executed if the database
++For example, the following test will only be executed if the database
+ supports transactions (e.g., it would run under PostgreSQL, but *not*
+ under MySQL with MyISAM tables)::
+
+diff --git a/tests/modeltests/validators/tests.py b/tests/modeltests/validators/tests.py
+index e585262..4bd5827 100644
+--- a/tests/modeltests/validators/tests.py
++++ b/tests/modeltests/validators/tests.py
+@@ -28,6 +28,9 @@ TEST_DATA = (
+ (validate_email, 'abc', ValidationError),
+ (validate_email, 'a @x.cz', ValidationError),
+ (validate_email, 'something@@somewhere.com', ValidationError),
++ # Quoted-string format (CR not allowed)
++ (validate_email, '"\\\011"@here.com', None),
++ (validate_email, '"\\\012"@here.com', ValidationError),
+
+ (validate_slug, 'slug-ok', None),
+ (validate_slug, 'longer-slug-still-ok', None),
+diff --git a/tests/regressiontests/httpwrappers/tests.py b/tests/regressiontests/httpwrappers/tests.py
+index 2e2932f..6aabfe6 100644
+--- a/tests/regressiontests/httpwrappers/tests.py
++++ b/tests/regressiontests/httpwrappers/tests.py
+@@ -281,3 +281,9 @@ class CookieTests(unittest.TestCase):
+ Test that a single non-standard cookie name doesn't affect all cookies. Ticket #13007.
+ """
+ self.assertTrue('good_cookie' in parse_cookie('good_cookie=yes;bad:cookie=yes').keys())
++
++ def test_repeated_nonstandard_keys(self):
++ """
++ Test that a repeated non-standard name doesn't affect all cookies. Ticket #15852
++ """
++ self.assertTrue('good_cookie' in parse_cookie('a,=b; a,=c; good_cookie=yes').keys())
+diff --git a/tests/regressiontests/utils/http.py b/tests/regressiontests/utils/http.py
+index 83a4a7f..666d04f 100644
+--- a/tests/regressiontests/utils/http.py
++++ b/tests/regressiontests/utils/http.py
+@@ -1,5 +1,7 @@
+ from django.utils import http
+ from django.utils import unittest
++from django.http import HttpResponse, utils
++from django.test import RequestFactory
+
+ class TestUtilsHttp(unittest.TestCase):
+
+@@ -21,3 +23,49 @@ class TestUtilsHttp(unittest.TestCase):
+ self.assertFalse(http.same_origin('http://foo.com', 'http://foo.com.evil.com'))
+ # Different port
+ self.assertFalse(http.same_origin('http://foo.com:8000', 'http://foo.com:8001'))
++
++ def test_fix_IE_for_vary(self):
++ """
++ Regression for #16632.
++
++ `fix_IE_for_vary` shouldn't crash when there's no Content-Type header.
++ """
++
++ # functions to generate responses
++ def response_with_unsafe_content_type():
++ r = HttpResponse(content_type="text/unsafe")
++ r['Vary'] = 'Cookie'
++ return r
++
++ def no_content_response_with_unsafe_content_type():
++ # 'Content-Type' always defaulted, so delete it
++ r = response_with_unsafe_content_type()
++ del r['Content-Type']
++ return r
++
++ # request with & without IE user agent
++ rf = RequestFactory()
++ request = rf.get('/')
++ ie_request = rf.get('/', HTTP_USER_AGENT='MSIE')
++
++ # not IE, unsafe_content_type
++ response = response_with_unsafe_content_type()
++ utils.fix_IE_for_vary(request, response)
++ self.assertTrue('Vary' in response)
++
++ # IE, unsafe_content_type
++ response = response_with_unsafe_content_type()
++ utils.fix_IE_for_vary(ie_request, response)
++ self.assertFalse('Vary' in response)
++
++ # not IE, no_content
++ response = no_content_response_with_unsafe_content_type()
++ utils.fix_IE_for_vary(request, response)
++ self.assertTrue('Vary' in response)
++
++ # IE, no_content
++ response = no_content_response_with_unsafe_content_type()
++ utils.fix_IE_for_vary(ie_request, response)
++ self.assertFalse('Vary' in response)
++
++
diff --git a/libre/django13/diff-django_branches_releases_1.3.X-from-16771-to-17460.diff b/libre/django13/diff-django_branches_releases_1.3.X-from-16771-to-17460.diff
new file mode 100644
index 000000000..ebbf80993
--- /dev/null
+++ b/libre/django13/diff-django_branches_releases_1.3.X-from-16771-to-17460.diff
@@ -0,0 +1,1575 @@
+Index: django/http/__init__.py
+===================================================================
+--- django/http/__init__.py (revision 16771)
++++ django/http/__init__.py (revision 17460)
+@@ -92,7 +92,7 @@
+ if not _cookie_allows_colon_in_names:
+ def load(self, rawdata, ignore_parse_errors=False):
+ if ignore_parse_errors:
+- self.bad_cookies = []
++ self.bad_cookies = set()
+ self._BaseCookie__set = self._loose_set
+ super(SimpleCookie, self).load(rawdata)
+ if ignore_parse_errors:
+@@ -106,8 +106,8 @@
+ try:
+ self._strict_set(key, real_value, coded_value)
+ except Cookie.CookieError:
+- self.bad_cookies.append(key)
+- dict.__setitem__(self, key, None)
++ self.bad_cookies.add(key)
++ dict.__setitem__(self, key, Cookie.Morsel())
+
+
+ class CompatCookie(SimpleCookie):
+Index: django/http/utils.py
+===================================================================
+--- django/http/utils.py (revision 16771)
++++ django/http/utils.py (revision 17460)
+@@ -76,7 +76,8 @@
+
+ # The first part of the Content-Type field will be the MIME type,
+ # everything after ';', such as character-set, can be ignored.
+- if response['Content-Type'].split(';')[0] not in safe_mime_types:
++ mime_type = response.get('Content-Type', '').partition(';')[0]
++ if mime_type not in safe_mime_types:
+ try:
+ del response['Vary']
+ except KeyError:
+Index: django/db/backends/creation.py
+===================================================================
+--- django/db/backends/creation.py (revision 16771)
++++ django/db/backends/creation.py (revision 17460)
+@@ -374,15 +374,6 @@
+ verbosity=max(verbosity - 1, 0),
+ interactive=False,
+ database=self.connection.alias)
+-
+- # One effect of calling syncdb followed by flush is that the id of the
+- # default site may or may not be 1, depending on how the sequence was
+- # reset. If the sites app is loaded, then we coerce it.
+- from django.db.models import get_model
+- if 'django.contrib.sites' in settings.INSTALLED_APPS:
+- Site = get_model('sites', 'Site')
+- if Site is not None and Site.objects.using(self.connection.alias).count() == 1:
+- Site.objects.using(self.connection.alias).update(id=settings.SITE_ID)
+
+ from django.core.cache import get_cache
+ from django.core.cache.backends.db import BaseDatabaseCache
+Index: django/core/validators.py
+===================================================================
+--- django/core/validators.py (revision 16771)
++++ django/core/validators.py (revision 17460)
+@@ -147,7 +147,8 @@
+
+ email_re = re.compile(
+ r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom
+- r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"' # quoted-string
++ # quoted-string, see also http://tools.ietf.org/html/rfc2822#section-3.2.5
++ r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*"'
+ r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$', re.IGNORECASE) # domain
+ validate_email = EmailValidator(email_re, _(u'Enter a valid e-mail address.'), 'invalid')
+
+Index: django/core/management/commands/shell.py
+===================================================================
+--- django/core/management/commands/shell.py (revision 16771)
++++ django/core/management/commands/shell.py (revision 17460)
+@@ -13,9 +13,8 @@
+
+ def ipython(self):
+ try:
+- from IPython.frontend.terminal.embed import TerminalInteractiveShell
+- shell = TerminalInteractiveShell()
+- shell.mainloop()
++ from IPython import embed
++ embed()
+ except ImportError:
+ # IPython < 0.11
+ # Explicitly pass an empty list as arguments, because otherwise
+Index: django/contrib/gis/db/models/sql/compiler.py
+===================================================================
+--- django/contrib/gis/db/models/sql/compiler.py (revision 16771)
++++ django/contrib/gis/db/models/sql/compiler.py (revision 17460)
+@@ -1,7 +1,7 @@
+ from itertools import izip
+-from django.db.backends.util import truncate_name
++from django.db.backends.util import truncate_name, typecast_timestamp
+ from django.db.models.sql import compiler
+-from django.db.models.sql.constants import TABLE_NAME
++from django.db.models.sql.constants import TABLE_NAME, MULTI
+ from django.db.models.sql.query import get_proxied_model
+
+ SQLCompiler = compiler.SQLCompiler
+@@ -194,7 +194,7 @@
+ # We resolve the rest of the columns if we're on Oracle or if
+ # the `geo_values` attribute is defined.
+ for value, field in map(None, row[index_start:], fields):
+- values.append(self.query.convert_values(value, field, connection=self.connection))
++ values.append(self.query.convert_values(value, field, self.connection))
+ else:
+ values.extend(row[index_start:])
+ return tuple(values)
+@@ -275,4 +275,24 @@
+ pass
+
+ class SQLDateCompiler(compiler.SQLDateCompiler, GeoSQLCompiler):
+- pass
++ """
++ This is overridden for GeoDjango to properly cast date columns, since
++ `GeoQuery.resolve_columns` is used for spatial values.
++ See #14648, #16757.
++ """
++ def results_iter(self):
++ if self.connection.ops.oracle:
++ from django.db.models.fields import DateTimeField
++ fields = [DateTimeField()]
++ else:
++ needs_string_cast = self.connection.features.needs_datetime_string_cast
++
++ offset = len(self.query.extra_select)
++ for rows in self.execute_sql(MULTI):
++ for row in rows:
++ date = row[offset]
++ if self.connection.ops.oracle:
++ date = self.resolve_columns(row, fields)[offset]
++ elif needs_string_cast:
++ date = typecast_timestamp(str(date))
++ yield date
+Index: django/contrib/gis/db/backends/spatialite/compiler.py
+===================================================================
+--- django/contrib/gis/db/backends/spatialite/compiler.py (revision 16771)
++++ django/contrib/gis/db/backends/spatialite/compiler.py (revision 17460)
+@@ -1,32 +0,0 @@
+-from django.db.backends.util import typecast_timestamp
+-from django.db.models.sql import compiler
+-from django.db.models.sql.constants import MULTI
+-from django.contrib.gis.db.models.sql.compiler import GeoSQLCompiler as BaseGeoSQLCompiler
+-
+-SQLCompiler = compiler.SQLCompiler
+-
+-class GeoSQLCompiler(BaseGeoSQLCompiler, SQLCompiler):
+- pass
+-
+-class SQLInsertCompiler(compiler.SQLInsertCompiler, GeoSQLCompiler):
+- pass
+-
+-class SQLDeleteCompiler(compiler.SQLDeleteCompiler, GeoSQLCompiler):
+- pass
+-
+-class SQLUpdateCompiler(compiler.SQLUpdateCompiler, GeoSQLCompiler):
+- pass
+-
+-class SQLAggregateCompiler(compiler.SQLAggregateCompiler, GeoSQLCompiler):
+- pass
+-
+-class SQLDateCompiler(compiler.SQLDateCompiler, GeoSQLCompiler):
+- """
+- This is overridden for GeoDjango to properly cast date columns, see #16757.
+- """
+- def results_iter(self):
+- offset = len(self.query.extra_select)
+- for rows in self.execute_sql(MULTI):
+- for row in rows:
+- date = typecast_timestamp(str(row[offset]))
+- yield date
+Index: django/contrib/gis/db/backends/spatialite/operations.py
+===================================================================
+--- django/contrib/gis/db/backends/spatialite/operations.py (revision 16771)
++++ django/contrib/gis/db/backends/spatialite/operations.py (revision 17460)
+@@ -48,7 +48,7 @@
+ return (SpatiaLiteDistance(operator),)
+
+ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations):
+- compiler_module = 'django.contrib.gis.db.backends.spatialite.compiler'
++ compiler_module = 'django.contrib.gis.db.models.sql.compiler'
+ name = 'spatialite'
+ spatialite = True
+ version_regex = re.compile(r'^(?P<major>\d)\.(?P<minor1>\d)\.(?P<minor2>\d+)')
+Index: django/contrib/gis/db/backends/spatialite/creation.py
+===================================================================
+--- django/contrib/gis/db/backends/spatialite/creation.py (revision 16771)
++++ django/contrib/gis/db/backends/spatialite/creation.py (revision 17460)
+@@ -56,14 +56,6 @@
+ interactive=False,
+ database=self.connection.alias)
+
+- # One effect of calling syncdb followed by flush is that the id of the
+- # default site may or may not be 1, depending on how the sequence was
+- # reset. If the sites app is loaded, then we coerce it.
+- from django.db.models import get_model
+- Site = get_model('sites', 'Site')
+- if Site is not None and Site.objects.using(self.connection.alias).count() == 1:
+- Site.objects.using(self.connection.alias).update(id=settings.SITE_ID)
+-
+ from django.core.cache import get_cache
+ from django.core.cache.backends.db import BaseDatabaseCache
+ for cache_alias in settings.CACHES:
+Index: django/contrib/gis/tests/relatedapp/fixtures/initial_data.json.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: django/contrib/gis/tests/relatedapp/tests.py
+===================================================================
+--- django/contrib/gis/tests/relatedapp/tests.py (revision 16771)
++++ django/contrib/gis/tests/relatedapp/tests.py (revision 17460)
+@@ -1,3 +1,4 @@
++from datetime import date
+ from django.test import TestCase
+
+ from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint
+@@ -281,4 +282,11 @@
+ # evaluated as list generation swallows TypeError in CPython.
+ sql = str(qs.query)
+
++ def test16_annotated_date_queryset(self):
++ "Ensure annotated date querysets work if spatial backend is used. See #14648."
++ birth_years = [dt.year for dt in
++ list(Author.objects.annotate(num_books=Count('books')).dates('dob', 'year'))]
++ birth_years.sort()
++ self.assertEqual([1950, 1974], birth_years)
++
+ # TODO: Related tests for KML, GML, and distance lookups.
+Index: django/contrib/gis/tests/relatedapp/models.py
+===================================================================
+--- django/contrib/gis/tests/relatedapp/models.py (revision 16771)
++++ django/contrib/gis/tests/relatedapp/models.py (revision 17460)
+@@ -36,6 +36,7 @@
+ # These use the GeoManager but do not have any geographic fields.
+ class Author(models.Model):
+ name = models.CharField(max_length=100)
++ dob = models.DateField()
+ objects = models.GeoManager()
+
+ class Article(models.Model):
+Index: django/contrib/sites/management.py
+===================================================================
+--- django/contrib/sites/management.py (revision 16771)
++++ django/contrib/sites/management.py (revision 17460)
+@@ -3,15 +3,34 @@
+ """
+
+ from django.db.models import signals
++from django.db import connections
++from django.db import router
+ from django.contrib.sites.models import Site
+ from django.contrib.sites import models as site_app
++from django.core.management.color import no_style
+
+ def create_default_site(app, created_models, verbosity, db, **kwargs):
+- if Site in created_models:
++ # Only create the default sites in databases where Django created the table
++ if Site in created_models and router.allow_syncdb(db, Site) :
++ # The default settings set SITE_ID = 1, and some tests in Django's test
++ # suite rely on this value. However, if database sequences are reused
++ # (e.g. in the test suite after flush/syncdb), it isn't guaranteed that
++ # the next id will be 1, so we coerce it. See #15573 and #16353. This
++ # can also crop up outside of tests - see #15346.
+ if verbosity >= 2:
+ print "Creating example.com Site object"
+- s = Site(domain="example.com", name="example.com")
+- s.save(using=db)
++ Site(pk=1, domain="example.com", name="example.com").save(using=db)
++
++ # We set an explicit pk instead of relying on auto-incrementation,
++ # so we need to reset the database sequence.
++ sequence_sql = connections[db].ops.sequence_reset_sql(no_style(), [Site])
++ if sequence_sql:
++ if verbosity >= 2:
++ print "Resetting sequence"
++ cursor = connections[db].cursor()
++ for command in sequence_sql:
++ cursor.execute(command)
++
+ Site.objects.clear_cache()
+
+ signals.post_syncdb.connect(create_default_site, sender=site_app)
+Index: django/contrib/sites/tests.py
+===================================================================
+--- django/contrib/sites/tests.py (revision 16771)
++++ django/contrib/sites/tests.py (revision 17460)
+@@ -15,6 +15,12 @@
+ def tearDown(self):
+ Site._meta.installed = self.old_Site_meta_installed
+
++ def test_save_another(self):
++ # Regression for #17415
++ # On some backends the sequence needs reset after save with explicit ID.
++ # Test that there is no sequence collisions by saving another site.
++ Site(domain="example2.com", name="example2.com").save()
++
+ def test_site_manager(self):
+ # Make sure that get_current() does not return a deleted Site object.
+ s = Site.objects.get_current()
+Index: django/contrib/admin/media/css/forms.css
+===================================================================
+--- django/contrib/admin/media/css/forms.css (revision 16771)
++++ django/contrib/admin/media/css/forms.css (revision 17460)
+@@ -352,9 +352,3 @@
+ .empty-form {
+ display: none;
+ }
+-
+-/* IE7 specific bug fixes */
+-
+-.submit-row input {
+- float: right;
+-}
+\ No newline at end of file
+Index: tests/modeltests/validators/tests.py
+===================================================================
+--- tests/modeltests/validators/tests.py (revision 16771)
++++ tests/modeltests/validators/tests.py (revision 17460)
+@@ -28,6 +28,9 @@
+ (validate_email, 'abc', ValidationError),
+ (validate_email, 'a @x.cz', ValidationError),
+ (validate_email, 'something@@somewhere.com', ValidationError),
++ # Quoted-string format (CR not allowed)
++ (validate_email, '"\\\011"@here.com', None),
++ (validate_email, '"\\\012"@here.com', ValidationError),
+
+ (validate_slug, 'slug-ok', None),
+ (validate_slug, 'longer-slug-still-ok', None),
+Index: tests/regressiontests/utils/http.py
+===================================================================
+--- tests/regressiontests/utils/http.py (revision 16771)
++++ tests/regressiontests/utils/http.py (revision 17460)
+@@ -1,5 +1,7 @@
+ from django.utils import http
+ from django.utils import unittest
++from django.http import HttpResponse, utils
++from django.test import RequestFactory
+
+ class TestUtilsHttp(unittest.TestCase):
+
+@@ -21,3 +23,49 @@
+ self.assertFalse(http.same_origin('http://foo.com', 'http://foo.com.evil.com'))
+ # Different port
+ self.assertFalse(http.same_origin('http://foo.com:8000', 'http://foo.com:8001'))
++
++ def test_fix_IE_for_vary(self):
++ """
++ Regression for #16632.
++
++ `fix_IE_for_vary` shouldn't crash when there's no Content-Type header.
++ """
++
++ # functions to generate responses
++ def response_with_unsafe_content_type():
++ r = HttpResponse(content_type="text/unsafe")
++ r['Vary'] = 'Cookie'
++ return r
++
++ def no_content_response_with_unsafe_content_type():
++ # 'Content-Type' always defaulted, so delete it
++ r = response_with_unsafe_content_type()
++ del r['Content-Type']
++ return r
++
++ # request with & without IE user agent
++ rf = RequestFactory()
++ request = rf.get('/')
++ ie_request = rf.get('/', HTTP_USER_AGENT='MSIE')
++
++ # not IE, unsafe_content_type
++ response = response_with_unsafe_content_type()
++ utils.fix_IE_for_vary(request, response)
++ self.assertTrue('Vary' in response)
++
++ # IE, unsafe_content_type
++ response = response_with_unsafe_content_type()
++ utils.fix_IE_for_vary(ie_request, response)
++ self.assertFalse('Vary' in response)
++
++ # not IE, no_content
++ response = no_content_response_with_unsafe_content_type()
++ utils.fix_IE_for_vary(request, response)
++ self.assertTrue('Vary' in response)
++
++ # IE, no_content
++ response = no_content_response_with_unsafe_content_type()
++ utils.fix_IE_for_vary(ie_request, response)
++ self.assertFalse('Vary' in response)
++
++
+Index: tests/regressiontests/httpwrappers/tests.py
+===================================================================
+--- tests/regressiontests/httpwrappers/tests.py (revision 16771)
++++ tests/regressiontests/httpwrappers/tests.py (revision 17460)
+@@ -281,3 +281,9 @@
+ Test that a single non-standard cookie name doesn't affect all cookies. Ticket #13007.
+ """
+ self.assertTrue('good_cookie' in parse_cookie('good_cookie=yes;bad:cookie=yes').keys())
++
++ def test_repeated_nonstandard_keys(self):
++ """
++ Test that a repeated non-standard name doesn't affect all cookies. Ticket #15852
++ """
++ self.assertTrue('good_cookie' in parse_cookie('a,=b; a,=c; good_cookie=yes').keys())
+Index: docs/index.txt
+===================================================================
+--- docs/index.txt (revision 16771)
++++ docs/index.txt (revision 17460)
+@@ -28,7 +28,7 @@
+ .. _archives of the django-users mailing list: http://groups.google.com/group/django-users/
+ .. _post a question: http://groups.google.com/group/django-users/
+ .. _#django IRC channel: irc://irc.freenode.net/django
+-.. _IRC logs: http://botland.oebfare.com/logger/django/
++.. _IRC logs: http://django-irc-logs.com/
+ .. _ticket tracker: http://code.djangoproject.com/
+
+ First steps
+Index: docs/intro/tutorial01.txt
+===================================================================
+--- docs/intro/tutorial01.txt (revision 16771)
++++ docs/intro/tutorial01.txt (revision 17460)
+@@ -59,7 +59,7 @@
+ can be run as a program. To do this, open Terminal.app and navigate (using
+ the ``cd`` command) to the directory where :doc:`django-admin.py
+ </ref/django-admin>` is installed, then run the command
+- ``chmod +x django-admin.py``.
++ ``sudo chmod +x django-admin.py``.
+
+ .. note::
+
+@@ -692,10 +692,9 @@
+
+ For more information on model relations, see :doc:`Accessing related objects
+ </ref/models/relations>`. For more on how to use double underscores to perform
+-field lookups via the API, see `Field lookups`__. For full details on the
+-database API, see our :doc:`Database API reference </topics/db/queries>`.
++field lookups via the API, see :ref:`Field lookups <field-lookups-intro>`. For
++full details on the database API, see our :doc:`Database API reference
++</topics/db/queries>`.
+
+-__ http://docs.djangoproject.com/en/1.2/topics/db/queries/#field-lookups
+-
+ When you're comfortable with the API, read :doc:`part 2 of this tutorial
+ </intro/tutorial02>` to get Django's automatic admin working.
+Index: docs/intro/tutorial02.txt
+===================================================================
+--- docs/intro/tutorial02.txt (revision 16771)
++++ docs/intro/tutorial02.txt (revision 17460)
+@@ -40,22 +40,22 @@
+
+ .. parsed-literal::
+
+- from django.conf.urls.defaults import *
++ from django.conf.urls.defaults import patterns, include, url
+
+ # Uncomment the next two lines to enable the admin:
+ **from django.contrib import admin**
+ **admin.autodiscover()**
+
+ urlpatterns = patterns('',
+- # Example:
+- # (r'^mysite/', include('mysite.foo.urls')),
++ # Examples:
++ # url(r'^$', 'mysite.views.home', name='home'),
++ # url(r'^mysite/', include('mysite.foo.urls')),
+
+- # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
+- # to INSTALLED_APPS to enable admin documentation:
+- # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
++ # Uncomment the admin/doc line below to enable admin documentation:
++ # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
+
+ # Uncomment the next line to enable the admin:
+- **(r'^admin/', include(admin.site.urls)),**
++ **url(r'^admin/', include(admin.site.urls)),**
+ )
+
+ (The bold lines are the ones that needed to be uncommented.)
+Index: docs/intro/tutorial03.txt
+===================================================================
+--- docs/intro/tutorial03.txt (revision 16771)
++++ docs/intro/tutorial03.txt (revision 17460)
+@@ -78,17 +78,17 @@
+
+ Time for an example. Edit ``mysite/urls.py`` so it looks like this::
+
+- from django.conf.urls.defaults import *
++ from django.conf.urls.defaults import patterns, include, url
+
+ from django.contrib import admin
+ admin.autodiscover()
+
+ urlpatterns = patterns('',
+- (r'^polls/$', 'polls.views.index'),
+- (r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
+- (r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
+- (r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
+- (r'^admin/', include(admin.site.urls)),
++ url(r'^polls/$', 'polls.views.index'),
++ url(r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
++ url(r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
++ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
++ url(r'^admin/', include(admin.site.urls)),
+ )
+
+ This is worth a review. When somebody requests a page from your Web site -- say,
+@@ -112,7 +112,7 @@
+ -- unless you have a sick sense of humor, in which case you can do something
+ like this::
+
+- (r'^polls/latest\.php$', 'polls.views.index'),
++ url(r'^polls/latest\.php$', 'polls.views.index'),
+
+ But, don't do that. It's silly.
+
+@@ -357,23 +357,24 @@
+ Write a 404 (page not found) view
+ =================================
+
+-When you raise :exc:`~django.http.Http404` from within a view, Django will load
+-a special view devoted to handling 404 errors. It finds it by looking for the
+-variable ``handler404``, which is a string in Python dotted syntax -- the same
+-format the normal URLconf callbacks use. A 404 view itself has nothing special:
+-It's just a normal view.
++When you raise :exc:`~django.http.Http404` from within a view, Django
++will load a special view devoted to handling 404 errors. It finds it
++by looking for the variable ``handler404`` in your root URLconf (and
++only in your root URLconf; setting ``handler404`` anywhere else will
++have no effect), which is a string in Python dotted syntax -- the same
++format the normal URLconf callbacks use. A 404 view itself has nothing
++special: It's just a normal view.
+
+-You normally won't have to bother with writing 404 views. By default, URLconfs
+-have the following line up top::
++You normally won't have to bother with writing 404 views. If you don't set
++``handler404``, the built-in view :func:`django.views.defaults.page_not_found`
++is used by default. In this case, you still have one obligation: To create a
++``404.html`` template in the root of your template directory. The default 404
++view will use that template for all 404 errors. If :setting:`DEBUG` is set to
++``False`` (in your settings module) and if you didn't create a ``404.html``
++file, an ``Http500`` is raised instead. So remember to create a ``404.html``.
+
+- from django.conf.urls.defaults import *
++A couple more things to note about 404 views:
+
+-That takes care of setting ``handler404`` in the current module. As you can see
+-in ``django/conf/urls/defaults.py``, ``handler404`` is set to
+-:func:`django.views.defaults.page_not_found` by default.
+-
+-Four more things to note about 404 views:
+-
+ * If :setting:`DEBUG` is set to ``True`` (in your settings module) then your
+ 404 view will never be used (and thus the ``404.html`` template will never
+ be rendered) because the traceback will be displayed instead.
+@@ -381,21 +382,12 @@
+ * The 404 view is also called if Django doesn't find a match after checking
+ every regular expression in the URLconf.
+
+- * If you don't define your own 404 view -- and simply use the default, which
+- is recommended -- you still have one obligation: To create a ``404.html``
+- template in the root of your template directory. The default 404 view will
+- use that template for all 404 errors.
+-
+- * If :setting:`DEBUG` is set to ``False`` (in your settings module) and if
+- you didn't create a ``404.html`` file, an ``Http500`` is raised instead.
+- So remember to create a ``404.html``.
+-
+ Write a 500 (server error) view
+ ===============================
+
+-Similarly, URLconfs may define a ``handler500``, which points to a view to call
+-in case of server errors. Server errors happen when you have runtime errors in
+-view code.
++Similarly, your root URLconf may define a ``handler500``, which points
++to a view to call in case of server errors. Server errors happen when
++you have runtime errors in view code.
+
+ Use the template system
+ =======================
+@@ -432,10 +424,10 @@
+ the URLconf, you may notice there's a fair bit of redundancy in it::
+
+ urlpatterns = patterns('',
+- (r'^polls/$', 'polls.views.index'),
+- (r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
+- (r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
+- (r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
++ url(r'^polls/$', 'polls.views.index'),
++ url(r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
++ url(r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
++ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
+ )
+
+ Namely, ``polls.views`` is in every callback.
+@@ -445,10 +437,10 @@
+ first argument to :func:`~django.conf.urls.defaults.patterns`, like so::
+
+ urlpatterns = patterns('polls.views',
+- (r'^polls/$', 'index'),
+- (r'^polls/(?P<poll_id>\d+)/$', 'detail'),
+- (r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
+- (r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
++ url(r'^polls/$', 'index'),
++ url(r'^polls/(?P<poll_id>\d+)/$', 'detail'),
++ url(r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
++ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
+ )
+
+ This is functionally identical to the previous formatting. It's just a bit
+@@ -459,20 +451,20 @@
+ :func:`~django.conf.urls.defaults.patterns`. Your full ``mysite/urls.py`` might
+ now look like this::
+
+- from django.conf.urls.defaults import *
++ from django.conf.urls.defaults import patterns, include, url
+
+ from django.contrib import admin
+ admin.autodiscover()
+
+ urlpatterns = patterns('polls.views',
+- (r'^polls/$', 'index'),
+- (r'^polls/(?P<poll_id>\d+)/$', 'detail'),
+- (r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
+- (r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
++ url(r'^polls/$', 'index'),
++ url(r'^polls/(?P<poll_id>\d+)/$', 'detail'),
++ url(r'^polls/(?P<poll_id>\d+)/results/$', 'results'),
++ url(r'^polls/(?P<poll_id>\d+)/vote/$', 'vote'),
+ )
+
+ urlpatterns += patterns('',
+- (r'^admin/', include(admin.site.urls)),
++ url(r'^admin/', include(admin.site.urls)),
+ )
+
+ Decoupling the URLconfs
+@@ -502,8 +494,8 @@
+ admin.autodiscover()
+
+ urlpatterns = patterns('',
+- (r'^polls/', include('polls.urls')),
+- (r'^admin/', include(admin.site.urls)),
++ url(r'^polls/', include('polls.urls')),
++ url(r'^admin/', include(admin.site.urls)),
+ )
+
+ :func:`~django.conf.urls.defaults.include` simply references another URLconf.
+@@ -526,13 +518,13 @@
+ lines registering the admin site. Your ``polls/urls.py`` file should now look like
+ this::
+
+- from django.conf.urls.defaults import *
++ from django.conf.urls.defaults import patterns, include, url
+
+ urlpatterns = patterns('polls.views',
+- (r'^$', 'index'),
+- (r'^(?P<poll_id>\d+)/$', 'detail'),
+- (r'^(?P<poll_id>\d+)/results/$', 'results'),
+- (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
++ url(r'^$', 'index'),
++ url(r'^(?P<poll_id>\d+)/$', 'detail'),
++ url(r'^(?P<poll_id>\d+)/results/$', 'results'),
++ url(r'^(?P<poll_id>\d+)/vote/$', 'vote'),
+ )
+
+ The idea behind :func:`~django.conf.urls.defaults.include` and URLconf
+Index: docs/intro/index.txt
+===================================================================
+--- docs/intro/index.txt (revision 16771)
++++ docs/intro/index.txt (revision 17460)
+@@ -31,6 +31,6 @@
+
+ .. _python: http://python.org/
+ .. _list of Python resources for non-programmers: http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
+- .. _dive into python: http://diveintopython.org/
++ .. _dive into python: http://diveintopython.net/
+ .. _dead-tree version: http://www.amazon.com/exec/obidos/ASIN/1590593561/ref=nosim/jacobian20
+ .. _books about Python: http://wiki.python.org/moin/PythonBooks
+\ No newline at end of file
+Index: docs/intro/tutorial04.txt
+===================================================================
+--- docs/intro/tutorial04.txt (revision 16771)
++++ docs/intro/tutorial04.txt (revision 17460)
+@@ -218,13 +218,13 @@
+ First, open the ``polls/urls.py`` URLconf. It looks like this, according to the
+ tutorial so far::
+
+- from django.conf.urls.defaults import *
++ from django.conf.urls.defaults import patterns, include, url
+
+ urlpatterns = patterns('polls.views',
+- (r'^$', 'index'),
+- (r'^(?P<poll_id>\d+)/$', 'detail'),
+- (r'^(?P<poll_id>\d+)/results/$', 'results'),
+- (r'^(?P<poll_id>\d+)/vote/$', 'vote'),
++ url(r'^$', 'index'),
++ url(r'^(?P<poll_id>\d+)/$', 'detail'),
++ url(r'^(?P<poll_id>\d+)/results/$', 'results'),
++ url(r'^(?P<poll_id>\d+)/vote/$', 'vote'),
+ )
+
+ Change it like so::
+@@ -234,12 +234,12 @@
+ from polls.models import Poll
+
+ urlpatterns = patterns('',
+- (r'^$',
++ url(r'^$',
+ ListView.as_view(
+ queryset=Poll.objects.order_by('-pub_date')[:5],
+ context_object_name='latest_poll_list',
+ template_name='polls/index.html')),
+- (r'^(?P<pk>\d+)/$',
++ url(r'^(?P<pk>\d+)/$',
+ DetailView.as_view(
+ model=Poll,
+ template_name='polls/detail.html')),
+@@ -248,7 +248,7 @@
+ model=Poll,
+ template_name='polls/results.html'),
+ name='poll_results'),
+- (r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
++ url(r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
+ )
+
+ We're using two generic views here:
+Index: docs/internals/release-process.txt
+===================================================================
+--- docs/internals/release-process.txt (revision 16771)
++++ docs/internals/release-process.txt (revision 17460)
+@@ -99,6 +99,13 @@
+ * Security fixes will be applied to the current trunk and the previous two
+ minor releases.
+
++* Documentation fixes will generally be more freely backported to the last
++ release branch (at the discretion of the committer), and don't need to meet
++ the "critical fixes only" bar as it's highly advantageous to have the docs
++ for the last release be up-to-date and correct, and the downside of
++ backporting (risk of introducing regressions) is much less of a concern
++ with doc fixes.
++
+ As a concrete example, consider a moment in time halfway between the release of
+ Django 1.3 and 1.4. At this point in time:
+
+@@ -111,6 +118,9 @@
+ ``1.2.X`` branch. Security fixes will trigger the release of ``1.3.1``,
+ ``1.2.1``, etc.
+
++* Documentation fixes will be applied to trunk, and if easily backported, to
++ the ``1.3.X`` branch.
++
+ .. _release-process:
+
+ Release process
+Index: docs/internals/deprecation.txt
+===================================================================
+--- docs/internals/deprecation.txt (revision 16771)
++++ docs/internals/deprecation.txt (revision 17460)
+@@ -177,6 +177,12 @@
+ required to end with a trailing slash to ensure there is a consistent
+ way to combine paths in templates.
+
++ * Translations located under the so-called *project path* will be
++ ignored during the translation building process performed at runtime.
++ The :setting:`LOCALE_PATHS` setting can be used for the same task by
++ including the filesystem path to a ``locale`` directory containing
++ non-app-specific translations in its value.
++
+ * 2.0
+ * ``django.views.defaults.shortcut()``. This function has been moved
+ to ``django.contrib.contenttypes.views.shortcut()`` as part of the
+Index: docs/howto/deployment/modpython.txt
+===================================================================
+--- docs/howto/deployment/modpython.txt (revision 16771)
++++ docs/howto/deployment/modpython.txt (revision 17460)
+@@ -293,11 +293,14 @@
+ arrangement. You're responsible for setting up Apache, or whichever media
+ server you're using, to serve the admin files.
+
+-The admin files live in (:file:`django/contrib/admin/static/admin`) of the
++The admin files live in (:file:`django/contrib/admin/media/admin`) of the
+ Django distribution.
+
+-We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle
+-the admin files, but here are two other approaches:
++We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle the
++admin files (this means using the :djadmin:`collectstatic` management command
++to collect the static files in :setting:`STATIC_ROOT`, and then configuring
++your webserver to serve :setting:`STATIC_ROOT` at :setting:`STATIC_URL`), but
++here are two other approaches:
+
+ 1. Create a symbolic link to the admin static files from within your
+ document root.
+Index: docs/howto/deployment/modwsgi.txt
+===================================================================
+--- docs/howto/deployment/modwsgi.txt (revision 16771)
++++ docs/howto/deployment/modwsgi.txt (revision 17460)
+@@ -127,11 +127,14 @@
+ arrangement. You're responsible for setting up Apache, or whichever media
+ server you're using, to serve the admin files.
+
+-The admin files live in (:file:`django/contrib/admin/static/admin`) of the
++The admin files live in (:file:`django/contrib/admin/media/admin`) of the
+ Django distribution.
+
+-We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle
+-the admin files, but here are two other approaches:
++We **strongly** recommend using :mod:`django.contrib.staticfiles` to handle the
++admin files (this means using the :djadmin:`collectstatic` management command
++to collect the static files in :setting:`STATIC_ROOT`, and then configuring
++your webserver to serve :setting:`STATIC_ROOT` at :setting:`STATIC_URL`), but
++here are two other approaches:
+
+ 1. Create a symbolic link to the admin static files from within your
+ document root.
+Index: docs/topics/auth.txt
+===================================================================
+--- docs/topics/auth.txt (revision 16771)
++++ docs/topics/auth.txt (revision 17460)
+@@ -1251,17 +1251,20 @@
+ ...
+ class Meta:
+ permissions = (
+- ("can_view", "Can see available tasks"),
+- ("can_change_status", "Can change the status of tasks"),
+- ("can_close", "Can remove a task by setting its status as closed"),
++ ("view_task", "Can see available tasks"),
++ ("change_task_status", "Can change the status of tasks"),
++ ("close_task", "Can remove a task by setting its status as closed"),
+ )
+
+ The only thing this does is create those extra permissions when you run
+ :djadmin:`manage.py syncdb <syncdb>`. Your code is in charge of checking the
+ value of these permissions when an user is trying to access the functionality
+ provided by the application (viewing tasks, changing the status of tasks,
+-closing tasks.)
++closing tasks.) Continuing the above example, the following checks if a user may
++view tasks::
+
++ user.has_perm('app.view_task')
++
+ API reference
+ -------------
+
+Index: docs/topics/http/urls.txt
+===================================================================
+--- docs/topics/http/urls.txt (revision 16771)
++++ docs/topics/http/urls.txt (revision 17460)
+@@ -54,6 +54,10 @@
+ :class:`~django.http.HttpRequest` as its first argument and any values
+ captured in the regex as remaining arguments.
+
++ 5. If no regex matches, or if an exception is raised during any
++ point in this process, Django invokes an appropriate
++ error-handling view. See `Error handling`_ below.
++
+ Example
+ =======
+
+@@ -99,10 +103,10 @@
+ * ``/articles/2003`` would not match any of these patterns, because each
+ pattern requires that the URL end with a slash.
+
+- * ``/articles/2003/03/3/`` would match the final pattern. Django would call
+- the function ``news.views.article_detail(request, '2003', '03', '3')``.
++ * ``/articles/2003/03/03/`` would match the final pattern. Django would call
++ the function ``news.views.article_detail(request, '2003', '03', '03')``.
+
+-.. _Dive Into Python's explanation: http://diveintopython.org/regular_expressions/street_addresses.html#re.matching.2.3
++.. _Dive Into Python's explanation: http://diveintopython.net/regular_expressions/street_addresses.html#re.matching.2.3
+
+ Named groups
+ ============
+@@ -123,7 +127,7 @@
+ (r'^articles/2003/$', 'news.views.special_case_2003'),
+ (r'^articles/(?P<year>\d{4})/$', 'news.views.year_archive'),
+ (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/$', 'news.views.month_archive'),
+- (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d+)/$', 'news.views.article_detail'),
++ (r'^articles/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', 'news.views.article_detail'),
+ )
+
+ This accomplishes exactly the same thing as the previous example, with one
+@@ -134,8 +138,8 @@
+ ``news.views.month_archive(request, year='2005', month='03')``, instead
+ of ``news.views.month_archive(request, '2005', '03')``.
+
+- * A request to ``/articles/2003/03/3/`` would call the function
+- ``news.views.article_detail(request, year='2003', month='03', day='3')``.
++ * A request to ``/articles/2003/03/03/`` would call the function
++ ``news.views.article_detail(request, year='2003', month='03', day='03')``.
+
+ In practice, this means your URLconfs are slightly more explicit and less prone
+ to argument-order bugs -- and you can reorder the arguments in your views'
+@@ -246,6 +250,31 @@
+ ``patterns()`` and is only relevant when you're passing a string as the
+ ``view`` parameter.
+
++include
++-------
++
++.. function:: include(<module or pattern_list>)
++
++A function that takes a full Python import path to another URLconf module that
++should be "included" in this place.
++
++:func:`include` also accepts as an argument an iterable that returns URL
++patterns.
++
++See `Including other URLconfs`_ below.
++
++Error handling
++==============
++
++When Django can't find a regex matching the requested URL, or when an
++exception is raised, Django will invoke an error-handling view. The
++views to use for these cases are specified by two variables which can
++be set in your root URLconf. Setting these variables in any other
++URLconf will have no effect.
++
++See the documentation on :ref:`customizing error views
++<customizing-error-views>` for more details.
++
+ handler404
+ ----------
+
+@@ -275,19 +304,6 @@
+ .. versionchanged:: 1.2
+ Previous versions of Django only accepted strings representing import paths.
+
+-include
+--------
+-
+-.. function:: include(<module or pattern_list>)
+-
+-A function that takes a full Python import path to another URLconf module that
+-should be "included" in this place.
+-
+-:func:`include` also accepts as an argument an iterable that returns URL
+-patterns.
+-
+-See `Including other URLconfs`_ below.
+-
+ Notes on capturing text in URLs
+ ===============================
+
+@@ -420,8 +436,8 @@
+ from django.conf.urls.defaults import *
+
+ extra_patterns = patterns('',
+- url(r'reports/(?P<id>\d+)/$', 'credit.views.report', name='credit-reports'),
+- url(r'charge/$', 'credit.views.charge', name='credit-charge'),
++ url(r'^reports/(?P<id>\d+)/$', 'credit.views.report', name='credit-reports'),
++ url(r'^charge/$', 'credit.views.charge', name='credit-charge'),
+ )
+
+ urlpatterns = patterns('',
+Index: docs/topics/http/views.txt
+===================================================================
+--- docs/topics/http/views.txt (revision 16771)
++++ docs/topics/http/views.txt (revision 17460)
+@@ -122,6 +122,8 @@
+ template that is displayed when a 404 error is raised. This template should be
+ called ``404.html`` and located in the top level of your template tree.
+
++.. _customizing-error-views:
++
+ Customizing error views
+ =======================
+
+Index: docs/topics/i18n/internationalization.txt
+===================================================================
+--- docs/topics/i18n/internationalization.txt (revision 16771)
++++ docs/topics/i18n/internationalization.txt (revision 17460)
+@@ -477,7 +477,7 @@
+
+ You can use multiple expressions inside a single ``blocktrans`` tag::
+
+- {% blocktrans with book_t=book|title and author_t=author|title %}
++ {% blocktrans with book_t=book|title author_t=author|title %}
+ This is {{ book_t }} by {{ author_t }}
+ {% endblocktrans %}
+
+Index: docs/topics/cache.txt
+===================================================================
+--- docs/topics/cache.txt (revision 16771)
++++ docs/topics/cache.txt (revision 17460)
+@@ -99,8 +99,9 @@
+ on your chosen memcached binding)
+
+ * Set :setting:`LOCATION <CACHES-LOCATION>` to ``ip:port`` values,
+- where ``ip`` is the IP address of the Memcached daemon and
+- ``port`` is the port on which Memcached is running.
++ where ``ip`` is the IP address of the Memcached daemon and ``port`` is the
++ port on which Memcached is running, or to a ``unix:path`` value, where
++ ``path`` is the path to a Memcached Unix socket file.
+
+ In this example, Memcached is running on localhost (127.0.0.1) port 11211, using
+ the ``python-memcached`` binding::
+@@ -112,6 +113,16 @@
+ }
+ }
+
++In this example, Memcached is available through a local Unix socket file
++:file:`/tmp/memcached.sock` using the ``python-memcached`` binding::
++
++ CACHES = {
++ 'default': {
++ 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
++ 'LOCATION': 'unix:/tmp/memcached.sock',
++ }
++ }
++
+ One excellent feature of Memcached is its ability to share cache over multiple
+ servers. This means you can run Memcached daemons on multiple machines, and the
+ program will treat the group of machines as a *single* cache, without the need
+@@ -526,9 +537,10 @@
+ requested, subsequent requests to that URL will use the cache.
+
+ ``cache_page`` can also take an optional keyword argument, ``cache``,
+-which directs the decorator to use a specific cache alias when caching view
+-results. By default, the ``default`` alias will be used, but you can specify
+-any cache alias you want::
++which directs the decorator to use a specific cache (from your
++:setting:`CACHES` setting) when caching view results. By default, the
++``default`` cache will be used, but you can specify any cache you
++want::
+
+ @cache_page(60 * 15, cache="special_cache")
+ def my_view(request):
+Index: docs/topics/db/models.txt
+===================================================================
+--- docs/topics/db/models.txt (revision 16771)
++++ docs/topics/db/models.txt (revision 17460)
+@@ -324,11 +324,10 @@
+ should work; all are optional.
+
+ For details on accessing backwards-related objects, see the
+- `Following relationships backward example`_.
+-
++ :ref:`Following relationships backward example <backwards-related-objects>`.
++
+ For sample code, see the `Many-to-one relationship model tests`_.
+
+- .. _Following relationships backward example: http://docs.djangoproject.com/en/dev/topics/db/queries/#backwards-related-objects
+ .. _Many-to-one relationship model tests: http://code.djangoproject.com/browser/django/trunk/tests/modeltests/many_to_one
+
+ Many-to-many relationships
+Index: docs/topics/db/sql.txt
+===================================================================
+--- docs/topics/db/sql.txt (revision 16771)
++++ docs/topics/db/sql.txt (revision 17460)
+@@ -236,6 +236,30 @@
+ # Your code here...
+ transaction.commit_unless_managed(using='my_db_alias')
+
++By default, the Python DB API will return results without their field
++names, which means you end up with a ``list`` of values, rather than a
++``dict``. At a small performance cost, you can return results as a
++``dict`` by using something like this::
++
++ def dictfetchall(cursor):
++ "Returns all rows from a cursor as a dict"
++ desc = cursor.description
++ return [
++ dict(zip([col[0] for col in desc], row))
++ for row in cursor.fetchall()
++ ]
++
++Here is an example of the difference between the two::
++
++ >>> cursor.execute("SELECT id, parent_id from test LIMIT 2");
++ >>> cursor.fetchall()
++ ((54360982L, None), (54360880L, None))
++
++ >>> cursor.execute("SELECT id, parent_id from test LIMIT 2");
++ >>> dictfetchall(cursor)
++ [{'parent_id': None, 'id': 54360982L}, {'parent_id': None, 'id': 54360880L}]
++
++
+ .. _transactions-and-raw-sql:
+
+ Transactions and raw SQL
+Index: docs/topics/forms/modelforms.txt
+===================================================================
+--- docs/topics/forms/modelforms.txt (revision 16771)
++++ docs/topics/forms/modelforms.txt (revision 17460)
+@@ -332,14 +332,18 @@
+ .. note::
+
+ If you specify ``fields`` or ``exclude`` when creating a form with
+- ``ModelForm``, then the fields that are not in the resulting form will not
+- be set by the form's ``save()`` method. Django will prevent any attempt to
+- save an incomplete model, so if the model does not allow the missing fields
+- to be empty, and does not provide a default value for the missing fields,
+- any attempt to ``save()`` a ``ModelForm`` with missing fields will fail.
+- To avoid this failure, you must instantiate your model with initial values
+- for the missing, but required fields::
++ ``ModelForm``, then the fields that are not in the resulting form
++ will not be set by the form's ``save()`` method. Also, if you
++ manually add the excluded fields back to the form, they will not
++ be initialized from the model instance.
+
++ Django will prevent any attempt to save an incomplete model, so if
++ the model does not allow the missing fields to be empty, and does
++ not provide a default value for the missing fields, any attempt to
++ ``save()`` a ``ModelForm`` with missing fields will fail. To
++ avoid this failure, you must instantiate your model with initial
++ values for the missing, but required fields::
++
+ author = Author(title='Mr')
+ form = PartialAuthorForm(request.POST, instance=author)
+ form.save()
+@@ -633,6 +637,12 @@
+ instance won't be saved to the database and won't be included in the return
+ value (``instances``, in the above example).
+
++When fields are missing from the form (for example because they have
++been excluded), these fields will not be set by the ``save()``
++method. You can find more information about this restriction, which
++also holds for regular ``ModelForms``, in `Using a subset of fields on
++the form`_.
++
+ Pass ``commit=False`` to return the unsaved model instances::
+
+ # don't save to the database
+Index: docs/topics/class-based-views.txt
+===================================================================
+--- docs/topics/class-based-views.txt (revision 16771)
++++ docs/topics/class-based-views.txt (revision 17460)
+@@ -380,7 +380,7 @@
+ class PublisherBookListView(ListView):
+
+ context_object_name = "book_list"
+- template_name = "books/books_by_publisher.html",
++ template_name = "books/books_by_publisher.html"
+
+ def get_queryset(self):
+ publisher = get_object_or_404(Publisher, name__iexact=self.args[0])
+@@ -396,7 +396,7 @@
+ class PublisherBookListView(ListView):
+
+ context_object_name = "book_list"
+- template_name = "books/books_by_publisher.html",
++ template_name = "books/books_by_publisher.html"
+
+ def get_queryset(self):
+ self.publisher = get_object_or_404(Publisher, name__iexact=self.args[0])
+Index: docs/topics/testing.txt
+===================================================================
+--- docs/topics/testing.txt (revision 16771)
++++ docs/topics/testing.txt (revision 17460)
+@@ -1586,7 +1586,7 @@
+ Skip the decorated test if the named database feature is *not*
+ supported.
+
+-For example, the following test will not be executed if the database
++For example, the following test will only be executed if the database
+ supports transactions (e.g., it would run under PostgreSQL, but *not*
+ under MySQL with MyISAM tables)::
+
+Index: docs/topics/templates.txt
+===================================================================
+--- docs/topics/templates.txt (revision 16771)
++++ docs/topics/templates.txt (revision 17460)
+@@ -555,6 +555,8 @@
+ the ``escape`` filter *double-escaping* data -- the ``escape`` filter does not
+ affect auto-escaped variables.
+
++.. _string-literals-and-automatic-escaping:
++
+ String literals and automatic escaping
+ --------------------------------------
+
+Index: docs/topics/settings.txt
+===================================================================
+--- docs/topics/settings.txt (revision 16771)
++++ docs/topics/settings.txt (revision 17460)
+@@ -39,7 +39,7 @@
+ ``mysite.settings``. Note that the settings module should be on the
+ Python `import search path`_.
+
+-.. _import search path: http://diveintopython.org/getting_to_know_python/everything_is_an_object.html
++.. _import search path: http://diveintopython.net/getting_to_know_python/everything_is_an_object.html
+
+ The django-admin.py utility
+ ---------------------------
+Index: docs/releases/1.2.6.txt
+===================================================================
+--- docs/releases/1.2.6.txt (revision 0)
++++ docs/releases/1.2.6.txt (revision 17460)
+@@ -0,0 +1,16 @@
++==========================
++Django 1.2.6 release notes
++==========================
++
++*September 9, 2011*
++
++Welcome to Django 1.2.6!
++
++This is the sixth bugfix/security release in the Django 1.2 series, fixing
++several security issues present in Django 1.2.5. Django 1.2.6 is a
++recommended upgrade for all users of any Django release in the 1.2.X series.
++
++For a full list of issues addressed in this release, see the `security
++advisory`_.
++
++.. _security advisory: https://www.djangoproject.com/weblog/2011/sep/09/security-releases-issued/
+Index: docs/releases/1.2.7.txt
+===================================================================
+--- docs/releases/1.2.7.txt (revision 0)
++++ docs/releases/1.2.7.txt (revision 17460)
+@@ -0,0 +1,16 @@
++==========================
++Django 1.2.7 release notes
++==========================
++
++*September 10, 2011*
++
++Welcome to Django 1.2.7!
++
++This is the seventh bugfix/security release in the Django 1.2 series. It
++replaces Django 1.2.6 due to problems with the 1.2.6 release tarball.
++Django 1.2.7 is a recommended upgrade for all users of any Django release in
++the 1.2.X series.
++
++For more information, see the `release advisory`_.
++
++.. _release advisory: https://www.djangoproject.com/weblog/2011/sep/10/127/
+Index: docs/releases/index.txt
+===================================================================
+--- docs/releases/index.txt (revision 16771)
++++ docs/releases/index.txt (revision 17460)
+@@ -19,6 +19,7 @@
+ .. toctree::
+ :maxdepth: 1
+
++ 1.3.1
+ 1.3
+
+ 1.2 release
+@@ -26,6 +27,8 @@
+ .. toctree::
+ :maxdepth: 1
+
++ 1.2.7
++ 1.2.6
+ 1.2.5
+ 1.2.4
+ 1.2.2
+Index: docs/releases/0.95.txt
+===================================================================
+--- docs/releases/0.95.txt (revision 16771)
++++ docs/releases/0.95.txt (revision 17460)
+@@ -92,15 +92,15 @@
+ easy checklist_ for reference when undertaking the porting operation.
+
+ .. _Removing The Magic: http://code.djangoproject.com/wiki/RemovingTheMagic
+-.. _checklist: http://code.djangoproject.com/wiki/MagicRemovalCheatSheet1
++.. _checklist: http://code.djangoproject.com/wiki/MagicRemovalCheatSheet
+
+ Problem reports and getting help
+ ================================
+
+-Need help resolving a problem with Django? The documentation in the distribution
+-is also available online_ at the `Django Web site`_. The :doc:`FAQ </faq/index>`
+-document is especially recommended, as it contains a number of issues that come
+-up time and again.
++Need help resolving a problem with Django? The documentation in the
++distribution is also available :doc:`online </index>` at the `Django Web
++site`_. The :doc:`FAQ </faq/index>` document is especially recommended, as it
++contains a number of issues that come up time and again.
+
+ For more personalized help, the `django-users`_ mailing list is a very active
+ list, with more than 2,000 subscribers who can help you solve any sort of
+@@ -113,7 +113,6 @@
+ Django users and developers from around the world. Friendly people are usually
+ available at any hour of the day -- to help, or just to chat.
+
+-.. _online: http://www.djangoproject.com/documentation/0.95/
+ .. _Django Web site: http://www.djangoproject.com/
+ .. _django-users: http://groups.google.com/group/django-users
+
+Index: docs/releases/0.96.txt
+===================================================================
+--- docs/releases/0.96.txt (revision 16771)
++++ docs/releases/0.96.txt (revision 17460)
+@@ -50,12 +50,10 @@
+ maintained, and it will be removed in a future release of Django.
+
+ Also, note that some features, like the new :setting:`DATABASE_OPTIONS`
+-setting (see the `databases documentation`_ for details), are only
+-available on the "mysql" backend, and will not be made available for
++setting (see the :doc:`databases documentation </ref/databases>` for details),
++are only available on the "mysql" backend, and will not be made available for
+ "mysql_old".
+
+-.. _databases documentation: http://www.djangoproject.com/documentation/0.96/databases/
+-
+ Database constraint names changed
+ ---------------------------------
+
+@@ -164,11 +162,9 @@
+ for most common cases. We recommend that anyone new to form handling skip the
+ old forms system and start with the new.
+
+-For more information about ``django.newforms``, read the `newforms
+-documentation`_.
++For more information about ``django.newforms``, read the :doc:`newforms
++documentation </topics/forms/index>`.
+
+-.. _newforms documentation: http://www.djangoproject.com/documentation/0.96/newforms/
+-
+ URLconf improvements
+ --------------------
+
+@@ -216,20 +212,16 @@
+ ------------------
+
+ Django now includes a test framework so you can start transmuting fear into
+-boredom (with apologies to Kent Beck). You can write tests based on doctest_
+-or unittest_ and test your views with a simple test client.
++boredom (with apologies to Kent Beck). You can write tests based on
++:mod:`doctest` or :mod:`unittest` and test your views with a simple test client.
+
+ There is also new support for "fixtures" -- initial data, stored in any of the
+-supported `serialization formats`_, that will be loaded into your database at the
+-start of your tests. This makes testing with real data much easier.
++supported :doc:`serialization formats </topics/serialization>`, that will be
++loaded into your database at the start of your tests. This makes testing with
++real data much easier.
+
+-See `the testing documentation`_ for the full details.
++See :doc:`the testing documentation </topics/testing>` for the full details.
+
+-.. _doctest: http://docs.python.org/library/doctest.html
+-.. _unittest: http://docs.python.org/library/unittest.html
+-.. _the testing documentation: http://www.djangoproject.com/documentation/0.96/testing/
+-.. _serialization formats: http://www.djangoproject.com/documentation/0.96/serialization/
+-
+ Improvements to the admin interface
+ -----------------------------------
+
+Index: docs/releases/1.0.1.txt
+===================================================================
+--- docs/releases/1.0.1.txt (revision 16771)
++++ docs/releases/1.0.1.txt (revision 17460)
+@@ -6,10 +6,10 @@
+
+ This is the first "bugfix" release in the Django 1.0 series, improving
+ the stability and performance of the Django 1.0 codebase. As such,
+-Django 1.0.1 contains no new features (and, pursuant to `our
+-compatibility policy`_, maintains backwards compatibility with Django
+-1.0), but does contain a number of fixes and other
+-improvements. Django 1.0.1 is a recommended upgrade for any
++Django 1.0.1 contains no new features (and, pursuant to :doc:`our
++compatibility policy </misc/api-stability/>`, maintains backwards
++compatibility with Django 1.0), but does contain a number of fixes
++and other improvements. Django 1.0.1 is a recommended upgrade for any
+ development or deployment currently using or targeting Django 1.0.
+
+
+@@ -46,8 +46,9 @@
+
+ * A fix to the application of autoescaping for literal strings passed
+ to the ``join`` template filter. Previously, literal strings passed
+- to ``join`` were automatically escaped, contrary to `the documented
+- behavior for autoescaping and literal strings`_. Literal strings
++ to ``join`` were automatically escaped, contrary to :ref:`the
++ documented behavior for autoescaping and literal strings
++ <string-literals-and-automatic-escaping>`. Literal strings
+ passed to ``join`` are no longer automatically escaped, meaning you
+ must now manually escape them; this is an incompatibility if you
+ were relying on this bug, but not if you were relying on escaping
+@@ -60,6 +61,4 @@
+ documentation, including both corrections to existing documents and
+ expanded and new documentation.
+
+-.. _our compatibility policy: http://docs.djangoproject.com/en/dev/misc/api-stability/
+ .. _the Subversion log of the 1.0.X branch: http://code.djangoproject.com/log/django/branches/releases/1.0.X
+-.. _the documented behavior for autoescaping and literal strings: http://docs.djangoproject.com/en/dev/topics/templates/#string-literals-and-automatic-escaping
+Index: docs/releases/1.3.1.txt
+===================================================================
+--- docs/releases/1.3.1.txt (revision 0)
++++ docs/releases/1.3.1.txt (revision 17460)
+@@ -0,0 +1,16 @@
++==========================
++Django 1.3.1 release notes
++==========================
++
++*September 9, 2011*
++
++Welcome to Django 1.3.1!
++
++This is the first security release in the Django 1.3 series, fixing several
++security issues in Django 1.3. Django 1.3.1 is a recommended upgrade for
++all users of Django 1.3.
++
++For a full list of issues addressed in this release, see the `security
++advisory`_.
++
++.. _security advisory: https://www.djangoproject.com/weblog/2011/sep/09/security-releases-issued/
+Index: docs/ref/models/instances.txt
+===================================================================
+--- docs/ref/models/instances.txt (revision 16771)
++++ docs/ref/models/instances.txt (revision 17460)
+@@ -470,7 +470,7 @@
+
+ Similarly, if you had a URLconf entry that looked like::
+
+- (r'/archive/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$', archive_view)
++ (r'/archive/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/$', archive_view)
+
+ ...you could reference this using ``permalink()`` as follows::
+
+@@ -478,8 +478,8 @@
+ def get_absolute_url(self):
+ return ('archive_view', (), {
+ 'year': self.created.year,
+- 'month': self.created.month,
+- 'day': self.created.day})
++ 'month': self.created.strftime('%m'),
++ 'day': self.created.strftime('%d')})
+
+ Notice that we specify an empty sequence for the second parameter in this case,
+ because we only want to pass keyword parameters, not positional ones.
+Index: docs/ref/models/options.txt
+===================================================================
+--- docs/ref/models/options.txt (revision 16771)
++++ docs/ref/models/options.txt (revision 17460)
+@@ -166,6 +166,13 @@
+ >>> answer.get_previous_in_order()
+ <Answer: 1>
+
++.. admonition:: Changing order_with_respect_to
++
++ ``order_with_respect_to`` adds an additional field/database column
++ named ``_order``, so be sure to handle that as you would any other
++ change to your models if you add or change ``order_with_respect_to``
++ after your initial :djadmin:`syncdb`.
++
+ ``ordering``
+ ------------
+
+@@ -238,6 +245,12 @@
+
+ unique_together = ("driver", "restaurant")
+
++ A :class:`~django.db.models.ManyToManyField` cannot be included in
++ unique_together (it's not even clear what that would mean). If you
++ need to validate uniqueness related to a
++ :class:`~django.db.models.ManyToManyField`, look at signals or
++ using an explicit :attr:`through <ManyToManyField.through>` model.
++
+ ``verbose_name``
+ ----------------
+
+Index: docs/ref/templates/builtins.txt
+===================================================================
+--- docs/ref/templates/builtins.txt (revision 16771)
++++ docs/ref/templates/builtins.txt (revision 17460)
+@@ -1868,7 +1868,7 @@
+ Returns a slice of the list.
+
+ Uses the same syntax as Python's list slicing. See
+-http://diveintopython.org/native_data_types/lists.html#odbchelper.list.slice
++http://diveintopython.net/native_data_types/lists.html#odbchelper.list.slice
+ for an introduction.
+
+ Example::
+Index: docs/ref/contrib/gis/geoip.txt
+===================================================================
+--- docs/ref/contrib/gis/geoip.txt (revision 16771)
++++ docs/ref/contrib/gis/geoip.txt (revision 17460)
+@@ -144,7 +144,7 @@
+ Returns a dictionary of city information for the given query. Some
+ of the values in the dictionary may be undefined (``None``).
+
+-.. method:: GeoIPcountry(query)
++.. method:: GeoIP.country(query)
+
+ Returns a dictionary with the country code and country for the given
+ query.
+Index: docs/ref/contrib/messages.txt
+===================================================================
+--- docs/ref/contrib/messages.txt (revision 16771)
++++ docs/ref/contrib/messages.txt (revision 17460)
+@@ -210,6 +210,10 @@
+ ``RequestContext``. Otherwise, ensure ``messages`` is available to
+ the template context.
+
++Even if you know there is only just one message, you should still iterate over
++the ``messages`` sequence, because otherwise the message storage will not be cleared
++for the next request.
++
+ Creating custom message levels
+ ------------------------------
+
+Index: docs/ref/contrib/admin/index.txt
+===================================================================
+--- docs/ref/contrib/admin/index.txt (revision 16771)
++++ docs/ref/contrib/admin/index.txt (revision 17460)
+@@ -19,8 +19,10 @@
+ 1. Add ``'django.contrib.admin'`` to your :setting:`INSTALLED_APPS`
+ setting.
+
+- 2. Admin has two dependencies - :mod:`django.contrib.auth` and
+- :mod:`django.contrib.contenttypes`. If these applications are not
++ 2. The admin has four dependencies - :mod:`django.contrib.auth`,
++ :mod:`django.contrib.contenttypes`,
++ :mod:`django.contrib.messages` and
++ :mod:`django.contrib.sessions`. If these applications are not
+ in your :setting:`INSTALLED_APPS` list, add them.
+
+ 3. Determine which of your application's models should be editable in the
+@@ -542,7 +544,7 @@
+ Fields in ``list_filter`` can also span relations using the ``__`` lookup::
+
+ class UserAdminWithLookup(UserAdmin):
+- list_filter = ('groups__name')
++ list_filter = ('groups__name',)
+
+ .. attribute:: ModelAdmin.list_per_page
+
+Index: docs/ref/django-admin.txt
+===================================================================
+--- docs/ref/django-admin.txt (revision 16771)
++++ docs/ref/django-admin.txt (revision 17460)
+@@ -1156,7 +1156,7 @@
+ Note that this option is unnecessary in ``manage.py``, because it takes care of
+ setting the Python path for you.
+
+-.. _import search path: http://diveintopython.org/getting_to_know_python/everything_is_an_object.html
++.. _import search path: http://diveintopython.net/getting_to_know_python/everything_is_an_object.html
+
+ .. django-admin-option:: --settings
+
+Index: docs/ref/signals.txt
+===================================================================
+--- docs/ref/signals.txt (revision 16771)
++++ docs/ref/signals.txt (revision 17460)
+@@ -352,12 +352,16 @@
+ .. data:: django.db.models.signals.post_syncdb
+ :module:
+
+-Sent by :djadmin:`syncdb` after it installs an application.
++Sent by :djadmin:`syncdb` command after it installs an application, and
++:djadmin:`flush` command.
+
+ Any handlers that listen to this signal need to be written in a particular
+ place: a ``management`` module in one of your :setting:`INSTALLED_APPS`. If
+ handlers are registered anywhere else they may not be loaded by
+-:djadmin:`syncdb`.
++:djadmin:`syncdb`. It is important that handlers of this signal perform
++idempotent changes (e.g. no database alterations) as this may cause the
++:djadmin:`flush` management command to fail if it also ran during the
++:djadmin:`syncdb` command.
+
+ Arguments sent with this signal:
+
+Index: README
+===================================================================
+--- README (revision 16771)
++++ README (revision 17460)
+@@ -28,7 +28,7 @@
+ To get more help:
+
+ * Join the #django channel on irc.freenode.net. Lots of helpful people
+- hang out there. Read the archives at http://botland.oebfare.com/logger/django/.
++ hang out there. Read the archives at http://django-irc-logs.com/.
+
+ * Join the django-users mailing list, or read the archives, at
+ http://groups.google.com/group/django-users.
diff --git a/libre/luxblend25/PKGBUILD b/libre/luxblend25/PKGBUILD
index 3ce9b57db..245aba247 100644
--- a/libre/luxblend25/PKGBUILD
+++ b/libre/luxblend25/PKGBUILD
@@ -1,44 +1,46 @@
-# Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com>
+# $Id$
# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
+
+pkgbase=luxrender
pkgname=luxblend25
-pkgver=1.0rc4
-_pkgver=06194cf93745
-_blender=2.63
-pkgrel=1
+srcver=3a928b723b29
+pkgver=1.1.v2.64
+_pkgver=${pkgver::3}
+reqname=blender
+reqver=${pkgver:5}
+pkgrel=2
pkgdesc='A LuxRender exporter for Blender-libre'
arch=(
any
)
-url=http://www.{pkgname::3}render.net/
+url="http://www.$pkgbase.net/"
license=(
GPL
)
depends=(
- blender=$_blender
- ${pkgname::3}render
+ $pkgbase=$_pkgver
+ "$reqname>=$reqver"
)
-replaces=(
- $pkgname
+provides=(
+ $pkgname=$_pkgver
)
conflicts=(
$pkgname
+ #"$reqname>=${reqver::2}$((${reqver:2}+1))"
)
-provides=(
- $pkgname=$pkgver
+replaces=(
+ $pkgname
)
source=(
- https://bitbucket.org/${pkgname::3}render/$pkgname/get/$_pkgver.tar.bz2
+ "https://src.$pkgbase.net/$pkgname/archive/$srcver.tar.bz2"
)
-md5sums=(
- c5719c2a0e8567cd9f0aef429a2996f0
+sha512sums=(
+ f5aadc77e699f6b7259ece271b0c50ca7be5858bb628b99aedbb23b64e5587ac59cc3d1c52e063ba89c9d340f915727046e4d3017b26238425d43d3bba14f017
)
package() {
- install -d -m755 $pkgdir/usr/share/blender/$_blender/scripts/addons
- cp -a $srcdir/${pkgname::3}render-$pkgname-$_pkgver/src/${pkgname::3}render \
- $pkgdir/usr/share/blender/$_blender/scripts/addons
- # change the search path in exporter so it finds pylux in its new location
- sed -i 's|from.*import pylux|import pylux|' $pkgdir/usr/share/blender/$_blender/scripts/addons/${pkgname::3}render/outputs/pure_api.py
+ a=$pkgname-$srcver/src/$pkgbase
+ b=usr/share/$reqname/$reqver/scripts/addons
+ install -d -m755 $pkgdir/$b
+ cp -a $srcdir/$a $pkgdir/$b
}
-
-# vim:set ts=2 sw=2 et:
diff --git a/libre/parabola-archiso/PKGBUILD b/libre/parabola-archiso/PKGBUILD
new file mode 100755
index 000000000..336892373
--- /dev/null
+++ b/libre/parabola-archiso/PKGBUILD
@@ -0,0 +1,22 @@
+# Maintainer: Pierre Schmitz <pierre@archlinux.de>
+# Maintainer (Parabola): Esteban Carnevale <alfplayer@mailoo.org>
+
+pkgname=parabola-archiso
+pkgver=2012.10.17
+pkgrel=1
+pkgdesc='Tools for creating Parabola GNU/Linux-libre live and install iso images'
+arch=('any')
+url='https://parabolagnulinux.org'
+license=('GPL')
+depends=('make' 'squashfs-tools' 'libisoburn' 'dosfstools' 'patch' 'lynx' 'wget')
+provides=('archiso')
+conflicts=('archiso')
+source=("https://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}.tar.gz"
+ "https://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}.tar.gz.sig")
+md5sums=('b8a5d4a6ee2547a502cbecea0e238e61'
+ '9425cc4353b5654d7478e9e2b0bf848d')
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/libre/parabolaweb-utils/PKGBUILD b/libre/parabolaweb-utils/PKGBUILD
new file mode 100644
index 000000000..9c6da333a
--- /dev/null
+++ b/libre/parabolaweb-utils/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+. helper.sh
+# provides:
+# _get_pkgver
+# _get_depends
+# _get_depends_nover (no version requirements)
+
+pkgname=parabolaweb-utils
+pkgver=`_get_pkgver`
+pkgrel=3
+pkgdesc="Utils for the Parabola website"
+arch=('any')
+url="https://projects.parabolagnulinux.org/parabolaweb.git/"
+license=('GPL2')
+depends=(
+ 'python2' # duh
+ 'python2-flup' # for fcgi
+ 'postgresql' # for database
+ 'git' # used in parabolaweb-update
+ 'libretools' # used in parabolaweb-update
+ `_get_depends`)
+backup=('etc/conf.d/parabolaweb')
+
+export pkgver
+
+source=(git://parabolagnulinux.org/parabolaweb.git
+ parabolaweb-update
+ parabolaweb-fcgi
+ parabolaweb.rc
+ parabolaweb.service
+ parabolaweb.conf)
+
+build() {
+ :
+}
+
+package() {
+ cd "${srcdir}"
+ install -Dm755 parabolaweb-update "${pkgdir}/usr/sbin/parabolaweb-update"
+ install -Dm755 parabolaweb-fcgi "${pkgdir}/usr/sbin/parabolaweb-fcgi"
+ install -Dm755 parabolaweb.rc "${pkgdir}/etc/rc.d/parabolaweb"
+ install -Dm644 parabolaweb.service "${pkgdir}/usr/lib/systemd/system/parabolaweb.service"
+ install -Dm644 parabolaweb.conf "${pkgdir}/etc/conf.d/parabolaweb"
+}
+
+md5sums=('SKIP'
+ 'dd05d6a4ea7cff7fdd789f59aeb9059a'
+ '520e20b8bbca64042b3afa76b0bec55f'
+ '1bce8fb832ad9e61cf8b96426ce843b5'
+ '80ee438224b4d67677d0980d5bc57005'
+ 'fb291168d3f57a85f82216c4e74c9ccf')
diff --git a/libre/parabolaweb-utils/helper.sh b/libre/parabolaweb-utils/helper.sh
new file mode 100644
index 000000000..5ce4182b3
--- /dev/null
+++ b/libre/parabolaweb-utils/helper.sh
@@ -0,0 +1,39 @@
+_mksource() {
+ if [[ -z _DO_NOT_RUN_MKSOURCE ]]; then
+ _DO_NOT_RUN_MKSOURCE=true makepkg -o
+ fi
+}
+
+_get_pkgver() {
+ if [[ -n $pkgver ]] && [[ $pkgver != 0.bogus ]]; then
+ echo $pkgver
+ else
+ _mksource 1>&2
+ if [[ -f "${srcdir:-src}/parabolaweb/requirements_prod.txt" ]]; then
+ pushd "${srcdir:-src}/parabolaweb" >/dev/null
+ # get the date requirements_prod.txt was last modified
+ gitdate="$(git log -n1 --date=iso --format=format:'%cd' ./requirements_prod.txt)"
+ date -u +%Y%m%d.%H%M -d "$gitdate"
+ popd >/dev/null
+ else
+ echo 0.bogus
+ fi
+ fi
+}
+
+_get_depends() {
+ _mksource 1>&2
+ if [[ -f "${srcdir:-src}/parabolaweb/requirements_prod.txt" ]]; then
+ pushd "${srcdir:-src}" >/dev/null
+ python2_packages='markdown|psycopg2|pyinotify|pytz|south'
+ < parabolaweb/requirements_prod.txt sed -r \
+ -e 's/.*/\L&/' -e 's/==/=/' \
+ -e 's/^python-memcached/python2-memcached/' \
+ -e "s/^(${python2_packages})/python2-&/"
+ popd >/dev/null
+ fi
+}
+
+_get_depends_nover() {
+ _get_depends | sed 's/[<>=].*//'
+}
diff --git a/libre/parabolaweb-utils/parabolaweb-fcgi b/libre/parabolaweb-utils/parabolaweb-fcgi
new file mode 100644
index 000000000..3dec02e10
--- /dev/null
+++ b/libre/parabolaweb-utils/parabolaweb-fcgi
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+. /etc/conf.d/parabolaweb
+
+[[ -e /srv/http/web/manage.py ]]
+
+sudo -u "${WEBUSER:-$USER}" python2 /srv/http/web/manage.py runfcgi \
+ host=${HOST} \
+ port=${PORT} \
+ --settings=settings \
+ "$@"
diff --git a/libre/parabolaweb-utils/parabolaweb-update b/libre/parabolaweb-utils/parabolaweb-update
new file mode 100644
index 000000000..e4d65c2d9
--- /dev/null
+++ b/libre/parabolaweb-utils/parabolaweb-update
@@ -0,0 +1,81 @@
+#!/bin/bash
+set -e
+
+_install_dir=/srv/http
+_gitname=web
+_gitroot=git://parabolagnulinux.org/parabolaweb.git
+_gitbranch=master
+
+. /usr/bin/libremessages
+
+download() {
+ msg "Connecting to GIT server...."
+ cd "$_install_dir"
+ if [[ -d ${_gitname} ]]; then
+ msg2 "Updating existing tree"
+ cd ${_gitname} && git pull ${_gitroot}
+ else
+ msg2 "Cloning tree"
+ git clone ${_gitroot} ${_gitname}
+ cd ${_gitname}
+ fi
+ git checkout ${_gitbranch}
+ msg "GIT checkout done or server timeout"
+}
+
+clean() {
+ msg "Purging old .pyc files...."
+ cd "$_install_dir/$_gitname"
+ find . -name '*.pyc' -delete
+}
+
+configure() {
+ msg "Checking configuration...."
+ cd "$_install_dir/$_gitname"
+ if [[ ! -f local_settings.py ]]; then
+ msg2 "Configuration file missing, opening editor..."
+ cp local_settings.py.example local_settings.tmp.$$.py
+ if "$EDITOR" local_settings.tmp.$$.py; then
+ mv local_settings.tmp.$$.py local_settings.py
+ else
+ rm local_settings.tmp.$$.py
+ msg "Failed to configure, exiting"
+ exit 1
+ fi
+ msg2 "Creating database...."
+ ./manage.py syncdb
+ else
+ msg2 "Current configuration checks out"
+ fi
+}
+
+migrate() {
+ msg "Updating database...."
+ msg2 "Running migrations...."
+ ./manage.py migrate
+ msg2 "Loading fixtures...."
+ ./manage.py loaddata */fixtures/*.json
+}
+
+main() {
+ if [[ -z "$EDITOR" ]]; then
+ error 'Please set the $EDITOR variable'
+ exit 1
+ fi
+
+ [[ ! -d "$_install_dir" ]] && mkdir "$_install_dir"
+
+ download
+ clean
+ configure
+ clean
+ migrate
+
+ msg "Checking media/admin_media symlink...."
+ if [ ! -e media/admin-media ]; then
+ rm media/admin_media
+ ln -s /usr/lib/python2.7/site-packages/django/contrib/admin/media media/admin_media
+ fi
+}
+
+main "$@"
diff --git a/libre/parabolaweb-utils/parabolaweb.conf b/libre/parabolaweb-utils/parabolaweb.conf
new file mode 100644
index 000000000..c53b19cb8
--- /dev/null
+++ b/libre/parabolaweb-utils/parabolaweb.conf
@@ -0,0 +1,3 @@
+HOST=127.0.0.1
+PORT=8090 # 80 is nginx
+WEBUSER=nobody
diff --git a/libre/parabolaweb-utils/parabolaweb.rc b/libre/parabolaweb-utils/parabolaweb.rc
new file mode 100644
index 000000000..087a3fcb0
--- /dev/null
+++ b/libre/parabolaweb-utils/parabolaweb.rc
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PIDFILE=/run/web/parabolaweb.pid
+
+case $1 in
+start)
+ stat_busy "Starting ParabolaWeb"
+ if parabolaweb-fcgi pidfile=${PIDFILE}; then
+ add_daemon parabolaweb
+ stat_done
+ exit 0
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+stop)
+ stat_busy "Stopping ParabolaWeb"
+ if [[ -f ${PIDFILE} ]]; then
+ pid=$(cat ${PIDFILE})
+ kill ${pid}
+ rm_daemon parabolaweb
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+restart)
+ $0 stop
+ $0 start
+ ;;
+
+*)
+ echo "Usage: $0 {start|stop|restart}" >&2
+ exit 1
+
+esac
diff --git a/libre/parabolaweb-utils/parabolaweb.service b/libre/parabolaweb-utils/parabolaweb.service
new file mode 100644
index 000000000..4c3fb8c7f
--- /dev/null
+++ b/libre/parabolaweb-utils/parabolaweb.service
@@ -0,0 +1,12 @@
+[Unit]
+Requires=postgresql.service
+After=postgresql.service
+Description=ParabolaWeb
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/parabolaweb-fcgi pidfile=/run/web/parabolaweb.pid
+PIDFile=/run/web/parabolaweb.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/libre/tp_smapi-libre-lts/PKGBUILD b/libre/tp_smapi-libre-lts/PKGBUILD
new file mode 100644
index 000000000..91ae34864
--- /dev/null
+++ b/libre/tp_smapi-libre-lts/PKGBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: xduugu
+# Contributor: nh2
+# Contributor: Steven Davidovitz <steviedizzle ð gmail đ com>
+# Contributor: Nick B <Shirakawasuna ð gmail đ com>
+# Contributor: Christof Musik <christof ð senfdax đ de>
+# Contributor: Stefan Rupp <archlinux ð stefanrupp đ de>
+# Contributor: Ignas Anikevicius <anikevicius ð gmail đ com>
+# Maintainer (Parabola): André Silva <emulatorman@lavabit.com>
+
+pkgname=tp_smapi-libre-lts
+_pkgname=tp_smapi
+_extramodules=/usr/lib/modules/extramodules-3.0-LIBRE-LTS
+pkgver=0.41
+pkgrel=9
+pkgdesc="linux-libre-lts modules for ThinkPad's SMAPI functionality"
+arch=('i686' 'x86_64')
+url='https://github.com/evgeni/tp_smapi'
+license=('GPL')
+depends=('linux-libre-lts>=3.0' 'linux-libre-lts<3.1')
+makedepends=('linux-libre-lts-headers>=3.0' 'linux-libre-lts-headers<3.1')
+replaces=('tp_smapi-lts')
+conflicts=('tp_smapi-lts')
+provides=("tp_smapi-lts=${pkgver}")
+install='tp_smapi-lts.install'
+source=("https://github.com/downloads/evgeni/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
+md5sums=('63c683415c764568f6bf17c7eabe4752')
+
+build() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+
+ _kernver=$(< "${_extramodules}/version")
+
+ sed -ri -e "s/^(KVER\s*:=).*$/\1 ${_kernver}/" \
+ -e "s#^(KBASE\s*:=).*\$#\1 ${_extramodules%/*}/${_kernver}#" Makefile
+
+ make HDAPS=1
+}
+
+package() {
+ _kernver=$(< "${_extramodules}/version")
+
+ make -C "${_extramodules%/*}/${_kernver}/build" \
+ INSTALL_MOD_PATH="${pkgdir}/${_extramodules%%/lib/*}" \
+ M="${srcdir}/${_pkgname}-${pkgver}" modules_install
+
+ cd "${pkgdir}/${_extramodules%/*}"
+ mv "${_kernver}/extra" "${_extramodules##*/}"
+ rmdir "${_kernver}"
+
+ # compress kernel modules
+ find "${pkgdir}" -name "*.ko" -exec gzip -9 {} +
+
+ # load module on startup
+ echo tp_smapi > "${srcdir}/tp_smapi-lts.conf"
+ install -Dm644 "${srcdir}/tp_smapi-lts.conf" "${pkgdir}/usr/lib/modules-load.d/tp_smapi-lts.conf"
+
+ # update kernel version in install file
+ sed -ri "s#^(extramodules=).*\$#\1${_extramodules}#" "${startdir}/tp_smapi-lts.install"
+}
diff --git a/libre/tp_smapi-libre-lts/tp_smapi-lts.install b/libre/tp_smapi-libre-lts/tp_smapi-lts.install
new file mode 100644
index 000000000..2723fead7
--- /dev/null
+++ b/libre/tp_smapi-libre-lts/tp_smapi-lts.install
@@ -0,0 +1,13 @@
+extramodules=/usr/lib/modules/extramodules-3.0-LIBRE-LTS
+
+post_install() {
+ depmod -v $(< "$extramodules/version") &>/dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/libre/virtualbox-libre-modules-lts/PKGBUILD b/libre/virtualbox-libre-modules-lts/PKGBUILD
index dff627829..7a95b4c7b 100644
--- a/libre/virtualbox-libre-modules-lts/PKGBUILD
+++ b/libre/virtualbox-libre-modules-lts/PKGBUILD
@@ -7,8 +7,8 @@
pkgbase=virtualbox-libre-modules-lts
pkgname=('virtualbox-libre-host-modules-lts' 'virtualbox-libre-guest-modules-lts')
-pkgver=4.2.0
-pkgrel=3.1
+pkgver=4.2.2
+pkgrel=1
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
@@ -40,8 +40,7 @@ package_virtualbox-libre-host-modules-lts(){
install=virtualbox-libre-host-modules-lts.install
_kernver=$(expac -Q '%v' linux-libre-lts-headers)-LIBRE-LTS
- #_extraver=extramodules-${_kernver%.*}-LIBRE-LTS
- _extraver=extramodules-3.0-LIBRE-LTS
+ _extraver=extramodules-${_kernver%.*}-LIBRE-LTS
install -dm755 "$pkgdir/usr/lib/modules/$_extraver"
cd "dkms/vboxhost/$pkgver/$_kernver/$CARCH/module"
@@ -60,8 +59,7 @@ package_virtualbox-libre-guest-modules-lts(){
install=virtualbox-libre-guest-modules-lts.install
_kernver=$(expac -Q '%v' linux-libre-lts-headers)-LIBRE-LTS
- #_extraver=extramodules-${_kernver%.*}-LIBRE-LTS
- _extraver=extramodules-3.0-LIBRE-LTS
+ _extraver=extramodules-${_kernver%.*}-LIBRE-LTS
install -dm755 "$pkgdir/usr/lib/modules/$_extraver"
cd "dkms/vboxguest/$pkgver/$_kernver/$CARCH/module"
diff --git a/libre/virtualbox-libre-modules/PKGBUILD b/libre/virtualbox-libre-modules/PKGBUILD
index 10182a0e9..3fcbd7069 100644
--- a/libre/virtualbox-libre-modules/PKGBUILD
+++ b/libre/virtualbox-libre-modules/PKGBUILD
@@ -6,8 +6,8 @@
pkgbase=virtualbox-libre-modules
pkgname=('virtualbox-libre-host-modules' 'virtualbox-libre-guest-modules')
-pkgver=4.2.0
-pkgrel=6.1
+pkgver=4.2.2
+pkgrel=1
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
diff --git a/libre/virtualbox-libre/001-vboxdrv-reference.patch b/libre/virtualbox-libre/001-vboxdrv-reference.patch
new file mode 100644
index 000000000..51fd6361c
--- /dev/null
+++ b/libre/virtualbox-libre/001-vboxdrv-reference.patch
@@ -0,0 +1,112 @@
+diff -Nur VirtualBox-4.1.6_OSE.orig/src/VBox/Frontends/VirtualBox/src/main.cpp VirtualBox-4.1.6_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp
+--- VirtualBox-4.1.6_OSE.orig/src/VBox/Frontends/VirtualBox/src/main.cpp 2011-11-04 17:22:13.636083176 +0000
++++ VirtualBox-4.1.6_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp 2011-11-04 17:48:58.915541368 +0000
+@@ -67,38 +67,34 @@
+
+ /* XXX Temporarily. Don't rely on the user to hack the Makefile himself! */
+ QString g_QStrHintLinuxNoMemory = QApplication::tr(
+- "This error means that the kernel driver was either not able to "
++ "This error means that the kernel libre driver was either not able to "
+ "allocate enough memory or that some mapping operation failed."
+ );
+
+ QString g_QStrHintLinuxNoDriver = QApplication::tr(
+- "The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or "
++ "The VirtualBox Linux-libre kernel driver (vboxdrv) is either not loaded or "
+ "there is a permission problem with /dev/vboxdrv. Please reinstall the kernel "
+- "module by executing<br/><br/>"
+- " <font color=blue>'/etc/init.d/vboxdrv setup'</font><br/><br/>"
+- "as root. If it is available in your distribution, you should install the "
+- "DKMS package first. This package keeps track of Linux kernel changes and "
+- "recompiles the vboxdrv kernel module if necessary."
++ "libre module by executing<br/><br/>"
++ " <font color=blue>'pacman -S virtualbox-libre-host-modules'</font><br/><br/>"
++ "as root. If you don't use our stock kernel libre, install virtualbox-libre-host-source and "
++ "execute dkms autoinstall ."
+ );
+
+ QString g_QStrHintOtherWrongDriverVersion = QApplication::tr(
+- "The VirtualBox kernel modules do not match this version of "
++ "The VirtualBox kernel libre modules do not match this version of "
+ "VirtualBox. The installation of VirtualBox was apparently not "
+ "successful. Please try completely uninstalling and reinstalling "
+ "VirtualBox."
+ );
+
+ QString g_QStrHintLinuxWrongDriverVersion = QApplication::tr(
+- "The VirtualBox kernel modules do not match this version of "
+- "VirtualBox. The installation of VirtualBox was apparently not "
+- "successful. Executing<br/><br/>"
+- " <font color=blue>'/etc/init.d/vboxdrv setup'</font><br/><br/>"
+- "may correct this. Make sure that you do not mix the "
+- "OSE version and the PUEL version of VirtualBox."
++ "The VirtualBox kernel libre modules do not match this version of "
++ "VirtualBox. Reload the modules or if you don't use our stock kernel libre execute<br/><br/> "
++ " <font color=blue>'dkms autoinstall'</font><br/><br/>"
+ );
+
+ QString g_QStrHintOtherNoDriver = QApplication::tr(
+- "Make sure the kernel module has been loaded successfully."
++ "Make sure the kernel libre module has been loaded successfully."
+ );
+
+ /* I hope this isn't (C), (TM) or (R) Microsoft support ;-) */
+@@ -590,7 +586,7 @@
+ case VERR_VM_DRIVER_NOT_INSTALLED:
+ case VERR_VM_DRIVER_LOAD_ERROR:
+ msgText += QApplication::tr (
+- "<b>Cannot access the kernel driver!</b><br/><br/>");
++ "<b>Cannot access the kernel libre driver!</b><br/><br/>");
+ # ifdef RT_OS_LINUX
+ msgText += g_QStrHintLinuxNoDriver;
+ # else
+@@ -603,7 +599,7 @@
+ break;
+ # endif
+ case VERR_VM_DRIVER_NOT_ACCESSIBLE:
+- msgText += QApplication::tr ("Kernel driver not accessible");
++ msgText += QApplication::tr ("Kernel libre driver not accessible");
+ break;
+ case VERR_VM_DRIVER_VERSION_MISMATCH:
+ # ifdef RT_OS_LINUX
+diff -Nur VirtualBox-4.1.6_OSE.orig/src/VBox/Installer/linux/VBox.sh VirtualBox-4.1.6_OSE/src/VBox/Installer/linux/VBox.sh
+--- VirtualBox-4.1.6_OSE.orig/src/VBox/Installer/linux/VBox.sh 2011-11-04 17:22:13.549415814 +0000
++++ VirtualBox-4.1.6_OSE/src/VBox/Installer/linux/VBox.sh 2011-11-04 17:56:50.735874087 +0000
+@@ -30,19 +30,20 @@
+ SHUTDOWN="true"
+ elif ! lsmod|grep -q vboxdrv; then
+ cat << EOF
+-WARNING: The vboxdrv kernel module is not loaded. Either there is no module
+- available for the current kernel (`uname -r`) or it failed to
+- load. Please recompile the kernel module and install it by
++WARNING: The vboxdrv kernel libre module is not loaded. Either there is no module
++ available for the current kernel libre (`uname -r`) or it failed to
++ load. Please reinstall the kernel libre module virtualbox-libre-host-modules or
++ if you don't use our stock kernel libre compile the modules with
+
+- sudo /etc/init.d/vboxdrv setup
++ sudo dkms autoinstall
+
+ You will not be able to start VMs until this problem is fixed.
+ EOF
+ elif [ ! -c /dev/vboxdrv ]; then
+ cat << EOF
+-WARNING: The character device /dev/vboxdrv does not exist. Try
++WARNING: The character device /dev/vboxdrv does not exist. Try to load the module
+
+- sudo /etc/init.d/vboxdrv restart
++ sudo modprobe vboxdrv
+
+ and if that is not successful, try to re-install the package.
+
+@@ -52,9 +53,8 @@
+
+ if [ -f /etc/vbox/module_not_compiled ]; then
+ cat << EOF
+-WARNING: The compilation of the vboxdrv.ko kernel module failed during the
++WARNING: The compilation of the vboxdrv.ko kernel libre module failed during the
+ installation for some reason. Starting a VM will not be possible.
+- Please consult the User Manual for build instructions.
+ EOF
+ fi
+ \ No newline at end of file
diff --git a/libre/virtualbox-libre/002-change_default_driver_dir.patch b/libre/virtualbox-libre/002-change_default_driver_dir.patch
new file mode 100755
index 000000000..d8531499d
--- /dev/null
+++ b/libre/virtualbox-libre/002-change_default_driver_dir.patch
@@ -0,0 +1,18 @@
+diff -Nur VirtualBox-4.1.0_OSE.orig/src/VBox/Additions/common/crOpenGL/fakedri_drv.c VirtualBox-4.1.0_OSE/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
+--- VirtualBox-4.1.0_OSE.orig/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2011-07-19 15:11:37.903456612 +0000
++++ VirtualBox-4.1.0_OSE/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2011-07-19 15:12:41.024021274 +0000
+@@ -36,13 +36,8 @@
+ //#define DEBUG_DRI_CALLS
+
+ //@todo this could be different...
+-#ifdef RT_ARCH_AMD64
+-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri"
++# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/xorg/modules/dri"
+ # define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
+-#else
+-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/dri:/usr/lib/i386-linux-gnu/dri"
+-# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
+-#endif
+
+ #ifdef DEBUG_DRI_CALLS
+ #define SWDRI_SHOWNAME(pext, func) \
diff --git a/libre/virtualbox-libre/003-remove_qt_fa_IR.patch b/libre/virtualbox-libre/003-remove_qt_fa_IR.patch
new file mode 100644
index 000000000..58e6235d5
--- /dev/null
+++ b/libre/virtualbox-libre/003-remove_qt_fa_IR.patch
@@ -0,0 +1,23 @@
+# seblu 10/2012 - fucking farci removing patch
+
+--- a/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk 2012-10-18 16:22:52.000000000 +0200
++++ b/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.kmk 2012-10-19 03:03:52.640867388 +0200
+@@ -23,7 +23,6 @@
+ de \
+ en \
+ es \
+- fa_IR \
+ hu \
+ it \
+ ja \
+
+--- a/src/VBox/Frontends/VirtualBox/VBoxUI.pro 2012-10-18 16:22:47.000000000 +0200
++++ b/src/VBox/Frontends/VirtualBox/VBoxUI.pro 2012-10-20 02:48:37.525765901 +0200
+@@ -63,7 +63,6 @@
+ nls/VirtualBox_es.ts \
+ nls/VirtualBox_eu.ts \
+ nls/VirtualBox_fi.ts \
+- nls/VirtualBox_fa_IR.ts \
+ nls/VirtualBox_fr.ts \
+ nls/VirtualBox_gl_ES.ts \
+ nls/VirtualBox_hu.ts \
diff --git a/libre/virtualbox-libre/PKGBUILD b/libre/virtualbox-libre/PKGBUILD
index 5ae72a76f..9e1d74cac 100644
--- a/libre/virtualbox-libre/PKGBUILD
+++ b/libre/virtualbox-libre/PKGBUILD
@@ -12,8 +12,8 @@ pkgname=('virtualbox-libre'
'virtualbox-libre-host-source'
'virtualbox-libre-guest-utils'
'virtualbox-libre-guest-source')
-pkgver=4.2.0
-pkgrel=4.1
+pkgver=4.2.2
+pkgrel=1
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL' 'custom')
@@ -56,8 +56,9 @@ source=("http://download.virtualbox.org/virtualbox/$pkgver/VirtualBox-$pkgver.ta
'vboxweb.conf'
'vboxweb.rc'
'vboxweb.service'
- 'change_default_driver_dir.patch'
- 'vboxdrv-reference.patch'
+ '001-vboxdrv-reference.patch'
+ '002-change_default_driver_dir.patch'
+ '003-remove_qt_fa_IR.patch'
'os_blag_64.png'
'os_blag.png'
'os_dragora_64.png'
@@ -78,7 +79,7 @@ source=("http://download.virtualbox.org/virtualbox/$pkgver/VirtualBox-$pkgver.ta
'os_venenux.png'
'libre.patch'
'free-distros.patch')
-md5sums=('691b4134983ce7d89b9fb683305cb647'
+md5sums=('2b65dcd9649e56ac6338670b3fb4a14d'
'5f85710e0b8606de967716ded7b2d351'
'ed1341881437455d9735875ddf455fbe'
'58d6e5bb4b4c1c6f3f0b3daa6aaeed03'
@@ -88,8 +89,9 @@ md5sums=('691b4134983ce7d89b9fb683305cb647'
'7e9483b1069a54f181546083ac7e5469'
'c159d683ba1947290fc2ad2c64194150'
'bc9efed88e0469cd7fc460d5a5cd7b4b'
- '97e193f050574dd272a38e5ee5ebe62b'
'4f1692638d6740df4c4ad9766ba4e179'
+ '97e193f050574dd272a38e5ee5ebe62b'
+ '866ce76a94fb22cc7b625e07e571f0ad'
'8538dba8686d7449cb481c9bae9d722a'
'545c925b46f2ac95e5f8ae407fad101a'
'f6416f509c2e5460e4dc624e0a57f3c1'
@@ -108,7 +110,7 @@ md5sums=('691b4134983ce7d89b9fb683305cb647'
'c7951fe6888d939f3a7d0dafe477e82b'
'4da8eeb2ece7e475fc7a0d1003da26c6'
'5e4187af59726d71c5be48d0cd816c34'
- '67cc4c8611890038eb3e4114ae899525'
+ '85141ccd2621a8e004b8f55c9a1f83eb'
'c7b29fbf4c24a00e8646ca6dd73f38a1')
#_extramodules=extramodules-3.5-LIBRE
@@ -117,15 +119,21 @@ md5sums=('691b4134983ce7d89b9fb683305cb647'
build() {
cd "VirtualBox-$pkgver"
- patch -Np1 -i "$srcdir/vboxdrv-reference.patch"
- patch -Np1 -i "$srcdir/change_default_driver_dir.patch"
- patch -Np1 -i "$srcdir/libre.patch"
- patch -Np1 -i "$srcdir/free-distros.patch"
+ # Apply patches
+ for _p in "$srcdir"/*.patch; do
+ [[ -e $_p ]] || continue
+ msg2 "Apply patch ${_p##*/}"
+ patch -Np1 -i "$_p"
+ done
- ## Removing Nonfree directories
+ ## Removing Nonfree directories and Nonfree files
rm -rv "./include/VBox/ExtPack"
rm -rv "./src/VBox/ExtPacks"
rm -rv "./src/VBox/Main/src-helper-apps"
+ rm -rv "./src/VBox/Main/include/ExtPackManagerImpl.h"
+ rm -rv "./src/VBox/Main/include/ExtPackUtil.h"
+ rm -rv "./src/VBox/Main/src-all/ExtPackManagerImpl.cpp"
+ rm -rv "./src/VBox/Main/src-all/ExtPackUtil.cpp"
## Removing Oracle VM VirtualBox Extension Pack icons
rm -v "./src/VBox/Resources/darwin/virtualbox-vbox-extpack.icns"
@@ -148,7 +156,7 @@ build() {
--enable-webservice \
--enable-vde \
--enable-vnc \
- --disable-kmods
+ --disable-kmods
# --with-linux=/usr/src/linux-${_kernver}
source ./env.sh
kmk all
@@ -228,7 +236,7 @@ package_virtualbox-libre() {
echo 'INSTALL_DIR=/usr/lib/virtualbox' > "$pkgdir/etc/vbox/vbox.cfg"
#udev and licence
- install -D -m 0644 "$srcdir/VirtualBox-$pkgver/COPYING" \
+ install -D -m 0644 "$srcdir/VirtualBox-${pkgver}/COPYING" \
"$pkgdir/usr/share/licenses/virtualbox/LICENSE"
install -D -m 0644 "$srcdir/10-vboxdrv.rules" \
"$pkgdir/usr/lib/udev/rules.d/10-vboxdrv.rules"
@@ -333,3 +341,5 @@ package_virtualbox-libre-guest-utils(){
install -D -m644 vboxservice.service \
"$pkgdir/usr/lib/systemd/system/vboxservice.service"
}
+
+# vim:set ts=4 sw=4 et:
diff --git a/libre/virtualbox-libre/libre.patch b/libre/virtualbox-libre/libre.patch
index 41a34fc84..138bbd612 100644
--- a/libre/virtualbox-libre/libre.patch
+++ b/libre/virtualbox-libre/libre.patch
@@ -484,4913 +484,6 @@
extern const PDMDEVREG g_DeviceACPI;
extern const PDMDEVREG g_DeviceDMA;
extern const PDMDEVREG g_DeviceFloppyController;
---- VirtualBox-4.2.0.orig/src/VBox/Main/include/ExtPackManagerImpl.h 2012-03-13 11:51:50.000000000 -0300
-+++ /dev/null 2012-09-18 22:18:48.866734195 -0300
-@@ -1,247 +0,0 @@
--/* $Id: ExtPackManagerImpl.h 39878 2012-01-25 16:30:07Z vboxsync $ */
--/** @file
-- * VirtualBox Main - interface for Extension Packs, VBoxSVC & VBoxC.
-- */
--
--/*
-- * Copyright (C) 2010 Oracle Corporation
-- *
-- * This file is part of VirtualBox Open Source Edition (OSE), as
-- * available from http://www.virtualbox.org. This file is free software;
-- * you can redistribute it and/or modify it under the terms of the GNU
-- * General Public License (GPL) as published by the Free Software
-- * Foundation, in version 2 as it comes in the "COPYING" file of the
-- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-- */
--
--#ifndef ____H_EXTPACKMANAGERIMPL
--#define ____H_EXTPACKMANAGERIMPL
--
--#include "VirtualBoxBase.h"
--#include <VBox/ExtPack/ExtPack.h>
--#include <iprt/fs.h>
--
--/**
-- * An extension pack file.
-- */
--class ATL_NO_VTABLE ExtPackFile :
-- public VirtualBoxBase,
-- VBOX_SCRIPTABLE_IMPL(IExtPackFile)
--{
--public:
-- /** @name COM and internal init/term/mapping cruft.
-- * @{ */
-- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackFile, IExtPackFile)
-- DECLARE_NOT_AGGREGATABLE(ExtPackFile)
-- DECLARE_PROTECT_FINAL_CONSTRUCT()
-- BEGIN_COM_MAP(ExtPackFile)
-- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackFile)
-- COM_INTERFACE_ENTRY(IExtPackBase)
-- END_COM_MAP()
-- DECLARE_EMPTY_CTOR_DTOR(ExtPackFile)
--
-- HRESULT FinalConstruct();
-- void FinalRelease();
-- HRESULT initWithFile(const char *a_pszFile, const char *a_pszDigest, class ExtPackManager *a_pExtPackMgr, VirtualBox *a_pVirtualBox);
-- void uninit();
-- RTMEMEF_NEW_AND_DELETE_OPERATORS();
-- /** @} */
--
-- /** @name IExtPackBase interfaces
-- * @{ */
-- STDMETHOD(COMGETTER(Name))(BSTR *a_pbstrName);
-- STDMETHOD(COMGETTER(Description))(BSTR *a_pbstrDescription);
-- STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
-- STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
-- STDMETHOD(COMGETTER(Edition))(BSTR *a_pbstrEdition);
-- STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);
-- STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));
-- STDMETHOD(COMGETTER(Usable))(BOOL *a_pfUsable);
-- STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);
-- STDMETHOD(COMGETTER(ShowLicense))(BOOL *a_pfShowIt);
-- STDMETHOD(COMGETTER(License))(BSTR *a_pbstrHtmlLicense);
-- STDMETHOD(QueryLicense)(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage,
-- IN_BSTR a_bstrFormat, BSTR *a_pbstrLicense);
-- /** @} */
--
-- /** @name IExtPackFile interfaces
-- * @{ */
-- STDMETHOD(COMGETTER(FilePath))(BSTR *a_pbstrPath);
-- STDMETHOD(Install)(BOOL a_fReplace, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress);
-- /** @} */
--
--private:
-- /** @name Misc init helpers
-- * @{ */
-- HRESULT initFailed(const char *a_pszWhyFmt, ...);
-- /** @} */
--
--private:
-- struct Data;
-- /** Pointer to the private instance. */
-- Data *m;
--
-- friend class ExtPackManager;
--};
--
--
--/**
-- * An installed extension pack.
-- */
--class ATL_NO_VTABLE ExtPack :
-- public VirtualBoxBase,
-- VBOX_SCRIPTABLE_IMPL(IExtPack)
--{
--public:
-- /** @name COM and internal init/term/mapping cruft.
-- * @{ */
-- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPack, IExtPack)
-- DECLARE_NOT_AGGREGATABLE(ExtPack)
-- DECLARE_PROTECT_FINAL_CONSTRUCT()
-- BEGIN_COM_MAP(ExtPack)
-- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPack)
-- COM_INTERFACE_ENTRY(IExtPackBase)
-- END_COM_MAP()
-- DECLARE_EMPTY_CTOR_DTOR(ExtPack)
--
-- HRESULT FinalConstruct();
-- void FinalRelease();
-- HRESULT initWithDir(VBOXEXTPACKCTX a_enmContext, const char *a_pszName, const char *a_pszDir);
-- void uninit();
-- RTMEMEF_NEW_AND_DELETE_OPERATORS();
-- /** @} */
--
-- /** @name IExtPackBase interfaces
-- * @{ */
-- STDMETHOD(COMGETTER(Name))(BSTR *a_pbstrName);
-- STDMETHOD(COMGETTER(Description))(BSTR *a_pbstrDescription);
-- STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);
-- STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);
-- STDMETHOD(COMGETTER(Edition))(BSTR *a_pbstrEdition);
-- STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);
-- STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));
-- STDMETHOD(COMGETTER(Usable))(BOOL *a_pfUsable);
-- STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);
-- STDMETHOD(COMGETTER(ShowLicense))(BOOL *a_pfShowIt);
-- STDMETHOD(COMGETTER(License))(BSTR *a_pbstrHtmlLicense);
-- STDMETHOD(QueryLicense)(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage,
-- IN_BSTR a_bstrFormat, BSTR *a_pbstrLicense);
-- /** @} */
--
-- /** @name IExtPack interfaces
-- * @{ */
-- STDMETHOD(QueryObject)(IN_BSTR a_bstrObjectId, IUnknown **a_ppUnknown);
-- /** @} */
--
-- /** @name Internal interfaces used by ExtPackManager.
-- * @{ */
-- bool callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo);
-- HRESULT callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval);
-- bool callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock);
-- bool callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock);
-- bool callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock);
-- bool callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);
-- bool callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);
-- bool callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock);
-- HRESULT checkVrde(void);
-- HRESULT getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary);
-- bool wantsToBeDefaultVrde(void) const;
-- HRESULT refresh(bool *pfCanDelete);
-- /** @} */
--
--protected:
-- /** @name Internal helper methods.
-- * @{ */
-- void probeAndLoad(void);
-- bool findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind,
-- Utf8Str *a_ppStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const;
-- static bool objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2);
-- /** @} */
--
-- /** @name Extension Pack Helpers
-- * @{ */
-- static DECLCALLBACK(int) hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt,
-- VBOXEXTPACKMODKIND enmKind, char *pszFound, size_t cbFound, bool *pfNative);
-- static DECLCALLBACK(int) hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath);
-- static DECLCALLBACK(VBOXEXTPACKCTX) hlpGetContext(PCVBOXEXTPACKHLP pHlp);
-- static DECLCALLBACK(int) hlpReservedN(PCVBOXEXTPACKHLP pHlp);
-- /** @} */
--
--private:
-- struct Data;
-- /** Pointer to the private instance. */
-- Data *m;
--
-- friend class ExtPackManager;
--};
--
--
--/**
-- * Extension pack manager.
-- */
--class ATL_NO_VTABLE ExtPackManager :
-- public VirtualBoxBase,
-- VBOX_SCRIPTABLE_IMPL(IExtPackManager)
--{
-- /** @name COM and internal init/term/mapping cruft.
-- * @{ */
-- VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackManager, IExtPackManager)
-- DECLARE_NOT_AGGREGATABLE(ExtPackManager)
-- DECLARE_PROTECT_FINAL_CONSTRUCT()
-- BEGIN_COM_MAP(ExtPackManager)
-- VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackManager)
-- END_COM_MAP()
-- DECLARE_EMPTY_CTOR_DTOR(ExtPackManager)
--
-- HRESULT FinalConstruct();
-- void FinalRelease();
-- HRESULT initExtPackManager(VirtualBox *a_pVirtualBox, VBOXEXTPACKCTX a_enmContext);
-- void uninit();
-- RTMEMEF_NEW_AND_DELETE_OPERATORS();
-- /** @} */
--
-- /** @name IExtPack interfaces
-- * @{ */
-- STDMETHOD(COMGETTER(InstalledExtPacks))(ComSafeArrayOut(IExtPack *, a_paExtPacks));
-- STDMETHOD(Find)(IN_BSTR a_bstrName, IExtPack **a_pExtPack);
-- STDMETHOD(OpenExtPackFile)(IN_BSTR a_bstrTarball, IExtPackFile **a_ppExtPackFile);
-- STDMETHOD(Uninstall)(IN_BSTR a_bstrName, BOOL a_fForcedRemoval, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress);
-- STDMETHOD(Cleanup)(void);
-- STDMETHOD(QueryAllPlugInsForFrontend)(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules));
-- STDMETHOD(IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable));
-- /** @} */
--
-- /** @name Internal interfaces used by other Main classes.
-- * @{ */
-- static DECLCALLBACK(int) doInstallThreadProc(RTTHREAD hThread, void *pvJob);
-- HRESULT doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo);
-- static DECLCALLBACK(int) doUninstallThreadProc(RTTHREAD hThread, void *pvJob);
-- HRESULT doUninstall(const Utf8Str *a_pstrName, bool a_fForcedRemoval, const Utf8Str *a_pstrDisplayInfo);
-- void callAllVirtualBoxReadyHooks(void);
-- void callAllConsoleReadyHooks(IConsole *a_pConsole);
-- void callAllVmCreatedHooks(IMachine *a_pMachine);
-- int callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM);
-- int callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM);
-- void callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM);
-- HRESULT checkVrdeExtPack(Utf8Str const *a_pstrExtPack);
-- int getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary);
-- HRESULT getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack);
-- bool isExtPackUsable(const char *a_pszExtPack);
-- void dumpAllToReleaseLog(void);
-- /** @} */
--
--private:
-- HRESULT runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...);
-- ExtPack *findExtPack(const char *a_pszName);
-- void removeExtPack(const char *a_pszName);
-- HRESULT refreshExtPack(const char *a_pszName, bool a_fUnsuableIsError, ExtPack **a_ppExtPack);
--
--private:
-- struct Data;
-- /** Pointer to the private instance. */
-- Data *m;
--};
--
--#endif
--/* vi: set tabstop=4 shiftwidth=4 expandtab: */
---- VirtualBox-4.2.0.orig/src/VBox/Main/include/ExtPackUtil.h 2012-03-13 11:51:50.000000000 -0300
-+++ /dev/null 2012-09-18 22:18:48.866734195 -0300
-@@ -1,137 +0,0 @@
--/* $Id: ExtPackUtil.h 39878 2012-01-25 16:30:07Z vboxsync $ */
--/** @file
-- * VirtualBox Main - Extension Pack Utilities and definitions, VBoxC, VBoxSVC, ++.
-- */
--
--/*
-- * Copyright (C) 2010 Oracle Corporation
-- *
-- * This file is part of VirtualBox Open Source Edition (OSE), as
-- * available from http://www.virtualbox.org. This file is free software;
-- * you can redistribute it and/or modify it under the terms of the GNU
-- * General Public License (GPL) as published by the Free Software
-- * Foundation, in version 2 as it comes in the "COPYING" file of the
-- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-- */
--
--#ifndef ____H_EXTPACKUTIL
--#define ____H_EXTPACKUTIL
--
--#include <iprt/cpp/ministring.h>
--#include <iprt/fs.h>
--#include <iprt/vfs.h>
--
--
--/** @name VBOX_EXTPACK_DESCRIPTION_NAME
-- * The name of the description file in an extension pack. */
--#define VBOX_EXTPACK_DESCRIPTION_NAME "ExtPack.xml"
--/** @name VBOX_EXTPACK_DESCRIPTION_NAME
-- * The name of the manifest file in an extension pack. */
--#define VBOX_EXTPACK_MANIFEST_NAME "ExtPack.manifest"
--/** @name VBOX_EXTPACK_SIGNATURE_NAME
-- * The name of the signature file in an extension pack. */
--#define VBOX_EXTPACK_SIGNATURE_NAME "ExtPack.signature"
--/** @name VBOX_EXTPACK_LICENSE_NAME_PREFIX
-- * The name prefix of a license file in an extension pack. There can be
-- * several license files in a pack, the variations being on locale, language
-- * and format (HTML, RTF, plain text). All extension packages shall include
-- * a */
--#define VBOX_EXTPACK_LICENSE_NAME_PREFIX "ExtPack-license"
--/** @name VBOX_EXTPACK_SUFFIX
-- * The suffix of a extension pack tarball. */
--#define VBOX_EXTPACK_SUFFIX ".vbox-extpack"
--
--/** The minimum length (strlen) of a extension pack name. */
--#define VBOX_EXTPACK_NAME_MIN_LEN 3
--/** The max length (strlen) of a extension pack name. */
--#define VBOX_EXTPACK_NAME_MAX_LEN 64
--
--/** The architecture-dependent application data subdirectory where the
-- * extension packs are installed. Relative to RTPathAppPrivateArch. */
--#define VBOX_EXTPACK_INSTALL_DIR "ExtensionPacks"
--/** The architecture-independent application data subdirectory where the
-- * certificates are installed. Relative to RTPathAppPrivateNoArch. */
--#define VBOX_EXTPACK_CERT_DIR "ExtPackCertificates"
--
--/** The maximum entry name length.
-- * Play short and safe. */
--#define VBOX_EXTPACK_MAX_MEMBER_NAME_LENGTH 128
--
--
--/**
-- * Plug-in descriptor.
-- */
--typedef struct VBOXEXTPACKPLUGINDESC
--{
-- /** The name. */
-- RTCString strName;
-- /** The module name. */
-- RTCString strModule;
-- /** The description. */
-- RTCString strDescription;
-- /** The frontend or component which it plugs into. */
-- RTCString strFrontend;
--} VBOXEXTPACKPLUGINDESC;
--/** Pointer to a plug-in descriptor. */
--typedef VBOXEXTPACKPLUGINDESC *PVBOXEXTPACKPLUGINDESC;
--
--/**
-- * Extension pack descriptor
-- *
-- * This is the internal representation of the ExtPack.xml.
-- */
--typedef struct VBOXEXTPACKDESC
--{
-- /** The name. */
-- RTCString strName;
-- /** The description. */
-- RTCString strDescription;
-- /** The version string. */
-- RTCString strVersion;
-- /** The edition string. */
-- RTCString strEdition;
-- /** The internal revision number. */
-- uint32_t uRevision;
-- /** The name of the main module. */
-- RTCString strMainModule;
-- /** The name of the VRDE module, empty if none. */
-- RTCString strVrdeModule;
-- /** The number of plug-in descriptors. */
-- uint32_t cPlugIns;
-- /** Pointer to an array of plug-in descriptors. */
-- PVBOXEXTPACKPLUGINDESC paPlugIns;
-- /** Whether to show the license prior to installation. */
-- bool fShowLicense;
--} VBOXEXTPACKDESC;
--
--/** Pointer to a extension pack descriptor. */
--typedef VBOXEXTPACKDESC *PVBOXEXTPACKDESC;
--/** Pointer to a const extension pack descriptor. */
--typedef VBOXEXTPACKDESC const *PCVBOXEXTPACKDESC;
--
--
--void VBoxExtPackInitDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
--RTCString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
--RTCString *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo);
--RTCString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball);
--void VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc);
--bool VBoxExtPackIsValidName(const char *pszName);
--bool VBoxExtPackIsValidMangledName(const char *pszMangledName, size_t cchMax = RTSTR_MAX);
--RTCString *VBoxExtPackMangleName(const char *pszName);
--RTCString *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cbMax);
--int VBoxExtPackCalcDir(char *pszExtPackDir, size_t cbExtPackDir, const char *pszParentDir, const char *pszName);
--bool VBoxExtPackIsValidVersionString(const char *pszVersion);
--bool VBoxExtPackIsValidEditionString(const char *pszEdition);
--bool VBoxExtPackIsValidModuleString(const char *pszModule);
--
--int VBoxExtPackValidateMember(const char *pszName, RTVFSOBJTYPE enmType, RTVFSOBJ hVfsObj, char *pszError, size_t cbError);
--int VBoxExtPackOpenTarFss(RTFILE hTarballFile, char *pszError, size_t cbError, PRTVFSFSSTREAM phTarFss, PRTMANIFEST phFileManifest);
--int VBoxExtPackValidateTarball(RTFILE hTarballFile, const char *pszExtPackName,
-- const char *pszTarball, const char *pszTarballDigest,
-- char *pszError, size_t cbError,
-- PRTMANIFEST phValidManifest, PRTVFSFILE phXmlFile, RTCString *pStrDigest);
--
--
--#endif
--
---- VirtualBox-4.2.0.orig/src/VBox/Main/src-all/ExtPackManagerImpl.cpp 2012-04-03 04:56:24.000000000 -0300
-+++ /dev/null 2012-09-18 22:18:48.866734195 -0300
-@@ -1,3126 +0,0 @@
--/* $Id: ExtPackManagerImpl.cpp 40468 2012-03-14 17:07:58Z vboxsync $ */
--/** @file
-- * VirtualBox Main - interface for Extension Packs, VBoxSVC & VBoxC.
-- */
--
--/*
-- * Copyright (C) 2010 Oracle Corporation
-- *
-- * This file is part of VirtualBox Open Source Edition (OSE), as
-- * available from http://www.virtualbox.org. This file is free software;
-- * you can redistribute it and/or modify it under the terms of the GNU
-- * General Public License (GPL) as published by the Free Software
-- * Foundation, in version 2 as it comes in the "COPYING" file of the
-- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-- */
--
--
--/*******************************************************************************
--* Header Files *
--*******************************************************************************/
--#include "ExtPackManagerImpl.h"
--#include "ExtPackUtil.h"
--
--#include <iprt/buildconfig.h>
--#include <iprt/ctype.h>
--#include <iprt/dir.h>
--#include <iprt/env.h>
--#include <iprt/file.h>
--#include <iprt/ldr.h>
--#include <iprt/manifest.h>
--#include <iprt/param.h>
--#include <iprt/path.h>
--#include <iprt/pipe.h>
--#include <iprt/process.h>
--#include <iprt/string.h>
--
--#include <VBox/com/array.h>
--#include <VBox/com/ErrorInfo.h>
--#include <VBox/err.h>
--#include <VBox/log.h>
--#include <VBox/sup.h>
--#include <VBox/version.h>
--#include "AutoCaller.h"
--#include "Global.h"
--#include "ProgressImpl.h"
--#include "SystemPropertiesImpl.h"
--#include "VirtualBoxImpl.h"
--
--
--/*******************************************************************************
--* Defined Constants And Macros *
--*******************************************************************************/
--/** @name VBOX_EXTPACK_HELPER_NAME
-- * The name of the utility application we employ to install and uninstall the
-- * extension packs. This is a set-uid-to-root binary on unixy platforms, which
-- * is why it has to be a separate application.
-- */
--#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
--# define VBOX_EXTPACK_HELPER_NAME "VBoxExtPackHelperApp.exe"
--#else
--# define VBOX_EXTPACK_HELPER_NAME "VBoxExtPackHelperApp"
--#endif
--
--
--/*******************************************************************************
--* Structures and Typedefs *
--*******************************************************************************/
--struct ExtPackBaseData
--{
--public:
-- /** The extension pack descriptor (loaded from the XML, mostly). */
-- VBOXEXTPACKDESC Desc;
-- /** The file system object info of the XML file.
-- * This is for detecting changes and save time in refresh(). */
-- RTFSOBJINFO ObjInfoDesc;
-- /** Whether it's usable or not. */
-- bool fUsable;
-- /** Why it is unusable. */
-- Utf8Str strWhyUnusable;
--};
--
--/**
-- * Private extension pack data.
-- */
--struct ExtPackFile::Data : public ExtPackBaseData
--{
--public:
-- /** The path to the tarball. */
-- Utf8Str strExtPackFile;
-- /** The SHA-256 hash of the file (as string). */
-- Utf8Str strDigest;
-- /** The file handle of the extension pack file. */
-- RTFILE hExtPackFile;
-- /** Our manifest for the tarball. */
-- RTMANIFEST hOurManifest;
-- /** Pointer to the extension pack manager. */
-- ComObjPtr<ExtPackManager> ptrExtPackMgr;
-- /** Pointer to the VirtualBox object so we can create a progress object. */
-- VirtualBox *pVirtualBox;
--
-- RTMEMEF_NEW_AND_DELETE_OPERATORS();
--};
--
--/**
-- * Private extension pack data.
-- */
--struct ExtPack::Data : public ExtPackBaseData
--{
--public:
-- /** Where the extension pack is located. */
-- Utf8Str strExtPackPath;
-- /** The file system object info of the extension pack directory.
-- * This is for detecting changes and save time in refresh(). */
-- RTFSOBJINFO ObjInfoExtPack;
-- /** The full path to the main module. */
-- Utf8Str strMainModPath;
-- /** The file system object info of the main module.
-- * This is used to determin whether to bother try reload it. */
-- RTFSOBJINFO ObjInfoMainMod;
-- /** The module handle of the main extension pack module. */
-- RTLDRMOD hMainMod;
--
-- /** The helper callbacks for the extension pack. */
-- VBOXEXTPACKHLP Hlp;
-- /** Pointer back to the extension pack object (for Hlp methods). */
-- ExtPack *pThis;
-- /** The extension pack registration structure. */
-- PCVBOXEXTPACKREG pReg;
-- /** The current context. */
-- VBOXEXTPACKCTX enmContext;
-- /** Set if we've made the pfnVirtualBoxReady or pfnConsoleReady call. */
-- bool fMadeReadyCall;
--
-- RTMEMEF_NEW_AND_DELETE_OPERATORS();
--};
--
--/** List of extension packs. */
--typedef std::list< ComObjPtr<ExtPack> > ExtPackList;
--
--/**
-- * Private extension pack manager data.
-- */
--struct ExtPackManager::Data
--{
-- /** The directory where the extension packs are installed. */
-- Utf8Str strBaseDir;
-- /** The directory where the certificates this installation recognizes are
-- * stored. */
-- Utf8Str strCertificatDirPath;
-- /** The list of installed extension packs. */
-- ExtPackList llInstalledExtPacks;
-- /** Pointer to the VirtualBox object, our parent. */
-- VirtualBox *pVirtualBox;
-- /** The current context. */
-- VBOXEXTPACKCTX enmContext;
--#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_DARWIN)
-- /** File handle for the VBoxVMM libary which we slurp because ExtPacks depend on it. */
-- RTLDRMOD hVBoxVMM;
--#endif
--
-- RTMEMEF_NEW_AND_DELETE_OPERATORS();
--};
--
--/**
-- * Extension pack installation job.
-- */
--typedef struct EXTPACKINSTALLJOB
--{
-- /** Smart pointer to the extension pack file. */
-- ComPtr<ExtPackFile> ptrExtPackFile;
-- /** The replace argument. */
-- bool fReplace;
-- /** The display info argument. */
-- Utf8Str strDisplayInfo;
-- /** Smart pointer to the extension manager. */
-- ComPtr<ExtPackManager> ptrExtPackMgr;
-- /** Smart pointer to the progress object for this job. */
-- ComObjPtr<Progress> ptrProgress;
--} EXTPACKINSTALLJOB;
--/** Pointer to an extension pack installation job. */
--typedef EXTPACKINSTALLJOB *PEXTPACKINSTALLJOB;
--
--/**
-- * Extension pack uninstallation job.
-- */
--typedef struct EXTPACKUNINSTALLJOB
--{
-- /** Smart pointer to the extension manager. */
-- ComPtr<ExtPackManager> ptrExtPackMgr;
-- /** The name of the extension pack. */
-- Utf8Str strName;
-- /** The replace argument. */
-- bool fForcedRemoval;
-- /** The display info argument. */
-- Utf8Str strDisplayInfo;
-- /** Smart pointer to the progress object for this job. */
-- ComObjPtr<Progress> ptrProgress;
--} EXTPACKUNINSTALLJOB;
--/** Pointer to an extension pack uninstallation job. */
--typedef EXTPACKUNINSTALLJOB *PEXTPACKUNINSTALLJOB;
--
--
--DEFINE_EMPTY_CTOR_DTOR(ExtPackFile)
--
--/**
-- * Called by ComObjPtr::createObject when creating the object.
-- *
-- * Just initialize the basic object state, do the rest in initWithDir().
-- *
-- * @returns S_OK.
-- */
--HRESULT ExtPackFile::FinalConstruct()
--{
-- m = NULL;
-- return BaseFinalConstruct();
--}
--
--/**
-- * Initializes the extension pack by reading its file.
-- *
-- * @returns COM status code.
-- * @param a_pszFile The path to the extension pack file.
-- * @param a_pszDigest The SHA-256 digest of the file. Or an empty string.
-- * @param a_pExtPackMgr Pointer to the extension pack manager.
-- * @param a_pVirtualBox Pointer to the VirtualBox object.
-- */
--HRESULT ExtPackFile::initWithFile(const char *a_pszFile, const char *a_pszDigest, ExtPackManager *a_pExtPackMgr, VirtualBox *a_pVirtualBox)
--{
-- AutoInitSpan autoInitSpan(this);
-- AssertReturn(autoInitSpan.isOk(), E_FAIL);
--
-- /*
-- * Allocate + initialize our private data.
-- */
-- m = new ExtPackFile::Data;
-- VBoxExtPackInitDesc(&m->Desc);
-- RT_ZERO(m->ObjInfoDesc);
-- m->fUsable = false;
-- m->strWhyUnusable = tr("ExtPack::init failed");
-- m->strExtPackFile = a_pszFile;
-- m->strDigest = a_pszDigest;
-- m->hExtPackFile = NIL_RTFILE;
-- m->hOurManifest = NIL_RTMANIFEST;
-- m->ptrExtPackMgr = a_pExtPackMgr;
-- m->pVirtualBox = a_pVirtualBox;
--
-- RTCString *pstrTarName = VBoxExtPackExtractNameFromTarballPath(a_pszFile);
-- if (pstrTarName)
-- {
-- m->Desc.strName = *pstrTarName;
-- delete pstrTarName;
-- pstrTarName = NULL;
-- }
--
-- autoInitSpan.setSucceeded();
--
-- /*
-- * Try open the extension pack and check that it is a regular file.
-- */
-- int vrc = RTFileOpen(&m->hExtPackFile, a_pszFile,
-- RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN);
-- if (RT_FAILURE(vrc))
-- {
-- if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
-- return initFailed(tr("'%s' file not found"), a_pszFile);
-- return initFailed(tr("RTFileOpen('%s',,) failed with %Rrc"), a_pszFile, vrc);
-- }
--
-- RTFSOBJINFO ObjInfo;
-- vrc = RTFileQueryInfo(m->hExtPackFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
-- if (RT_FAILURE(vrc))
-- return initFailed(tr("RTFileQueryInfo failed with %Rrc on '%s'"), vrc, a_pszFile);
-- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
-- return initFailed(tr("Not a regular file: %s"), a_pszFile);
--
-- /*
-- * Validate the tarball and extract the XML file.
-- */
-- char szError[8192];
-- RTVFSFILE hXmlFile;
-- vrc = VBoxExtPackValidateTarball(m->hExtPackFile, NULL /*pszExtPackName*/, a_pszFile, a_pszDigest,
-- szError, sizeof(szError), &m->hOurManifest, &hXmlFile, &m->strDigest);
-- if (RT_FAILURE(vrc))
-- return initFailed(tr("%s"), szError);
--
-- /*
-- * Parse the XML.
-- */
-- RTCString strSavedName(m->Desc.strName);
-- RTCString *pStrLoadErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &m->Desc, &m->ObjInfoDesc);
-- RTVfsFileRelease(hXmlFile);
-- if (pStrLoadErr != NULL)
-- {
-- m->strWhyUnusable.printf(tr("Failed to the xml file: %s"), pStrLoadErr->c_str());
-- m->Desc.strName = strSavedName;
-- delete pStrLoadErr;
-- return S_OK;
-- }
--
-- /*
-- * Match the tarball name with the name from the XML.
-- */
-- /** @todo drop this restriction after the old install interface is
-- * dropped. */
-- if (!strSavedName.equalsIgnoreCase(m->Desc.strName))
-- return initFailed(tr("Extension pack name mismatch between the downloaded file and the XML inside it (xml='%s' file='%s')"),
-- m->Desc.strName.c_str(), strSavedName.c_str());
--
-- m->fUsable = true;
-- m->strWhyUnusable.setNull();
-- return S_OK;
--}
--
--/**
-- * Protected helper that formats the strWhyUnusable value.
-- *
-- * @returns S_OK
-- * @param a_pszWhyFmt Why it failed, format string.
-- * @param ... The format arguments.
-- */
--HRESULT ExtPackFile::initFailed(const char *a_pszWhyFmt, ...)
--{
-- va_list va;
-- va_start(va, a_pszWhyFmt);
-- m->strWhyUnusable.printfV(a_pszWhyFmt, va);
-- va_end(va);
-- return S_OK;
--}
--
--/**
-- * COM cruft.
-- */
--void ExtPackFile::FinalRelease()
--{
-- uninit();
-- BaseFinalRelease();
--}
--
--/**
-- * Do the actual cleanup.
-- */
--void ExtPackFile::uninit()
--{
-- /* Enclose the state transition Ready->InUninit->NotReady */
-- AutoUninitSpan autoUninitSpan(this);
-- if (!autoUninitSpan.uninitDone() && m != NULL)
-- {
-- VBoxExtPackFreeDesc(&m->Desc);
-- RTFileClose(m->hExtPackFile);
-- m->hExtPackFile = NIL_RTFILE;
-- RTManifestRelease(m->hOurManifest);
-- m->hOurManifest = NIL_RTMANIFEST;
--
-- delete m;
-- m = NULL;
-- }
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(Name)(BSTR *a_pbstrName)
--{
-- CheckComArgOutPointerValid(a_pbstrName);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr str(m->Desc.strName);
-- str.cloneTo(a_pbstrName);
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(Description)(BSTR *a_pbstrDescription)
--{
-- CheckComArgOutPointerValid(a_pbstrDescription);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr str(m->Desc.strDescription);
-- str.cloneTo(a_pbstrDescription);
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(Version)(BSTR *a_pbstrVersion)
--{
-- CheckComArgOutPointerValid(a_pbstrVersion);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr str(m->Desc.strVersion);
-- str.cloneTo(a_pbstrVersion);
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(Edition)(BSTR *a_pbstrEdition)
--{
-- CheckComArgOutPointerValid(a_pbstrEdition);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr str(m->Desc.strEdition);
-- str.cloneTo(a_pbstrEdition);
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(Revision)(ULONG *a_puRevision)
--{
-- CheckComArgOutPointerValid(a_puRevision);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- *a_puRevision = m->Desc.uRevision;
-- return hrc;
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(VRDEModule)(BSTR *a_pbstrVrdeModule)
--{
-- CheckComArgOutPointerValid(a_pbstrVrdeModule);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr str(m->Desc.strVrdeModule);
-- str.cloneTo(a_pbstrVrdeModule);
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(PlugIns)(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns))
--{
-- /** @todo implement plug-ins. */
--#ifdef VBOX_WITH_XPCOM
-- NOREF(a_paPlugIns);
-- NOREF(a_paPlugInsSize);
--#endif
-- ReturnComNotImplemented();
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(Usable)(BOOL *a_pfUsable)
--{
-- CheckComArgOutPointerValid(a_pfUsable);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- *a_pfUsable = m->fUsable;
-- return hrc;
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(WhyUnusable)(BSTR *a_pbstrWhy)
--{
-- CheckComArgOutPointerValid(a_pbstrWhy);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- m->strWhyUnusable.cloneTo(a_pbstrWhy);
-- return hrc;
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(ShowLicense)(BOOL *a_pfShowIt)
--{
-- CheckComArgOutPointerValid(a_pfShowIt);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- *a_pfShowIt = m->Desc.fShowLicense;
-- return hrc;
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(License)(BSTR *a_pbstrHtmlLicense)
--{
-- Bstr bstrHtml("html");
-- return QueryLicense(Bstr::Empty.raw(), Bstr::Empty.raw(), bstrHtml.raw(), a_pbstrHtmlLicense);
--}
--
--/* Same as ExtPack::QueryLicense, should really explore the subject of base classes here... */
--STDMETHODIMP ExtPackFile::QueryLicense(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage, IN_BSTR a_bstrFormat,
-- BSTR *a_pbstrLicense)
--{
-- /*
-- * Validate input.
-- */
-- CheckComArgOutPointerValid(a_pbstrLicense);
-- CheckComArgNotNull(a_bstrPreferredLocale);
-- CheckComArgNotNull(a_bstrPreferredLanguage);
-- CheckComArgNotNull(a_bstrFormat);
--
-- Utf8Str strPreferredLocale(a_bstrPreferredLocale);
-- if (strPreferredLocale.length() != 2 && strPreferredLocale.length() != 0)
-- return setError(E_FAIL, tr("The preferred locale is a two character string or empty."));
--
-- Utf8Str strPreferredLanguage(a_bstrPreferredLanguage);
-- if (strPreferredLanguage.length() != 2 && strPreferredLanguage.length() != 0)
-- return setError(E_FAIL, tr("The preferred lanuage is a two character string or empty."));
--
-- Utf8Str strFormat(a_bstrFormat);
-- if ( !strFormat.equals("html")
-- && !strFormat.equals("rtf")
-- && !strFormat.equals("txt"))
-- return setError(E_FAIL, tr("The license format can only have the values 'html', 'rtf' and 'txt'."));
--
-- /*
-- * Combine the options to form a file name before locking down anything.
-- */
-- char szName[sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX "-de_DE.html") + 2];
-- if (strPreferredLocale.isNotEmpty() && strPreferredLanguage.isNotEmpty())
-- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s_%s.%s",
-- strPreferredLocale.c_str(), strPreferredLanguage.c_str(), strFormat.c_str());
-- else if (strPreferredLocale.isNotEmpty())
-- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
-- else if (strPreferredLanguage.isNotEmpty())
-- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-_%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
-- else
-- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX ".%s", strFormat.c_str());
--
-- /*
-- * Lock the extension pack. We need a write lock here as there must not be
-- * concurrent accesses to the tar file handle.
-- */
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
--
-- /*
-- * Do not permit this query on a pack that isn't considered usable (could
-- * be marked so because of bad license files).
-- */
-- if (!m->fUsable)
-- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
-- else
-- {
-- /*
-- * Look it up in the manifest before scanning the tarball for it
-- */
-- if (RTManifestEntryExists(m->hOurManifest, szName))
-- {
-- RTVFSFSSTREAM hTarFss;
-- char szError[8192];
-- int vrc = VBoxExtPackOpenTarFss(m->hExtPackFile, szError, sizeof(szError), &hTarFss, NULL);
-- if (RT_SUCCESS(vrc))
-- {
-- for (;;)
-- {
-- /* Get the first/next. */
-- char *pszName;
-- RTVFSOBJ hVfsObj;
-- RTVFSOBJTYPE enmType;
-- vrc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
-- if (RT_FAILURE(vrc))
-- {
-- if (vrc != VERR_EOF)
-- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsFsStrmNext failed: %Rrc"), vrc);
-- else
-- hrc = setError(E_UNEXPECTED, tr("'%s' was found in the manifest but not in the tarball"), szName);
-- break;
-- }
--
-- /* Is this it? */
-- const char *pszAdjName = pszName[0] == '.' && pszName[1] == '/' ? &pszName[2] : pszName;
-- if ( !strcmp(pszAdjName, szName)
-- && ( enmType == RTVFSOBJTYPE_IO_STREAM
-- || enmType == RTVFSOBJTYPE_FILE))
-- {
-- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(hVfsObj);
-- RTVfsObjRelease(hVfsObj);
-- RTStrFree(pszName);
--
-- /* Load the file into memory. */
-- RTFSOBJINFO ObjInfo;
-- vrc = RTVfsIoStrmQueryInfo(hVfsIos, &ObjInfo, RTFSOBJATTRADD_NOTHING);
-- if (RT_SUCCESS(vrc))
-- {
-- size_t cbFile = (size_t)ObjInfo.cbObject;
-- void *pvFile = RTMemAllocZ(cbFile + 1);
-- if (pvFile)
-- {
-- vrc = RTVfsIoStrmRead(hVfsIos, pvFile, cbFile, true /*fBlocking*/, NULL);
-- if (RT_SUCCESS(vrc))
-- {
-- /* try translate it into a string we can return. */
-- Bstr bstrLicense((const char *)pvFile, cbFile);
-- if (bstrLicense.isNotEmpty())
-- {
-- bstrLicense.detachTo(a_pbstrLicense);
-- hrc = S_OK;
-- }
-- else
-- hrc = setError(VBOX_E_IPRT_ERROR,
-- tr("The license file '%s' is empty or contains invalid UTF-8 encoding"),
-- szName);
-- }
-- else
-- hrc = setError(VBOX_E_IPRT_ERROR, tr("Failed to read '%s': %Rrc"), szName, vrc);
-- RTMemFree(pvFile);
-- }
-- else
-- hrc = setError(E_OUTOFMEMORY, tr("Failed to allocate %zu bytes for '%s'"), cbFile, szName);
-- }
-- else
-- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsIoStrmQueryInfo on '%s': %Rrc"), szName, vrc);
-- RTVfsIoStrmRelease(hVfsIos);
-- break;
-- }
--
-- /* Release current. */
-- RTVfsObjRelease(hVfsObj);
-- RTStrFree(pszName);
-- }
-- RTVfsFsStrmRelease(hTarFss);
-- }
-- else
-- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("%s"), szError);
-- }
-- else
-- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in '%s'"),
-- szName, m->strExtPackFile.c_str());
-- }
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPackFile::COMGETTER(FilePath)(BSTR *a_pbstrPath)
--{
-- CheckComArgOutPointerValid(a_pbstrPath);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- m->strExtPackFile.cloneTo(a_pbstrPath);
-- return hrc;
--}
--
--STDMETHODIMP ExtPackFile::Install(BOOL a_fReplace, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress)
--{
-- if (a_ppProgress)
-- *a_ppProgress = NULL;
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- if (m->fUsable)
-- {
-- PEXTPACKINSTALLJOB pJob = NULL;
-- try
-- {
-- pJob = new EXTPACKINSTALLJOB;
-- pJob->ptrExtPackFile = this;
-- pJob->fReplace = a_fReplace != FALSE;
-- pJob->strDisplayInfo = a_bstrDisplayInfo;
-- pJob->ptrExtPackMgr = m->ptrExtPackMgr;
-- hrc = pJob->ptrProgress.createObject();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr bstrDescription = tr("Installing extension pack");
-- hrc = pJob->ptrProgress->init(
--#ifndef VBOX_COM_INPROC
-- m->pVirtualBox,
--#endif
-- static_cast<IExtPackFile *>(this),
-- bstrDescription.raw(),
-- FALSE /*aCancelable*/,
-- NULL /*aId*/);
-- }
-- if (SUCCEEDED(hrc))
-- {
-- ComPtr<Progress> ptrProgress = pJob->ptrProgress;
-- int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::doInstallThreadProc, pJob, 0,
-- RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackInst");
-- if (RT_SUCCESS(vrc))
-- {
-- pJob = NULL; /* the thread deletes it */
-- ptrProgress.queryInterfaceTo(a_ppProgress);
-- }
-- else
-- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc);
-- }
-- }
-- catch (std::bad_alloc)
-- {
-- hrc = E_OUTOFMEMORY;
-- }
-- if (pJob)
-- delete pJob;
-- }
-- else
-- hrc = setError(E_FAIL, "%s", m->strWhyUnusable.c_str());
-- }
-- return hrc;
--}
--
--
--
--
--
--DEFINE_EMPTY_CTOR_DTOR(ExtPack)
--
--/**
-- * Called by ComObjPtr::createObject when creating the object.
-- *
-- * Just initialize the basic object state, do the rest in initWithDir().
-- *
-- * @returns S_OK.
-- */
--HRESULT ExtPack::FinalConstruct()
--{
-- m = NULL;
-- return S_OK;
--}
--
--/**
-- * Initializes the extension pack by reading its file.
-- *
-- * @returns COM status code.
-- * @param a_enmContext The context we're in.
-- * @param a_pszName The name of the extension pack. This is also the
-- * name of the subdirector under @a a_pszParentDir
-- * where the extension pack is installed.
-- * @param a_pszDir The extension pack directory name.
-- */
--HRESULT ExtPack::initWithDir(VBOXEXTPACKCTX a_enmContext, const char *a_pszName, const char *a_pszDir)
--{
-- AutoInitSpan autoInitSpan(this);
-- AssertReturn(autoInitSpan.isOk(), E_FAIL);
--
-- static const VBOXEXTPACKHLP s_HlpTmpl =
-- {
-- /* u32Version = */ VBOXEXTPACKHLP_VERSION,
-- /* uVBoxFullVersion = */ VBOX_FULL_VERSION,
-- /* uVBoxVersionRevision = */ 0,
-- /* u32Padding = */ 0,
-- /* pszVBoxVersion = */ "",
-- /* pfnFindModule = */ ExtPack::hlpFindModule,
-- /* pfnGetFilePath = */ ExtPack::hlpGetFilePath,
-- /* pfnGetContext = */ ExtPack::hlpGetContext,
-- /* pfnReserved1 = */ ExtPack::hlpReservedN,
-- /* pfnReserved2 = */ ExtPack::hlpReservedN,
-- /* pfnReserved3 = */ ExtPack::hlpReservedN,
-- /* pfnReserved4 = */ ExtPack::hlpReservedN,
-- /* pfnReserved5 = */ ExtPack::hlpReservedN,
-- /* pfnReserved6 = */ ExtPack::hlpReservedN,
-- /* pfnReserved7 = */ ExtPack::hlpReservedN,
-- /* pfnReserved8 = */ ExtPack::hlpReservedN,
-- /* pfnReserved9 = */ ExtPack::hlpReservedN,
-- /* u32EndMarker = */ VBOXEXTPACKHLP_VERSION
-- };
--
-- /*
-- * Allocate + initialize our private data.
-- */
-- m = new Data;
-- VBoxExtPackInitDesc(&m->Desc);
-- m->Desc.strName = a_pszName;
-- RT_ZERO(m->ObjInfoDesc);
-- m->fUsable = false;
-- m->strWhyUnusable = tr("ExtPack::init failed");
-- m->strExtPackPath = a_pszDir;
-- RT_ZERO(m->ObjInfoExtPack);
-- m->strMainModPath.setNull();
-- RT_ZERO(m->ObjInfoMainMod);
-- m->hMainMod = NIL_RTLDRMOD;
-- m->Hlp = s_HlpTmpl;
-- m->Hlp.pszVBoxVersion = RTBldCfgVersion();
-- m->Hlp.uVBoxInternalRevision = RTBldCfgRevision();
-- m->pThis = this;
-- m->pReg = NULL;
-- m->enmContext = a_enmContext;
-- m->fMadeReadyCall = false;
--
-- /*
-- * Probe the extension pack (this code is shared with refresh()).
-- */
-- probeAndLoad();
--
-- autoInitSpan.setSucceeded();
-- return S_OK;
--}
--
--/**
-- * COM cruft.
-- */
--void ExtPack::FinalRelease()
--{
-- uninit();
--}
--
--/**
-- * Do the actual cleanup.
-- */
--void ExtPack::uninit()
--{
-- /* Enclose the state transition Ready->InUninit->NotReady */
-- AutoUninitSpan autoUninitSpan(this);
-- if (!autoUninitSpan.uninitDone() && m != NULL)
-- {
-- if (m->hMainMod != NIL_RTLDRMOD)
-- {
-- AssertPtr(m->pReg);
-- if (m->pReg->pfnUnload != NULL)
-- m->pReg->pfnUnload(m->pReg);
--
-- RTLdrClose(m->hMainMod);
-- m->hMainMod = NIL_RTLDRMOD;
-- m->pReg = NULL;
-- }
--
-- VBoxExtPackFreeDesc(&m->Desc);
--
-- delete m;
-- m = NULL;
-- }
--}
--
--
--/**
-- * Calls the installed hook.
-- *
-- * @returns true if we left the lock, false if we didn't.
-- * @param a_pVirtualBox The VirtualBox interface.
-- * @param a_pLock The write lock held by the caller.
-- * @param pErrInfo Where to return error information.
-- */
--bool ExtPack::callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo)
--{
-- if ( m != NULL
-- && m->hMainMod != NIL_RTLDRMOD)
-- {
-- if (m->pReg->pfnInstalled)
-- {
-- ComPtr<ExtPack> ptrSelfRef = this;
-- a_pLock->release();
-- pErrInfo->rc = m->pReg->pfnInstalled(m->pReg, a_pVirtualBox, pErrInfo);
-- a_pLock->acquire();
-- return true;
-- }
-- }
-- pErrInfo->rc = VINF_SUCCESS;
-- return false;
--}
--
--/**
-- * Calls the uninstall hook and closes the module.
-- *
-- * @returns S_OK or COM error status with error information.
-- * @param a_pVirtualBox The VirtualBox interface.
-- * @param a_fForcedRemoval When set, we'll ignore complaints from the
-- * uninstall hook.
-- * @remarks The caller holds the manager's write lock, not released.
-- */
--HRESULT ExtPack::callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval)
--{
-- HRESULT hrc = S_OK;
--
-- if ( m != NULL
-- && m->hMainMod != NIL_RTLDRMOD)
-- {
-- if (m->pReg->pfnUninstall && !a_fForcedRemoval)
-- {
-- int vrc = m->pReg->pfnUninstall(m->pReg, a_pVirtualBox);
-- if (RT_FAILURE(vrc))
-- {
-- LogRel(("ExtPack pfnUninstall returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
-- if (!a_fForcedRemoval)
-- hrc = setError(E_FAIL, tr("pfnUninstall returned %Rrc"), vrc);
-- }
-- }
-- if (SUCCEEDED(hrc))
-- {
-- RTLdrClose(m->hMainMod);
-- m->hMainMod = NIL_RTLDRMOD;
-- m->pReg = NULL;
-- }
-- }
--
-- return hrc;
--}
--
--/**
-- * Calls the pfnVirtualBoxReady hook.
-- *
-- * @returns true if we left the lock, false if we didn't.
-- * @param a_pVirtualBox The VirtualBox interface.
-- * @param a_pLock The write lock held by the caller.
-- */
--bool ExtPack::callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock)
--{
-- if ( m != NULL
-- && m->fUsable
-- && !m->fMadeReadyCall)
-- {
-- m->fMadeReadyCall = true;
-- if (m->pReg->pfnVirtualBoxReady)
-- {
-- ComPtr<ExtPack> ptrSelfRef = this;
-- a_pLock->release();
-- m->pReg->pfnVirtualBoxReady(m->pReg, a_pVirtualBox);
-- a_pLock->acquire();
-- return true;
-- }
-- }
-- return false;
--}
--
--/**
-- * Calls the pfnConsoleReady hook.
-- *
-- * @returns true if we left the lock, false if we didn't.
-- * @param a_pConsole The Console interface.
-- * @param a_pLock The write lock held by the caller.
-- */
--bool ExtPack::callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock)
--{
-- if ( m != NULL
-- && m->fUsable
-- && !m->fMadeReadyCall)
-- {
-- m->fMadeReadyCall = true;
-- if (m->pReg->pfnConsoleReady)
-- {
-- ComPtr<ExtPack> ptrSelfRef = this;
-- a_pLock->release();
-- m->pReg->pfnConsoleReady(m->pReg, a_pConsole);
-- a_pLock->acquire();
-- return true;
-- }
-- }
-- return false;
--}
--
--/**
-- * Calls the pfnVMCreate hook.
-- *
-- * @returns true if we left the lock, false if we didn't.
-- * @param a_pVirtualBox The VirtualBox interface.
-- * @param a_pMachine The machine interface of the new VM.
-- * @param a_pLock The write lock held by the caller.
-- */
--bool ExtPack::callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock)
--{
-- if ( m != NULL
-- && m->fUsable)
-- {
-- if (m->pReg->pfnVMCreated)
-- {
-- ComPtr<ExtPack> ptrSelfRef = this;
-- a_pLock->release();
-- m->pReg->pfnVMCreated(m->pReg, a_pVirtualBox, a_pMachine);
-- a_pLock->acquire();
-- return true;
-- }
-- }
-- return false;
--}
--
--/**
-- * Calls the pfnVMConfigureVMM hook.
-- *
-- * @returns true if we left the lock, false if we didn't.
-- * @param a_pConsole The console interface.
-- * @param a_pVM The VM handle.
-- * @param a_pLock The write lock held by the caller.
-- * @param a_pvrc Where to return the status code of the
-- * callback. This is always set. LogRel is
-- * called on if a failure status is returned.
-- */
--bool ExtPack::callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc)
--{
-- *a_pvrc = VINF_SUCCESS;
-- if ( m != NULL
-- && m->fUsable)
-- {
-- if (m->pReg->pfnVMConfigureVMM)
-- {
-- ComPtr<ExtPack> ptrSelfRef = this;
-- a_pLock->release();
-- int vrc = m->pReg->pfnVMConfigureVMM(m->pReg, a_pConsole, a_pVM);
-- *a_pvrc = vrc;
-- a_pLock->acquire();
-- if (RT_FAILURE(vrc))
-- LogRel(("ExtPack pfnVMConfigureVMM returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
-- return true;
-- }
-- }
-- return false;
--}
--
--/**
-- * Calls the pfnVMPowerOn hook.
-- *
-- * @returns true if we left the lock, false if we didn't.
-- * @param a_pConsole The console interface.
-- * @param a_pVM The VM handle.
-- * @param a_pLock The write lock held by the caller.
-- * @param a_pvrc Where to return the status code of the
-- * callback. This is always set. LogRel is
-- * called on if a failure status is returned.
-- */
--bool ExtPack::callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc)
--{
-- *a_pvrc = VINF_SUCCESS;
-- if ( m != NULL
-- && m->fUsable)
-- {
-- if (m->pReg->pfnVMPowerOn)
-- {
-- ComPtr<ExtPack> ptrSelfRef = this;
-- a_pLock->release();
-- int vrc = m->pReg->pfnVMPowerOn(m->pReg, a_pConsole, a_pVM);
-- *a_pvrc = vrc;
-- a_pLock->acquire();
-- if (RT_FAILURE(vrc))
-- LogRel(("ExtPack pfnVMPowerOn returned %Rrc for %s\n", vrc, m->Desc.strName.c_str()));
-- return true;
-- }
-- }
-- return false;
--}
--
--/**
-- * Calls the pfnVMPowerOff hook.
-- *
-- * @returns true if we left the lock, false if we didn't.
-- * @param a_pConsole The console interface.
-- * @param a_pVM The VM handle.
-- * @param a_pLock The write lock held by the caller.
-- */
--bool ExtPack::callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock)
--{
-- if ( m != NULL
-- && m->fUsable)
-- {
-- if (m->pReg->pfnVMPowerOff)
-- {
-- ComPtr<ExtPack> ptrSelfRef = this;
-- a_pLock->release();
-- m->pReg->pfnVMPowerOff(m->pReg, a_pConsole, a_pVM);
-- a_pLock->acquire();
-- return true;
-- }
-- }
-- return false;
--}
--
--/**
-- * Check if the extension pack is usable and has an VRDE module.
-- *
-- * @returns S_OK or COM error status with error information.
-- *
-- * @remarks Caller holds the extension manager lock for reading, no locking
-- * necessary.
-- */
--HRESULT ExtPack::checkVrde(void)
--{
-- HRESULT hrc;
-- if ( m != NULL
-- && m->fUsable)
-- {
-- if (m->Desc.strVrdeModule.isNotEmpty())
-- hrc = S_OK;
-- else
-- hrc = setError(E_FAIL, tr("The extension pack '%s' does not include a VRDE module"), m->Desc.strName.c_str());
-- }
-- else
-- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
-- return hrc;
--}
--
--/**
-- * Same as checkVrde(), except that it also resolves the path to the module.
-- *
-- * @returns S_OK or COM error status with error information.
-- * @param a_pstrVrdeLibrary Where to return the path on success.
-- *
-- * @remarks Caller holds the extension manager lock for reading, no locking
-- * necessary.
-- */
--HRESULT ExtPack::getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary)
--{
-- HRESULT hrc = checkVrde();
-- if (SUCCEEDED(hrc))
-- {
-- if (findModule(m->Desc.strVrdeModule.c_str(), NULL, VBOXEXTPACKMODKIND_R3,
-- a_pstrVrdeLibrary, NULL /*a_pfNative*/, NULL /*a_pObjInfo*/))
-- hrc = S_OK;
-- else
-- hrc = setError(E_FAIL, tr("Failed to locate the VRDE module '%s' in extension pack '%s'"),
-- m->Desc.strVrdeModule.c_str(), m->Desc.strName.c_str());
-- }
-- return hrc;
--}
--
--/**
-- * Check if this extension pack wishes to be the default VRDE provider.
-- *
-- * @returns @c true if it wants to and it is in a usable state, otherwise
-- * @c false.
-- *
-- * @remarks Caller holds the extension manager lock for reading, no locking
-- * necessary.
-- */
--bool ExtPack::wantsToBeDefaultVrde(void) const
--{
-- return m->fUsable
-- && m->Desc.strVrdeModule.isNotEmpty();
--}
--
--/**
-- * Refreshes the extension pack state.
-- *
-- * This is called by the manager so that the on disk changes are picked up.
-- *
-- * @returns S_OK or COM error status with error information.
-- *
-- * @param a_pfCanDelete Optional can-delete-this-object output indicator.
-- *
-- * @remarks Caller holds the extension manager lock for writing.
-- * @remarks Only called in VBoxSVC.
-- */
--HRESULT ExtPack::refresh(bool *a_pfCanDelete)
--{
-- if (a_pfCanDelete)
-- *a_pfCanDelete = false;
--
-- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS); /* for the COMGETTERs */
--
-- /*
-- * Has the module been deleted?
-- */
-- RTFSOBJINFO ObjInfoExtPack;
-- int vrc = RTPathQueryInfoEx(m->strExtPackPath.c_str(), &ObjInfoExtPack, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
-- if ( RT_FAILURE(vrc)
-- || !RTFS_IS_DIRECTORY(ObjInfoExtPack.Attr.fMode))
-- {
-- if (a_pfCanDelete)
-- *a_pfCanDelete = true;
-- return S_OK;
-- }
--
-- /*
-- * We've got a directory, so try query file system object info for the
-- * files we are interested in as well.
-- */
-- RTFSOBJINFO ObjInfoDesc;
-- char szDescFilePath[RTPATH_MAX];
-- vrc = RTPathJoin(szDescFilePath, sizeof(szDescFilePath), m->strExtPackPath.c_str(), VBOX_EXTPACK_DESCRIPTION_NAME);
-- if (RT_SUCCESS(vrc))
-- vrc = RTPathQueryInfoEx(szDescFilePath, &ObjInfoDesc, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
-- if (RT_FAILURE(vrc))
-- RT_ZERO(ObjInfoDesc);
--
-- RTFSOBJINFO ObjInfoMainMod;
-- if (m->strMainModPath.isNotEmpty())
-- vrc = RTPathQueryInfoEx(m->strMainModPath.c_str(), &ObjInfoMainMod, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
-- if (m->strMainModPath.isEmpty() || RT_FAILURE(vrc))
-- RT_ZERO(ObjInfoMainMod);
--
-- /*
-- * If we have a usable module already, just verify that things haven't
-- * changed since we loaded it.
-- */
-- if (m->fUsable)
-- {
-- if (m->hMainMod == NIL_RTLDRMOD)
-- probeAndLoad();
-- else if ( !objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc)
-- || !objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod)
-- || !objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) )
-- {
-- /** @todo not important, so it can wait. */
-- }
-- }
-- /*
-- * Ok, it is currently not usable. If anything has changed since last time
-- * reprobe the extension pack.
-- */
-- else if ( !objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc)
-- || !objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod)
-- || !objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) )
-- probeAndLoad();
--
-- return S_OK;
--}
--
--/**
-- * Probes the extension pack, loading the main dll and calling its registration
-- * entry point.
-- *
-- * This updates the state accordingly, the strWhyUnusable and fUnusable members
-- * being the most important ones.
-- */
--void ExtPack::probeAndLoad(void)
--{
-- m->fUsable = false;
-- m->fMadeReadyCall = false;
--
-- /*
-- * Query the file system info for the extension pack directory. This and
-- * all other file system info we save is for the benefit of refresh().
-- */
-- int vrc = RTPathQueryInfoEx(m->strExtPackPath.c_str(), &m->ObjInfoExtPack, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
-- if (RT_FAILURE(vrc))
-- {
-- m->strWhyUnusable.printf(tr("RTPathQueryInfoEx on '%s' failed: %Rrc"), m->strExtPackPath.c_str(), vrc);
-- return;
-- }
-- if (!RTFS_IS_DIRECTORY(m->ObjInfoExtPack.Attr.fMode))
-- {
-- if (RTFS_IS_SYMLINK(m->ObjInfoExtPack.Attr.fMode))
-- m->strWhyUnusable.printf(tr("'%s' is a symbolic link, this is not allowed"), m->strExtPackPath.c_str(), vrc);
-- else if (RTFS_IS_FILE(m->ObjInfoExtPack.Attr.fMode))
-- m->strWhyUnusable.printf(tr("'%s' is a symbolic file, not a directory"), m->strExtPackPath.c_str(), vrc);
-- else
-- m->strWhyUnusable.printf(tr("'%s' is not a directory (fMode=%#x)"), m->strExtPackPath.c_str(), m->ObjInfoExtPack.Attr.fMode);
-- return;
-- }
--
-- RTERRINFOSTATIC ErrInfo;
-- RTErrInfoInitStatic(&ErrInfo);
-- vrc = SUPR3HardenedVerifyDir(m->strExtPackPath.c_str(), true /*fRecursive*/, true /*fCheckFiles*/, &ErrInfo.Core);
-- if (RT_FAILURE(vrc))
-- {
-- m->strWhyUnusable.printf(tr("%s (rc=%Rrc)"), ErrInfo.Core.pszMsg, vrc);
-- return;
-- }
--
-- /*
-- * Read the description file.
-- */
-- RTCString strSavedName(m->Desc.strName);
-- RTCString *pStrLoadErr = VBoxExtPackLoadDesc(m->strExtPackPath.c_str(), &m->Desc, &m->ObjInfoDesc);
-- if (pStrLoadErr != NULL)
-- {
-- m->strWhyUnusable.printf(tr("Failed to load '%s/%s': %s"),
-- m->strExtPackPath.c_str(), VBOX_EXTPACK_DESCRIPTION_NAME, pStrLoadErr->c_str());
-- m->Desc.strName = strSavedName;
-- delete pStrLoadErr;
-- return;
-- }
--
-- /*
-- * Make sure the XML name and directory matches.
-- */
-- if (!m->Desc.strName.equalsIgnoreCase(strSavedName))
-- {
-- m->strWhyUnusable.printf(tr("The description name ('%s') and directory name ('%s') does not match"),
-- m->Desc.strName.c_str(), strSavedName.c_str());
-- m->Desc.strName = strSavedName;
-- return;
-- }
--
-- /*
-- * Load the main DLL and call the predefined entry point.
-- */
-- bool fIsNative;
-- if (!findModule(m->Desc.strMainModule.c_str(), NULL /* default extension */, VBOXEXTPACKMODKIND_R3,
-- &m->strMainModPath, &fIsNative, &m->ObjInfoMainMod))
-- {
-- m->strWhyUnusable.printf(tr("Failed to locate the main module ('%s')"), m->Desc.strMainModule.c_str());
-- return;
-- }
--
-- vrc = SUPR3HardenedVerifyPlugIn(m->strMainModPath.c_str(), &ErrInfo.Core);
-- if (RT_FAILURE(vrc))
-- {
-- m->strWhyUnusable.printf(tr("%s"), ErrInfo.Core.pszMsg);
-- return;
-- }
--
-- if (fIsNative)
-- {
-- vrc = SUPR3HardenedLdrLoadPlugIn(m->strMainModPath.c_str(), &m->hMainMod, &ErrInfo.Core);
-- if (RT_FAILURE(vrc))
-- {
-- m->hMainMod = NIL_RTLDRMOD;
-- m->strWhyUnusable.printf(tr("Failed to load the main module ('%s'): %Rrc - %s"),
-- m->strMainModPath.c_str(), vrc, ErrInfo.Core.pszMsg);
-- return;
-- }
-- }
-- else
-- {
-- m->strWhyUnusable.printf(tr("Only native main modules are currently supported"));
-- return;
-- }
--
-- /*
-- * Resolve the predefined entry point.
-- */
-- PFNVBOXEXTPACKREGISTER pfnRegistration;
-- vrc = RTLdrGetSymbol(m->hMainMod, VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, (void **)&pfnRegistration);
-- if (RT_SUCCESS(vrc))
-- {
-- RTErrInfoClear(&ErrInfo.Core);
-- vrc = pfnRegistration(&m->Hlp, &m->pReg, &ErrInfo.Core);
-- if ( RT_SUCCESS(vrc)
-- && !RTErrInfoIsSet(&ErrInfo.Core)
-- && VALID_PTR(m->pReg))
-- {
-- if ( VBOXEXTPACK_IS_MAJOR_VER_EQUAL(m->pReg->u32Version, VBOXEXTPACKREG_VERSION)
-- && m->pReg->u32EndMarker == m->pReg->u32Version)
-- {
-- if ( (!m->pReg->pfnInstalled || RT_VALID_PTR(m->pReg->pfnInstalled))
-- && (!m->pReg->pfnUninstall || RT_VALID_PTR(m->pReg->pfnUninstall))
-- && (!m->pReg->pfnVirtualBoxReady || RT_VALID_PTR(m->pReg->pfnVirtualBoxReady))
-- && (!m->pReg->pfnConsoleReady || RT_VALID_PTR(m->pReg->pfnConsoleReady))
-- && (!m->pReg->pfnUnload || RT_VALID_PTR(m->pReg->pfnUnload))
-- && (!m->pReg->pfnVMCreated || RT_VALID_PTR(m->pReg->pfnVMCreated))
-- && (!m->pReg->pfnVMConfigureVMM || RT_VALID_PTR(m->pReg->pfnVMConfigureVMM))
-- && (!m->pReg->pfnVMPowerOn || RT_VALID_PTR(m->pReg->pfnVMPowerOn))
-- && (!m->pReg->pfnVMPowerOff || RT_VALID_PTR(m->pReg->pfnVMPowerOff))
-- && (!m->pReg->pfnQueryObject || RT_VALID_PTR(m->pReg->pfnQueryObject))
-- )
-- {
-- /*
-- * We're good!
-- */
-- m->fUsable = true;
-- m->strWhyUnusable.setNull();
-- return;
-- }
--
-- m->strWhyUnusable = tr("The registration structure contains on or more invalid function pointers");
-- }
-- else
-- m->strWhyUnusable.printf(tr("Unsupported registration structure version %u.%u"),
-- RT_HIWORD(m->pReg->u32Version), RT_LOWORD(m->pReg->u32Version));
-- }
-- else
-- m->strWhyUnusable.printf(tr("%s returned %Rrc, pReg=%p ErrInfo='%s'"),
-- VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, vrc, m->pReg, ErrInfo.Core.pszMsg);
-- m->pReg = NULL;
-- }
-- else
-- m->strWhyUnusable.printf(tr("Failed to resolve exported symbol '%s' in the main module: %Rrc"),
-- VBOX_EXTPACK_MAIN_MOD_ENTRY_POINT, vrc);
--
-- RTLdrClose(m->hMainMod);
-- m->hMainMod = NIL_RTLDRMOD;
--}
--
--/**
-- * Finds a module.
-- *
-- * @returns true if found, false if not.
-- * @param a_pszName The module base name (no extension).
-- * @param a_pszExt The extension. If NULL we use default
-- * extensions.
-- * @param a_enmKind The kind of module to locate.
-- * @param a_pStrFound Where to return the path to the module we've
-- * found.
-- * @param a_pfNative Where to return whether this is a native module
-- * or an agnostic one. Optional.
-- * @param a_pObjInfo Where to return the file system object info for
-- * the module. Optional.
-- */
--bool ExtPack::findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind,
-- Utf8Str *a_pStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const
--{
-- /*
-- * Try the native path first.
-- */
-- char szPath[RTPATH_MAX];
-- int vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), RTBldCfgTargetDotArch());
-- AssertLogRelRCReturn(vrc, false);
-- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
-- AssertLogRelRCReturn(vrc, false);
-- if (!a_pszExt)
-- {
-- const char *pszDefExt;
-- switch (a_enmKind)
-- {
-- case VBOXEXTPACKMODKIND_RC: pszDefExt = ".rc"; break;
-- case VBOXEXTPACKMODKIND_R0: pszDefExt = ".r0"; break;
-- case VBOXEXTPACKMODKIND_R3: pszDefExt = RTLdrGetSuff(); break;
-- default:
-- AssertFailedReturn(false);
-- }
-- vrc = RTStrCat(szPath, sizeof(szPath), pszDefExt);
-- AssertLogRelRCReturn(vrc, false);
-- }
--
-- RTFSOBJINFO ObjInfo;
-- if (!a_pObjInfo)
-- a_pObjInfo = &ObjInfo;
-- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
-- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
-- {
-- if (a_pfNative)
-- *a_pfNative = true;
-- *a_pStrFound = szPath;
-- return true;
-- }
--
-- /*
-- * Try the platform agnostic modules.
-- */
-- /* gcc.x86/module.rel */
-- char szSubDir[32];
-- RTStrPrintf(szSubDir, sizeof(szSubDir), "%s.%s", RTBldCfgCompiler(), RTBldCfgTargetArch());
-- vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), szSubDir);
-- AssertLogRelRCReturn(vrc, false);
-- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
-- AssertLogRelRCReturn(vrc, false);
-- if (!a_pszExt)
-- {
-- vrc = RTStrCat(szPath, sizeof(szPath), ".rel");
-- AssertLogRelRCReturn(vrc, false);
-- }
-- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
-- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
-- {
-- if (a_pfNative)
-- *a_pfNative = false;
-- *a_pStrFound = szPath;
-- return true;
-- }
--
-- /* x86/module.rel */
-- vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), RTBldCfgTargetArch());
-- AssertLogRelRCReturn(vrc, false);
-- vrc = RTPathAppend(szPath, sizeof(szPath), a_pszName);
-- AssertLogRelRCReturn(vrc, false);
-- if (!a_pszExt)
-- {
-- vrc = RTStrCat(szPath, sizeof(szPath), ".rel");
-- AssertLogRelRCReturn(vrc, false);
-- }
-- vrc = RTPathQueryInfo(szPath, a_pObjInfo, RTFSOBJATTRADD_UNIX);
-- if (RT_SUCCESS(vrc) && RTFS_IS_FILE(a_pObjInfo->Attr.fMode))
-- {
-- if (a_pfNative)
-- *a_pfNative = false;
-- *a_pStrFound = szPath;
-- return true;
-- }
--
-- return false;
--}
--
--/**
-- * Compares two file system object info structures.
-- *
-- * @returns true if equal, false if not.
-- * @param pObjInfo1 The first.
-- * @param pObjInfo2 The second.
-- * @todo IPRT should do this, really.
-- */
--/* static */ bool ExtPack::objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2)
--{
-- if (!RTTimeSpecIsEqual(&pObjInfo1->ModificationTime, &pObjInfo2->ModificationTime))
-- return false;
-- if (!RTTimeSpecIsEqual(&pObjInfo1->ChangeTime, &pObjInfo2->ChangeTime))
-- return false;
-- if (!RTTimeSpecIsEqual(&pObjInfo1->BirthTime, &pObjInfo2->BirthTime))
-- return false;
-- if (pObjInfo1->cbObject != pObjInfo2->cbObject)
-- return false;
-- if (pObjInfo1->Attr.fMode != pObjInfo2->Attr.fMode)
-- return false;
-- if (pObjInfo1->Attr.enmAdditional == pObjInfo2->Attr.enmAdditional)
-- {
-- switch (pObjInfo1->Attr.enmAdditional)
-- {
-- case RTFSOBJATTRADD_UNIX:
-- if (pObjInfo1->Attr.u.Unix.uid != pObjInfo2->Attr.u.Unix.uid)
-- return false;
-- if (pObjInfo1->Attr.u.Unix.gid != pObjInfo2->Attr.u.Unix.gid)
-- return false;
-- if (pObjInfo1->Attr.u.Unix.INodeIdDevice != pObjInfo2->Attr.u.Unix.INodeIdDevice)
-- return false;
-- if (pObjInfo1->Attr.u.Unix.INodeId != pObjInfo2->Attr.u.Unix.INodeId)
-- return false;
-- if (pObjInfo1->Attr.u.Unix.GenerationId != pObjInfo2->Attr.u.Unix.GenerationId)
-- return false;
-- break;
-- default:
-- break;
-- }
-- }
-- return true;
--}
--
--
--/**
-- * @interface_method_impl{VBOXEXTPACKHLP,pfnFindModule}
-- */
--/*static*/ DECLCALLBACK(int)
--ExtPack::hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt, VBOXEXTPACKMODKIND enmKind,
-- char *pszFound, size_t cbFound, bool *pfNative)
--{
-- /*
-- * Validate the input and get our bearings.
-- */
-- AssertPtrReturn(pszName, VERR_INVALID_POINTER);
-- AssertPtrNullReturn(pszExt, VERR_INVALID_POINTER);
-- AssertPtrReturn(pszFound, VERR_INVALID_POINTER);
-- AssertPtrNullReturn(pfNative, VERR_INVALID_POINTER);
-- AssertReturn(enmKind > VBOXEXTPACKMODKIND_INVALID && enmKind < VBOXEXTPACKMODKIND_END, VERR_INVALID_PARAMETER);
--
-- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
-- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
-- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
-- AssertPtrReturn(m, VERR_INVALID_POINTER);
-- ExtPack *pThis = m->pThis;
-- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
--
-- /*
-- * This is just a wrapper around findModule.
-- */
-- Utf8Str strFound;
-- if (pThis->findModule(pszName, pszExt, enmKind, &strFound, pfNative, NULL))
-- return RTStrCopy(pszFound, cbFound, strFound.c_str());
-- return VERR_FILE_NOT_FOUND;
--}
--
--/*static*/ DECLCALLBACK(int)
--ExtPack::hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath)
--{
-- /*
-- * Validate the input and get our bearings.
-- */
-- AssertPtrReturn(pszFilename, VERR_INVALID_POINTER);
-- AssertPtrReturn(pszPath, VERR_INVALID_POINTER);
-- AssertReturn(cbPath > 0, VERR_BUFFER_OVERFLOW);
--
-- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
-- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
-- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
-- AssertPtrReturn(m, VERR_INVALID_POINTER);
-- ExtPack *pThis = m->pThis;
-- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
--
-- /*
-- * This is a simple RTPathJoin, no checking if things exists or anything.
-- */
-- int vrc = RTPathJoin(pszPath, cbPath, pThis->m->strExtPackPath.c_str(), pszFilename);
-- if (RT_FAILURE(vrc))
-- RT_BZERO(pszPath, cbPath);
-- return vrc;
--}
--
--/*static*/ DECLCALLBACK(VBOXEXTPACKCTX)
--ExtPack::hlpGetContext(PCVBOXEXTPACKHLP pHlp)
--{
-- /*
-- * Validate the input and get our bearings.
-- */
-- AssertPtrReturn(pHlp, VBOXEXTPACKCTX_INVALID);
-- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VBOXEXTPACKCTX_INVALID);
-- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
-- AssertPtrReturn(m, VBOXEXTPACKCTX_INVALID);
-- ExtPack *pThis = m->pThis;
-- AssertPtrReturn(pThis, VBOXEXTPACKCTX_INVALID);
--
-- return pThis->m->enmContext;
--}
--
--/*static*/ DECLCALLBACK(int)
--ExtPack::hlpReservedN(PCVBOXEXTPACKHLP pHlp)
--{
-- /*
-- * Validate the input and get our bearings.
-- */
-- AssertPtrReturn(pHlp, VERR_INVALID_POINTER);
-- AssertReturn(pHlp->u32Version == VBOXEXTPACKHLP_VERSION, VERR_INVALID_POINTER);
-- ExtPack::Data *m = RT_FROM_CPP_MEMBER(pHlp, Data, Hlp);
-- AssertPtrReturn(m, VERR_INVALID_POINTER);
-- ExtPack *pThis = m->pThis;
-- AssertPtrReturn(pThis, VERR_INVALID_POINTER);
--
-- return VERR_NOT_IMPLEMENTED;
--}
--
--
--
--
--
--STDMETHODIMP ExtPack::COMGETTER(Name)(BSTR *a_pbstrName)
--{
-- CheckComArgOutPointerValid(a_pbstrName);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr str(m->Desc.strName);
-- str.cloneTo(a_pbstrName);
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPack::COMGETTER(Description)(BSTR *a_pbstrDescription)
--{
-- CheckComArgOutPointerValid(a_pbstrDescription);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr str(m->Desc.strDescription);
-- str.cloneTo(a_pbstrDescription);
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPack::COMGETTER(Version)(BSTR *a_pbstrVersion)
--{
-- CheckComArgOutPointerValid(a_pbstrVersion);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr str(m->Desc.strVersion);
-- str.cloneTo(a_pbstrVersion);
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPack::COMGETTER(Revision)(ULONG *a_puRevision)
--{
-- CheckComArgOutPointerValid(a_puRevision);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- *a_puRevision = m->Desc.uRevision;
-- return hrc;
--}
--
--STDMETHODIMP ExtPack::COMGETTER(Edition)(BSTR *a_pbstrEdition)
--{
-- CheckComArgOutPointerValid(a_pbstrEdition);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr str(m->Desc.strEdition);
-- str.cloneTo(a_pbstrEdition);
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPack::COMGETTER(VRDEModule)(BSTR *a_pbstrVrdeModule)
--{
-- CheckComArgOutPointerValid(a_pbstrVrdeModule);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr str(m->Desc.strVrdeModule);
-- str.cloneTo(a_pbstrVrdeModule);
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPack::COMGETTER(PlugIns)(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns))
--{
-- /** @todo implement plug-ins. */
--#ifdef VBOX_WITH_XPCOM
-- NOREF(a_paPlugIns);
-- NOREF(a_paPlugInsSize);
--#endif
-- ReturnComNotImplemented();
--}
--
--STDMETHODIMP ExtPack::COMGETTER(Usable)(BOOL *a_pfUsable)
--{
-- CheckComArgOutPointerValid(a_pfUsable);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- *a_pfUsable = m->fUsable;
-- return hrc;
--}
--
--STDMETHODIMP ExtPack::COMGETTER(WhyUnusable)(BSTR *a_pbstrWhy)
--{
-- CheckComArgOutPointerValid(a_pbstrWhy);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- m->strWhyUnusable.cloneTo(a_pbstrWhy);
-- return hrc;
--}
--
--STDMETHODIMP ExtPack::COMGETTER(ShowLicense)(BOOL *a_pfShowIt)
--{
-- CheckComArgOutPointerValid(a_pfShowIt);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- *a_pfShowIt = m->Desc.fShowLicense;
-- return hrc;
--}
--
--STDMETHODIMP ExtPack::COMGETTER(License)(BSTR *a_pbstrHtmlLicense)
--{
-- Bstr bstrHtml("html");
-- return QueryLicense(Bstr::Empty.raw(), Bstr::Empty.raw(), bstrHtml.raw(), a_pbstrHtmlLicense);
--}
--
--STDMETHODIMP ExtPack::QueryLicense(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage, IN_BSTR a_bstrFormat,
-- BSTR *a_pbstrLicense)
--{
-- /*
-- * Validate input.
-- */
-- CheckComArgOutPointerValid(a_pbstrLicense);
-- CheckComArgNotNull(a_bstrPreferredLocale);
-- CheckComArgNotNull(a_bstrPreferredLanguage);
-- CheckComArgNotNull(a_bstrFormat);
--
-- Utf8Str strPreferredLocale(a_bstrPreferredLocale);
-- if (strPreferredLocale.length() != 2 && strPreferredLocale.length() != 0)
-- return setError(E_FAIL, tr("The preferred locale is a two character string or empty."));
--
-- Utf8Str strPreferredLanguage(a_bstrPreferredLanguage);
-- if (strPreferredLanguage.length() != 2 && strPreferredLanguage.length() != 0)
-- return setError(E_FAIL, tr("The preferred lanuage is a two character string or empty."));
--
-- Utf8Str strFormat(a_bstrFormat);
-- if ( !strFormat.equals("html")
-- && !strFormat.equals("rtf")
-- && !strFormat.equals("txt"))
-- return setError(E_FAIL, tr("The license format can only have the values 'html', 'rtf' and 'txt'."));
--
-- /*
-- * Combine the options to form a file name before locking down anything.
-- */
-- char szName[sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX "-de_DE.html") + 2];
-- if (strPreferredLocale.isNotEmpty() && strPreferredLanguage.isNotEmpty())
-- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s_%s.%s",
-- strPreferredLocale.c_str(), strPreferredLanguage.c_str(), strFormat.c_str());
-- else if (strPreferredLocale.isNotEmpty())
-- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
-- else if (strPreferredLanguage.isNotEmpty())
-- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-_%s.%s", strPreferredLocale.c_str(), strFormat.c_str());
-- else
-- RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX ".%s", strFormat.c_str());
--
-- /*
-- * Effectuate the query.
-- */
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); /* paranoia */
--
-- if (!m->fUsable)
-- hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str());
-- else
-- {
-- char szPath[RTPATH_MAX];
-- int vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), szName);
-- if (RT_SUCCESS(vrc))
-- {
-- void *pvFile;
-- size_t cbFile;
-- vrc = RTFileReadAllEx(szPath, 0, RTFOFF_MAX, RTFILE_RDALL_O_DENY_READ, &pvFile, &cbFile);
-- if (RT_SUCCESS(vrc))
-- {
-- Bstr bstrLicense((const char *)pvFile, cbFile);
-- if (bstrLicense.isNotEmpty())
-- {
-- bstrLicense.detachTo(a_pbstrLicense);
-- hrc = S_OK;
-- }
-- else
-- hrc = setError(VBOX_E_IPRT_ERROR, tr("The license file '%s' is empty or contains invalid UTF-8 encoding"),
-- szPath);
-- RTFileReadAllFree(pvFile, cbFile);
-- }
-- else if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)
-- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in extension pack '%s'"),
-- szName, m->Desc.strName.c_str());
-- else
-- hrc = setError(VBOX_E_FILE_ERROR, tr("Failed to open the license file '%s': %Rrc"), szPath, vrc);
-- }
-- else
-- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTPathJoin failed: %Rrc"), vrc);
-- }
-- }
-- return hrc;
--}
--
--
--STDMETHODIMP ExtPack::QueryObject(IN_BSTR a_bstrObjectId, IUnknown **a_ppUnknown)
--{
-- com::Guid ObjectId;
-- CheckComArgGuid(a_bstrObjectId, ObjectId);
-- CheckComArgOutPointerValid(a_ppUnknown);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- if ( m->pReg
-- && m->pReg->pfnQueryObject)
-- {
-- void *pvUnknown = m->pReg->pfnQueryObject(m->pReg, ObjectId.raw());
-- if (pvUnknown)
-- *a_ppUnknown = (IUnknown *)pvUnknown;
-- else
-- hrc = E_NOINTERFACE;
-- }
-- else
-- hrc = E_NOINTERFACE;
-- }
-- return hrc;
--}
--
--
--
--
--DEFINE_EMPTY_CTOR_DTOR(ExtPackManager)
--
--/**
-- * Called by ComObjPtr::createObject when creating the object.
-- *
-- * Just initialize the basic object state, do the rest in init().
-- *
-- * @returns S_OK.
-- */
--HRESULT ExtPackManager::FinalConstruct()
--{
-- m = NULL;
-- return S_OK;
--}
--
--/**
-- * Initializes the extension pack manager.
-- *
-- * @returns COM status code.
-- * @param a_pVirtualBox Pointer to the VirtualBox object.
-- * @param a_enmContext The context we're in.
-- */
--HRESULT ExtPackManager::initExtPackManager(VirtualBox *a_pVirtualBox, VBOXEXTPACKCTX a_enmContext)
--{
-- AutoInitSpan autoInitSpan(this);
-- AssertReturn(autoInitSpan.isOk(), E_FAIL);
--
-- /*
-- * Figure some stuff out before creating the instance data.
-- */
-- char szBaseDir[RTPATH_MAX];
-- int rc = RTPathAppPrivateArchTop(szBaseDir, sizeof(szBaseDir));
-- AssertLogRelRCReturn(rc, E_FAIL);
-- rc = RTPathAppend(szBaseDir, sizeof(szBaseDir), VBOX_EXTPACK_INSTALL_DIR);
-- AssertLogRelRCReturn(rc, E_FAIL);
--
-- char szCertificatDir[RTPATH_MAX];
-- rc = RTPathAppPrivateNoArch(szCertificatDir, sizeof(szCertificatDir));
-- AssertLogRelRCReturn(rc, E_FAIL);
-- rc = RTPathAppend(szCertificatDir, sizeof(szCertificatDir), VBOX_EXTPACK_CERT_DIR);
-- AssertLogRelRCReturn(rc, E_FAIL);
--
-- /*
-- * Allocate and initialize the instance data.
-- */
-- m = new Data;
-- m->strBaseDir = szBaseDir;
-- m->strCertificatDirPath = szCertificatDir;
-- m->pVirtualBox = a_pVirtualBox;
-- m->enmContext = a_enmContext;
--
-- /*
-- * Slurp in VBoxVMM which is used by VBoxPuelMain.
-- */
--#if !defined(RT_OS_WINDOWS) && !defined(RT_OS_DARWIN)
-- if (a_enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
-- {
-- int vrc = SUPR3HardenedLdrLoadAppPriv("VBoxVMM", &m->hVBoxVMM, RTLDRLOAD_FLAGS_GLOBAL, NULL);
-- if (RT_FAILURE(vrc))
-- m->hVBoxVMM = NIL_RTLDRMOD;
-- /* cleanup in ::uninit()? */
-- }
--#endif
--
-- /*
-- * Go looking for extensions. The RTDirOpen may fail if nothing has been
-- * installed yet, or if root is paranoid and has revoked our access to them.
-- *
-- * We ASSUME that there are no files, directories or stuff in the directory
-- * that exceed the max name length in RTDIRENTRYEX.
-- */
-- HRESULT hrc = S_OK;
-- PRTDIR pDir;
-- int vrc = RTDirOpen(&pDir, szBaseDir);
-- if (RT_SUCCESS(vrc))
-- {
-- for (;;)
-- {
-- RTDIRENTRYEX Entry;
-- vrc = RTDirReadEx(pDir, &Entry, NULL /*pcbDirEntry*/, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
-- if (RT_FAILURE(vrc))
-- {
-- AssertLogRelMsg(vrc == VERR_NO_MORE_FILES, ("%Rrc\n", vrc));
-- break;
-- }
-- if ( RTFS_IS_DIRECTORY(Entry.Info.Attr.fMode)
-- && strcmp(Entry.szName, ".") != 0
-- && strcmp(Entry.szName, "..") != 0
-- && VBoxExtPackIsValidMangledName(Entry.szName) )
-- {
-- /*
-- * All directories are extensions, the shall be nothing but
-- * extensions in this subdirectory.
-- */
-- char szExtPackDir[RTPATH_MAX];
-- vrc = RTPathJoin(szExtPackDir, sizeof(szExtPackDir), m->strBaseDir.c_str(), Entry.szName);
-- AssertLogRelRC(vrc);
-- if (RT_SUCCESS(vrc))
-- {
-- RTCString *pstrName = VBoxExtPackUnmangleName(Entry.szName, RTSTR_MAX);
-- AssertLogRel(pstrName);
-- if (pstrName)
-- {
-- ComObjPtr<ExtPack> NewExtPack;
-- HRESULT hrc2 = NewExtPack.createObject();
-- if (SUCCEEDED(hrc2))
-- hrc2 = NewExtPack->initWithDir(a_enmContext, pstrName->c_str(), szExtPackDir);
-- delete pstrName;
-- if (SUCCEEDED(hrc2))
-- m->llInstalledExtPacks.push_back(NewExtPack);
-- else if (SUCCEEDED(rc))
-- hrc = hrc2;
-- }
-- else
-- hrc = E_UNEXPECTED;
-- }
-- else
-- hrc = E_UNEXPECTED;
-- }
-- }
-- RTDirClose(pDir);
-- }
-- /* else: ignore, the directory probably does not exist or something. */
--
-- if (SUCCEEDED(hrc))
-- autoInitSpan.setSucceeded();
-- return hrc;
--}
--
--/**
-- * COM cruft.
-- */
--void ExtPackManager::FinalRelease()
--{
-- uninit();
--}
--
--/**
-- * Do the actual cleanup.
-- */
--void ExtPackManager::uninit()
--{
-- /* Enclose the state transition Ready->InUninit->NotReady */
-- AutoUninitSpan autoUninitSpan(this);
-- if (!autoUninitSpan.uninitDone() && m != NULL)
-- {
-- delete m;
-- m = NULL;
-- }
--}
--
--
--STDMETHODIMP ExtPackManager::COMGETTER(InstalledExtPacks)(ComSafeArrayOut(IExtPack *, a_paExtPacks))
--{
-- CheckComArgOutSafeArrayPointerValid(a_paExtPacks);
-- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
--
-- SafeIfaceArray<IExtPack> SaExtPacks(m->llInstalledExtPacks);
-- SaExtPacks.detachTo(ComSafeArrayOutArg(a_paExtPacks));
-- }
--
-- return hrc;
--}
--
--STDMETHODIMP ExtPackManager::Find(IN_BSTR a_bstrName, IExtPack **a_pExtPack)
--{
-- CheckComArgNotNull(a_bstrName);
-- CheckComArgOutPointerValid(a_pExtPack);
-- Utf8Str strName(a_bstrName);
-- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
--
-- ComPtr<ExtPack> ptrExtPack = findExtPack(strName.c_str());
-- if (!ptrExtPack.isNull())
-- ptrExtPack.queryInterfaceTo(a_pExtPack);
-- else
-- hrc = VBOX_E_OBJECT_NOT_FOUND;
-- }
--
-- return hrc;
--}
--
--STDMETHODIMP ExtPackManager::OpenExtPackFile(IN_BSTR a_bstrTarballAndDigest, IExtPackFile **a_ppExtPackFile)
--{
-- CheckComArgNotNull(a_bstrTarballAndDigest);
-- CheckComArgOutPointerValid(a_ppExtPackFile);
-- AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED);
--
-- /* The API can optionally take a ::SHA-256=<hex-digest> attribute at the
-- end of the file name. This is just a temporary measure for
-- backporting, in 4.2 we'll add another parameter to the method. */
-- Utf8Str strTarball;
-- Utf8Str strDigest;
-- Utf8Str strTarballAndDigest(a_bstrTarballAndDigest);
-- size_t offSha256 = strTarballAndDigest.find("::SHA-256=");
-- if (offSha256 == Utf8Str::npos)
-- strTarball = strTarballAndDigest;
-- else
-- {
-- strTarball = strTarballAndDigest.substr(0, offSha256);
-- strDigest = strTarballAndDigest.substr(offSha256 + sizeof("::SHA-256=") - 1);
-- }
--
-- ComObjPtr<ExtPackFile> NewExtPackFile;
-- HRESULT hrc = NewExtPackFile.createObject();
-- if (SUCCEEDED(hrc))
-- hrc = NewExtPackFile->initWithFile(strTarball.c_str(), strDigest.c_str(), this, m->pVirtualBox);
-- if (SUCCEEDED(hrc))
-- NewExtPackFile.queryInterfaceTo(a_ppExtPackFile);
--
-- return hrc;
--}
--
--STDMETHODIMP ExtPackManager::Uninstall(IN_BSTR a_bstrName, BOOL a_fForcedRemoval, IN_BSTR a_bstrDisplayInfo,
-- IProgress **a_ppProgress)
--{
-- CheckComArgNotNull(a_bstrName);
-- if (a_ppProgress)
-- *a_ppProgress = NULL;
-- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- PEXTPACKUNINSTALLJOB pJob = NULL;
-- try
-- {
-- pJob = new EXTPACKUNINSTALLJOB;
-- pJob->ptrExtPackMgr = this;
-- pJob->strName = a_bstrName;
-- pJob->fForcedRemoval = a_fForcedRemoval != FALSE;
-- pJob->strDisplayInfo = a_bstrDisplayInfo;
-- hrc = pJob->ptrProgress.createObject();
-- if (SUCCEEDED(hrc))
-- {
-- Bstr bstrDescription = tr("Uninstalling extension pack");
-- hrc = pJob->ptrProgress->init(
--#ifndef VBOX_COM_INPROC
-- m->pVirtualBox,
--#endif
-- static_cast<IExtPackManager *>(this),
-- bstrDescription.raw(),
-- FALSE /*aCancelable*/,
-- NULL /*aId*/);
-- }
-- if (SUCCEEDED(hrc))
-- {
-- ComPtr<Progress> ptrProgress = pJob->ptrProgress;
-- int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::doUninstallThreadProc, pJob, 0,
-- RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackUninst");
-- if (RT_SUCCESS(vrc))
-- {
-- pJob = NULL; /* the thread deletes it */
-- ptrProgress.queryInterfaceTo(a_ppProgress);
-- }
-- else
-- hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc);
-- }
-- }
-- catch (std::bad_alloc)
-- {
-- hrc = E_OUTOFMEMORY;
-- }
-- if (pJob)
-- delete pJob;
-- }
--
-- return hrc;
--}
--
--STDMETHODIMP ExtPackManager::Cleanup(void)
--{
-- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- /*
-- * Run the set-uid-to-root binary that performs the cleanup.
-- *
-- * Take the write lock to prevent conflicts with other calls to this
-- * VBoxSVC instance.
-- */
-- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
-- hrc = runSetUidToRootHelper(NULL,
-- "cleanup",
-- "--base-dir", m->strBaseDir.c_str(),
-- (const char *)NULL);
-- }
--
-- return hrc;
--}
--
--STDMETHODIMP ExtPackManager::QueryAllPlugInsForFrontend(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules))
--{
-- CheckComArgNotNull(a_bstrFrontend);
-- Utf8Str strName(a_bstrFrontend);
-- CheckComArgOutSafeArrayPointerValid(a_pabstrPlugInModules);
-- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- com::SafeArray<BSTR> saPaths((size_t)0);
-- /** @todo implement plug-ins */
-- saPaths.detachTo(ComSafeArrayOutArg(a_pabstrPlugInModules));
-- }
-- return hrc;
--}
--
--STDMETHODIMP ExtPackManager::IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable)
--{
-- CheckComArgNotNull(a_bstrExtPack);
-- Utf8Str strExtPack(a_bstrExtPack);
-- *aUsable = isExtPackUsable(strExtPack.c_str());
-- return S_OK;
--}
--
--/**
-- * Finds the success indicator string in the stderr output ofr hte helper app.
-- *
-- * @returns Pointer to the indicator.
-- * @param psz The stderr output string. Can be NULL.
-- * @param cch The size of the string.
-- */
--static char *findSuccessIndicator(char *psz, size_t cch)
--{
-- static const char s_szSuccessInd[] = "rcExit=RTEXITCODE_SUCCESS";
-- Assert(!cch || strlen(psz) == cch);
-- if (cch < sizeof(s_szSuccessInd) - 1)
-- return NULL;
-- char *pszInd = &psz[cch - sizeof(s_szSuccessInd) + 1];
-- if (strcmp(s_szSuccessInd, pszInd))
-- return NULL;
-- return pszInd;
--}
--
--/**
-- * Runs the helper application that does the privileged operations.
-- *
-- * @returns S_OK or a failure status with error information set.
-- * @param a_pstrDisplayInfo Platform specific display info hacks.
-- * @param a_pszCommand The command to execute.
-- * @param ... The argument strings that goes along with the
-- * command. Maximum is about 16. Terminated by a
-- * NULL.
-- */
--HRESULT ExtPackManager::runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...)
--{
-- /*
-- * Calculate the path to the helper application.
-- */
-- char szExecName[RTPATH_MAX];
-- int vrc = RTPathAppPrivateArch(szExecName, sizeof(szExecName));
-- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
--
-- vrc = RTPathAppend(szExecName, sizeof(szExecName), VBOX_EXTPACK_HELPER_NAME);
-- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
--
-- /*
-- * Convert the variable argument list to a RTProcCreate argument vector.
-- */
-- const char *apszArgs[20];
-- unsigned cArgs = 0;
--
-- LogRel(("ExtPack: Executing '%s'", szExecName));
-- apszArgs[cArgs++] = &szExecName[0];
--
-- if ( a_pstrDisplayInfo
-- && a_pstrDisplayInfo->isNotEmpty())
-- {
-- LogRel((" '--display-info-hack' '%s'", a_pstrDisplayInfo->c_str()));
-- apszArgs[cArgs++] = "--display-info-hack";
-- apszArgs[cArgs++] = a_pstrDisplayInfo->c_str();
-- }
--
-- LogRel(("'%s'", a_pszCommand));
-- apszArgs[cArgs++] = a_pszCommand;
--
-- va_list va;
-- va_start(va, a_pszCommand);
-- const char *pszLastArg;
-- for (;;)
-- {
-- AssertReturn(cArgs < RT_ELEMENTS(apszArgs) - 1, E_UNEXPECTED);
-- pszLastArg = va_arg(va, const char *);
-- if (!pszLastArg)
-- break;
-- LogRel((" '%s'", pszLastArg));
-- apszArgs[cArgs++] = pszLastArg;
-- };
-- va_end(va);
--
-- LogRel(("\n"));
-- apszArgs[cArgs] = NULL;
--
-- /*
-- * Create a PIPE which we attach to stderr so that we can read the error
-- * message on failure and report it back to the caller.
-- */
-- RTPIPE hPipeR;
-- RTHANDLE hStdErrPipe;
-- hStdErrPipe.enmType = RTHANDLETYPE_PIPE;
-- vrc = RTPipeCreate(&hPipeR, &hStdErrPipe.u.hPipe, RTPIPE_C_INHERIT_WRITE);
-- AssertLogRelRCReturn(vrc, E_UNEXPECTED);
--
-- /*
-- * Spawn the process.
-- */
-- HRESULT hrc;
-- RTPROCESS hProcess;
-- vrc = RTProcCreateEx(szExecName,
-- apszArgs,
-- RTENV_DEFAULT,
-- 0 /*fFlags*/,
-- NULL /*phStdIn*/,
-- NULL /*phStdOut*/,
-- &hStdErrPipe,
-- NULL /*pszAsUser*/,
-- NULL /*pszPassword*/,
-- &hProcess);
-- if (RT_SUCCESS(vrc))
-- {
-- vrc = RTPipeClose(hStdErrPipe.u.hPipe);
-- hStdErrPipe.u.hPipe = NIL_RTPIPE;
--
-- /*
-- * Read the pipe output until the process completes.
-- */
-- RTPROCSTATUS ProcStatus = { -42, RTPROCEXITREASON_ABEND };
-- size_t cbStdErrBuf = 0;
-- size_t offStdErrBuf = 0;
-- char *pszStdErrBuf = NULL;
-- do
-- {
-- /*
-- * Service the pipe. Block waiting for output or the pipe breaking
-- * when the process terminates.
-- */
-- if (hPipeR != NIL_RTPIPE)
-- {
-- char achBuf[1024];
-- size_t cbRead;
-- vrc = RTPipeReadBlocking(hPipeR, achBuf, sizeof(achBuf), &cbRead);
-- if (RT_SUCCESS(vrc))
-- {
-- /* grow the buffer? */
-- size_t cbBufReq = offStdErrBuf + cbRead + 1;
-- if ( cbBufReq > cbStdErrBuf
-- && cbBufReq < _256K)
-- {
-- size_t cbNew = RT_ALIGN_Z(cbBufReq, 16); // 1024
-- void *pvNew = RTMemRealloc(pszStdErrBuf, cbNew);
-- if (pvNew)
-- {
-- pszStdErrBuf = (char *)pvNew;
-- cbStdErrBuf = cbNew;
-- }
-- }
--
-- /* append if we've got room. */
-- if (cbBufReq <= cbStdErrBuf)
-- {
-- memcpy(&pszStdErrBuf[offStdErrBuf], achBuf, cbRead);
-- offStdErrBuf = offStdErrBuf + cbRead;
-- pszStdErrBuf[offStdErrBuf] = '\0';
-- }
-- }
-- else
-- {
-- AssertLogRelMsg(vrc == VERR_BROKEN_PIPE, ("%Rrc\n", vrc));
-- RTPipeClose(hPipeR);
-- hPipeR = NIL_RTPIPE;
-- }
-- }
--
-- /*
-- * Service the process. Block if we have no pipe.
-- */
-- if (hProcess != NIL_RTPROCESS)
-- {
-- vrc = RTProcWait(hProcess,
-- hPipeR == NIL_RTPIPE ? RTPROCWAIT_FLAGS_BLOCK : RTPROCWAIT_FLAGS_NOBLOCK,
-- &ProcStatus);
-- if (RT_SUCCESS(vrc))
-- hProcess = NIL_RTPROCESS;
-- else
-- AssertLogRelMsgStmt(vrc == VERR_PROCESS_RUNNING, ("%Rrc\n", vrc), hProcess = NIL_RTPROCESS);
-- }
-- } while ( hPipeR != NIL_RTPIPE
-- || hProcess != NIL_RTPROCESS);
--
-- LogRel(("ExtPack: enmReason=%d iStatus=%d stderr='%s'\n",
-- ProcStatus.enmReason, ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : ""));
--
-- /*
-- * Look for rcExit=RTEXITCODE_SUCCESS at the end of the error output,
-- * cut it as it is only there to attest the success.
-- */
-- if (offStdErrBuf > 0)
-- {
-- RTStrStripR(pszStdErrBuf);
-- offStdErrBuf = strlen(pszStdErrBuf);
-- }
--
-- char *pszSuccessInd = findSuccessIndicator(pszStdErrBuf, offStdErrBuf);
-- if (pszSuccessInd)
-- {
-- *pszSuccessInd = '\0';
-- offStdErrBuf = pszSuccessInd - pszStdErrBuf;
-- }
-- else if ( ProcStatus.enmReason == RTPROCEXITREASON_NORMAL
-- && ProcStatus.iStatus == 0)
-- ProcStatus.iStatus = offStdErrBuf ? 667 : 666;
--
-- /*
-- * Compose the status code and, on failure, error message.
-- */
-- if ( ProcStatus.enmReason == RTPROCEXITREASON_NORMAL
-- && ProcStatus.iStatus == 0)
-- hrc = S_OK;
-- else if (ProcStatus.enmReason == RTPROCEXITREASON_NORMAL)
-- {
-- AssertMsg(ProcStatus.iStatus != 0, ("%s\n", pszStdErrBuf));
-- hrc = setError(E_FAIL, tr("The installer failed with exit code %d: %s"),
-- ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
-- }
-- else if (ProcStatus.enmReason == RTPROCEXITREASON_SIGNAL)
-- hrc = setError(E_UNEXPECTED, tr("The installer was killed by signal #d (stderr: %s)"),
-- ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
-- else if (ProcStatus.enmReason == RTPROCEXITREASON_ABEND)
-- hrc = setError(E_UNEXPECTED, tr("The installer aborted abnormally (stderr: %s)"),
-- offStdErrBuf ? pszStdErrBuf : "");
-- else
-- hrc = setError(E_UNEXPECTED, tr("internal error: enmReason=%d iStatus=%d stderr='%s'"),
-- ProcStatus.enmReason, ProcStatus.iStatus, offStdErrBuf ? pszStdErrBuf : "");
--
-- RTMemFree(pszStdErrBuf);
-- }
-- else
-- hrc = setError(VBOX_E_IPRT_ERROR, tr("Failed to launch the helper application '%s' (%Rrc)"), szExecName, vrc);
--
-- RTPipeClose(hPipeR);
-- RTPipeClose(hStdErrPipe.u.hPipe);
--
-- return hrc;
--}
--
--/**
-- * Finds an installed extension pack.
-- *
-- * @returns Pointer to the extension pack if found, NULL if not. (No reference
-- * counting problem here since the caller must be holding the lock.)
-- * @param a_pszName The name of the extension pack.
-- */
--ExtPack *ExtPackManager::findExtPack(const char *a_pszName)
--{
-- size_t cchName = strlen(a_pszName);
--
-- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
-- it != m->llInstalledExtPacks.end();
-- it++)
-- {
-- ExtPack::Data *pExtPackData = (*it)->m;
-- if ( pExtPackData
-- && pExtPackData->Desc.strName.length() == cchName
-- && pExtPackData->Desc.strName.equalsIgnoreCase(a_pszName))
-- return (*it);
-- }
-- return NULL;
--}
--
--/**
-- * Removes an installed extension pack from the internal list.
-- *
-- * The package is expected to exist!
-- *
-- * @param a_pszName The name of the extension pack.
-- */
--void ExtPackManager::removeExtPack(const char *a_pszName)
--{
-- size_t cchName = strlen(a_pszName);
--
-- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
-- it != m->llInstalledExtPacks.end();
-- it++)
-- {
-- ExtPack::Data *pExtPackData = (*it)->m;
-- if ( pExtPackData
-- && pExtPackData->Desc.strName.length() == cchName
-- && pExtPackData->Desc.strName.equalsIgnoreCase(a_pszName))
-- {
-- m->llInstalledExtPacks.erase(it);
-- return;
-- }
-- }
-- AssertMsgFailed(("%s\n", a_pszName));
--}
--
--/**
-- * Refreshes the specified extension pack.
-- *
-- * This may remove the extension pack from the list, so any non-smart pointers
-- * to the extension pack object may become invalid.
-- *
-- * @returns S_OK and *a_ppExtPack on success, COM status code and error
-- * message on failure. Note that *a_ppExtPack can be NULL.
-- *
-- * @param a_pszName The extension to update..
-- * @param a_fUnusableIsError If @c true, report an unusable extension pack
-- * as an error.
-- * @param a_ppExtPack Where to store the pointer to the extension
-- * pack of it is still around after the refresh.
-- * This is optional.
-- *
-- * @remarks Caller holds the extension manager lock.
-- * @remarks Only called in VBoxSVC.
-- */
--HRESULT ExtPackManager::refreshExtPack(const char *a_pszName, bool a_fUnusableIsError, ExtPack **a_ppExtPack)
--{
-- Assert(m->pVirtualBox != NULL); /* Only called from VBoxSVC. */
--
-- HRESULT hrc;
-- ExtPack *pExtPack = findExtPack(a_pszName);
-- if (pExtPack)
-- {
-- /*
-- * Refresh existing object.
-- */
-- bool fCanDelete;
-- hrc = pExtPack->refresh(&fCanDelete);
-- if (SUCCEEDED(hrc))
-- {
-- if (fCanDelete)
-- {
-- removeExtPack(a_pszName);
-- pExtPack = NULL;
-- }
-- }
-- }
-- else
-- {
-- /*
-- * Do this check here, otherwise VBoxExtPackCalcDir() will fail with a strange
-- * error.
-- */
-- bool fValid = VBoxExtPackIsValidName(a_pszName);
-- if (!fValid)
-- return setError(E_FAIL, "Invalid extension pack name specified");
--
-- /*
-- * Does the dir exist? Make some special effort to deal with case
-- * sensitivie file systems (a_pszName is case insensitive and mangled).
-- */
-- char szDir[RTPATH_MAX];
-- int vrc = VBoxExtPackCalcDir(szDir, sizeof(szDir), m->strBaseDir.c_str(), a_pszName);
-- AssertLogRelRCReturn(vrc, E_FAIL);
--
-- RTDIRENTRYEX Entry;
-- RTFSOBJINFO ObjInfo;
-- vrc = RTPathQueryInfoEx(szDir, &ObjInfo, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
-- bool fExists = RT_SUCCESS(vrc) && RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode);
-- if (!fExists)
-- {
-- PRTDIR pDir;
-- vrc = RTDirOpen(&pDir, m->strBaseDir.c_str());
-- if (RT_SUCCESS(vrc))
-- {
-- const char *pszMangledName = RTPathFilename(szDir);
-- for (;;)
-- {
-- vrc = RTDirReadEx(pDir, &Entry, NULL /*pcbDirEntry*/, RTFSOBJATTRADD_NOTHING, RTPATH_F_ON_LINK);
-- if (RT_FAILURE(vrc))
-- {
-- AssertLogRelMsg(vrc == VERR_NO_MORE_FILES, ("%Rrc\n", vrc));
-- break;
-- }
-- if ( RTFS_IS_DIRECTORY(Entry.Info.Attr.fMode)
-- && !RTStrICmp(Entry.szName, pszMangledName))
-- {
-- /*
-- * The installed extension pack has a uses different case.
-- * Update the name and directory variables.
-- */
-- vrc = RTPathJoin(szDir, sizeof(szDir), m->strBaseDir.c_str(), Entry.szName); /* not really necessary */
-- AssertLogRelRCReturnStmt(vrc, RTDirClose(pDir), E_UNEXPECTED);
-- a_pszName = Entry.szName;
-- fExists = true;
-- break;
-- }
-- }
-- RTDirClose(pDir);
-- }
-- }
-- if (fExists)
-- {
-- /*
-- * We've got something, create a new extension pack object for it.
-- */
-- ComObjPtr<ExtPack> ptrNewExtPack;
-- hrc = ptrNewExtPack.createObject();
-- if (SUCCEEDED(hrc))
-- hrc = ptrNewExtPack->initWithDir(m->enmContext, a_pszName, szDir);
-- if (SUCCEEDED(hrc))
-- {
-- m->llInstalledExtPacks.push_back(ptrNewExtPack);
-- if (ptrNewExtPack->m->fUsable)
-- LogRel(("ExtPackManager: Found extension pack '%s'.\n", a_pszName));
-- else
-- LogRel(("ExtPackManager: Found bad extension pack '%s': %s\n",
-- a_pszName, ptrNewExtPack->m->strWhyUnusable.c_str() ));
-- pExtPack = ptrNewExtPack;
-- }
-- }
-- else
-- hrc = S_OK;
-- }
--
-- /*
-- * Report error if not usable, if that is desired.
-- */
-- if ( SUCCEEDED(hrc)
-- && pExtPack
-- && a_fUnusableIsError
-- && !pExtPack->m->fUsable)
-- hrc = setError(E_FAIL, "%s", pExtPack->m->strWhyUnusable.c_str());
--
-- if (a_ppExtPack)
-- *a_ppExtPack = pExtPack;
-- return hrc;
--}
--
--/**
-- * Thread wrapper around doInstall.
-- *
-- * @returns VINF_SUCCESS (ignored)
-- * @param hThread The thread handle (ignored).
-- * @param pvJob The job structure.
-- */
--/*static*/ DECLCALLBACK(int) ExtPackManager::doInstallThreadProc(RTTHREAD hThread, void *pvJob)
--{
-- PEXTPACKINSTALLJOB pJob = (PEXTPACKINSTALLJOB)pvJob;
-- HRESULT hrc = pJob->ptrExtPackMgr->doInstall(pJob->ptrExtPackFile, pJob->fReplace, &pJob->strDisplayInfo);
-- pJob->ptrProgress->notifyComplete(hrc);
-- delete pJob;
--
-- NOREF(hThread);
-- return VINF_SUCCESS;
--}
--
--/**
-- * Worker for IExtPackFile::Install.
-- *
-- * Called on a worker thread via doInstallThreadProc.
-- *
-- * @returns COM status code.
-- * @param a_pExtPackFile The extension pack file, caller checks that
-- * it's usable.
-- * @param a_fReplace Whether to replace any existing extpack or just
-- * fail.
-- * @param a_pstrDisplayInfo Host specific display information hacks.
-- * @param a_ppProgress Where to return a progress object some day. Can
-- * be NULL.
-- */
--HRESULT ExtPackManager::doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo)
--{
-- AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED);
-- RTCString const * const pStrName = &a_pExtPackFile->m->Desc.strName;
-- RTCString const * const pStrTarball = &a_pExtPackFile->m->strExtPackFile;
-- RTCString const * const pStrTarballDigest = &a_pExtPackFile->m->strDigest;
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
--
-- /*
-- * Refresh the data we have on the extension pack as it
-- * may be made stale by direct meddling or some other user.
-- */
-- ExtPack *pExtPack;
-- hrc = refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
-- if (SUCCEEDED(hrc))
-- {
-- if (pExtPack && a_fReplace)
-- hrc = pExtPack->callUninstallHookAndClose(m->pVirtualBox, false /*a_ForcedRemoval*/);
-- else if (pExtPack)
-- hrc = setError(E_FAIL,
-- tr("Extension pack '%s' is already installed."
-- " In case of a reinstallation, please uninstall it first"),
-- pStrName->c_str());
-- }
-- if (SUCCEEDED(hrc))
-- {
-- /*
-- * Run the privileged helper binary that performs the actual
-- * installation. Then create an object for the packet (we do this
-- * even on failure, to be on the safe side).
-- */
-- hrc = runSetUidToRootHelper(a_pstrDisplayInfo,
-- "install",
-- "--base-dir", m->strBaseDir.c_str(),
-- "--cert-dir", m->strCertificatDirPath.c_str(),
-- "--name", pStrName->c_str(),
-- "--tarball", pStrTarball->c_str(),
-- "--sha-256", pStrTarballDigest->c_str(),
-- pExtPack ? "--replace" : (const char *)NULL,
-- (const char *)NULL);
-- if (SUCCEEDED(hrc))
-- {
-- hrc = refreshExtPack(pStrName->c_str(), true /*a_fUnusableIsError*/, &pExtPack);
-- if (SUCCEEDED(hrc) && pExtPack)
-- {
-- RTERRINFOSTATIC ErrInfo;
-- RTErrInfoInitStatic(&ErrInfo);
-- pExtPack->callInstalledHook(m->pVirtualBox, &autoLock, &ErrInfo.Core);
-- if (RT_SUCCESS(ErrInfo.Core.rc))
-- LogRel(("ExtPackManager: Successfully installed extension pack '%s'.\n", pStrName->c_str()));
-- else
-- {
-- LogRel(("ExtPackManager: Installated hook for '%s' failed: %Rrc - %s\n",
-- pStrName->c_str(), ErrInfo.Core.rc, ErrInfo.Core.pszMsg));
--
-- /*
-- * Uninstall the extpack if the error indicates that.
-- */
-- if (ErrInfo.Core.rc == VERR_EXTPACK_UNSUPPORTED_HOST_UNINSTALL)
-- runSetUidToRootHelper(a_pstrDisplayInfo,
-- "uninstall",
-- "--base-dir", m->strBaseDir.c_str(),
-- "--name", pStrName->c_str(),
-- "--forced",
-- (const char *)NULL);
-- hrc = setError(E_FAIL, tr("The installation hook failed: %Rrc - %s"),
-- ErrInfo.Core.rc, ErrInfo.Core.pszMsg);
-- }
-- }
-- else if (SUCCEEDED(hrc))
-- hrc = setError(E_FAIL, tr("Installing extension pack '%s' failed under mysterious circumstances"),
-- pStrName->c_str());
-- }
-- else
-- {
-- ErrorInfoKeeper Eik;
-- refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, NULL);
-- }
-- }
--
-- /*
-- * Do VirtualBoxReady callbacks now for any freshly installed
-- * extension pack (old ones will not be called).
-- */
-- if (m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
-- {
-- autoLock.release();
-- callAllVirtualBoxReadyHooks();
-- }
-- }
--
-- return hrc;
--}
--
--/**
-- * Thread wrapper around doUninstall.
-- *
-- * @returns VINF_SUCCESS (ignored)
-- * @param hThread The thread handle (ignored).
-- * @param pvJob The job structure.
-- */
--/*static*/ DECLCALLBACK(int) ExtPackManager::doUninstallThreadProc(RTTHREAD hThread, void *pvJob)
--{
-- PEXTPACKUNINSTALLJOB pJob = (PEXTPACKUNINSTALLJOB)pvJob;
-- HRESULT hrc = pJob->ptrExtPackMgr->doUninstall(&pJob->strName, pJob->fForcedRemoval, &pJob->strDisplayInfo);
-- pJob->ptrProgress->notifyComplete(hrc);
-- delete pJob;
--
-- NOREF(hThread);
-- return VINF_SUCCESS;
--}
--
--/**
-- * Worker for IExtPackManager::Uninstall.
-- *
-- * Called on a worker thread via doUninstallThreadProc.
-- *
-- * @returns COM status code.
-- * @param a_pstrName The name of the extension pack to uninstall.
-- * @param a_fForcedRemoval Whether to be skip and ignore certain bits of
-- * the extpack feedback. To deal with misbehaving
-- * extension pack hooks.
-- * @param a_pstrDisplayInfo Host specific display information hacks.
-- */
--HRESULT ExtPackManager::doUninstall(Utf8Str const *a_pstrName, bool a_fForcedRemoval, Utf8Str const *a_pstrDisplayInfo)
--{
-- Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON);
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
--
-- /*
-- * Refresh the data we have on the extension pack as it may be made
-- * stale by direct meddling or some other user.
-- */
-- ExtPack *pExtPack;
-- hrc = refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
-- if (SUCCEEDED(hrc))
-- {
-- if (!pExtPack)
-- {
-- LogRel(("ExtPackManager: Extension pack '%s' is not installed, so nothing to uninstall.\n", a_pstrName->c_str()));
-- hrc = S_OK; /* nothing to uninstall */
-- }
-- else
-- {
-- /*
-- * Call the uninstall hook and unload the main dll.
-- */
-- hrc = pExtPack->callUninstallHookAndClose(m->pVirtualBox, a_fForcedRemoval);
-- if (SUCCEEDED(hrc))
-- {
-- /*
-- * Run the set-uid-to-root binary that performs the
-- * uninstallation. Then refresh the object.
-- *
-- * This refresh is theorically subject to races, but it's of
-- * the don't-do-that variety.
-- */
-- const char *pszForcedOpt = a_fForcedRemoval ? "--forced" : NULL;
-- hrc = runSetUidToRootHelper(a_pstrDisplayInfo,
-- "uninstall",
-- "--base-dir", m->strBaseDir.c_str(),
-- "--name", a_pstrName->c_str(),
-- pszForcedOpt, /* Last as it may be NULL. */
-- (const char *)NULL);
-- if (SUCCEEDED(hrc))
-- {
-- hrc = refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);
-- if (SUCCEEDED(hrc))
-- {
-- if (!pExtPack)
-- LogRel(("ExtPackManager: Successfully uninstalled extension pack '%s'.\n", a_pstrName->c_str()));
-- else
-- hrc = setError(E_FAIL,
-- tr("Uninstall extension pack '%s' failed under mysterious circumstances"),
-- a_pstrName->c_str());
-- }
-- }
-- else
-- {
-- ErrorInfoKeeper Eik;
-- refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, NULL);
-- }
-- }
-- }
-- }
--
-- /*
-- * Do VirtualBoxReady callbacks now for any freshly installed
-- * extension pack (old ones will not be called).
-- */
-- if (m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON)
-- {
-- autoLock.release();
-- callAllVirtualBoxReadyHooks();
-- }
-- }
--
-- return hrc;
--}
--
--
--/**
-- * Calls the pfnVirtualBoxReady hook for all working extension packs.
-- *
-- * @remarks The caller must not hold any locks.
-- */
--void ExtPackManager::callAllVirtualBoxReadyHooks(void)
--{
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (FAILED(hrc))
-- return;
-- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
-- ComPtr<ExtPackManager> ptrSelfRef = this;
--
-- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
-- it != m->llInstalledExtPacks.end();
-- /* advancing below */)
-- {
-- if ((*it)->callVirtualBoxReadyHook(m->pVirtualBox, &autoLock))
-- it = m->llInstalledExtPacks.begin();
-- else
-- it++;
-- }
--}
--
--/**
-- * Calls the pfnConsoleReady hook for all working extension packs.
-- *
-- * @param a_pConsole The console interface.
-- * @remarks The caller must not hold any locks.
-- */
--void ExtPackManager::callAllConsoleReadyHooks(IConsole *a_pConsole)
--{
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (FAILED(hrc))
-- return;
-- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
-- ComPtr<ExtPackManager> ptrSelfRef = this;
--
-- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
-- it != m->llInstalledExtPacks.end();
-- /* advancing below */)
-- {
-- if ((*it)->callConsoleReadyHook(a_pConsole, &autoLock))
-- it = m->llInstalledExtPacks.begin();
-- else
-- it++;
-- }
--}
--
--/**
-- * Calls the pfnVMCreated hook for all working extension packs.
-- *
-- * @param a_pMachine The machine interface of the new VM.
-- */
--void ExtPackManager::callAllVmCreatedHooks(IMachine *a_pMachine)
--{
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (FAILED(hrc))
-- return;
-- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
-- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
-- ExtPackList llExtPacks = m->llInstalledExtPacks;
--
-- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
-- (*it)->callVmCreatedHook(m->pVirtualBox, a_pMachine, &autoLock);
--}
--
--/**
-- * Calls the pfnVMConfigureVMM hook for all working extension packs.
-- *
-- * @returns VBox status code. Stops on the first failure, expecting the caller
-- * to signal this to the caller of the CFGM constructor.
-- * @param a_pConsole The console interface for the VM.
-- * @param a_pVM The VM handle.
-- */
--int ExtPackManager::callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM)
--{
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (FAILED(hrc))
-- return Global::vboxStatusCodeFromCOM(hrc);
-- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
-- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
-- ExtPackList llExtPacks = m->llInstalledExtPacks;
--
-- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
-- {
-- int vrc;
-- (*it)->callVmConfigureVmmHook(a_pConsole, a_pVM, &autoLock, &vrc);
-- if (RT_FAILURE(vrc))
-- return vrc;
-- }
--
-- return VINF_SUCCESS;
--}
--
--/**
-- * Calls the pfnVMPowerOn hook for all working extension packs.
-- *
-- * @returns VBox status code. Stops on the first failure, expecting the caller
-- * to not power on the VM.
-- * @param a_pConsole The console interface for the VM.
-- * @param a_pVM The VM handle.
-- */
--int ExtPackManager::callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM)
--{
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (FAILED(hrc))
-- return Global::vboxStatusCodeFromCOM(hrc);
-- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
-- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
-- ExtPackList llExtPacks = m->llInstalledExtPacks;
--
-- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
-- {
-- int vrc;
-- (*it)->callVmPowerOnHook(a_pConsole, a_pVM, &autoLock, &vrc);
-- if (RT_FAILURE(vrc))
-- return vrc;
-- }
--
-- return VINF_SUCCESS;
--}
--
--/**
-- * Calls the pfnVMPowerOff hook for all working extension packs.
-- *
-- * @param a_pConsole The console interface for the VM.
-- * @param a_pVM The VM handle. Can be NULL.
-- */
--void ExtPackManager::callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM)
--{
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (FAILED(hrc))
-- return;
-- AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS);
-- ComPtr<ExtPackManager> ptrSelfRef = this; /* paranoia */
-- ExtPackList llExtPacks = m->llInstalledExtPacks;
--
-- for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++)
-- (*it)->callVmPowerOffHook(a_pConsole, a_pVM, &autoLock);
--}
--
--
--/**
-- * Checks that the specified extension pack contains a VRDE module and that it
-- * is shipshape.
-- *
-- * @returns S_OK if ok, appropriate failure status code with details.
-- * @param a_pstrExtPack The name of the extension pack.
-- */
--HRESULT ExtPackManager::checkVrdeExtPack(Utf8Str const *a_pstrExtPack)
--{
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
--
-- ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str());
-- if (pExtPack)
-- hrc = pExtPack->checkVrde();
-- else
-- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str());
-- }
--
-- return hrc;
--}
--
--/**
-- * Gets the full path to the VRDE library of the specified extension pack.
-- *
-- * This will do extacly the same as checkVrdeExtPack and then resolve the
-- * library path.
-- *
-- * @returns S_OK if a path is returned, COM error status and message return if
-- * not.
-- * @param a_pstrExtPack The extension pack.
-- * @param a_pstrVrdeLibrary Where to return the path.
-- */
--int ExtPackManager::getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary)
--{
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
--
-- ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str());
-- if (pExtPack)
-- hrc = pExtPack->getVrdpLibraryName(a_pstrVrdeLibrary);
-- else
-- hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str());
-- }
--
-- return hrc;
--}
--
--/**
-- * Gets the name of the default VRDE extension pack.
-- *
-- * @returns S_OK or some COM error status on red tape failure.
-- * @param a_pstrExtPack Where to return the extension pack name. Returns
-- * empty if no extension pack wishes to be the default
-- * VRDP provider.
-- */
--HRESULT ExtPackManager::getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack)
--{
-- a_pstrExtPack->setNull();
--
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (SUCCEEDED(hrc))
-- {
-- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
--
-- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
-- it != m->llInstalledExtPacks.end();
-- it++)
-- {
-- if ((*it)->wantsToBeDefaultVrde())
-- {
-- *a_pstrExtPack = (*it)->m->Desc.strName;
-- break;
-- }
-- }
-- }
-- return hrc;
--}
--
--/**
-- * Checks if an extension pack is (present and) usable.
-- *
-- * @returns @c true if it is, otherwise @c false.
-- * @param a_pszExtPack The name of the extension pack.
-- */
--bool ExtPackManager::isExtPackUsable(const char *a_pszExtPack)
--{
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (FAILED(hrc))
-- return false;
-- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
--
-- ExtPack *pExtPack = findExtPack(a_pszExtPack);
-- return pExtPack != NULL
-- && pExtPack->m->fUsable;
--}
--
--/**
-- * Dumps all extension packs to the release log.
-- */
--void ExtPackManager::dumpAllToReleaseLog(void)
--{
-- AutoCaller autoCaller(this);
-- HRESULT hrc = autoCaller.rc();
-- if (FAILED(hrc))
-- return;
-- AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
--
-- LogRel(("Installed Extension Packs:\n"));
-- for (ExtPackList::iterator it = m->llInstalledExtPacks.begin();
-- it != m->llInstalledExtPacks.end();
-- it++)
-- {
-- ExtPack::Data *pExtPackData = (*it)->m;
-- if (pExtPackData)
-- {
-- if (pExtPackData->fUsable)
-- LogRel((" %s (Version: %s r%u%s%s; VRDE Module: %s)\n",
-- pExtPackData->Desc.strName.c_str(),
-- pExtPackData->Desc.strVersion.c_str(),
-- pExtPackData->Desc.uRevision,
-- pExtPackData->Desc.strEdition.isEmpty() ? "" : " ",
-- pExtPackData->Desc.strEdition.c_str(),
-- pExtPackData->Desc.strVrdeModule.c_str() ));
-- else
-- LogRel((" %s (Version: %s r%u%s%s; VRDE Module: %s unusable because of '%s')\n",
-- pExtPackData->Desc.strName.c_str(),
-- pExtPackData->Desc.strVersion.c_str(),
-- pExtPackData->Desc.uRevision,
-- pExtPackData->Desc.strEdition.isEmpty() ? "" : " ",
-- pExtPackData->Desc.strEdition.c_str(),
-- pExtPackData->Desc.strVrdeModule.c_str(),
-- pExtPackData->strWhyUnusable.c_str() ));
-- }
-- else
-- LogRel((" pExtPackData is NULL\n"));
-- }
--
-- if (!m->llInstalledExtPacks.size())
-- LogRel((" None installed!\n"));
--}
--
--/* vi: set tabstop=4 shiftwidth=4 expandtab: */
---- VirtualBox-4.2.0.orig/src/VBox/Main/src-all/ExtPackUtil.cpp 2012-07-18 05:57:58.000000000 -0300
-+++ /dev/null 2012-09-18 22:18:48.866734195 -0300
-@@ -1,1385 +0,0 @@
--/* $Id: ExtPackUtil.cpp 41783 2012-06-16 19:24:15Z vboxsync $ */
--/** @file
-- * VirtualBox Main - Extension Pack Utilities and definitions, VBoxC, VBoxSVC, ++.
-- */
--
--/*
-- * Copyright (C) 2010-2012 Oracle Corporation
-- *
-- * This file is part of VirtualBox Open Source Edition (OSE), as
-- * available from http://www.virtualbox.org. This file is free software;
-- * you can redistribute it and/or modify it under the terms of the GNU
-- * General Public License (GPL) as published by the Free Software
-- * Foundation, in version 2 as it comes in the "COPYING" file of the
-- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-- */
--
--
--/*******************************************************************************
--* Header Files *
--*******************************************************************************/
--#include "../include/ExtPackUtil.h"
--
--#include <iprt/ctype.h>
--#include <iprt/dir.h>
--#include <iprt/file.h>
--#include <iprt/manifest.h>
--#include <iprt/param.h>
--#include <iprt/path.h>
--#include <iprt/sha.h>
--#include <iprt/string.h>
--#include <iprt/vfs.h>
--#include <iprt/tar.h>
--#include <iprt/zip.h>
--#include <iprt/cpp/xml.h>
--
--#include <VBox/log.h>
--
--
--/**
-- * Worker for VBoxExtPackLoadDesc that loads the plug-in descriptors.
-- *
-- * @returns Same as VBoxExtPackLoadDesc.
-- * @param pVBoxExtPackElm
-- * @param pcPlugIns Where to return the number of plug-ins in the
-- * array.
-- * @param paPlugIns Where to return the plug-in descriptor array.
-- * (RTMemFree it even on failure)
-- */
--static RTCString *
--vboxExtPackLoadPlugInDescs(const xml::ElementNode *pVBoxExtPackElm,
-- uint32_t *pcPlugIns, PVBOXEXTPACKPLUGINDESC *paPlugIns)
--{
-- *pcPlugIns = 0;
-- *paPlugIns = NULL;
--
-- /** @todo plug-ins */
-- NOREF(pVBoxExtPackElm);
--
-- return NULL;
--}
--
--/**
-- * Clears the extension pack descriptor.
-- *
-- * @param a_pExtPackDesc The descriptor to clear.
-- */
--static void vboxExtPackClearDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
--{
-- a_pExtPackDesc->strName.setNull();
-- a_pExtPackDesc->strDescription.setNull();
-- a_pExtPackDesc->strVersion.setNull();
-- a_pExtPackDesc->strEdition.setNull();
-- a_pExtPackDesc->uRevision = 0;
-- a_pExtPackDesc->strMainModule.setNull();
-- a_pExtPackDesc->strVrdeModule.setNull();
-- a_pExtPackDesc->cPlugIns = 0;
-- a_pExtPackDesc->paPlugIns = NULL;
-- a_pExtPackDesc->fShowLicense = false;
--}
--
--/**
-- * Initializes an extension pack descriptor so that it's safe to call free on
-- * it whatever happens later on.
-- *
-- * @param a_pExtPackDesc The descirptor to initialize.
-- */
--void VBoxExtPackInitDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
--{
-- vboxExtPackClearDesc(a_pExtPackDesc);
--}
--
--
--/**
-- * Load the extension pack descriptor from an XML document.
-- *
-- * @returns NULL on success, pointer to an error message on failure (caller
-- * deletes it).
-- * @param a_pDoc Pointer to the XML document.
-- * @param a_pExtPackDesc Where to store the extension pack descriptor.
-- */
--static RTCString *vboxExtPackLoadDescFromDoc(xml::Document *a_pDoc, PVBOXEXTPACKDESC a_pExtPackDesc)
--{
-- /*
-- * Get the main element and check its version.
-- */
-- const xml::ElementNode *pVBoxExtPackElm = a_pDoc->getRootElement();
-- if ( !pVBoxExtPackElm
-- || strcmp(pVBoxExtPackElm->getName(), "VirtualBoxExtensionPack") != 0)
-- return new RTCString("No VirtualBoxExtensionPack element");
--
-- RTCString strFormatVersion;
-- if (!pVBoxExtPackElm->getAttributeValue("version", strFormatVersion))
-- return new RTCString("Missing format version");
-- if (!strFormatVersion.equals("1.0"))
-- return &(new RTCString("Unsupported format version: "))->append(strFormatVersion);
--
-- /*
-- * Read and validate mandatory bits.
-- */
-- const xml::ElementNode *pNameElm = pVBoxExtPackElm->findChildElement("Name");
-- if (!pNameElm)
-- return new RTCString("The 'Name' element is missing");
-- const char *pszName = pNameElm->getValue();
-- if (!VBoxExtPackIsValidName(pszName))
-- return &(new RTCString("Invalid name: "))->append(pszName);
--
-- const xml::ElementNode *pDescElm = pVBoxExtPackElm->findChildElement("Description");
-- if (!pDescElm)
-- return new RTCString("The 'Description' element is missing");
-- const char *pszDesc = pDescElm->getValue();
-- if (!pszDesc || *pszDesc == '\0')
-- return new RTCString("The 'Description' element is empty");
-- if (strpbrk(pszDesc, "\n\r\t\v\b") != NULL)
-- return new RTCString("The 'Description' must not contain control characters");
--
-- const xml::ElementNode *pVersionElm = pVBoxExtPackElm->findChildElement("Version");
-- if (!pVersionElm)
-- return new RTCString("The 'Version' element is missing");
-- const char *pszVersion = pVersionElm->getValue();
-- if (!pszVersion || *pszVersion == '\0')
-- return new RTCString("The 'Version' element is empty");
-- if (!VBoxExtPackIsValidVersionString(pszVersion))
-- return &(new RTCString("Invalid version string: "))->append(pszVersion);
--
-- uint32_t uRevision;
-- if (!pVersionElm->getAttributeValue("revision", uRevision))
-- uRevision = 0;
--
-- const char *pszEdition;
-- if (!pVersionElm->getAttributeValue("edition", pszEdition))
-- pszEdition = "";
-- if (!VBoxExtPackIsValidEditionString(pszEdition))
-- return &(new RTCString("Invalid edition string: "))->append(pszEdition);
--
-- const xml::ElementNode *pMainModuleElm = pVBoxExtPackElm->findChildElement("MainModule");
-- if (!pMainModuleElm)
-- return new RTCString("The 'MainModule' element is missing");
-- const char *pszMainModule = pMainModuleElm->getValue();
-- if (!pszMainModule || *pszMainModule == '\0')
-- return new RTCString("The 'MainModule' element is empty");
-- if (!VBoxExtPackIsValidModuleString(pszMainModule))
-- return &(new RTCString("Invalid main module string: "))->append(pszMainModule);
--
-- /*
-- * The VRDE module, optional.
-- * Accept both none and empty as tokens of no VRDE module.
-- */
-- const char *pszVrdeModule = NULL;
-- const xml::ElementNode *pVrdeModuleElm = pVBoxExtPackElm->findChildElement("VRDEModule");
-- if (pVrdeModuleElm)
-- {
-- pszVrdeModule = pVrdeModuleElm->getValue();
-- if (!pszVrdeModule || *pszVrdeModule == '\0')
-- pszVrdeModule = NULL;
-- else if (!VBoxExtPackIsValidModuleString(pszVrdeModule))
-- return &(new RTCString("Invalid VRDE module string: "))->append(pszVrdeModule);
-- }
--
-- /*
-- * Whether to show the license, optional. (presense is enough here)
-- */
-- const xml::ElementNode *pShowLicenseElm = pVBoxExtPackElm->findChildElement("ShowLicense");
-- bool fShowLicense = pShowLicenseElm != NULL;
--
-- /*
-- * Parse plug-in descriptions (last because of the manual memory management).
-- */
-- uint32_t cPlugIns = 0;
-- PVBOXEXTPACKPLUGINDESC paPlugIns = NULL;
-- RTCString *pstrRet = vboxExtPackLoadPlugInDescs(pVBoxExtPackElm, &cPlugIns, &paPlugIns);
-- if (pstrRet)
-- {
-- RTMemFree(paPlugIns);
-- return pstrRet;
-- }
--
-- /*
-- * Everything seems fine, fill in the return values and return successfully.
-- */
-- a_pExtPackDesc->strName = pszName;
-- a_pExtPackDesc->strDescription = pszDesc;
-- a_pExtPackDesc->strVersion = pszVersion;
-- a_pExtPackDesc->strEdition = pszEdition;
-- a_pExtPackDesc->uRevision = uRevision;
-- a_pExtPackDesc->strMainModule = pszMainModule;
-- a_pExtPackDesc->strVrdeModule = pszVrdeModule;
-- a_pExtPackDesc->cPlugIns = cPlugIns;
-- a_pExtPackDesc->paPlugIns = paPlugIns;
-- a_pExtPackDesc->fShowLicense = fShowLicense;
--
-- return NULL;
--}
--
--/**
-- * Reads the extension pack descriptor.
-- *
-- * @returns NULL on success, pointer to an error message on failure (caller
-- * deletes it).
-- * @param a_pszDir The directory containing the description file.
-- * @param a_pExtPackDesc Where to store the extension pack descriptor.
-- * @param a_pObjInfo Where to store the object info for the file (unix
-- * attribs). Optional.
-- */
--RTCString *VBoxExtPackLoadDesc(const char *a_pszDir, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
--{
-- vboxExtPackClearDesc(a_pExtPackDesc);
--
-- /*
-- * Validate, open and parse the XML file.
-- */
-- char szFilePath[RTPATH_MAX];
-- int vrc = RTPathJoin(szFilePath, sizeof(szFilePath), a_pszDir, VBOX_EXTPACK_DESCRIPTION_NAME);
-- if (RT_FAILURE(vrc))
-- return new RTCString("RTPathJoin failed with %Rrc", vrc);
--
-- RTFSOBJINFO ObjInfo;
-- vrc = RTPathQueryInfoEx(szFilePath, &ObjInfo, RTFSOBJATTRADD_UNIX, RTPATH_F_ON_LINK);
-- if (RT_FAILURE(vrc))
-- return &(new RTCString())->printf("RTPathQueryInfoEx failed with %Rrc", vrc);
-- if (a_pObjInfo)
-- *a_pObjInfo = ObjInfo;
-- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
-- {
-- if (RTFS_IS_SYMLINK(ObjInfo.Attr.fMode))
-- return new RTCString("The XML file is symlinked, that is not allowed");
-- return &(new RTCString)->printf("The XML file is not a file (fMode=%#x)", ObjInfo.Attr.fMode);
-- }
--
-- xml::Document Doc;
-- {
-- xml::XmlFileParser Parser;
-- try
-- {
-- Parser.read(szFilePath, Doc);
-- }
-- catch (xml::XmlError Err)
-- {
-- return new RTCString(Err.what());
-- }
-- }
--
-- /*
-- * Hand the xml doc over to the common code.
-- */
-- return vboxExtPackLoadDescFromDoc(&Doc, a_pExtPackDesc);
--}
--
--/**
-- * Reads the extension pack descriptor.
-- *
-- * @returns NULL on success, pointer to an error message on failure (caller
-- * deletes it).
-- * @param a_pszDir The directory containing the description file.
-- * @param a_pExtPackDesc Where to store the extension pack descriptor.
-- * @param a_pObjInfo Where to store the object info for the file (unix
-- * attribs). Optional.
-- */
--RTCString *VBoxExtPackLoadDescFromVfsFile(RTVFSFILE hVfsFile, PVBOXEXTPACKDESC a_pExtPackDesc, PRTFSOBJINFO a_pObjInfo)
--{
-- vboxExtPackClearDesc(a_pExtPackDesc);
--
-- /*
-- * Query the object info.
-- */
-- RTFSOBJINFO ObjInfo;
-- int rc = RTVfsFileQueryInfo(hVfsFile, &ObjInfo, RTFSOBJATTRADD_UNIX);
-- if (RT_FAILURE(rc))
-- return &(new RTCString)->printf("RTVfsFileQueryInfo failed: %Rrc", rc);
-- if (a_pObjInfo)
-- *a_pObjInfo = ObjInfo;
--
-- /*
-- * The simple approach, read the whole thing into memory and pass this to
-- * the XML parser.
-- */
--
-- /* Check the file size. */
-- if (ObjInfo.cbObject > _1M || ObjInfo.cbObject < 0)
-- return &(new RTCString)->printf("The XML file is too large (%'RU64 bytes)", ObjInfo.cbObject);
-- size_t const cbFile = (size_t)ObjInfo.cbObject;
--
-- /* Rewind to the start of the file. */
-- rc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
-- if (RT_FAILURE(rc))
-- return &(new RTCString)->printf("RTVfsFileSeek(,0,BEGIN) failed: %Rrc", rc);
--
-- /* Allocate memory and read the file content into it. */
-- void *pvFile = RTMemTmpAlloc(cbFile);
-- if (!pvFile)
-- return &(new RTCString)->printf("RTMemTmpAlloc(%zu) failed", cbFile);
--
-- RTCString *pstrErr = NULL;
-- rc = RTVfsFileRead(hVfsFile, pvFile, cbFile, NULL);
-- if (RT_FAILURE(rc))
-- pstrErr = &(new RTCString)->printf("RTVfsFileRead failed: %Rrc", rc);
--
-- /*
-- * Parse the file.
-- */
-- xml::Document Doc;
-- if (RT_SUCCESS(rc))
-- {
-- xml::XmlMemParser Parser;
-- RTCString strFileName = VBOX_EXTPACK_DESCRIPTION_NAME;
-- try
-- {
-- Parser.read(pvFile, cbFile, strFileName, Doc);
-- }
-- catch (xml::XmlError Err)
-- {
-- pstrErr = new RTCString(Err.what());
-- rc = VERR_PARSE_ERROR;
-- }
-- }
-- RTMemTmpFree(pvFile);
--
-- /*
-- * Hand the xml doc over to the common code.
-- */
-- if (RT_SUCCESS(rc))
-- pstrErr = vboxExtPackLoadDescFromDoc(&Doc, a_pExtPackDesc);
--
-- return pstrErr;
--}
--
--/**
-- * Frees all resources associated with a extension pack descriptor.
-- *
-- * @param a_pExtPackDesc The extension pack descriptor which members
-- * should be freed.
-- */
--void VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc)
--{
-- if (!a_pExtPackDesc)
-- return;
--
-- a_pExtPackDesc->strName.setNull();
-- a_pExtPackDesc->strDescription.setNull();
-- a_pExtPackDesc->strVersion.setNull();
-- a_pExtPackDesc->strEdition.setNull();
-- a_pExtPackDesc->uRevision = 0;
-- a_pExtPackDesc->strMainModule.setNull();
-- a_pExtPackDesc->strVrdeModule.setNull();
-- a_pExtPackDesc->cPlugIns = 0;
-- RTMemFree(a_pExtPackDesc->paPlugIns);
-- a_pExtPackDesc->paPlugIns = NULL;
-- a_pExtPackDesc->fShowLicense = false;
--}
--
--/**
-- * Extract the extension pack name from the tarball path.
-- *
-- * @returns String containing the name on success, the caller must delete it.
-- * NULL if no valid name was found or if we ran out of memory.
-- * @param pszTarball The path to the tarball.
-- */
--RTCString *VBoxExtPackExtractNameFromTarballPath(const char *pszTarball)
--{
-- /*
-- * Skip ahead to the filename part and count the number of characters
-- * that matches the criteria for a mangled extension pack name.
-- */
-- const char *pszSrc = RTPathFilename(pszTarball);
-- if (!pszSrc)
-- return NULL;
--
-- size_t off = 0;
-- while (RT_C_IS_ALNUM(pszSrc[off]) || pszSrc[off] == '_')
-- off++;
--
-- /*
-- * Check min and max name limits.
-- */
-- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
-- || off < VBOX_EXTPACK_NAME_MIN_LEN)
-- return NULL;
--
-- /*
-- * Return the unmangled name.
-- */
-- return VBoxExtPackUnmangleName(pszSrc, off);
--}
--
--/**
-- * Validates the extension pack name.
-- *
-- * @returns true if valid, false if not.
-- * @param pszName The name to validate.
-- * @sa VBoxExtPackExtractNameFromTarballPath
-- */
--bool VBoxExtPackIsValidName(const char *pszName)
--{
-- if (!pszName)
-- return false;
--
-- /*
-- * Check the characters making up the name, only english alphabet
-- * characters, decimal digits and spaces are allowed.
-- */
-- size_t off = 0;
-- while (pszName[off])
-- {
-- if (!RT_C_IS_ALNUM(pszName[off]) && pszName[off] != ' ')
-- return false;
-- off++;
-- }
--
-- /*
-- * Check min and max name limits.
-- */
-- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
-- || off < VBOX_EXTPACK_NAME_MIN_LEN)
-- return false;
--
-- return true;
--}
--
--/**
-- * Checks if an alledged manged extension pack name.
-- *
-- * @returns true if valid, false if not.
-- * @param pszMangledName The mangled name to validate.
-- * @param cchMax The max number of chars to test.
-- * @sa VBoxExtPackMangleName
-- */
--bool VBoxExtPackIsValidMangledName(const char *pszMangledName, size_t cchMax /*= RTSTR_MAX*/)
--{
-- if (!pszMangledName)
-- return false;
--
-- /*
-- * Check the characters making up the name, only english alphabet
-- * characters, decimal digits and underscores (=space) are allowed.
-- */
-- size_t off = 0;
-- while (off < cchMax && pszMangledName[off])
-- {
-- if (!RT_C_IS_ALNUM(pszMangledName[off]) && pszMangledName[off] != '_')
-- return false;
-- off++;
-- }
--
-- /*
-- * Check min and max name limits.
-- */
-- if ( off > VBOX_EXTPACK_NAME_MAX_LEN
-- || off < VBOX_EXTPACK_NAME_MIN_LEN)
-- return false;
--
-- return true;
--}
--
--/**
-- * Mangle an extension pack name so it can be used by a directory or file name.
-- *
-- * @returns String containing the mangled name on success, the caller must
-- * delete it. NULL on failure.
-- * @param pszName The unmangled name.
-- * @sa VBoxExtPackUnmangleName, VBoxExtPackIsValidMangledName
-- */
--RTCString *VBoxExtPackMangleName(const char *pszName)
--{
-- AssertReturn(VBoxExtPackIsValidName(pszName), NULL);
--
-- char szTmp[VBOX_EXTPACK_NAME_MAX_LEN + 1];
-- size_t off = 0;
-- char ch;
-- while ((ch = pszName[off]) != '\0')
-- {
-- if (ch == ' ')
-- ch = '_';
-- szTmp[off++] = ch;
-- }
-- szTmp[off] = '\0';
-- Assert(VBoxExtPackIsValidMangledName(szTmp));
--
-- return new RTCString(szTmp, off);
--}
--
--/**
-- * Unmangle an extension pack name (reverses VBoxExtPackMangleName).
-- *
-- * @returns String containing the mangled name on success, the caller must
-- * delete it. NULL on failure.
-- * @param pszMangledName The mangled name.
-- * @param cchMax The max name length. RTSTR_MAX is fine.
-- * @sa VBoxExtPackMangleName, VBoxExtPackIsValidMangledName
-- */
--RTCString *VBoxExtPackUnmangleName(const char *pszMangledName, size_t cchMax)
--{
-- AssertReturn(VBoxExtPackIsValidMangledName(pszMangledName, cchMax), NULL);
--
-- char szTmp[VBOX_EXTPACK_NAME_MAX_LEN + 1];
-- size_t off = 0;
-- char ch;
-- while ( off < cchMax
-- && (ch = pszMangledName[off]) != '\0')
-- {
-- if (ch == '_')
-- ch = ' ';
-- else
-- AssertReturn(RT_C_IS_ALNUM(ch) || ch == ' ', NULL);
-- szTmp[off++] = ch;
-- }
-- szTmp[off] = '\0';
-- AssertReturn(VBoxExtPackIsValidName(szTmp), NULL);
--
-- return new RTCString(szTmp, off);
--}
--
--/**
-- * Constructs the extension pack directory path.
-- *
-- * A combination of RTPathJoin and VBoxExtPackMangleName.
-- *
-- * @returns IPRT status code like RTPathJoin.
-- * @param pszExtPackDir Where to return the directory path.
-- * @param cbExtPackDir The size of the return buffer.
-- * @param pszParentDir The parent directory (".../Extensions").
-- * @param pszName The extension pack name, unmangled.
-- */
--int VBoxExtPackCalcDir(char *pszExtPackDir, size_t cbExtPackDir, const char *pszParentDir, const char *pszName)
--{
-- AssertReturn(VBoxExtPackIsValidName(pszName), VERR_INTERNAL_ERROR_5);
--
-- RTCString *pstrMangledName = VBoxExtPackMangleName(pszName);
-- if (!pstrMangledName)
-- return VERR_INTERNAL_ERROR_4;
--
-- int vrc = RTPathJoin(pszExtPackDir, cbExtPackDir, pszParentDir, pstrMangledName->c_str());
-- delete pstrMangledName;
--
-- return vrc;
--}
--
--
--/**
-- * Validates the extension pack version string.
-- *
-- * @returns true if valid, false if not.
-- * @param pszVersion The version string to validate.
-- */
--bool VBoxExtPackIsValidVersionString(const char *pszVersion)
--{
-- if (!pszVersion || *pszVersion == '\0')
-- return false;
--
-- /* 1.x.y.z... */
-- for (;;)
-- {
-- if (!RT_C_IS_DIGIT(*pszVersion))
-- return false;
-- do
-- pszVersion++;
-- while (RT_C_IS_DIGIT(*pszVersion));
-- if (*pszVersion != '.')
-- break;
-- pszVersion++;
-- }
--
-- /* upper case string + numbers indicating the build type */
-- if (*pszVersion == '-' || *pszVersion == '_')
-- {
-- /** @todo Should probably restrict this to known build types (alpha,
-- * beta, rc, ++). */
-- do
-- pszVersion++;
-- while ( RT_C_IS_DIGIT(*pszVersion)
-- || RT_C_IS_UPPER(*pszVersion)
-- || *pszVersion == '-'
-- || *pszVersion == '_');
-- }
--
-- return *pszVersion == '\0';
--}
--
--/**
-- * Validates the extension pack edition string.
-- *
-- * @returns true if valid, false if not.
-- * @param pszEdition The edition string to validate.
-- */
--bool VBoxExtPackIsValidEditionString(const char *pszEdition)
--{
-- if (*pszEdition)
-- {
-- if (!RT_C_IS_UPPER(*pszEdition))
-- return false;
--
-- do
-- pszEdition++;
-- while ( RT_C_IS_UPPER(*pszEdition)
-- || RT_C_IS_DIGIT(*pszEdition)
-- || *pszEdition == '-'
-- || *pszEdition == '_');
-- }
-- return *pszEdition == '\0';
--}
--
--/**
-- * Validates an extension pack module string.
-- *
-- * @returns true if valid, false if not.
-- * @param pszModule The module string to validate.
-- */
--bool VBoxExtPackIsValidModuleString(const char *pszModule)
--{
-- if (!pszModule || *pszModule == '\0')
-- return false;
--
-- /* Restricted charset, no extensions (dots). */
-- while ( RT_C_IS_ALNUM(*pszModule)
-- || *pszModule == '-'
-- || *pszModule == '_')
-- pszModule++;
--
-- return *pszModule == '\0';
--}
--
--/**
-- * RTStrPrintfv wrapper.
-- *
-- * @returns @a rc
-- * @param rc The status code to return.
-- * @param pszError The error buffer.
-- * @param cbError The size of the buffer.
-- * @param pszFormat The error message format string.
-- * @param ... Format arguments.
-- */
--static int vboxExtPackReturnError(int rc, char *pszError, size_t cbError, const char *pszFormat, ...)
--{
-- va_list va;
-- va_start(va, pszFormat);
-- RTStrPrintfV(pszError, cbError, pszFormat, va);
-- va_end(va);
-- return rc;
--}
--
--/**
-- * RTStrPrintfv wrapper.
-- *
-- * @param pszError The error buffer.
-- * @param cbError The size of the buffer.
-- * @param pszFormat The error message format string.
-- * @param ... Format arguments.
-- */
--static void vboxExtPackSetError(char *pszError, size_t cbError, const char *pszFormat, ...)
--{
-- va_list va;
-- va_start(va, pszFormat);
-- RTStrPrintfV(pszError, cbError, pszFormat, va);
-- va_end(va);
--}
--
--/**
-- * Verifies the manifest and its signature.
-- *
-- * @returns VBox status code, failures with message.
-- * @param hManifestFile The xml from the extension pack.
-- * @param pszExtPackName The expected extension pack name. This can be
-- * NULL, in which we don't have any expectations.
-- * @param pszError Where to store an error message on failure.
-- * @param cbError The size of the buffer @a pszError points to.
-- */
--static int vboxExtPackVerifyXml(RTVFSFILE hXmlFile, const char *pszExtPackName, char *pszError, size_t cbError)
--{
-- /*
-- * Load the XML.
-- */
-- VBOXEXTPACKDESC ExtPackDesc;
-- RTCString *pstrErr = VBoxExtPackLoadDescFromVfsFile(hXmlFile, &ExtPackDesc, NULL);
-- if (pstrErr)
-- {
-- RTStrCopy(pszError, cbError, pstrErr->c_str());
-- delete pstrErr;
-- return VERR_PARSE_ERROR;
-- }
--
-- /*
-- * Check the name.
-- */
-- /** @todo drop this restriction after the old install interface is
-- * dropped. */
-- int rc = VINF_SUCCESS;
-- if ( pszExtPackName
-- && !ExtPackDesc.strName.equalsIgnoreCase(pszExtPackName))
-- rc = vboxExtPackReturnError(VERR_NOT_EQUAL, pszError, cbError,
-- "The name of the downloaded file and the name stored inside the extension pack does not match"
-- " (xml='%s' file='%s')", ExtPackDesc.strName.c_str(), pszExtPackName);
-- return rc;
--}
--
--/**
-- * Verifies the manifest and its signature.
-- *
-- * @returns VBox status code, failures with message.
-- * @param hOurManifest The manifest we compiled.
-- * @param hManifestFile The manifest file in the extension pack.
-- * @param hSignatureFile The manifest signature file.
-- * @param pszError Where to store an error message on failure.
-- * @param cbError The size of the buffer @a pszError points to.
-- */
--static int vboxExtPackVerifyManifestAndSignature(RTMANIFEST hOurManifest, RTVFSFILE hManifestFile, RTVFSFILE hSignatureFile,
-- char *pszError, size_t cbError)
--{
-- /*
-- * Read the manifest from the extension pack.
-- */
-- int rc = RTVfsFileSeek(hManifestFile, 0, RTFILE_SEEK_BEGIN, NULL);
-- if (RT_FAILURE(rc))
-- return vboxExtPackReturnError(rc, pszError, cbError, "RTVfsFileSeek failed: %Rrc", rc);
--
-- RTMANIFEST hTheirManifest;
-- rc = RTManifestCreate(0 /*fFlags*/, &hTheirManifest);
-- if (RT_FAILURE(rc))
-- return vboxExtPackReturnError(rc, pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
--
-- RTVFSIOSTREAM hVfsIos = RTVfsFileToIoStream(hManifestFile);
-- rc = RTManifestReadStandard(hTheirManifest, hVfsIos);
-- RTVfsIoStrmRelease(hVfsIos);
-- if (RT_SUCCESS(rc))
-- {
-- /*
-- * Compare the manifests.
-- */
-- static const char *s_apszIgnoreEntries[] =
-- {
-- VBOX_EXTPACK_MANIFEST_NAME,
-- VBOX_EXTPACK_SIGNATURE_NAME,
-- "./" VBOX_EXTPACK_MANIFEST_NAME,
-- "./" VBOX_EXTPACK_SIGNATURE_NAME,
-- NULL
-- };
-- char szError[RTPATH_MAX];
-- rc = RTManifestEqualsEx(hOurManifest, hTheirManifest, &s_apszIgnoreEntries[0], NULL,
-- RTMANIFEST_EQUALS_IGN_MISSING_ATTRS /*fFlags*/,
-- szError, sizeof(szError));
-- if (RT_SUCCESS(rc))
-- {
-- /*
-- * Validate the manifest file signature.
-- */
-- /** @todo implement signature stuff */
-- NOREF(hSignatureFile);
--
-- }
-- else if (rc == VERR_NOT_EQUAL && szError[0])
-- vboxExtPackSetError(pszError, cbError, "Manifest mismatch: %s", szError);
-- else
-- vboxExtPackSetError(pszError, cbError, "RTManifestEqualsEx failed: %Rrc", rc);
--#if 0
-- RTVFSIOSTREAM hVfsIosStdOut = NIL_RTVFSIOSTREAM;
-- RTVfsIoStrmFromStdHandle(RTHANDLESTD_OUTPUT, RTFILE_O_WRITE, true, &hVfsIosStdOut);
-- RTVfsIoStrmWrite(hVfsIosStdOut, "Our:\n", sizeof("Our:\n") - 1, true, NULL);
-- RTManifestWriteStandard(hOurManifest, hVfsIosStdOut);
-- RTVfsIoStrmWrite(hVfsIosStdOut, "Their:\n", sizeof("Their:\n") - 1, true, NULL);
-- RTManifestWriteStandard(hTheirManifest, hVfsIosStdOut);
--#endif
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "Error parsing '%s': %Rrc", VBOX_EXTPACK_MANIFEST_NAME, rc);
--
-- RTManifestRelease(hTheirManifest);
-- return rc;
--}
--
--
--/**
-- * Verifies the file digest (if specified) and returns the SHA-256 of the file.
-- *
-- * @returns
-- * @param hFileManifest Manifest containing a SHA-256 digest of the file
-- * that was calculated as the file was processed.
-- * @param pszFileDigest SHA-256 digest of the file.
-- * @param pStrDigest Where to return the SHA-256 digest. Optional.
-- * @param pszError Where to write an error message on failure.
-- * @param cbError The size of the @a pszError buffer.
-- */
--static int vboxExtPackVerifyFileDigest(RTMANIFEST hFileManifest, const char *pszFileDigest,
-- RTCString *pStrDigest, char *pszError, size_t cbError)
--{
-- /*
-- * Extract the SHA-256 entry for the extpack file.
-- */
-- char szCalculatedDigest[RTSHA256_DIGEST_LEN + 1];
-- int rc = RTManifestEntryQueryAttr(hFileManifest, "extpack", NULL /*no name*/, RTMANIFEST_ATTR_SHA256,
-- szCalculatedDigest, sizeof(szCalculatedDigest), NULL);
-- if (RT_SUCCESS(rc))
-- {
-- /*
-- * Convert the two strings to binary form before comparing.
-- * We convert the calculated hash even if we don't have anything to
-- * compare with, just to validate it.
-- */
-- uint8_t abCalculatedHash[RTSHA256_HASH_SIZE];
-- rc = RTSha256FromString(szCalculatedDigest, abCalculatedHash);
-- if (RT_SUCCESS(rc))
-- {
-- if ( pszFileDigest
-- && *pszFileDigest != '\0')
-- {
-- uint8_t abFileHash[RTSHA256_HASH_SIZE];
-- rc = RTSha256FromString(pszFileDigest, abFileHash);
-- if (RT_SUCCESS(rc))
-- {
-- if (memcmp(abFileHash, abCalculatedHash, sizeof(abFileHash)))
-- {
-- vboxExtPackSetError(pszError, cbError, "The extension pack file has changed (SHA-256 mismatch)");
-- rc = VERR_NOT_EQUAL;
-- }
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "Bad SHA-256 '%s': %Rrc", szCalculatedDigest, rc);
-- }
--
-- /*
-- * Set the output hash on success.
-- */
-- if (pStrDigest && RT_SUCCESS(rc))
-- {
-- try
-- {
-- *pStrDigest = szCalculatedDigest;
-- }
-- catch (std::bad_alloc)
-- {
-- rc = VERR_NO_MEMORY;
-- }
-- }
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "Bad SHA-256 '%s': %Rrc", szCalculatedDigest, rc);
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "RTManifestEntryGetAttr: %Rrc", rc);
-- return rc;
--}
--
--
--
--/**
-- * Validates a standard file.
-- *
-- * Generally all files are
-- *
-- * @returns VBox status code, failure message in @a pszError.
-- * @param pszAdjName The adjusted member name.
-- * @param enmType The VFS object type.
-- * @param phVfsObj The pointer to the VFS object handle variable.
-- * This is both input and output.
-- * @param phVfsFile Where to store the handle to the memorized
-- * file. This is NULL for license files.
-- * @param pszError Where to write an error message on failure.
-- * @param cbError The size of the @a pszError buffer.
-- */
--static int VBoxExtPackValidateStandardFile(const char *pszAdjName, RTVFSOBJTYPE enmType,
-- PRTVFSOBJ phVfsObj, PRTVFSFILE phVfsFile, char *pszError, size_t cbError)
--{
-- int rc;
--
-- /*
-- * Make sure it's a file and that it isn't too large.
-- */
-- if (phVfsFile && *phVfsFile != NIL_RTVFSFILE)
-- rc = vboxExtPackReturnError(VERR_DUPLICATE, pszError, cbError,
-- "There can only be one '%s'", pszAdjName);
-- else if (enmType != RTVFSOBJTYPE_IO_STREAM && enmType != RTVFSOBJTYPE_FILE)
-- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
-- "Standard member '%s' is not a file", pszAdjName);
-- else
-- {
-- RTFSOBJINFO ObjInfo;
-- rc = RTVfsObjQueryInfo(*phVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
-- if (RT_SUCCESS(rc))
-- {
-- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
-- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
-- "Standard member '%s' is not a file", pszAdjName);
-- else if (ObjInfo.cbObject >= _1M)
-- rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
-- "Standard member '%s' is too large: %'RU64 bytes (max 1 MB)",
-- pszAdjName, (uint64_t)ObjInfo.cbObject);
-- else
-- {
-- /*
-- * Make an in memory copy of the stream and check that the file
-- * is UTF-8 clean.
-- */
-- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(*phVfsObj);
-- RTVFSFILE hVfsFile;
-- rc = RTVfsMemorizeIoStreamAsFile(hVfsIos, RTFILE_O_READ, &hVfsFile);
-- if (RT_SUCCESS(rc))
-- {
-- rc = RTVfsIoStrmValidateUtf8Encoding(hVfsIos,
-- RTVFS_VALIDATE_UTF8_BY_RTC_3629 | RTVFS_VALIDATE_UTF8_NO_NULL,
-- NULL);
-- if (RT_SUCCESS(rc))
-- {
-- /*
-- * Replace *phVfsObj with the memorized file.
-- */
-- rc = RTVfsFileSeek(hVfsFile, 0, RTFILE_SEEK_BEGIN, NULL);
-- if (RT_SUCCESS(rc))
-- {
-- RTVfsObjRelease(*phVfsObj);
-- *phVfsObj = RTVfsObjFromFile(hVfsFile);
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "RTVfsFileSeek failed on '%s': %Rrc", pszAdjName, rc);
-- }
--
-- if (phVfsFile && RT_SUCCESS(rc))
-- *phVfsFile = hVfsFile;
-- else
-- RTVfsFileRelease(hVfsFile);
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "RTVfsMemorizeIoStreamAsFile failed on '%s': %Rrc", pszAdjName, rc);
-- RTVfsIoStrmRelease(hVfsIos);
-- }
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszAdjName, rc);
-- }
-- return rc;
--}
--
--
--/**
-- * Validates a name in an extension pack.
-- *
-- * We restrict the charset to try make sure the extension pack can be unpacked
-- * on all file systems.
-- *
-- * @returns VBox status code, failures with message.
-- * @param pszName The name to validate.
-- * @param pszError Where to store an error message on failure.
-- * @param cbError The size of the buffer @a pszError points to.
-- */
--static int vboxExtPackValidateMemberName(const char *pszName, char *pszError, size_t cbError)
--{
-- if (RTPathStartsWithRoot(pszName))
-- return vboxExtPackReturnError(VERR_PATH_IS_NOT_RELATIVE, pszError, cbError, "'%s': starts with root spec", pszName);
--
-- const char *pszErr = NULL;
-- const char *psz = pszName;
-- int ch;
-- while ((ch = *psz) != '\0')
-- {
-- /* Character set restrictions. */
-- if (ch < 0 || ch >= 128)
-- {
-- pszErr = "Only 7-bit ASCII allowed";
-- break;
-- }
-- if (ch <= 31 || ch == 127)
-- {
-- pszErr = "No control characters are not allowed";
-- break;
-- }
-- if (ch == '\\')
-- {
-- pszErr = "Only backward slashes are not allowed";
-- break;
-- }
-- if (strchr("'\":;*?|[]<>(){}", ch))
-- {
-- pszErr = "The characters ', \", :, ;, *, ?, |, [, ], <, >, (, ), { and } are not allowed";
-- break;
-- }
--
-- /* Take the simple way out and ban all ".." sequences. */
-- if ( ch == '.'
-- && psz[1] == '.')
-- {
-- pszErr = "Double dot sequence are not allowed";
-- break;
-- }
--
-- /* Keep the tree shallow or the hardening checks will fail. */
-- if (psz - pszName > VBOX_EXTPACK_MAX_MEMBER_NAME_LENGTH)
-- {
-- pszErr = "Too long";
-- break;
-- }
--
-- /* advance */
-- psz++;
-- }
--
-- if (pszErr)
-- return vboxExtPackReturnError(VERR_INVALID_NAME, pszError, cbError,
-- "Bad member name '%s' (pos %zu): %s", pszName, (size_t)(psz - pszName), pszErr);
-- return RTEXITCODE_SUCCESS;
--}
--
--
--/**
-- * Validates a file in an extension pack.
-- *
-- * @returns VBox status code, failures with message.
-- * @param pszName The name of the file.
-- * @param hVfsObj The VFS object.
-- * @param pszError Where to store an error message on failure.
-- * @param cbError The size of the buffer @a pszError points to.
-- */
--static int vboxExtPackValidateMemberFile(const char *pszName, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
--{
-- int rc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
-- if (RT_SUCCESS(rc))
-- {
-- RTFSOBJINFO ObjInfo;
-- rc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
-- if (RT_SUCCESS(rc))
-- {
-- if (ObjInfo.cbObject >= 9*_1G64)
-- rc = vboxExtPackReturnError(VERR_OUT_OF_RANGE, pszError, cbError,
-- "'%s': too large (%'RU64 bytes)",
-- pszName, (uint64_t)ObjInfo.cbObject);
-- if (!RTFS_IS_FILE(ObjInfo.Attr.fMode))
-- rc = vboxExtPackReturnError(VERR_NOT_A_FILE, pszError, cbError,
-- "The alleged file '%s' has a mode mask stating otherwise (%RTfmode)",
-- pszName, ObjInfo.Attr.fMode);
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszName, rc);
-- }
-- return rc;
--}
--
--
--/**
-- * Validates a directory in an extension pack.
-- *
-- * @returns VBox status code, failures with message.
-- * @param pszName The name of the directory.
-- * @param hVfsObj The VFS object.
-- * @param pszError Where to store an error message on failure.
-- * @param cbError The size of the buffer @a pszError points to.
-- */
--static int vboxExtPackValidateMemberDir(const char *pszName, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
--{
-- int rc = vboxExtPackValidateMemberName(pszName, pszError, cbError);
-- if (RT_SUCCESS(rc))
-- {
-- RTFSOBJINFO ObjInfo;
-- rc = RTVfsObjQueryInfo(hVfsObj, &ObjInfo, RTFSOBJATTRADD_NOTHING);
-- if (RT_SUCCESS(rc))
-- {
-- if (!RTFS_IS_DIRECTORY(ObjInfo.Attr.fMode))
-- rc = vboxExtPackReturnError(VERR_NOT_A_DIRECTORY, pszError, cbError,
-- "The alleged directory '%s' has a mode mask saying differently (%RTfmode)",
-- pszName, ObjInfo.Attr.fMode);
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "RTVfsObjQueryInfo failed on '%s': %Rrc", pszName, rc);
-- }
-- return rc;
--}
--
--/**
-- * Validates a member of an extension pack.
-- *
-- * @returns VBox status code, failures with message.
-- * @param pszName The name of the directory.
-- * @param enmType The object type.
-- * @param hVfsObj The VFS object.
-- * @param pszError Where to store an error message on failure.
-- * @param cbError The size of the buffer @a pszError points to.
-- */
--int VBoxExtPackValidateMember(const char *pszName, RTVFSOBJTYPE enmType, RTVFSOBJ hVfsObj, char *pszError, size_t cbError)
--{
-- Assert(cbError > 0);
-- *pszError = '\0';
--
-- int rc;
-- if ( enmType == RTVFSOBJTYPE_FILE
-- || enmType == RTVFSOBJTYPE_IO_STREAM)
-- rc = vboxExtPackValidateMemberFile(pszName, hVfsObj, pszError, cbError);
-- else if ( enmType == RTVFSOBJTYPE_DIR
-- || enmType == RTVFSOBJTYPE_BASE)
-- rc = vboxExtPackValidateMemberDir(pszName, hVfsObj, pszError, cbError);
-- else
-- rc = vboxExtPackReturnError(VERR_UNEXPECTED_FS_OBJ_TYPE, pszError, cbError,
-- "'%s' is not a file or directory (enmType=%d)", pszName, enmType);
-- return rc;
--}
--
--
--/**
-- * Rewinds the tarball file handle and creates a gunzip | tar chain that
-- * results in a filesystem stream.
-- *
-- * @returns VBox status code, failures with message.
-- * @param hTarballFile The handle to the tarball file.
-- * @param pszError Where to store an error message on failure.
-- * @param cbError The size of the buffer @a pszError points to.
-- * @param phTarFss Where to return the filesystem stream handle.
-- * @param phFileManifest Where to return a manifest where the tarball is
-- * gettting hashed. The entry will be called
-- * "extpack" and be ready when the file system
-- * stream is at an end. Optional.
-- */
--int VBoxExtPackOpenTarFss(RTFILE hTarballFile, char *pszError, size_t cbError, PRTVFSFSSTREAM phTarFss, PRTMANIFEST phFileManifest)
--{
-- Assert(cbError > 0);
-- *pszError = '\0';
-- *phTarFss = NIL_RTVFSFSSTREAM;
--
-- /*
-- * Rewind the file and set up a VFS chain for it.
-- */
-- int rc = RTFileSeek(hTarballFile, 0, RTFILE_SEEK_BEGIN, NULL);
-- if (RT_FAILURE(rc))
-- return vboxExtPackReturnError(rc, pszError, cbError, "Failed seeking to the start of the tarball: %Rrc", rc);
--
-- RTVFSIOSTREAM hTarballIos;
-- rc = RTVfsIoStrmFromRTFile(hTarballFile, RTFILE_O_READ | RTFILE_O_DENY_WRITE | RTFILE_O_OPEN, true /*fLeaveOpen*/,
-- &hTarballIos);
-- if (RT_FAILURE(rc))
-- return vboxExtPackReturnError(rc, pszError, cbError, "RTVfsIoStrmFromRTFile failed: %Rrc", rc);
--
-- RTMANIFEST hFileManifest = NIL_RTMANIFEST;
-- rc = RTManifestCreate(0 /*fFlags*/, &hFileManifest);
-- if (RT_SUCCESS(rc))
-- {
-- RTVFSIOSTREAM hPtIos;
-- rc = RTManifestEntryAddPassthruIoStream(hFileManifest, hTarballIos, "extpack", RTMANIFEST_ATTR_SHA256, true /*read*/, &hPtIos);
-- if (RT_SUCCESS(rc))
-- {
-- RTVFSIOSTREAM hGunzipIos;
-- rc = RTZipGzipDecompressIoStream(hPtIos, 0 /*fFlags*/, &hGunzipIos);
-- if (RT_SUCCESS(rc))
-- {
-- RTVFSFSSTREAM hTarFss;
-- rc = RTZipTarFsStreamFromIoStream(hGunzipIos, 0 /*fFlags*/, &hTarFss);
-- if (RT_SUCCESS(rc))
-- {
-- RTVfsIoStrmRelease(hPtIos);
-- RTVfsIoStrmRelease(hGunzipIos);
-- RTVfsIoStrmRelease(hTarballIos);
-- *phTarFss = hTarFss;
-- if (phFileManifest)
-- *phFileManifest = hFileManifest;
-- else
-- RTManifestRelease(hFileManifest);
-- return VINF_SUCCESS;
-- }
--
-- vboxExtPackSetError(pszError, cbError, "RTZipTarFsStreamFromIoStream failed: %Rrc", rc);
-- RTVfsIoStrmRelease(hGunzipIos);
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "RTZipGzipDecompressIoStream failed: %Rrc", rc);
-- RTVfsIoStrmRelease(hPtIos);
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "RTManifestEntryAddPassthruIoStream failed: %Rrc", rc);
-- RTManifestRelease(hFileManifest);
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
--
-- RTVfsIoStrmRelease(hTarballIos);
-- return rc;
--}
--
--
--/**
-- * Validates the extension pack tarball prior to unpacking.
-- *
-- * Operations performed:
-- * - Mandatory files.
-- * - Manifest check.
-- * - Manifest seal check.
-- * - XML check, match name.
-- *
-- * @returns VBox status code, failures with message.
-- * @param hTarballFile The handle to open the @a pszTarball file.
-- * @param pszExtPackName The name of the extension pack name. NULL if
-- * the name is not fixed.
-- * @param pszTarball The name of the tarball in case we have to
-- * complain about something.
-- * @param pszTarballDigest The SHA-256 digest of the tarball. Empty string
-- * if no digest available.
-- * @param pszError Where to store an error message on failure.
-- * @param cbError The size of the buffer @a pszError points to.
-- * @param phValidManifest Where to optionally return the handle to fully
-- * validated the manifest for the extension pack.
-- * This includes all files.
-- * @param phXmlFile Where to optionally return the memorized XML
-- * file.
-- * @param pStrDigest Where to return the digest of the file.
-- * Optional.
-- */
--int VBoxExtPackValidateTarball(RTFILE hTarballFile, const char *pszExtPackName,
-- const char *pszTarball, const char *pszTarballDigest,
-- char *pszError, size_t cbError,
-- PRTMANIFEST phValidManifest, PRTVFSFILE phXmlFile, RTCString *pStrDigest)
--{
-- /*
-- * Clear return values.
-- */
-- if (phValidManifest)
-- *phValidManifest = NIL_RTMANIFEST;
-- if (phXmlFile)
-- *phXmlFile = NIL_RTVFSFILE;
-- Assert(cbError > 1);
-- *pszError = '\0';
-- NOREF(pszTarball);
--
-- /*
-- * Open the tar.gz filesystem stream and set up an manifest in-memory file.
-- */
-- RTMANIFEST hFileManifest;
-- RTVFSFSSTREAM hTarFss;
-- int rc = VBoxExtPackOpenTarFss(hTarballFile, pszError, cbError, &hTarFss, &hFileManifest);
-- if (RT_FAILURE(rc))
-- return rc;
--
-- RTMANIFEST hOurManifest;
-- rc = RTManifestCreate(0 /*fFlags*/, &hOurManifest);
-- if (RT_SUCCESS(rc))
-- {
-- /*
-- * Process the tarball (would be nice to move this to a function).
-- */
-- RTVFSFILE hXmlFile = NIL_RTVFSFILE;
-- RTVFSFILE hManifestFile = NIL_RTVFSFILE;
-- RTVFSFILE hSignatureFile = NIL_RTVFSFILE;
-- for (;;)
-- {
-- /*
-- * Get the next stream object.
-- */
-- char *pszName;
-- RTVFSOBJ hVfsObj;
-- RTVFSOBJTYPE enmType;
-- rc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj);
-- if (RT_FAILURE(rc))
-- {
-- if (rc != VERR_EOF)
-- vboxExtPackSetError(pszError, cbError, "RTVfsFsStrmNext failed: %Rrc", rc);
-- else
-- rc = VINF_SUCCESS;
-- break;
-- }
-- const char *pszAdjName = pszName[0] == '.' && pszName[1] == '/' ? &pszName[2] : pszName;
--
-- /*
-- * Check the type & name validity, performing special tests on
-- * standard extension pack member files.
-- *
-- * N.B. We will always reach the end of the loop before breaking on
-- * failure - cleanup reasons.
-- */
-- rc = VBoxExtPackValidateMember(pszName, enmType, hVfsObj, pszError, cbError);
-- if (RT_SUCCESS(rc))
-- {
-- PRTVFSFILE phVfsFile = NULL;
-- if (!strcmp(pszAdjName, VBOX_EXTPACK_DESCRIPTION_NAME))
-- phVfsFile = &hXmlFile;
-- else if (!strcmp(pszAdjName, VBOX_EXTPACK_MANIFEST_NAME))
-- phVfsFile = &hManifestFile;
-- else if (!strcmp(pszAdjName, VBOX_EXTPACK_SIGNATURE_NAME))
-- phVfsFile = &hSignatureFile;
-- else if (!strncmp(pszAdjName, VBOX_EXTPACK_LICENSE_NAME_PREFIX, sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX) - 1))
-- rc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, NULL, pszError, cbError);
-- if (phVfsFile)
-- rc = VBoxExtPackValidateStandardFile(pszAdjName, enmType, &hVfsObj, phVfsFile, pszError, cbError);
-- }
--
-- /*
-- * Add any I/O stream to the manifest
-- */
-- if ( RT_SUCCESS(rc)
-- && ( enmType == RTVFSOBJTYPE_FILE
-- || enmType == RTVFSOBJTYPE_IO_STREAM))
-- {
-- RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(hVfsObj);
-- rc = RTManifestEntryAddIoStream(hOurManifest, hVfsIos, pszAdjName, RTMANIFEST_ATTR_SIZE | RTMANIFEST_ATTR_SHA256);
-- if (RT_FAILURE(rc))
-- vboxExtPackSetError(pszError, cbError, "RTManifestEntryAddIoStream failed on '%s': %Rrc", pszAdjName, rc);
-- RTVfsIoStrmRelease(hVfsIos);
-- }
--
-- /*
-- * Clean up and break out on failure.
-- */
-- RTVfsObjRelease(hVfsObj);
-- RTStrFree(pszName);
-- if (RT_FAILURE(rc))
-- break;
-- }
--
-- /*
-- * Check the integrity of the tarball file.
-- */
-- if (RT_SUCCESS(rc))
-- {
-- RTVfsFsStrmRelease(hTarFss);
-- hTarFss = NIL_RTVFSFSSTREAM;
-- rc = vboxExtPackVerifyFileDigest(hFileManifest, pszTarballDigest, pStrDigest, pszError, cbError);
-- }
--
-- /*
-- * If we've successfully processed the tarball, verify that the
-- * mandatory files are present.
-- */
-- if (RT_SUCCESS(rc))
-- {
-- if (hXmlFile == NIL_RTVFSFILE)
-- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_DESCRIPTION_NAME);
-- if (hManifestFile == NIL_RTVFSFILE)
-- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_MANIFEST_NAME);
-- if (hSignatureFile == NIL_RTVFSFILE)
-- rc = vboxExtPackReturnError(VERR_MISSING, pszError, cbError, "Mandator file '%s' is missing", VBOX_EXTPACK_SIGNATURE_NAME);
-- }
--
-- /*
-- * Check the manifest and it's signature.
-- */
-- if (RT_SUCCESS(rc))
-- rc = vboxExtPackVerifyManifestAndSignature(hOurManifest, hManifestFile, hSignatureFile, pszError, cbError);
--
-- /*
-- * Check the XML.
-- */
-- if (RT_SUCCESS(rc))
-- rc = vboxExtPackVerifyXml(hXmlFile, pszExtPackName, pszError, cbError);
--
-- /*
-- * Returns objects.
-- */
-- if (RT_SUCCESS(rc))
-- {
-- if (phValidManifest)
-- {
-- RTManifestRetain(hOurManifest);
-- *phValidManifest = hOurManifest;
-- }
-- if (phXmlFile)
-- {
-- RTVfsFileRetain(hXmlFile);
-- *phXmlFile = hXmlFile;
-- }
-- }
--
-- /*
-- * Release our object references.
-- */
-- RTManifestRelease(hOurManifest);
-- RTVfsFileRelease(hXmlFile);
-- RTVfsFileRelease(hManifestFile);
-- RTVfsFileRelease(hSignatureFile);
-- }
-- else
-- vboxExtPackSetError(pszError, cbError, "RTManifestCreate failed: %Rrc", rc);
-- RTVfsFsStrmRelease(hTarFss);
-- RTManifestRelease(hFileManifest);
--
-- return rc;
--}
--
--- VirtualBox-4.1.18.orig/include/Makefile.kmk 2012-06-20 10:07:49.000000000 -0300
+++ VirtualBox-4.1.18/include/Makefile.kmk 2012-07-24 21:11:57.007068865 -0300
@@ -51,7 +51,6 @@
diff --git a/libre/xulrunner-libre/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch b/libre/xulrunner-libre/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch
index 240c3d4e8..a5fe02165 100644
--- a/libre/xulrunner-libre/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch
+++ b/libre/xulrunner-libre/Bug-756390-Make-the-Reset-Firefox-feature-more-gener.patch
@@ -139,7 +139,7 @@ index 21cf405..f3c1a6b 100644
<!ENTITY noMigrationSources.label "No programs that contain bookmarks, history or password data could be found.">
diff --git a/browser/locales/en-US/chrome/browser/migration/migration.properties b/browser/locales/en-US/chrome/browser/migration/migration.properties
-index ab82d85..915f6b8 100644
+index 260bc29..52b32cc 100644
--- a/browser/locales/en-US/chrome/browser/migration/migration.properties
+++ b/browser/locales/en-US/chrome/browser/migration/migration.properties
@@ -8,7 +8,6 @@ profileName_format=%S %S
@@ -150,7 +150,7 @@ index ab82d85..915f6b8 100644
importedBookmarksFolder=From %S
-@@ -22,22 +21,22 @@ importedSafariReadingList=Reading List (From Safari)
+@@ -24,22 +23,22 @@ importedSafariReadingList=Reading List (From Safari)
2_ie=Cookies
2_safari=Cookies
2_chrome=Cookies
@@ -177,25 +177,25 @@ index ab82d85..915f6b8 100644
32_ie=Favorites
32_safari=Bookmarks
-@@ -46,4 +45,4 @@ importedSafariReadingList=Reading List (From Safari)
+@@ -48,4 +47,4 @@ importedSafariReadingList=Reading List (From Safari)
64_ie=Other Data
64_safari=Other Data
64_chrome=Other Data
-64_firefox=Bookmarks Backups
+64_self=Bookmarks Backups
diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
-index 697b217..b6e1709 100644
+index 339ffda..6999b26 100644
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -38,7 +38,7 @@ toolkit.jar:
+ content/global/mozilla.xhtml (mozilla.xhtml)
- *+ content/global/nsDragAndDrop.js (nsDragAndDrop.js)
+ content/global/nsDragAndDrop.js (nsDragAndDrop.js)
content/global/resetProfile.css (resetProfile.css)
-* content/global/resetProfile.js (resetProfile.js)
+ content/global/resetProfile.js (resetProfile.js)
- * content/global/resetProfile.xul (resetProfile.xul)
- * content/global/resetProfileProgress.xul (resetProfileProgress.xul)
- * content/global/treeUtils.js (treeUtils.js)
+ content/global/resetProfile.xul (resetProfile.xul)
+ content/global/resetProfileProgress.xul (resetProfileProgress.xul)
+ content/global/treeUtils.js (treeUtils.js)
diff --git a/toolkit/content/resetProfile.js b/toolkit/content/resetProfile.js
index dcb4065..09c1146 100644
--- a/toolkit/content/resetProfile.js
@@ -267,10 +267,10 @@ index f35c227..7062886 100644
%{C++
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
-index e5d3042..6de3390 100644
+index 60348b5..c240c4f 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
-@@ -3650,7 +3650,7 @@ XREMain::XRE_mainRun()
+@@ -3651,7 +3651,7 @@ XREMain::XRE_mainRun()
if (gDoProfileReset) {
// Automatically migrate from the current application if we just
// reset the profile.
diff --git a/libre/xulrunner-libre/PKGBUILD b/libre/xulrunner-libre/PKGBUILD
index 4c93e1c48..0d5f817e6 100644
--- a/libre/xulrunner-libre/PKGBUILD
+++ b/libre/xulrunner-libre/PKGBUILD
@@ -6,7 +6,7 @@
# We're getting this from Debian Experimental
_debname=iceweasel
-_debver=15.0.1
+_debver=16.0.1
_debrel=1
_debrepo=http://ftp.debian.org/debian/pool/main/
debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
@@ -30,11 +30,11 @@ options=('!emptydirs')
conflicts=('xulrunner')
provides=("xulrunner=${_debver}")
replaces=('xulrunner-oss' 'xulrunner')
-md5sums=('0936242388cd4c75930c1d2487e15216'
- 'ce37c76476b8edf40780d00cf79d0d62'
+md5sums=('33e50f7ddfa7274e5a3bd393c37fb3b3'
+ 'ddfcf225ea0e3d7b4b377f4a63d5e8c4'
'f2f4f4a573f549e8b494e33b3ad226bc'
'27271ce647a83906ef7a24605e840d61'
- 'c52fac65c1e06290a5108b75c31ace79')
+ '0a31239f1008038df5057982fe745dec')
build() {
export QUILT_PATCHES=debian/patches
diff --git a/pcr/etckeeper/PKGBUILD b/pcr/etckeeper/PKGBUILD
new file mode 100644
index 000000000..163c320db
--- /dev/null
+++ b/pcr/etckeeper/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer (Parabola): Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (AUR): Buce <dmbuce@gmail.com>
+# Contributor: Danie Roux <accounts@danieroux.com>
+
+# This requires makepkg newer than 4.0.3, which at this time means from git
+
+pkgname=etckeeper
+pkgver=0.64
+pkgdesc="collection of tools to let /etc be stored in a git, hg, bzr or darcs repository."
+url="http://kitenet.net/~joey/code/etckeeper/"
+license=('GPL2')
+
+pkgrel=1
+arch=('any')
+depends=('inetutils' 'python2')
+makedepends=('bzr') # bzr must be there at compile time to have bzr support
+optdepends=('git' 'hg' 'bzr' 'darcs')
+backup=(etc/etckeeper/etckeeper.conf)
+source=("etckeeper-$pkgver::git://git.kitenet.net/etckeeper#tag=${pkgver}"
+ etckeeper-pacman.patch
+ etckeeper-archlinux.conf)
+
+build() {
+ cd "$srcdir/etckeeper-$pkgver"
+
+ # add pacman support to list-to `list-installed`
+ patch -p0 -i "$srcdir/etckeeper-pacman.patch"
+
+ # use python2
+ sed -i 's@^#!/usr/bin/python$@&2@' etckeeper-bzr/__init__.py
+
+ make CONFFILE="$srcdir/etckeeper-archlinux.conf" build
+}
+
+package() {
+ cd "$srcdir/etckeeper-$pkgver"
+
+ make CONFFILE="$srcdir/etckeeper-archlinux.conf" DESTDIR=$pkgdir install
+}
+
+md5sums=('SKIP'
+ 'f1f00bf9331d1ef7f29b0ac29cdfcbda'
+ '99d8d2838f49fa0f2f21c9e37948100d')
diff --git a/pcr/etckeeper/etckeeper-archlinux.conf b/pcr/etckeeper/etckeeper-archlinux.conf
new file mode 100644
index 000000000..83e2c577d
--- /dev/null
+++ b/pcr/etckeeper/etckeeper-archlinux.conf
@@ -0,0 +1,38 @@
+# The VCS to use.
+#VCS="hg"
+VCS="git"
+#VCS="bzr"
+#VCS="darcs"
+
+# Options passed to git commit when run by etckeeper.
+GIT_COMMIT_OPTIONS=""
+
+# Options passed to hg commit when run by etckeeper.
+HG_COMMIT_OPTIONS=""
+
+# Options passed to bzr commit when run by etckeeper.
+BZR_COMMIT_OPTIONS=""
+
+# Options passed to darcs record when run by etckeeper.
+DARCS_COMMIT_OPTIONS="-a"
+
+# Uncomment to avoid etckeeper committing existing changes
+# to /etc automatically once per day.
+#AVOID_DAILY_AUTOCOMMITS=1
+
+# Uncomment the following to avoid special file warning
+# (the option is enabled automatically by cronjob regardless).
+#AVOID_SPECIAL_FILE_WARNING=1
+
+# Uncomment to avoid etckeeper committing existing changes to
+# /etc before installation. It will cancel the installation,
+# so you can commit the changes by hand.
+#AVOID_COMMIT_BEFORE_INSTALL=1
+
+# The high-level package manager that's being used.
+# (apt, pacman-g2, yum etc)
+HIGHLEVEL_PACKAGE_MANAGER=pacman
+
+# The low-level package manager that's being used.
+# (dpkg, rpm, pacman-g2, etc)
+LOWLEVEL_PACKAGE_MANAGER=pacman
diff --git a/pcr/etckeeper/etckeeper-pacman.patch b/pcr/etckeeper/etckeeper-pacman.patch
new file mode 100644
index 000000000..1fb4acb62
--- /dev/null
+++ b/pcr/etckeeper/etckeeper-pacman.patch
@@ -0,0 +1,9 @@
+--- list-installed.d/50list-installed.orig 2012-10-21 23:45:30.000000000 -0400
++++ list-installed.d/50list-installed 2012-10-21 23:45:39.000000000 -0400
+@@ -7,4 +7,6 @@
+ egrep '(ok installed|ok config-files)' | cut -f2,3
+ elif [ "$LOWLEVEL_PACKAGE_MANAGER" = rpm ]; then
+ rpm -qa --qf "%|epoch?{%{epoch}}:{0}|:%{name}-%{version}-%{release}.%{arch}\n" | sort
++elif [ "$LOWLEVEL_PACKAGE_MANAGER" = pacman ]; then
++ { pacman -Qd|sed 's/.*/& (dep)/'; pacman -Qe|sed 's/.*/& (explicit)/'; } |sort
+ fi
diff --git a/pcr/zoneminder/PKGBUILD b/pcr/zoneminder/PKGBUILD
index bb850eec2..e5e54537b 100644
--- a/pcr/zoneminder/PKGBUILD
+++ b/pcr/zoneminder/PKGBUILD
@@ -8,58 +8,118 @@
pkgname=zoneminder
pkgver=1.25.0
-pkgrel=17
+pkgrel=20
pkgdesc='Capture, analyse, record and monitor video security cameras'
-arch=(i686 x86_64 mips64el)
-backup=(etc/zm.conf etc/httpd/conf/extra/httpd-zm.conf)
-url=http://www.$pkgname.com
-license=(GPL)
+arch=(
+ i686
+ x86_64
+ mips64el
+)
+backup=(
+ etc/zm.conf
+)
+url="http://www.$pkgname.com"
+license=(
+ GPL
+)
depends=(
- apache cambozola ffmpeg-static gnutls mysql perl-archive-zip perl-date-manip
- perl-dbd-mysql perl-dbi perl-expect perl-libwww perl-mime-lite
- perl-mime-tools perl-php-serialization perl-net-sftp-foreign perl-sys-mmap
- perl-time-modules perl-x10 php php-apache php-gd php-mcrypt
+ apache
+ cambozola
+ ffmpeg-static
+ gnutls
+ mysql
+ perl-archive-zip
+ perl-date-manip
+ perl-dbd-mysql
+ perl-dbi
+ perl-expect
+ perl-libwww
+ perl-mime-lite
+ perl-mime-tools
+ perl-php-serialization
+ perl-net-sftp-foreign
+ perl-sys-mmap
+ perl-time-modules
+ perl-x10
+ php
+ php-apache
+ php-gd
+ php-mcrypt
+)
+makedepends=(
+ netpbm
+)
+optdepends=(
+ netpbm
)
-makedepends=(netpbm)
install=$pkgname.install
source=(
http://www.$pkgname.com/downloads/ZoneMinder-$pkgver.tar.gz
- httpd-zm.conf
- zm.rc.d
+ httpd-$pkgname.conf
+ $pkgname
$pkgname.service
patch-ffmpeg-0.11.patch
)
-md5sums=(
- eaefa14befd482154970541252aa1a39
- 25ad042b501aaad98cbe4e05ca0a96c2
- 034b61cda8849fc3001849e76ef26041
- 7487cc72ead82aea0bc78f2e4106ae1a
- 81c8be870260142e2633eedf73c72040
+sha512sums=(
+ 3e18993b0539729491052c97d8c94227ccc089eb40277c2f07682f30049033303c7cfe9734fdac6d33ae67df29c76eb72bf7fbb5dae8227e8831fa603b61c375
+ 4ce0d8eba9d006d258f5b8a83920fc17f1f602b96518d37b7a47cd9b6eb84ef2587641a6ba839a469c3f0e33b46475866187279ae3f8be0d4054b074ee5d6b08
+ ab4e1d5ddaf4d9cd53d6ca59d7965902afd6a2dc830fbbafa270736c52c2b3563075fee860bb0276466f96e9dbfb71b259ac45a4ae2e4ead8eaec154a0159eb0
+ cfb0eb87a989236c72741a496ddc6a73aa2696e5beaaca4836d3c231ddb24c7ef5e9f65e7afa49674f2115cbfa4a07c75486e1947ce294c816ddbb875f3b99cf
+ 382799ad6add1632d934544230520f942dae37913b58cfa19e0cb2b11e7002267b1fdb9aa535f2217bcccf0c85c4d754f316dc3980a3ca267e5b3f5500536024
)
+
build() {
cd $srcdir/ZoneMinder-$pkgver
- export CPPFLAGS=-D__STDC_CONSTANT_MACROS \
- ZM_SSL_LIB=gnutls
+ # ZM_RUNDIR need change to run dir
+ export CPPFLAGS=-D__STDC_CONSTANT_MACROS\
+ ZM_LOGDIR=/var/log/$pkgname\
+ ZM_RUNDIR=/tmp/$pkgname\
+ ZM_SSL_LIB=gnutls\
+ ZM_TMPDIR=/tmp/$pkgname
# Patch for GCC 4.7.x
- sed -i -e 's/^#include <errno.h>/#include <errno.h>\n#include <unistd.h>/' src/zm_logger.cpp
- sed -i -e 's/^#include <pthread.h>/#include <pthread.h>\n#include <unistd.h>/' src/zm_thread.h
+ sed -i -e 's/^#include <errno.h>/#include <errno.h>\n#include <unistd.h>/'\
+ src/zm_logger.cpp || read
+ sed -i -e 's/^#include <pthread.h>/#include <pthread.h>\n#include <unistd.h>/'\
+ src/zm_thread.h || read
+
+ # Patch for automake 1.12
+ sed -i -e '/am__api_version=/ s/1.11/1.12/'\
+ configure || read
# Patch for disable ZM_CHECK_FOR_UPDATES
- sed -i -e '/ZM_CHECK_FOR_UPDATES/,+1 s/yes/no/' scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
+ sed -i -e '/ZM_CHECK_FOR_UPDATES/,+1 s/yes/no/'\
+ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read
# Patch for support html5 video and flv
sed -i -e '/ZM_MPEG_LIVE_FORMAT/,+1 s/swf/webm/;/ZM_MPEG_REPLAY_FORMAT/,+1 s/swf/webm/;
/ZM_FFMPEG_FORMATS/,+1 s/mpg mpeg wmv asf avi\* mov swf 3gp\*\*/mpg mpeg wmv asf avi\* mov flv swf 3gp\*\* webm ogg h254/'\
- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
+ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read
+
+ # Patch for change path run dir
+ sed -i -e '/ZM_PATH_SOCKS/,+1 s/TMP/RUN/'\
+ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read
+
+ # Patch for change ZM name to ZoneMinder
+ sed -i -e '/ZM_WEB_TITLE_PREFIX/,+1 s/"ZM"/"ZoneMinder"/'\
+ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read
+
+ # Patch for v4l1 compat support
+ sed -i -e "s/$ENV{SHELL} = \'\/bin\/sh\' if exists $ENV{SHELL};/$ENV{SHELL} = \'\/bin\/sh\' if exists $ENV{SHELL};\n$ENV{LD_PRELOAD} = \'\/usr\/lib\/libv4l\/v4l1compat.so\' ;/"\
+ scripts/zmdc.pl.in || read
+
+ # Patch for add more socket tries
+ sed -i -e '/$max_socket_tries/ s/3/15/'\
+ web/ajax/stream.php || read
# Patch for wrong "suppported"
- sed -i -e 's/suppported/supported/' src/zm_local_camera.cpp
+ sed -i -e 's/suppported/supported/'\
+ src/zm_local_camera.cpp || read
# Patch for type cast in linux-libre kernel 3.5
sed -i -e 's/enum v4l2_buf_type type = v4l2_data.fmt.type;/enum v4l2_buf_type type = (v4l2_buf_type)v4l2_data.fmt.type;/'\
- src/zm_local_camera.cpp
+ src/zm_local_camera.cpp || read
# Patch for drop custom perl install paths
sed -i -e '/# Slight hack for non-standard perl install paths/,+10 d;
@@ -93,22 +153,22 @@ build() {
/ ( cd $(DESTDIR)$(sysconfdir); chown $(webuser):$(webgroup) $(sysconf_DATA); chmod 600 $(sysconf_DATA) )/d;
/ ( if ! test -e $(ZM_RUNDIR); then mkdir -p $(ZM_RUNDIR); fi; if test "$(ZM_RUNDIR)" != "\/var\/run"; then chown $(webuser):$(webgroup) $(ZM_RUNDIR); chmod u+w $(ZM_RUNDIR); fi )/d;
/ ( if ! test -e $(ZM_TMPDIR); then mkdir -m 700 -p $(ZM_TMPDIR); fi; if test "$(ZM_TMPDIR)" != "\/tmp"; then chown $(webuser):$(webgroup) $(ZM_TMPDIR); chmod u+w $(ZM_TMPDIR); fi )/d;
- / ( if ! test -e $(ZM_LOGDIR); then mkdir -p $(ZM_LOGDIR); fi; if test "$(ZM_LOGDIR)" != "\/var\/log"; then chown $(webuser):$(webgroup) $(ZM_LOGDIR); chmod u+w $(ZM_LOGDIR); fi )/,+1 d' \
+ / ( if ! test -e $(ZM_LOGDIR); then mkdir -p $(ZM_LOGDIR); fi; if test "$(ZM_LOGDIR)" != "\/var\/log"; then chown $(webuser):$(webgroup) $(ZM_LOGDIR); chmod u+w $(ZM_LOGDIR); fi )/,+1 d'\
Makefile.{am,in}
- ./configure --prefix=/usr \
- --build \
- --enable-crashtrace=no \
- --enable-debug=no \
- --enable-mmap=yes \
- --sysconfdir=/etc \
- --with-cgidir=/usr/lib/$pkgname/cgi-bin \
- --with-ffmpeg=/usr \
- --with-libarch=lib \
- --with-mysql=/usr \
- --with-webdir=/usr/share/$pkgname/www \
- --with-webgroup=http \
- --with-webhost=localhost \
+ ./configure --prefix=/usr\
+ --enable-crashtrace=no\
+ --enable-debug=no\
+ --enable-mmap=yes\
+ --sysconfdir=/etc\
+ --with-cgidir=/srv/http/cgi-bin\
+ --with-extralibs='-L/usr/lib -L/usr/lib/mysql'\
+ --with-ffmpeg=/usr\
+ --with-libarch=lib\
+ --with-mysql=/usr\
+ --with-webdir=/srv/http/$pkgname\
+ --with-webgroup=http\
+ --with-webhost=localhost\
--with-webuser=http
make V=0
@@ -119,21 +179,22 @@ package() {
make DESTDIR=$pkgdir install
- mkdir -p $pkgdir/{etc/{httpd/conf/extra,rc.d},usr/{lib/{systemd/system,$pkgname/cgi-bin},share/{license/$pkgname,$pkgname/{db,www}}},var/{cache/$pkgname,log/zm}}
+ mkdir -p $pkgdir/{etc/{httpd/conf/extra,rc.d},srv/http/{cgi-bin,$pkgname},usr/{lib/systemd/system,share/{license/$pkgname,$pkgname/db}},var/{cache/$pkgname,log/$pkgname}}
- chown -R http.http $pkgdir/{etc/zm.conf,var/{cache/$pkgname,log/zm}}
+ chown -R http.http $pkgdir/{etc/zm.conf,var/{cache/$pkgname,log/$pkgname}}
+ chmod 0700 $pkgdir/etc/zm.conf
for i in events images temp; do
- mv $pkgdir/usr/share/$pkgname/www/$i $pkgdir/var/cache/$pkgname/$i
- ln -s /var/cache/$pkgname/$i $pkgdir/usr/share/$pkgname/www/$i
+ mv $pkgdir/srv/http/$pkgname/$i $pkgdir/var/cache/$pkgname/$i
+ ln -s /var/cache/$pkgname/$i $pkgdir/srv/http/$pkgname/$i
done
- ln -s /usr/lib/$pkgname/cgi-bin $pkgdir/usr/share/$pkgname/www
- ln -s /usr/share/cambozola/cambozola.jar $pkgdir/usr/share/$pkgname/www
+ ln -s /srv/http/cgi-bin $pkgdir/srv/http/$pkgname
+ ln -s /usr/share/cambozola/cambozola.jar $pkgdir/srv/http/$pkgname
- install -D -m 644 $srcdir/httpd-zm.conf $pkgdir/etc/httpd/conf/extra
- install -D -m 644 $srcdir/zm.rc.d $pkgdir/etc/rc.d/zm
- install -D -m 644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system
- install -D -m 644 COPYING $pkgdir/usr/share/license/$pkgname
- install -D -m 644 db/zm*.sql $pkgdir/usr/share/$pkgname/db
+ install -D -m 644 $srcdir/httpd-$pkgname.conf $pkgdir/etc/httpd/conf/extra
+ install -D -m 644 $srcdir/$pkgname $pkgdir/etc/rc.d
+ install -D -m 644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system
+ install -D -m 644 COPYING $pkgdir/usr/share/license/$pkgname
+ install -D -m 644 db/zm*.sql $pkgdir/usr/share/$pkgname/db
}
diff --git a/pcr/zoneminder/httpd-zm.conf b/pcr/zoneminder/httpd-zm.conf
index 8c6356aec..aeb089bc1 100644
--- a/pcr/zoneminder/httpd-zm.conf
+++ b/pcr/zoneminder/httpd-zm.conf
@@ -1,8 +1,8 @@
# /etc/httpd/conf/extra/httpd-zm.conf
# Config for zoneminder web app
-Alias /zm "/usr/share/zoneminder/www"
-<Directory "/usr/share/zoneminder/www">
+Alias /zm "/srv/http/zoneminder"
+<Directory "/srv/http/zoneminder">
Options -Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
@@ -11,8 +11,8 @@ Alias /zm "/usr/share/zoneminder/www"
php_value short_open_tag On
</Directory>
-ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"
-<Directory "/usr/lib/zoneminder/cgi-bin">
+ScriptAlias /cgi-bin "/srv/http/cgi-bin"
+<Directory "/srv/http/cgi-bin">
AllowOverride None
Options ExecCGI FollowSymLinks
Order allow,deny
diff --git a/pcr/zoneminder/httpd-zoneminder.conf b/pcr/zoneminder/httpd-zoneminder.conf
new file mode 100644
index 000000000..aeb089bc1
--- /dev/null
+++ b/pcr/zoneminder/httpd-zoneminder.conf
@@ -0,0 +1,20 @@
+# /etc/httpd/conf/extra/httpd-zm.conf
+# Config for zoneminder web app
+
+Alias /zm "/srv/http/zoneminder"
+<Directory "/srv/http/zoneminder">
+ Options -Indexes MultiViews FollowSymLinks
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+ # The code unfortunately uses short tags in many places
+ php_value short_open_tag On
+</Directory>
+
+ScriptAlias /cgi-bin "/srv/http/cgi-bin"
+<Directory "/srv/http/cgi-bin">
+ AllowOverride None
+ Options ExecCGI FollowSymLinks
+ Order allow,deny
+ Allow from all
+</Directory>
diff --git a/pcr/zoneminder/zoneminder b/pcr/zoneminder/zoneminder
new file mode 100644
index 000000000..c4cbf4d3f
--- /dev/null
+++ b/pcr/zoneminder/zoneminder
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+daemon_name=zm
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting Zoneminder"
+ /usr/bin/zmfix -a
+ if /usr/bin/zmpkg.pl start >/dev/null ; then
+ add_daemon $daemon_name
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping Zoneminder"
+ if /usr/bin/zmpkg.pl stop >/dev/null ; then
+ rm_daemon $daemon_name
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ reload)
+ stat_busy "Reloading Zoneminder"
+ if /usr/bin/zmpkg.pl graceful >/dev/null ; then
+ add_daemon $daemon_name
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ restart)
+ stat_busy "Restarting Zoneminder"
+ if /usr/bin/zmpkg.pl restart >/dev/null ; then
+ add_daemon $daemon_name
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ status)
+ stat_busy "Checking Zoneminder status";
+ ck_status $daemon_name
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|reload|restart|status}"
+esac
+
+exit 0
diff --git a/pcr/zoneminder/zoneminder.install b/pcr/zoneminder/zoneminder.install
index 922aaad9b..899e2a5d1 100644
--- a/pcr/zoneminder/zoneminder.install
+++ b/pcr/zoneminder/zoneminder.install
@@ -1,14 +1,14 @@
pre_install() {
set -e
abort=false
- if [ -L /usr/share/zoneminder/www/events ]; then
- l=$(readlink /usr/share/zoneminder/www/events)
+ if [ -L /srv/http/zoneminder/events ]; then
+ l=$(readlink /srv/http/zoneminder/events)
if [ $l != /var/cache/zoneminder/events ]; then
abort=true
fi
fi
- if [ -L /usr/share/zoneminder/www/images ]; then
- l=$(readlink /usr/share/zoneminder/www/images )
+ if [ -L /srv/http/zoneminder/images ]; then
+ l=$(readlink /srv/http/zoneminder/images)
if [ $l != /var/cache/zoneminder/images ]; then
abort=true
fi
@@ -16,7 +16,7 @@ pre_install() {
if [ $abort = true ]; then
cat >&2 << EOF
Aborting installation of zoneminder due to non-default symlinks in
-/usr/share/zoneminder/www for the images and/or events directory, which could
+/srv/http/zoneminder for the images and/or events directory, which could
result in loss of data. Please move your data in each of these directories to
/var/cache/zoneminder before installing zoneminder from the package.
EOF
@@ -26,18 +26,73 @@ EOF
}
post_install() {
- mkdir /usr/share/zoneminder/www/backup
- mkdir /usr/share/zoneminder/www/socks
+ if [[ -d /var/log/zoneminder ]]; then
+ chmod 0755 /var/log/zoneminder
+ chown http.http /var/log/zoneminder
+ else
+ mkdir -m 0755 /var/log/zoneminder
+ chown http.http /var/log/zoneminder
+ fi
+ if [[ -d /tmp/zoneminder ]]; then
+ chmod 0700 /tmp/zoneminder
+ chown http.http /tmp/zoneminder
+ else
+ mkdir -m 0700 /tmp/zoneminder
+ chown http.http /tmp/zoneminder
+ fi
+ sed -i -e '
+ /^;extension=mysql.so/ s/^;//;
+ /^#extension=mysql.so/ s/^#//;
+ /^;extension=mysqli.so/ s/^;//;
+ /^#extension=mysqli.so/ s/^#//;
+ /^;extension=gd.so/ s/^;//;
+ /^#extension=gd.so/ s/^#//;
+ /^;extension=gettext.so/ s/^;//;
+ /^#extension=gettext.so/ s/^#//;
+ /^;extension=mcrypt.so/ s/^;//;
+ /^#extension=mcrypt.so/ s/^#//;
+ /^;extension=session.so/ s/^;//;
+ /^#extension=session.so/ s/^#//;
+ /^;extension=sockets.so/ s/^;//;
+ /^#extension=sockets.so/ s/^#//;
+ /^;extension=openssl.so/ s/^;//;
+ /^#extension=openssl.so/ s/^#//;
+ /^;extension=ftp.so/ s/^;//;
+ /^#extension=ftp.so/ s/^#//;
+ /^;extension=zip.so/ s/^;//;
+ /^#extension=zip.so/ s/^#//;
+ /^;open_basedir/ s/^;//;
+ /^#open_basedir/ s/^#//;
+ /^open_basedir/ s/:\/etc//;
+ /^open_basedir/ s/:\/etc\///;
+ /^open_basedir/ s/$/:\/etc/;
+ /^open_basedir/ s/:\/srv\/http\/zoneminder//;
+ /^open_basedir/ s/:\/srv\/http\/zoneminder\///;
+ /^open_basedir/ s/$/:\/srv\/http\/zoneminder/;
+ ' /etc/php/php.ini || read
+ sed -i -e '
+ /^LoadModule php5_module modules\/libphp5.so/d;
+ /^LoadModule rewrite_module modules\/mod_rewrite.so/ s/$/\nLoadModule php5_module modules\/libphp5.so/;
+ /^# PHP 5/d;
+ /^# ZoneMinder/d;
+ /^Include \/etc\/httpd\/conf\/extra\/php5_module.conf/d;
+ /^Include \/etc\/httpd\/conf\/extra\/httpd-zoneminder.conf/d;
+ /^Include conf\/extra\/httpd-default.conf/ s/$/\n\n# PHP 5\n\Include \/etc\/httpd\/conf\/extra\/php5_module.conf\n\n# ZoneMinder\nInclude \/etc\/httpd\/conf\/extra\/httpd-zoneminder.conf/;
+ ' /etc/httpd/conf/httpd.conf || read
cat << EOF
-Note:
+Note for mysql:
==> To run Zoneminder, you must install the database running mysql service (as root):
==> "rc.d start mysqld" (in initscripts) or "systemctl start mysqld.service" (in systemd)
-==> and add Zoneminder database typing:
+==> and add Zoneminder database typing (with passsword):
==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload"
==> "cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p"
==> "echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql"
+==> (or without passsword):
+==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -f reload"
+==> "cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf"
+==> "echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/my.cnf mysql"
-Note:
+Note for php:
==> You must uncomment that line in /etc/php/php.ini:
==> "extension=mysql.so"
==> check and make sure these are uncommented:
@@ -47,39 +102,59 @@ Note:
==> "extension=mysqli.so"
==> "extension=session.so"
==> "extension=sockets.so"
+==> "extension=openssl.so"
+==> "extension=ftp.so"
+==> "extension=zip.so"
+==> check and add to open_basedir "/etc" and
+==> "/srv/http/zoneminder" like so
+==> "open_basedir = /home:/tmp:/usr/share/pear:/etc:/srv/http/zoneminder"
+==> and set your timezone in php.ini:
+==> "date.timezone = <your_country>/<your_city>"
-==> You must edit /etc/php/php.ini and add to open_basedir "/etc" and
-==> "/usr/share/zoneminder" like so
-==> "open_basedir = /home:/tmp:/usr/share/pear:/etc:/usr/share/zoneminder/www"
-==> Otherwise ZoneMinder will be unable to read /etc/zm.conf
-==> or display its own web directory
-
-Note:
+Note for apache:
==> You must edit /etc/httpd/conf/httpd.conf and add the line:
==> "LoadModule php5_module modules/libphp5.so"
==> and:
==> "Include /etc/httpd/conf/extra/php5_module.conf"
-==> "Include /etc/httpd/conf/extra/httpd-zm.conf"
+==> "Include /etc/httpd/conf/extra/httpd-zoneminder.conf"
EOF
}
post_upgrade() {
+ post_install
/usr/bin/zmupdate.pl -f >/dev/null
}
post_remove() {
+ if [[ -d /tmp/zoneminder ]]; then
+ rm -vr /tmp/zoneminder
+ fi
+ sed -i -e '
+ /^open_basedir/ s/:\/srv\/http\/zoneminder//;
+ /^open_basedir/ s/:\/srv\/http\/zoneminder\///;
+ ' /etc/php/php.ini || read
+ sed -i -e '
+ /^# ZoneMinder/d;
+ /Include \/etc\/httpd\/conf\/extra\/httpd-zoneminder.conf/d;
+ ' /etc/httpd/conf/httpd.conf || read
cat << EOF
Note:
-==> To clean Zoneminder mysql database, run as root:
+==> To clean Zoneminder mysql database, run as root (with password):
==> "echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql"
==> "echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql"
==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f drop zm"
+==> (or without password):
+==> "echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf mysql"
+==> "echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/my.cnf mysql"
+==> "mysqladmin --defaults-file=/etc/mysql/my.cnf -f drop zm"
==> Disable http with php if it isn't needed with others servers,
==> comment or remove that lines in /etc/httpd/conf/httpd.conf:
==> "LoadModule php5_module modules/libphp5.so"
==> "Include /etc/httpd/conf/extra/php5_module.conf"
-==> "Include /etc/httpd/conf/extra/httpd-zm.conf"
+
+==> Remove line in /etc/httpd/conf/httpd.conf:
+==> "Include /etc/httpd/conf/extra/httpd-zoneminder.conf"
==> Disable php with mysql if it isn't needed with others servers,
==> comment that lines in /etc/php/php.ini:
@@ -90,8 +165,13 @@ Note:
==> "extension=mysqli.so"
==> "extension=session.so"
==> "extension=sockets.so"
+==> "date.timezone = <my_country>/<my_city>"
+
+==> Edit /etc/php/php.ini and remove "/etc" and "/srv/http/zoneminder"
+==> in the "open_basedir".
+
+==> Remove log files and "zonemider" directory in "/var/log/zoneminder".
-==> edit /etc/php/php.ini and remove "/etc" and "/usr/share/zoneminder/www"
-==> in the open_basedir.
+==> Backup and remove "events", "images" and "temp" dirs in "/var/cache/zoneminder".
EOF
}
diff --git a/pcr/zoneminder/zoneminder.service b/pcr/zoneminder/zoneminder.service
index ba41e8926..05cae6f91 100644
--- a/pcr/zoneminder/zoneminder.service
+++ b/pcr/zoneminder/zoneminder.service
@@ -5,7 +5,6 @@ Required=mysqld.service
[Service]
Type=forking
-PIDFile=/run/zm.pid
ExecStart=/usr/bin/zmpkg.pl start
ExecRestart=/usr/bin/zmpkg.pl restart
ExecStop=/usr/bin/zmpkg.pl stop
diff --git a/staging/emacs/PKGBUILD b/staging/emacs/PKGBUILD
new file mode 100644
index 000000000..3fa2f0677
--- /dev/null
+++ b/staging/emacs/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 169485 2012-10-22 00:40:50Z eric $
+# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
+# Contributor: Renchi Raju <renchi@green.tam.uiuc.edu>
+
+pkgname=emacs
+pkgver=24.2
+pkgrel=2
+pkgdesc="The extensible, customizable, self-documenting real-time display editor"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/emacs/emacs.html"
+license=('GPL3')
+depends=('librsvg' 'gpm' 'giflib' 'libxpm' 'libotf' 'm17n-lib' 'gtk3' 'hicolor-icon-theme' 'gconf' 'desktop-file-utils' 'alsa-lib' 'imagemagick')
+install=emacs.install
+source=(ftp://ftp.gnu.org/gnu/emacs/$pkgname-$pkgver.tar.bz2{,.sig})
+md5sums=('1676803a50e8adc817fdaaebb9234f14' 'ca1766337f419ef827dd96d1ff78f158')
+
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
+ --localstatedir=/var --with-x-toolkit=gtk3 --with-xft
+ make
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+
+ # remove conflict with ctags package
+ mv "$pkgdir"/usr/bin/{ctags,ctags.emacs}
+ mv "$pkgdir"/usr/share/man/man1/{ctags.1.gz,ctags.emacs.1}
+ # fix all the 777 perms on directories
+ find "$pkgdir"/usr/share/emacs/$_majorver -type d -exec chmod 755 {} \;
+ # fix user/root permissions on usr/share files
+ find "$pkgdir"/usr/share/emacs/$_majorver -exec chown root:root {} \;
+ # fix perms on /var/games
+ chmod 775 "$pkgdir"/var/games
+ chmod 775 "$pkgdir"/var/games/emacs
+ chmod 664 "$pkgdir"/var/games/emacs/*
+ chown -R root:games "$pkgdir"/var/games
+}
diff --git a/staging/emacs/emacs.install b/staging/emacs/emacs.install
new file mode 100644
index 000000000..d84f1de14
--- /dev/null
+++ b/staging/emacs/emacs.install
@@ -0,0 +1,32 @@
+ICON_PATH=usr/share/icons/hicolor
+INFO_DIR=usr/share/info
+
+INFO_FILES=(ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse
+ede ediff edt efaq eieio eintr elisp emacs emacs-mime epa erc eshell eudc flymake
+forms gnus idlwave info mairix-el message mh-e newsticker nxml-mode
+org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve smtpmail
+speedbar tramp url vip viper widget woman)
+
+post_install() {
+ gtk-update-icon-cache -q -t -f ${ICON_PATH}
+ update-desktop-database -q
+
+ [[ -x usr/bin/install-info ]] || return 0
+ for f in ${INFO_FILES[@]}; do
+ install-info ${INFO_DIR}/$f.gz ${INFO_DIR}/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ gtk-update-icon-cache -q -t -f ${ICON_PATH}
+ update-desktop-database -q
+
+ [[ -x usr/bin/install-info ]] || return 0
+ for f in ${INFO_FILES[@]}; do
+ install-info --delete ${INFO_DIR}/$f.gz ${INFO_DIR}/dir 2> /dev/null
+ done
+}
diff --git a/staging/gegl/gegl-0.2.0-ffmpeg-0.11.diff b/staging/gegl/gegl-0.2.0-ffmpeg-0.11.diff
new file mode 100644
index 000000000..a33ec6f7f
--- /dev/null
+++ b/staging/gegl/gegl-0.2.0-ffmpeg-0.11.diff
@@ -0,0 +1,12 @@
+diff -Naur gegl-0.2.0/operations/external/ff-load.c gegl-0.2.0-1/operations/external/ff-load.c
+--- gegl-0.2.0/operations/external/ff-load.c 2012-04-01 13:17:57.000000000 +0200
++++ gegl-0.2.0-1/operations/external/ff-load.c 2012-07-11 12:42:05.174756560 +0200
+@@ -271,7 +271,7 @@
+ gint err;
+
+ ff_cleanup (o);
+- err = av_open_input_file (&p->ic, o->path, NULL, 0, NULL);
++err = avformat_open_input (&p->ic, o->path, NULL, NULL);
+ if (err < 0)
+ {
+ print_error (o->path, err);
diff --git a/staging/obex-data-server/PKGBUILD b/staging/obex-data-server/PKGBUILD
new file mode 100644
index 000000000..32d465533
--- /dev/null
+++ b/staging/obex-data-server/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 169396 2012-10-20 10:00:06Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
+# Contributor: Roman Kyrylych <roman@archlinux.org>
+# Contributor: Keerthi <keerthi.linux@gmail.com>
+
+pkgname=obex-data-server
+pkgver=0.4.6
+pkgrel=3
+pkgdesc="A D-Bus service providing high-level OBEX client and server side functionality"
+arch=('i686' 'x86_64')
+url="http://wiki.muiline.com/obex-data-server"
+license=('GPL')
+depends=('dbus-glib' 'openobex' 'imagemagick')
+source=("http://tadas.dailyda.com/software/${pkgname}-${pkgver}.tar.gz")
+md5sums=('961ca5db6fe9c97024e133cc6203cc4d')
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/pstoedit/PKGBUILD b/staging/pstoedit/PKGBUILD
new file mode 100644
index 000000000..c8cfb6c43
--- /dev/null
+++ b/staging/pstoedit/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 169481 2012-10-21 23:53:55Z eric $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: damir <damir@archlinux.org>
+# Contributor: Tobias Powalowski <t.powa@gmx.de>
+
+pkgname=pstoedit
+pkgver=3.60
+pkgrel=3
+pkgdesc="Translates PostScript and PDF graphics into other vector formats"
+arch=('i686' 'x86_64')
+url="http://www.pstoedit.net/"
+license=('GPL')
+depends=('gcc-libs' 'plotutils' 'gd' 'imagemagick')
+makedepends=('ghostscript')
+options=('!libtool' '!makeflags')
+source=("http://downloads.sourceforge.net/sourceforge/pstoedit/pstoedit-${pkgver}.tar.gz"
+ 'pstoedit-3.50-parallel.patch' 'pstoedit-3.50-plugin-close.patch')
+sha1sums=('649ade3d873429548eb6dd9f3e13cb79a8d6a1a2'
+ '6e278b164d3e59fbb11e7fd5ae8ffb038932d69a'
+ '54bbe019de66eb4cb8525371462595d21fbd074e')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ sed -i 's/-pedantic//' configure
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/pstoedit/pstoedit-3.50-parallel.patch b/staging/pstoedit/pstoedit-3.50-parallel.patch
new file mode 100644
index 000000000..4f1f73b04
--- /dev/null
+++ b/staging/pstoedit/pstoedit-3.50-parallel.patch
@@ -0,0 +1,47 @@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index d6178df..66f377b 100755
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -86,6 +86,7 @@ libp2edrvstd_la_SOURCES= \
+ $(sample_drivers_src)
+ libp2edrvstd_la_LIBADD=-L. libpstoedit.la
+ libp2edrvstd_la_LDFLAGS=-no-undefined -module
++libp2edrvstd_la_DEPENDENCIES = libpstoedit.la
+
+ #libp2edrvplugins_la_SOURCES=drvmif.cpp drvcgm.cpp drvrtf.cpp drvwwmf.cpp
+ #libp2edrvplugins_la_LIBADD=
+@@ -95,15 +96,18 @@ libp2edrvstd_la_LDFLAGS=-no-undefined -module
+ libp2edrvlplot_la_SOURCES=drvlplot.cpp drvlplot.h initlibrary.cpp
+ libp2edrvlplot_la_LIBADD=$(LIBPLOTTER_LDFLAGS) -L. libpstoedit.la
+ libp2edrvlplot_la_LDFLAGS=-no-undefined -module
++libp2edrvlplot_la_DEPENDENCIES = libpstoedit.la
+
+ libp2edrvswf_la_SOURCES=drvswf.cpp drvswf.h initlibrary.cpp
+ libp2edrvswf_la_LIBADD=$(LIBMING_LDFLAGS) -L. libpstoedit.la
+ libp2edrvswf_la_LDFLAGS=-no-undefined -module
++libp2edrvswf_la_DEPENDENCIES = libpstoedit.la
+
+ # note the __ stand for ++ - automake treats all no alphanums chars as _
+ libp2edrvmagick___la_SOURCES=drvmagick++.cpp drvmagick++.h initlibrary.cpp
+ libp2edrvmagick___la_LIBADD=-L. libpstoedit.la
+ libp2edrvmagick___la_LDFLAGS=-no-undefined ${LIBMAGICK_LDFLAGS} -module
++libp2edrvmagick___la_DEPENDENCIES = libpstoedit.la
+ # moved to configure.ac because needed only for g++ libp2edrvmagick___la_CPPFLAGS=$(LIBMAGICK_CFLAGS) $(AM_CPPFLAGS) -Wno-long-long
+
+ if USE_EMFBYSOURCE
+@@ -113,6 +117,7 @@ else
+ libp2edrvwmf_la_SOURCES=drvwmf.cpp drvwmf.h initlibrary.cpp
+ libp2edrvwmf_la_LDFLAGS=-no-undefined $(LIBEMF_LDFLAGS) -L. libpstoedit.la -module
+ endif
++libp2edrvwmf_la_DEPENDENCIES = libpstoedit.la
+
+ libpstoedit_la_SOURCES = \
+ dynload.cpp dynload.h \
+@@ -135,6 +140,7 @@ libpstoedit_la_LDFLAGS = -no-undefined
+
+ pstoedit_SOURCES = cmdmain.cpp
+ pstoedit_LDFLAGS = -no-undefined -L. libpstoedit.la ${LIBLD_LDFLAGS}
++pstoedit_DEPENDENCIES = libpstoedit.la
+
+ pkginclude_HEADERS = \
+ pstoedit.h \
diff --git a/staging/pstoedit/pstoedit-3.50-plugin-close.patch b/staging/pstoedit/pstoedit-3.50-plugin-close.patch
new file mode 100644
index 000000000..6787d6aef
--- /dev/null
+++ b/staging/pstoedit/pstoedit-3.50-plugin-close.patch
@@ -0,0 +1,14 @@
+http://bugzilla.redhat.com/507035
+
+diff --git a/src/dynload.cpp b/src/dynload.cpp
+index c0db355..7c073ef 100644
+--- a/src/dynload.cpp
++++ b/src/dynload.cpp
+@@ -147,7 +147,6 @@ void DynLoader::close()
+
+ DynLoader::~DynLoader()
+ {
+- close();
+ libname=0;
+ }
+
diff --git a/testing/btrfs-progs/btrfs-progs.install b/testing/btrfs-progs/btrfs-progs.install
new file mode 100644
index 000000000..d6c0698a0
--- /dev/null
+++ b/testing/btrfs-progs/btrfs-progs.install
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+post_upgrade() {
+ if [ "$(vercmp 0.19.20121005 "$2")" -eq 1 ]; then
+ echo "btrfs multi-device support now relies on linux 3.6 or later"
+ fi
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/kmod/0001-depmod-fix-parsing-of-modules.order-with-compressed-.patch b/testing/kmod/0001-depmod-fix-parsing-of-modules.order-with-compressed-.patch
new file mode 100644
index 000000000..8c4ecf83c
--- /dev/null
+++ b/testing/kmod/0001-depmod-fix-parsing-of-modules.order-with-compressed-.patch
@@ -0,0 +1,165 @@
+From 88c247f7f18ac25181ddcaff97fbbecbd3a29f57 Mon Sep 17 00:00:00 2001
+From: Lucas De Marchi <lucas.de.marchi@gmail.com>
+Date: Wed, 3 Oct 2012 16:28:24 -0300
+Subject: [PATCH] depmod: fix parsing of modules.order with compressed modules
+
+We now index the modules by uncompressed-relative-path instead of
+relative-path. This is because the file modules.order, coming from
+kernel, always comes with uncompressed paths. This fixes the issue of
+not sorting the aliases correctly due to paths not matching when using
+compressed modules.
+---
+ tools/depmod.c | 46 +++++++++++++++++++++++++++++-----------------
+ 1 file changed, 29 insertions(+), 17 deletions(-)
+
+diff --git a/tools/depmod.c b/tools/depmod.c
+index 0bf2dea..ff19d6e 100644
+--- a/tools/depmod.c
++++ b/tools/depmod.c
+@@ -39,6 +39,8 @@
+ #define DEFAULT_VERBOSE LOG_WARNING
+ static int verbose = DEFAULT_VERBOSE;
+
++#define KMOD_EXT_UNC 0
++
+ static const struct kmod_ext {
+ const char *ext;
+ size_t len;
+@@ -1001,6 +1003,7 @@ struct mod {
+ uint16_t idx; /* index in depmod->modules.array */
+ uint16_t users; /* how many modules depend on this one */
+ uint8_t dep_loop : 1;
++ char *uncrelpath; /* same as relpath but ending in .ko */
+ char modname[];
+ };
+
+@@ -1014,7 +1017,7 @@ struct depmod {
+ const struct cfg *cfg;
+ struct kmod_ctx *ctx;
+ struct array modules;
+- struct hash *modules_by_relpath;
++ struct hash *modules_by_uncrelpath;
+ struct hash *modules_by_name;
+ struct hash *symbols;
+ unsigned int dep_loops;
+@@ -1025,6 +1028,7 @@ static void mod_free(struct mod *mod)
+ DBG("free %p kmod=%p, path=%s\n", mod, mod->kmod, mod->path);
+ array_free_array(&mod->deps);
+ kmod_module_unref(mod->kmod);
++ free(mod->uncrelpath);
+ free(mod);
+ }
+
+@@ -1066,10 +1070,10 @@ static int depmod_init(struct depmod *depmod, struct cfg *cfg,
+
+ array_init(&depmod->modules, 128);
+
+- depmod->modules_by_relpath = hash_new(512, NULL);
+- if (depmod->modules_by_relpath == NULL) {
++ depmod->modules_by_uncrelpath = hash_new(512, NULL);
++ if (depmod->modules_by_uncrelpath == NULL) {
+ err = -errno;
+- goto modules_by_relpath_failed;
++ goto modules_by_uncrelpath_failed;
+ }
+
+ depmod->modules_by_name = hash_new(512, NULL);
+@@ -1089,8 +1093,8 @@ static int depmod_init(struct depmod *depmod, struct cfg *cfg,
+ symbols_failed:
+ hash_free(depmod->modules_by_name);
+ modules_by_name_failed:
+- hash_free(depmod->modules_by_relpath);
+-modules_by_relpath_failed:
++ hash_free(depmod->modules_by_uncrelpath);
++modules_by_uncrelpath_failed:
+ return err;
+ }
+
+@@ -1100,7 +1104,7 @@ static void depmod_shutdown(struct depmod *depmod)
+
+ hash_free(depmod->symbols);
+
+- hash_free(depmod->modules_by_relpath);
++ hash_free(depmod->modules_by_uncrelpath);
+
+ hash_free(depmod->modules_by_name);
+
+@@ -1114,7 +1118,7 @@ static void depmod_shutdown(struct depmod *depmod)
+ static int depmod_module_add(struct depmod *depmod, struct kmod_module *kmod)
+ {
+ const struct cfg *cfg = depmod->cfg;
+- const char *modname;
++ const char *modname, *lastslash;
+ size_t modnamelen;
+ struct mod *mod;
+ int err;
+@@ -1134,7 +1138,8 @@ static int depmod_module_add(struct depmod *depmod, struct kmod_module *kmod)
+ array_init(&mod->deps, 4);
+
+ mod->path = kmod_module_get_path(kmod);
+- mod->baselen = strrchr(mod->path, '/') - mod->path;
++ lastslash = strrchr(mod->path, '/');
++ mod->baselen = lastslash - mod->path;
+ if (strncmp(mod->path, cfg->dirname, cfg->dirnamelen) == 0 &&
+ mod->path[cfg->dirnamelen] == '/')
+ mod->relpath = mod->path + cfg->dirnamelen + 1;
+@@ -1144,25 +1149,32 @@ static int depmod_module_add(struct depmod *depmod, struct kmod_module *kmod)
+ err = hash_add_unique(depmod->modules_by_name, mod->modname, mod);
+ if (err < 0) {
+ ERR("hash_add_unique %s: %s\n", mod->modname, strerror(-err));
+- free(mod);
+- return err;
++ goto fail;
+ }
+
+ if (mod->relpath != NULL) {
+- err = hash_add_unique(depmod->modules_by_relpath,
+- mod->relpath, mod);
++ size_t uncrelpathlen = lastslash - mod->relpath + modnamelen
++ + kmod_exts[KMOD_EXT_UNC].len;
++ mod->uncrelpath = memdup(mod->relpath, uncrelpathlen + 1);
++ mod->uncrelpath[uncrelpathlen] = '\0';
++ err = hash_add_unique(depmod->modules_by_uncrelpath,
++ mod->uncrelpath, mod);
+ if (err < 0) {
+ ERR("hash_add_unique %s: %s\n",
+ mod->relpath, strerror(-err));
+ hash_del(depmod->modules_by_name, mod->modname);
+- free(mod);
+- return err;
++ goto fail;
+ }
+ }
+
+ DBG("add %p kmod=%p, path=%s\n", mod, kmod, mod->path);
+
+ return 0;
++
++fail:
++ free(mod->uncrelpath);
++ free(mod);
++ return err;
+ }
+
+ static int depmod_module_del(struct depmod *depmod, struct mod *mod)
+@@ -1170,7 +1182,7 @@ static int depmod_module_del(struct depmod *depmod, struct mod *mod)
+ DBG("del %p kmod=%p, path=%s\n", mod, mod->kmod, mod->path);
+
+ if (mod->relpath != NULL)
+- hash_del(depmod->modules_by_relpath, mod->relpath);
++ hash_del(depmod->modules_by_uncrelpath, mod->relpath);
+
+ hash_del(depmod->modules_by_name, mod->modname);
+
+@@ -1472,7 +1484,7 @@ static void depmod_modules_sort(struct depmod *depmod)
+ continue;
+ line[len - 1] = '\0';
+
+- mod = hash_find(depmod->modules_by_relpath, line);
++ mod = hash_find(depmod->modules_by_uncrelpath, line);
+ if (mod == NULL)
+ continue;
+ mod->sort_idx = idx - total;
+--
+1.7.12.4
+
diff --git a/testing/kmod/0001-libkmod-Add-support-for-.-in-module-parameter-on-kcm.patch b/testing/kmod/0001-libkmod-Add-support-for-.-in-module-parameter-on-kcm.patch
new file mode 100644
index 000000000..4ef3d2775
--- /dev/null
+++ b/testing/kmod/0001-libkmod-Add-support-for-.-in-module-parameter-on-kcm.patch
@@ -0,0 +1,33 @@
+From 66f3228d17d66d7e2dd484427259290fbc82b2f0 Mon Sep 17 00:00:00 2001
+From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
+Date: Mon, 8 Oct 2012 19:04:16 -0300
+Subject: [PATCH] libkmod: Add support for '.' in module parameter on kcmdline
+
+Otherwise we fail to parse arguments in kernel command line like
+testmodule.testparam=1.5G
+
+Suggested-by: Selim T. Erdogan <selim@alumni.cs.utexas.edu>
+---
+ libkmod/libkmod-config.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
+index 70044f0..398468e 100644
+--- a/libkmod/libkmod-config.c
++++ b/libkmod/libkmod-config.c
+@@ -567,8 +567,10 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config)
+ modname = p + 1;
+ break;
+ case '.':
+- *p = '\0';
+- param = p + 1;
++ if (param == NULL) {
++ *p = '\0';
++ param = p + 1;
++ }
+ break;
+ case '=':
+ if (param != NULL)
+--
+1.7.12.4
+
diff --git a/testing/usermin/PKGBUILD b/testing/usermin/PKGBUILD
new file mode 100644
index 000000000..6e5eb6289
--- /dev/null
+++ b/testing/usermin/PKGBUILD
@@ -0,0 +1,134 @@
+# $Id: PKGBUILD 169457 2012-10-21 13:56:26Z tomegun $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+pkgname=usermin
+pkgver=1.520
+pkgrel=2
+pkgdesc="a web interface that can be used to easily perform tasks like reading mail, setting up SSH or configuring mail forwarding"
+arch=(i686 x86_64)
+license=('custom:usermin')
+url="http://www.webmin.com/"
+depends=('perl' 'webmin')
+makedepends=('perl-net-ssleay')
+backup=('etc/usermin/miniserv.conf' 'etc/usermin/miniserv.users' 'etc/usermin/config' 'etc/usermin/usermin.cats' \
+'etc/usermin/at/config' \
+'etc/usermin/man/config' \
+'etc/usermin/ssh/config' \
+'etc/usermin/chfn/config' \
+'etc/usermin/cron/config' \
+'etc/usermin/file/config' \
+'etc/usermin/plan/config' \
+'etc/usermin/proc/config' \
+'etc/usermin/spam/config' \
+'etc/usermin/htaccess/config' \
+'etc/usermin/cshrc/config' \
+'etc/usermin/gnupg/config' \
+'etc/usermin/mysql/config' \
+'etc/usermin/quota/config' \
+'etc/usermin/shell/config' \
+'etc/usermin/theme/config' \
+'etc/usermin/mailbox/config' \
+'etc/usermin/schedule/config' \
+'etc/usermin/config' \
+'etc/usermin/commands/config' \
+'etc/usermin/htaccess-htpasswd/config' \
+'etc/usermin/forward/config' \
+'etc/usermin/telnet/config' \
+'etc/usermin/tunnel/config' \
+'etc/usermin/updown/config' \
+'etc/usermin/procmail/config' \
+'etc/usermin/fetchmail/config' \
+'etc/usermin/changepass/config' \
+'etc/usermin/language/config' \
+'etc/usermin/postgresql/config' \
+'etc/usermin/usermount/config' \
+)
+install=usermin.install
+source=(http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz
+ usermin.rc
+ usermin.service
+ ftp://ftp.archlinux.org/other/usermin/usermin-config.tar.bz2)
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+
+ # remove modules we do not support
+
+ #remove config files from other distros
+ rm -f $(find . ! -name 'config-generic-linux' ! -name 'config-\*-linux' ! -name 'config-lib.pl' -name 'config-*')
+
+ # remove caldera theme
+ rm -rf caldera
+
+ # remove init-scripts from other distros
+ rm usermin-init
+ rm usermin-daemon
+
+ # setting perl path
+ (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl -
+
+ # create dirs
+ mkdir -p $startdir/pkg/opt/usermin
+ mkdir -p $startdir/pkg/var/log/usermin
+ mkdir -p $startdir/pkg/etc/usermin
+
+ # install pam stuff
+ install -D -m 644 usermin-pam $startdir/pkg/etc/pam.d/usermin
+
+ # remove other distros and add only Archlinux don't change next line else it will not work!
+ rm os_list.txt
+ echo 'Archlinux Any version generic-linux * -d "/etc/pacman.d"' >> os_list.txt
+
+ # copy stuff to right dirs
+ cd $startdir/src/$pkgname-$pkgver
+ cp -rp * $startdir/pkg/opt/usermin
+ cd $startdir/src/usermin-config
+ cp -rfp * $startdir/pkg/opt/usermin
+
+ # define parameters for setup.sh
+ config_dir=$startdir/pkg/etc/usermin
+ var_dir=$startdir/pkg/var/log/usermin
+ perl=/usr/bin/perl
+ autoos=1
+ port=20000
+ login=root
+ crypt="XXX"
+ ssl=1
+ atboot=0
+ nostart=1
+ nochown=1
+ autothird=1
+ nouninstall=1
+ noperlpath=1
+ atbootyn=n
+ tempdir=$startdir/pkg/tmp
+ export config_dir var_dir perl autoos port tempdir ssl nochown autothird nouninstall nostart noperlpath atbootyn login crypt
+
+ # Fix setup.sh
+ sed -i -e 's:read atbootyn::g' -e 's:exit 13::g' $startdir/pkg/opt/usermin/setup.sh
+ $startdir/pkg/opt/usermin/setup.sh
+
+ # Fixup the config files to use their real locations
+ sed -i 's:^pidfile=.*$:pidfile=/var/run/usermin.pid:' $startdir/pkg/etc/usermin/miniserv.conf
+ find $startdir/pkg/etc/usermin -type f -exec sed -i "s:$startdir/pkg::g" {} \;
+
+ # make it only accessible by localhost
+ echo 'allow=127.0.0.1' >> $startdir/pkg/etc/usermin/miniserv.conf
+
+ # enable user and password login
+ sed -i -e '/localauth/d' $startdir/pkg/etc/usermin/miniserv.conf
+
+ #install systemd service file
+ install -D -m 644 $startdir/src/usermin.service $startdir/pkg/usr/lib/systemd/system/usermin.service
+
+ #install rc file
+ install -D -m 755 $startdir/src/usermin.rc $startdir/pkg/etc/rc.d/usermin
+
+ # delete temp dir
+ rm -r $startdir/pkg/tmp
+ #install license
+ install -m 644 -D $startdir/src/$pkgname-$pkgver/LICENCE $startdir/pkg/usr/share/licenses/usermin/LICENCE
+}
+md5sums=('5819ba87796d9373a92116e90d1a35d4'
+ 'cfef4490cd1ef9517c0b39a7bd75c968'
+ 'a5bd5e5ee779f8a3cf3d776ca77ee36e'
+ 'ec37a79f948f778224550930d2a7ca07')
diff --git a/testing/usermin/usermin-config.tar.bz2 b/testing/usermin/usermin-config.tar.bz2
new file mode 100644
index 000000000..056bb6298
--- /dev/null
+++ b/testing/usermin/usermin-config.tar.bz2
Binary files differ
diff --git a/testing/usermin/usermin.install b/testing/usermin/usermin.install
new file mode 100644
index 000000000..3ace10ea2
--- /dev/null
+++ b/testing/usermin/usermin.install
@@ -0,0 +1,34 @@
+# arg 1: the new package version
+post_install() {
+ local crypt=$(grep "^root:" ${ROOT}/etc/shadow | cut -f 2 -d :)
+ crypt=${crypt//\\/\\\\}
+ crypt=${crypt//\//\\\/}
+ sed -i "s/root:XXX/root:${crypt}/" /etc/usermin/miniserv.users
+cat << EOF
+Note:
+==> It is not allowed to install 3rd party modules, or delete existing modules.
+==> Please write your own PKGBUILDS for 3rd party modules and additional themes.
+Setup:
+==> To make usermin start at boot time, add usermin to rc.conf daemons
+==> Point your web browser to http://localhost:20000 to use usermin.
+==> To change the modules setup please use webmin.
+
+==> The access is restricted to localhost, if you want to connect from other locations
+==> change /etc/usermin/miniserv.conf to something like that: allow=127.0.0.1 <your-ip>
+==> If you want to have ssl encryption please install 'perl-net-ssleay' additional.
+EOF
+# fix man module
+ cd /opt/usermin/man
+ gzip -df $(find . -name '*.gz')
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ # uninstall unzipped files
+ rm -r /opt/usermin/man
+}
diff --git a/testing/usermin/usermin.rc b/testing/usermin/usermin.rc
new file mode 100644
index 000000000..af365780a
--- /dev/null
+++ b/testing/usermin/usermin.rc
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+start=/etc/usermin/start
+stop=/etc/usermin/stop
+lockfile=/var/lock/usermin
+
+case "$1" in
+'start')
+ stat_busy "Starting Usermin daemon"
+ $start >/dev/null 2>&1 </dev/null
+ RETVAL=$?
+ if [ "$RETVAL" = "0" ]; then
+ touch $lockfile >/dev/null 2>&1
+ stat_done
+ else
+ stat_fail
+fi
+;;
+
+'stop')
+ stat_busy "Stopping Usermin daemon"
+ $stop >/dev/null 2>&1 </dev/null
+ RETVAL=$?
+ if [ "$RETVAL" = "0" ]; then
+ rm -f $lockfile
+ stat_done
+ else
+ stat_fail
+fi
+;;
+
+'restart')
+ $stop && $start
+ RETVAL=$?
+;;
+*)
+echo "Usage: $0 { start | stop | restart }"
+RETVAL=1
+;;
+esac
+exit $RETVAL \ No newline at end of file
diff --git a/testing/usermin/usermin.service b/testing/usermin/usermin.service
new file mode 100644
index 000000000..e91164c63
--- /dev/null
+++ b/testing/usermin/usermin.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Usermin
+
+[Service]
+Type=forking
+ExecStart=/opt/usermin/miniserv.pl /etc/usermin/miniserv.conf
+
+[Install]
+WantedBy=multi-user.target