diff options
author | root <root@rshg054.dnsready.net> | 2011-10-27 23:14:53 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-10-27 23:14:53 +0000 |
commit | 0424b5fc47f106db6498c4cda3476e1d49fe0f82 (patch) | |
tree | f5c4ef7fa0139ce627e74b3bc58f35115c7e09ff /community-testing | |
parent | 84fe155e2233db86fcc13134d8802ba1dab0ae83 (diff) |
Thu Oct 27 23:14:53 UTC 2011
Diffstat (limited to 'community-testing')
27 files changed, 1371 insertions, 0 deletions
diff --git a/community-testing/cdfs/PKGBUILD b/community-testing/cdfs/PKGBUILD new file mode 100644 index 000000000..8e5412cd3 --- /dev/null +++ b/community-testing/cdfs/PKGBUILD @@ -0,0 +1,28 @@ +# $Id: PKGBUILD 57350 2011-10-26 12:09:08Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: J. Santiago Hirschfeld <jsantiagoh@yahoo.com.ar> + +pkgname=cdfs +pkgver=2.6.27 +pkgrel=17 +pkgdesc="File system module that 'exports' all tracks and boot images on a CD as normal files." +arch=(i686 x86_64) +url="http://www.elis.UGent.be/~ronsse/cdfs/" +license=('GPL') +makedepends=('linux-headers') +install=cdfs.install +source=("http://www.elis.UGent.be/~ronsse/cdfs/download/$pkgname-$pkgver.tar.bz2" + "cdfs-3.0.0.patch") +md5sums=('ac64c014a90e3c488394832ea29605b3' + 'aba7da94a9dcbb8a93ea423cb6958fef') + +build() { + _kernver=`pacman -Q linux | cut -d . -f 2 | cut -f 1 -d -` + depends=("linux>=3.${_kernver}" "linux<3.`expr ${_kernver} + 1`") + _kernverfull=`cat /lib/modules/extramodules-3.${_kernver}-ARCH/version` + + cd $srcdir/$pkgname-$pkgver + patch -p1 <$srcdir/cdfs-3.0.0.patch + make KDIR=/lib/modules/${_kernverfull}/build + install -Dm0644 cdfs.ko $pkgdir/lib/modules/extramodules-3.${_kernver}-ARCH/cdfs.ko +} diff --git a/community-testing/cdfs/cdfs-3.0.0.patch b/community-testing/cdfs/cdfs-3.0.0.patch new file mode 100644 index 000000000..20194b848 --- /dev/null +++ b/community-testing/cdfs/cdfs-3.0.0.patch @@ -0,0 +1,274 @@ +diff -wbBur cdfs-2.6.27/cddata.c cdfs-2.6.27.my/cddata.c +--- cdfs-2.6.27/cddata.c 2009-12-21 17:04:03.000000000 +0300 ++++ cdfs-2.6.27.my/cddata.c 2011-07-24 21:18:44.000000000 +0400 +@@ -83,7 +83,7 @@ + #else + .mmap = generic_file_readonly_mmap, + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) +- .sendfile = generic_file_sendfile ++// .sendfile = generic_file_sendfile + #else + .splice_read = generic_file_splice_read + #endif +diff -wbBur cdfs-2.6.27/root.c cdfs-2.6.27.my/root.c +--- cdfs-2.6.27/root.c 2009-12-21 16:38:31.000000000 +0300 ++++ cdfs-2.6.27.my/root.c 2011-07-25 13:16:59.000000000 +0400 +@@ -32,19 +30,14 @@ + * Added code to transform /proc/cdfs into a sequential synthetic file. * + *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ + +- + #include <linux/seq_file.h> +- +-#ifndef OLD_KERNEL + #include <linux/statfs.h> +-#endif ++#include <linux/sched.h> + + extern struct seq_operations cdfs_operations; + extern struct _track_info *dummy_track_p; + +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) + struct inode *cdfs_iget(struct super_block *sp, unsigned long ino); +-#endif + /*============================================================================* + * cdfs_open() * + * Description: * +@@ -115,15 +108,8 @@ + + /********************************************************************/ + +-#ifdef OLD_KERNEL +-static struct super_block * cdfs_mount(struct super_block *sb, void *data, int silent){ +- kdev_t dev = sb->s_dev; +- int i, j, t; +- struct cdrom_tochdr hdr; +-#else + static int cdfs_fill_super(struct super_block *sb, void *data, int silent){ + int i, t; +-#endif + struct cdrom_tocentry entry; + int no_audio=0, no_data=0; + cd * this_cd; +@@ -131,24 +117,13 @@ + + PRINT("cdfs_mount\n"); + +-#ifdef OLD_KERNEL +- MOD_INC_USE_COUNT; +- +- set_blocksize(dev, CD_FRAMESIZE); // voor bread met ide-cd +-#else + sb_set_blocksize(sb, CD_FRAMESIZE); // voor bread met ide-cd +-#endif + + sb->s_blocksize = CD_FRAMESIZE; + sb->s_blocksize_bits = 11; + + if (!(this_cd = cdfs_info(sb) = kmalloc(sizeof(cd), GFP_KERNEL))){ +-#ifdef OLD_KERNEL +- MOD_DEC_USE_COUNT; +- return NULL; +-#else + return -ENOMEM; +-#endif + } + + this_cd->mode = MODE; +@@ -160,13 +135,8 @@ + + // Initialize cache for maximum sector size + if (!(this_cd->cache = kmalloc(CD_FRAMESIZE_RAWER*CACHE_SIZE, GFP_KERNEL))) { +-#ifdef OLD_KERNEL +- MOD_DEC_USE_COUNT; +- return NULL; +-#else + kfree(cdfs_info(sb)); + return -ENOMEM; +-#endif + } + + // Cache is still invalid +@@ -183,23 +153,13 @@ + if (this_cd->toc_scsi){ + if (cdfs_toc_read_full(sb)){ + printk("TOC read failed\n"); +-#ifdef OLD_KERNEL +- MOD_DEC_USE_COUNT; +- return NULL; +-#else + goto invalid; +-#endif + } + } else { + //if (cdfs_ioctl(sb, CDROMREADTOCHDR, (unsigned long)&hdr)){ + if (cdfs_toc_read(sb)){ + printk("cdfs_toc_read failed\n"); +-#ifdef OLD_KERNEL +- MOD_DEC_USE_COUNT; +- return NULL; +-#else + goto invalid; +-#endif + } + } + +@@ -365,11 +325,7 @@ + sb->s_flags |= MS_RDONLY; + sb->s_op = &cdfs_ops; + /* always get inode status */ +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) + retinode=cdfs_iget(sb, 0); +-#else +- retinode=iget(sb, 0); +-#endif + if ( IS_ERR(retinode) ) + return PTR_ERR(retinode); + +@@ -379,16 +335,12 @@ + + cdfs_proc_cd = this_cd; + +-#ifdef OLD_KERNEL +- return sb; +-#else + return 0; + + invalid: + kfree(this_cd->cache); + kfree(cdfs_info(sb)); + return -EINVAL; +-#endif + } + + /************************************************************************/ +@@ -410,27 +362,12 @@ + // Remove /proc entry + cdfs_proc_cd = NULL; + kfree(cdfs_info(sb)); +- +-#ifdef OLD_KERNEL +- MOD_DEC_USE_COUNT; +-#endif +- + } + + /************************************************************************/ + +-#ifdef OLD_KERNEL +-static int cdfs_statfs(struct super_block *sb, struct statfs *buf) { +- cd * this_cd = cdfs_info(sb); +-#else +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) + static int cdfs_statfs(struct dentry *d, struct kstatfs *buf) { + cd * this_cd = cdfs_info(d->d_sb); +-#else +-static int cdfs_statfs(struct super_block *sb, struct kstatfs *buf) { +- cd * this_cd = cdfs_info(sb); +-#endif +-#endif + PRINT("rmfs_statfs\n"); + + buf->f_type = CDFS_MAGIC; +@@ -460,11 +397,7 @@ + + /************************************************************************/ + +-#ifdef OLD_KERNEL +-static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry){ +-#else + static struct dentry * cdfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){ +-#endif + struct inode * inode; + int i; + cd * this_cd = cdfs_info(dir->i_sb); +@@ -480,15 +413,9 @@ + /* Use goto and read inode with iget()/cdfs_iget() */ + /* Thanks to David Howells for patch and Master class in his mail */ + found: +-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24) + inode = cdfs_iget(dir->i_sb, i); + if (IS_ERR(inode)) + return ERR_CAST(inode); +-#else +- inode = iget(dir->i_sb, i); +- if (!inode) +- return ERR_PTR(-ENOMEM); +-#endif + d_add(dentry, inode); + return NULL; + } +@@ -529,12 +456,8 @@ + i->i_fop = &cdfs_dir_operations; + } else { /* file */ + i->i_size = this_cd->track[i->i_ino].size; +-#ifdef OLD_KERNEL +- i->i_mtime = i->i_atime = i->i_ctime = this_cd->track[i->i_ino].time; +-#else + i->i_mtime.tv_sec = i->i_atime.tv_sec = i->i_ctime.tv_sec = this_cd->track[i->i_ino].time; + i->i_mtime.tv_nsec = i->i_atime.tv_nsec = i->i_ctime.tv_nsec = 0; +-#endif + i->i_mode = this_cd->mode; + if ((this_cd->track[i->i_ino].type==DATA) && this_cd->track[i->i_ino].iso_size) { + i->i_fop = &cdfs_cddata_file_operations; +@@ -587,33 +510,21 @@ + /******************************************************************/ + + static struct super_operations cdfs_ops = { +-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) +- .read_inode = cdfs_read_inode, +-#endif + .put_super = cdfs_umount, + .statfs = cdfs_statfs + }; + +-#ifdef OLD_KERNEL +-static DECLARE_FSTYPE_DEV(cdfs_fs_type, FSNAME, cdfs_mount); +-#else +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) +-static int cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt) { +- return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super, mnt); +-#else +-static struct super_block *cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { +- return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super); +-#endif +-} ++//static int cdfs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name, void *data, struct vfsmount *mnt) { ++// return get_sb_bdev(fs_type, flags, dev_name, data, cdfs_fill_super, mnt); ++//} + + static struct file_system_type cdfs_fs_type = { + .owner = THIS_MODULE, + .name = "cdfs", +- .get_sb = cdfs_get_sb, ++// .get_sb = cdfs_get_sb, + .kill_sb = kill_block_super, + .fs_flags = FS_REQUIRES_DEV + }; +-#endif + + /******************************************************/ + +@@ -621,10 +532,6 @@ + MODULE_DESCRIPTION("CDfs: a CD filesystem"); + MODULE_LICENSE("GPL"); + +-#ifdef OLD_KERNEL +-EXPORT_NO_SYMBOLS; +-#endif +- + /******************************************************************/ + + static int __init cdfs_init(void) { +@@ -676,11 +583,7 @@ + + if (!options) return; + +-#ifdef OLD_KERNEL +- for (this_char = strtok(options,","); this_char; this_char = strtok(NULL,",")) { +-#else + while ((this_char = strsep(&options,",")) != NULL) { +-#endif + + if (!strcmp(this_char,"single")) + this_cd->single=TRUE; diff --git a/community-testing/cdfs/cdfs.install b/community-testing/cdfs/cdfs.install new file mode 100644 index 000000000..3693d60ed --- /dev/null +++ b/community-testing/cdfs/cdfs.install @@ -0,0 +1,11 @@ +post_install() { + /sbin/depmod -a +} + +post_upgrade() { + /sbin/depmod -a +} + +post_remove() { + /sbin/depmod -a +} diff --git a/community-testing/clipgrab/PKGBUILD b/community-testing/clipgrab/PKGBUILD new file mode 100644 index 000000000..df3c57383 --- /dev/null +++ b/community-testing/clipgrab/PKGBUILD @@ -0,0 +1,28 @@ +# Contributor: thacrazze <thacrazze|googlemail|com> +# Maintainer: Stefan Husmann <stefan-husmann@t-online.de> +pkgname=clipgrab +pkgver=3.1.0.2 +pkgrel=2 +pkgdesc='A video downloader and converter for YouTube, Veoh, DailyMotion, MyVideo, ...' +arch=('i686' 'x86_64') +url='http://clipgrab.de/' +license=('GPL') +depends=('qt' 'qtwebkit') +optdepends=('ffmpeg: for some encodings') +source=(http://clipgrab.de/download/${pkgname}-${pkgver}.tar.bz2 ${pkgname}.png ${pkgname}.desktop) +md5sums=('1250e1fb29cd88b7ce1a37d937de0146' + 'ef030502ae0922e632742f47283313f4' + '9a141791f6952917c441050c3dac81ce') + +build() { + cd $srcdir/$pkgname-$pkgver + qmake && make +} +package() { + cd $srcdir/$pkgname-$pkgver + install -Dm755 ${pkgname} $pkgdir/usr/bin/${pkgname} + install -Dm644 $srcdir/${pkgname}.png \ + $pkgdir/usr/share/pixmaps/${pkgname}.png + install -Dm644 $srcdir/${pkgname}.desktop \ + ${pkgdir}/usr/share/applications/${pkgname}.desktop +} diff --git a/community-testing/clipgrab/clipgrab.desktop b/community-testing/clipgrab/clipgrab.desktop new file mode 100644 index 000000000..dad31cfdd --- /dev/null +++ b/community-testing/clipgrab/clipgrab.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Application +Encoding=UTF-8 +Name=ClipGrab +GenericName=Video Downloader +GenericName[de]=Video-Downloader +Comment=Download videos and convert it +Comment[de]=Videos herunterladen und konvertieren +Icon=/usr/share/pixmaps/clipgrab.png +Exec=clipgrab +TryExec=clipgrab +Terminal=false +Categories=Qt;AudioVideo;Audio;Video; diff --git a/community-testing/clipgrab/clipgrab.png b/community-testing/clipgrab/clipgrab.png Binary files differnew file mode 100644 index 000000000..2573fed20 --- /dev/null +++ b/community-testing/clipgrab/clipgrab.png diff --git a/community-testing/open-vm-tools-modules/PKGBUILD b/community-testing/open-vm-tools-modules/PKGBUILD new file mode 100644 index 000000000..41d09db91 --- /dev/null +++ b/community-testing/open-vm-tools-modules/PKGBUILD @@ -0,0 +1,41 @@ +# $Id: PKGBUILD 57352 2011-10-26 12:09:45Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Krzysztof Raczkowski <raczkow@gmail.com> + +pkgname=open-vm-tools-modules +pkgver=2011.09.23 +_pkgsubver=491607 +pkgrel=2 +pkgdesc="The Open Virtual Machine Tools (open-vm-tools) are the open source implementation of VMware Tools" +arch=('i686' 'x86_64') +url="http://open-vm-tools.sourceforge.net/" +license=('GPL') +makedepends=('libdnet' 'icu' 'uriparser' 'linux-headers') +depends=("linux") +install=$pkgname.install +source=("http://downloads.sourceforge.net/open-vm-tools/open-vm-tools-$pkgver-${_pkgsubver}.tar.gz") +md5sums=('599342eee8d531b35ca1cc948b61868f') + +build() { + _kernver=`pacman -Q linux | cut -d . -f 2 | cut -f 1 -d -` + KERNEL_RELEASE=`cat /lib/modules/extramodules-3.${_kernver}-ARCH/version` + + cd "$srcdir/open-vm-tools-${pkgver}-${_pkgsubver}" + [ $NOEXTRACT -eq 1 ] || ./configure --prefix=/usr \ + --without-x --with-kernel-release=$KERNEL_RELEASE + (cd modules && make modules) +} + +package() { + _kernver=`pacman -Q linux | cut -d . -f 2 | cut -f 1 -d -` + depends=("linux>=3.${_kernver}" "linux<3.`expr ${_kernver} + 1`") + KERNEL_VERSION=`cat /lib/modules/extramodules-3.${_kernver}-ARCH/version` + msg "Kernel = $KERNEL_VERSION" + + cd "$srcdir/open-vm-tools-${pkgver}-${_pkgsubver}" + mkdir -p $pkgdir/lib/modules/extramodules-3.${_kernver}-ARCH/ + for MOD in `find -type f -name '*.ko'`; do + install -D -m644 $MOD $pkgdir/lib/modules/extramodules-3.${_kernver}-ARCH/ + done + sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='$KERNEL_VERSION'/" $startdir/$pkgname.install +} diff --git a/community-testing/open-vm-tools-modules/open-vm-tools-modules.install b/community-testing/open-vm-tools-modules/open-vm-tools-modules.install new file mode 100644 index 000000000..801d2c5b3 --- /dev/null +++ b/community-testing/open-vm-tools-modules/open-vm-tools-modules.install @@ -0,0 +1,34 @@ +KERNEL_VERSION='2.6.38-ARCH' + +post_install() { + depmod -a -v $KERNEL_VERSION > /dev/null 2>&1 + + VMXNET="install pcnet32 /sbin/modprobe -q --ignore-install vmxnet;" + VMXNET="$VMXNET /sbin/modprobe -q --ignore-install pcnet32 $CMDLINE_OPTS;" + VMXNET="$VMXNET /bin/true;" + + echo ">>> Enabling vmxnet driver in /etc/modprobe.d/modprobe.conf" + echo ">>> (this will disable pcnet32 driver)" + sed "$ a \\\n#VMware net driver\n$VMXNET" -i /etc/modprobe.d/modprobe.conf + echo + + echo ">>>" + echo ">>> If vmxnet driver doesn't handle your NIC, you have to manually" + echo ">>> disable loading of pcnet32 driver" + echo ">>>" +} + +post_upgrade() { + depmod -a -v $KERNEL_VERSION > /dev/null 2>&1 +} + +post_remove() { + depmod -a -v $KERNEL_VERSION > /dev/null 2>&1 + + echo ">>> Disabling vmxnet driver in /etc/modprobe.d/modprobe.conf" + sed "/VMware net driver/,+1 d" -i /etc/modprobe.d/modprobe.conf + + echo ">>>" + echo ">>> Remember to un-blacklist pcnet32 driver" + echo ">>>" +} diff --git a/community-testing/percona-server/PKGBUILD b/community-testing/percona-server/PKGBUILD new file mode 100644 index 000000000..acf9a20ad --- /dev/null +++ b/community-testing/percona-server/PKGBUILD @@ -0,0 +1,99 @@ +# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> + +pkgname=percona-server +pkgver=5.5.16_rel22.0 +pkgrel=1 +pkgdesc="A backwards-compatible drop-in replacement for MySQL that provides improved performance, diagnostics and instrumentation, and manageability of the server" +arch=('i686' 'x86_64') + +depends=('mysql-clients' 'net-tools' 'libaio') +conflicts=('mysql') +provides=('mysql') +optdepends=('perl-dbi' 'perl-dbd-mysql') +makedepends=('cmake' 'openssl' 'zlib') + +license=('GPL') +url="http://www.percona.com/software/percona-server/" +options=('!libtool' 'emptydirs') +backup=('etc/mysql/my.cnf') +install=percona.install +source=("http://www.percona.com/redir/downloads/Percona-Server-${pkgver%.*_*}/Percona-Server-${pkgver/_rel/-}/source/Percona-Server-${pkgver/_/-}.tar.gz" + 'mysqld' + 'my.cnf') + +build() { + cd "${srcdir}/Percona-Server-${pkgver/_/-}" + sed -i 's|ADD_SUBDIRECTORY(libmysqld/examples)|# ADD_SUBDIRECTORY(libmysqld/examples)|' CMakeLists.txt + + cd "${srcdir}" + rm -rf build + mkdir build + cd build + + # CFLAGS/CXXFLAGS as suggested upstream + CFLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \ + CXXFLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti" \ + + cmake "${srcdir}/Percona-Server-${pkgver/_/-}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DSYSCONFDIR=/etc/mysql \ + -DMYSQL_DATADIR=/var/lib/mysql \ + -DMYSQL_UNIX_ADDR=/var/run/mysqld/mysqld.sock \ + -DDEFAULT_CHARSET=utf8 \ + -DDEFAULT_COLLATION=utf8_general_ci \ + -DENABLED_LOCAL_INFILE=ON \ + -DINSTALL_INFODIR=share/mysql/docs \ + -DINSTALL_MANDIR=share/man \ + -DINSTALL_PLUGINDIR=/usr/lib/mysql/plugin \ + -DINSTALL_SCRIPTDIR=bin \ + -DINSTALL_INCLUDEDIR=include/mysql \ + -DINSTALL_DOCREADMEDIR=share/mysql \ + -DINSTALL_SUPPORTFILESDIR=share/mysql \ + -DINSTALL_MYSQLSHAREDIR=share/mysql \ + -DINSTALL_DOCDIR=share/mysql/docs \ + -DINSTALL_SHAREDIR=share/mysql \ + -DWITH_READLINE=ON \ + -DWITH_ZLIB=system \ + -DWITH_SSL=system \ + -DWITH_LIBWRAP=OFF \ + -DWITH_MYSQLD_LDFLAGS="${LDFLAGS}" \ + -DWITH_EXTRA_CHARSETS=complex \ + -DWITH_EMBEDDED_SERVER=ON \ + -DWITH_INNOBASE_STORAGE_ENGINE=1 \ + -DWITH_PARTITION_STORAGE_ENGINE=1 \ + -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \ + -DWITHOUT_ARCHIVE_STORAGE_ENGINE=1 \ + -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 \ + -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 + + make +} + +package() { + cd "${srcdir}"/build + make DESTDIR=${pkgdir} install + + install -Dm644 ${srcdir}/my.cnf ${pkgdir}/etc/mysql/my.cnf + install -Dm755 ${srcdir}/mysqld ${pkgdir}/etc/rc.d/mysqld + + # provided by libmysqlclient + rm ${pkgdir}/usr/bin/mysql_config + rm ${pkgdir}/usr/lib/libmysql* + rm -r ${pkgdir}/usr/include/ + rm ${pkgdir}/usr/share/man/man1/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}.1 + + # provided by mysql-clients + rm ${pkgdir}/usr/bin/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap} + rm ${pkgdir}/usr/share/man/man1/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}.1 + + # not needed + rm -r ${pkgdir}/usr/{data,mysql-test,sql-bench} + rm "${pkgdir}"/usr/share/man/man1/mysql-test-run.pl.1 + + install -dm700 "${pkgdir}"/var/lib/mysql +} + +md5sums=('cfc4523a7110f07c193391f3e73d59ae' + '243864805611764a7e5883c1dba7afd8' + '1c949c0dbea5206af0db14942d9927b6') diff --git a/community-testing/percona-server/my.cnf b/community-testing/percona-server/my.cnf new file mode 100644 index 000000000..9a41b4fc3 --- /dev/null +++ b/community-testing/percona-server/my.cnf @@ -0,0 +1,145 @@ +# MySQL config file for medium systems. +# +# This is for a system with little memory (32M - 64M) where MySQL plays +# an important part, or systems up to 128M where MySQL is used together with +# other programs (such as a web server) +# +# MySQL programs look for option files in a set of +# locations which depend on the deployment platform. +# You can copy this option file to one of those +# locations. For information about these locations, see: +# http://dev.mysql.com/doc/mysql/en/option-files.html +# +# In this file, you can use all long options that a program supports. +# If you want to know which options a program supports, run the program +# with the "--help" option. + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# Here follows entries for some specific programs + +# The MySQL server +[mysqld] +port = 3306 +socket = /var/run/mysqld/mysqld.sock +datadir = /var/lib/mysql +skip-external-locking +key_buffer_size = 16M +max_allowed_packet = 1M +table_open_cache = 64 +sort_buffer_size = 512K +net_buffer_length = 8K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M + +# Don't listen on a TCP/IP port at all. This can be a security enhancement, +# if all processes that need to connect to mysqld run on the same host. +# All interaction with mysqld must be made via Unix sockets or named pipes. +# Note that using this option without enabling named pipes on Windows +# (via the "enable-named-pipe" option) will render mysqld useless! +# +skip-networking + +# Replication Master Server (default) +# binary logging is required for replication +log-bin=mysql-bin + +# binary logging format - mixed recommended +binlog_format=mixed + +# required unique id between 1 and 2^32 - 1 +# defaults to 1 if master-host is not set +# but will not function as a master if omitted +server-id = 1 + +# Replication Slave (comment out master section to use this) +# +# To configure this host as a replication slave, you can choose between +# two methods : +# +# 1) Use the CHANGE MASTER TO command (fully described in our manual) - +# the syntax is: +# +# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>, +# MASTER_USER=<user>, MASTER_PASSWORD=<password> ; +# +# where you replace <host>, <user>, <password> by quoted strings and +# <port> by the master's port number (3306 by default). +# +# Example: +# +# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306, +# MASTER_USER='joe', MASTER_PASSWORD='secret'; +# +# OR +# +# 2) Set the variables below. However, in case you choose this method, then +# start replication for the first time (even unsuccessfully, for example +# if you mistyped the password in master-password and the slave fails to +# connect), the slave will create a master.info file, and any later +# change in this file to the variables' values below will be ignored and +# overridden by the content of the master.info file, unless you shutdown +# the slave server, delete master.info and restart the slaver server. +# For that reason, you may want to leave the lines below untouched +# (commented) and instead use CHANGE MASTER TO (see above) +# +# required unique id between 2 and 2^32 - 1 +# (and different from the master) +# defaults to 2 if master-host is set +# but will not function as a slave if omitted +#server-id = 2 +# +# The replication master for this slave - required +#master-host = <hostname> +# +# The username the slave will use for authentication when connecting +# to the master - required +#master-user = <username> +# +# The password the slave will authenticate with when connecting to +# the master - required +#master-password = <password> +# +# The port the master is listening on. +# optional - defaults to 3306 +#master-port = <port> +# +# binary logging - not required for slaves, but recommended +#log-bin=mysql-bin + +# Uncomment the following if you are using InnoDB tables +#innodb_data_home_dir = /var/lib/mysql +#innodb_data_file_path = ibdata1:10M:autoextend +#innodb_log_group_home_dir = /var/lib/mysql +# You can set .._buffer_pool_size up to 50 - 80 % +# of RAM but beware of setting memory usage too high +#innodb_buffer_pool_size = 16M +#innodb_additional_mem_pool_size = 2M +# Set .._log_file_size to 25 % of buffer pool size +#innodb_log_file_size = 5M +#innodb_log_buffer_size = 8M +#innodb_flush_log_at_trx_commit = 1 +#innodb_lock_wait_timeout = 50 + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +no-auto-rehash +# Remove the next comment character if you are not familiar with SQL +#safe-updates + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[mysqlhotcopy] +interactive-timeout diff --git a/community-testing/percona-server/mysqld b/community-testing/percona-server/mysqld new file mode 100755 index 000000000..07f6b7e4c --- /dev/null +++ b/community-testing/percona-server/mysqld @@ -0,0 +1,77 @@ +#!/bin/bash + +# general config +. /etc/rc.conf +. /etc/rc.d/functions + +getPID() { + echo $(pgrep -u mysql mysqld 2>/dev/null); +} + +case "$1" in + start) + stat_busy "Starting Percona Server" + [ ! -d /var/run/mysqld ] && install -d -g mysql -o mysql /var/run/mysqld &>/dev/null + if [ -z "$(getPID)" ]; then + /usr/bin/mysqld_safe --user=mysql &>/dev/null & + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + timeo=30 + while [ $timeo -gt 0 ]; do + response=`/usr/bin/mysqladmin -uUNKNOWN_USER ping 2>&1` && break + echo "$response" | grep -q "mysqld is alive" && break + sleep 1 + let timeo=${timeo}-1 + done + if [ $timeo -eq 0 ]; then + stat_fail + exit 1 + else + echo $(getPID) > /var/run/mysqld/mysqld.pid + add_daemon mysqld + stat_done + fi + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping Percona Server" + if [ ! -z "$(getPID)" ]; then + timeo=30 + kill $(getPID) &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + fi + while [ ! -z "$(getPID)" -a $timeo -gt 0 ]; do + sleep 1 + let timeo=${timeo}-1 + done + if [ -z "$(getPID)" ]; then + rm -f /var/run/mysqld/mysqld.pid &>/dev/null + rm_daemon mysqld + stat_done + else + stat_fail + exit 1 + fi + else + stat_fail + exit 1 + fi + ;; + + restart) + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/community-testing/percona-server/percona.install b/community-testing/percona-server/percona.install new file mode 100644 index 000000000..caacccf1b --- /dev/null +++ b/community-testing/percona-server/percona.install @@ -0,0 +1,26 @@ +post_install(){ + groupadd -g 89 mysql &>/dev/null + useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null + /usr/bin/mysql_install_db --user=mysql --basedir=/usr + chown -R mysql:mysql var/lib/mysql &>/dev/null +} + +post_upgrade(){ + getent group mysql >/dev/null 2>&1 || groupadd -g 89 mysql &>/dev/null + getent passwd mysql >/dev/null 2>&1 || useradd -u 89 -g mysql -d /var/lib/mysql -s /bin/false mysql &>/dev/null + + if [ "$(vercmp $2 5.5)" -lt 0 ]; then + echo " >> " + echo " >> Major version update. Consider restart the service, and then running mysql_upgrade after it." + echo " >> " + fi +} + +post_remove(){ + if getent passwd mysql >/dev/null 2>&1; then + userdel mysql + fi + if getent group mysql >/dev/null 2>&1; then + groupdel mysql + fi +} diff --git a/community-testing/virtualbox-modules/60-vboxguest.rules b/community-testing/virtualbox-modules/60-vboxguest.rules new file mode 100644 index 000000000..6285f7249 --- /dev/null +++ b/community-testing/virtualbox-modules/60-vboxguest.rules @@ -0,0 +1,2 @@ +ACTION=="add", KERNEL=="vboxguest", SUBSYSTEM=="misc", OWNER="root", MODE="0600" +ACTION=="add", KERNEL=="vboxuser", SUBSYSTEM=="misc", OWNER="root", MODE="0666" diff --git a/community-testing/virtualbox-modules/LocalConfig.kmk b/community-testing/virtualbox-modules/LocalConfig.kmk new file mode 100644 index 000000000..af79f90cd --- /dev/null +++ b/community-testing/virtualbox-modules/LocalConfig.kmk @@ -0,0 +1,19 @@ +VBOX_WITH_ADDITION_DRIVERS = +VBOX_WITH_INSTALLER = 1 +VBOX_WITH_LINUX_ADDITIONS = 1 +VBOX_WITH_X11_ADDITIONS = +VBOX_WITH_TESTCASES = +VBOX_WITH_TESTSUITE = +VBOX_WITH_ORIGIN := +VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox +VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH) +VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH) +VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox +VBOX_PATH_APP_DOCS := /usr/share/virtualbox +VBOX_WITH_REGISTRATION_REQUEST = +VBOX_WITH_UPDATE_REQUEST = +VBOX_WITH_VNC := 1 +VBOX_BLD_PYTHON = python2 +VBOX_JAVA_HOME = /usr/lib/jvm/java-6-openjdk +VBOX_GCC_WERR = +VBOX_GCC_WARN = diff --git a/community-testing/virtualbox-modules/PKGBUILD b/community-testing/virtualbox-modules/PKGBUILD new file mode 100644 index 000000000..ced055501 --- /dev/null +++ b/community-testing/virtualbox-modules/PKGBUILD @@ -0,0 +1,101 @@ +# $Id: PKGBUILD 57348 2011-10-26 10:15:54Z ibiru $ +#Maintainer: Ionut Biru <ibiru@archlinux.org> + +pkgbase=virtualbox-modules +pkgname=('virtualbox-modules' 'virtualbox-archlinux-modules') +pkgver=4.1.4 +pkgrel=3 +arch=('i686' 'x86_64') +url='http://virtualbox.org' +license=('GPL') +makedepends=('libstdc++5' 'bin86' 'dev86' 'iasl' 'libxslt' 'libxml2' 'libpng' 'libidl2' 'xalan-c' 'sdl' 'linux-headers') +[[ $CARCH == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc') +source=(http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}.tar.bz2 + LocalConfig.kmk 60-vboxguest.rules) +md5sums=('dc6e6801b3823332b6ca2e9915221aae' + '4c88bd122677a35f68abd76eb01b378b' + 'ed1341881437455d9735875ddf455fbe') + +_extramodules=extramodules-3.1-ARCH +_kernver="$(cat /lib/modules/${_extramodules}/version)" + +export KERN_DIR=/lib/modules/${_kernver}/build +export KERN_INCL=/usr/src/linux-${_kernver}/include/ + +build() { + cd "$srcdir/VirtualBox-${pkgver}_OSE" + + cp "$srcdir/LocalConfig.kmk" . + + ./configure \ + --with-linux=/usr/src/linux-${_kernver} \ + --disable-java \ + --disable-docs \ + --disable-xpcom \ + --disable-python \ + --disable-sdl-ttf \ + --disable-alsa \ + --disable-pulse \ + --disable-dbus \ + --disable-opengl \ + --build-headless \ + --nofatal + source ./env.sh + kmk all + + make -C "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src" + make -C "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" +} + +package_virtualbox-archlinux-modules(){ + pkgdesc="Additions only for Arch Linux guests (kernel modules)" + license=('GPL') + install=virtualbox-archlinux-modules.install + depends=('linux>=3.1' 'linux<3.2') + replaces=('virtualbox-guest-modules') + conflicts=('virtualbox-guest-modules') + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions/src" + + for module in vboxguest.ko vboxsf.ko vboxvideo.ko; do + install -D -m644 ${module} \ + "$pkgdir/lib/modules/${_extramodules}/${module}" + done + + install -D -m 0644 "$srcdir/60-vboxguest.rules" \ + "$pkgdir/lib/udev/rules.d/60-vboxguest.rules" + + find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \; + + sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "$startdir/virtualbox-archlinux-modules.install" +} + +package_virtualbox-modules(){ + pkgdesc="Kernel modules for VirtualBox" + license=('GPL') + install=virtualbox-modules.install + depends=('linux>=3.1' 'linux<3.2') + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/src" + + install -D -m644 vboxdrv.ko \ + "$pkgdir/lib/modules/${_extramodules}/vboxdrv.ko" + + install -D -m644 vboxnetadp.ko \ + "$pkgdir/lib/modules/${_extramodules}/vboxnetadp.ko" + + install -D -m644 vboxnetflt.ko \ + "$pkgdir/lib/modules/${_extramodules}/vboxnetflt.ko" + + install -D -m644 vboxpci.ko \ + "$pkgdir/lib/modules/${_extramodules}/vboxpci.ko" + + find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \; + + sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "$startdir/virtualbox-modules.install" +} diff --git a/community-testing/virtualbox-modules/virtualbox-archlinux-modules.install b/community-testing/virtualbox-modules/virtualbox-archlinux-modules.install new file mode 100644 index 000000000..39a0e4063 --- /dev/null +++ b/community-testing/virtualbox-modules/virtualbox-archlinux-modules.install @@ -0,0 +1,17 @@ +post_install() { +cat << EOF +===> You may want to load vboxguest, vboxsf and vboxvideo +EOF + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) +} + +post_upgrade() { + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) +} + +post_remove() { + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) +} diff --git a/community-testing/virtualbox-modules/virtualbox-modules.install b/community-testing/virtualbox-modules/virtualbox-modules.install new file mode 100644 index 000000000..188c1874c --- /dev/null +++ b/community-testing/virtualbox-modules/virtualbox-modules.install @@ -0,0 +1,19 @@ +post_install() { +/bin/cat << EOF +===> You must load vboxdrv module before starting VirtualBox: +===> # modprobe vboxdrv +EOF + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) +} + +post_upgrade() { + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) + rmmod vboxdrv || echo 'In order to use the new version, reload all virtualbox modules manually.' +} + +post_remove() { + EXTRAMODULES='extramodules-3.1-ARCH' + depmod $(cat /lib/modules/$EXTRAMODULES/version) +} diff --git a/community-testing/virtualbox/10-vboxdrv.rules b/community-testing/virtualbox/10-vboxdrv.rules new file mode 100644 index 000000000..37403ae2f --- /dev/null +++ b/community-testing/virtualbox/10-vboxdrv.rules @@ -0,0 +1,5 @@ +KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600" ENV{ACL_MANAGE}="1" +SUBSYSTEM=="usb_device", ACTION=="add", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers" +SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers" +SUBSYSTEM=="usb_device", ACTION=="remove", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" +SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor" diff --git a/community-testing/virtualbox/LocalConfig.kmk b/community-testing/virtualbox/LocalConfig.kmk new file mode 100644 index 000000000..e5cbcebcd --- /dev/null +++ b/community-testing/virtualbox/LocalConfig.kmk @@ -0,0 +1,19 @@ +VBOX_WITH_ADDITION_DRIVERS = +VBOX_WITH_INSTALLER = 1 +VBOX_WITH_LINUX_ADDITIONS = 1 +VBOX_WITH_X11_ADDITIONS = 1 +VBOX_WITH_TESTCASES = +VBOX_WITH_TESTSUITE = +VBOX_WITH_ORIGIN := +VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox +VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH) +VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH) +VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox +VBOX_PATH_APP_DOCS := /usr/share/virtualbox +VBOX_WITH_REGISTRATION_REQUEST = +VBOX_WITH_UPDATE_REQUEST = +VBOX_WITH_VNC := 1 +VBOX_BLD_PYTHON = python2 +VBOX_JAVA_HOME = /usr/lib/jvm/java-6-openjdk +VBOX_GCC_WERR = +VBOX_GCC_WARN = diff --git a/community-testing/virtualbox/PKGBUILD b/community-testing/virtualbox/PKGBUILD new file mode 100644 index 000000000..b39c517a6 --- /dev/null +++ b/community-testing/virtualbox/PKGBUILD @@ -0,0 +1,185 @@ +# $Id: PKGBUILD 57347 2011-10-26 10:09:31Z ibiru $ +#Maintainer: Ionut Biru <ibiru@archlinux.org> +pkgbase=virtualbox +pkgname=('virtualbox' 'virtualbox-archlinux-additions' 'virtualbox-sdk' 'virtualbox-source') +pkgver=4.1.4 +pkgrel=3 +arch=('i686' 'x86_64') +url='http://virtualbox.org' +license=('GPL' 'custom') +makedepends=('libstdc++5' 'bin86' 'dev86' 'iasl' 'libxslt' 'libxml2' 'libxcursor' 'qt' 'libidl2' 'sdl_ttf' 'alsa-lib' 'libpulse' 'libxtst' +'xalan-c' 'sdl' 'libxmu' 'curl' 'python2' 'linux-headers' 'mesa' 'libxrandr' 'libxinerama' 'libvncserver' 'openjdk6' 'gsoap' 'vde2') +#'xorg-server-devel' 'xf86driproto' 'libxcomposite') +[[ $CARCH == "x86_64" ]] && makedepends=("${makedepends[@]}" 'gcc-multilib' 'lib32-glibc') +source=(http://download.virtualbox.org/virtualbox/${pkgver}/VirtualBox-${pkgver}.tar.bz2 + UserManual-$pkgver.pdf::http://download.virtualbox.org/virtualbox/${pkgver}/UserManual.pdf + 10-vboxdrv.rules vboxdrv-reference.patch LocalConfig.kmk vboxbuild + change_default_driver_dir.patch vbox-service.conf vbox-service.rc) + +_extramodules=extramodules-3.1-ARCH +_kernver="$(cat /lib/modules/${_extramodules}/version)" + +build() { + cd "$srcdir/VirtualBox-${pkgver}_OSE" + + patch -Np1 -i "$srcdir/vboxdrv-reference.patch" + patch -Np1 -i "$srcdir/change_default_driver_dir.patch" + + cp "$srcdir/LocalConfig.kmk" . + + ./configure --disable-docs \ + --enable-webservice \ + --enable-vde \ + --enable-vnc \ + --nofatal \ + --with-linux=/usr/src/linux-${_kernver} + source ./env.sh + kmk all + sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' "out/linux.$BUILD_PLATFORM_ARCH/release/bin/vboxshell.py" +} + +package_virtualbox() { + pkgdesc="Powerful x86 virtualization for enterprise as well as home use" + depends=('virtualbox-modules' 'libxml2' 'libxcursor' 'libidl2' 'libxinerama' 'sdl' 'libxmu' 'curl' 'libvncserver' 'libpng') + optdepends=('qt: for VirtualBox GUI' + 'vde2: Virtual Distributed Ethernet support' + 'virtualbox-sdk: developer kit' + 'virtualbox-source: host kernel source modules for non-stock kernels') + + replaces=('virtualbox-ose') + conflicts=('virtualbox-ose') + install=virtualbox.install + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin" + mkdir -p "$pkgdir"/usr/{bin,lib/virtualbox/components,lib/virtualbox/ExtensionPacks,share/virtualbox/nls} + + #doc + install -m 0644 "$srcdir/UserManual-$pkgver.pdf" "$pkgdir/usr/share/virtualbox/UserManual.pdf" + + #Binaries and Wrapper with Launchers + install -m 0755 VBox.sh "$pkgdir/usr/bin/VBox" + + for i in VBoxHeadless vboxheadless VBoxManage vboxmanage VBoxSDL vboxsdl VirtualBox virtualbox vboxwebsrv VBoxBalloonCtrl vboxballoonctrl; do + ln -sf VBox "$pkgdir/usr/bin/$i" + done + install -m 0755 VBoxTunctl "$pkgdir/usr/bin" + + #components + install -m 0755 components/* -t "$pkgdir/usr/lib/virtualbox/components" + + #lib + install -m 0755 *.so "$pkgdir/usr/lib/virtualbox" + install -m 0644 *.gc *.r0 VBoxEFI*.fd "$pkgdir/usr/lib/virtualbox" + + #setuid root binaries + install -m 4755 VBoxSDL VirtualBox VBoxHeadless VBoxNetDHCP VBoxNetAdpCtl -t "$pkgdir/usr/lib/virtualbox" + #other binaries + install -m 0755 VBoxManage VBoxSVC VBoxExtPackHelperApp VBoxXPCOMIPCD VBoxTestOGL VBoxBalloonCtrl vboxwebsrv webtest -t "$pkgdir/usr/lib/virtualbox" + + #language + install -m 0755 nls/*.qm -t "$pkgdir/usr/share/virtualbox/nls" + + #useless scripts + install -m 0755 VBoxCreateUSBNode.sh VBoxSysInfo.sh -t "$pkgdir/usr/share/virtualbox" + + #icons + install -D -m 0644 VBox.png "$pkgdir/usr/share/pixmaps/VBox.png" + + pushd icons + for i in *; do + install -d "$pkgdir/usr/share/icons/hicolor/$i/mimetypes" + cp $i/* "$pkgdir/usr/share/icons/hicolor/$i/mimetypes" + done + popd + + #desktop + install -D -m 0644 virtualbox.desktop "$pkgdir/usr/share/applications/virtualbox.desktop" + install -D -m 0644 virtualbox.xml "$pkgdir/usr/share/mime/packages/virtualbox.xml" + + #install configuration + mkdir -p "$pkgdir/etc/vbox" + echo 'INSTALL_DIR=/usr/lib/virtualbox' > "$pkgdir/etc/vbox/vbox.cfg" + + #udev and licence + install -D -m 0644 "$srcdir/VirtualBox-${pkgver}_OSE/COPYING" \ + "$pkgdir/usr/share/licenses/virtualbox/LICENSE" + install -D -m 0644 "$srcdir/10-vboxdrv.rules" \ + "$pkgdir/lib/udev/rules.d/10-vboxdrv.rules" +} + +package_virtualbox-source() { + pkgdesc="VirtualBox kernel modules source" + depends=(linux-headers gcc make) + install=virtualbox-source.install + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + mkdir -p $pkgdir/usr/lib/virtualbox + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin" + + #sources for modules + cp -r src ${pkgdir}/usr/lib/virtualbox + #install compilation script + install -D -m 755 "${srcdir}/vboxbuild" "${pkgdir}/usr/bin/vboxbuild" +} + +package_virtualbox-sdk() { + pkgdesc="VirtualBox Software Developer Kit (SDK)" + depends=('python2') + + mkdir -p "$pkgdir/usr/lib/virtualbox" + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin" + + install -D -m 0755 vboxshell.py "$pkgdir/usr/lib/virtualbox/vboxshell.py" + #python sdk + pushd sdk/installer + VBOX_INSTALL_PATH="/usr/lib/virtualbox" python2 vboxapisetup.py install --root "${pkgdir}" + popd + rm -rf sdk/installer + mv sdk "$pkgdir/usr/lib/virtualbox" +} + +package_virtualbox-archlinux-additions(){ + pkgdesc="Additions only for Arch Linux guests (userspace tools)" + depends=("virtualbox-archlinux-modules=$pkgver" 'gcc-libs' 'libxmu' 'xorg-xrandr') + replaces=('virtualbox-guest-additions') + conflicts=('virtualbox-guest-additions') + + source "$srcdir/VirtualBox-${pkgver}_OSE/env.sh" + + cd "$srcdir/VirtualBox-${pkgver}_OSE/out/linux.$BUILD_PLATFORM_ARCH/release/bin/additions" + + install -d "$pkgdir"/{usr/bin,sbin} + install -m755 VBoxClient VBoxControl VBoxService "$pkgdir/usr/bin" + install -m755 mount.vboxsf "$pkgdir/sbin" + + install -m755 -D "$srcdir"/VirtualBox-${pkgver}_OSE/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ + "$pkgdir"/usr/bin/VBoxClient-all + install -m755 -D "$srcdir"/VirtualBox-${pkgver}_OSE/src/VBox/Additions/x11/Installer/vboxclient.desktop \ + "$pkgdir"/etc/xdg/autostart/vboxclient.desktop + install -D vboxvideo_drv_111.so \ + "$pkgdir/usr/lib/xorg/modules/drivers/vboxvideo.so" + install -d "$pkgdir/usr/lib/xorg/modules/dri" + install -m755 VBoxOGL*.so "$pkgdir/usr/lib" + ln -s /usr/lib/VBoxOGL.so "$pkgdir/usr/lib/xorg/modules/dri/vboxvideo_dri.so" + install -m755 -D pam_vbox.so "$pkgdir/lib/security/pam_vbox.so" + + # install rc.d script + install -D -m755 "${srcdir}/vbox-service.rc" "${pkgdir}/etc/rc.d/vbox-service" + + # install sample config + install -D -m644 "${srcdir}/vbox-service.conf" "${pkgdir}/etc/conf.d/vbox-service" +} +md5sums=('dc6e6801b3823332b6ca2e9915221aae' + 'bc048d1e58d84ece4a186199ee48d4c8' + '5f85710e0b8606de967716ded7b2d351' + 'cc3f278bc273011aa95277500a76f677' + '78ffa67ff131680f1d2b6f06d4325c5b' + 'a82d698e7868315cdf876cfb02fd2268' + '97e193f050574dd272a38e5ee5ebe62b' + '3c08ad30b89add47d3f45121200a5360' + '778d865e56e31cc592fbfa257fdcfce7') diff --git a/community-testing/virtualbox/change_default_driver_dir.patch b/community-testing/virtualbox/change_default_driver_dir.patch new file mode 100644 index 000000000..d8531499d --- /dev/null +++ b/community-testing/virtualbox/change_default_driver_dir.patch @@ -0,0 +1,18 @@ +diff -Nur VirtualBox-4.1.0_OSE.orig/src/VBox/Additions/common/crOpenGL/fakedri_drv.c VirtualBox-4.1.0_OSE/src/VBox/Additions/common/crOpenGL/fakedri_drv.c +--- VirtualBox-4.1.0_OSE.orig/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2011-07-19 15:11:37.903456612 +0000 ++++ VirtualBox-4.1.0_OSE/src/VBox/Additions/common/crOpenGL/fakedri_drv.c 2011-07-19 15:12:41.024021274 +0000 +@@ -36,13 +36,8 @@ + //#define DEBUG_DRI_CALLS + + //@todo this could be different... +-#ifdef RT_ARCH_AMD64 +-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri" ++# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/xorg/modules/dri" + # define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/" +-#else +-# define DRI_DEFAULT_DRIVER_DIR "/usr/lib/dri:/usr/lib/i386-linux-gnu/dri" +-# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/" +-#endif + + #ifdef DEBUG_DRI_CALLS + #define SWDRI_SHOWNAME(pext, func) \ diff --git a/community-testing/virtualbox/vbox-service.conf b/community-testing/virtualbox/vbox-service.conf new file mode 100644 index 000000000..9d4ec629f --- /dev/null +++ b/community-testing/virtualbox/vbox-service.conf @@ -0,0 +1,2 @@ +# VBoxService -h +VBOX_SERVICE_OPTION="" diff --git a/community-testing/virtualbox/vbox-service.rc b/community-testing/virtualbox/vbox-service.rc new file mode 100755 index 000000000..c1af2134d --- /dev/null +++ b/community-testing/virtualbox/vbox-service.rc @@ -0,0 +1,39 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/vbox-service + +name=VBoxService +PID=$(pidof -o %PPID $name) + +case "$1" in + start) + stat_busy "Starting $name service" + [[ -z "$PID" ]] && ${name} $VBOX_SERVICE_OPTION &>/dev/null \ + && { add_daemon $name; stat_done; } \ + || { stat_fail; exit 1; } + ;; + stop) + stat_busy "Stopping $name service" + [[ -n "$PID" ]] && kill $PID &>/dev/null \ + && { rm_daemon $name; stat_done; } \ + || { stat_fail; exit 1; } + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + status) + stat_busy "Checking $name status"; + ck_status $name + ;; + *) + echo "usage: $0 {start|stop|restart|status}" + exit 1 +esac + +exit 0 + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community-testing/virtualbox/vboxbuild b/community-testing/virtualbox/vboxbuild new file mode 100755 index 000000000..cfc3c0a66 --- /dev/null +++ b/community-testing/virtualbox/vboxbuild @@ -0,0 +1,78 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/vbox/vbox.cfg + +MODLIST=() +LOG="/var/log/vbox-install.log" +>| "$LOG" + +if [[ $INSTALL_DIR ]]; then + VBOXMANAGE=$INSTALL_DIR/VBoxManage + BUILDVBOXDRV=$INSTALL_DIR/src/vboxdrv/build_in_tmp + BUILDVBOXNETFLT=$INSTALL_DIR/src/vboxnetflt/build_in_tmp + BUILDVBOXNETADP=$INSTALL_DIR/src/vboxnetadp/build_in_tmp + BUILDVBOXPCI=$INSTALL_DIR/src/vboxpci/build_in_tmp +else + echo "error: missing vbox.cfg" + exit 1 +fi + +if [[ -f /proc/modules ]]; then + IFS=$'\n' read -r -d '' -a MODLIST < \ + <(grep -oE '^vbox(pci|netflt|netadp|drv)' /proc/modules) +fi + +if (( ${#MODLIST[*]} )); then + stat_busy "Unloading VirtualBox kernel modules" + modprobe -ar "${MODLIST[@]}" && stat_done || stat_fail +fi + +for kdir in /lib/modules/[2-3]*; do + if [[ ! -d $kdir/kernel ]]; then + # found a stale kernel + mods=("$kdir/misc/vbox"{drv,netadp,netflt,pci}.ko*) + if (( ${#mods[@]} )); then + stat_busy "Removing all old VirtualBox kernel modules" + if rm -f "${mods[@]}" && + rmdir -p --ignore-fail-on-non-empty "$p/misc/" 2>/dev/null; then + stat_done + else + stat_fail + fi + fi + fi +done + +# default to the currently running kernel +if (( ! $# )); then + set -- $(uname -r) +fi + +for kernver; do + export KERN_DIR=/lib/modules/$kernver/build + if [[ ! -d $KERN_DIR ]]; then + printf "error: \`%s' does not appear to be a valid kernel build directory.\n" \ + "$KERN_DIR" + continue + fi + + stat_busy "Recompiling VirtualBox kernel modules ($kernver)" + for build in BUILDVBOX{DRV,NETFLT,NETADP,PCI}; do + if ! ${!build} \ + --save-module-symvers /tmp/vboxdrv-Module.symvers \ + --no-print-directory install >> $LOG 2>&1; then + echo "Look at $LOG to find out what went wrong" + stat_fail + continue + fi + done + stat_done +done + +if (( ${#MODLIST[*]} )); then + stat_busy "Reloading VirtualBox kernel modules" + modprobe -a "${MODLIST[@]}" && stat_done || stat_fail +fi + diff --git a/community-testing/virtualbox/vboxdrv-reference.patch b/community-testing/virtualbox/vboxdrv-reference.patch new file mode 100644 index 000000000..c310dbc8d --- /dev/null +++ b/community-testing/virtualbox/vboxdrv-reference.patch @@ -0,0 +1,45 @@ +diff -Nur VirtualBox-4.1.0_OSE.orig/src/VBox/Frontends/VirtualBox/src/main.cpp VirtualBox-4.1.0_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp +--- VirtualBox-4.1.0_OSE.orig/src/VBox/Frontends/VirtualBox/src/main.cpp 2011-07-19 15:11:37.730121727 +0000 ++++ VirtualBox-4.1.0_OSE/src/VBox/Frontends/VirtualBox/src/main.cpp 2011-07-19 19:02:15.658471139 +0000 +@@ -75,9 +75,8 @@ + "The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or " + "there is a permission problem with /dev/vboxdrv. Please reinstall the kernel " + "module by executing<br/><br/>" +- " <font color=blue>'/etc/init.d/vboxdrv setup'</font><br/><br/>" +- "as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS " +- "package first. This package keeps track of Linux kernel changes and " ++ " <font color=blue>'/usr/bin/vboxbuild'</font><br/><br/>" ++ "as root. This package keeps track of Linux kernel changes and" + "recompiles the vboxdrv kernel module if necessary." + ); + +@@ -92,7 +91,7 @@ + "The VirtualBox kernel modules do not match this version of " + "VirtualBox. The installation of VirtualBox was apparently not " + "successful. Executing<br/><br/>" +- " <font color=blue>'/etc/init.d/vboxdrv setup'</font><br/><br/>" ++ " <font color=blue>'/usr/bin/vboxbuild'</font><br/><br/>" + "may correct this. Make sure that you do not mix the " + "OSE version and the PUEL version of VirtualBox." + ); +diff -Nur VirtualBox-4.1.0_OSE.orig/src/VBox/Installer/linux/VBox.sh VirtualBox-4.1.0_OSE/src/VBox/Installer/linux/VBox.sh +--- VirtualBox-4.1.0_OSE.orig/src/VBox/Installer/linux/VBox.sh 2011-07-19 15:11:37.603453927 +0000 ++++ VirtualBox-4.1.0_OSE/src/VBox/Installer/linux/VBox.sh 2011-07-19 19:02:15.658471139 +0000 +@@ -34,7 +34,7 @@ + available for the current kernel (`uname -r`) or it failed to + load. Please recompile the kernel module and install it by + +- sudo /etc/init.d/vboxdrv setup ++ sudo /usr/bin/vboxbuild + + You will not be able to start VMs until this problem is fixed. + EOF +@@ -42,7 +42,7 @@ + cat << EOF + WARNING: The character device /dev/vboxdrv does not exist. Try + +- sudo /etc/init.d/vboxdrv restart ++ sudo /usr/bin/vboxbuild + + and if that is not successful, try to re-install the package. + diff --git a/community-testing/virtualbox/virtualbox-source.install b/community-testing/virtualbox/virtualbox-source.install new file mode 100644 index 000000000..24d90b1c2 --- /dev/null +++ b/community-testing/virtualbox/virtualbox-source.install @@ -0,0 +1,12 @@ +post_install() { +/bin/cat << EOF +===> To compile the modules do /usr/bin/vboxbuild +EOF + +} + +post_upgrade() { +/bin/cat << EOF +===> To recompile the modules do /usr/bin/vboxbuild +EOF +} diff --git a/community-testing/virtualbox/virtualbox.install b/community-testing/virtualbox/virtualbox.install new file mode 100644 index 000000000..b2d2e8858 --- /dev/null +++ b/community-testing/virtualbox/virtualbox.install @@ -0,0 +1,34 @@ +utils() { + if [ -x usr/bin/update-mime-database ]; then + update-mime-database usr/share/mime > /dev/null 2>&1 + fi + + if [ -x usr/bin/xdg-icon-resource ]; then + xdg-icon-resource forceupdate --theme hicolor > /dev/null 2>&1 + fi + + if [ -x usr/bin/update-desktop-database ]; then + usr/bin/update-desktop-database -q + fi +} + +post_install() { + getent group vboxusers >> /dev/null || usr/sbin/groupadd -g 108 vboxusers + utils +} + +post_upgrade() { + getent group vboxusers >> /dev/null || usr/sbin/groupadd -g 108 vboxusers + utils + if [ "$(vercmp $2 4.1.4-3)" -lt 0 ]; then +/bin/cat << EOF +===> Starting with virtualbox version 4.1.4-3, kernel modules handling is done by virtualbox-modules. +===> Use virtualbox-source package if you don't use our stock linux package. +EOF + fi +} + +post_remove() { + groupdel vboxusers >/dev/null 2>&1 || true + utils +} |