summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/btrfs-progs/btrfs-progs.install9
-rw-r--r--testing/kmod/0001-depmod-fix-parsing-of-modules.order-with-compressed-.patch165
-rw-r--r--testing/kmod/0001-libkmod-Add-support-for-.-in-module-parameter-on-kcm.patch33
-rw-r--r--testing/usermin/PKGBUILD134
-rw-r--r--testing/usermin/usermin-config.tar.bz2bin0 -> 951 bytes
-rw-r--r--testing/usermin/usermin.install34
-rw-r--r--testing/usermin/usermin.rc44
-rw-r--r--testing/usermin/usermin.service9
8 files changed, 428 insertions, 0 deletions
diff --git a/testing/btrfs-progs/btrfs-progs.install b/testing/btrfs-progs/btrfs-progs.install
new file mode 100644
index 000000000..d6c0698a0
--- /dev/null
+++ b/testing/btrfs-progs/btrfs-progs.install
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+post_upgrade() {
+ if [ "$(vercmp 0.19.20121005 "$2")" -eq 1 ]; then
+ echo "btrfs multi-device support now relies on linux 3.6 or later"
+ fi
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/testing/kmod/0001-depmod-fix-parsing-of-modules.order-with-compressed-.patch b/testing/kmod/0001-depmod-fix-parsing-of-modules.order-with-compressed-.patch
new file mode 100644
index 000000000..8c4ecf83c
--- /dev/null
+++ b/testing/kmod/0001-depmod-fix-parsing-of-modules.order-with-compressed-.patch
@@ -0,0 +1,165 @@
+From 88c247f7f18ac25181ddcaff97fbbecbd3a29f57 Mon Sep 17 00:00:00 2001
+From: Lucas De Marchi <lucas.de.marchi@gmail.com>
+Date: Wed, 3 Oct 2012 16:28:24 -0300
+Subject: [PATCH] depmod: fix parsing of modules.order with compressed modules
+
+We now index the modules by uncompressed-relative-path instead of
+relative-path. This is because the file modules.order, coming from
+kernel, always comes with uncompressed paths. This fixes the issue of
+not sorting the aliases correctly due to paths not matching when using
+compressed modules.
+---
+ tools/depmod.c | 46 +++++++++++++++++++++++++++++-----------------
+ 1 file changed, 29 insertions(+), 17 deletions(-)
+
+diff --git a/tools/depmod.c b/tools/depmod.c
+index 0bf2dea..ff19d6e 100644
+--- a/tools/depmod.c
++++ b/tools/depmod.c
+@@ -39,6 +39,8 @@
+ #define DEFAULT_VERBOSE LOG_WARNING
+ static int verbose = DEFAULT_VERBOSE;
+
++#define KMOD_EXT_UNC 0
++
+ static const struct kmod_ext {
+ const char *ext;
+ size_t len;
+@@ -1001,6 +1003,7 @@ struct mod {
+ uint16_t idx; /* index in depmod->modules.array */
+ uint16_t users; /* how many modules depend on this one */
+ uint8_t dep_loop : 1;
++ char *uncrelpath; /* same as relpath but ending in .ko */
+ char modname[];
+ };
+
+@@ -1014,7 +1017,7 @@ struct depmod {
+ const struct cfg *cfg;
+ struct kmod_ctx *ctx;
+ struct array modules;
+- struct hash *modules_by_relpath;
++ struct hash *modules_by_uncrelpath;
+ struct hash *modules_by_name;
+ struct hash *symbols;
+ unsigned int dep_loops;
+@@ -1025,6 +1028,7 @@ static void mod_free(struct mod *mod)
+ DBG("free %p kmod=%p, path=%s\n", mod, mod->kmod, mod->path);
+ array_free_array(&mod->deps);
+ kmod_module_unref(mod->kmod);
++ free(mod->uncrelpath);
+ free(mod);
+ }
+
+@@ -1066,10 +1070,10 @@ static int depmod_init(struct depmod *depmod, struct cfg *cfg,
+
+ array_init(&depmod->modules, 128);
+
+- depmod->modules_by_relpath = hash_new(512, NULL);
+- if (depmod->modules_by_relpath == NULL) {
++ depmod->modules_by_uncrelpath = hash_new(512, NULL);
++ if (depmod->modules_by_uncrelpath == NULL) {
+ err = -errno;
+- goto modules_by_relpath_failed;
++ goto modules_by_uncrelpath_failed;
+ }
+
+ depmod->modules_by_name = hash_new(512, NULL);
+@@ -1089,8 +1093,8 @@ static int depmod_init(struct depmod *depmod, struct cfg *cfg,
+ symbols_failed:
+ hash_free(depmod->modules_by_name);
+ modules_by_name_failed:
+- hash_free(depmod->modules_by_relpath);
+-modules_by_relpath_failed:
++ hash_free(depmod->modules_by_uncrelpath);
++modules_by_uncrelpath_failed:
+ return err;
+ }
+
+@@ -1100,7 +1104,7 @@ static void depmod_shutdown(struct depmod *depmod)
+
+ hash_free(depmod->symbols);
+
+- hash_free(depmod->modules_by_relpath);
++ hash_free(depmod->modules_by_uncrelpath);
+
+ hash_free(depmod->modules_by_name);
+
+@@ -1114,7 +1118,7 @@ static void depmod_shutdown(struct depmod *depmod)
+ static int depmod_module_add(struct depmod *depmod, struct kmod_module *kmod)
+ {
+ const struct cfg *cfg = depmod->cfg;
+- const char *modname;
++ const char *modname, *lastslash;
+ size_t modnamelen;
+ struct mod *mod;
+ int err;
+@@ -1134,7 +1138,8 @@ static int depmod_module_add(struct depmod *depmod, struct kmod_module *kmod)
+ array_init(&mod->deps, 4);
+
+ mod->path = kmod_module_get_path(kmod);
+- mod->baselen = strrchr(mod->path, '/') - mod->path;
++ lastslash = strrchr(mod->path, '/');
++ mod->baselen = lastslash - mod->path;
+ if (strncmp(mod->path, cfg->dirname, cfg->dirnamelen) == 0 &&
+ mod->path[cfg->dirnamelen] == '/')
+ mod->relpath = mod->path + cfg->dirnamelen + 1;
+@@ -1144,25 +1149,32 @@ static int depmod_module_add(struct depmod *depmod, struct kmod_module *kmod)
+ err = hash_add_unique(depmod->modules_by_name, mod->modname, mod);
+ if (err < 0) {
+ ERR("hash_add_unique %s: %s\n", mod->modname, strerror(-err));
+- free(mod);
+- return err;
++ goto fail;
+ }
+
+ if (mod->relpath != NULL) {
+- err = hash_add_unique(depmod->modules_by_relpath,
+- mod->relpath, mod);
++ size_t uncrelpathlen = lastslash - mod->relpath + modnamelen
++ + kmod_exts[KMOD_EXT_UNC].len;
++ mod->uncrelpath = memdup(mod->relpath, uncrelpathlen + 1);
++ mod->uncrelpath[uncrelpathlen] = '\0';
++ err = hash_add_unique(depmod->modules_by_uncrelpath,
++ mod->uncrelpath, mod);
+ if (err < 0) {
+ ERR("hash_add_unique %s: %s\n",
+ mod->relpath, strerror(-err));
+ hash_del(depmod->modules_by_name, mod->modname);
+- free(mod);
+- return err;
++ goto fail;
+ }
+ }
+
+ DBG("add %p kmod=%p, path=%s\n", mod, kmod, mod->path);
+
+ return 0;
++
++fail:
++ free(mod->uncrelpath);
++ free(mod);
++ return err;
+ }
+
+ static int depmod_module_del(struct depmod *depmod, struct mod *mod)
+@@ -1170,7 +1182,7 @@ static int depmod_module_del(struct depmod *depmod, struct mod *mod)
+ DBG("del %p kmod=%p, path=%s\n", mod, mod->kmod, mod->path);
+
+ if (mod->relpath != NULL)
+- hash_del(depmod->modules_by_relpath, mod->relpath);
++ hash_del(depmod->modules_by_uncrelpath, mod->relpath);
+
+ hash_del(depmod->modules_by_name, mod->modname);
+
+@@ -1472,7 +1484,7 @@ static void depmod_modules_sort(struct depmod *depmod)
+ continue;
+ line[len - 1] = '\0';
+
+- mod = hash_find(depmod->modules_by_relpath, line);
++ mod = hash_find(depmod->modules_by_uncrelpath, line);
+ if (mod == NULL)
+ continue;
+ mod->sort_idx = idx - total;
+--
+1.7.12.4
+
diff --git a/testing/kmod/0001-libkmod-Add-support-for-.-in-module-parameter-on-kcm.patch b/testing/kmod/0001-libkmod-Add-support-for-.-in-module-parameter-on-kcm.patch
new file mode 100644
index 000000000..4ef3d2775
--- /dev/null
+++ b/testing/kmod/0001-libkmod-Add-support-for-.-in-module-parameter-on-kcm.patch
@@ -0,0 +1,33 @@
+From 66f3228d17d66d7e2dd484427259290fbc82b2f0 Mon Sep 17 00:00:00 2001
+From: Lucas De Marchi <lucas.demarchi@profusion.mobi>
+Date: Mon, 8 Oct 2012 19:04:16 -0300
+Subject: [PATCH] libkmod: Add support for '.' in module parameter on kcmdline
+
+Otherwise we fail to parse arguments in kernel command line like
+testmodule.testparam=1.5G
+
+Suggested-by: Selim T. Erdogan <selim@alumni.cs.utexas.edu>
+---
+ libkmod/libkmod-config.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c
+index 70044f0..398468e 100644
+--- a/libkmod/libkmod-config.c
++++ b/libkmod/libkmod-config.c
+@@ -567,8 +567,10 @@ static int kmod_config_parse_kcmdline(struct kmod_config *config)
+ modname = p + 1;
+ break;
+ case '.':
+- *p = '\0';
+- param = p + 1;
++ if (param == NULL) {
++ *p = '\0';
++ param = p + 1;
++ }
+ break;
+ case '=':
+ if (param != NULL)
+--
+1.7.12.4
+
diff --git a/testing/usermin/PKGBUILD b/testing/usermin/PKGBUILD
new file mode 100644
index 000000000..6e5eb6289
--- /dev/null
+++ b/testing/usermin/PKGBUILD
@@ -0,0 +1,134 @@
+# $Id: PKGBUILD 169457 2012-10-21 13:56:26Z tomegun $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+pkgname=usermin
+pkgver=1.520
+pkgrel=2
+pkgdesc="a web interface that can be used to easily perform tasks like reading mail, setting up SSH or configuring mail forwarding"
+arch=(i686 x86_64)
+license=('custom:usermin')
+url="http://www.webmin.com/"
+depends=('perl' 'webmin')
+makedepends=('perl-net-ssleay')
+backup=('etc/usermin/miniserv.conf' 'etc/usermin/miniserv.users' 'etc/usermin/config' 'etc/usermin/usermin.cats' \
+'etc/usermin/at/config' \
+'etc/usermin/man/config' \
+'etc/usermin/ssh/config' \
+'etc/usermin/chfn/config' \
+'etc/usermin/cron/config' \
+'etc/usermin/file/config' \
+'etc/usermin/plan/config' \
+'etc/usermin/proc/config' \
+'etc/usermin/spam/config' \
+'etc/usermin/htaccess/config' \
+'etc/usermin/cshrc/config' \
+'etc/usermin/gnupg/config' \
+'etc/usermin/mysql/config' \
+'etc/usermin/quota/config' \
+'etc/usermin/shell/config' \
+'etc/usermin/theme/config' \
+'etc/usermin/mailbox/config' \
+'etc/usermin/schedule/config' \
+'etc/usermin/config' \
+'etc/usermin/commands/config' \
+'etc/usermin/htaccess-htpasswd/config' \
+'etc/usermin/forward/config' \
+'etc/usermin/telnet/config' \
+'etc/usermin/tunnel/config' \
+'etc/usermin/updown/config' \
+'etc/usermin/procmail/config' \
+'etc/usermin/fetchmail/config' \
+'etc/usermin/changepass/config' \
+'etc/usermin/language/config' \
+'etc/usermin/postgresql/config' \
+'etc/usermin/usermount/config' \
+)
+install=usermin.install
+source=(http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz
+ usermin.rc
+ usermin.service
+ ftp://ftp.archlinux.org/other/usermin/usermin-config.tar.bz2)
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+
+ # remove modules we do not support
+
+ #remove config files from other distros
+ rm -f $(find . ! -name 'config-generic-linux' ! -name 'config-\*-linux' ! -name 'config-lib.pl' -name 'config-*')
+
+ # remove caldera theme
+ rm -rf caldera
+
+ # remove init-scripts from other distros
+ rm usermin-init
+ rm usermin-daemon
+
+ # setting perl path
+ (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl -
+
+ # create dirs
+ mkdir -p $startdir/pkg/opt/usermin
+ mkdir -p $startdir/pkg/var/log/usermin
+ mkdir -p $startdir/pkg/etc/usermin
+
+ # install pam stuff
+ install -D -m 644 usermin-pam $startdir/pkg/etc/pam.d/usermin
+
+ # remove other distros and add only Archlinux don't change next line else it will not work!
+ rm os_list.txt
+ echo 'Archlinux Any version generic-linux * -d "/etc/pacman.d"' >> os_list.txt
+
+ # copy stuff to right dirs
+ cd $startdir/src/$pkgname-$pkgver
+ cp -rp * $startdir/pkg/opt/usermin
+ cd $startdir/src/usermin-config
+ cp -rfp * $startdir/pkg/opt/usermin
+
+ # define parameters for setup.sh
+ config_dir=$startdir/pkg/etc/usermin
+ var_dir=$startdir/pkg/var/log/usermin
+ perl=/usr/bin/perl
+ autoos=1
+ port=20000
+ login=root
+ crypt="XXX"
+ ssl=1
+ atboot=0
+ nostart=1
+ nochown=1
+ autothird=1
+ nouninstall=1
+ noperlpath=1
+ atbootyn=n
+ tempdir=$startdir/pkg/tmp
+ export config_dir var_dir perl autoos port tempdir ssl nochown autothird nouninstall nostart noperlpath atbootyn login crypt
+
+ # Fix setup.sh
+ sed -i -e 's:read atbootyn::g' -e 's:exit 13::g' $startdir/pkg/opt/usermin/setup.sh
+ $startdir/pkg/opt/usermin/setup.sh
+
+ # Fixup the config files to use their real locations
+ sed -i 's:^pidfile=.*$:pidfile=/var/run/usermin.pid:' $startdir/pkg/etc/usermin/miniserv.conf
+ find $startdir/pkg/etc/usermin -type f -exec sed -i "s:$startdir/pkg::g" {} \;
+
+ # make it only accessible by localhost
+ echo 'allow=127.0.0.1' >> $startdir/pkg/etc/usermin/miniserv.conf
+
+ # enable user and password login
+ sed -i -e '/localauth/d' $startdir/pkg/etc/usermin/miniserv.conf
+
+ #install systemd service file
+ install -D -m 644 $startdir/src/usermin.service $startdir/pkg/usr/lib/systemd/system/usermin.service
+
+ #install rc file
+ install -D -m 755 $startdir/src/usermin.rc $startdir/pkg/etc/rc.d/usermin
+
+ # delete temp dir
+ rm -r $startdir/pkg/tmp
+ #install license
+ install -m 644 -D $startdir/src/$pkgname-$pkgver/LICENCE $startdir/pkg/usr/share/licenses/usermin/LICENCE
+}
+md5sums=('5819ba87796d9373a92116e90d1a35d4'
+ 'cfef4490cd1ef9517c0b39a7bd75c968'
+ 'a5bd5e5ee779f8a3cf3d776ca77ee36e'
+ 'ec37a79f948f778224550930d2a7ca07')
diff --git a/testing/usermin/usermin-config.tar.bz2 b/testing/usermin/usermin-config.tar.bz2
new file mode 100644
index 000000000..056bb6298
--- /dev/null
+++ b/testing/usermin/usermin-config.tar.bz2
Binary files differ
diff --git a/testing/usermin/usermin.install b/testing/usermin/usermin.install
new file mode 100644
index 000000000..3ace10ea2
--- /dev/null
+++ b/testing/usermin/usermin.install
@@ -0,0 +1,34 @@
+# arg 1: the new package version
+post_install() {
+ local crypt=$(grep "^root:" ${ROOT}/etc/shadow | cut -f 2 -d :)
+ crypt=${crypt//\\/\\\\}
+ crypt=${crypt//\//\\\/}
+ sed -i "s/root:XXX/root:${crypt}/" /etc/usermin/miniserv.users
+cat << EOF
+Note:
+==> It is not allowed to install 3rd party modules, or delete existing modules.
+==> Please write your own PKGBUILDS for 3rd party modules and additional themes.
+Setup:
+==> To make usermin start at boot time, add usermin to rc.conf daemons
+==> Point your web browser to http://localhost:20000 to use usermin.
+==> To change the modules setup please use webmin.
+
+==> The access is restricted to localhost, if you want to connect from other locations
+==> change /etc/usermin/miniserv.conf to something like that: allow=127.0.0.1 <your-ip>
+==> If you want to have ssl encryption please install 'perl-net-ssleay' additional.
+EOF
+# fix man module
+ cd /opt/usermin/man
+ gzip -df $(find . -name '*.gz')
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ # uninstall unzipped files
+ rm -r /opt/usermin/man
+}
diff --git a/testing/usermin/usermin.rc b/testing/usermin/usermin.rc
new file mode 100644
index 000000000..af365780a
--- /dev/null
+++ b/testing/usermin/usermin.rc
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+start=/etc/usermin/start
+stop=/etc/usermin/stop
+lockfile=/var/lock/usermin
+
+case "$1" in
+'start')
+ stat_busy "Starting Usermin daemon"
+ $start >/dev/null 2>&1 </dev/null
+ RETVAL=$?
+ if [ "$RETVAL" = "0" ]; then
+ touch $lockfile >/dev/null 2>&1
+ stat_done
+ else
+ stat_fail
+fi
+;;
+
+'stop')
+ stat_busy "Stopping Usermin daemon"
+ $stop >/dev/null 2>&1 </dev/null
+ RETVAL=$?
+ if [ "$RETVAL" = "0" ]; then
+ rm -f $lockfile
+ stat_done
+ else
+ stat_fail
+fi
+;;
+
+'restart')
+ $stop && $start
+ RETVAL=$?
+;;
+*)
+echo "Usage: $0 { start | stop | restart }"
+RETVAL=1
+;;
+esac
+exit $RETVAL \ No newline at end of file
diff --git a/testing/usermin/usermin.service b/testing/usermin/usermin.service
new file mode 100644
index 000000000..e91164c63
--- /dev/null
+++ b/testing/usermin/usermin.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Usermin
+
+[Service]
+Type=forking
+ExecStart=/opt/usermin/miniserv.pl /etc/usermin/miniserv.conf
+
+[Install]
+WantedBy=multi-user.target