diff options
author | Andrew Manison <amanison@anselsystems.com> | 2010-07-14 15:39:29 +0000 |
---|---|---|
committer | Andrew Manison <amanison@anselsystems.com> | 2010-07-14 15:39:29 +0000 |
commit | 6e8020140bbfb5e42802eed7c1491e675924cc01 (patch) | |
tree | cc54f3cce7238609561da3b2de59e2d3780c1085 /testing | |
parent | 4ae2c3d81c309f93d2c41e22e71c5cf445123896 (diff) | |
parent | daa6e0d05fff7a0d1216fd6719e32d5426b24e8b (diff) | |
download | aports-6e8020140bbfb5e42802eed7c1491e675924cc01.tar.bz2 aports-6e8020140bbfb5e42802eed7c1491e675924cc01.tar.xz |
Merge remote branch 'alpine/master'
Conflicts:
main/man-pages/APKBUILD
Diffstat (limited to 'testing')
39 files changed, 1040 insertions, 1095 deletions
diff --git a/testing/atomic-ops/APKBUILD b/testing/atomic-ops/APKBUILD deleted file mode 100644 index 7c9dc2cf2..000000000 --- a/testing/atomic-ops/APKBUILD +++ /dev/null @@ -1,34 +0,0 @@ -# Contributor: Natanael Copa <ncopa@alpinelinux.org> -# Maintainer: Natanael Copa <ncopa@alpinelinux.org> -pkgname=atomic-ops -_ver=7.2 -_suff=alpha4 -pkgver=${_ver}_${_suff} -_realver=${_ver}${_suff} -pkgrel=0 -pkgdesc="A library for atomic operations" -url="http://www.hpl.hp.com/research/linux/atomic_ops/download.php4" -license="GPL" -depends="" -makedepends="" -install= -subpackages= -source="http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-$_realver.tar.gz" - -_builddir="$srcdir"/libatomic_ops-${_realver} -build() { - cd "$_builddir" - chmod +x install-sh - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info - make || return 1 -} - -package() { - cd "$_builddir" - make DESTDIR="$pkgdir" install -} - -md5sums="e82723a24fd846fe37bd6a03728776e1 libatomic_ops-7.2alpha4.tar.gz" diff --git a/testing/ircii/APKBUILD b/testing/ircii/APKBUILD deleted file mode 100644 index 1c16d509a..000000000 --- a/testing/ircii/APKBUILD +++ /dev/null @@ -1,30 +0,0 @@ -# Contributor: Michael Mason <ms13sp@gmail.com> -# Maintainer: Michael Mason <ms13sp@gmail.com> -pkgname=ircii -pkgver=20080314 -pkgrel=1 -pkgdesc="Universal IRC for Unix systems" -url="http://www.eterna.com.au/ircii/" -license="GPL" -depends= -makedepends= -install= -subpackages="$pkgname-doc $pkgname-dev" -source="ftp://ircii.warped.com/pub/ircII/ircii-20080314.tar.bz2" - -build() { - cd "$srcdir/$pkgname-$pkgver" - - ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info - make || return 1 -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - make -j1 DESTDIR="$pkgdir" install -} - -md5sums="da7fcf2a442bd25f303778eb6466eb19 ircii-20080314.tar.bz2" diff --git a/testing/ircservices/APKBUILD b/testing/ircservices/APKBUILD deleted file mode 100644 index 57d36e709..000000000 --- a/testing/ircservices/APKBUILD +++ /dev/null @@ -1,78 +0,0 @@ -# Maintainer: Natanael Copa <ncopa@alpinelinux.org> -pkgname=ircservices -pkgver=5.1.21 -pkgrel=1 -pkgdesc="Services for IRC (NickServ, ChanServ, MemoServ)" -url="http://www.ircservices.za.net/" -license="GPL" -depends= -makedepends="perl" -install=$pkgname.pre-install -pkgusers="ircservices" -pkggroups="ircservices" -subpackages="$pkgname-doc" -source="http://www.ircservices.za.net/download/$pkgname-$pkgver.tar.gz - $pkgname.initd" - -build() { - cd "$srcdir"/$pkgname-$pkgver - RUNGROUP=ircservices ./configure \ - -cc "$CC" \ - -cflags "$CFLAGS" \ - -bindest /usr/bin \ - -datdest /var/lib/ircservices \ - || return 1 - - # build targets one by one as paralell builds breaks - make config-check &&\ - make ircservices &&\ - make languages &&\ - make tools -} - -package() { - cd "$srcdir"/$pkgname-$pkgver -# export INSTALL_PREFIX="$pkgdir" - make -j1 \ - BINDEST="$pkgdir"/usr/bin \ - DATDEST="$pkgdir"/var/lib/ircservices \ - install || return 1 - - install -d "$pkgdir"/usr/share/man/man8 - install docs/ircservices.8 "$pkgdir"/usr/share/man/man8/ircservices.8 - install docs/convert-db.8 \ - "$pkgdir"/usr/share/man/man8/ircservices-convert-db.8 - - # try conform to FHS - cd "$pkgdir" - install -d etc/ircservices usr/share/ircservices var/log/ircservices - - mv var/lib/ircservices/convert-db usr/bin/ircservices-convert-db - - mv var/lib/ircservices/example-ircservices.conf \ - etc/ircservices/ircservices.conf - ln -s /etc/ircservices/ircservices.conf \ - var/lib/ircservices/ircservices.conf - - mv var/lib/ircservices/example-modules.conf \ - etc/ircservices/modules.conf - ln -s /etc/ircservices/modules.conf var/lib/ircservices/modules.conf - - mv var/lib/ircservices/languages \ - var/lib/ircservices/helpfiles \ - usr/share/ircservices/ - ln -s /usr/share/ircservices/languages var/lib/ircservices/ - ln -s /usr/share/ircservices/helpfiles var/lib/ircservices/ - - install -Dm755 "$srcdir"/ircservices.initd \ - etc/init.d/ircservices - - chown ircservices:ircservices var/lib/ircservices \ - var/log/ircservices - - chown root:ircservices etc/ircservices/ircservices.conf \ - etc/ircservices/modules.conf -} - -md5sums="3db58bb1645423a23872e8d1f51a8a99 ircservices-5.1.21.tar.gz -279ea42c5d97b47787b5959c9981fbaa ircservices.initd" diff --git a/testing/ircservices/ircservices.confd b/testing/ircservices/ircservices.confd deleted file mode 100644 index 31cc902d2..000000000 --- a/testing/ircservices/ircservices.confd +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-irc/ircservices/files/ircservices.conf.d,v 1.2 2005/05/16 15:36:11 swegener Exp $ - -# Se this to true to have ircservices depend on a local ircd to be up -LOCALIRCD="false" diff --git a/testing/ircservices/ircservices.initd b/testing/ircservices/ircservices.initd deleted file mode 100644 index 8c2a11e8b..000000000 --- a/testing/ircservices/ircservices.initd +++ /dev/null @@ -1,29 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-irc/ircservices/files/ircservices.init.d,v 1.5 2006/11/05 22:23:08 swegener Exp $ - -depend() { - need net - after firewall - use ircd -} - -start() { - ebegin "Starting IRC Services" - start-stop-daemon --start --quiet --exec /usr/bin/ircservices \ - --chuid ircservices \ - -- \ - -dir=/var/lib/ircservices \ - -log=/var/log/ircservices/ircservices.log \ - &>/dev/null - eend $? -} - -stop() { - ebegin "Stopping IRC Services" - start-stop-daemon --stop --quiet \ - --pidfile /var/lib/ircservices/ircservices.pid - eend $? - rm -f /var/lib/ircservices/ircservices.pid -} diff --git a/testing/ircservices/ircservices.pre-install b/testing/ircservices/ircservices.pre-install deleted file mode 100644 index 093f88856..000000000 --- a/testing/ircservices/ircservices.pre-install +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -adduser -h /var/lib/ircservices -s /bin/false -S -D ircservices 2>/dev/null -exit 0 - diff --git a/testing/kamailio/APKBUILD b/testing/kamailio/APKBUILD deleted file mode 100644 index db7af6dac..000000000 --- a/testing/kamailio/APKBUILD +++ /dev/null @@ -1,155 +0,0 @@ -# Contributor: Michael Mason <ms13sp@gmail.com> -# Maintainer: Natanael Copa <ncopa@alpinelinux.org> -pkgname=kamailio -pkgver=3.0.2 -pkgrel=3 -pkgdesc="Open Source SIP Server" -url="http://www.kamailio.org/" -pkgusers="kamailio" -pkggroups="kamailio" -license="GPL" -depends= -makedepends="bison flex expat-dev postgresql-dev pcre-dev - libxml2-dev curl-dev unixodbc-dev confuse-dev" -install= -subpackages="$pkgname-doc $pkgname-postgres $pkgname-presence - $pkgname-mediaproxy $pkgname-unixodbc" -source="http://www.kamailio.org/pub/kamailio/$pkgver/src/kamailio-${pkgver}_src.tar.gz - kamailio.cfg - kamailio.initd - kamailio.pre-install - kamailio.post-install - kamailio-3-backslash.patch - " - -_builddir="$srcdir"/$pkgname-$pkgver -# Makefile does not handle newline -_presence="presence presence_xml presence_mwi pua pua_bla pua_mi pua_usrloc pua_xmpp rls xcap_client presence_dialoginfo pua_dialoginfo" - -_modules="db_postgres mediaproxy db_unixodbc carrierroute xmlrpc tm $_presence" - - -prepare() { - cd "$_builddir" - patch -p1 -i "$srcdir"/kamailio-3-backslash.patch || return 1 - - sed -i \ - -e "s:-O9 -funroll-loops:$CFLAGS:g" \ - Makefile.defs \ - || return 1 - -# -e 's:^cfg-target.*:cfg-target = $(cfg-dir):' \ -# -e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' \ - - cd utils/kamctl/ - sed -i -e 's:/var/run/kamailio.pid:/var/run/kamailio/kamailio.pid:g' \ - kamctl.base kamctlrc || return 1 - # we actually dont need bash - sed -i -e 's:/bin/bash:/bin/sh:' kamctl kamdbctl \ - || return 1 - # Set email_address field as not required field (could be null) - cd dbtext/kamailio - sed -i -e 's:email_address(string):email_address(string,null):' subscriber \ - || return 1 - -} - -build() { - cd "$_builddir" - make LOCALBASE=/usr \ - cfg_target=/etc/kamailio/ \ - MODS_MYSQL=yes \ - MODS_PCRE=yes \ - MODS_RADIUS= \ - TLS= \ - include_modules="$_modules" \ - all || return 1 -} - -package() { - cd "$_builddir" - make LOCALBASE=/usr \ - cfg_target=/etc/kamailio/ \ - MODS_MYSQL=yes \ - MODS_PCRE=yes \ - MODS_RADIUS= \ - TLS= \ - include_modules="$_modules" \ - basedir="$pkgdir" \ - cfg_prefix="$pkgdir" \ - install || return 1 - - # move default config to -doc package and use our own default config - - mv "$pkgdir"/etc/kamailio/kamailio.cfg \ - "$pkgdir"/usr/share/doc/kamailio/ - install -m644 -D "$srcdir"/kamailio.cfg \ - "$pkgdir"/etc/kamailio/kamailio.cfg - - install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname - install -d -o kamailio "$pkgdir"/var/run/kamailio -} - -_mv_mod() { - local moddir=usr/lib/kamailio/modules i= - mkdir -p "$subpkgdir"/$moddir - for i in $@; do - mv "$pkgdir"/$moddir/$i.so "$subpkgdir"/$moddir/ || return 1 - done -} - -_mv_mod_k() { - local moddir=usr/lib/kamailio/modules_k i= - mkdir -p "$subpkgdir"/$moddir - for i in $@; do - mv "$pkgdir"/$moddir/$i.so "$subpkgdir"/$moddir/ || return 1 - done -} - - -mysql() { - pkgdesc="MySQL support for kamailio" - depends="kamailio mysql-client" - _mv_mod db_mysql - mkdir -p "$subpkgdir"/usr/share/kamailio - mv "$pkgdir"/usr/share/kamailio/mysql \ - "$subpkgdir"/usr/share/kamailio/ -} - -postgres() { - pkgdesc="PostgreSQL support for kamailio" - depends="kamailio postgresql-client" - _mv_mod db_postgres - mkdir -p "$subpkgdir"/usr/share/kamailio - mv "$pkgdir"/usr/share/kamailio/postgres \ - "$subpkgdir"/usr/share/kamailio/ -} - -pcre() { - pkgdesc="Regular expressions support for kamailio" - _mv_mod dialplan lcr regex -} - -presence() { - pkgdesc="Presence support for kamailio" - _mv_mod_k $_presence -} - -mediaproxy() { - pkgdesc="Mediaproxy support for kamailio" - depends="kamailio" - _mv_mod mediaproxy -} - -unixodbc() { - pkgdesc="UnixODBC support for kamailio" - depends="kamailio" - _mv_mod_k db_unixodbc -} - -md5sums="dd039e078a77032a423fb15f9685ad31 kamailio-3.0.2_src.tar.gz -a3c959ec568c43a905710e7d25cd8c25 kamailio.cfg -81100c479890a2a8c2628db22fdd1a0c kamailio.initd -c646af2dd31f5c4289a2f802c873d98f kamailio.pre-install -3fbaf633ff1620d0d526fc4047c7bed9 kamailio.post-install -36f81be3a082a81497e261ac8e6c5414 kamailio-3-backslash.patch" diff --git a/testing/kamailio/kamailio-3-backslash.patch b/testing/kamailio/kamailio-3-backslash.patch deleted file mode 100644 index f132aebab..000000000 --- a/testing/kamailio/kamailio-3-backslash.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/scripts/kamdbctl.base b/scripts/kamdbctl.base -index 83f5a8a..5b640be 100644 ---- a/utils/kamctl/kamdbctl.base -+++ b/utils/kamctl/kamdbctl.base -@@ -32,13 +32,13 @@ INSTALL_PRESENCE_TABLES=${INSTALL_PRESENCE_TABLES:-ask} - - # Used by dbtext and db_berkeley to define tables to be created, used by - # postgres to do the grants --STANDARD_TABLES=${STANDARD_TABLES:-version acc dbaliases lcr domain grp -- uri speed_dial gw pdt subscriber location re_grp trusted -- address missed_calls usr_preferences aliases silo dialog -+STANDARD_TABLES=${STANDARD_TABLES:-version acc dbaliases lcr domain grp \ -+ uri speed_dial gw pdt subscriber location re_grp trusted \ -+ address missed_calls usr_preferences aliases silo dialog \ - dispatcher dialplan} --EXTRA_TABLES=${EXTRA_TABLES:-imc_members imc_rooms cpl sip_trace domainpolicy carrierroute -+EXTRA_TABLES=${EXTRA_TABLES:-imc_members imc_rooms cpl sip_trace domainpolicy carrierroute \ - carrier_name domain_name carrierfailureroute userblacklist globalblacklist htable purplemap} --PRESENCE_TABLES=${PRESENCE_TABLES:-presentity active_watchers watchers xcap -+PRESENCE_TABLES=${PRESENCE_TABLES:-presentity active_watchers watchers xcap \ - pua rls_presentity rls_watchers} - - # SQL definitions -@@ -61,9 +61,9 @@ GREP=${GREP:-grep} - SED=${SED:-sed} - - # define what modules should be installed --STANDARD_MODULES=${STANDARD_MODULES:-standard acc lcr domain group permissions -- registrar usrloc msilo alias_db uri_db -- speeddial avpops auth_db pdt dialog dispatcher -+STANDARD_MODULES=${STANDARD_MODULES:-standard acc lcr domain group permissions \ -+ registrar usrloc msilo alias_db uri_db \ -+ speeddial avpops auth_db pdt dialog dispatcher \ - dialplan} - EXTRA_MODULES=${EXTRA_MODULES:-imc cpl siptrace domainpolicy carrierroute userblacklist htable purple} - diff --git a/testing/kamailio/kamailio.cfg b/testing/kamailio/kamailio.cfg deleted file mode 100644 index 1558cce9c..000000000 --- a/testing/kamailio/kamailio.cfg +++ /dev/null @@ -1,107 +0,0 @@ -# Sample Kamailio Configuration -# 23 June 2010 - For Alpine Linux -# Accepts all registrations; routes calls to any registered AOR - -#-------------------------------------------------------- -# Section 1: Global Definitions -#-------------------------------------------------------- -debug = 2 -fork = yes -log_stderror = no -# listen = 0.0.0.0 -port = 5060 -children = 4 - -dns = no -rev_dns = no - -mpath = "/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/" - -#-------------------------------------------------------- -# Section 2: Modules -#-------------------------------------------------------- - -loadmodule "tm.so" -loadmodule "sl.so" -loadmodule "tmx.so" -loadmodule "rr.so" -loadmodule "maxfwd.so" -loadmodule "usrloc.so" -loadmodule "registrar.so" -loadmodule "mi_fifo.so" -loadmodule "pv.so" -loadmodule "xlog.so" - -#-------------------------------------------------------- -# Section 3: Module Configuration -#-------------------------------------------------------- - -modparam ( "usrloc", "db_mode", 0 ) -modparam ( "rr", "enable_full_lr", 1 ) -modparam ( "mi_fifo", "fifo_name", "/tmp/kamailio_fifo") - -#-------------------------------------------------------- -# Section 4: Main Route Block -#-------------------------------------------------------- - -route - { - # Uncomment next line if you want to see - # each incoming message - xlog( "L_INFO", "$rm: $fu -> $ru" ); - - if (!mf_process_maxfwd_header("10")) - { - sl_send_reply("483", "Too Many Hops"); - return; - } - - if (msg:len > 4096) - { - sl_send_reply("513", "Message too big" ); - return; - } - - if (method == "REGISTER" ) - { - route(REGISTER); - return; - } - - loose_route(); - - if (!lookup("location")) { - sl_send_reply("404", "User Not Found"); - return; - } - - route(RELAY); - -} -#-------------------------------------------------------- -# Section 5: Secondary Route Blocks -#-------------------------------------------------------- - -# - Default message handler -route[RELAY] { - if (!t_relay()) { - sl_reply_error(); - } -} - -#- Registration Request -route[REGISTER] { - if (!save("location")) { - sl_reply_error(); - } -} - -#-------------------------------------------------------- -# Section 6: Reply Route Block -#-------------------------------------------------------- - - -#-------------------------------------------------------- -# Section 7: Failure Route Block -#-------------------------------------------------------- - diff --git a/testing/kamailio/kamailio.initd b/testing/kamailio/kamailio.initd deleted file mode 100644 index ee4e2ecef..000000000 --- a/testing/kamailio/kamailio.initd +++ /dev/null @@ -1,26 +0,0 @@ -#!/sbin/runscript - -daemon=/usr/sbin/kamailio -pidfile=/var/run/kamailio/kamailio.pid - -depend() { - need net - after firewall -} - -start() { - ebegin "Starting Kamailio" - start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \ - -- \ - -u ${KAMAILIO_USER:-kamailio} \ - -g ${KAMAILIO_GROUP:-kamailio} \ - -P $pidfile \ - ${KAMAILIO_OPTS:-} - eend $? -} - -stop() { - ebegin "Stopping Kamailio" - start-stop-daemon --stop --quiet --pidfile $pidfile - eend $? -} diff --git a/testing/kamailio/kamailio.post-install b/testing/kamailio/kamailio.post-install deleted file mode 100644 index 19fc932dd..000000000 --- a/testing/kamailio/kamailio.post-install +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -chown -R kamailio:kamailio /var/run/kamailio -chgrp kamailio /etc/kamailio/kamailio.cfg -exit 0 diff --git a/testing/kamailio/kamailio.pre-install b/testing/kamailio/kamailio.pre-install deleted file mode 100644 index 78dfa38bf..000000000 --- a/testing/kamailio/kamailio.pre-install +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -adduser -H -h /var/empty -s /bin/false -D kamailio 2>/dev/null - -exit 0 diff --git a/testing/libgee/APKBUILD b/testing/libgee/APKBUILD new file mode 100644 index 000000000..23c52d98b --- /dev/null +++ b/testing/libgee/APKBUILD @@ -0,0 +1,25 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=libgee +pkgver=0.5.1 +pkgrel=0 +pkgdesc="GObject collection library" +url="http://live.gnome.org/Libgee" +license="LGPL2.1" +depends="" +makedepends=" glib-dev" +subpackages="$pkgname-dev" +source="http://ftp.gnome.org/pub/GNOME/sources/libgee/0.5/libgee-$pkgver.tar.bz2" + +_builddir="$srcdir"/$pkgname-$pkgver +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --disable-static || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 +} + +md5sums="59789b5b266beadfb8b51bf2c96211b3 libgee-0.5.1.tar.bz2" diff --git a/testing/libtirpc/APKBUILD b/testing/libtirpc/APKBUILD deleted file mode 100644 index d77553d5b..000000000 --- a/testing/libtirpc/APKBUILD +++ /dev/null @@ -1,37 +0,0 @@ -# Maintainer: Natanael Copa <ncopa@alpinelinux.org> -pkgname=libtirpc -pkgver=0.2.1 -pkgrel=1 -pkgdesc="Transport Independent RPC library (SunRPC replacement)" -url="http://libtirpc.sourceforge.net/" -license="GPL2" -depends= -makedepends="libgssglue-dev heimdal-dev" -subpackages="$pkgname-dev $pkgname-doc" -source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2 - nis.h" - -depends_dev="libgssglue-dev heimdal-dev" -prepare() { - cd "$srcdir"/$pkgname-$pkgver - # uclibc does not provide nis.h so provide our own - mkdir src/rpcsvc - cp "$srcdir"/nis.h src/rpcsvc/ - # we dont have nsl - sed -i -e "/^libtirpc_la_LDFLAGS/s/-lnsl//" src/Makefile.in -} - -build() { - cd "$srcdir"/$pkgname-$pkgver - ./configure --prefix=/usr \ - --enable-gss - make || return 1 -} - -package() { - cd $srcdir/$pkgname-$pkgver - make DESTDIR="$pkgdir" install || return 1 - install -D -m644 doc/etc_netconfig "$pkgdir"/etc/netconfig -} -md5sums="d77eb15f464bf9d6e66259eaf78b2a4e libtirpc-0.2.1.tar.bz2 -082dff1bc78bdcbac6d305c1534fe3c0 nis.h" diff --git a/testing/libtirpc/nis.h b/testing/libtirpc/nis.h deleted file mode 100644 index a03a25f37..000000000 --- a/testing/libtirpc/nis.h +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user or with the express written consent of - * Sun Microsystems, Inc. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ - -#ifndef _RPCSVC_NIS_H -#define _RPCSVC_NIS_H 1 - -#include <features.h> -//#include <rpc/rpc.h> -//#include <rpcsvc/nis_tags.h> - -__BEGIN_DECLS - -/* - * nis.h - * - * This file is the main include file for NIS clients. It contains - * both the client library function defines and the various data - * structures used by the NIS service. It includes the file nis_tags.h - * which defines the tag values. This allows the tags to change without - * having to change the nis.x file. - * - * NOTE : THIS FILE IS NOT GENERATED WITH RPCGEN ! SO YOU HAVE TO - * ADD ALL THE CHANGES ON nis_*.x FILES HERE AGAIN ! - * - * I have removed all the Solaris internal structs and variables, - * because they are not supported, Sun changed them between various - * releases and they shouldn't be used in user programs. - * <kukuk@suse.de> - */ - - -#ifndef __nis_object_h -#define __nis_object_h - -#define NIS_MAXSTRINGLEN 255 -#define NIS_MAXNAMELEN 1024 -#define NIS_MAXATTRNAME 32 -#define NIS_MAXATTRVAL 2048 -#define NIS_MAXCOLUMNS 64 -#define NIS_MAXATTR 16 -#define NIS_MAXPATH 1024 -#define NIS_MAXREPLICAS 128 -#define NIS_MAXLINKS 16 -#define NIS_PK_NONE 0 -#define NIS_PK_DH 1 -#define NIS_PK_RSA 2 -#define NIS_PK_KERB 3 -#define NIS_PK_DHEXT 4 - -struct nis_attr { - char *zattr_ndx; - struct { - u_int zattr_val_len; - char *zattr_val_val; - } zattr_val; -}; -typedef struct nis_attr nis_attr; - -typedef char *nis_name; - -enum zotypes { - BOGUS_OBJ = 0, - NO_OBJ = 1, - DIRECTORY_OBJ = 2, - GROUP_OBJ = 3, - TABLE_OBJ = 4, - ENTRY_OBJ = 5, - LINK_OBJ = 6, - PRIVATE_OBJ = 7, - NIS_BOGUS_OBJ = 0, - NIS_NO_OBJ = 1, - NIS_DIRECTORY_OBJ = 2, - NIS_GROUP_OBJ = 3, - NIS_TABLE_OBJ = 4, - NIS_ENTRY_OBJ = 5, - NIS_LINK_OBJ = 6, - NIS_PRIVATE_OBJ = 7 -}; -typedef enum zotypes zotypes; - -enum nstype { - UNKNOWN = 0, - NIS = 1, - SUNYP = 2, - IVY = 3, - DNS = 4, - X500 = 5, - DNANS = 6, - XCHS = 7, - CDS = 8, -}; -typedef enum nstype nstype; - -struct oar_mask { - uint32_t oa_rights; - zotypes oa_otype; -}; -typedef struct oar_mask oar_mask; - -struct endpoint { - char *uaddr; - char *family; - char *proto; -}; -typedef struct endpoint endpoint; - -struct nis_server { - nis_name name; - struct { - u_int ep_len; - endpoint *ep_val; - } ep; - uint32_t key_type; - netobj pkey; -}; -typedef struct nis_server nis_server; - -struct directory_obj { - nis_name do_name; - nstype do_type; - struct { - u_int do_servers_len; - nis_server *do_servers_val; - } do_servers; - uint32_t do_ttl; - struct { - u_int do_armask_len; - oar_mask *do_armask_val; - } do_armask; -}; -typedef struct directory_obj directory_obj; - -#define EN_BINARY 1 -#define EN_CRYPT 2 -#define EN_XDR 4 -#define EN_MODIFIED 8 -#define EN_ASN1 64 - -struct entry_col { - uint32_t ec_flags; - struct { - u_int ec_value_len; - char *ec_value_val; - } ec_value; -}; -typedef struct entry_col entry_col; - -struct entry_obj { - char *en_type; - struct { - u_int en_cols_len; - entry_col *en_cols_val; - } en_cols; -}; -typedef struct entry_obj entry_obj; - -struct group_obj { - uint32_t gr_flags; - struct { - u_int gr_members_len; - nis_name *gr_members_val; - } gr_members; -}; -typedef struct group_obj group_obj; - -struct link_obj { - zotypes li_rtype; - struct { - u_int li_attrs_len; - nis_attr *li_attrs_val; - } li_attrs; - nis_name li_name; -}; -typedef struct link_obj link_obj; - -#define TA_BINARY 1 -#define TA_CRYPT 2 -#define TA_XDR 4 -#define TA_SEARCHABLE 8 -#define TA_CASE 16 -#define TA_MODIFIED 32 -#define TA_ASN1 64 - -struct table_col { - char *tc_name; - uint32_t tc_flags; - uint32_t tc_rights; -}; -typedef struct table_col table_col; - -struct table_obj { - char *ta_type; - int ta_maxcol; - u_char ta_sep; - struct { - u_int ta_cols_len; - table_col *ta_cols_val; - } ta_cols; - char *ta_path; -}; -typedef struct table_obj table_obj; - -struct objdata { - zotypes zo_type; - union { - struct directory_obj di_data; - struct group_obj gr_data; - struct table_obj ta_data; - struct entry_obj en_data; - struct link_obj li_data; - struct { - u_int po_data_len; - char *po_data_val; - } po_data; - } objdata_u; -}; -typedef struct objdata objdata; - -struct nis_oid { - uint32_t ctime; - uint32_t mtime; -}; -typedef struct nis_oid nis_oid; - -struct nis_object { - nis_oid zo_oid; - nis_name zo_name; - nis_name zo_owner; - nis_name zo_group; - nis_name zo_domain; - uint32_t zo_access; - uint32_t zo_ttl; - objdata zo_data; -}; -typedef struct nis_object nis_object; - -#endif /* if __nis_object_h */ - -enum nis_error { - NIS_SUCCESS = 0, - NIS_S_SUCCESS = 1, - NIS_NOTFOUND = 2, - NIS_S_NOTFOUND = 3, - NIS_CACHEEXPIRED = 4, - NIS_NAMEUNREACHABLE = 5, - NIS_UNKNOWNOBJ = 6, - NIS_TRYAGAIN = 7, - NIS_SYSTEMERROR = 8, - NIS_CHAINBROKEN = 9, - NIS_PERMISSION = 10, - NIS_NOTOWNER = 11, - NIS_NOT_ME = 12, - NIS_NOMEMORY = 13, - NIS_NAMEEXISTS = 14, - NIS_NOTMASTER = 15, - NIS_INVALIDOBJ = 16, - NIS_BADNAME = 17, - NIS_NOCALLBACK = 18, - NIS_CBRESULTS = 19, - NIS_NOSUCHNAME = 20, - NIS_NOTUNIQUE = 21, - NIS_IBMODERROR = 22, - NIS_NOSUCHTABLE = 23, - NIS_TYPEMISMATCH = 24, - NIS_LINKNAMEERROR = 25, - NIS_PARTIAL = 26, - NIS_TOOMANYATTRS = 27, - NIS_RPCERROR = 28, - NIS_BADATTRIBUTE = 29, - NIS_NOTSEARCHABLE = 30, - NIS_CBERROR = 31, - NIS_FOREIGNNS = 32, - NIS_BADOBJECT = 33, - NIS_NOTSAMEOBJ = 34, - NIS_MODFAIL = 35, - NIS_BADREQUEST = 36, - NIS_NOTEMPTY = 37, - NIS_COLDSTART_ERR = 38, - NIS_RESYNC = 39, - NIS_FAIL = 40, - NIS_UNAVAIL = 41, - NIS_RES2BIG = 42, - NIS_SRVAUTH = 43, - NIS_CLNTAUTH = 44, - NIS_NOFILESPACE = 45, - NIS_NOPROC = 46, - NIS_DUMPLATER = 47, -}; -typedef enum nis_error nis_error; - -struct nis_result { - nis_error status; - struct { - u_int objects_len; - nis_object *objects_val; - } objects; - netobj cookie; - uint32_t zticks; - uint32_t dticks; - uint32_t aticks; - uint32_t cticks; -}; -typedef struct nis_result nis_result; - -struct ns_request { - nis_name ns_name; - struct { - u_int ns_object_len; - nis_object *ns_object_val; - } ns_object; -}; -typedef struct ns_request ns_request; - -struct ib_request { - nis_name ibr_name; - struct { - u_int ibr_srch_len; - nis_attr *ibr_srch_val; - } ibr_srch; - uint32_t ibr_flags; - struct { - u_int ibr_obj_len; - nis_object *ibr_obj_val; - } ibr_obj; - struct { - u_int ibr_cbhost_len; - nis_server *ibr_cbhost_val; - } ibr_cbhost; - u_int ibr_bufsize; - netobj ibr_cookie; -}; -typedef struct ib_request ib_request; - -struct ping_args { - nis_name dir; - uint32_t stamp; -}; -typedef struct ping_args ping_args; - -enum log_entry_t { - LOG_NOP = 0, - ADD_NAME = 1, - REM_NAME = 2, - MOD_NAME_OLD = 3, - MOD_NAME_NEW = 4, - ADD_IBASE = 5, - REM_IBASE = 6, - MOD_IBASE = 7, - UPD_STAMP = 8, -}; -typedef enum log_entry_t log_entry_t; - -struct log_entry { - uint32_t le_time; - log_entry_t le_type; - nis_name le_princp; - nis_name le_name; - struct { - u_int le_attrs_len; - nis_attr *le_attrs_val; - } le_attrs; - nis_object le_object; -}; -typedef struct log_entry log_entry; - -struct log_result { - nis_error lr_status; - netobj lr_cookie; - struct { - u_int lr_entries_len; - log_entry *lr_entries_val; - } lr_entries; -}; -typedef struct log_result log_result; - -struct cp_result { - nis_error cp_status; - uint32_t cp_zticks; - uint32_t cp_dticks; -}; -typedef struct cp_result cp_result; - -struct nis_tag { - uint32_t tag_type; - char *tag_val; -}; -typedef struct nis_tag nis_tag; - -struct nis_taglist { - struct { - u_int tags_len; - nis_tag *tags_val; - } tags; -}; -typedef struct nis_taglist nis_taglist; - -struct dump_args { - nis_name da_dir; - uint32_t da_time; - struct { - u_int da_cbhost_len; - nis_server *da_cbhost_val; - } da_cbhost; -}; -typedef struct dump_args dump_args; - -struct fd_args { - nis_name dir_name; - nis_name requester; -}; -typedef struct fd_args fd_args; - -struct fd_result { - nis_error status; - nis_name source; - struct { - u_int dir_data_len; - char *dir_data_val; - } dir_data; - struct { - u_int signature_len; - char *signature_val; - } signature; -}; -typedef struct fd_result fd_result; - -/* Generic client creating flags */ -#define ZMH_VC 1 -#define ZMH_DG 2 -#define ZMH_AUTH 4 - -/* Testing Access rights for objects */ - -#define NIS_READ_ACC 1 -#define NIS_MODIFY_ACC 2 -#define NIS_CREATE_ACC 4 -#define NIS_DESTROY_ACC 8 -/* Test macros. a == access rights, m == desired rights. */ -#define NIS_WORLD(a, m) (((a) & (m)) != 0) -#define NIS_GROUP(a, m) (((a) & ((m) << 8)) != 0) -#define NIS_OWNER(a, m) (((a) & ((m) << 16)) != 0) -#define NIS_NOBODY(a, m) (((a) & ((m) << 24)) != 0) -/* - * EOL Alert - The following non-prefixed test macros are - * here for backward compatability, and will be not be present - * in future releases - use the NIS_*() macros above. - */ -#define WORLD(a, m) (((a) & (m)) != 0) -#define GROUP(a, m) (((a) & ((m) << 8)) != 0) -#define OWNER(a, m) (((a) & ((m) << 16)) != 0) -#define NOBODY(a, m) (((a) & ((m) << 24)) != 0) - -#define OATYPE(d, n) (((d)->do_armask.do_armask_val+n)->oa_otype) -#define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights) -#define WORLD_DEFAULT (NIS_READ_ACC) -#define GROUP_DEFAULT (NIS_READ_ACC << 8) -#define OWNER_DEFAULT ((NIS_READ_ACC + NIS_MODIFY_ACC + NIS_CREATE_ACC +\ - NIS_DESTROY_ACC) << 16) -#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT) - -/* Result manipulation defines ... */ -#define NIS_RES_NUMOBJ(x) ((x)->objects.objects_len) -#define NIS_RES_OBJECT(x) ((x)->objects.objects_val) -#define NIS_RES_COOKIE(x) ((x)->cookie) -#define NIS_RES_STATUS(x) ((x)->status) - -/* These defines make getting at the variant part of the object easier. */ -#define TA_data zo_data.objdata_u.ta_data -#define EN_data zo_data.objdata_u.en_data -#define DI_data zo_data.objdata_u.di_data -#define LI_data zo_data.objdata_u.li_data -#define GR_data zo_data.objdata_u.gr_data - -#define __type_of(o) ((o)->zo_data.zo_type) - -/* Declarations for the internal subroutines in nislib.c */ -enum name_pos {SAME_NAME, HIGHER_NAME, LOWER_NAME, NOT_SEQUENTIAL, BAD_NAME}; -typedef enum name_pos name_pos; - -/* - * Defines for getting at column data in entry objects. Because RPCGEN - * generates some rather wordy structures, we create some defines that - * collapse the needed keystrokes to access a particular value using - * these definitions they take an nis_object *, and an int and return - * a u_char * for Value, and an int for length. - */ -#define ENTRY_VAL(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val -#define ENTRY_LEN(obj, col) (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len - - -/* Prototypes, and extern declarations for the NIS library functions. */ -//#include <rpcsvc/nislib.h> -#endif - -/* - * nis_3.h - * - * This file contains definitions that are only of interest to the actual - * service daemon and client stubs. Normal users of NIS will not include - * this file. - * - * NOTE : This include file is automatically created by a combination - * of rpcgen and sed. DO NOT EDIT IT, change the nis.x file instead - * and then remake this file. - */ -#ifndef __nis_3_h -#define __nis_3_h - -#define NIS_PROG 100300 -#define NIS_VERSION 3 - - -__END_DECLS - -#endif /* ! _RPCSVC_NIS_H */ diff --git a/testing/mdocml/APKBUILD b/testing/mdocml/APKBUILD new file mode 100644 index 000000000..03ede31f4 --- /dev/null +++ b/testing/mdocml/APKBUILD @@ -0,0 +1,33 @@ +# Contributor: +# Maintainer: +pkgname=mdocml +pkgver=1.10.4 +pkgrel=0 +pkgdesc="Roff implementation" +url="http://mdocml.bsd.lv/" +license="BSD" +depends= +makedepends= +install= +subpackages="$pkgname-doc" +source="http://mdocml.bsd.lv/snapshots/mdocml-$pkgver.tar.gz" + +_builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + cd "$_builddir" + sed -i -e 's:/usr/local:/usr:' Makefile || return 1 +} + +build() { + cd "$_builddir" + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" MANDIR=/usr/share/man \ + EXAMPLEDIR=/usr/share/doc/mdocml/examples install +} + +md5sums="f23e40cd64f4312b0c4e2d72e7999298 mdocml-1.10.4.tar.gz" diff --git a/testing/open-vm-tools/APKBUILD b/testing/open-vm-tools/APKBUILD new file mode 100644 index 000000000..97a3a7753 --- /dev/null +++ b/testing/open-vm-tools/APKBUILD @@ -0,0 +1,109 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=open-vm-tools +pkgver=8.4.2 +_pkgsubver=261024 +pkgrel=0 +pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools." +url="http://open-vm-tools.sourceforge.net/" +license="LGPL" +subpackages="$pkgname-gtk" +makedepends="procps-dev libdnet-dev icu-dev glib-dev pkgconfig bash + libtirpc-dev rpcgen icu-dev automake autoconf + gtk+-dev libxext-dev libxinerama-dev libxtst-dev gtkmm-dev + libnotify-dev libxrandr-dev + " +source="http://downloads.sourceforge.net/open-vm-tools/open-vm-tools-$pkgver-$_pkgsubver.tar.gz + getloadavg-uclibc.patch + codeset-uclibc.patch + ecvt.patch + iconv-uclibc.patch + libm.patch + checkvm-pie-safety.patch + resume-vm-default.patch + suspend-vm-default.patch + open-vm-tools.initd + open-vm.initd + open-vm.confd + " + +_builddir="$srcdir"/$pkgname-$pkgver-$_pkgsubver + +prepare() { + cd "$_builddir" + for i in "$srcdir"/*.patch; do + [ -r "$i" ] || continue + patch -p1 -i "$i" || return 1 + done + + sed -i -e 's/__unused1/st_atim.tv_nsec/g' \ + -e 's/__unused2/st_mtim.tv_nsec/g' \ + -e 's/__unused3/st_ctim.tv_nsec/g' \ + lib/file/filePosix.c lib/hgfsServer/hgfsServerLinux.c \ + || return 1 + + # workaround automake-1.10 issue + # http://ramblingfoo.blogspot.com/2007/07/required-file-configrpath-not-found.html + touch config/config.rpath + aclocal -I m4 && autoconf && automake +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --disable-unity \ + --with-dnet \ + --with-icu \ + --with-procps \ + --with-x \ + --without-kernel-modules \ + --without-pam \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make install DESTDIR=$pkgdir || return 1 + + # one of the plugins seems to be linked to libhgfsServer + # create a link to abuild gets happy + ln -s open-vm-tools/plugins/vmsvc/libhgfsServer.so \ + "$pkgdir"/usr/lib/libhgfsServer.so.0 + + # dont bother create a -dev package + rm -f "$pkgdir"/usr/lib/*.a "$pkgdir"/usr/lib/*.la + + install -Dm644 "$srcdir"/open-vm-tools.desktop \ + "$pkgdir"/etc/xdg/open-vm-tools.desktop + install -Dm755 "$srcdir"/open-vm-tools.initd \ + "$pkgdir"/etc/init.d/open-vm-tools + install -Dm644 "$srcdir"/open-vm.confd "$pkgdir"/etc/conf.d/open-vm + install -Dm755 "$srcdir"/open-vm.initd "$pkgdir"/etc/init.d/open-vm +} + +gtk() { + pkgdesc="Xorg apps and plugins for open-vm-tools" + mkdir -p "$subpkgdir"/usr/bin \ + "$subpkgdir"/usr/lib/open-vm-tools/plugins/vmusr \ + "$subpkgdir"/etc/ + mv "$pkgdir"/usr/bin/vmware-toolbox \ + "$pkgdir"/usr/bin/vmware-user \ + "$subpkgdir"/usr/bin/ + mv "$pkgdir"/usr/lib/open-vm-tools/plugins/vmusr/libresolutionSet.so \ + "$pkgdir"/usr/lib/open-vm-tools/plugins/vmusr/libvixUser.so \ + "$subpkgdir"/usr/lib/open-vm-tools/plugins/vmusr/ + mv "$pkgdir"/etc/xdg "$subpkgdir"/etc/ +} + +md5sums="4d9ddc865b42fc6982c3078031500486 open-vm-tools-8.4.2-261024.tar.gz +bf2398b976d849bfd29a02763984a68a getloadavg-uclibc.patch +82840b6bed002284b9bd2358707ee826 codeset-uclibc.patch +840e4d6ff3f53fc22bdedf4d64aabc91 ecvt.patch +454827c50f5b1290dd647717e87d0f5a iconv-uclibc.patch +7d02fc25aba5c248f3d98dac238f175b libm.patch +7ba4dea8fc5c285e4837f9e33d835083 checkvm-pie-safety.patch +2606c0d5b180a77634ad26343d68852d resume-vm-default.patch +c6d7a6640bb26c22e632aea21b04227b suspend-vm-default.patch +c79ca03660fa75d00028325f53a37b4e open-vm-tools.initd +b56e3e6ebde04054b27e23e7c6d0d22c open-vm.initd +2570d31a242f40eae8f8f2517536dd5f open-vm.confd" diff --git a/testing/open-vm-tools/checkvm-pie-safety.patch b/testing/open-vm-tools/checkvm-pie-safety.patch new file mode 100644 index 000000000..5a879c94b --- /dev/null +++ b/testing/open-vm-tools/checkvm-pie-safety.patch @@ -0,0 +1,67 @@ +From: Gordon Malm <gengor@gentoo.org> + +Make inline asm PIC-safe (do not clobber ebx). + +Thanks and credit to Anthony Basile for all his help and testing. + +Reference: http://bugs.gentoo.org/200376 + +--- a/checkvm/checkvm.c ++++ b/checkvm/checkvm.c +@@ -79,8 +79,16 @@ + { + uint32 eax, ebx, ecx, edx; + +- __asm__ volatile("inl (%%dx)" : +- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : ++ __asm__ volatile( ++#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler. ++ "movl %%ebx, %3 \n\t" ++ "inl (%%dx) \n\t" ++ "xchgl %%ebx, %3 \n\t" : ++ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) : ++#else ++ "inl (%%dx)" : ++ "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : ++#endif + "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETVERSION), + "2"(BDOOR_PORT) : "memory"); + version[0] = eax; +@@ -96,8 +104,16 @@ + { + uint32 eax, ebx, ecx, edx; + +- __asm__ volatile("inl (%%dx)" : +- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : ++ __asm__ volatile( ++#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler. ++ "movl %%ebx, %3 \n\t" ++ "inl (%%dx) \n\t" ++ "xchgl %%ebx, %3 \n\t" : ++ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) : ++#else ++ "inl (%%dx)" : ++ "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : ++#endif + "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETHWVERSION), + "2"(BDOOR_PORT) : "memory"); + *hwVersion = eax; +@@ -112,8 +128,16 @@ + { + uint32 eax, ebx, ecx, edx; + +- __asm__ volatile("inl (%%dx)" : +- "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : ++ __asm__ volatile( ++#if defined __PIC__ && !vm_x86_64 // %ebx is reserved by the compiler. ++ "movl %%ebx, %3 \n\t" ++ "inl (%%dx) \n\t" ++ "xchgl %%ebx, %3 \n\t" : ++ "=a"(eax), "=c"(ecx), "=d"(edx), "=r"(ebx) : ++#else ++ "inl (%%dx)" : ++ "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : ++#endif + "0"(BDOOR_MAGIC), "1"(BDOOR_CMD_GETSCREENSIZE), + "2"(BDOOR_PORT) : "memory"); + *screensize = eax; diff --git a/testing/open-vm-tools/codeset-uclibc.patch b/testing/open-vm-tools/codeset-uclibc.patch new file mode 100644 index 000000000..b26df1661 --- /dev/null +++ b/testing/open-vm-tools/codeset-uclibc.patch @@ -0,0 +1,20 @@ +--- ./lib/misc/codesetOld.c.orig ++++ ./lib/misc/codesetOld.c +@@ -723,7 +723,7 @@ + { + char *codeset; + +-#if defined(__linux__) ++#if defined(__linux__) && !defined(__UCLIBC__) + + locale_t new = newlocale(LC_CTYPE_MASK, "", NULL); + if (!new) { +@@ -739,7 +739,7 @@ + codeset = Util_SafeStrdup(nl_langinfo_l(CODESET, new)); + freelocale(new); + +-#elif defined(sun) ++#elif defined(sun) || defined(__UCLIBC__) + + char *locale = setlocale(LC_CTYPE, NULL); + if (!setlocale(LC_CTYPE, "")) { diff --git a/testing/open-vm-tools/ecvt.patch b/testing/open-vm-tools/ecvt.patch new file mode 100644 index 000000000..53e88e998 --- /dev/null +++ b/testing/open-vm-tools/ecvt.patch @@ -0,0 +1,205 @@ +commit e996e91ca5951c50769dcaa8e074daa973006849 +Author: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu Jul 8 06:39:36 2010 +0000 + + add ecvt() implementation + +diff --git a/lib/string/Makefile.am b/lib/string/Makefile.am +index 1edab81..5f2e7ab 100644 +--- a/lib/string/Makefile.am ++++ b/lib/string/Makefile.am +@@ -23,6 +23,7 @@ libString_la_SOURCES += bsd_vsnprintf.c + libString_la_SOURCES += bsd_vsnwprintf.c + libString_la_SOURCES += convertutf.c + libString_la_SOURCES += str.c ++libString_la_SOURCES += ecvt.c + + AM_CFLAGS = @LIB_STRING_CPPFLAGS@ + +diff --git a/lib/string/bsd_output_shared.c b/lib/string/bsd_output_shared.c +index 3616947..321d6f1 100644 +--- a/lib/string/bsd_output_shared.c ++++ b/lib/string/bsd_output_shared.c +@@ -64,6 +64,9 @@ + + #ifndef NO_FLOATING_POINT + ++extern char* ecvt(double arg, int ndigits, int *decptp, int *signp); ++extern char* fcvt(double arg, int ndigits, int *decptp, int *signp); ++ + /* + *----------------------------------------------------------------------------- + * +diff --git a/lib/string/ecvt.c b/lib/string/ecvt.c +new file mode 100644 +index 0000000..1979c3d +--- /dev/null ++++ b/lib/string/ecvt.c +@@ -0,0 +1,167 @@ ++/* ++ * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ++ * ++ * @APPLE_LICENSE_HEADER_START@ ++ * ++ * This file contains Original Code and/or Modifications of Original Code ++ * as defined in and that are subject to the Apple Public Source License ++ * Version 2.0 (the 'License'). You may not use this file except in ++ * compliance with the License. Please obtain a copy of the License at ++ * http://www.opensource.apple.com/apsl/ and read it before using this ++ * file. ++ * ++ * The Original Code and all software distributed under the License are ++ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. ++ * Please see the License for the specific language governing rights and ++ * limitations under the License. ++ * ++ * @APPLE_LICENSE_HEADER_END@ ++ */ ++/* ++ * ecvt converts to decimal ++ * the number of digits is specified by ndigit ++ * decptp is set to the position of the decimal point ++ * signp is set to 0 for positive, 1 for negative ++ */ ++ ++ ++static double ecvt_rint(double x); ++ ++static char *cvt(); ++ ++/* big enough to handle %.20f conversion of 1e308 */ ++#define NDIG 350 ++ ++char* ++ecvt(arg, ndigits, decptp, signp) ++double arg; ++int ndigits, *decptp, *signp; ++{ ++ return(cvt(arg, ndigits, decptp, signp, 1)); ++} ++ ++char* ++fcvt(arg, ndigits, decptp, signp) ++double arg; ++int ndigits, *decptp, *signp; ++{ ++ return(cvt(arg, ndigits, decptp, signp, 0)); ++} ++ ++static char* ++cvt(arg, ndigits, decptp, signp, eflag) ++double arg; ++int ndigits, *decptp, *signp; ++int eflag; ++{ ++ register int decpt; ++ double fi, fj; ++ register char *p, *p1; ++ static char buf[NDIG] = { 0 }; ++ double modf(); ++ ++ if (ndigits < 0) ++ ndigits = 0; ++ if (ndigits >= NDIG-1) ++ ndigits = NDIG-2; ++ ++ decpt = 0; ++ *signp = 0; ++ p = &buf[0]; ++ ++ if (arg == 0) { ++ *decptp = 0; ++ while (p < &buf[ndigits]) ++ *p++ = '0'; ++ *p = '\0'; ++ return(buf); ++ } else if (arg < 0) { ++ *signp = 1; ++ arg = -arg; ++ } ++ ++ arg = modf(arg, &fi); ++ p1 = &buf[NDIG]; ++ ++ /* ++ * Do integer part ++ */ ++ if (fi != 0) { ++ while (fi != 0) { ++ fj = modf(fi/10, &fi); ++ /**--p1 = (int)((fj+.03)*10) + '0';*/ ++ *--p1 = (int)ecvt_rint((fj)*10) + '0'; ++ decpt++; ++ } ++ while (p1 < &buf[NDIG]) ++ *p++ = *p1++; ++ } else if (arg > 0) { ++ while ((fj = arg*10) < 1) { ++ arg = fj; ++ decpt--; ++ } ++ } ++ *decptp = decpt; ++ ++ /* ++ * do fraction part ++ * p pts to where fraction should be concatenated ++ * p1 is how far conversion must go to ++ */ ++ p1 = &buf[ndigits]; ++ if (eflag==0) { ++ /* fcvt must provide ndigits after decimal pt */ ++ p1 += decpt; ++ /* if decpt was negative, we might done for fcvt */ ++ if (p1 < &buf[0]) { ++ buf[0] = '\0'; ++ return(buf); ++ } ++ } ++ while (p <= p1 && p < &buf[NDIG]) { ++ arg *= 10; ++ arg = modf(arg, &fj); ++ *p++ = (int)fj + '0'; ++ } ++ /* ++ * if we converted all the way to the end of the ++ * buf, don't mess with rounding since there's nothing ++ * significant out here anyway ++ */ ++ if (p1 >= &buf[NDIG]) { ++ buf[NDIG-1] = '\0'; ++ return(buf); ++ } ++ /* ++ * round by adding 5 to last digit and propagating ++ * carries ++ */ ++ p = p1; ++ *p1 += 5; ++ while (*p1 > '9') { ++ *p1 = '0'; ++ if (p1 > buf) ++ ++*--p1; ++ else { ++ *p1 = '1'; ++ (*decptp)++; ++ if (eflag == 0) { ++ if (p > buf) ++ *p = '0'; ++ p++; ++ } ++ } ++ } ++ *p = '\0'; ++ return(buf); ++} ++ ++static double ecvt_rint(double x) ++{ ++ asm("frndint" : "=t" (x) : "0" (x)); ++ return(x); ++} ++ diff --git a/testing/open-vm-tools/getloadavg-uclibc.patch b/testing/open-vm-tools/getloadavg-uclibc.patch new file mode 100644 index 000000000..247bd7037 --- /dev/null +++ b/testing/open-vm-tools/getloadavg-uclibc.patch @@ -0,0 +1,22 @@ +diff --git a/lib/misc/hostinfoPosix.c b/lib/misc/hostinfoPosix.c +index eeeb620..67387be 100644 +--- a/lib/misc/hostinfoPosix.c ++++ b/lib/misc/hostinfoPosix.c +@@ -1355,8 +1355,16 @@ HostinfoGetLoadAverage(float *avg0, // IN/OUT: + float *avg1, // IN/OUT: + float *avg2) // IN/OUT: + { ++#if defined(__UCLIBC__) ++ FILE *f; ++ if ((f = fopen("/proc/loadavg", "r")) == NULL) ++ return FALSE; ++ fscanf(f, "%f %f %f", avg0, avg1, avg2); ++ fclose(f); ++ return TRUE; ++ + /* getloadavg(3) was introduced with glibc 2.2 */ +-#if defined(GLIBC_VERSION_22) || defined(__APPLE__) ++#elif defined(GLIBC_VERSION_22) || defined(__APPLE__) + double avg[3]; + int res; + diff --git a/testing/open-vm-tools/iconv-uclibc.patch b/testing/open-vm-tools/iconv-uclibc.patch new file mode 100644 index 000000000..6b256db88 --- /dev/null +++ b/testing/open-vm-tools/iconv-uclibc.patch @@ -0,0 +1,12 @@ +--- ./configure.ac.orig ++++ ./configure.ac +@@ -1059,6 +1059,9 @@ + AC_DEFINE([NO_MULTIMON], 1, [Define to 1 if building without multimon support.]) + fi + ++AM_ICONV ++LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD $LIBICONV" ++ + if test "$os$userSpaceBitness" = "linux64" || test "$HAVE_SYS_SETUID" = "yes"; then + LIB_MISC_CPPFLAGS="$LIB_MISC_CPPFLAGS -DGLIBC_VERSION_21" + fi diff --git a/testing/open-vm-tools/libm.patch b/testing/open-vm-tools/libm.patch new file mode 100644 index 000000000..cd013f4d2 --- /dev/null +++ b/testing/open-vm-tools/libm.patch @@ -0,0 +1,18 @@ +--- a/hgfsmounter/Makefile.am ++++ b/hgfsmounter/Makefile.am +@@ -23,6 +23,7 @@ + mount_vmhgfs_LDADD += ../lib/panicDefault/libPanicDefault.la + mount_vmhgfs_LDADD += ../lib/panic/libPanic.la + mount_vmhgfs_LDADD += ../lib/stubs/libStubs.la ++mount_vmhgfs_LDADD += -lm + + mount_vmhgfs_SOURCES = + mount_vmhgfs_SOURCES += hgfsmounter.c +--- a/rpctool/Makefile.am ++++ b/rpctool/Makefile.am +@@ -25,4 +25,5 @@ + vmware_rpctool_LDADD += ../lib/message/libMessage.la + vmware_rpctool_LDADD += ../lib/backdoor/libBackdoor.la + vmware_rpctool_LDADD += ../lib/string/libString.la ++vmware_rpctool_LDADD += -lm + diff --git a/testing/open-vm-tools/open-vm-tools.desktop b/testing/open-vm-tools/open-vm-tools.desktop new file mode 100644 index 000000000..2107a62e0 --- /dev/null +++ b/testing/open-vm-tools/open-vm-tools.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Exec=vmware-user +Name=VMware User Agent +X-KDE-autostart-phase=1 +NoDisplay=true diff --git a/testing/open-vm-tools/open-vm-tools.initd b/testing/open-vm-tools/open-vm-tools.initd new file mode 100644 index 000000000..ee85c4d29 --- /dev/null +++ b/testing/open-vm-tools/open-vm-tools.initd @@ -0,0 +1,76 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools/files/open-vm-tools.initd,v 1.2 2009/12/20 14:05:43 vadimk Exp $ + +DND_TMPDIR="/tmp/VMwareDnD" +USER_GROUP="root:vmware" +DND_TMPDIR_PERMS="1777" +GUESTD_BIN="/usr/bin/vmtoolsd" +PIDFILE="/var/run/vmtoolsd.pid" +MOUNTPOINT="/proc/fs/vmblock/mountPoint" + +depend() { + before checkfs fsck net X +} + +start() { + if [ "${VM_DRAG_AND_DROP}" == "yes" ]; + then + + if ! grep -q -w vmblock /proc/modules; + then + ebegin "Loading vmblock module" + modprobe vmblock + eend $? + sleep 0.25 + fi + + if [[ ! -d "${DND_TMPDIR}" ]]; + then + # einfo "Creating the VM drag and drop directory" + mkdir "${DND_TMPDIR}" + chown "${USER_GROUP}" "${DND_TMPDIR}" + chmod "${DND_TMPDIR_PERMS}" "${DND_TMPDIR}" + fi + + # DnD_TMPDIR must exist before vmblock can be mounted + ebegin "Mounting vmblock device" + mount -t vmblock none ${MOUNTPOINT} + eend $? + fi + + ebegin "Starting vmtoolsd" + start-stop-daemon --chuid "${USER_GROUP}" --start --quiet --background --make-pidfile --pidfile "${PIDFILE}" --exec ${GUESTD_BIN} + eend $? +} + +stop() { + local ret + + if [ "${VM_DRAG_AND_DROP}" == "yes" ]; + then + ebegin "Cleaning the contents of ${DND_TMPDIR}" + # First check, whether ${DND_TMPDIR} isn valid... we shouldn't risk deleting the content of ""/* + if [[ ! -z "${DND_TMPDIR}" ]] && [[ "${DND_TMPDIR}" != "/" ]]; + then + rm -rf ${DND_TMPDIR}/* + ret=0 + else + eerror "Not cleaning up ${DND_TMPDIR}, please check definition of variable" + ret=1 + fi + eend $ret + + ebegin "Unmounting vmblock device" + if grep -q -w "${MOUNTPOINT}" /proc/mounts; + then + umount ${MOUNTPOINT} 1>&2 > /dev/null + fi + eend 0 + fi + + ebegin "Stopping vmtoolsd" + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + eend $? +} diff --git a/testing/open-vm-tools/open-vm.confd b/testing/open-vm-tools/open-vm.confd new file mode 100644 index 000000000..4414fabdb --- /dev/null +++ b/testing/open-vm-tools/open-vm.confd @@ -0,0 +1,2 @@ +# Set this to no to disable drag and drop (and vmblock) loading. +VM_DRAG_AND_DROP="yes" diff --git a/testing/open-vm-tools/open-vm.initd b/testing/open-vm-tools/open-vm.initd new file mode 100644 index 000000000..d4f96cc87 --- /dev/null +++ b/testing/open-vm-tools/open-vm.initd @@ -0,0 +1,76 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/open-vm-tools/files/open-vm.initd,v 1.2 2008/02/01 12:33:36 flameeyes Exp $ + +DND_TMPDIR="/tmp/VMwareDnD" +USER_GROUP="root:vmware" +DND_TMPDIR_PERMS="1777" +GUESTD_BIN="/usr/sbin/vmware-guestd" +PIDFILE="/var/run/vmware-guestd.pid" +MOUNTPOINT="/proc/fs/vmblock/mountPoint" + +depend() { + before checkfs fsck net X +} + +start() { + if [ "${VM_DRAG_AND_DROP}" == "yes" ]; + then + + if ! grep -q -w vmblock /proc/modules; + then + ebegin "Loading vmblock module" + modprobe vmblock + eend $? + sleep 0.25 + fi + + if [[ ! -d "${DND_TMPDIR}" ]]; + then + # einfo "Creating the VM drag and drop directory" + mkdir "${DND_TMPDIR}" + chown "${USER_GROUP}" "${DND_TMPDIR}" + chmod "${DND_TMPDIR_PERMS}" "${DND_TMPDIR}" + fi + + # DnD_TMPDIR must exist before vmblock can be mounted + ebegin "Mounting vmblock device" + mount -t vmblock none ${MOUNTPOINT} + eend $? + fi + + ebegin "Starting vmware-guestd" + start-stop-daemon --chuid "${USER_GROUP}" --start --quiet --exec ${GUESTD_BIN} -- --background "${PIDFILE}" + eend $? +} + +stop() { + local ret + + if [ "${VM_DRAG_AND_DROP}" == "yes" ]; + then + ebegin "Cleaning the contents of ${DND_TMPDIR}" + # First check, whether ${DND_TMPDIR} isn valid... we shouldn't risk deleting the content of ""/* + if [[ ! -z "${DND_TMPDIR}" ]] && [[ "${DND_TMPDIR}" != "/" ]]; + then + rm -rf ${DND_TMPDIR}/* + ret=0 + else + eerror "Not cleaning up ${DND_TMPDIR}, please check definition of variable" + ret=1 + fi + eend $ret + + ebegin "Unmounting vmblock device" + if grep -q -w "${MOUNTPOINT}" /proc/mounts; + then + umount ${MOUNTPOINT} 1>&2 > /dev/null + fi + eend 0 + fi + + ebegin "Stopping vmware-guestd" + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + eend $? +} diff --git a/testing/open-vm-tools/resume-vm-default.patch b/testing/open-vm-tools/resume-vm-default.patch new file mode 100644 index 000000000..4d89a47f5 --- /dev/null +++ b/testing/open-vm-tools/resume-vm-default.patch @@ -0,0 +1,49 @@ +--- ./scripts/linux/resume-vm-default.orig ++++ ./scripts/linux/resume-vm-default +@@ -25,37 +25,6 @@ + echo `date` ": Executing '$0'" + echo + +-find_networking_script() { +- local script="error" +- for dir in "/etc/init.d" "/sbin/init.d" "/etc" "/etc/rc.d" ; do +- if [ -d "$dir/rc0.d" ] && +- [ -d "$dir/rc1.d" ] && +- [ -d "$dir/rc2.d" ] && +- [ -d "$dir/rc3.d" ] && +- [ -d "$dir/rc4.d" ] && +- [ -d "$dir/rc5.d" ] && +- [ -d "$dir/rc6.d" ]; then +- +- # Now find the appropriate networking script. +- if [ -d "$dir/init.d" ]; then +- if [ -x "$dir/init.d/network" ]; then +- script="$dir/init.d/network" +- elif [ -x "$dir/init.d/networking" ]; then +- script="$dir/init.d/networking" +- fi +- else +- if [ -x "$dir/network" ]; then +- script="$dir/network" +- elif [ -x "$dir/networking" ]; then +- script="$dir/networking" +- fi +- fi +- fi +- done +- +- echo "$script" +-} +- + rescue_NIC() { + niclist="/var/run/vmware-active-nics" + +@@ -121,7 +90,7 @@ + + wakeNetworkManager + +-network=`find_networking_script` ++network=/etc/init.d/networking + if [ "$network" != "error" ]; then + "$network" restart + # Continue even if the networking init script wasn't successful. diff --git a/testing/open-vm-tools/suspend-vm-default.patch b/testing/open-vm-tools/suspend-vm-default.patch new file mode 100644 index 000000000..38f8ae71d --- /dev/null +++ b/testing/open-vm-tools/suspend-vm-default.patch @@ -0,0 +1,49 @@ +--- a/scripts/linux/suspend-vm-default.org 2009-05-13 15:02:03.000000000 +0400 ++++ b/scripts/linux/suspend-vm-default 2009-05-13 15:05:18.394228810 +0400 +@@ -25,37 +25,6 @@ + echo `date` ": Executing '$0'" + echo + +-find_networking_script() { +- local script="error" +- for dir in "/etc/init.d" "/sbin/init.d" "/etc" "/etc/rc.d" ; do +- if [ -d "$dir/rc0.d" ] && +- [ -d "$dir/rc1.d" ] && +- [ -d "$dir/rc2.d" ] && +- [ -d "$dir/rc3.d" ] && +- [ -d "$dir/rc4.d" ] && +- [ -d "$dir/rc5.d" ] && +- [ -d "$dir/rc6.d" ]; then +- +- # Now find the appropriate networking script. +- if [ -d "$dir/init.d" ]; then +- if [ -x "$dir/init.d/network" ]; then +- script="$dir/init.d/network" +- elif [ -x "$dir/init.d/networking" ]; then +- script="$dir/init.d/networking" +- fi +- else +- if [ -x "$dir/network" ]; then +- script="$dir/network" +- elif [ -x "$dir/networking" ]; then +- script="$dir/networking" +- fi +- fi +- fi +- done +- +- echo "$script" +-} +- + save_active_NIC_list() { + ifconfig_path=`which ifconfig 2>/dev/null` + if [ $? ]; then +@@ -76,7 +45,7 @@ + + save_active_NIC_list + +-network=`find_networking_script` ++network=/etc/init.d/networking + if [ "$network" != "error" ]; then + "$network" stop + # If the network is down, this may fail but that's not a good reason diff --git a/testing/squidguard/APKBUILD b/testing/squidguard/APKBUILD new file mode 100644 index 000000000..522386ea2 --- /dev/null +++ b/testing/squidguard/APKBUILD @@ -0,0 +1,46 @@ +# Maintainer: Leonardo Arena <rnalrd@gmail.com> +pkgname=squidguard +_realname=squidGuard +pkgver=1.4 +pkgrel=0 +pkgdesc="Squid URL redirector" +url="http://www.squidguard.org" +license="GPL" +depends= +makedepends="flex bison db-dev" +install="$pkgname.post-install" +subpackages="" +source="http://www.squidguard.org/Downloads/$_realname-$pkgver.tar.gz + squidguard-1.4-gentoo.patch + squidguard-1.4-upstream-fixes.patch + squidguard-1.4-vsnprintf.patch" + +_builddir="$srcdir"/$_realname-$pkgver + +prepare() { + cd "$_builddir" + patch -p1 < ../../squidguard-1.4-gentoo.patch + patch -p1 < ../../squidguard-1.4-upstream-fixes.patch + patch -p1 < ../../squidguard-1.4-vsnprintf.patch +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --with-sg-config=/etc/squidGuard/squidGuard.conf \ + --with-sg-logdir=/var/log/squidGuard + make || return 1 +} + +package() { + cd "$_builddir" + make INSTDIR="$pkgdir" install + install -D -m644 ../../squidGuard.conf.blocksites $pkgdir/etc/squidGuard/squidGuard.conf + install -D -m644 ../../blockedsites $pkgdir/etc/squidGuard/blockedsites +} + +md5sums="de834150998c1386c30feae196f16b06 squidGuard-1.4.tar.gz +ba58e934fe2f75fcb5dfbe054e045449 squidguard-1.4-gentoo.patch +4b512e930dede70ddf36d4f7c75a598f squidguard-1.4-upstream-fixes.patch +8878c72f27e45dab99e5d0197d50caec squidguard-1.4-vsnprintf.patch" diff --git a/testing/squidguard/blockedsites b/testing/squidguard/blockedsites new file mode 100644 index 000000000..46279a47e --- /dev/null +++ b/testing/squidguard/blockedsites @@ -0,0 +1 @@ +sex.com diff --git a/testing/squidguard/squidGuard.conf.blocksites b/testing/squidguard/squidGuard.conf.blocksites new file mode 100644 index 000000000..eaa8cdeef --- /dev/null +++ b/testing/squidguard/squidGuard.conf.blocksites @@ -0,0 +1,13 @@ +logdir /var/log/squidGuard +dbhome /etc/squidGuard/db + +dest blockedsites { + domainlist blockedsites +} + +acl { + default { + pass !blockedsites all + redirect http://www.sample.com/empty.png + } +} diff --git a/testing/squidguard/squidGuard.conf.minimal b/testing/squidguard/squidGuard.conf.minimal new file mode 100644 index 000000000..3b0ebf55c --- /dev/null +++ b/testing/squidguard/squidGuard.conf.minimal @@ -0,0 +1,7 @@ +logdir /var/log/squidGuard + +acl { + default { + pass all + } +} diff --git a/testing/squidguard/squidguard-1.4-gentoo.patch b/testing/squidguard/squidguard-1.4-gentoo.patch new file mode 100644 index 000000000..60b5461e9 --- /dev/null +++ b/testing/squidguard/squidguard-1.4-gentoo.patch @@ -0,0 +1,74 @@ +diff -Nru squidGuard-1.4.orig/Makefile.in squidGuard-1.4/Makefile.in +--- squidGuard-1.4.orig/Makefile.in 2008-05-17 18:36:44.000000000 +0000 ++++ squidGuard-1.4/Makefile.in 2009-01-10 13:02:14.000000000 +0000 +@@ -43,7 +43,7 @@ + # Dependencies for installing + # + +-install: install-build install-conf ++install: install-build + + install-conf: + @echo Installing configuration file ; +@@ -85,10 +85,10 @@ + + install-build: + @echo Installing squidGuard +- @if [ ! -d $(bindir) ]; then \ +- $(MKINSTALLDIRS) $(bindir) ; \ ++ @if [ ! -d "$(INSTDIR)"/$(bindir) ]; then \ ++ $(MKINSTALLDIRS) "$(INSTDIR)"/$(bindir) ; \ + fi ; \ +- cp src/squidGuard $(bindir) || exit 1 ; \ ++ cp src/squidGuard "$(INSTDIR)"/$(bindir) || exit 1 ; \ + echo Done. ; + + clean:: +diff -Nru squidGuard-1.4.orig/src/Makefile.in squidGuard-1.4/src/Makefile.in +--- squidGuard-1.4.orig/src/Makefile.in 2009-01-03 20:05:39.000000000 +0000 ++++ squidGuard-1.4/src/Makefile.in 2009-01-10 13:02:14.000000000 +0000 +@@ -110,6 +110,8 @@ + mv -f y.tab.c y.tab.c.bison + mv -f y.tab.h y.tab.h.bison + ++sg.y sg.l: ++ + # + # Dependencies for installing + # +@@ -122,8 +124,8 @@ + + install.bin:: squidGuard + @echo making $@ in `basename \`pwd\`` +- @$(MKDIR) $(bindir) $(logdir) $(cfgdir) +- $(INSTALL_PROGRAM) squidGuard $(bindir)/squidGuard ++ @$(MKDIR) "$(INSTDIR)"/$(bindir) "$(INSTDIR)"/$(logdir) "$(INSTDIR)"/$(cfgdir) ++ $(INSTALL_PROGRAM) squidGuard "$(INSTDIR)"/$(bindir)/squidGuard + + uninstall.bin:: + @echo making $@ in `basename \`pwd\`` +diff -Nru squidGuard-1.4.orig/src/sgDb.c squidGuard-1.4/src/sgDb.c +--- squidGuard-1.4.orig/src/sgDb.c 2008-07-14 18:29:41.000000000 +0000 ++++ squidGuard-1.4/src/sgDb.c 2009-01-10 13:02:14.000000000 +0000 +@@ -103,13 +103,21 @@ + if(createdb) + flag = flag | DB_TRUNCATE; + if ((ret = ++#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) ++ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) { ++#else + Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, flag, 0664)) != 0) { ++#endif + (void) Db->dbp->close(Db->dbp, 0); + sgLogFatalError("Error db_open: %s", strerror(ret)); + } + } else { + if ((ret = ++#if DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) ++ Db->dbp->open(Db->dbp, NULL, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { ++#else + Db->dbp->open(Db->dbp, dbfile, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { ++#endif + sgLogFatalError("Error db_open: %s", strerror(ret)); + } + } diff --git a/testing/squidguard/squidguard-1.4-upstream-fixes.patch b/testing/squidguard/squidguard-1.4-upstream-fixes.patch new file mode 100644 index 000000000..007e6b4c3 --- /dev/null +++ b/testing/squidguard/squidguard-1.4-upstream-fixes.patch @@ -0,0 +1,24 @@ +diff -Nru squidGuard-1.4.orig/src/sgDiv.c.in squidGuard-1.4/src/sgDiv.c.in +--- squidGuard-1.4.orig/src/sgDiv.c.in 2008-07-14 18:02:43.000000000 +0200 ++++ squidGuard-1.4/src/sgDiv.c.in 2009-11-28 09:33:05.000000000 +0100 +@@ -745,7 +745,7 @@ + p++; + break; + case 'u': /* Requested URL */ +- strcat(buf, req->orig); ++ strncat(buf, req->orig, 2048); + p++; + break; + default: +diff -Nru squidGuard-1.4.orig/src/sg.h.in squidGuard-1.4/src/sg.h.in +--- squidGuard-1.4.orig/src/sg.h.in 2007-11-16 17:58:32.000000000 +0100 ++++ squidGuard-1.4/src/sg.h.in 2009-11-28 09:33:37.000000000 +0100 +@@ -73,7 +73,7 @@ + #define REQUEST_TYPE_REDIRECT 2 + #define REQUEST_TYPE_PASS 3 + +-#define MAX_BUF 4096 ++#define MAX_BUF 12288 + + #define DEFAULT_LOGFILE "squidGuard.log" + #define WARNING_LOGFILE "squidGuard.log" diff --git a/testing/squidguard/squidguard-1.4-vsnprintf.patch b/testing/squidguard/squidguard-1.4-vsnprintf.patch new file mode 100644 index 000000000..bf4efec60 --- /dev/null +++ b/testing/squidguard/squidguard-1.4-vsnprintf.patch @@ -0,0 +1,44 @@ +diff -Nru squidGuard-1.4.orig/configure.in squidGuard-1.4/configure.in +--- squidGuard-1.4.orig/configure.in 2009-04-26 12:28:49.000000000 +0000 ++++ squidGuard-1.4/configure.in 2009-04-26 12:29:35.000000000 +0000 +@@ -421,7 +421,7 @@ + AC_CHECK_FUNCS(regexec, , AC_MSG_ERROR([No regexec library function.])) + AC_CHECK_FUNCS(strdup, , AC_MSG_ERROR([No strdup library function.])) + AC_CHECK_FUNCS(strerror, , AC_MSG_ERROR([No strerror library function.])) +-AC_CHECK_FUNCS(vsprintf, , AC_MSG_ERROR([No vsprintf library function.])) ++AC_CHECK_FUNCS(vsnprintf, , AC_MSG_ERROR([No vsnprintf library function.])) + AC_CHECK_FUNCS(sigaction) + AC_CHECK_FUNCS(signal) + +diff -Nru squidGuard-1.4.orig/src/sgLog.c squidGuard-1.4/src/sgLog.c +--- squidGuard-1.4.orig/src/sgLog.c 2007-11-16 16:58:32.000000000 +0000 ++++ squidGuard-1.4/src/sgLog.c 2009-04-26 12:31:40.000000000 +0000 +@@ -55,7 +55,7 @@ + char msg[MAX_BUF]; + va_list ap; + VA_START(ap, format); +- if(vsprintf(msg, format, ap) > (MAX_BUF - 1)) ++ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1)) + fprintf(stderr,"overflow in vsprintf (sgLog): %s",strerror(errno)); + va_end(ap); + date = niso(0); +@@ -87,8 +87,8 @@ + char msg[MAX_BUF]; + va_list ap; + VA_START(ap, format); +- if(vsprintf(msg, format, ap) > (MAX_BUF - 1)) +- sgLogFatalError("overflow in vsprintf (sgLogError): %s",strerror(errno)); ++ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1)) ++ fprintf(stderr,"overflow in vsprintf (sgLogError): %s",strerror(errno)); + va_end(ap); + sgLog(globalErrorLog,"%s",msg); + } +@@ -104,7 +104,7 @@ + char msg[MAX_BUF]; + va_list ap; + VA_START(ap, format); +- if(vsprintf(msg, format, ap) > (MAX_BUF - 1)) ++ if(vsnprintf(msg, MAX_BUF, format, ap) > (MAX_BUF - 1)) + return; + va_end(ap); + sgLog(globalErrorLog,"%s",msg); diff --git a/testing/squidguard/squidguard.post-install b/testing/squidguard/squidguard.post-install new file mode 100644 index 000000000..2620de05f --- /dev/null +++ b/testing/squidguard/squidguard.post-install @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir /var/log/squidGuard &>/dev/null +chown squid.squid /var/log/squidGuard diff --git a/testing/tbl/APKBUILD b/testing/tbl/APKBUILD new file mode 100644 index 000000000..de2286ea6 --- /dev/null +++ b/testing/tbl/APKBUILD @@ -0,0 +1,39 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=tbl +pkgver=0.1.5 +pkgrel=0 +pkgdesc="Utility to format tables for troff" +url="http://tbl.bsd.lv/" +license="ISC" +depends= +makedepends= +install= +subpackages="$pkgname-doc" +source="http://tbl.bsd.lv/snapshots/tbl-$pkgver.tar.gz + tbl-install.patch" + +_builddir="$srcdir"/$pkgname-$pkgver + +prepare() { + cd "$_builddir" + for i in $source; do + case $i in + *.patch) + patch -p1 -i "$srcdir"/$i || return 1 + ;; + esac + done +} + +build() { + cd "$_builddir" + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" PREFIX=/usr MANDIR=/usr/share/man install +} + +md5sums="633edde9037b0a01b045b05e655ee7c9 tbl-0.1.5.tar.gz +e4f29245b659de9814ff1a7a1c98ffb2 tbl-install.patch" diff --git a/testing/tbl/tbl-install.patch b/testing/tbl/tbl-install.patch new file mode 100644 index 000000000..72465ea2d --- /dev/null +++ b/testing/tbl/tbl-install.patch @@ -0,0 +1,19 @@ +--- ./Makefile.orig ++++ ./Makefile +@@ -64,11 +64,11 @@ + install -m 0444 tbl-$(VERSION).md5 $(PREFIX)/snapshots/tbl.md5 + + install: +- mkdir -p $(BINDIR) +- mkdir -p $(MANDIR)/man5 +- $(INSTALL_PROGRAM) tbl $(BINDIR) +- $(INSTALL_MAN) tbl.5 $(MANDIR)/man5 +- $(INSTALL_MAN) tbl.1 $(MANDIR)/man1 ++ mkdir -p $(DESTDIR)$(BINDIR) ++ mkdir -p $(DESTDIR)$(MANDIR)/man5 ++ $(INSTALL_PROGRAM) tbl $(DESTDIR)$(BINDIR) ++ $(INSTALL_MAN) tbl.5 $(DESTDIR)$(MANDIR)/man5 ++ $(INSTALL_MAN) tbl.1 $(DESTDIR)$(MANDIR)/man1 + + main.o: main.c tbl.h + |