diff options
author | root <root@rshg054.dnsready.net> | 2012-05-12 00:02:41 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-05-12 00:02:41 +0000 |
commit | e1da03cf5ba92abee0e3afd9dc4cef438ebf96c7 (patch) | |
tree | 233b060ecee707d77b6c0d3d91de90eb4beed13e | |
parent | 2ced64d6aa5881fa575de1861c464c432deee26f (diff) |
Sat May 12 00:02:41 UTC 2012
41 files changed, 3239 insertions, 48 deletions
diff --git a/community/go/PKGBUILD b/community/go/PKGBUILD index 4be7ea328..79fba706b 100644 --- a/community/go/PKGBUILD +++ b/community/go/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 70381 2012-05-05 13:14:13Z arodseth $ +# $Id: PKGBUILD 70517 2012-05-10 12:42:42Z arodseth $ # Maintainer: Vesa Kaihlavirta <vegai@iki.fi> # Maintainer: Alexander Rødseth <rodseth@gmail.com> # Contributor: Andres Perera <andres87p gmail> @@ -9,13 +9,13 @@ pkgname=go pkgver=1.0.1 -pkgrel=1 +pkgrel=2 epoch=2 pkgdesc='Google Go compiler and tools (release version)' arch=('x86_64' 'i686') url="http://golang.org/" license=('custom') -depends=('perl' 'ed' 'gawk') +depends=('perl' 'gawk') makedepends=('inetutils') options=('!strip' '!emptydirs') install=go.install @@ -38,7 +38,7 @@ build() { mkdir -p "$GOROOT/bin" cd "$GOROOT/src" - . ./make.bash + . ./all.bash } package() { @@ -89,6 +89,8 @@ package() { mv "$pkgdir/usr/bin/go" "$pkgdir/usr/bin/go.elf" install -Dm755 "$srcdir/go.run" "$pkgdir/usr/bin/go" + + rm "$pkgdir/usr/share/go/doc/articles/wiki/get.bin" } # vim:set ts=2 sw=2 et: diff --git a/community/ipset/PKGBUILD b/community/ipset/PKGBUILD index ac95e6229..d0c6fa250 100644 --- a/community/ipset/PKGBUILD +++ b/community/ipset/PKGBUILD @@ -1,17 +1,26 @@ -# $Id: PKGBUILD 62118 2012-01-16 09:00:54Z seblu $ +# $Id: PKGBUILD 70535 2012-05-10 18:29:26Z seblu $ # Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org> pkgname=ipset -pkgver=6.11 +pkgver=6.12 pkgrel=1 pkgdesc='Administration tool for IP sets' arch=('i686' 'x86_64') url='http://ipset.netfilter.org' license=('GPL2') depends=('libmnl') -makedepends=('linux-headers') -source=("http://ipset.netfilter.org/$pkgname-$pkgver.tar.bz2") -md5sums=('bfcc92e30a0fcf10ae6e7c4affa03c84') +backup=('etc/ipset.conf' "etc/conf.d/$pkgname") +options=('!libtool') +source=("http://ipset.netfilter.org/$pkgname-$pkgver.tar.bz2" + "$pkgname.conf" + "$pkgname.rc" + "$pkgname.systemd" + "$pkgname.service") +md5sums=('ad59bc6da6778aa7c6515d0ed6147440' + '61963bda45c002fb37977e58bb5b829c' + '888bf1eadffcc076b9e97de02e2147c8' + 'c5f38e5f3027066c1491a563e734796e' + 'b9ff3bd7b959cb1b97b8c492b52b8377') build() { cd $pkgname-$pkgver @@ -22,6 +31,20 @@ build() { package() { cd $pkgname-$pkgver make DESTDIR="$pkgdir" install + # install doc + install -dm755 "$pkgdir/usr/share/doc/$pkgname" + install -m644 README UPGRADE ChangeLog "$pkgdir/usr/share/doc/$pkgname" + # install initscripts + cd .. + install -Dm 755 $pkgname.rc "$pkgdir/etc/rc.d/$pkgname" + install -Dm 644 $pkgname.conf "$pkgdir/etc/conf.d/$pkgname" + # install systemd service + install -Dm 755 $pkgname.systemd \ + "$pkgdir/usr/lib/systemd/scripts/$pkgname" + install -Dm 644 $pkgname.service \ + "$pkgdir/usr/lib/systemd/system/$pkgname.service" + # default config file + install -Dm 644 /dev/null "$pkgdir/etc/$pkgname.conf" } # vim:set ts=2 sw=2 ft=sh et: diff --git a/community/ipset/ipset.conf b/community/ipset/ipset.conf new file mode 100644 index 000000000..686931f4c --- /dev/null +++ b/community/ipset/ipset.conf @@ -0,0 +1,3 @@ +# vim:set ts=2 sw=2 ft=sh et: + +IPSET_CONF='/etc/ipset.conf' diff --git a/community/ipset/ipset.rc b/community/ipset/ipset.rc new file mode 100644 index 000000000..1d5f7df8b --- /dev/null +++ b/community/ipset/ipset.rc @@ -0,0 +1,39 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/ipset + +case "$1" in + start) + stat_busy 'Loading IP Sets' + if [[ -f $IPSET_CONF ]] && ipset restore < "$IPSET_CONF"; then + add_daemon ipset + stat_done + else + stat_fail + fi + ;; + stop) + status 'Clearing IP Sets' ipset destroy + rm_daemon ipset + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + save) + stat_busy 'Saving IP Sets' + if ipset save > "$IPSET_CONF" 2>/dev/null; then + stat_done + else + stat_fail + fi + ;; + *) + echo "usage: ${0##*/} {start|stop|restart|save}" +esac +exit 0 + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community/ipset/ipset.service b/community/ipset/ipset.service new file mode 100644 index 000000000..0e0dd4ff7 --- /dev/null +++ b/community/ipset/ipset.service @@ -0,0 +1,12 @@ +[Unit] +Description=IP Sets + +[Service] +Type=oneshot +ExecStart=/usr/lib/systemd/scripts/ipset start +ExecStop=/usr/sbin/ipset destroy +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target +Before=iptables.service diff --git a/community/ipset/ipset.systemd b/community/ipset/ipset.systemd new file mode 100644 index 000000000..36df5124a --- /dev/null +++ b/community/ipset/ipset.systemd @@ -0,0 +1,8 @@ +#!/bin/bash + +. /etc/conf.d/ipset + +[[ -f $IPSET_CONF ]] || exit 1 +ipset restore < "$IPSET_CONF" + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community/myodbc/PKGBUILD b/community/myodbc/PKGBUILD index 76c3667a8..f7431306e 100644 --- a/community/myodbc/PKGBUILD +++ b/community/myodbc/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 70209 2012-05-02 12:44:37Z spupykin $ +# $Id: PKGBUILD 70531 2012-05-10 15:58:32Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> pkgname=myodbc pkgver=5.1.11 -pkgrel=1 +pkgrel=2 pkgdesc="ODBC driver/connector for MySQL" arch=(i686 x86_64) url="http://dev.mysql.com/downloads/connector/odbc/" @@ -18,6 +18,13 @@ md5sums=('1d868f404038bbce6623a28255c8a9f7' build() { cd $srcdir/mysql-connector-odbc-${pkgver}-src cp $srcdir/myconf.h.in driver/myconf.h.in + patch driver/Makefile.am <<EOF +55c55,56 +< driver.h +--- +> driver.h \\ +> my_stmt.c +EOF [ -x configure ] || { aclocal; libtoolize; automake --add-missing; autoreconf; } [ -f Makefile ] || CFLAGS="$CFLAGS -DTHREAD" \ ./configure --prefix=/usr --sysconfdir=/etc --with-unixODBC=/usr --with-odbc-ini=/etc/odbc.ini \ diff --git a/community/onboard/PKGBUILD b/community/onboard/PKGBUILD new file mode 100644 index 000000000..8476b2c16 --- /dev/null +++ b/community/onboard/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Balló György <ballogyor+arch at gmail dot com> + +pkgname=onboard +pkgver=0.97.0 +pkgrel=2 +pkgdesc="On-screen keyboard useful on tablet PCs or for mobility impaired users" +arch=('i686' 'x86_64') +url="https://launchpad.net/onboard" +license=('GPL') +depends=('python2-cairo' 'dbus-python' 'python2-gobject' 'libwnck3' 'python2-virtkey' 'desktop-file-utils' 'dconf' 'hicolor-icon-theme' 'xdg-utils') +makedepends=('python-distutils-extra') +optdepends=('at-spi2-atk: auto-show when editing text' + 'mousetweaks: hover click with mouse') +options=('!emptydirs') +install=$pkgname.install +source=(http://launchpad.net/$pkgname/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.gz + fix_unicode_translations.patch + fix_encoding_mismatch.patch) +md5sums=('258bf6653a840c54ce1b4898d31fb775' + '73d71d019dc27e6ac8d479ab3dd0ab21' + '8c7f6f31547e1454725ded8090cbdc41') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # https://bugs.launchpad.net/onboard/+bug/933030 + patch -Np0 -i "$srcdir/fix_unicode_translations.patch" + + # https://bugs.launchpad.net/onboard/+bug/958385 + patch -Np1 -i "$srcdir/fix_encoding_mismatch.patch" + + sed -i 's/\"python\"/\"python2\"/g' scripts/sokSettings.py + + python2 setup.py install --root=$pkgdir/ --optimize=1 +} + +package() { + cd "$pkgdir" + + find . -type f -name *.py | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@' +} diff --git a/community/onboard/fix_encoding_mismatch.patch b/community/onboard/fix_encoding_mismatch.patch new file mode 100644 index 000000000..01750598c --- /dev/null +++ b/community/onboard/fix_encoding_mismatch.patch @@ -0,0 +1,187 @@ +Subject: Fix string encodings so as to not have a mismatch without mousetweaks +Author: marmuta +Origin: upstream, http://bazaar.launchpad.net/~onboard/onboard/0.91/revision/764 +Bug-Ubuntu: https://bugs.launchpad.net/bugs/958385 + +--- + Onboard/Config.py | 9 +++++---- + Onboard/ConfigUtils.py | 9 ++++++--- + Onboard/Exceptions.py | 5 +++-- + Onboard/OnboardGtk.py | 5 +++-- + Onboard/settings.py | 7 ++++--- + Onboard/utils.py | 16 ++++++++++++++++ + 6 files changed, 37 insertions(+), 14 deletions(-) + +Index: onboard-0.97.0/Onboard/Config.py +=================================================================== +--- onboard-0.97.0.orig/Onboard/Config.py ++++ onboard-0.97.0/Onboard/Config.py +@@ -12,7 +12,7 @@ + + from gi.repository import GLib, Gtk + +-from Onboard.utils import show_confirmation_dialog, Version ++from Onboard.utils import show_confirmation_dialog, Version, unicode_str + from Onboard.WindowUtils import Handle + from Onboard.ConfigUtils import ConfigObject + from Onboard.MouseControl import Mousetweaks, ClickMapper +@@ -209,7 +209,7 @@ + try: + ConfigObject.__init__(self) + except SchemaError as e: +- _logger.error(str(e)) ++ _logger.error(unicode_str(e)) + sys.exit() + + # init paths +@@ -225,7 +225,8 @@ + try: + copytree(old_user_dir, user_dir) + except OSError as ex: # python >2.5 +- _logger.error(_("Failed to migrate user directory. ") + str(ex)) ++ _logger.error(_("Failed to migrate user directory. ") + \ ++ unicode_str(ex)) + + # Load system defaults (if there are any, not required). + # Used for distribution specific settings, aka branding. +@@ -347,7 +348,7 @@ + self.mousetweaks = Mousetweaks() + self.children.append(self.mousetweaks) + except (SchemaError, ImportError) as e: +- _logger.warning(str(e)) ++ _logger.warning(unicode_str(e)) + self.mousetweaks = None + + self.clickmapper = ClickMapper() +Index: onboard-0.97.0/Onboard/ConfigUtils.py +=================================================================== +--- onboard-0.97.0.orig/Onboard/ConfigUtils.py ++++ onboard-0.97.0/Onboard/ConfigUtils.py +@@ -22,7 +22,8 @@ + from gi.repository import Gio + + from Onboard.Exceptions import SchemaError +-from Onboard.utils import pack_name_value_list, unpack_name_value_list ++from Onboard.utils import pack_name_value_list, unpack_name_value_list, \ ++ unicode_str + + _CAN_SET_HOOK = "_can_set_" # return true if value is valid + _GSETTINGS_GET_HOOK = "_gsettings_get_" # retrieve from gsettings +@@ -388,7 +389,8 @@ + try: + filename = parser.read(paths) + except configparser.ParsingError as ex: +- _logger.error(_("Failed to read system defaults. " + str(ex))) ++ _logger.error(_("Failed to read system defaults. " + \ ++ unicode_str(ex))) + + if not filename: + _logger.info(_("No system defaults found.")) +@@ -501,7 +503,8 @@ + value = self.settings[self.key] + + except KeyError as ex: +- _logger.error(_("Failed to get gsettings value. ") + str(ex)) ++ _logger.error(_("Failed to get gsettings value. ") + \ ++ unicode_str(ex)) + + return value + +Index: onboard-0.97.0/Onboard/Exceptions.py +=================================================================== +--- onboard-0.97.0.orig/Onboard/Exceptions.py ++++ onboard-0.97.0/Onboard/Exceptions.py +@@ -4,6 +4,7 @@ + + from traceback import format_tb + import sys ++from Onboard.utils import unicode_str + + class ChainableError(Exception): + """ +@@ -40,10 +41,10 @@ + traceback = property(_get_traceback) + + def __str__(self): +- message = self._message + "\n" ++ message = unicode_str(self._message) + "\n" + if self.chained_exception: + message += "%s: %s" % (type(self.chained_exception).__name__, +- str(self.chained_exception)) ++ unicode_str(self.chained_exception)) + return message + + class SVGSyntaxError(ChainableError): +Index: onboard-0.97.0/Onboard/OnboardGtk.py +=================================================================== +--- onboard-0.97.0.orig/Onboard/OnboardGtk.py ++++ onboard-0.97.0/Onboard/OnboardGtk.py +@@ -26,7 +26,8 @@ + from Onboard.KeyGtk import * + from Onboard.KbdWindow import KbdWindow, KbdPlugWindow + from Onboard.KeyboardSVG import KeyboardSVG +-from Onboard.utils import show_confirmation_dialog, CallOnce, timeit ++from Onboard.utils import show_confirmation_dialog, CallOnce, timeit, \ ++ unicode_str + from Onboard.Appearance import Theme + + ### Config Singleton ### +@@ -485,7 +486,7 @@ + except virtkey.error as e: + t = time.time() + if t > self._vk_error_time + .2: # rate limit to once per 200ms +- _logger.warning("vk: "+str(e)) ++ _logger.warning("vk: " + unicode_str(e)) + self._vk_error_time = t + + return self._vk +Index: onboard-0.97.0/Onboard/settings.py +=================================================================== +--- onboard-0.97.0.orig/Onboard/settings.py ++++ onboard-0.97.0/Onboard/settings.py +@@ -24,7 +24,8 @@ + from Onboard.Appearance import Theme, ColorScheme + from Onboard.Scanner import ScanMode, ScanDevice + from Onboard.utils import show_ask_string_dialog, \ +- show_confirmation_dialog ++ show_confirmation_dialog, \ ++ unicode_str + + from virtkey import virtkey + from osk import Devices +@@ -400,8 +401,8 @@ + try: + Popen([filename, "universal-access"]) + except OSError as e: +- _logger.warning(_("System settings not found" +- " ({}): {}").format(filename, str(e))) ++ _logger.warning(_("System settings not found ({}): {}") \ ++ .format(filename, unicode_str(e))) + + def update_num_resize_handles_combobox(self): + self.num_resize_handles_list = Gtk.ListStore(str, int) +Index: onboard-0.97.0/Onboard/utils.py +=================================================================== +--- onboard-0.97.0.orig/Onboard/utils.py ++++ onboard-0.97.0/Onboard/utils.py +@@ -961,4 +961,20 @@ + return 1 + return 0 + ++def unicode_str(obj, encoding = "utf-8"): ++ """ ++ Safe str() function that always returns an unicode string. ++ Do nothing if the string was already unicode. ++ """ ++ if sys.version_info.major >= 3: # python 3? ++ return str(obj) ++ ++ if type(obj) == unicode: # unicode string? ++ return obj ++ ++ if hasattr(obj, "__unicode__"): # Exception object? ++ return unicode(obj) ++ ++ return str(obj).decode("utf-8") # strings, numbers, ... ++ + diff --git a/community/onboard/fix_unicode_translations.patch b/community/onboard/fix_unicode_translations.patch new file mode 100644 index 000000000..1eaf663cc --- /dev/null +++ b/community/onboard/fix_unicode_translations.patch @@ -0,0 +1,247 @@ +=== modified file 'Onboard/Appearance.py' +--- Onboard/Appearance.py 2012-02-14 08:16:34 +0000 ++++ Onboard/Appearance.py 2012-02-15 23:27:20 +0000 +@@ -11,7 +11,6 @@ + _logger = logging.getLogger("Appearance") + ############### + +-from gettext import gettext as _ + from xml.dom import minidom + import os + import re + +=== modified file 'Onboard/Config.py' +--- Onboard/Config.py 2012-02-15 10:58:02 +0000 ++++ Onboard/Config.py 2012-02-15 23:27:20 +0000 +@@ -9,7 +9,6 @@ + import sys + from shutil import copytree + from optparse import OptionParser +-from gettext import gettext as _ + + from gi.repository import GLib, Gtk + + +=== modified file 'Onboard/ConfigUtils.py' +--- Onboard/ConfigUtils.py 2012-02-08 14:56:38 +0000 ++++ Onboard/ConfigUtils.py 2012-02-15 23:27:20 +0000 +@@ -13,7 +13,6 @@ + import os + import sys + from ast import literal_eval +-from gettext import gettext as _ + try: + import configparser + except ImportError: +@@ -418,8 +417,8 @@ + # convert ini file strings to property values + sysdef_gskeys = dict((k.sysdef, k) for k in list(self.gskeys.values())) + for sysdef, value in items: +- _logger.info(_("Found system default '{}={}'") \ +- .format(sysdef, value)) ++ _logger.info(_("Found system default '[{}] {}={}'") \ ++ .format(self.sysdef_section, sysdef, value)) + + gskey = sysdef_gskeys.get(sysdef, None) + value = self._convert_sysdef_key(gskey, sysdef, value) + +=== modified file 'Onboard/IconPalette.py' +--- Onboard/IconPalette.py 2012-02-15 01:34:13 +0000 ++++ Onboard/IconPalette.py 2012-02-15 23:27:20 +0000 +@@ -43,7 +43,6 @@ + config = Config() + ######################## + +-from gettext import gettext as _ + + class IconPalette(Gtk.Window, WindowRectTracker, WindowManipulator): + """ + +=== modified file 'Onboard/Indicator.py' +--- Onboard/Indicator.py 2012-02-11 14:07:56 +0000 ++++ Onboard/Indicator.py 2012-02-15 23:27:20 +0000 +@@ -18,7 +18,6 @@ + config = Config() + ######################## + +-from gettext import gettext as _ + + class Indicator(GObject.GObject): + + +=== modified file 'Onboard/KbdWindow.py' +--- Onboard/KbdWindow.py 2012-02-15 10:18:48 +0000 ++++ Onboard/KbdWindow.py 2012-02-15 23:27:20 +0000 +@@ -11,7 +11,6 @@ + from Onboard.WindowUtils import Orientation, WindowRectTracker + from Onboard.IconPalette import IconPalette + +-from gettext import gettext as _ + + ### Logging ### + import logging + +=== modified file 'Onboard/Keyboard.py' +--- Onboard/Keyboard.py 2012-02-14 20:21:02 +0000 ++++ Onboard/Keyboard.py 2012-02-15 23:27:20 +0000 +@@ -3,7 +3,6 @@ + from __future__ import division, print_function, unicode_literals + + import sys +-from gettext import gettext as _ + + from gi.repository import GObject, Gtk, Gdk + + +=== modified file 'Onboard/KeyboardGTK.py' +--- Onboard/KeyboardGTK.py 2012-02-15 01:33:34 +0000 ++++ Onboard/KeyboardGTK.py 2012-02-15 23:27:20 +0000 +@@ -5,7 +5,6 @@ + + import os + import time +-from gettext import gettext as _ + + import cairo + from gi.repository import GObject, Gdk, Gtk + +=== modified file 'Onboard/KeyboardSVG.py' +--- Onboard/KeyboardSVG.py 2012-02-09 19:18:36 +0000 ++++ Onboard/KeyboardSVG.py 2012-02-15 23:27:20 +0000 +@@ -11,7 +11,6 @@ + import re + import sys + import shutil +-from gettext import gettext as _ + from xml.dom import minidom + + from Onboard import Exceptions + +=== modified file 'Onboard/MouseControl.py' +--- Onboard/MouseControl.py 2012-01-19 08:50:34 +0000 ++++ Onboard/MouseControl.py 2012-02-15 23:27:20 +0000 +@@ -5,7 +5,6 @@ + + from __future__ import division, print_function, unicode_literals + +-from gettext import gettext as _ + try: + import dbus + from dbus.mainloop.glib import DBusGMainLoop + +=== modified file 'Onboard/OnboardGtk.py' +--- Onboard/OnboardGtk.py 2012-02-15 10:58:02 +0000 ++++ Onboard/OnboardGtk.py 2012-02-15 23:27:20 +0000 +@@ -13,14 +13,14 @@ + import signal + import gettext + import os.path +-from gettext import gettext as _ + import virtkey +- + from gi.repository import GObject, Gio, Gdk, Gtk + ++# setup gettext, install _() function for all modules ++app = "onboard" ++gettext.install(app, unicode=True) + + from Onboard.Indicator import Indicator +- + from Onboard.Keyboard import Keyboard + from Onboard.Scanner import Scanner + from Onboard.KeyGtk import * +@@ -37,11 +37,6 @@ + import Onboard.KeyCommon + import Onboard.utils as utils + +-#setup gettext +-app="onboard" +-gettext.textdomain(app) +-gettext.bindtextdomain(app) +- + DEFAULT_FONTSIZE = 10 + + class OnboardGtk(Gtk.Application): + +=== modified file 'Onboard/SnippetView.py' +--- Onboard/SnippetView.py 2012-01-09 22:25:10 +0000 ++++ Onboard/SnippetView.py 2012-02-15 23:27:20 +0000 +@@ -4,7 +4,6 @@ + + from gi.repository import GObject, Gtk + +-from gettext import gettext as _ + + from Onboard.utils import show_error_dialog + + +=== modified file 'Onboard/TouchHandles.py' +--- Onboard/TouchHandles.py 2012-02-14 08:32:08 +0000 ++++ Onboard/TouchHandles.py 2012-02-15 23:27:20 +0000 +@@ -5,7 +5,6 @@ + + from math import pi, sqrt, sin, log + import cairo +-from gettext import gettext as _ + + from Onboard.utils import Rect + from Onboard.WindowUtils import Handle + +=== modified file 'Onboard/WindowUtils.py' +--- Onboard/WindowUtils.py 2012-02-15 10:23:36 +0000 ++++ Onboard/WindowUtils.py 2012-02-15 23:27:20 +0000 +@@ -5,7 +5,6 @@ + + import time + from math import sqrt +-from gettext import gettext as _ + + from gi.repository import GObject, Gtk, Gdk + + +=== modified file 'Onboard/settings.py' +--- Onboard/settings.py 2012-02-15 10:58:02 +0000 ++++ Onboard/settings.py 2012-02-15 23:27:20 +0000 +@@ -11,9 +11,14 @@ + from subprocess import Popen + from xml.parsers.expat import ExpatError + from xml.dom import minidom ++import gettext + + from gi.repository import GObject, Pango, Gdk, Gtk + ++# setup gettext, install _() function for all modules ++app = "onboard" ++gettext.install(app, unicode=True) ++ + from Onboard.KeyboardSVG import KeyboardSVG + from Onboard.SnippetView import SnippetView + from Onboard.Appearance import Theme, ColorScheme +@@ -36,14 +41,6 @@ + config = Config() + ######################## + +-#setup gettext +-import gettext +-from gettext import gettext as _ +-app = "onboard" +-gettext.textdomain(app) +-gettext.bindtextdomain(app) +- +- + + def LoadUI(filebase): + builder = Gtk.Builder() + +=== modified file 'Onboard/utils.py' +--- Onboard/utils.py 2012-02-15 01:33:34 +0000 ++++ Onboard/utils.py 2012-02-15 23:27:20 +0000 +@@ -11,7 +11,6 @@ + from subprocess import Popen + from math import pi, sqrt, sin + from contextlib import contextmanager +-from gettext import gettext as _ + + from gi.repository import GObject, Gtk + + diff --git a/community/onboard/onboard.install b/community/onboard/onboard.install new file mode 100644 index 000000000..aa4c3e059 --- /dev/null +++ b/community/onboard/onboard.install @@ -0,0 +1,13 @@ +post_install() { + glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q + xdg-icon-resource forceupdate +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/community/python2-virtkey/PKGBUILD b/community/python2-virtkey/PKGBUILD new file mode 100644 index 000000000..237f64857 --- /dev/null +++ b/community/python2-virtkey/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: Balló György <ballogyor+arch at gmail dot com> +# Contributor: codl <codl@aquageek.net> +# Contributor: Megamixman <Megamixman@gmail.com> + +pkgname=python2-virtkey +_pkgname=python-virtkey +pkgver=0.60.0 +pkgrel=3 +pkgdesc="Python extension for emulating keypresses and getting layout information from the X server" +arch=('i686' 'x86_64') +url="https://launchpad.net/python-virtkey" +license=('LGPL') +depends=('python2' 'libxtst' 'gtk2') +replaces=('python-virtkey') +provides=('python-virtkey') +source=(http://launchpad.net/$_pkgname/${pkgver%.*}/$pkgver/+download/$_pkgname-$pkgver.tar.gz) +md5sums=('f4f6776f379bc635a29eac83a14fdde5') + +build() { + cd "$srcdir/$_pkgname-$pkgver" + + python2 setup.py build +} + +package() { + cd "$srcdir/$_pkgname-$pkgver" + + python2 setup.py install --root=$pkgdir/ --optimize=1 +} diff --git a/community/soundkonverter/PKGBUILD b/community/soundkonverter/PKGBUILD index 6c8937a9a..650fcded0 100644 --- a/community/soundkonverter/PKGBUILD +++ b/community/soundkonverter/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 68236 2012-03-20 07:50:05Z stativ $ +# $Id: PKGBUILD 70533 2012-05-10 17:21:08Z stativ $ # Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com> # Contributor: Mateusz Herych <heniekk@gmail.com> # Contributor: Eric Belanger <eric@archlinux.org> # Contributor: Darwin Bautista <djclue917@gmail.com> pkgname=soundkonverter -pkgver=1.4.0 +pkgver=1.5.0 pkgrel=1 pkgdesc="Front-end to various audio converters" arch=('i686' 'x86_64') @@ -31,7 +31,7 @@ optdepends=('cdrkit: cdda2wav backend' 'wavpack: wavpack backend') install=$pkgname.install source=("http://kde-apps.org/CONTENT/content-files/29024-${pkgname}-${pkgver}.tar.gz") -md5sums=('4d3d1ccab74c2dd41971c3a4a4e7fb57') +md5sums=('9cb8dcf64bd257965a227d79e3c6e7fb') build() { cd "$srcdir"/$pkgname-$pkgver diff --git a/extra/fcitx/PKGBUILD b/extra/fcitx/PKGBUILD index e4a36666e..7b1b688aa 100644 --- a/extra/fcitx/PKGBUILD +++ b/extra/fcitx/PKGBUILD @@ -1,17 +1,17 @@ -# $Id: PKGBUILD 157020 2012-04-23 09:27:29Z ibiru $ +# $Id: PKGBUILD 158796 2012-05-10 06:10:24Z eric $ # Maintainer: Andrea Scarpino <andrea@archlinux.org> # Contributor: csslayer <wengxt AT gmail com> pkgbase=fcitx pkgname=('fcitx' 'fcitx-gtk2' 'fcitx-gtk3' 'fcitx-qt') -pkgver=4.2.2 +pkgver=4.2.3 pkgrel=1 arch=('i686' 'x86_64') url="http://code.google.com/p/fcitx/" license=('GPL') -makedepends=('cmake' 'intltool' 'doxygen' 'gtk2' 'gtk3' 'qt' 'dbus-glib' 'icu') +makedepends=('cmake' 'intltool' 'doxygen' 'gtk2' 'gtk3' 'qt' 'icu') source=(http://fcitx.googlecode.com/files/${pkgbase}-${pkgver}.tar.xz) -sha1sums=('09d2e7110f652027ea7c285c5845070f8a353f38') +sha1sums=('8cd33487d1d6ad9c9c63743af8d76e667de4b859') build() { cd "${srcdir}" @@ -21,11 +21,17 @@ build() { -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DENABLE_OPENCC=OFF \ + -DENABLE_TEST=ON \ -DENABLE_GTK3_IM_MODULE=ON \ -DENABLE_QT_IM_MODULE=ON make } +check() { + cd "${srcdir}"/build + make test +} + package_fcitx() { pkgdesc="Free Chinese Input Toy of X - Input Method Server for X window system" depends=('dbus-core' 'pango' 'libxinerama' 'gtk-update-icon-cache' \ @@ -40,7 +46,7 @@ package_fcitx() { package_fcitx-gtk2() { pkgdesc='GTK2 IM Module for fcitx' - depends=('gtk2' 'dbus-glib' 'fcitx') + depends=('gtk2' 'fcitx') install=fcitx-gtk2.install cd "${srcdir}"/build/src/frontend/gtk2 @@ -49,7 +55,7 @@ package_fcitx-gtk2() { package_fcitx-gtk3() { pkgdesc='GTK3 IM Module for fcitx' - depends=('gtk3' 'dbus-glib' 'fcitx') + depends=('gtk3' 'fcitx') install=fcitx-gtk3.install cd "${srcdir}"/build/src/frontend/gtk3 diff --git a/extra/pygobject/PKGBUILD b/extra/pygobject/PKGBUILD index 7ab25d12c..a5bbd95ca 100644 --- a/extra/pygobject/PKGBUILD +++ b/extra/pygobject/PKGBUILD @@ -1,17 +1,17 @@ -# $Id: PKGBUILD 157407 2012-04-28 09:26:56Z allan $ +# $Id: PKGBUILD 158812 2012-05-10 19:18:57Z ibiru $ # Maintainer: Ionut Biru <ibiru@archlinux.org> pkgbase=pygobject pkgname=(python-gobject python2-gobject pygobject-devel) -pkgver=3.2.0 -pkgrel=2 +pkgver=3.2.1 +pkgrel=1 arch=('i686' 'x86_64') url="https://live.gnome.org/PyGObject" license=('LGPL') makedepends=('python' 'python2' 'python-cairo' 'python2-cairo' 'gobject-introspection') source=(http://ftp.gnome.org/pub/gnome/sources/$pkgbase/${pkgver%.*}/$pkgbase-$pkgver.tar.xz) options=('!libtool') -sha256sums=('1a2140c4c4ce0c1a5d7abe74eeb7a7040f426cb17943c3ae7e57695b355151c3') +sha256sums=('0f07401289fa33e8caee7a9342f5c838bb44cd0a386cb99093505edb5e42817a') build() { cp -a "$pkgbase-$pkgver" python2-build diff --git a/extra/slim/PKGBUILD b/extra/slim/PKGBUILD index f968b228c..1ef39a739 100644 --- a/extra/slim/PKGBUILD +++ b/extra/slim/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 158739 2012-05-08 16:15:26Z tpowa $ +# $Id: PKGBUILD 158801 2012-05-10 13:44:49Z tpowa $ # Maintainer: Gaetan Bisson <bisson@archlinux.org> # Contributor: Thayer Williams <thayer@archlinux.org> # Contributor: Alexander Fehr <pizzapunk gmail com> @@ -6,7 +6,7 @@ pkgname=slim pkgver=1.3.3 -pkgrel=2 +pkgrel=3 pkgdesc='Desktop-independent graphical login manager for X11' arch=('i686' 'x86_64') url='http://slim.berlios.de/' @@ -20,7 +20,8 @@ source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.gz" 'logrotate' 'slim.service' 'ptr_pam.patch' - 'session-name.patch') + 'session-name.patch' + 'fix-numlock-1.3.3.patch') install=install @@ -29,6 +30,7 @@ build() { cd "${srcdir}/${pkgname}-${pkgver}" patch -p1 -i ../ptr_pam.patch # FS#23995: pointer mishandling confuses PAM patch -p1 -i ../session-name.patch # FS#26693: fix default session name + patch -p1 -i ../fix-numlock-1.3.3.patch # FS#29818: fix numlock handling cd ${srcdir} mkdir build cd build @@ -60,4 +62,5 @@ md5sums=('ce53e44c1e4a2eacf5bb7688ee2a5de8' '43da096480bf72c3ccec8ad8400f34f0' 'aef560f5a765582b2a7fc1fac5b323a7' 'ae4b237d472ec5d373e30080aa0ff804' - 'ebcb6829028615686de7b64ceeaaf8ed') + 'ebcb6829028615686de7b64ceeaaf8ed' + '6c29c93370e44ed310ff30132424b619') diff --git a/extra/slim/fix-numlock-1.3.3.patch b/extra/slim/fix-numlock-1.3.3.patch new file mode 100644 index 000000000..179fffcbf --- /dev/null +++ b/extra/slim/fix-numlock-1.3.3.patch @@ -0,0 +1,46 @@ +--- trunk/app.cpp 2012/02/21 23:57:28 211 ++++ trunk/app.cpp 2012/04/16 23:28:34 212 +@@ -332,6 +332,15 @@ + Login(); + } + } ++ ++ // Set NumLock ++ string numlock = cfg->getOption("numlock"); ++ if (numlock == "on") { ++ NumLock::setOn(Dpy); ++ } else if (numlock == "off") { ++ NumLock::setOff(Dpy); ++ } ++ + // Start looping + int panelclosed = 1; + Panel::ActionType Action; +@@ -971,13 +980,6 @@ + break; + } + +- string numlock = cfg->getOption("numlock"); +- if (numlock == "on") { +- NumLock::setOn(Dpy); +- } else if (numlock == "off") { +- NumLock::setOff(Dpy); +- } +- + delete args; + + serverStarted = true; +--- trunk/numlock.cpp 2012/02/21 23:57:28 211 ++++ trunk/numlock.cpp 2012/04/16 23:28:34 212 +@@ -68,9 +68,9 @@ + return; + + if( flag == true ) +- XkbLockModifiers ( dpy, XkbUseCoreKbd, mask, 0); +- else + XkbLockModifiers ( dpy, XkbUseCoreKbd, mask, mask); ++ else ++ XkbLockModifiers ( dpy, XkbUseCoreKbd, mask, 0); + } + + void NumLock::setOn(Display *dpy) { diff --git a/extra/vpnc/PKGBUILD b/extra/vpnc/PKGBUILD index 392e7b401..652625760 100644 --- a/extra/vpnc/PKGBUILD +++ b/extra/vpnc/PKGBUILD @@ -1,11 +1,12 @@ -# $Id: PKGBUILD 154323 2012-03-26 10:17:14Z dreisner $ +# $Id: PKGBUILD 158810 2012-05-10 18:37:11Z dreisner $ # Maintainer: Dave Reisner <dreisner@archlinux.org> # Contributor: Thomas Baechler <thomas@archlinux.org> pkgname=vpnc _vpncver=0.5.3 +_git=1b65c39e3cdebb89ce5c75f05d44a0519a67ede6 pkgver=$_vpncver.svn516 -pkgrel=1 +pkgrel=2 pkgdesc="VPN client for cisco3000 VPN Concentrators" url="http://www.unix-ag.uni-kl.de/~massar/vpnc/" license=('GPL') @@ -13,9 +14,11 @@ depends=('libgcrypt' 'openssl' 'iproute2') optdepends=('openresolv: Let vpnc manage resolv.conf') arch=('i686' 'x86_64') source=("ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.xz" + "http://git.infradead.org/users/dwmw2/vpnc-scripts.git/blob_plain/$_git:/vpnc-script" 'vpnc.conf') backup=('etc/vpnc/default.conf') md5sums=('2118c5ccc464250c0892be57dbfabdf7' + '6293c15ef6e7a3365ed7add5e336b806' 'a3f4e0cc682f437e310a1c86ae198e45') mktarball() { @@ -52,4 +55,5 @@ package() { make DESTDIR="$pkgdir" PREFIX=/usr install install -Dm644 "$srcdir"/vpnc.conf "$pkgdir"/etc/vpnc/default.conf + install -Dm755 "$srcdir"/vpnc-script "$pkgdir"/etc/vpnc/vpnc-script } diff --git a/multilib/lib32-glib2/PKGBUILD b/multilib/lib32-glib2/PKGBUILD index c80a18db6..c4cd09a39 100644 --- a/multilib/lib32-glib2/PKGBUILD +++ b/multilib/lib32-glib2/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 70512 2012-05-09 21:57:13Z bluewind $ +# $Id: PKGBUILD 70527 2012-05-10 15:13:01Z lcarlier $ # Maintainer: Ionut Biru <ibiru@archlinux.org> # Contributor: Pierre Schmitz <pierre@archlinux.de> # Contributor: Mikko Seppälä <t-r-a-y@mbnet.fi> @@ -6,7 +6,7 @@ _pkgbasename=glib2 pkgname=lib32-$_pkgbasename pkgver=2.32.2 -pkgrel=1 +pkgrel=2 pkgdesc="Common C routines used by GTK+ 2.4 and other libs (32-bit)" url="http://www.gtk.org/" arch=('x86_64') diff --git a/multilib/lib32-libffi/PKGBUILD b/multilib/lib32-libffi/PKGBUILD index 9d5ef76fa..8714dbdf8 100644 --- a/multilib/lib32-libffi/PKGBUILD +++ b/multilib/lib32-libffi/PKGBUILD @@ -1,17 +1,18 @@ -# $Id: PKGBUILD 57969 2011-11-04 23:32:00Z lcarlier $ +# $Id: PKGBUILD 70523 2012-05-10 14:59:20Z lcarlier $ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=lib32-libffi -pkgver=3.0.10 -pkgrel=3 +pkgver=3.0.11 +pkgrel=1 pkgdesc="A portable, high level programming interface to various calling conventions (32 bits version)" arch=('x86_64') license=('MIT') url="http://sourceware.org/libffi" depends=('lib32-glibc') +checkdepends=('dejagnu') options=('!libtool') source=(ftp://sourceware.org/pub/libffi/libffi-${pkgver}.tar.gz) -md5sums=('79390673f5d07a8fb342bc09b5055b6f') +md5sums=('f69b9693227d976835b4857b1ba7d0e3') build() { cd "${srcdir}/libffi-${pkgver}" @@ -24,6 +25,12 @@ build() { make } +check() { + cd "${srcdir}/libffi-${pkgver}" + + make check +} + package() { cd "${srcdir}/libffi-${pkgver}" diff --git a/multilib/lib32-llvm/PKGBUILD b/multilib/lib32-llvm/PKGBUILD index 993c29020..56d168afd 100644 --- a/multilib/lib32-llvm/PKGBUILD +++ b/multilib/lib32-llvm/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 67497 2012-03-12 21:08:23Z lcarlier $ +# $Id: PKGBUILD 70524 2012-05-10 14:59:27Z lcarlier $ # Maintainer: Evangelos Foutras <foutrelis@gmail.com> # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> # Contributor: Sebastian Nowicki <sebnow@gmail.com> @@ -11,7 +11,7 @@ pkgname=('lib32-llvm') pkgver=3.0 -pkgrel=2 +pkgrel=3 arch=('x86_64') url="http://llvm.org/" license=('custom:University of Illinois/NCSA Open Source License') diff --git a/testing/kmod/0001-libkmod-file-gracefully-handle-errors-from-zlib.patch b/testing/kmod/0001-libkmod-file-gracefully-handle-errors-from-zlib.patch new file mode 100644 index 000000000..30c92b280 --- /dev/null +++ b/testing/kmod/0001-libkmod-file-gracefully-handle-errors-from-zlib.patch @@ -0,0 +1,35 @@ +From c7d5a60d3df735a3816bbc1ff1b416a803a4f7a6 Mon Sep 17 00:00:00 2001 +From: Dave Reisner <dreisner@archlinux.org> +Date: Mon, 7 May 2012 19:41:41 -0400 +Subject: [PATCH 1/2] libkmod-file: gracefully handle errors from zlib + +zlib won't necessarily set the system errno, and this is particularly +evident on corrupted data (which results in a double free). Use zlib's +gzerror to detect the failure, returning a generic EINVAL when zlib +doesn't provide us with an errno. +--- + libkmod/libkmod-file.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/libkmod/libkmod-file.c b/libkmod/libkmod-file.c +index 46ad8d9..8beb7e3 100644 +--- a/libkmod/libkmod-file.c ++++ b/libkmod/libkmod-file.c +@@ -199,7 +199,13 @@ static int load_zlib(struct kmod_file *file) + if (r == 0) + break; + else if (r < 0) { +- err = -errno; ++ int gzerr; ++ const char *gz_errmsg = gzerror(file->gzf, &gzerr); ++ ++ ERR(file->ctx, "gzip: %s\n", gz_errmsg); ++ ++ /* gzip might not set errno here */ ++ err = gzerr == Z_ERRNO ? -errno : -EINVAL; + goto error; + } + did += r; +-- +1.7.10.1 + diff --git a/testing/kmod/0001-split-usr-read-configs-from-lib-depmod.d-modprobe.d.patch b/testing/kmod/0001-split-usr-read-configs-from-lib-depmod.d-modprobe.d.patch new file mode 100644 index 000000000..bf2c3501f --- /dev/null +++ b/testing/kmod/0001-split-usr-read-configs-from-lib-depmod.d-modprobe.d.patch @@ -0,0 +1,50 @@ +From 666ba68a0635048aea0db70cd9ec61aea9b61ed2 Mon Sep 17 00:00:00 2001 +From: Tom Gundersen <teg@jklm.no> +Date: Sat, 3 Mar 2012 12:37:06 +0100 +Subject: [PATCH 1/2] split usr: read configs from /lib/{depmod.d,modprobe.d} + +This allows rootprefix to be set to /usr, even if not all other packages +have been fixed to read from this dir. +--- + libkmod/libkmod.c | 5 +++-- + tools/kmod-depmod.c | 1 + + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c +index 36ca629..12c1112 100644 +--- a/libkmod/libkmod.c ++++ b/libkmod/libkmod.c +@@ -62,6 +62,7 @@ static const char *default_config_paths[] = { + SYSCONFDIR "/modprobe.d", + "/run/modprobe.d", + ROOTPREFIX "/lib/modprobe.d", ++ "/lib/modprobe.d", + NULL + }; + +@@ -223,8 +224,8 @@ static char *get_kernel_release(const char *dirname) + * @config_paths: ordered array of paths (directories or files) where + * to load from user-defined configuration parameters such as + * alias, blacklists, commands (install, remove). If +- * NULL defaults to /run/modprobe.d, /etc/modprobe.d and +- * $rootprefix/lib/modprobe.d. Give an empty vector if ++ * NULL defaults to /run/modprobe.d, /etc/modprobe.d, ++ * $rootprefix/lib/modprobe.d and /lib/modprobe.d. Give an empty vector if + * configuration should not be read. This array must be null + * terminated. + * +diff --git a/tools/kmod-depmod.c b/tools/kmod-depmod.c +index 1871e18..7bb1c5d 100644 +--- a/tools/kmod-depmod.c ++++ b/tools/kmod-depmod.c +@@ -58,6 +58,7 @@ static const char *default_cfg_paths[] = { + "/run/depmod.d", + SYSCONFDIR "/depmod.d", + ROOTPREFIX "/lib/depmod.d", ++ "/lib/depmod.d", + NULL + }; + +-- +1.7.9.5 + diff --git a/testing/kmod/0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch b/testing/kmod/0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch new file mode 100644 index 000000000..f39f36ace --- /dev/null +++ b/testing/kmod/0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch @@ -0,0 +1,93 @@ +From 53e7e0e42428770578ca0d54d0a9540f498f917f Mon Sep 17 00:00:00 2001 +From: Tom Gundersen <teg@jklm.no> +Date: Sat, 31 Mar 2012 12:17:39 +0200 +Subject: [PATCH 2/2] config: hardcode the path to modules to be /lib/modules + +This means that we can move the configuration paths from /lib +to /usr/lib without having to touch the kernel and related +packages. + +That can be dealt with separately at a later location, in which case +all we have to do is revert this patch. + +Signed-off-by: Tom Gundersen <teg@jklm.no> +--- + libkmod/libkmod.c | 2 +- + tools/kmod-depmod.c | 2 +- + tools/kmod-modinfo.c | 4 ++-- + tools/kmod-modprobe.c | 4 ++-- + 4 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c +index 12c1112..11edfa0 100644 +--- a/libkmod/libkmod.c ++++ b/libkmod/libkmod.c +@@ -196,7 +196,7 @@ static int log_priority(const char *priority) + return 0; + } + +-static const char *dirname_default_prefix = ROOTPREFIX "/lib/modules"; ++static const char *dirname_default_prefix = "/lib/modules"; + + static char *get_kernel_release(const char *dirname) + { +diff --git a/tools/kmod-depmod.c b/tools/kmod-depmod.c +index 7bb1c5d..454d538 100644 +--- a/tools/kmod-depmod.c ++++ b/tools/kmod-depmod.c +@@ -2634,7 +2634,7 @@ static int do_depmod(int argc, char *argv[]) + } + + cfg.dirnamelen = snprintf(cfg.dirname, PATH_MAX, +- "%s" ROOTPREFIX "/lib/modules/%s", ++ "%s/lib/modules/%s", + root == NULL ? "" : root, cfg.kversion); + + if (optind == argc) +diff --git a/tools/kmod-modinfo.c b/tools/kmod-modinfo.c +index aa5223f..b13cd4b 100644 +--- a/tools/kmod-modinfo.c ++++ b/tools/kmod-modinfo.c +@@ -339,7 +339,7 @@ static void help(const char *progname) + "\t-0, --null Use \\0 instead of \\n\n" + "\t-F, --field=FIELD Print only provided FIELD\n" + "\t-k, --set-version=VERSION Use VERSION instead of `uname -r`\n" +- "\t-b, --basedir=DIR Use DIR as filesystem root for " ROOTPREFIX "/lib/modules\n" ++ "\t-b, --basedir=DIR Use DIR as filesystem root for /lib/modules\n" + "\t-V, --version Show version\n" + "\t-h, --help Show this help\n", + progname); +@@ -439,7 +439,7 @@ static int do_modinfo(int argc, char *argv[]) + } + kversion = u.release; + } +- snprintf(dirname_buf, sizeof(dirname_buf), "%s" ROOTPREFIX "/lib/modules/%s", ++ snprintf(dirname_buf, sizeof(dirname_buf), "%s/lib/modules/%s", + root, kversion); + dirname = dirname_buf; + } +diff --git a/tools/kmod-modprobe.c b/tools/kmod-modprobe.c +index 4760682..ccb41d8 100644 +--- a/tools/kmod-modprobe.c ++++ b/tools/kmod-modprobe.c +@@ -128,7 +128,7 @@ static void help(const char *progname) + "\t-n, --show Same as --dry-run\n" + + "\t-C, --config=FILE Use FILE instead of default search paths\n" +- "\t-d, --dirname=DIR Use DIR as filesystem root for " ROOTPREFIX "/lib/modules\n" ++ "\t-d, --dirname=DIR Use DIR as filesystem root for /lib/modules\n" + "\t-S, --set-version=VERSION Use VERSION instead of `uname -r`\n" + + "\t-s, --syslog print to syslog, not stderr\n" +@@ -973,7 +973,7 @@ static int do_modprobe(int argc, char **orig_argv) + kversion = u.release; + } + snprintf(dirname_buf, sizeof(dirname_buf), +- "%s" ROOTPREFIX "/lib/modules/%s", root, ++ "%s/lib/modules/%s", root, + kversion); + dirname = dirname_buf; + } +-- +1.7.9.5 + diff --git a/testing/kmod/0002-depmod-report-failures-in-loading-symbols.patch b/testing/kmod/0002-depmod-report-failures-in-loading-symbols.patch new file mode 100644 index 000000000..90c58d5da --- /dev/null +++ b/testing/kmod/0002-depmod-report-failures-in-loading-symbols.patch @@ -0,0 +1,34 @@ +From 819f79a24d58e3c8429f1631df2f8f85a2f95d4a Mon Sep 17 00:00:00 2001 +From: Dave Reisner <dreisner@archlinux.org> +Date: Mon, 7 May 2012 19:41:42 -0400 +Subject: [PATCH 2/2] depmod: report failures in loading symbols + +Previously, depmod would relegate failures of kmod_module_get_symbols() +to debug output, assuming the "error" was simply a lack of symbols. +Leave the ENOENT return to debug output, but report anything else as a +real error. +--- + tools/kmod-depmod.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/tools/kmod-depmod.c b/tools/kmod-depmod.c +index e89dff6..bceb407 100644 +--- a/tools/kmod-depmod.c ++++ b/tools/kmod-depmod.c +@@ -1542,8 +1542,11 @@ static int depmod_load_symbols(struct depmod *depmod) + struct kmod_list *l, *list = NULL; + int err = kmod_module_get_symbols(mod->kmod, &list); + if (err < 0) { +- DBG("ignoring %s: no symbols: %s\n", +- mod->path, strerror(-err)); ++ if (err == -ENOENT) ++ DBG("ignoring %s: no symbols\n", mod->path); ++ else ++ ERR("failed to load symbols from %s: %s\n", ++ mod->path, strerror(-err)); + continue; + } + kmod_list_foreach(l, list) { +-- +1.7.10.1 + diff --git a/testing/kmod/PKGBUILD b/testing/kmod/PKGBUILD new file mode 100644 index 000000000..c51fc4d07 --- /dev/null +++ b/testing/kmod/PKGBUILD @@ -0,0 +1,69 @@ +# $Id: PKGBUILD 158817 2012-05-11 01:49:20Z dreisner $ +# Maintainer: Dave Reisner <dreisner@archlinux.org> + +pkgname=kmod +pkgver=8 +pkgrel=2 +pkgdesc="Linux kernel module handling" +arch=('i686' 'x86_64') +url='http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary' +license=('GPL2') +depends=('glibc' 'zlib') +options=('!libtool') +provides=('module-init-tools=3.16') +conflicts=('module-init-tools') +replaces=('module-init-tools') +source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar.xz" + "depmod-search.conf" + "0001-split-usr-read-configs-from-lib-depmod.d-modprobe.d.patch" + "0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch" + "0001-libkmod-file-gracefully-handle-errors-from-zlib.patch" + "0002-depmod-report-failures-in-loading-symbols.patch") +md5sums=('d4e3d038b5370b1e8ff237c55666aa64' + 'dd62cbf62bd8f212f51ef8c43bec9a77' + 'ba73b9e98db1abbf41274f922fcfbd55' + 'c9af56636c5667cf4ce3a31ea56e03d9' + '1a877b9863b94f91c8d3aec97c021c6b' + '1a9f132779f90556852e70279577ed22') + +build() { + cd "$pkgname-$pkgver" + + patch -Np1 <"$srcdir"/0001-split-usr-read-configs-from-lib-depmod.d-modprobe.d.patch + patch -Np1 <"$srcdir"/0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch + + # fix crash on corrupted zlib compression + patch -Np1 <"$srcdir"/0001-libkmod-file-gracefully-handle-errors-from-zlib.patch + patch -Np1 <"$srcdir"/0002-depmod-report-failures-in-loading-symbols.patch + + ./configure \ + --sysconfdir=/etc \ + --with-zlib \ + --with-rootprefix=/usr + + make +} + +check() { + make -C "$pkgname-$pkgver" check +} + +package() { + make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install + + # extra directories + install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d "$pkgdir/sbin" + + # add symlinks to kmod + ln -s ../usr/bin/kmod "$pkgdir/sbin/modprobe" + ln -s ../usr/bin/kmod "$pkgdir/sbin/depmod" + + for tool in {ins,ls,rm}mod modinfo; do + ln -s kmod "$pkgdir/usr/bin/$tool" + done + + # install depmod.d file for search/ dir + install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf" +} + +# vim: ft=sh syn=sh et diff --git a/testing/kmod/depmod-search.conf b/testing/kmod/depmod-search.conf new file mode 100644 index 000000000..36f2cf7db --- /dev/null +++ b/testing/kmod/depmod-search.conf @@ -0,0 +1,5 @@ +# +# /usr/lib/depmod.d/search.conf +# + +search updates extramodules built-in diff --git a/testing/mdadm/PKGBUILD b/testing/mdadm/PKGBUILD index 0749f8128..3cf400f8c 100644 --- a/testing/mdadm/PKGBUILD +++ b/testing/mdadm/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 158073 2012-05-02 12:16:04Z tomegun $ +# $Id: PKGBUILD 158803 2012-05-10 13:58:45Z tpowa $ # Maintainer: Tobias Powalowski <tpowa@archlinux.org> # Contributor: Judd Vinet <jvinet@zeroflux.org> pkgname=mdadm -pkgver=3.2.3 -pkgrel=3 +pkgver=3.2.4 +pkgrel=1 pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID" arch=(i686 x86_64) license=('GPL') @@ -18,8 +18,17 @@ source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2 mdadm_install mdadm_hook mdadm_udev_install + mdadm.service disable-werror.patch) replaces=('raidtools') +md5sums=('c25007b981e0f5362eacdad385ff0e15' + '8333d405f550317c2bacd5510bf1cb60' + '00cbed931db4f15b6ce49e3e7d433966' + '9b01e96b6c3c218fb61628c9281fe688' + 'fbb5542d9bdf87441a11dd7e7a0a17f8' + '2318b99701dba9b01a6891c62be7bc1c' + 'aafb5f9ac8437a284cbf948b9b13b179' + '4ad87b74a4bc9a34621280abe0e0c3e4') build() { cd $srcdir/$pkgname-$pkgver @@ -44,11 +53,6 @@ package() { # move /lib/* to /usr/lib/ mv $pkgdir/lib/udev $pkgdir/usr/lib/ rm -rf $pkgdir/lib + # systemd service file + install -D -m644 $srcdir/mdadm.service $pkgdir/usr/lib/systemd/system/mdadm.service } -md5sums=('d789d6ecb9c1d5ebcc64f0fc52bca92f' - '8333d405f550317c2bacd5510bf1cb60' - '00cbed931db4f15b6ce49e3e7d433966' - '9b01e96b6c3c218fb61628c9281fe688' - 'fbb5542d9bdf87441a11dd7e7a0a17f8' - '2318b99701dba9b01a6891c62be7bc1c' - '4ad87b74a4bc9a34621280abe0e0c3e4') diff --git a/testing/mdadm/mdadm.service b/testing/mdadm/mdadm.service new file mode 100644 index 000000000..8389715e8 --- /dev/null +++ b/testing/mdadm/mdadm.service @@ -0,0 +1,8 @@ +[Unit] +Description=MDADM Event Monitor + +[Service] +ExecStart=/sbin/mdadm --monitor --scan + +[Install] +WantedBy=multi-user.target diff --git a/testing/openssl/PKGBUILD b/testing/openssl/PKGBUILD new file mode 100644 index 000000000..ee4f13ee8 --- /dev/null +++ b/testing/openssl/PKGBUILD @@ -0,0 +1,72 @@ +# $Id: PKGBUILD 158807 2012-05-10 16:33:56Z pierre $ +# Maintainer: Pierre Schmitz <pierre@archlinux.de> + +pkgname=openssl +_ver=1.0.1c +# use a pacman compatible version scheme +pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}} +#pkgver=$_ver +pkgrel=1 +pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security' +arch=('i686' 'x86_64') +url='https://www.openssl.org' +license=('custom:BSD') +depends=('perl') +optdepends=('ca-certificates') +options=('!makeflags') +backup=('etc/ssl/openssl.cnf') +source=("https://www.openssl.org/source/${pkgname}-${_ver}.tar.gz" + "https://www.openssl.org/source/${pkgname}-${_ver}.tar.gz.asc" + 'fix-manpages.patch' + 'no-rpath.patch' + 'ca-dir.patch') +md5sums=('ae412727c8c15b67880aef7bd2999b2e' + 'a3d90bc42253def61cd1c4237f1ce5f7' + '5bbc0655bda2af95bc8eb568963ce8ba' + 'dc78d3d06baffc16217519242ce92478' + '3bf51be3a1bbd262be46dc619f92aa90') + +build() { + cd $srcdir/$pkgname-$_ver + + if [ "${CARCH}" == 'x86_64' ]; then + openssltarget='linux-x86_64' + optflags='enable-ec_nistp_64_gcc_128' + elif [ "${CARCH}" == 'i686' ]; then + openssltarget='linux-elf' + optflags='' + fi + + # avoid conflicts with other man pages + # see http://www.linuxfromscratch.org/patches/downloads/openssl/ + patch -p1 -i $srcdir/fix-manpages.patch + # remove rpath: http://bugs.archlinux.org/task/14367 + patch -p0 -i $srcdir/no-rpath.patch + # set ca dir to /etc/ssl by default + patch -p0 -i $srcdir/ca-dir.patch + # mark stack as non-executable: http://bugs.archlinux.org/task/12434 + # workaround for PR#2771: OPENSSL_NO_TLS1_2_CLIENT + ./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \ + shared zlib enable-md2 ${optflags} \ + "${openssltarget}" \ + -Wa,--noexecstack "${CFLAGS}" "${LDFLAGS}" \ + -DOPENSSL_NO_TLS1_2_CLIENT + + make depend + make +} + +check() { + cd $srcdir/$pkgname-$_ver + # the test fails due to missing write permissions in /etc/ssl + # revert this patch for make test + patch -p0 -R -i $srcdir/ca-dir.patch + make test + patch -p0 -i $srcdir/ca-dir.patch +} + +package() { + cd $srcdir/$pkgname-$_ver + make INSTALL_PREFIX=$pkgdir MANDIR=/usr/share/man install + install -D -m644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE +} diff --git a/testing/openssl/ca-dir.patch b/testing/openssl/ca-dir.patch new file mode 100644 index 000000000..41d1386d3 --- /dev/null +++ b/testing/openssl/ca-dir.patch @@ -0,0 +1,33 @@ +--- apps/CA.pl.in 2006-04-28 02:30:49.000000000 +0200 ++++ apps/CA.pl.in 2010-04-01 00:35:02.600553509 +0200 +@@ -53,7 +53,7 @@ + $X509="$openssl x509"; + $PKCS12="$openssl pkcs12"; + +-$CATOP="./demoCA"; ++$CATOP="/etc/ssl"; + $CAKEY="cakey.pem"; + $CAREQ="careq.pem"; + $CACERT="cacert.pem"; +--- apps/CA.sh 2009-10-15 19:27:47.000000000 +0200 ++++ apps/CA.sh 2010-04-01 00:35:02.600553509 +0200 +@@ -68,7 +68,7 @@ + X509="$OPENSSL x509" + PKCS12="openssl pkcs12" + +-if [ -z "$CATOP" ] ; then CATOP=./demoCA ; fi ++if [ -z "$CATOP" ] ; then CATOP=/etc/ssl ; fi + CAKEY=./cakey.pem + CAREQ=./careq.pem + CACERT=./cacert.pem +--- apps/openssl.cnf 2009-04-04 20:09:43.000000000 +0200 ++++ apps/openssl.cnf 2010-04-01 00:35:02.607220681 +0200 +@@ -39,7 +39,7 @@ + #################################################################### + [ CA_default ] + +-dir = ./demoCA # Where everything is kept ++dir = /etc/ssl # Where everything is kept + certs = $dir/certs # Where the issued certs are kept + crl_dir = $dir/crl # Where the issued crl are kept + database = $dir/index.txt # database index file. diff --git a/testing/openssl/fix-manpages.patch b/testing/openssl/fix-manpages.patch new file mode 100644 index 000000000..0a300f3b9 --- /dev/null +++ b/testing/openssl/fix-manpages.patch @@ -0,0 +1,1920 @@ +Submitted By: Robert Connolly <robert at linuxfromscratch dot org> +Date: 2005-11-13 +Initial Package Version: 0.9.8a +Upstream Status: Submitted upstream +Origin: Anderson Lizardo +Description: This patch fixes conflicts between man pages + installed by OpenSSL and those found on other + packages (particulary Shadow, Perl, and + Man-pages). It also fixes syntax errors on some + POD files that generates slightly broken man + pages. Rediffed for 1.0.0a by Ken Moffat + +diff -Naur openssl-1.0.0a.orig//crypto/rand/md_rand.c openssl-1.0.0a/crypto/rand/md_rand.c +--- openssl-1.0.0a.orig//crypto/rand/md_rand.c 2009-01-03 09:25:32.000000000 +0000 ++++ openssl-1.0.0a/crypto/rand/md_rand.c 2010-09-01 19:36:31.604126440 +0100 +@@ -196,7 +196,7 @@ + int do_not_lock; + + /* +- * (Based on the rand(3) manpage) ++ * (Based on the openssl_rand(3) manpage) + * + * The input is chopped up into units of 20 bytes (or less for + * the last block). Each of these blocks is run through the hash +@@ -361,7 +361,7 @@ + num_ceil = (1 + (num-1)/(MD_DIGEST_LENGTH/2)) * (MD_DIGEST_LENGTH/2); + + /* +- * (Based on the rand(3) manpage:) ++ * (Based on the openssl_rand(3) manpage) + * + * For each group of 10 bytes (or less), we do the following: + * +diff -Naur openssl-1.0.0a.orig//doc/apps/openssl-passwd.pod openssl-1.0.0a/doc/apps/openssl-passwd.pod +--- openssl-1.0.0a.orig//doc/apps/openssl-passwd.pod 1970-01-01 01:00:00.000000000 +0100 ++++ openssl-1.0.0a/doc/apps/openssl-passwd.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -0,0 +1,82 @@ ++=pod ++ ++=head1 NAME ++ ++openssl-passwd - compute password hashes ++ ++=head1 SYNOPSIS ++ ++B<openssl passwd> ++[B<-crypt>] ++[B<-1>] ++[B<-apr1>] ++[B<-salt> I<string>] ++[B<-in> I<file>] ++[B<-stdin>] ++[B<-noverify>] ++[B<-quiet>] ++[B<-table>] ++{I<password>} ++ ++=head1 DESCRIPTION ++ ++The B<passwd> command computes the hash of a password typed at ++run-time or the hash of each password in a list. The password list is ++taken from the named file for option B<-in file>, from stdin for ++option B<-stdin>, or from the command line, or from the terminal otherwise. ++The Unix standard algorithm B<crypt> and the MD5-based BSD password ++algorithm B<1> and its Apache variant B<apr1> are available. ++ ++=head1 OPTIONS ++ ++=over 4 ++ ++=item B<-crypt> ++ ++Use the B<crypt> algorithm (default). ++ ++=item B<-1> ++ ++Use the MD5 based BSD password algorithm B<1>. ++ ++=item B<-apr1> ++ ++Use the B<apr1> algorithm (Apache variant of the BSD algorithm). ++ ++=item B<-salt> I<string> ++ ++Use the specified salt. ++When reading a password from the terminal, this implies B<-noverify>. ++ ++=item B<-in> I<file> ++ ++Read passwords from I<file>. ++ ++=item B<-stdin> ++ ++Read passwords from B<stdin>. ++ ++=item B<-noverify> ++ ++Don't verify when reading a password from the terminal. ++ ++=item B<-quiet> ++ ++Don't output warnings when passwords given at the command line are truncated. ++ ++=item B<-table> ++ ++In the output list, prepend the cleartext password and a TAB character ++to each password hash. ++ ++=back ++ ++=head1 EXAMPLES ++ ++B<openssl passwd -crypt -salt xx password> prints B<xxj31ZMTZzkVA>. ++ ++B<openssl passwd -1 -salt xxxxxxxx password> prints B<$1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a.>. ++ ++B<openssl passwd -apr1 -salt xxxxxxxx password> prints B<$apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0>. ++ ++=cut +diff -Naur openssl-1.0.0a.orig//doc/apps/openssl.pod openssl-1.0.0a/doc/apps/openssl.pod +--- openssl-1.0.0a.orig//doc/apps/openssl.pod 2010-01-21 18:46:28.000000000 +0000 ++++ openssl-1.0.0a/doc/apps/openssl.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -163,7 +163,7 @@ + + Online Certificate Status Protocol utility. + +-=item L<B<passwd>|passwd(1)> ++=item L<B<passwd>|openssl-passwd(1)> + + Generation of hashed passwords. + +@@ -401,7 +401,7 @@ + L<dhparam(1)|dhparam(1)>, L<dsa(1)|dsa(1)>, L<dsaparam(1)|dsaparam(1)>, + L<enc(1)|enc(1)>, L<gendsa(1)|gendsa(1)>, L<genpkey(1)|genpkey(1)>, + L<genrsa(1)|genrsa(1)>, L<nseq(1)|nseq(1)>, L<openssl(1)|openssl(1)>, +-L<passwd(1)|passwd(1)>, ++L<openssl-passwd(1)|openssl-passwd(1)>, + L<pkcs12(1)|pkcs12(1)>, L<pkcs7(1)|pkcs7(1)>, L<pkcs8(1)|pkcs8(1)>, + L<rand(1)|rand(1)>, L<req(1)|req(1)>, L<rsa(1)|rsa(1)>, + L<rsautl(1)|rsautl(1)>, L<s_client(1)|s_client(1)>, +diff -Naur openssl-1.0.0a.orig//doc/apps/passwd.pod openssl-1.0.0a/doc/apps/passwd.pod +--- openssl-1.0.0a.orig//doc/apps/passwd.pod 2002-10-04 13:59:00.000000000 +0100 ++++ openssl-1.0.0a/doc/apps/passwd.pod 1970-01-01 01:00:00.000000000 +0100 +@@ -1,82 +0,0 @@ +-=pod +- +-=head1 NAME +- +-passwd - compute password hashes +- +-=head1 SYNOPSIS +- +-B<openssl passwd> +-[B<-crypt>] +-[B<-1>] +-[B<-apr1>] +-[B<-salt> I<string>] +-[B<-in> I<file>] +-[B<-stdin>] +-[B<-noverify>] +-[B<-quiet>] +-[B<-table>] +-{I<password>} +- +-=head1 DESCRIPTION +- +-The B<passwd> command computes the hash of a password typed at +-run-time or the hash of each password in a list. The password list is +-taken from the named file for option B<-in file>, from stdin for +-option B<-stdin>, or from the command line, or from the terminal otherwise. +-The Unix standard algorithm B<crypt> and the MD5-based BSD password +-algorithm B<1> and its Apache variant B<apr1> are available. +- +-=head1 OPTIONS +- +-=over 4 +- +-=item B<-crypt> +- +-Use the B<crypt> algorithm (default). +- +-=item B<-1> +- +-Use the MD5 based BSD password algorithm B<1>. +- +-=item B<-apr1> +- +-Use the B<apr1> algorithm (Apache variant of the BSD algorithm). +- +-=item B<-salt> I<string> +- +-Use the specified salt. +-When reading a password from the terminal, this implies B<-noverify>. +- +-=item B<-in> I<file> +- +-Read passwords from I<file>. +- +-=item B<-stdin> +- +-Read passwords from B<stdin>. +- +-=item B<-noverify> +- +-Don't verify when reading a password from the terminal. +- +-=item B<-quiet> +- +-Don't output warnings when passwords given at the command line are truncated. +- +-=item B<-table> +- +-In the output list, prepend the cleartext password and a TAB character +-to each password hash. +- +-=back +- +-=head1 EXAMPLES +- +-B<openssl passwd -crypt -salt xx password> prints B<xxj31ZMTZzkVA>. +- +-B<openssl passwd -1 -salt xxxxxxxx password> prints B<$1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a.>. +- +-B<openssl passwd -apr1 -salt xxxxxxxx password> prints B<$apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0>. +- +-=cut +diff -Naur openssl-1.0.0a.orig//doc/crypto/BN_generate_prime.pod openssl-1.0.0a/doc/crypto/BN_generate_prime.pod +--- openssl-1.0.0a.orig//doc/crypto/BN_generate_prime.pod 2003-01-13 13:18:22.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/BN_generate_prime.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -90,7 +90,7 @@ + + =head1 SEE ALSO + +-L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)> ++L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<openssl_rand(3)|openssl_rand(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/bn.pod openssl-1.0.0a/doc/crypto/bn.pod +--- openssl-1.0.0a.orig//doc/crypto/bn.pod 2008-07-03 20:59:24.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/bn.pod 2010-09-01 19:36:31.620125025 +0100 +@@ -167,7 +167,7 @@ + =head1 SEE ALSO + + L<bn_internal(3)|bn_internal(3)>, +-L<dh(3)|dh(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, ++L<dh(3)|dh(3)>, L<openssl_err(3)|openssl_err(3)>, L<openssl_rand(3)|openssl_rand(3)>, L<rsa(3)|rsa(3)>, + L<BN_new(3)|BN_new(3)>, L<BN_CTX_new(3)|BN_CTX_new(3)>, + L<BN_copy(3)|BN_copy(3)>, L<BN_swap(3)|BN_swap(3)>, L<BN_num_bytes(3)|BN_num_bytes(3)>, + L<BN_add(3)|BN_add(3)>, L<BN_add_word(3)|BN_add_word(3)>, +diff -Naur openssl-1.0.0a.orig//doc/crypto/BN_rand.pod openssl-1.0.0a/doc/crypto/BN_rand.pod +--- openssl-1.0.0a.orig//doc/crypto/BN_rand.pod 2002-09-25 14:33:26.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/BN_rand.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -45,7 +45,7 @@ + + =head1 SEE ALSO + +-L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, ++L<bn(3)|bn(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<openssl_rand(3)|openssl_rand(3)>, + L<RAND_add(3)|RAND_add(3)>, L<RAND_bytes(3)|RAND_bytes(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/CONF_modules_free.pod openssl-1.0.0a/doc/crypto/CONF_modules_free.pod +--- openssl-1.0.0a.orig//doc/crypto/CONF_modules_free.pod 2006-12-21 21:13:27.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/CONF_modules_free.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -37,7 +37,7 @@ + =head1 SEE ALSO + + L<conf(5)|conf(5)>, L<OPENSSL_config(3)|OPENSSL_config(3)>, +-L<CONF_modules_load_file(3), CONF_modules_load_file(3)> ++L<CONF_modules_load_file(3)|CONF_modules_load_file(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/CONF_modules_load_file.pod openssl-1.0.0a/doc/crypto/CONF_modules_load_file.pod +--- openssl-1.0.0a.orig//doc/crypto/CONF_modules_load_file.pod 2004-03-02 13:31:32.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/CONF_modules_load_file.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -51,7 +51,7 @@ + =head1 SEE ALSO + + L<conf(5)|conf(5)>, L<OPENSSL_config(3)|OPENSSL_config(3)>, +-L<CONF_free(3), CONF_free(3)>, L<err(3),err(3)> ++L<CONF_free(3)|CONF_free(3)>, L<openssl_err(3)|openssl_err(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/crypto.pod openssl-1.0.0a/doc/crypto/crypto.pod +--- openssl-1.0.0a.orig//doc/crypto/crypto.pod 2002-10-06 13:59:25.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/crypto.pod 2010-09-01 19:36:31.620125025 +0100 +@@ -46,7 +46,7 @@ + + =item AUXILIARY FUNCTIONS + +-L<err(3)|err(3)>, L<threads(3)|threads(3)>, L<rand(3)|rand(3)>, ++L<openssl_err(3)|openssl_err(3)>, L<openssl_threads(3)|openssl_threads(3)>, L<openssl_rand(3)|openssl_rand(3)>, + L<OPENSSL_VERSION_NUMBER(3)|OPENSSL_VERSION_NUMBER(3)> + + =item INPUT/OUTPUT, DATA ENCODING +diff -Naur openssl-1.0.0a.orig//doc/crypto/des.pod openssl-1.0.0a/doc/crypto/des.pod +--- openssl-1.0.0a.orig//doc/crypto/des.pod 2003-10-01 16:02:45.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/des.pod 2010-09-01 19:36:31.620125025 +0100 +@@ -115,7 +115,7 @@ + the key; it is used to speed the encryption process. + + DES_random_key() generates a random key. The PRNG must be seeded +-prior to using this function (see L<rand(3)|rand(3)>). If the PRNG ++prior to using this function (see L<openssl_rand(3)|openssl_rand(3)>). If the PRNG + could not generate a secure key, 0 is returned. + + Before a DES key can be used, it must be converted into the +@@ -317,7 +317,7 @@ + + =head1 SEE ALSO + +-crypt(3), L<des_modes(7)|des_modes(7)>, L<evp(3)|evp(3)>, L<rand(3)|rand(3)> ++crypt(3), L<des_modes(7)|des_modes(7)>, L<evp(3)|evp(3)>, L<openssl_rand(3)|openssl_rand(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/DH_generate_key.pod openssl-1.0.0a/doc/crypto/DH_generate_key.pod +--- openssl-1.0.0a.orig//doc/crypto/DH_generate_key.pod 2002-09-25 14:33:27.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/DH_generate_key.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -40,7 +40,7 @@ + + =head1 SEE ALSO + +-L<dh(3)|dh(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, L<DH_size(3)|DH_size(3)> ++L<dh(3)|dh(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<openssl_rand(3)|openssl_rand(3)>, L<DH_size(3)|DH_size(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/DH_generate_parameters.pod openssl-1.0.0a/doc/crypto/DH_generate_parameters.pod +--- openssl-1.0.0a.orig//doc/crypto/DH_generate_parameters.pod 2002-09-25 14:33:27.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/DH_generate_parameters.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -59,7 +59,7 @@ + + =head1 SEE ALSO + +-L<dh(3)|dh(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, ++L<dh(3)|dh(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<openssl_rand(3)|openssl_rand(3)>, + L<DH_free(3)|DH_free(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/dh.pod openssl-1.0.0a/doc/crypto/dh.pod +--- openssl-1.0.0a.orig//doc/crypto/dh.pod 2002-08-05 17:27:01.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/dh.pod 2010-09-01 19:36:31.620125025 +0100 +@@ -67,8 +67,8 @@ + + =head1 SEE ALSO + +-L<dhparam(1)|dhparam(1)>, L<bn(3)|bn(3)>, L<dsa(3)|dsa(3)>, L<err(3)|err(3)>, +-L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, L<engine(3)|engine(3)>, ++L<dhparam(1)|dhparam(1)>, L<bn(3)|bn(3)>, L<dsa(3)|dsa(3)>, L<openssl_err(3)|openssl_err(3)>, ++L<openssl_rand(3)|openssl_rand(3)>, L<rsa(3)|rsa(3)>, L<engine(3)|engine(3)>, + L<DH_set_method(3)|DH_set_method(3)>, L<DH_new(3)|DH_new(3)>, + L<DH_get_ex_new_index(3)|DH_get_ex_new_index(3)>, + L<DH_generate_parameters(3)|DH_generate_parameters(3)>, +diff -Naur openssl-1.0.0a.orig//doc/crypto/DSA_do_sign.pod openssl-1.0.0a/doc/crypto/DSA_do_sign.pod +--- openssl-1.0.0a.orig//doc/crypto/DSA_do_sign.pod 2002-09-25 14:33:27.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/DSA_do_sign.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -36,7 +36,7 @@ + + =head1 SEE ALSO + +-L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, ++L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<openssl_rand(3)|openssl_rand(3)>, + L<DSA_SIG_new(3)|DSA_SIG_new(3)>, + L<DSA_sign(3)|DSA_sign(3)> + +diff -Naur openssl-1.0.0a.orig//doc/crypto/DSA_generate_key.pod openssl-1.0.0a/doc/crypto/DSA_generate_key.pod +--- openssl-1.0.0a.orig//doc/crypto/DSA_generate_key.pod 2002-09-25 14:33:27.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/DSA_generate_key.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -24,7 +24,7 @@ + + =head1 SEE ALSO + +-L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, ++L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<openssl_rand(3)|openssl_rand(3)>, + L<DSA_generate_parameters(3)|DSA_generate_parameters(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/DSA_generate_parameters.pod openssl-1.0.0a/doc/crypto/DSA_generate_parameters.pod +--- openssl-1.0.0a.orig//doc/crypto/DSA_generate_parameters.pod 2002-09-25 14:33:27.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/DSA_generate_parameters.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -90,7 +90,7 @@ + + =head1 SEE ALSO + +-L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, ++L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<openssl_rand(3)|openssl_rand(3)>, + L<DSA_free(3)|DSA_free(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/dsa.pod openssl-1.0.0a/doc/crypto/dsa.pod +--- openssl-1.0.0a.orig//doc/crypto/dsa.pod 2002-08-05 17:27:01.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/dsa.pod 2010-09-01 19:36:31.620125025 +0100 +@@ -100,7 +100,7 @@ + + =head1 SEE ALSO + +-L<bn(3)|bn(3)>, L<dh(3)|dh(3)>, L<err(3)|err(3)>, L<rand(3)|rand(3)>, ++L<bn(3)|bn(3)>, L<dh(3)|dh(3)>, L<openssl_err(3)|openssl_err(3)>, L<openssl_rand(3)|openssl_rand(3)>, + L<rsa(3)|rsa(3)>, L<sha(3)|sha(3)>, L<engine(3)|engine(3)>, + L<DSA_new(3)|DSA_new(3)>, + L<DSA_size(3)|DSA_size(3)>, +diff -Naur openssl-1.0.0a.orig//doc/crypto/DSA_sign.pod openssl-1.0.0a/doc/crypto/DSA_sign.pod +--- openssl-1.0.0a.orig//doc/crypto/DSA_sign.pod 2002-09-25 14:33:27.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/DSA_sign.pod 2010-09-01 19:36:31.608126088 +0100 +@@ -55,7 +55,7 @@ + + =head1 SEE ALSO + +-L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, ++L<dsa(3)|dsa(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, L<openssl_rand(3)|openssl_rand(3)>, + L<DSA_do_sign(3)|DSA_do_sign(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/engine.pod openssl-1.0.0a/doc/crypto/engine.pod +--- openssl-1.0.0a.orig//doc/crypto/engine.pod 2007-11-19 09:18:03.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/engine.pod 2010-09-01 19:36:31.620125025 +0100 +@@ -594,6 +594,6 @@ + + =head1 SEE ALSO + +-L<rsa(3)|rsa(3)>, L<dsa(3)|dsa(3)>, L<dh(3)|dh(3)>, L<rand(3)|rand(3)> ++L<rsa(3)|rsa(3)>, L<dsa(3)|dsa(3)>, L<dh(3)|dh(3)>, L<openssl_rand(3)|openssl_rand(3)> + + =cut +diff -Naur openssl-1.0.0a.orig//doc/crypto/ERR_clear_error.pod openssl-1.0.0a/doc/crypto/ERR_clear_error.pod +--- openssl-1.0.0a.orig//doc/crypto/ERR_clear_error.pod 2000-02-01 01:36:58.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/ERR_clear_error.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -20,7 +20,7 @@ + + =head1 SEE ALSO + +-L<err(3)|err(3)>, L<ERR_get_error(3)|ERR_get_error(3)> ++L<openssl_err(3)|openssl_err(3)>, L<ERR_get_error(3)|ERR_get_error(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/ERR_error_string.pod openssl-1.0.0a/doc/crypto/ERR_error_string.pod +--- openssl-1.0.0a.orig//doc/crypto/ERR_error_string.pod 2004-11-14 15:11:37.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/ERR_error_string.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -60,7 +60,7 @@ + + =head1 SEE ALSO + +-L<err(3)|err(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, ++L<openssl_err(3)|openssl_err(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, + L<ERR_load_crypto_strings(3)|ERR_load_crypto_strings(3)>, + L<SSL_load_error_strings(3)|SSL_load_error_strings(3)> + L<ERR_print_errors(3)|ERR_print_errors(3)> +diff -Naur openssl-1.0.0a.orig//doc/crypto/ERR_get_error.pod openssl-1.0.0a/doc/crypto/ERR_get_error.pod +--- openssl-1.0.0a.orig//doc/crypto/ERR_get_error.pod 2002-11-29 14:21:54.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/ERR_get_error.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -61,7 +61,7 @@ + + =head1 SEE ALSO + +-L<err(3)|err(3)>, L<ERR_error_string(3)|ERR_error_string(3)>, ++L<openssl_err(3)|openssl_err(3)>, L<ERR_error_string(3)|ERR_error_string(3)>, + L<ERR_GET_LIB(3)|ERR_GET_LIB(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/ERR_GET_LIB.pod openssl-1.0.0a/doc/crypto/ERR_GET_LIB.pod +--- openssl-1.0.0a.orig//doc/crypto/ERR_GET_LIB.pod 2000-02-01 01:36:58.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/ERR_GET_LIB.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -41,7 +41,7 @@ + + =head1 SEE ALSO + +-L<err(3)|err(3)>, L<ERR_get_error(3)|ERR_get_error(3)> ++L<openssl_err(3)|openssl_err(3)>, L<ERR_get_error(3)|ERR_get_error(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/ERR_load_crypto_strings.pod openssl-1.0.0a/doc/crypto/ERR_load_crypto_strings.pod +--- openssl-1.0.0a.orig//doc/crypto/ERR_load_crypto_strings.pod 2000-02-24 11:55:08.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/ERR_load_crypto_strings.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -35,7 +35,7 @@ + + =head1 SEE ALSO + +-L<err(3)|err(3)>, L<ERR_error_string(3)|ERR_error_string(3)> ++L<openssl_err(3)|openssl_err(3)>, L<ERR_error_string(3)|ERR_error_string(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/ERR_load_strings.pod openssl-1.0.0a/doc/crypto/ERR_load_strings.pod +--- openssl-1.0.0a.orig//doc/crypto/ERR_load_strings.pod 2000-02-24 11:55:08.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/ERR_load_strings.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -43,7 +43,7 @@ + + =head1 SEE ALSO + +-L<err(3)|err(3)>, L<ERR_load_strings(3)|ERR_load_strings(3)> ++L<openssl_err(3)|openssl_err(3)>, L<ERR_load_strings(3)|ERR_load_strings(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/err.pod openssl-1.0.0a/doc/crypto/err.pod +--- openssl-1.0.0a.orig//doc/crypto/err.pod 2002-07-10 20:35:46.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/err.pod 1970-01-01 01:00:00.000000000 +0100 +@@ -1,187 +0,0 @@ +-=pod +- +-=head1 NAME +- +-err - error codes +- +-=head1 SYNOPSIS +- +- #include <openssl/err.h> +- +- unsigned long ERR_get_error(void); +- unsigned long ERR_peek_error(void); +- unsigned long ERR_get_error_line(const char **file, int *line); +- unsigned long ERR_peek_error_line(const char **file, int *line); +- unsigned long ERR_get_error_line_data(const char **file, int *line, +- const char **data, int *flags); +- unsigned long ERR_peek_error_line_data(const char **file, int *line, +- const char **data, int *flags); +- +- int ERR_GET_LIB(unsigned long e); +- int ERR_GET_FUNC(unsigned long e); +- int ERR_GET_REASON(unsigned long e); +- +- void ERR_clear_error(void); +- +- char *ERR_error_string(unsigned long e, char *buf); +- const char *ERR_lib_error_string(unsigned long e); +- const char *ERR_func_error_string(unsigned long e); +- const char *ERR_reason_error_string(unsigned long e); +- +- void ERR_print_errors(BIO *bp); +- void ERR_print_errors_fp(FILE *fp); +- +- void ERR_load_crypto_strings(void); +- void ERR_free_strings(void); +- +- void ERR_remove_state(unsigned long pid); +- +- void ERR_put_error(int lib, int func, int reason, const char *file, +- int line); +- void ERR_add_error_data(int num, ...); +- +- void ERR_load_strings(int lib,ERR_STRING_DATA str[]); +- unsigned long ERR_PACK(int lib, int func, int reason); +- int ERR_get_next_error_library(void); +- +-=head1 DESCRIPTION +- +-When a call to the OpenSSL library fails, this is usually signalled +-by the return value, and an error code is stored in an error queue +-associated with the current thread. The B<err> library provides +-functions to obtain these error codes and textual error messages. +- +-The L<ERR_get_error(3)|ERR_get_error(3)> manpage describes how to +-access error codes. +- +-Error codes contain information about where the error occurred, and +-what went wrong. L<ERR_GET_LIB(3)|ERR_GET_LIB(3)> describes how to +-extract this information. A method to obtain human-readable error +-messages is described in L<ERR_error_string(3)|ERR_error_string(3)>. +- +-L<ERR_clear_error(3)|ERR_clear_error(3)> can be used to clear the +-error queue. +- +-Note that L<ERR_remove_state(3)|ERR_remove_state(3)> should be used to +-avoid memory leaks when threads are terminated. +- +-=head1 ADDING NEW ERROR CODES TO OPENSSL +- +-See L<ERR_put_error(3)> if you want to record error codes in the +-OpenSSL error system from within your application. +- +-The remainder of this section is of interest only if you want to add +-new error codes to OpenSSL or add error codes from external libraries. +- +-=head2 Reporting errors +- +-Each sub-library has a specific macro XXXerr() that is used to report +-errors. Its first argument is a function code B<XXX_F_...>, the second +-argument is a reason code B<XXX_R_...>. Function codes are derived +-from the function names; reason codes consist of textual error +-descriptions. For example, the function ssl23_read() reports a +-"handshake failure" as follows: +- +- SSLerr(SSL_F_SSL23_READ, SSL_R_SSL_HANDSHAKE_FAILURE); +- +-Function and reason codes should consist of upper case characters, +-numbers and underscores only. The error file generation script translates +-function codes into function names by looking in the header files +-for an appropriate function name, if none is found it just uses +-the capitalized form such as "SSL23_READ" in the above example. +- +-The trailing section of a reason code (after the "_R_") is translated +-into lower case and underscores changed to spaces. +- +-When you are using new function or reason codes, run B<make errors>. +-The necessary B<#define>s will then automatically be added to the +-sub-library's header file. +- +-Although a library will normally report errors using its own specific +-XXXerr macro, another library's macro can be used. This is normally +-only done when a library wants to include ASN1 code which must use +-the ASN1err() macro. +- +-=head2 Adding new libraries +- +-When adding a new sub-library to OpenSSL, assign it a library number +-B<ERR_LIB_XXX>, define a macro XXXerr() (both in B<err.h>), add its +-name to B<ERR_str_libraries[]> (in B<crypto/err/err.c>), and add +-C<ERR_load_XXX_strings()> to the ERR_load_crypto_strings() function +-(in B<crypto/err/err_all.c>). Finally, add an entry +- +- L XXX xxx.h xxx_err.c +- +-to B<crypto/err/openssl.ec>, and add B<xxx_err.c> to the Makefile. +-Running B<make errors> will then generate a file B<xxx_err.c>, and +-add all error codes used in the library to B<xxx.h>. +- +-Additionally the library include file must have a certain form. +-Typically it will initially look like this: +- +- #ifndef HEADER_XXX_H +- #define HEADER_XXX_H +- +- #ifdef __cplusplus +- extern "C" { +- #endif +- +- /* Include files */ +- +- #include <openssl/bio.h> +- #include <openssl/x509.h> +- +- /* Macros, structures and function prototypes */ +- +- +- /* BEGIN ERROR CODES */ +- +-The B<BEGIN ERROR CODES> sequence is used by the error code +-generation script as the point to place new error codes, any text +-after this point will be overwritten when B<make errors> is run. +-The closing #endif etc will be automatically added by the script. +- +-The generated C error code file B<xxx_err.c> will load the header +-files B<stdio.h>, B<openssl/err.h> and B<openssl/xxx.h> so the +-header file must load any additional header files containing any +-definitions it uses. +- +-=head1 USING ERROR CODES IN EXTERNAL LIBRARIES +- +-It is also possible to use OpenSSL's error code scheme in external +-libraries. The library needs to load its own codes and call the OpenSSL +-error code insertion script B<mkerr.pl> explicitly to add codes to +-the header file and generate the C error code file. This will normally +-be done if the external library needs to generate new ASN1 structures +-but it can also be used to add more general purpose error code handling. +- +-TBA more details +- +-=head1 INTERNALS +- +-The error queues are stored in a hash table with one B<ERR_STATE> +-entry for each pid. ERR_get_state() returns the current thread's +-B<ERR_STATE>. An B<ERR_STATE> can hold up to B<ERR_NUM_ERRORS> error +-codes. When more error codes are added, the old ones are overwritten, +-on the assumption that the most recent errors are most important. +- +-Error strings are also stored in hash table. The hash tables can +-be obtained by calling ERR_get_err_state_table(void) and +-ERR_get_string_table(void) respectively. +- +-=head1 SEE ALSO +- +-L<CRYPTO_set_id_callback(3)|CRYPTO_set_id_callback(3)>, +-L<CRYPTO_set_locking_callback(3)|CRYPTO_set_locking_callback(3)>, +-L<ERR_get_error(3)|ERR_get_error(3)>, +-L<ERR_GET_LIB(3)|ERR_GET_LIB(3)>, +-L<ERR_clear_error(3)|ERR_clear_error(3)>, +-L<ERR_error_string(3)|ERR_error_string(3)>, +-L<ERR_print_errors(3)|ERR_print_errors(3)>, +-L<ERR_load_crypto_strings(3)|ERR_load_crypto_strings(3)>, +-L<ERR_remove_state(3)|ERR_remove_state(3)>, +-L<ERR_put_error(3)|ERR_put_error(3)>, +-L<ERR_load_strings(3)|ERR_load_strings(3)>, +-L<SSL_get_error(3)|SSL_get_error(3)> +- +-=cut +diff -Naur openssl-1.0.0a.orig//doc/crypto/ERR_print_errors.pod openssl-1.0.0a/doc/crypto/ERR_print_errors.pod +--- openssl-1.0.0a.orig//doc/crypto/ERR_print_errors.pod 2000-02-01 01:36:59.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/ERR_print_errors.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -38,7 +38,7 @@ + + =head1 SEE ALSO + +-L<err(3)|err(3)>, L<ERR_error_string(3)|ERR_error_string(3)>, ++L<openssl_err(3)|openssl_err(3)>, L<ERR_error_string(3)|ERR_error_string(3)>, + L<ERR_get_error(3)|ERR_get_error(3)>, + L<ERR_load_crypto_strings(3)|ERR_load_crypto_strings(3)>, + L<SSL_load_error_strings(3)|SSL_load_error_strings(3)> +diff -Naur openssl-1.0.0a.orig//doc/crypto/ERR_put_error.pod openssl-1.0.0a/doc/crypto/ERR_put_error.pod +--- openssl-1.0.0a.orig//doc/crypto/ERR_put_error.pod 2000-02-24 11:55:08.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/ERR_put_error.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -34,7 +34,7 @@ + + =head1 SEE ALSO + +-L<err(3)|err(3)>, L<ERR_load_strings(3)|ERR_load_strings(3)> ++L<openssl_err(3)|openssl_err(3)>, L<ERR_load_strings(3)|ERR_load_strings(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/ERR_remove_state.pod openssl-1.0.0a/doc/crypto/ERR_remove_state.pod +--- openssl-1.0.0a.orig//doc/crypto/ERR_remove_state.pod 2000-05-19 08:54:42.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/ERR_remove_state.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -25,7 +25,7 @@ + + =head1 SEE ALSO + +-L<err(3)|err(3)> ++L<openssl_err(3)|openssl_err(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/EVP_BytesToKey.pod openssl-1.0.0a/doc/crypto/EVP_BytesToKey.pod +--- openssl-1.0.0a.orig//doc/crypto/EVP_BytesToKey.pod 2004-11-25 17:47:30.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/EVP_BytesToKey.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -59,7 +59,7 @@ + + =head1 SEE ALSO + +-L<evp(3)|evp(3)>, L<rand(3)|rand(3)>, ++L<evp(3)|evp(3)>, L<openssl_rand(3)|openssl_rand(3)>, + L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/EVP_OpenInit.pod openssl-1.0.0a/doc/crypto/EVP_OpenInit.pod +--- openssl-1.0.0a.orig//doc/crypto/EVP_OpenInit.pod 2000-09-23 08:16:14.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/EVP_OpenInit.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -54,7 +54,7 @@ + + =head1 SEE ALSO + +-L<evp(3)|evp(3)>, L<rand(3)|rand(3)>, ++L<evp(3)|evp(3)>, L<openssl_rand(3)|openssl_rand(3)>, + L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, + L<EVP_SealInit(3)|EVP_SealInit(3)> + +diff -Naur openssl-1.0.0a.orig//doc/crypto/EVP_SealInit.pod openssl-1.0.0a/doc/crypto/EVP_SealInit.pod +--- openssl-1.0.0a.orig//doc/crypto/EVP_SealInit.pod 2005-03-29 18:50:08.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/EVP_SealInit.pod 2010-09-01 19:36:31.612125737 +0100 +@@ -74,7 +74,7 @@ + + =head1 SEE ALSO + +-L<evp(3)|evp(3)>, L<rand(3)|rand(3)>, ++L<evp(3)|evp(3)>, L<openssl_rand(3)|openssl_rand(3)>, + L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, + L<EVP_OpenInit(3)|EVP_OpenInit(3)> + +diff -Naur openssl-1.0.0a.orig//doc/crypto/EVP_SignInit.pod openssl-1.0.0a/doc/crypto/EVP_SignInit.pod +--- openssl-1.0.0a.orig//doc/crypto/EVP_SignInit.pod 2006-07-12 13:31:29.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/EVP_SignInit.pod 2010-09-01 19:36:31.616125383 +0100 +@@ -89,7 +89,7 @@ + =head1 SEE ALSO + + L<EVP_VerifyInit(3)|EVP_VerifyInit(3)>, +-L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, ++L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<openssl_err(3)|openssl_err(3)>, + L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, + L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, + L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> +diff -Naur openssl-1.0.0a.orig//doc/crypto/EVP_VerifyInit.pod openssl-1.0.0a/doc/crypto/EVP_VerifyInit.pod +--- openssl-1.0.0a.orig//doc/crypto/EVP_VerifyInit.pod 2006-07-12 13:31:30.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/EVP_VerifyInit.pod 2010-09-01 19:36:31.616125383 +0100 +@@ -80,7 +80,7 @@ + + L<evp(3)|evp(3)>, + L<EVP_SignInit(3)|EVP_SignInit(3)>, +-L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<err(3)|err(3)>, ++L<EVP_DigestInit(3)|EVP_DigestInit(3)>, L<openssl_err(3)|openssl_err(3)>, + L<evp(3)|evp(3)>, L<hmac(3)|hmac(3)>, L<md2(3)|md2(3)>, + L<md5(3)|md5(3)>, L<mdc2(3)|mdc2(3)>, L<ripemd(3)|ripemd(3)>, + L<sha(3)|sha(3)>, L<dgst(1)|dgst(1)> +diff -Naur openssl-1.0.0a.orig//doc/crypto/OPENSSL_config.pod openssl-1.0.0a/doc/crypto/OPENSSL_config.pod +--- openssl-1.0.0a.orig//doc/crypto/OPENSSL_config.pod 2005-06-03 00:19:56.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/OPENSSL_config.pod 2010-09-01 19:36:31.616125383 +0100 +@@ -73,7 +73,7 @@ + =head1 SEE ALSO + + L<conf(5)|conf(5)>, L<CONF_load_modules_file(3)|CONF_load_modules_file(3)>, +-L<CONF_modules_free(3),CONF_modules_free(3)> ++L<CONF_modules_free(3)|CONF_modules_free(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/openssl_err.pod openssl-1.0.0a/doc/crypto/openssl_err.pod +--- openssl-1.0.0a.orig//doc/crypto/openssl_err.pod 1970-01-01 01:00:00.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/openssl_err.pod 2010-09-01 19:36:31.624124669 +0100 +@@ -0,0 +1,187 @@ ++=pod ++ ++=head1 NAME ++ ++openssl_err - error codes ++ ++=head1 SYNOPSIS ++ ++ #include <openssl/err.h> ++ ++ unsigned long ERR_get_error(void); ++ unsigned long ERR_peek_error(void); ++ unsigned long ERR_get_error_line(const char **file, int *line); ++ unsigned long ERR_peek_error_line(const char **file, int *line); ++ unsigned long ERR_get_error_line_data(const char **file, int *line, ++ const char **data, int *flags); ++ unsigned long ERR_peek_error_line_data(const char **file, int *line, ++ const char **data, int *flags); ++ ++ int ERR_GET_LIB(unsigned long e); ++ int ERR_GET_FUNC(unsigned long e); ++ int ERR_GET_REASON(unsigned long e); ++ ++ void ERR_clear_error(void); ++ ++ char *ERR_error_string(unsigned long e, char *buf); ++ const char *ERR_lib_error_string(unsigned long e); ++ const char *ERR_func_error_string(unsigned long e); ++ const char *ERR_reason_error_string(unsigned long e); ++ ++ void ERR_print_errors(BIO *bp); ++ void ERR_print_errors_fp(FILE *fp); ++ ++ void ERR_load_crypto_strings(void); ++ void ERR_free_strings(void); ++ ++ void ERR_remove_state(unsigned long pid); ++ ++ void ERR_put_error(int lib, int func, int reason, const char *file, ++ int line); ++ void ERR_add_error_data(int num, ...); ++ ++ void ERR_load_strings(int lib,ERR_STRING_DATA str[]); ++ unsigned long ERR_PACK(int lib, int func, int reason); ++ int ERR_get_next_error_library(void); ++ ++=head1 DESCRIPTION ++ ++When a call to the OpenSSL library fails, this is usually signalled ++by the return value, and an error code is stored in an error queue ++associated with the current thread. The B<err> library provides ++functions to obtain these error codes and textual error messages. ++ ++The L<ERR_get_error(3)|ERR_get_error(3)> manpage describes how to ++access error codes. ++ ++Error codes contain information about where the error occurred, and ++what went wrong. L<ERR_GET_LIB(3)|ERR_GET_LIB(3)> describes how to ++extract this information. A method to obtain human-readable error ++messages is described in L<ERR_error_string(3)|ERR_error_string(3)>. ++ ++L<ERR_clear_error(3)|ERR_clear_error(3)> can be used to clear the ++error queue. ++ ++Note that L<ERR_remove_state(3)|ERR_remove_state(3)> should be used to ++avoid memory leaks when threads are terminated. ++ ++=head1 ADDING NEW ERROR CODES TO OPENSSL ++ ++See L<ERR_put_error(3)> if you want to record error codes in the ++OpenSSL error system from within your application. ++ ++The remainder of this section is of interest only if you want to add ++new error codes to OpenSSL or add error codes from external libraries. ++ ++=head2 Reporting errors ++ ++Each sub-library has a specific macro XXXerr() that is used to report ++errors. Its first argument is a function code B<XXX_F_...>, the second ++argument is a reason code B<XXX_R_...>. Function codes are derived ++from the function names; reason codes consist of textual error ++descriptions. For example, the function ssl23_read() reports a ++"handshake failure" as follows: ++ ++ SSLerr(SSL_F_SSL23_READ, SSL_R_SSL_HANDSHAKE_FAILURE); ++ ++Function and reason codes should consist of upper case characters, ++numbers and underscores only. The error file generation script translates ++function codes into function names by looking in the header files ++for an appropriate function name, if none is found it just uses ++the capitalized form such as "SSL23_READ" in the above example. ++ ++The trailing section of a reason code (after the "_R_") is translated ++into lower case and underscores changed to spaces. ++ ++When you are using new function or reason codes, run B<make errors>. ++The necessary B<#define>s will then automatically be added to the ++sub-library's header file. ++ ++Although a library will normally report errors using its own specific ++XXXerr macro, another library's macro can be used. This is normally ++only done when a library wants to include ASN1 code which must use ++the ASN1err() macro. ++ ++=head2 Adding new libraries ++ ++When adding a new sub-library to OpenSSL, assign it a library number ++B<ERR_LIB_XXX>, define a macro XXXerr() (both in B<err.h>), add its ++name to B<ERR_str_libraries[]> (in B<crypto/err/err.c>), and add ++C<ERR_load_XXX_strings()> to the ERR_load_crypto_strings() function ++(in B<crypto/err/err_all.c>). Finally, add an entry ++ ++ L XXX xxx.h xxx_err.c ++ ++to B<crypto/err/openssl.ec>, and add B<xxx_err.c> to the Makefile. ++Running B<make errors> will then generate a file B<xxx_err.c>, and ++add all error codes used in the library to B<xxx.h>. ++ ++Additionally the library include file must have a certain form. ++Typically it will initially look like this: ++ ++ #ifndef HEADER_XXX_H ++ #define HEADER_XXX_H ++ ++ #ifdef __cplusplus ++ extern "C" { ++ #endif ++ ++ /* Include files */ ++ ++ #include <openssl/bio.h> ++ #include <openssl/x509.h> ++ ++ /* Macros, structures and function prototypes */ ++ ++ ++ /* BEGIN ERROR CODES */ ++ ++The B<BEGIN ERROR CODES> sequence is used by the error code ++generation script as the point to place new error codes, any text ++after this point will be overwritten when B<make errors> is run. ++The closing #endif etc will be automatically added by the script. ++ ++The generated C error code file B<xxx_err.c> will load the header ++files B<stdio.h>, B<openssl/err.h> and B<openssl/xxx.h> so the ++header file must load any additional header files containing any ++definitions it uses. ++ ++=head1 USING ERROR CODES IN EXTERNAL LIBRARIES ++ ++It is also possible to use OpenSSL's error code scheme in external ++libraries. The library needs to load its own codes and call the OpenSSL ++error code insertion script B<mkerr.pl> explicitly to add codes to ++the header file and generate the C error code file. This will normally ++be done if the external library needs to generate new ASN1 structures ++but it can also be used to add more general purpose error code handling. ++ ++TBA more details ++ ++=head1 INTERNALS ++ ++The error queues are stored in a hash table with one B<ERR_STATE> ++entry for each pid. ERR_get_state() returns the current thread's ++B<ERR_STATE>. An B<ERR_STATE> can hold up to B<ERR_NUM_ERRORS> error ++codes. When more error codes are added, the old ones are overwritten, ++on the assumption that the most recent errors are most important. ++ ++Error strings are also stored in hash table. The hash tables can ++be obtained by calling ERR_get_err_state_table(void) and ++ERR_get_string_table(void) respectively. ++ ++=head1 SEE ALSO ++ ++L<CRYPTO_set_id_callback(3)|CRYPTO_set_id_callback(3)>, ++L<CRYPTO_set_locking_callback(3)|CRYPTO_set_locking_callback(3)>, ++L<ERR_get_error(3)|ERR_get_error(3)>, ++L<ERR_GET_LIB(3)|ERR_GET_LIB(3)>, ++L<ERR_clear_error(3)|ERR_clear_error(3)>, ++L<ERR_error_string(3)|ERR_error_string(3)>, ++L<ERR_print_errors(3)|ERR_print_errors(3)>, ++L<ERR_load_crypto_strings(3)|ERR_load_crypto_strings(3)>, ++L<ERR_remove_state(3)|ERR_remove_state(3)>, ++L<ERR_put_error(3)|ERR_put_error(3)>, ++L<ERR_load_strings(3)|ERR_load_strings(3)>, ++L<SSL_get_error(3)|SSL_get_error(3)> ++ ++=cut +diff -Naur openssl-1.0.0a.orig//doc/crypto/openssl_rand.pod openssl-1.0.0a/doc/crypto/openssl_rand.pod +--- openssl-1.0.0a.orig//doc/crypto/openssl_rand.pod 1970-01-01 01:00:00.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/openssl_rand.pod 2010-09-01 19:36:31.624124669 +0100 +@@ -0,0 +1,175 @@ ++=pod ++ ++=head1 NAME ++ ++openssl_rand - pseudo-random number generator ++ ++=head1 SYNOPSIS ++ ++ #include <openssl/rand.h> ++ ++ int RAND_set_rand_engine(ENGINE *engine); ++ ++ int RAND_bytes(unsigned char *buf, int num); ++ int RAND_pseudo_bytes(unsigned char *buf, int num); ++ ++ void RAND_seed(const void *buf, int num); ++ void RAND_add(const void *buf, int num, int entropy); ++ int RAND_status(void); ++ ++ int RAND_load_file(const char *file, long max_bytes); ++ int RAND_write_file(const char *file); ++ const char *RAND_file_name(char *file, size_t num); ++ ++ int RAND_egd(const char *path); ++ ++ void RAND_set_rand_method(const RAND_METHOD *meth); ++ const RAND_METHOD *RAND_get_rand_method(void); ++ RAND_METHOD *RAND_SSLeay(void); ++ ++ void RAND_cleanup(void); ++ ++ /* For Win32 only */ ++ void RAND_screen(void); ++ int RAND_event(UINT, WPARAM, LPARAM); ++ ++=head1 DESCRIPTION ++ ++Since the introduction of the ENGINE API, the recommended way of controlling ++default implementations is by using the ENGINE API functions. The default ++B<RAND_METHOD>, as set by RAND_set_rand_method() and returned by ++RAND_get_rand_method(), is only used if no ENGINE has been set as the default ++"rand" implementation. Hence, these two functions are no longer the recommened ++way to control defaults. ++ ++If an alternative B<RAND_METHOD> implementation is being used (either set ++directly or as provided by an ENGINE module), then it is entirely responsible ++for the generation and management of a cryptographically secure PRNG stream. The ++mechanisms described below relate solely to the software PRNG implementation ++built in to OpenSSL and used by default. ++ ++These functions implement a cryptographically secure pseudo-random ++number generator (PRNG). It is used by other library functions for ++example to generate random keys, and applications can use it when they ++need randomness. ++ ++A cryptographic PRNG must be seeded with unpredictable data such as ++mouse movements or keys pressed at random by the user. This is ++described in L<RAND_add(3)|RAND_add(3)>. Its state can be saved in a seed file ++(see L<RAND_load_file(3)|RAND_load_file(3)>) to avoid having to go through the ++seeding process whenever the application is started. ++ ++L<RAND_bytes(3)|RAND_bytes(3)> describes how to obtain random data from the ++PRNG. ++ ++=head1 INTERNALS ++ ++The RAND_SSLeay() method implements a PRNG based on a cryptographic ++hash function. ++ ++The following description of its design is based on the SSLeay ++documentation: ++ ++First up I will state the things I believe I need for a good RNG. ++ ++=over 4 ++ ++=item 1 ++ ++A good hashing algorithm to mix things up and to convert the RNG 'state' ++to random numbers. ++ ++=item 2 ++ ++An initial source of random 'state'. ++ ++=item 3 ++ ++The state should be very large. If the RNG is being used to generate ++4096 bit RSA keys, 2 2048 bit random strings are required (at a minimum). ++If your RNG state only has 128 bits, you are obviously limiting the ++search space to 128 bits, not 2048. I'm probably getting a little ++carried away on this last point but it does indicate that it may not be ++a bad idea to keep quite a lot of RNG state. It should be easier to ++break a cipher than guess the RNG seed data. ++ ++=item 4 ++ ++Any RNG seed data should influence all subsequent random numbers ++generated. This implies that any random seed data entered will have ++an influence on all subsequent random numbers generated. ++ ++=item 5 ++ ++When using data to seed the RNG state, the data used should not be ++extractable from the RNG state. I believe this should be a ++requirement because one possible source of 'secret' semi random ++data would be a private key or a password. This data must ++not be disclosed by either subsequent random numbers or a ++'core' dump left by a program crash. ++ ++=item 6 ++ ++Given the same initial 'state', 2 systems should deviate in their RNG state ++(and hence the random numbers generated) over time if at all possible. ++ ++=item 7 ++ ++Given the random number output stream, it should not be possible to determine ++the RNG state or the next random number. ++ ++=back ++ ++The algorithm is as follows. ++ ++There is global state made up of a 1023 byte buffer (the 'state'), a ++working hash value ('md'), and a counter ('count'). ++ ++Whenever seed data is added, it is inserted into the 'state' as ++follows. ++ ++The input is chopped up into units of 20 bytes (or less for ++the last block). Each of these blocks is run through the hash ++function as follows: The data passed to the hash function ++is the current 'md', the same number of bytes from the 'state' ++(the location determined by in incremented looping index) as ++the current 'block', the new key data 'block', and 'count' ++(which is incremented after each use). ++The result of this is kept in 'md' and also xored into the ++'state' at the same locations that were used as input into the ++hash function. I ++believe this system addresses points 1 (hash function; currently ++SHA-1), 3 (the 'state'), 4 (via the 'md'), 5 (by the use of a hash ++function and xor). ++ ++When bytes are extracted from the RNG, the following process is used. ++For each group of 10 bytes (or less), we do the following: ++ ++Input into the hash function the local 'md' (which is initialized from ++the global 'md' before any bytes are generated), the bytes that are to ++be overwritten by the random bytes, and bytes from the 'state' ++(incrementing looping index). From this digest output (which is kept ++in 'md'), the top (up to) 10 bytes are returned to the caller and the ++bottom 10 bytes are xored into the 'state'. ++ ++Finally, after we have finished 'num' random bytes for the caller, ++'count' (which is incremented) and the local and global 'md' are fed ++into the hash function and the results are kept in the global 'md'. ++ ++I believe the above addressed points 1 (use of SHA-1), 6 (by hashing ++into the 'state' the 'old' data from the caller that is about to be ++overwritten) and 7 (by not using the 10 bytes given to the caller to ++update the 'state', but they are used to update 'md'). ++ ++So of the points raised, only 2 is not addressed (but see ++L<RAND_add(3)|RAND_add(3)>). ++ ++=head1 SEE ALSO ++ ++L<BN_rand(3)|BN_rand(3)>, L<RAND_add(3)|RAND_add(3)>, ++L<RAND_load_file(3)|RAND_load_file(3)>, L<RAND_egd(3)|RAND_egd(3)>, ++L<RAND_bytes(3)|RAND_bytes(3)>, ++L<RAND_set_rand_method(3)|RAND_set_rand_method(3)>, ++L<RAND_cleanup(3)|RAND_cleanup(3)> ++ ++=cut +diff -Naur openssl-1.0.0a.orig//doc/crypto/openssl_threads.pod openssl-1.0.0a/doc/crypto/openssl_threads.pod +--- openssl-1.0.0a.orig//doc/crypto/openssl_threads.pod 1970-01-01 01:00:00.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/openssl_threads.pod 2010-09-01 19:36:31.624124669 +0100 +@@ -0,0 +1,175 @@ ++=pod ++ ++=head1 NAME ++ ++CRYPTO_set_locking_callback, CRYPTO_set_id_callback, CRYPTO_num_locks, ++CRYPTO_set_dynlock_create_callback, CRYPTO_set_dynlock_lock_callback, ++CRYPTO_set_dynlock_destroy_callback, CRYPTO_get_new_dynlockid, ++CRYPTO_destroy_dynlockid, CRYPTO_lock - OpenSSL thread support ++ ++=head1 SYNOPSIS ++ ++ #include <openssl/crypto.h> ++ ++ void CRYPTO_set_locking_callback(void (*locking_function)(int mode, ++ int n, const char *file, int line)); ++ ++ void CRYPTO_set_id_callback(unsigned long (*id_function)(void)); ++ ++ int CRYPTO_num_locks(void); ++ ++ ++ /* struct CRYPTO_dynlock_value needs to be defined by the user */ ++ struct CRYPTO_dynlock_value; ++ ++ void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value * ++ (*dyn_create_function)(char *file, int line)); ++ void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function) ++ (int mode, struct CRYPTO_dynlock_value *l, ++ const char *file, int line)); ++ void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function) ++ (struct CRYPTO_dynlock_value *l, const char *file, int line)); ++ ++ int CRYPTO_get_new_dynlockid(void); ++ ++ void CRYPTO_destroy_dynlockid(int i); ++ ++ void CRYPTO_lock(int mode, int n, const char *file, int line); ++ ++ #define CRYPTO_w_lock(type) \ ++ CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__) ++ #define CRYPTO_w_unlock(type) \ ++ CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__) ++ #define CRYPTO_r_lock(type) \ ++ CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__) ++ #define CRYPTO_r_unlock(type) \ ++ CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__) ++ #define CRYPTO_add(addr,amount,type) \ ++ CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__) ++ ++=head1 DESCRIPTION ++ ++OpenSSL can safely be used in multi-threaded applications provided ++that at least two callback functions are set. ++ ++locking_function(int mode, int n, const char *file, int line) is ++needed to perform locking on shared data structures. ++(Note that OpenSSL uses a number of global data structures that ++will be implicitly shared whenever multiple threads use OpenSSL.) ++Multi-threaded applications will crash at random if it is not set. ++ ++locking_function() must be able to handle up to CRYPTO_num_locks() ++different mutex locks. It sets the B<n>-th lock if B<mode> & ++B<CRYPTO_LOCK>, and releases it otherwise. ++ ++B<file> and B<line> are the file number of the function setting the ++lock. They can be useful for debugging. ++ ++id_function(void) is a function that returns a thread ID, for example ++pthread_self() if it returns an integer (see NOTES below). It isn't ++needed on Windows nor on platforms where getpid() returns a different ++ID for each thread (see NOTES below). ++ ++Additionally, OpenSSL supports dynamic locks, and sometimes, some parts ++of OpenSSL need it for better performance. To enable this, the following ++is required: ++ ++=over 4 ++ ++=item * ++Three additional callback function, dyn_create_function, dyn_lock_function ++and dyn_destroy_function. ++ ++=item * ++A structure defined with the data that each lock needs to handle. ++ ++=back ++ ++struct CRYPTO_dynlock_value has to be defined to contain whatever structure ++is needed to handle locks. ++ ++dyn_create_function(const char *file, int line) is needed to create a ++lock. Multi-threaded applications might crash at random if it is not set. ++ ++dyn_lock_function(int mode, CRYPTO_dynlock *l, const char *file, int line) ++is needed to perform locking off dynamic lock numbered n. Multi-threaded ++applications might crash at random if it is not set. ++ ++dyn_destroy_function(CRYPTO_dynlock *l, const char *file, int line) is ++needed to destroy the lock l. Multi-threaded applications might crash at ++random if it is not set. ++ ++CRYPTO_get_new_dynlockid() is used to create locks. It will call ++dyn_create_function for the actual creation. ++ ++CRYPTO_destroy_dynlockid() is used to destroy locks. It will call ++dyn_destroy_function for the actual destruction. ++ ++CRYPTO_lock() is used to lock and unlock the locks. mode is a bitfield ++describing what should be done with the lock. n is the number of the ++lock as returned from CRYPTO_get_new_dynlockid(). mode can be combined ++from the following values. These values are pairwise exclusive, with ++undefined behaviour if misused (for example, CRYPTO_READ and CRYPTO_WRITE ++should not be used together): ++ ++ CRYPTO_LOCK 0x01 ++ CRYPTO_UNLOCK 0x02 ++ CRYPTO_READ 0x04 ++ CRYPTO_WRITE 0x08 ++ ++=head1 RETURN VALUES ++ ++CRYPTO_num_locks() returns the required number of locks. ++ ++CRYPTO_get_new_dynlockid() returns the index to the newly created lock. ++ ++The other functions return no values. ++ ++=head1 NOTES ++ ++You can find out if OpenSSL was configured with thread support: ++ ++ #define OPENSSL_THREAD_DEFINES ++ #include <openssl/opensslconf.h> ++ #if defined(OPENSSL_THREADS) ++ // thread support enabled ++ #else ++ // no thread support ++ #endif ++ ++Also, dynamic locks are currently not used internally by OpenSSL, but ++may do so in the future. ++ ++Defining id_function(void) has it's own issues. Generally speaking, ++pthread_self() should be used, even on platforms where getpid() gives ++different answers in each thread, since that may depend on the machine ++the program is run on, not the machine where the program is being ++compiled. For instance, Red Hat 8 Linux and earlier used ++LinuxThreads, whose getpid() returns a different value for each ++thread. Red Hat 9 Linux and later use NPTL, which is ++Posix-conformant, and has a getpid() that returns the same value for ++all threads in a process. A program compiled on Red Hat 8 and run on ++Red Hat 9 will therefore see getpid() returning the same value for ++all threads. ++ ++There is still the issue of platforms where pthread_self() returns ++something other than an integer. This is a bit unusual, and this ++manual has no cookbook solution for that case. ++ ++=head1 EXAMPLES ++ ++B<crypto/threads/mttest.c> shows examples of the callback functions on ++Solaris, Irix and Win32. ++ ++=head1 HISTORY ++ ++CRYPTO_set_locking_callback() and CRYPTO_set_id_callback() are ++available in all versions of SSLeay and OpenSSL. ++CRYPTO_num_locks() was added in OpenSSL 0.9.4. ++All functions dealing with dynamic locks were added in OpenSSL 0.9.5b-dev. ++ ++=head1 SEE ALSO ++ ++L<crypto(3)|crypto(3)> ++ ++=cut +diff -Naur openssl-1.0.0a.orig//doc/crypto/RAND_add.pod openssl-1.0.0a/doc/crypto/RAND_add.pod +--- openssl-1.0.0a.orig//doc/crypto/RAND_add.pod 2000-03-22 15:30:03.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/RAND_add.pod 2010-09-01 19:36:31.616125383 +0100 +@@ -65,7 +65,7 @@ + + =head1 SEE ALSO + +-L<rand(3)|rand(3)>, L<RAND_egd(3)|RAND_egd(3)>, ++L<openssl_rand(3)|openssl_rand(3)>, L<RAND_egd(3)|RAND_egd(3)>, + L<RAND_load_file(3)|RAND_load_file(3)>, L<RAND_cleanup(3)|RAND_cleanup(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/RAND_bytes.pod openssl-1.0.0a/doc/crypto/RAND_bytes.pod +--- openssl-1.0.0a.orig//doc/crypto/RAND_bytes.pod 2007-09-24 12:01:18.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/RAND_bytes.pod 2010-09-01 19:36:31.616125383 +0100 +@@ -38,7 +38,7 @@ + + =head1 SEE ALSO + +-L<rand(3)|rand(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, ++L<openssl_rand(3)|openssl_rand(3)>, L<ERR_get_error(3)|ERR_get_error(3)>, + L<RAND_add(3)|RAND_add(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/RAND_cleanup.pod openssl-1.0.0a/doc/crypto/RAND_cleanup.pod +--- openssl-1.0.0a.orig//doc/crypto/RAND_cleanup.pod 2000-01-27 01:25:06.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/RAND_cleanup.pod 2010-09-01 19:36:31.616125383 +0100 +@@ -20,7 +20,7 @@ + + =head1 SEE ALSO + +-L<rand(3)|rand(3)> ++L<openssl_rand(3)|openssl_rand(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/RAND_egd.pod openssl-1.0.0a/doc/crypto/RAND_egd.pod +--- openssl-1.0.0a.orig//doc/crypto/RAND_egd.pod 2008-11-10 11:26:44.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/RAND_egd.pod 2010-09-01 19:36:31.616125383 +0100 +@@ -72,7 +72,7 @@ + + =head1 SEE ALSO + +-L<rand(3)|rand(3)>, L<RAND_add(3)|RAND_add(3)>, ++L<openssl_rand(3)|openssl_rand(3)>, L<RAND_add(3)|RAND_add(3)>, + L<RAND_cleanup(3)|RAND_cleanup(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/RAND_load_file.pod openssl-1.0.0a/doc/crypto/RAND_load_file.pod +--- openssl-1.0.0a.orig//doc/crypto/RAND_load_file.pod 2001-03-21 15:25:56.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/RAND_load_file.pod 2010-09-01 19:36:31.616125383 +0100 +@@ -43,7 +43,7 @@ + + =head1 SEE ALSO + +-L<rand(3)|rand(3)>, L<RAND_add(3)|RAND_add(3)>, L<RAND_cleanup(3)|RAND_cleanup(3)> ++L<openssl_rand(3)|openssl_rand(3)>, L<RAND_add(3)|RAND_add(3)>, L<RAND_cleanup(3)|RAND_cleanup(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/rand.pod openssl-1.0.0a/doc/crypto/rand.pod +--- openssl-1.0.0a.orig//doc/crypto/rand.pod 2002-08-05 17:27:01.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/rand.pod 1970-01-01 01:00:00.000000000 +0100 +@@ -1,175 +0,0 @@ +-=pod +- +-=head1 NAME +- +-rand - pseudo-random number generator +- +-=head1 SYNOPSIS +- +- #include <openssl/rand.h> +- +- int RAND_set_rand_engine(ENGINE *engine); +- +- int RAND_bytes(unsigned char *buf, int num); +- int RAND_pseudo_bytes(unsigned char *buf, int num); +- +- void RAND_seed(const void *buf, int num); +- void RAND_add(const void *buf, int num, int entropy); +- int RAND_status(void); +- +- int RAND_load_file(const char *file, long max_bytes); +- int RAND_write_file(const char *file); +- const char *RAND_file_name(char *file, size_t num); +- +- int RAND_egd(const char *path); +- +- void RAND_set_rand_method(const RAND_METHOD *meth); +- const RAND_METHOD *RAND_get_rand_method(void); +- RAND_METHOD *RAND_SSLeay(void); +- +- void RAND_cleanup(void); +- +- /* For Win32 only */ +- void RAND_screen(void); +- int RAND_event(UINT, WPARAM, LPARAM); +- +-=head1 DESCRIPTION +- +-Since the introduction of the ENGINE API, the recommended way of controlling +-default implementations is by using the ENGINE API functions. The default +-B<RAND_METHOD>, as set by RAND_set_rand_method() and returned by +-RAND_get_rand_method(), is only used if no ENGINE has been set as the default +-"rand" implementation. Hence, these two functions are no longer the recommened +-way to control defaults. +- +-If an alternative B<RAND_METHOD> implementation is being used (either set +-directly or as provided by an ENGINE module), then it is entirely responsible +-for the generation and management of a cryptographically secure PRNG stream. The +-mechanisms described below relate solely to the software PRNG implementation +-built in to OpenSSL and used by default. +- +-These functions implement a cryptographically secure pseudo-random +-number generator (PRNG). It is used by other library functions for +-example to generate random keys, and applications can use it when they +-need randomness. +- +-A cryptographic PRNG must be seeded with unpredictable data such as +-mouse movements or keys pressed at random by the user. This is +-described in L<RAND_add(3)|RAND_add(3)>. Its state can be saved in a seed file +-(see L<RAND_load_file(3)|RAND_load_file(3)>) to avoid having to go through the +-seeding process whenever the application is started. +- +-L<RAND_bytes(3)|RAND_bytes(3)> describes how to obtain random data from the +-PRNG. +- +-=head1 INTERNALS +- +-The RAND_SSLeay() method implements a PRNG based on a cryptographic +-hash function. +- +-The following description of its design is based on the SSLeay +-documentation: +- +-First up I will state the things I believe I need for a good RNG. +- +-=over 4 +- +-=item 1 +- +-A good hashing algorithm to mix things up and to convert the RNG 'state' +-to random numbers. +- +-=item 2 +- +-An initial source of random 'state'. +- +-=item 3 +- +-The state should be very large. If the RNG is being used to generate +-4096 bit RSA keys, 2 2048 bit random strings are required (at a minimum). +-If your RNG state only has 128 bits, you are obviously limiting the +-search space to 128 bits, not 2048. I'm probably getting a little +-carried away on this last point but it does indicate that it may not be +-a bad idea to keep quite a lot of RNG state. It should be easier to +-break a cipher than guess the RNG seed data. +- +-=item 4 +- +-Any RNG seed data should influence all subsequent random numbers +-generated. This implies that any random seed data entered will have +-an influence on all subsequent random numbers generated. +- +-=item 5 +- +-When using data to seed the RNG state, the data used should not be +-extractable from the RNG state. I believe this should be a +-requirement because one possible source of 'secret' semi random +-data would be a private key or a password. This data must +-not be disclosed by either subsequent random numbers or a +-'core' dump left by a program crash. +- +-=item 6 +- +-Given the same initial 'state', 2 systems should deviate in their RNG state +-(and hence the random numbers generated) over time if at all possible. +- +-=item 7 +- +-Given the random number output stream, it should not be possible to determine +-the RNG state or the next random number. +- +-=back +- +-The algorithm is as follows. +- +-There is global state made up of a 1023 byte buffer (the 'state'), a +-working hash value ('md'), and a counter ('count'). +- +-Whenever seed data is added, it is inserted into the 'state' as +-follows. +- +-The input is chopped up into units of 20 bytes (or less for +-the last block). Each of these blocks is run through the hash +-function as follows: The data passed to the hash function +-is the current 'md', the same number of bytes from the 'state' +-(the location determined by in incremented looping index) as +-the current 'block', the new key data 'block', and 'count' +-(which is incremented after each use). +-The result of this is kept in 'md' and also xored into the +-'state' at the same locations that were used as input into the +-hash function. I +-believe this system addresses points 1 (hash function; currently +-SHA-1), 3 (the 'state'), 4 (via the 'md'), 5 (by the use of a hash +-function and xor). +- +-When bytes are extracted from the RNG, the following process is used. +-For each group of 10 bytes (or less), we do the following: +- +-Input into the hash function the local 'md' (which is initialized from +-the global 'md' before any bytes are generated), the bytes that are to +-be overwritten by the random bytes, and bytes from the 'state' +-(incrementing looping index). From this digest output (which is kept +-in 'md'), the top (up to) 10 bytes are returned to the caller and the +-bottom 10 bytes are xored into the 'state'. +- +-Finally, after we have finished 'num' random bytes for the caller, +-'count' (which is incremented) and the local and global 'md' are fed +-into the hash function and the results are kept in the global 'md'. +- +-I believe the above addressed points 1 (use of SHA-1), 6 (by hashing +-into the 'state' the 'old' data from the caller that is about to be +-overwritten) and 7 (by not using the 10 bytes given to the caller to +-update the 'state', but they are used to update 'md'). +- +-So of the points raised, only 2 is not addressed (but see +-L<RAND_add(3)|RAND_add(3)>). +- +-=head1 SEE ALSO +- +-L<BN_rand(3)|BN_rand(3)>, L<RAND_add(3)|RAND_add(3)>, +-L<RAND_load_file(3)|RAND_load_file(3)>, L<RAND_egd(3)|RAND_egd(3)>, +-L<RAND_bytes(3)|RAND_bytes(3)>, +-L<RAND_set_rand_method(3)|RAND_set_rand_method(3)>, +-L<RAND_cleanup(3)|RAND_cleanup(3)> +- +-=cut +diff -Naur openssl-1.0.0a.orig//doc/crypto/RAND_set_rand_method.pod openssl-1.0.0a/doc/crypto/RAND_set_rand_method.pod +--- openssl-1.0.0a.orig//doc/crypto/RAND_set_rand_method.pod 2007-11-19 09:18:03.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/RAND_set_rand_method.pod 2010-09-01 19:36:31.616125383 +0100 +@@ -67,7 +67,7 @@ + + =head1 SEE ALSO + +-L<rand(3)|rand(3)>, L<engine(3)|engine(3)> ++L<openssl_rand(3)|openssl_rand(3)>, L<engine(3)|engine(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/RSA_blinding_on.pod openssl-1.0.0a/doc/crypto/RSA_blinding_on.pod +--- openssl-1.0.0a.orig//doc/crypto/RSA_blinding_on.pod 2000-02-24 11:55:10.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/RSA_blinding_on.pod 2010-09-01 19:36:31.616125383 +0100 +@@ -34,7 +34,7 @@ + + =head1 SEE ALSO + +-L<rsa(3)|rsa(3)>, L<rand(3)|rand(3)> ++L<rsa(3)|rsa(3)>, L<openssl_rand(3)|openssl_rand(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/crypto/RSA_generate_key.pod openssl-1.0.0a/doc/crypto/RSA_generate_key.pod +--- openssl-1.0.0a.orig//doc/crypto/RSA_generate_key.pod 2002-09-25 14:33:27.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/RSA_generate_key.pod 2010-09-01 19:36:31.616125383 +0100 +@@ -59,7 +59,7 @@ + + =head1 SEE ALSO + +-L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, ++L<ERR_get_error(3)|ERR_get_error(3)>, L<openssl_rand(3)|openssl_rand(3)>, L<rsa(3)|rsa(3)>, + L<RSA_free(3)|RSA_free(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/rsa.pod openssl-1.0.0a/doc/crypto/rsa.pod +--- openssl-1.0.0a.orig//doc/crypto/rsa.pod 2002-08-04 22:08:36.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/rsa.pod 2010-09-01 19:36:31.624124669 +0100 +@@ -108,7 +108,7 @@ + =head1 SEE ALSO + + L<rsa(1)|rsa(1)>, L<bn(3)|bn(3)>, L<dsa(3)|dsa(3)>, L<dh(3)|dh(3)>, +-L<rand(3)|rand(3)>, L<engine(3)|engine(3)>, L<RSA_new(3)|RSA_new(3)>, ++L<openssl_rand(3)|openssl_rand(3)>, L<engine(3)|engine(3)>, L<RSA_new(3)|RSA_new(3)>, + L<RSA_public_encrypt(3)|RSA_public_encrypt(3)>, + L<RSA_sign(3)|RSA_sign(3)>, L<RSA_size(3)|RSA_size(3)>, + L<RSA_generate_key(3)|RSA_generate_key(3)>, +diff -Naur openssl-1.0.0a.orig//doc/crypto/RSA_public_encrypt.pod openssl-1.0.0a/doc/crypto/RSA_public_encrypt.pod +--- openssl-1.0.0a.orig//doc/crypto/RSA_public_encrypt.pod 2004-03-23 21:01:34.000000000 +0000 ++++ openssl-1.0.0a/doc/crypto/RSA_public_encrypt.pod 2010-09-01 19:36:31.620125025 +0100 +@@ -73,7 +73,7 @@ + + =head1 SEE ALSO + +-L<ERR_get_error(3)|ERR_get_error(3)>, L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, ++L<ERR_get_error(3)|ERR_get_error(3)>, L<openssl_rand(3)|openssl_rand(3)>, L<rsa(3)|rsa(3)>, + L<RSA_size(3)|RSA_size(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod openssl-1.0.0a/doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod +--- openssl-1.0.0a.orig//doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod 2002-09-25 14:33:28.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/RSA_sign_ASN1_OCTET_STRING.pod 2010-09-01 19:36:31.620125025 +0100 +@@ -48,7 +48,7 @@ + =head1 SEE ALSO + + L<ERR_get_error(3)|ERR_get_error(3)>, L<objects(3)|objects(3)>, +-L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, L<RSA_sign(3)|RSA_sign(3)>, ++L<openssl_rand(3)|openssl_rand(3)>, L<rsa(3)|rsa(3)>, L<RSA_sign(3)|RSA_sign(3)>, + L<RSA_verify(3)|RSA_verify(3)> + + =head1 HISTORY +diff -Naur openssl-1.0.0a.orig//doc/crypto/threads.pod openssl-1.0.0a/doc/crypto/threads.pod +--- openssl-1.0.0a.orig//doc/crypto/threads.pod 2009-10-01 00:40:52.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/threads.pod 1970-01-01 01:00:00.000000000 +0100 +@@ -1,210 +0,0 @@ +-=pod +- +-=head1 NAME +- +-CRYPTO_THREADID_set_callback, CRYPTO_THREADID_get_callback, +-CRYPTO_THREADID_current, CRYPTO_THREADID_cmp, CRYPTO_THREADID_cpy, +-CRYPTO_THREADID_hash, CRYPTO_set_locking_callback, CRYPTO_num_locks, +-CRYPTO_set_dynlock_create_callback, CRYPTO_set_dynlock_lock_callback, +-CRYPTO_set_dynlock_destroy_callback, CRYPTO_get_new_dynlockid, +-CRYPTO_destroy_dynlockid, CRYPTO_lock - OpenSSL thread support +- +-=head1 SYNOPSIS +- +- #include <openssl/crypto.h> +- +- /* Don't use this structure directly. */ +- typedef struct crypto_threadid_st +- { +- void *ptr; +- unsigned long val; +- } CRYPTO_THREADID; +- /* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */ +- void CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val); +- void CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr); +- int CRYPTO_THREADID_set_callback(void (*threadid_func)(CRYPTO_THREADID *)); +- void (*CRYPTO_THREADID_get_callback(void))(CRYPTO_THREADID *); +- void CRYPTO_THREADID_current(CRYPTO_THREADID *id); +- int CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, +- const CRYPTO_THREADID *b); +- void CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, +- const CRYPTO_THREADID *src); +- unsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id); +- +- int CRYPTO_num_locks(void); +- +- /* struct CRYPTO_dynlock_value needs to be defined by the user */ +- struct CRYPTO_dynlock_value; +- +- void CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value * +- (*dyn_create_function)(char *file, int line)); +- void CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function) +- (int mode, struct CRYPTO_dynlock_value *l, +- const char *file, int line)); +- void CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function) +- (struct CRYPTO_dynlock_value *l, const char *file, int line)); +- +- int CRYPTO_get_new_dynlockid(void); +- +- void CRYPTO_destroy_dynlockid(int i); +- +- void CRYPTO_lock(int mode, int n, const char *file, int line); +- +- #define CRYPTO_w_lock(type) \ +- CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__) +- #define CRYPTO_w_unlock(type) \ +- CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__) +- #define CRYPTO_r_lock(type) \ +- CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__) +- #define CRYPTO_r_unlock(type) \ +- CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__) +- #define CRYPTO_add(addr,amount,type) \ +- CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__) +- +-=head1 DESCRIPTION +- +-OpenSSL can safely be used in multi-threaded applications provided +-that at least two callback functions are set, locking_function and +-threadid_func. +- +-locking_function(int mode, int n, const char *file, int line) is +-needed to perform locking on shared data structures. +-(Note that OpenSSL uses a number of global data structures that +-will be implicitly shared whenever multiple threads use OpenSSL.) +-Multi-threaded applications will crash at random if it is not set. +- +-locking_function() must be able to handle up to CRYPTO_num_locks() +-different mutex locks. It sets the B<n>-th lock if B<mode> & +-B<CRYPTO_LOCK>, and releases it otherwise. +- +-B<file> and B<line> are the file number of the function setting the +-lock. They can be useful for debugging. +- +-threadid_func(CRYPTO_THREADID *id) is needed to record the currently-executing +-thread's identifier into B<id>. The implementation of this callback should not +-fill in B<id> directly, but should use CRYPTO_THREADID_set_numeric() if thread +-IDs are numeric, or CRYPTO_THREADID_set_pointer() if they are pointer-based. +-If the application does not register such a callback using +-CRYPTO_THREADID_set_callback(), then a default implementation is used - on +-Windows and BeOS this uses the system's default thread identifying APIs, and on +-all other platforms it uses the address of B<errno>. The latter is satisfactory +-for thread-safety if and only if the platform has a thread-local error number +-facility. +- +-Once threadid_func() is registered, or if the built-in default implementation is +-to be used; +- +-=over 4 +- +-=item * +-CRYPTO_THREADID_current() records the currently-executing thread ID into the +-given B<id> object. +- +-=item * +-CRYPTO_THREADID_cmp() compares two thread IDs (returning zero for equality, ie. +-the same semantics as memcmp()). +- +-=item * +-CRYPTO_THREADID_cpy() duplicates a thread ID value, +- +-=item * +-CRYPTO_THREADID_hash() returns a numeric value usable as a hash-table key. This +-is usually the exact numeric or pointer-based thread ID used internally, however +-this also handles the unusual case where pointers are larger than 'long' +-variables and the platform's thread IDs are pointer-based - in this case, mixing +-is done to attempt to produce a unique numeric value even though it is not as +-wide as the platform's true thread IDs. +- +-=back +- +-Additionally, OpenSSL supports dynamic locks, and sometimes, some parts +-of OpenSSL need it for better performance. To enable this, the following +-is required: +- +-=over 4 +- +-=item * +-Three additional callback function, dyn_create_function, dyn_lock_function +-and dyn_destroy_function. +- +-=item * +-A structure defined with the data that each lock needs to handle. +- +-=back +- +-struct CRYPTO_dynlock_value has to be defined to contain whatever structure +-is needed to handle locks. +- +-dyn_create_function(const char *file, int line) is needed to create a +-lock. Multi-threaded applications might crash at random if it is not set. +- +-dyn_lock_function(int mode, CRYPTO_dynlock *l, const char *file, int line) +-is needed to perform locking off dynamic lock numbered n. Multi-threaded +-applications might crash at random if it is not set. +- +-dyn_destroy_function(CRYPTO_dynlock *l, const char *file, int line) is +-needed to destroy the lock l. Multi-threaded applications might crash at +-random if it is not set. +- +-CRYPTO_get_new_dynlockid() is used to create locks. It will call +-dyn_create_function for the actual creation. +- +-CRYPTO_destroy_dynlockid() is used to destroy locks. It will call +-dyn_destroy_function for the actual destruction. +- +-CRYPTO_lock() is used to lock and unlock the locks. mode is a bitfield +-describing what should be done with the lock. n is the number of the +-lock as returned from CRYPTO_get_new_dynlockid(). mode can be combined +-from the following values. These values are pairwise exclusive, with +-undefined behaviour if misused (for example, CRYPTO_READ and CRYPTO_WRITE +-should not be used together): +- +- CRYPTO_LOCK 0x01 +- CRYPTO_UNLOCK 0x02 +- CRYPTO_READ 0x04 +- CRYPTO_WRITE 0x08 +- +-=head1 RETURN VALUES +- +-CRYPTO_num_locks() returns the required number of locks. +- +-CRYPTO_get_new_dynlockid() returns the index to the newly created lock. +- +-The other functions return no values. +- +-=head1 NOTES +- +-You can find out if OpenSSL was configured with thread support: +- +- #define OPENSSL_THREAD_DEFINES +- #include <openssl/opensslconf.h> +- #if defined(OPENSSL_THREADS) +- // thread support enabled +- #else +- // no thread support +- #endif +- +-Also, dynamic locks are currently not used internally by OpenSSL, but +-may do so in the future. +- +-=head1 EXAMPLES +- +-B<crypto/threads/mttest.c> shows examples of the callback functions on +-Solaris, Irix and Win32. +- +-=head1 HISTORY +- +-CRYPTO_set_locking_callback() is +-available in all versions of SSLeay and OpenSSL. +-CRYPTO_num_locks() was added in OpenSSL 0.9.4. +-All functions dealing with dynamic locks were added in OpenSSL 0.9.5b-dev. +-B<CRYPTO_THREADID> and associated functions were introduced in OpenSSL 1.0.0 +-to replace (actually, deprecate) the previous CRYPTO_set_id_callback(), +-CRYPTO_get_id_callback(), and CRYPTO_thread_id() functions which assumed +-thread IDs to always be represented by 'unsigned long'. +- +-=head1 SEE ALSO +- +-L<crypto(3)|crypto(3)> +- +-=cut +diff -Naur openssl-1.0.0a.orig//doc/crypto/X509_NAME_ENTRY_get_object.pod openssl-1.0.0a/doc/crypto/X509_NAME_ENTRY_get_object.pod +--- openssl-1.0.0a.orig//doc/crypto/X509_NAME_ENTRY_get_object.pod 2006-05-14 12:27:59.000000000 +0100 ++++ openssl-1.0.0a/doc/crypto/X509_NAME_ENTRY_get_object.pod 2010-09-01 19:36:31.620125025 +0100 +@@ -65,7 +65,7 @@ + =head1 SEE ALSO + + L<ERR_get_error(3)|ERR_get_error(3)>, L<d2i_X509_NAME(3)|d2i_X509_NAME(3)>, +-L<OBJ_nid2obj(3),OBJ_nid2obj(3)> ++L<OBJ_nid2obj(3)|OBJ_nid2obj(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/ssl/SSL_get_error.pod openssl-1.0.0a/doc/ssl/SSL_get_error.pod +--- openssl-1.0.0a.orig//doc/ssl/SSL_get_error.pod 2005-03-30 12:50:14.000000000 +0100 ++++ openssl-1.0.0a/doc/ssl/SSL_get_error.pod 2010-09-01 19:36:40.259360162 +0100 +@@ -105,7 +105,7 @@ + + =head1 SEE ALSO + +-L<ssl(3)|ssl(3)>, L<err(3)|err(3)> ++L<ssl(3)|ssl(3)>, L<openssl_err(3)|openssl_err(3)> + + =head1 HISTORY + +diff -Naur openssl-1.0.0a.orig//doc/ssl/SSL_want.pod openssl-1.0.0a/doc/ssl/SSL_want.pod +--- openssl-1.0.0a.orig//doc/ssl/SSL_want.pod 2005-03-30 12:50:14.000000000 +0100 ++++ openssl-1.0.0a/doc/ssl/SSL_want.pod 2010-09-01 19:36:40.259360162 +0100 +@@ -72,6 +72,6 @@ + + =head1 SEE ALSO + +-L<ssl(3)|ssl(3)>, L<err(3)|err(3)>, L<SSL_get_error(3)|SSL_get_error(3)> ++L<ssl(3)|ssl(3)>, L<openssl_err(3)|openssl_err(3)>, L<SSL_get_error(3)|SSL_get_error(3)> + + =cut +diff -Naur openssl-1.0.0a.orig//FAQ openssl-1.0.0a/FAQ +--- openssl-1.0.0a.orig//FAQ 2010-06-01 14:31:36.000000000 +0100 ++++ openssl-1.0.0a/FAQ 2010-09-01 19:39:19.677244857 +0100 +@@ -724,7 +724,7 @@ + CRYPTO_set_id_callback(), for all versions of OpenSSL up to and + including 0.9.8[abc...]. As of version 1.0.0, CRYPTO_set_id_callback() + and associated APIs are deprecated by CRYPTO_THREADID_set_callback() +-and friends. This is described in the threads(3) manpage. ++and friends. This is described in the openssl_threads(3) manpage. + + * I've compiled a program under Windows and it crashes: why? + diff --git a/testing/openssl/no-rpath.patch b/testing/openssl/no-rpath.patch new file mode 100644 index 000000000..ebd95e23d --- /dev/null +++ b/testing/openssl/no-rpath.patch @@ -0,0 +1,11 @@ +--- Makefile.shared.no-rpath 2005-06-23 22:47:54.000000000 +0200 ++++ Makefile.shared 2005-11-16 22:35:37.000000000 +0100 +@@ -153,7 +153,7 @@ + NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \ + SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" + +-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)" ++DO_GNU_APP=LDFLAGS="$(CFLAGS)" + + #This is rather special. It's a special target with which one can link + #applications without bothering with any features that have anything to diff --git a/testing/taglib/PKGBUILD b/testing/taglib/PKGBUILD new file mode 100644 index 000000000..635fcb962 --- /dev/null +++ b/testing/taglib/PKGBUILD @@ -0,0 +1,39 @@ +# $Id: PKGBUILD 158815 2012-05-11 00:55:49Z tomegun $ +# Maintainer: Tom Gundersen <teg@jklm.no> +# Contributor: Andrea Scarpino <andrea@archlinux.org> +# Contributor: Tobias Powalowski <tpowa@archlinux.org> + +pkgname=taglib +pkgver=1.7.2 +pkgrel=1 +pkgdesc="A Library for reading and editing the meta-data of several popular audio formats" +arch=('i686' 'x86_64') +url="http://developer.kde.org/~wheeler/taglib.html" +license=('LGPL' 'MPL') +depends=('sh' 'zlib' 'gcc-libs') +makedepends=('cmake' 'pkg-config') +options=('!libtool') +source=("http://developer.kde.org/~wheeler/files/src/$pkgname-$pkgver.tar.gz" + 'ape-idev2.patch') + +build() { + cd "${srcdir}"/${pkgname}-${pkgver} + patch -p1 -i "${srcdir}"/ape-idev2.patch + + cd "${srcdir}" + mkdir build + cd build + cmake ../${pkgname}-${pkgver} \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DWITH_MP4=ON \ + -DWITH_ASF=ON + make +} + +package() { + cd "${srcdir}"/build + make DESTDIR="${pkgdir}" install +} +md5sums=('b0a9e797d3833fb933c7c3176de3d720' + 'c7c165d99acf01456351ba39ff7056cb') diff --git a/testing/taglib/ape-idev2.patch b/testing/taglib/ape-idev2.patch new file mode 100644 index 000000000..9c58da420 --- /dev/null +++ b/testing/taglib/ape-idev2.patch @@ -0,0 +1,12 @@ +diff -Nur taglib-1.7.orig/taglib/ape/apeproperties.cpp taglib-1.7/taglib/ape/apeproperties.cpp +--- taglib-1.7.orig/taglib/ape/apeproperties.cpp 2011-03-12 00:15:38.000000000 +1100 ++++ taglib-1.7/taglib/ape/apeproperties.cpp 2011-07-29 21:19:45.984345060 +1000 +@@ -137,7 +137,7 @@ + long ID3v2OriginalSize = 0; + bool hasID3v2 = false; + if(ID3v2Location >= 0) { +- ID3v2::Tag tag(d->file, ID3v2Location, 0); ++ ID3v2::Tag tag(d->file, ID3v2Location); + ID3v2OriginalSize = tag.header()->completeTagSize(); + if(tag.header()->tagSize() > 0) + hasID3v2 = true; diff --git a/testing/xinetd/PKGBUILD b/testing/xinetd/PKGBUILD new file mode 100644 index 000000000..43c3e6fc2 --- /dev/null +++ b/testing/xinetd/PKGBUILD @@ -0,0 +1,47 @@ +# $Id: PKGBUILD 158805 2012-05-10 14:07:20Z tpowa $ +# Maintainer: +# Contributor: Judd <jvinet@zeroflux.org> + +pkgname=xinetd +pkgver=2.3.15 +pkgrel=1 +pkgdesc="A secure replacement for inetd" +arch=('i686' 'x86_64') +url="http://www.xinetd.org/" +license=('custom') +optdepends=('perl: for xconv.pl script') +backup=('etc/xinetd.conf' 'etc/xinetd.d/servers' 'etc/xinetd.d/services') +source=(http://www.xinetd.org/xinetd-$pkgver.tar.gz + xinetd.conf + xinetd + servers + services + xinetd.service) +md5sums=('77358478fd58efa6366accae99b8b04c' + 'f109f699a07bc8cfb5791060f5e87f9e' + 'ea37a2794f202e6b953d9b6956dad16a' + '21f47b4aa20921cfaddddd9f9a407f81' + '9fa2061dc7dd738c8424251deb86f81e' + '4473d8b2b6c984626d9f73a0b89711ee') + +build() { + cd $srcdir/$pkgname-$pkgver + sed -i "s#${prefix}/man#${prefix}/share/man#" configure + ./configure --prefix=/usr --without-libwrap + make +} + +package() { + cd $srcdir/$pkgname-$pkgver + make prefix=$pkgdir/usr install + + install -Dm755 $srcdir/xinetd $pkgdir/etc/rc.d/xinetd + install -Dm644 $srcdir/xinetd.conf $pkgdir/etc/xinetd.conf + install -Dm644 $srcdir/servers $pkgdir/etc/xinetd.d/servers + install -Dm644 $srcdir/services $pkgdir/etc/xinetd.d/services + + # install systemd files + install -Dm644 $srcdir/xinetd.service $pkgdir/usr/lib/systemd/system/xinetd.service + # install license + install -Dm644 COPYRIGHT $pkgdir/usr/share/licenses/$pkgname/COPYRIGHT +} diff --git a/testing/xinetd/servers b/testing/xinetd/servers new file mode 100644 index 000000000..f064c8d7a --- /dev/null +++ b/testing/xinetd/servers @@ -0,0 +1,10 @@ +service servers +{ + type = INTERNAL UNLISTED + port = 9099 + socket_type = stream + protocol = tcp + wait = no + disable = yes + only_from = 127.0.0.1 +} diff --git a/testing/xinetd/services b/testing/xinetd/services new file mode 100644 index 000000000..4ea304c4f --- /dev/null +++ b/testing/xinetd/services @@ -0,0 +1,10 @@ +service services +{ + type = INTERNAL UNLISTED + port = 9098 + socket_type = stream + protocol = tcp + wait = no + disable = yes + only_from = 127.0.0.1 +} diff --git a/testing/xinetd/xinetd b/testing/xinetd/xinetd new file mode 100755 index 000000000..4b8fa369a --- /dev/null +++ b/testing/xinetd/xinetd @@ -0,0 +1,38 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/xinetd` +case "$1" in + start) + stat_busy "Starting xinetd" + [ -z "$PID" ] && /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid + if [ $? -gt 0 ]; then + stat_fail + else + echo $PID > /var/run/xinetd.pid + add_daemon xinetd + stat_done + fi + ;; + stop) + stat_busy "Stopping xinetd" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm -f /var/run/xinetd.pid + rm_daemon xinetd + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/testing/xinetd/xinetd.conf b/testing/xinetd/xinetd.conf new file mode 100644 index 000000000..b15d9f649 --- /dev/null +++ b/testing/xinetd/xinetd.conf @@ -0,0 +1,14 @@ +# +# /etc/xinetd.conf +# + +defaults +{ + instances = 60 + log_type = SYSLOG authpriv + log_on_success = HOST PID + log_on_failure = HOST + cps = 25 30 +} + +includedir /etc/xinetd.d diff --git a/testing/xinetd/xinetd.service b/testing/xinetd/xinetd.service new file mode 100644 index 000000000..ac80139e2 --- /dev/null +++ b/testing/xinetd/xinetd.service @@ -0,0 +1,10 @@ +[Unit] +Description=A secure replacement for inetd +After=network.service + +[Service] +ExecStart=/usr/sbin/xinetd -dontfork +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target |