diff options
| author | Leonardo Arena <rnalrd@gmail.com> | 2009-05-18 14:43:52 +0000 |
|---|---|---|
| committer | Leonardo Arena <rnalrd@gmail.com> | 2009-05-18 14:43:52 +0000 |
| commit | 117bb35f373bca86f4beece1ff41db07c4a6a347 (patch) | |
| tree | b2e618a26ed0a7179b335a45c5b260e50a67ca1a /extra | |
| parent | d49d45a62859902c50f2747066d09ae5b3eacd81 (diff) | |
| parent | 3beca4265af9bc5d5370a0474b6374cf743ae76d (diff) | |
| download | aports-117bb35f373bca86f4beece1ff41db07c4a6a347.tar.bz2 aports-117bb35f373bca86f4beece1ff41db07c4a6a347.tar.xz | |
Merge branch 'master' of git://dev.alpinelinux.org/aports
Diffstat (limited to 'extra')
28 files changed, 825 insertions, 23 deletions
diff --git a/extra/acf-alpine-baselayout/APKBUILD b/extra/acf-alpine-baselayout/APKBUILD index 4a33ac223b..ad95472d15 100644 --- a/extra/acf-alpine-baselayout/APKBUILD +++ b/extra/acf-alpine-baselayout/APKBUILD @@ -1,15 +1,15 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=acf-alpine-baselayout -pkgver=0.4.9 -pkgrel=1 +pkgver=0.4.12 +pkgrel=0 pkgdesc="A web-based system administration interface for alpine-baselayout" url="http://dev.alpinelinux.org/alpine/acf" license="GPL-2" depends="acf-core json4lua lua luaposix" -source="http://dev.alpinelinux.org/alpine/acf/${pkgname:4}/$pkgname-$pkgver.tar.bz2" +source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2" build() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install } -md5sums="b460d7e82282d967c9331701e7765fd8 acf-alpine-baselayout-0.4.9.tar.bz2" +md5sums="9a492c3e2a2491dc2e451286ce297db9 acf-alpine-baselayout-0.4.12.tar.bz2" diff --git a/extra/acf-core/APKBUILD b/extra/acf-core/APKBUILD index ce54b56b60..7c77b2d8d9 100644 --- a/extra/acf-core/APKBUILD +++ b/extra/acf-core/APKBUILD @@ -1,15 +1,15 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=acf-core -pkgver=0.4.20 -pkgrel=1 +pkgver=0.4.22 +pkgrel=0 pkgdesc="A web-based system administration interface framework" url="http://dev.alpinelinux.org/alpine/acf" license="GPL-2" -depends="acf-skins lua luaposix md5" +depends="acf-skins haserl lua luaposix md5" source="http://dev.alpinelinux.org/alpine/acf/core/$pkgname-$pkgver.tar.bz2" build() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install } -md5sums="8c0721305651203f6e188bb7cfece380 acf-core-0.4.20.tar.bz2" +md5sums="c491d0decae8fe8341a685f2f0247815 acf-core-0.4.22.tar.bz2" diff --git a/extra/acf-gross/APKBUILD b/extra/acf-gross/APKBUILD new file mode 100644 index 0000000000..12a31c5f95 --- /dev/null +++ b/extra/acf-gross/APKBUILD @@ -0,0 +1,15 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=acf-gross +pkgver=0.1.0 +pkgrel=0 +pkgdesc="A web-based system administration interface for gross" +url="http://git.alpinelinux.org/cgit/acf-gross" +license="GPL-2" +depends="acf-core lua gross" +source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2" + +build() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} +md5sums="24647773752931c4d00d44f60d15608f acf-gross-0.1.0.tar.bz2" diff --git a/extra/acf-iptables/APKBUILD b/extra/acf-iptables/APKBUILD index e494a51524..9033723fad 100644 --- a/extra/acf-iptables/APKBUILD +++ b/extra/acf-iptables/APKBUILD @@ -1,6 +1,6 @@ # Contributor: Michael Mason <ms13sp@gmail.com> pkgname=acf-iptables -pkgver=0.0.2 +pkgver=0.1.0 pkgrel=0 pkgdesc="A web-based system administration interface for iptables" url="http://dev.alpinelinux.org/alpine/acf" @@ -9,7 +9,7 @@ depends="acf-core lua iptables" makedepends="" install= subpackages="" -source="http://dev.alpinelinux.org/alpine/acf/${pkgname:4}/$pkgname-$pkgver.tar.bz2" +source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2" build() { cd "$srcdir/$pkgname-$pkgver" @@ -18,4 +18,4 @@ build() { } -md5sums="6a9b06f45a5d37c8cb5ef6191fd47821 acf-iptables-0.0.2.tar.bz2" +md5sums="02ef8d8538c91ed842346860105bdd94 acf-iptables-0.1.0.tar.bz2" diff --git a/extra/acf-openssh/APKBUILD b/extra/acf-openssh/APKBUILD index dbafb8142d..327946583b 100644 --- a/extra/acf-openssh/APKBUILD +++ b/extra/acf-openssh/APKBUILD @@ -1,15 +1,15 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=acf-openssh -pkgver=0.1.2 +pkgver=0.1.4 pkgrel=0 pkgdesc="A web-based system administration interface for openssh" url="http://dev.alpinelinux.org/alpine/acf" license="GPL-2" depends="acf-core lua openssh" -source="http://dev.alpinelinux.org/alpine/acf/${pkgname:4}/$pkgname-$pkgver.tar.bz2" +source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2" build() { cd "$srcdir/$pkgname-$pkgver" make DESTDIR="$pkgdir" install } -md5sums="241b32e6f44844d0b4f72b7014e8c813 acf-openssh-0.1.2.tar.bz2" +md5sums="3cfd5a933b2f3d65037e096da582936f acf-openssh-0.1.4.tar.bz2" diff --git a/extra/acf-ppp/APKBUILD b/extra/acf-ppp/APKBUILD new file mode 100644 index 0000000000..e4389f6eba --- /dev/null +++ b/extra/acf-ppp/APKBUILD @@ -0,0 +1,15 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=acf-ppp +pkgver=0.1.0 +pkgrel=0 +pkgdesc="A web-based system administration interface for ppp" +url="http://git.alpinelinux.org/cgit/acf-ppp" +license="GPL-2" +depends="acf-core lua ppp" +source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2" + +build() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} +md5sums="62f30adc3c8a86b4bf79e3762154a7a5 acf-ppp-0.1.0.tar.bz2" diff --git a/extra/gross/APKBUILD b/extra/gross/APKBUILD new file mode 100644 index 0000000000..986c0eb913 --- /dev/null +++ b/extra/gross/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=gross +pkgver=1.0.1 +pkgrel=0 +pkgdesc="Greylisting of suspicious sources" +url="http://code.google.com/p/gross/" +license="BSD" +depends="uclibc c-ares" +makedepends="c-ares-dev autoconf automake libtool sed" +install="$pkgname.pre-install $pkgname.post-install" +subpackages="$pkgname-doc $pkgname-dev" +source="http://gross.googlecode.com/files/$pkgname-$pkgver.tar.gz + $pkgname.initd + $pkgname.confd + gross-1.0.1-configure.ac.patch + gross-1.0.1-default-conf.patch + gross-1.0.1-user.patch + $install" + +build() { + cd "$srcdir/$pkgname-$pkgver" + + for _i in ../*.patch; do + msg "Applying $_i..." + patch -p1 < $_i || return 1 + done + msg "Running autotools..." + aclocal --force && autoconf && automake --add-missing \ + && libtoolize --force --copy || return 1 + + export lt_SED='/bin/sed' + export lt_cv_path_SED='/bin/sed' + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + + make -j1 || return 1 + make -j1 DESTDIR="$pkgdir" install + + install -dD "$pkgdir"/var/run/gross + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/gross + install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/gross +} + +md5sums="f8f81b36850dcda30cb81799b9cee3b6 gross-1.0.1.tar.gz +37b83bd0d94f66c733d5562c0327b70f gross.initd +5ca1c6e51c3243236e6564480b20279b gross.confd +bb75b119ac96b8f99831ce6df810003f gross-1.0.1-configure.ac.patch +7c504b653c71dcf7b192bc487b3516fd gross-1.0.1-default-conf.patch +16e184d59d520db565388f010cc75e83 gross-1.0.1-user.patch +4b55d1c5534167946cc11376d1b05c34 gross.post-install +8f6e45b98888dbb9971f7681bf431f6f gross.pre-install" diff --git a/extra/gross/gross-1.0.1-configure.ac.patch b/extra/gross/gross-1.0.1-configure.ac.patch new file mode 100644 index 0000000000..80f9ea7762 --- /dev/null +++ b/extra/gross/gross-1.0.1-configure.ac.patch @@ -0,0 +1,20 @@ +--- a/configure.ac.orig 2008-05-29 16:18:56 +0000 ++++ b/configure.ac 2008-05-30 09:10:48 +0000 +@@ -52,7 +52,7 @@ + then + AC_DEFINE([USE_SEM_OPEN], [], [Use sem_open() instead of sem_init()]) + else +- AC_SEARCH_LIBS(sem_init, [rt], , ++ AC_SEARCH_LIBS(sem_init, [rt pthread], , + AC_MSG_ERROR([Can't compile without semaphores.]) + ) + fi +@@ -101,7 +101,7 @@ + AC_MSG_CHECKING([whether to disable dnsbl checking]) + AC_ARG_ENABLE(dnsbl, + AC_HELP_STRING([--disable-dnsbl], [Disable dnsbl checking]), +- [AC_MSG_RESULT([yes]) ; dnsbl="no"], ++ [AC_MSG_RESULT([yes]) ; dnsbl="$enableval"], + [AC_MSG_RESULT([no]) ; dnsbl="yes"] + ) + diff --git a/extra/gross/gross-1.0.1-default-conf.patch b/extra/gross/gross-1.0.1-default-conf.patch new file mode 100644 index 0000000000..39cd90709d --- /dev/null +++ b/extra/gross/gross-1.0.1-default-conf.patch @@ -0,0 +1,17 @@ +diff -ru gross-1.0.1.orig/doc/examples/grossd.conf gross-1.0.1/doc/examples/grossd.conf +--- gross-1.0.1.orig/doc/examples/grossd.conf 2008-06-03 09:27:37 +0000 ++++ gross-1.0.1/doc/examples/grossd.conf 2008-06-03 09:31:33 +0000 +@@ -71,11 +71,13 @@ + # 'statefile' is the full path of the file that the server will use to + # store the state information. + # statefile = /var/db/grossd.state ++statefile = /var/db/gross/state + + # 'pidfile' is the full path of the file grossd writes its pid into. + # You can set parameter 'check', if you want to keep grossd + # from starting if pidfile already exists. + # pidfile = /var/run/grossd.pid;check ++pidfile = /var/run/gross/grossd.pid + + # 'log_method' is used to list all the possible logging facilities. + # currently only syslog is implemented diff --git a/extra/gross/gross-1.0.1-user.patch b/extra/gross/gross-1.0.1-user.patch new file mode 100644 index 0000000000..a20279f003 --- /dev/null +++ b/extra/gross/gross-1.0.1-user.patch @@ -0,0 +1,72 @@ +Index: src/gross.c +=================================================================== +--- a/src/gross.c (revision 491) ++++ b/src/gross.c (working copy) +@@ -553,7 +553,7 @@ + void + usage(void) + { +- printf("Usage: grossd [-CDdhnPprV] [-f configfile]\n"); ++ printf("Usage: grossd [-CDdhnPpruV] [-f configfile]\n"); + printf(" -C create statefile and exit\n"); + printf(" -D Enable debug logging (insane verbosity with -DD)\n"); + printf(" -d Run grossd as a foreground process\n"); +@@ -563,6 +563,7 @@ + printf(" -p file write the process id in a pidfile\n"); + printf(" -P file same as -p, but pid file must not exist\n"); + printf(" -r disable replication\n"); ++ printf(" -u user run gross as user\n"); + printf(" -V version information\n"); + exit(EXIT_USAGE); + } +@@ -612,6 +613,7 @@ + pool_limits_t limits; + sigset_t mask, oldmask; + struct passwd *pwd; ++ char *user = "nobody"; + + #ifdef DNSBL + dns_check_info_t *dns_check_info; +@@ -623,7 +625,7 @@ + daemon_shutdown(EXIT_FATAL, "Couldn't initialize context"); + + /* command line arguments */ +- while ((c = getopt(argc, argv, ":drf:VCDnp:P:")) != -1) { ++ while ((c = getopt(argc, argv, ":drf:VCDnp:P:u:")) != -1) { + switch (c) { + case 'd': + ctx->config.flags |= FLG_NODAEMON; +@@ -663,6 +665,9 @@ + ctx->config.flags |= FLG_CHECK_PIDFILE; + ctx->config.flags |= FLG_CREATE_PIDFILE; + break; ++ case 'u': ++ user = optarg; ++ break; + case 'h': + usage(); + break; +@@ -675,16 +680,16 @@ + + /* grossd doesn't need to be running as root */ + if (geteuid() == 0) { +- logstr(GLOG_DEBUG, "Running as root: setuid() to 'nobody'"); +- pwd = getpwnam("nobody"); ++ logstr(GLOG_DEBUG, "Running as root: setuid() to '%s'", user); ++ pwd = getpwnam(user); + if (NULL == pwd) +- daemon_shutdown(EXIT_FATAL, "Running as root: can't find user 'nobody'"); ++ daemon_shutdown(EXIT_FATAL, "Running as root: can't find user '%s'", user); + if (setgid(pwd->pw_gid) != 0) +- daemon_shutdown(EXIT_FATAL, "Running as root: can't setgid(%d) to 'nobody': %s", +- pwd->pw_gid, strerror(errno)); ++ daemon_shutdown(EXIT_FATAL, "Running as root: can't setgid(%d) to '%s': %s", ++ pwd->pw_gid, user, strerror(errno)); + if (setuid(pwd->pw_uid) != 0) +- daemon_shutdown(EXIT_FATAL, "Running as root: can't setuid(%d) to 'nobody': %s", +- pwd->pw_uid, strerror(errno)); ++ daemon_shutdown(EXIT_FATAL, "Running as root: can't setuid(%d) to '%s': %s", ++ pwd->pw_uid, user, strerror(errno)); + } + + config = default_config(); diff --git a/extra/gross/gross.confd b/extra/gross/gross.confd new file mode 100644 index 0000000000..646e12f9d7 --- /dev/null +++ b/extra/gross/gross.confd @@ -0,0 +1,6 @@ +# +# Specify daemon $OPTS here. +# + +OPTS="" + diff --git a/extra/gross/gross.initd b/extra/gross/gross.initd new file mode 100644 index 0000000000..c67293e17f --- /dev/null +++ b/extra/gross/gross.initd @@ -0,0 +1,35 @@ +#!/sbin/runscript + +NAME="grossd" +DAEMON="/usr/sbin/$NAME" +USER="gross" +GROUP="gross" + +depend() { + need net +} + +check_config() { + if [ ! -f /var/db/gross/state ] ; then + einfo "Generating Gross database..." + install -dD -o${USER} -g${GROUP} /var/db/gross + ${DAEMON} -Cu ${USER} > /dev/null + fi +} + +start() { + check_config || return 1 + ebegin "Starting ${NAME}" + start-stop-daemon --start --quiet --background \ + --exec ${DAEMON} -- \ + -p /var/run/gross/grossd.pid \ + -u ${USER} ${OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${NAME}" + start-stop-daemon --stop --pidfile /var/run/gross/grossd.pid + eend $? +} + diff --git a/extra/gross/gross.post-install b/extra/gross/gross.post-install new file mode 100644 index 0000000000..df06670a41 --- /dev/null +++ b/extra/gross/gross.post-install @@ -0,0 +1,2 @@ +#!/bin/sh +chown -R gross:gross /var/run/gross diff --git a/extra/gross/gross.pre-install b/extra/gross/gross.pre-install new file mode 100644 index 0000000000..c3844d7a5e --- /dev/null +++ b/extra/gross/gross.pre-install @@ -0,0 +1,3 @@ +#!/bin/sh +adduser -H -s /bin/false -D gross 2>/dev/null +exit 0 diff --git a/extra/libsndfile/APKBUILD b/extra/libsndfile/APKBUILD index 758c59bf5a..471c45a657 100644 --- a/extra/libsndfile/APKBUILD +++ b/extra/libsndfile/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=libsndfile -pkgver=1.0.19 +pkgver=1.0.20 pkgrel=0 pkgdesc="A C library for reading and writing files containing sampled sound" url="http://www.mega-nerd.com/libsndfile" @@ -19,4 +19,4 @@ build () { make || return 1 make DESTDIR="$pkgdir" install || return 1 } -md5sums="8fa24b0c0a8758543427c9741ea06924 libsndfile-1.0.19.tar.gz" +md5sums="e0553e12c7a467af44693e95e2eac668 libsndfile-1.0.20.tar.gz" diff --git a/extra/libusb-compat/APKBUILD b/extra/libusb-compat/APKBUILD new file mode 100644 index 0000000000..23e16cfa57 --- /dev/null +++ b/extra/libusb-compat/APKBUILD @@ -0,0 +1,20 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=libusb-compat +pkgver=0.1.0 +pkgrel=0 +pkgdesc="Compatility for older libusb" +url="http://libusb.sourceforge.net/" +license="LGPL" +subpackages="$pkgname-dev" +depends="uclibc libusb" +makedepends="libusb-dev" +source="http://downloads.sourceforge.net/libusb/$pkgname-$pkgver.tar.bz2" + +build () +{ + cd "$srcdir"/$pkgname-$pkgver + ./configure --prefix=/usr --disable-build-docs + make || return 1 + make DESTDIR="$pkgdir" install +} +md5sums="652e1d9e6c6912fd924a5ad204f6d48b libusb-compat-0.1.0.tar.bz2" diff --git a/extra/libusb/APKBUILD b/extra/libusb/APKBUILD new file mode 100644 index 0000000000..7234ad31df --- /dev/null +++ b/extra/libusb/APKBUILD @@ -0,0 +1,20 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=libusb +pkgver=1.0.1 +pkgrel=0 +pkgdesc="Library to enable user space application programs to communicate with USB devices" +url="http://libusb.sourceforge.net/" +license="LGPL" +subpackages="$pkgname-dev" +depends="uclibc" +makedepends="" +source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2" + +build () +{ + cd "$srcdir"/$pkgname-$pkgver + ./configure --prefix=/usr --disable-build-docs + make || return 1 + make DESTDIR="$pkgdir" install +} +md5sums="8fb0e066678a0d294894b5b2969cb4b3 libusb-1.0.1.tar.bz2" diff --git a/extra/neon/APKBUILD b/extra/neon/APKBUILD index e6af49c718..76d099e471 100644 --- a/extra/neon/APKBUILD +++ b/extra/neon/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=neon -pkgver=0.28.3 +pkgver=0.28.4 pkgrel=1 pkgdesc="HTTP and WebDAV client library with a C interface" url="http://www.webdav.org/neon/" @@ -15,7 +15,7 @@ build () { ./configure --prefix=/usr \ --with-ssl \ --with-expat \ - --disable-gssapi \ + --without-gssapi \ --disable-nls \ --disable-socks \ --enable-shared \ @@ -24,4 +24,4 @@ build () { make || return 1 make DESTDIR="$pkgdir" install } -md5sums="47599a328862ce64ac3c52726d6daa12 neon-0.28.3.tar.gz" +md5sums="6c3b94362af743d046e198e9fcbe4a85 neon-0.28.4.tar.gz" diff --git a/extra/rsync/APKBUILD b/extra/rsync/APKBUILD index 294f6cdf3e..4b0e8f1205 100644 --- a/extra/rsync/APKBUILD +++ b/extra/rsync/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=rsync -pkgver=3.0.5 +pkgver=3.0.6 pkgrel=0 pkgdesc="A file transfer program to keep remote files in sync" url="http://samba.anu.edu.au/rsync/" @@ -29,7 +29,7 @@ build() { install -D -m 644 ../rsyncd.logrotate ${pkgdir}/etc/logrotate.d/rsyncd } -md5sums="a130e736c011572cb423b6245e97fc4b rsync-3.0.5.tar.gz +md5sums="e9865d093a18e4668b9d31b635dc8e99 rsync-3.0.6.tar.gz 492d13dbba49a9e7c77c89d01b4f617a rsyncd.initd e5e62e8cef29e09c22e8ba8152ec1751 rsyncd.confd a99211a14af1766ba849035241cd5bb2 rsyncd.conf diff --git a/extra/subversion/APKBUILD b/extra/subversion/APKBUILD index 454b4da9ef..5d0c213aaa 100644 --- a/extra/subversion/APKBUILD +++ b/extra/subversion/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=subversion -pkgver=1.6.1 +pkgver=1.6.2 pkgrel=0 pkgdesc="Replacement for CVS, another versioning system (svn)" url="http://subversion.tigris.org/" @@ -32,7 +32,7 @@ build() { install -Dm755 "$srcdir"/svnserve.initd "$pkgdir"/etc/init.d/svnserve install -Dm644 "$srcdir"/svnserve.confd "$pkgdir"/etc/conf.d/svnserve } -md5sums="32014fe70397357fa1e0ef8f937a0232 subversion-1.6.1.tar.gz +md5sums="93f128306b11e1a1c64ff51338777952 subversion-1.6.2.tar.gz d084a7558053784886bc858b94fa9186 svnserve.confd 06cf9328f63a935654971052a2c3594a svnserve.initd bfd0d890c07830f1a6010891dd25fa5c subversion.pre-install" diff --git a/extra/udev/APKBUILD b/extra/udev/APKBUILD new file mode 100644 index 0000000000..d25b5faa49 --- /dev/null +++ b/extra/udev/APKBUILD @@ -0,0 +1,41 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=udev +pkgver=142 +pkgrel=0 +pkgdesc="The userspace dev tools (udev)" +url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" +license="GPL" +subpackages="$pkgname-dev $pkgname-doc" +depends="uclibc" +makedepends="" +install= +source="http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.bz2 + write_root_link_rule + move_tmp_persistent_rules.sh + udev-mount.initd + udev-postmount.initd + udev.initd" + +build () +{ + cd "$srcdir"/$pkgname-$pkgver + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --exec-prefix="" \ + --with-libdir-name=/lib + make || return 1 + make DESTDIR="$pkgdir" install + chmod +x "$pkgdir"/lib/udev/write_*_rules + for _i in write_root_link_rule move_tmp_persistent_rules.sh; do + install -Dm755 ../$_i "$pkgdir"/lib/udev/$_i + done + for _i in udev udev-mount udev-postmount; do + install -Dm755 ../$_i.initd "$pkgdir"/etc/init.d/$_i + done +} +md5sums="3edc4cf383dccb06d866c5156d59ddd5 udev-142.tar.bz2 +c9de7581099cdfdcd105666cd98a0f0a write_root_link_rule +7bf11e11519117f743483c73e0767750 move_tmp_persistent_rules.sh +12760065a66ccbddc9e3a86a6cd2231c udev-mount.initd +bffb42859ca508cfe1d9fa0a169ba810 udev-postmount.initd +e913f8f122e8879252d2a05de7dd7499 udev.initd" diff --git a/extra/udev/move_tmp_persistent_rules.sh b/extra/udev/move_tmp_persistent_rules.sh new file mode 100755 index 0000000000..1a0259798b --- /dev/null +++ b/extra/udev/move_tmp_persistent_rules.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +. /etc/init.d/functions.sh + +# store persistent-rules that got created while booting +# when / was still read-only +store_persistent_rules() { + local file dest + + for file in /dev/.udev/tmp-rules--*; do + dest=${file##*tmp-rules--} + [ "$dest" = '*' ] && break + type=${dest##70-persistent-} + type=${type%%.rules} + ebegin "Saving udev persistent ${type} rules to /etc/udev/rules.d" + cat "$file" >> /etc/udev/rules.d/"$dest" && rm -f "$file" + eend $? "Failed moving persistent rules!" + done +} + +store_persistent_rules + +# vim:ts=4 diff --git a/extra/udev/udev-mount.initd b/extra/udev/udev-mount.initd new file mode 100755 index 0000000000..839565a5ba --- /dev/null +++ b/extra/udev/udev-mount.initd @@ -0,0 +1,83 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Mount tmpfs on /dev" +[ -e /etc/conf.d/udev ] && . /etc/conf.d/udev + +mount_dev_directory() +{ + # No options are processed here as they should all be in /etc/fstab + ebegin "Mounting /dev" + if fstabinfo --quiet /dev; then + mount -n /dev + else + # Some devices require exec, Bug #92921 + mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" udev /dev + fi + eend $? +} + +seed_dev() +{ + # Seed /dev with some things that we know we need + + # creating /dev/console, /dev/tty and /dev/tty1 to be able to write + # to $CONSOLE with/without bootsplash before udevd creates it + [ -c /dev/console ] || mknod -m 600 /dev/console c 5 1 + [ -c /dev/tty1 ] || mknod -m 620 /dev/tty1 c 4 1 + [ -c /dev/tty ] || mknod -m 666 /dev/tty c 5 0 + + # udevd will dup its stdin/stdout/stderr to /dev/null + # and we do not want a file which gets buffered in ram + [ -c /dev/null ] || mknod -m 666 /dev/null c 1 3 + + # so udev can add its start-message to dmesg + [ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11 + + # copy over any persistant things + if [ -d /lib/udev/devices ]; then + cp -RPp /lib/udev/devices/* /dev 2>/dev/null + fi + + # Not provided by sysfs but needed + ln -snf /proc/self/fd /dev/fd + ln -snf fd/0 /dev/stdin + ln -snf fd/1 /dev/stdout + ln -snf fd/2 /dev/stderr + [ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core + + # Create problematic directories + mkdir -p /dev/pts /dev/shm + return 0 +} + + +start() +{ + # do not run this on too old baselayout - udev-addon is already loaded! + if [ ! -f /etc/init.d/sysfs ]; then + eerror "The $SVCNAME init-script is written for baselayout-2!" + eerror "Please do not use it with baselayout-1!". + return 1 + fi + + _start +} + +_start() +{ + mount_dev_directory || return 1 + + # Selinux lovin; /selinux should be mounted by selinux-patched init + if [ -x /sbin/restorecon -a -c /selinux/null ]; then + restorecon /dev > /selinux/null + fi + + # make sure it exists + mkdir -p /dev/.udev + + seed_dev + + return 0 +} diff --git a/extra/udev/udev-postmount.initd b/extra/udev/udev-postmount.initd new file mode 100755 index 0000000000..96beb845bb --- /dev/null +++ b/extra/udev/udev-postmount.initd @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/136/udev-postmount.initd,v 1.3 2009/02/23 16:30:53 zzam Exp $ + +depend() { + need localmount +} + +dir_writeable() +{ + mkdir "$1"/.test.$$ 2>/dev/null && rmdir "$1"/.test.$$ +} + +start() { + # check if this system uses udev + [ -d /dev/.udev/ ] || return 0 + + # only continue if rules-directory is writable + dir_writeable /etc/udev/rules.d || return 0 + + # store persistent-rules that got created while booting + # when / was still read-only + /lib/udev/move_tmp_persistent_rules.sh +} + +stop() { + : +} + +# vim:ts=4 diff --git a/extra/udev/udev-start.sh b/extra/udev/udev-start.sh new file mode 100644 index 0000000000..87c3a6ac93 --- /dev/null +++ b/extra/udev/udev-start.sh @@ -0,0 +1,51 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +[ -e /etc/conf.d/udev ] && . /etc/conf.d/udev + +compat_volume_nodes() +{ + # Only do this for baselayout-1* + # This check is likely to get false positives due to some multilib stuff, + # but that should not matter, as this can only happen on old openrc versions + # no longer available as ebuilds. + if [ ! -e /lib/librc.so ]; then + + # Create nodes that udev can't + [ -x /sbin/lvm ] && \ + /sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null + # Running evms_activate on a LiveCD causes lots of headaches + [ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \ + /sbin/evms_activate -q &>/dev/null + fi +} + +start_initd() +{ + ( + . /etc/init.d/"$1" + _start + ) +} + +# mount tmpfs on /dev +start_initd udev-mount || exit 1 + +# Create a file so that our rc system knows it's still in sysinit. +# Existance means init scripts will not directly run. +# rc will remove the file when done with sysinit. +# this is no longer needed as of openrc-0.4.0 +touch /dev/.rcsysinit + +# load device tarball +start_initd udev-dev-tarball + +# run udevd +start_initd udev || exit 1 + +compat_volume_nodes + +# inject into boot runlevel +IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>&1 + +# udev started successfully diff --git a/extra/udev/udev.initd b/extra/udev/udev.initd new file mode 100755 index 0000000000..26774ab4ac --- /dev/null +++ b/extra/udev/udev.initd @@ -0,0 +1,239 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Run udevd and create the device-nodes" + +[ -e /etc/udev/udev.conf ] && . /etc/udev/udev.conf + +rc_coldplug=${rc_coldplug:-${RC_COLDPLUG:-YES}} + +depend() +{ + provide dev + if yesno "${rc_device_tarball:-no}"; then + need sysfs udev-mount udev-dev-tarball + else + need sysfs udev-mount + fi + before checkfs fsck + + # udev does not work inside vservers + keyword novserver +} + +cleanup() +{ + # fail more gracely and not leave udevd running + start-stop-daemon --stop --exec /sbin/udevd + exit 1 +} + +disable_hotplug_agent() +{ + if [ -e /proc/sys/kernel/hotplug ]; then + echo "" >/proc/sys/kernel/hotplug + fi +} + +root_link() +{ + /lib/udev/write_root_link_rule +} + +rules_disable_switch() +{ + # this function disables rules files + # by creating new files with the same name + # in a temp rules directory with higher priority + local d=/dev/.udev/rules.d bname="$1" onoff="$2" + + if yesno "${onoff}"; then + mkdir -p "$d" + echo "# This file disables ${bname} due to /etc/conf.d/udev" \ + > "${d}/${bname}" + else + rm -f "${d}/${bname}" + fi +} + +start_udevd() +{ + # load unix domain sockets if built as module, Bug #221253 + if [ -e /proc/modules ] ; then + modprobe -q unix 2>/dev/null + fi + ebegin "Starting udevd" + start-stop-daemon --start --exec /sbin/udevd -- --daemon + eend $? +} + +# populate /dev with devices already found by the kernel +populate_dev() +{ + if get_bootparam "nocoldplug" ; then + rc_coldplug="NO" + ewarn "Skipping udev coldplug as requested in kernel cmdline" + fi + + ebegin "Populating /dev with existing devices through uevents" + if yesno "${rc_coldplug}"; then + udevadm trigger + else + # Do not run any init-scripts, Bug #206518 + udevadm control --env do_not_run_plug_service=1 + + # only create device nodes + udevadm trigger --attr-match=dev + + # run persistent-net stuff, bug 191466 + udevadm trigger --subsystem-match=net + fi + eend $? + + ebegin "Waiting for uevents to be processed" + udevadm settle --timeout=${udev_settle_timeout:-60} + eend $? + + udevadm control --env do_not_run_plug_service= + return 0 +} + +# for debugging +start_udevmonitor() +{ + yesno "${udev_monitor:-no}" || return 0 + + udevmonitor_log=/dev/.udev/udevmonitor.log + udevmonitor_pid=/dev/.udev/udevmonitor.pid + + einfo "udev: Running udevadm monitor ${udev_monitor_opts} to get a log of all events" + start-stop-daemon --start --stdout "${udevmonitor_log}" \ + --make-pidfile --pidfile "${udevmonitor_pid}" \ + --background --exec /sbin/udevadm -- monitor ${udev_monitor_opts} +} + +stop_udevmonitor() +{ + yesno "${udev_monitor:-no}" || return 0 + + if yesno "${udev_monitor_keep_running:-no}"; then + ewarn "udev: udevmonitor is still running and writing into ${udevmonitor_log}" + else + einfo "udev: Stopping udevmonitor: Log is in ${udevmonitor_log}" + start-stop-daemon --stop --pidfile "${udevmonitor_pid}" --exec /sbin/udevadm + fi +} + +display_hotplugged_services() { + local svcfile= svc= services= + for svcfile in "${RC_SVCDIR}"/hotplugged/*; do + svc="${svcfile##*/}" + [ -x "${svcfile}" ] || continue + + # do not display this - better: do only inject it later :) + [ "$svc" = "udev-postmount" ] && continue + + services="${services} ${svc}" + done + [ -n "${services}" ] && einfo "Device initiated services:${HILITE}${services}${NORMAL}" +} + +inject_postmount_initd() { + if ! mark_service_hotplugged udev-postmount; then + IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>&1 + fi + #einfo "Injected udev-postmount service" +} + +check_persistent_net() +{ + # check if there are problems with persistent-net + local syspath= devs= problem=false + for syspath in /sys/class/net/*_rename*; do + if [ -d "${syspath}" ]; then + devs="${devs} ${syspath##*/}" + problem=true + fi + done + + ${problem} || return 0 + + eerror "UDEV: Your system has a problem assigning persistent names" + eerror "to these network interfaces: ${devs}" + + einfo "Checking persistent-net rules:" + # the sed-expression lists all duplicate lines + # from the input, like "uniq -d" does, but uniq + # is installed into /usr/bin and not available at boot. + dups=$( + RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' + . /lib/udev/rule_generator.functions + find_all_rules 'NAME=' '.*' | \ + tr ' ' '\n' | \ + sort | \ + sed '$!N; s/^\(.*\)\n\1$/\1/; t; D' + ) + if [ -n "${dups}" ]; then + ewarn "The rules create multiple entries assigning these names:" + eindent + ewarn "${dups}" + eoutdent + else + ewarn "Found no duplicate names in persistent-net rules," + ewarn "there must be some other problem!" + fi + return 1 +} + +check_udev_works() +{ + # should exist on every system, else udev failed + if [ ! -e /dev/zero ]; then + eerror "Assuming udev failed somewhere, as /dev/zero does not exist." + return 1 + fi + return 0 +} + +start() +{ + # do not run this on old baselayout where udev-addon gets loaded + if [ ! -f /etc/init.d/sysfs ]; then + eerror "The $SVCNAME init-script is written for baselayout-2!" + eerror "Please do not use it with baselayout-1!". + return 1 + fi + + _start + + display_hotplugged_services + + inject_postmount_initd +} + +_start() +{ + root_link + rules_disable_switch 75-persistent-net-generator.rules "${persistent_net_disable:-no}" + rules_disable_switch 75-cd-aliases-generator.rules ${persistent_cd_disable:-no} + + disable_hotplug_agent + start_udevd || cleanup + start_udevmonitor + populate_dev || cleanup + + check_persistent_net + + check_udev_works || cleanup + stop_udevmonitor + + return 0 +} + +stop() { + ebegin "Stopping udevd" + start-stop-daemon --stop --exec /sbin/udevd + eend $? +} + diff --git a/extra/udev/write_root_link_rule b/extra/udev/write_root_link_rule new file mode 100755 index 0000000000..8eaea11769 --- /dev/null +++ b/extra/udev/write_root_link_rule @@ -0,0 +1,29 @@ +#!/bin/sh +# +# This script should run before doing udevtrigger at boot. +# It will create a rule matching the device directory / is on, and +# creating /dev/root symlink pointing on its device node. +# +# This is especially useful for hal looking at /proc/mounts containing +# a line listing /dev/root as device: +# /dev/root / reiserfs rw 0 0 +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation version 2 of the License. +# +# (c) 2007-2008 Matthias Schwarzott <zzam@gentoo.org> + +eval $(udevadm info --export --export-prefix="ROOT_" --device-id-of-file=/) + +[ $? = 0 ] || exit 0 +[ "$ROOT_MAJOR" = 0 ] && exit 0 + +DIR=/dev/.udev/rules.d +[ -d "$DIR" ] || mkdir -p "$DIR" +RULES=$DIR/10-root-link.rules + +echo "# Created by /lib/udev/write_root_link_rule" > "${RULES}" +echo "# This rule should create /dev/root as link to real root device." >> "${RULES}" +echo "SUBSYSTEM==\"block\", ENV{MAJOR}==\"$ROOT_MAJOR\", ENV{MINOR}==\"$ROOT_MINOR\", SYMLINK+=\"root\"" >> "${RULES}" + diff --git a/extra/usbutils/APKBUILD b/extra/usbutils/APKBUILD new file mode 100644 index 0000000000..1f46e09000 --- /dev/null +++ b/extra/usbutils/APKBUILD @@ -0,0 +1,24 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=usbutils +pkgver=0.82 +pkgrel=0 +pkgdesc="USB Device Utilities" +url="http://linux-usb.sourceforge.net/" +license="GPL" +subpackags="$pkgname-doc" +depends="uclibc libusb" +makedepends="pkgconfig libusb-compat-dev" +source="http://downloads.sourceforge.net/sourceforge/linux-usb/$pkgname-$pkgver.tar.gz" + +build () +{ + cd "$srcdir"/$pkgname-$pkgver + rm usb.ids + wget http://www.linux-usb.org/usb.ids + ./configure --prefix=/usr \ + --datadir=/usr/share/hwdata \ + --disable-zlib + make || return 1 + make DESTDIR="$pkgdir" install +} +md5sums="6e393cc7423b5d228fa3d34c21481ae4 usbutils-0.82.tar.gz" |
