summaryrefslogtreecommitdiff
path: root/staging
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-11-19 23:14:49 +0000
committerroot <root@rshg054.dnsready.net>2011-11-19 23:14:49 +0000
commita3024f8996981b28ced27466cbd1d4ab40e57324 (patch)
tree33e1ab51e17de598241385ef355cc67662d9ad74 /staging
parent126af148530f656a2ed192a852477b2ee97d5397 (diff)
Sat Nov 19 23:14:48 UTC 2011
Diffstat (limited to 'staging')
-rw-r--r--staging/gdbm/PKGBUILD57
-rw-r--r--staging/gdbm/gdbm-1.10-zeroheaders.patch33
-rw-r--r--staging/gdbm/gdbm.install21
-rw-r--r--staging/mutt/PKGBUILD48
-rw-r--r--staging/mutt/install8
-rw-r--r--staging/ypserv/PKGBUILD37
-rwxr-xr-xstaging/ypserv/yppasswd34
-rwxr-xr-xstaging/ypserv/ypserv34
8 files changed, 272 insertions, 0 deletions
diff --git a/staging/gdbm/PKGBUILD b/staging/gdbm/PKGBUILD
new file mode 100644
index 000000000..f803182bc
--- /dev/null
+++ b/staging/gdbm/PKGBUILD
@@ -0,0 +1,57 @@
+# $Id: PKGBUILD 142942 2011-11-19 00:37:18Z stephane $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=gdbm
+pkgver=1.10
+pkgrel=1
+pkgdesc="GNU database library"
+url="http://www.gnu.org/software/gdbm/gdbm.html"
+license=('GPL')
+arch=('i686' 'x86_64')
+depends=('glibc' 'sh')
+source=(ftp://ftp.gnu.org/gnu/gdbm/${pkgname}-${pkgver}.tar.gz
+ gdbm-1.10-zeroheaders.patch)
+options=('!libtool' '!makeflags')
+install=gdbm.install
+md5sums=('88770493c2559dc80b561293e39d3570'
+ 'ac255b10452005237836cd2d3a470733')
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Prevent gdbm from storing uninitialized memory content
+ # to database files. This patch improves security, as the
+ # uninitialized memory might contain sensitive informations
+ # from other applications.
+ # https://bugzilla.redhat.com/show_bug.cgi?id=4457
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208927
+ patch -Np1 -i ../gdbm-1.10-zeroheaders.patch
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --enable-libgdbm-compat
+
+ make prefix=/usr
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make check
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make prefix="${pkgdir}"/usr \
+ manprefix="${pkgdir}"/usr/share/man \
+ man3dir="${pkgdir}"/usr/share/man/man3 \
+ infodir="${pkgdir}"/usr/share/info \
+ install
+
+ # create symlinks for compatibility
+ install -dm755 "${pkgdir}"/usr/include/gdbm
+ ln -sf ../gdbm.h "${pkgdir}"/usr/include/gdbm/gdbm.h
+ ln -sf ../ndbm.h "${pkgdir}"/usr/include/gdbm/ndbm.h
+ ln -sf ../dbm.h "${pkgdir}"/usr/include/gdbm/dbm.h
+}
diff --git a/staging/gdbm/gdbm-1.10-zeroheaders.patch b/staging/gdbm/gdbm-1.10-zeroheaders.patch
new file mode 100644
index 000000000..a268f6bdf
--- /dev/null
+++ b/staging/gdbm/gdbm-1.10-zeroheaders.patch
@@ -0,0 +1,33 @@
+diff -up gdbm-1.10/src/falloc.c.zeroheaders gdbm-1.10/src/falloc.c
+--- gdbm-1.10/src/falloc.c.zeroheaders 2011-11-11 11:59:11.000000000 +0100
++++ gdbm-1.10/src/falloc.c 2011-11-14 17:34:32.487604027 +0100
+@@ -255,7 +255,7 @@ push_avail_block (GDBM_FILE dbf)
+
+
+ /* Split the header block. */
+- temp = (avail_block *) malloc (av_size);
++ temp = (avail_block *) calloc (1, av_size);
+ if (temp == NULL) _gdbm_fatal (dbf, _("malloc error"));
+ /* Set the size to be correct AFTER the pop_avail_block. */
+ temp->size = dbf->header->avail.size;
+diff -up gdbm-1.10/src/gdbmopen.c.zeroheaders gdbm-1.10/src/gdbmopen.c
+--- gdbm-1.10/src/gdbmopen.c.zeroheaders 2011-11-11 19:39:42.000000000 +0100
++++ gdbm-1.10/src/gdbmopen.c 2011-11-14 17:33:24.867608650 +0100
+@@ -264,7 +264,7 @@ gdbm_open (const char *file, int block_s
+ (dbf->header->block_size - sizeof (hash_bucket))
+ / sizeof (bucket_element) + 1;
+ dbf->header->bucket_size = dbf->header->block_size;
+- dbf->bucket = (hash_bucket *) malloc (dbf->header->bucket_size);
++ dbf->bucket = (hash_bucket *) calloc (1, dbf->header->bucket_size);
+ if (dbf->bucket == NULL)
+ {
+ gdbm_close (dbf);
+@@ -456,7 +456,7 @@ _gdbm_init_cache(GDBM_FILE dbf, size_t s
+ for(index = 0; index < size; index++)
+ {
+ (dbf->bucket_cache[index]).ca_bucket
+- = (hash_bucket *) malloc (dbf->header->bucket_size);
++ = (hash_bucket *) calloc (1, dbf->header->bucket_size);
+ if ((dbf->bucket_cache[index]).ca_bucket == NULL)
+ {
+ gdbm_errno = GDBM_MALLOC_ERROR;
diff --git a/staging/gdbm/gdbm.install b/staging/gdbm/gdbm.install
new file mode 100644
index 000000000..2d1ce2c5a
--- /dev/null
+++ b/staging/gdbm/gdbm.install
@@ -0,0 +1,21 @@
+infodir=/usr/share/info
+filelist=(gdbm.info)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
diff --git a/staging/mutt/PKGBUILD b/staging/mutt/PKGBUILD
new file mode 100644
index 000000000..27f213111
--- /dev/null
+++ b/staging/mutt/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 142948 2011-11-19 03:29:27Z bisson $
+# Contributor: tobias [tobias [at] archlinux.org]
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+
+pkgname=mutt
+pkgver=1.5.21
+pkgrel=6
+pkgdesc='Small but very powerful text-based mail client'
+url='http://www.mutt.org/'
+license=('GPL')
+backup=('etc/Muttrc')
+arch=('i686' 'x86_64')
+optdepends=('smtp-forwarder: to send mail')
+depends=('gpgme' 'ncurses' 'openssl' 'libsasl' 'gdbm' 'libidn' 'mime-types' 'krb5')
+source=("ftp://ftp.mutt.org/mutt/devel/${pkgname}-${pkgver}.tar.gz")
+sha1sums=('a8475f2618ce5d5d33bff85c0affdf21ab1d76b9')
+
+install=install
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-gpgme \
+ --enable-pop \
+ --enable-imap \
+ --enable-smtp \
+ --enable-hcache \
+ --with-curses=/usr \
+ --with-regex \
+ --with-gss=/usr \
+ --with-ssl=/usr \
+ --with-sasl \
+ --with-idn \
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ rm "${pkgdir}"/usr/bin/{flea,muttbug}
+ rm "${pkgdir}"/usr/share/man/man1/{flea,muttbug}.1
+ rm "${pkgdir}"/etc/mime.types{,.dist}
+ install -Dm644 contrib/gpg.rc "${pkgdir}"/etc/Muttrc.gpg.dist
+}
diff --git a/staging/mutt/install b/staging/mutt/install
new file mode 100644
index 000000000..d65675c06
--- /dev/null
+++ b/staging/mutt/install
@@ -0,0 +1,8 @@
+post_install() {
+ cat <<EOF
+
+==> For GPG support, add the following to your muttrc:
+==> source /etc/Muttrc.gpg.dist
+
+EOF
+}
diff --git a/staging/ypserv/PKGBUILD b/staging/ypserv/PKGBUILD
new file mode 100644
index 000000000..afd58ede7
--- /dev/null
+++ b/staging/ypserv/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 142950 2011-11-19 03:45:48Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=ypserv
+pkgver=2.26
+pkgrel=2
+pkgdesc='Linux NIS Server'
+arch=('i686' 'x86_64')
+url='http://www.linux-nis.org/nis/ypserv/'
+license=('GPL2')
+depends=('gdbm' 'openslp')
+backup=('etc/ypserv.conf' 'etc/netgroup' 'var/yp/securenets')
+source=("ftp://ftp.kernel.org/pub/linux/utils/net/NIS/${pkgname}-${pkgver}.tar.gz" \
+ 'yppasswd'
+ 'ypserv')
+sha1sums=('0d7ab3f04ff7fa5f611e71ea0f3c188659602743'
+ '96192b628afe36709496e4801d016c4bff343f0e'
+ 'b625381bfa6cf62345377a7df30b8f45935206c5')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ install -D -m644 etc/netgroup "${pkgdir}"/etc/netgroup
+ install -D -m644 etc/ypserv.conf "${pkgdir}"/etc/ypserv.conf
+ install -D -m644 etc/securenets "${pkgdir}"/var/yp/securenets
+ install -D -m755 ../ypserv "${pkgdir}"/etc/rc.d/ypserv
+ install -D -m755 ../yppasswd "${pkgdir}"/etc/rc.d/yppasswd
+}
diff --git a/staging/ypserv/yppasswd b/staging/ypserv/yppasswd
new file mode 100755
index 000000000..c2b00b2ca
--- /dev/null
+++ b/staging/ypserv/yppasswd
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting NIS Password Daemon"
+ /usr/sbin/rpc.yppasswdd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon yppasswd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping NIS Password Daemon"
+ killall -q /usr/sbin/rpc.yppasswdd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon yppasswd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/staging/ypserv/ypserv b/staging/ypserv/ypserv
new file mode 100755
index 000000000..c36e6901b
--- /dev/null
+++ b/staging/ypserv/ypserv
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting NIS Server"
+ /usr/sbin/ypserv
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon ypserv
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping NIS Server"
+ killall -q /usr/sbin/ypserv
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon ypserv
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac