diff options
-rw-r--r-- | core/linux-grsec/APKBUILD | 8 | ||||
-rw-r--r-- | core/linux-grsec/linux-grsec.post-install | 7 | ||||
l--------- | core/linux-grsec/linux-grsec.post-upgrade | 1 | ||||
-rw-r--r-- | extra/clamav/APKBUILD | 46 | ||||
-rw-r--r-- | extra/clamav/clamav.logrotate | 15 | ||||
-rw-r--r-- | extra/clamav/clamav.pre-upgrade | 16 | ||||
-rw-r--r-- | extra/clamav/clamd.confd | 9 | ||||
-rw-r--r-- | extra/clamav/clamd.initd | 38 | ||||
-rw-r--r-- | extra/clamav/freshclam.confd | 6 | ||||
-rw-r--r-- | extra/clamav/freshclam.initd | 36 | ||||
-rw-r--r-- | x11/gst-plugins-base/APKBUILD | 33 | ||||
-rw-r--r-- | x11/xfce4-mixer/APKBUILD | 26 | ||||
l--------- | x11/xfce4-mixer/xfce4-mixer.post-deinstall | 1 | ||||
-rw-r--r-- | x11/xfce4-mixer/xfce4-mixer.post-install | 4 | ||||
l--------- | x11/xfce4-mixer/xfce4-mixer.post-upgrade | 1 |
15 files changed, 211 insertions, 36 deletions
diff --git a/core/linux-grsec/APKBUILD b/core/linux-grsec/APKBUILD index 74f8eb6fa..0c0c447ab 100644 --- a/core/linux-grsec/APKBUILD +++ b/core/linux-grsec/APKBUILD @@ -4,11 +4,12 @@ _flavor=grsec pkgname=linux-${_flavor} pkgver=2.6.29.5 _kernver=2.6.29 -pkgrel=2 +pkgrel=3 pkgdesc="Linux kernel with grsecurity" url=http://grsecurity.net makedepends="perl installkernel" _config=${config:-kernelconfig} +install="$pkgname.post-install $pkgname.post-upgrade" source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-$pkgver.bz2 grsecurity-2.1.14-2.6.29.5-200906152045.patch @@ -16,6 +17,7 @@ source="ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$_kernver.tar.bz2 0002-linux-2.6.28.5-ipgre-optimize-hash-lookup.patch net-next-2.6.git-5ef12d98a19254ee5dc851bd83e214b43ec1f725.patch $_config + $install " subpackages="$pkgname-dev" license="GPL-2" @@ -115,4 +117,6 @@ e2e49a250303720b31c4371905c105e3 grsecurity-2.1.14-2.6.29.5-200906152045.patch 7673b4521283ad41434a18ca18b16ad8 0001-linux-2.6.28.5-ipgre-strict-binding.patch 8f405c738b150c532c46eaad5390cca2 0002-linux-2.6.28.5-ipgre-optimize-hash-lookup.patch ca05fd252783b82e01610e775cf56498 net-next-2.6.git-5ef12d98a19254ee5dc851bd83e214b43ec1f725.patch -c9443dcc46eb70267b4cfe6a6694f637 kernelconfig" +c9443dcc46eb70267b4cfe6a6694f637 kernelconfig +2834240b15805b248ef2a973b1ad4416 linux-grsec.post-install +2834240b15805b248ef2a973b1ad4416 linux-grsec.post-upgrade" diff --git a/core/linux-grsec/linux-grsec.post-install b/core/linux-grsec/linux-grsec.post-install new file mode 100644 index 000000000..626046f64 --- /dev/null +++ b/core/linux-grsec/linux-grsec.post-install @@ -0,0 +1,7 @@ +#!/bin/sh + +# strip pkgrel from version +ver=${1%-r[0-9]} + +mkinitfs $ver-grsec + diff --git a/core/linux-grsec/linux-grsec.post-upgrade b/core/linux-grsec/linux-grsec.post-upgrade new file mode 120000 index 000000000..1e3bdc853 --- /dev/null +++ b/core/linux-grsec/linux-grsec.post-upgrade @@ -0,0 +1 @@ +linux-grsec.post-install
\ No newline at end of file diff --git a/extra/clamav/APKBUILD b/extra/clamav/APKBUILD index 7972c549d..19b9ef440 100644 --- a/extra/clamav/APKBUILD +++ b/extra/clamav/APKBUILD @@ -2,13 +2,13 @@ # Maintainer: Carlo Landmeter <clandmeter at gmail> pkgname=clamav pkgver=0.95.1 -pkgrel=0 +pkgrel=1 pkgdesc="An anti-virus toolkit for UNIX" url="http://www.clamav.net/" license="GPL" -depends="zlib gmp" -install="$pkgname.pre-install $pkgname.post-install" -makedepends="gmp-dev zlib-dev" +depends="logrotate" +install="$pkgname.pre-install $pkgname.post-install $pkgname.pre-upgrade" +makedepends="ncurses-dev zlib-dev" subpackages="$pkgname-doc $pkgname-dev" source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz clamd.initd @@ -16,6 +16,7 @@ source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz freshclam.initd freshclam.confd clamav-0.95.1-nls.patch + clamav.logrotate $install" build() { @@ -24,25 +25,48 @@ build() { patch -p0 -i "$srcdir/clamav-0.95.1-nls.patch" || return 1 ./configure --prefix=/usr \ - --sysconfdir=/etc \ + --sysconfdir=/etc/clamav \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ - --disable-clamav + --without-iconv make || return 1 make DESTDIR="$pkgdir" install + # Change /etc/clamd.conf to be usable out of the box + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/clamd.pid:" \ + -e "s:.*\(LocalSocket\) .*:\1 /var/run/clamav/clamd.sock:" \ + -e "s:.*\(User\) .*:\1 clamav:" \ + -e "s:^\#\(LogFile\) .*:\1 /var/log/clamav/clamd.log:" \ + -e "s:^\#\(LogTime\).*:\1 yes:" \ + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ + "$pkgdir"/etc/clamav/clamd.conf + + # Do the same for /etc/freshclam.conf + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/freshclam.pid:" \ + -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \ + -e "s:^\#\(UpdateLogFile\) .*:\1 /var/log/clamav/freshclam.log:" \ + -e "s:^\#\(NotifyClamd\).*:\1 /etc/clamav/clamd.conf:" \ + -e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \ + -e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \ + "$pkgdir"/etc/clamav/freshclam.conf + install -m755 -D "$srcdir"/clamd.initd "$pkgdir"/etc/init.d/clamd install -m644 -D "$srcdir"/clamd.confd "$pkgdir"/etc/conf.d/clamd install -m755 -D "$srcdir"/freshclam.initd "$pkgdir"/etc/init.d/freshclam install -m644 -D "$srcdir"/freshclam.confd "$pkgdir"/etc/conf.d/freshclam + install -m644 -D "$srcdir"/clamav.logrotate "$pkgdir"/etc/logrotate.d/clamav mkdir -p "$pkgdir"/var/run/clamav "$pkgdir"/var/log/clamav } md5sums="c802d4b372e455849cfcb0d776fc72d8 clamav-0.95.1.tar.gz -04f32738c037c96c3fd2c4fa7781fc7a clamd.initd -e84205681f64c07af9ec5b6a3dd8bc38 clamd.confd -fe3cfca9e1355183117936bea6fc6783 freshclam.initd -e84205681f64c07af9ec5b6a3dd8bc38 freshclam.confd +adbbfa835f9dea213289719d983f1600 clamd.initd +567bc32b657dd7031b9b7beaa946203a clamd.confd +f43b987a0c37e6576face04a830263ac freshclam.initd +e48466ddfb56f66c623b83e58777b778 freshclam.confd 0d08fd29656bd4b018ecf8ce9706ac55 clamav-0.95.1-nls.patch +dffa5af2e7a563fc00fcd52ec4c02347 clamav.logrotate 275e05587e2da782781829a1862d57b1 clamav.pre-install -ec4d600097a15e64dfb714e7739a1804 clamav.post-install" +ec4d600097a15e64dfb714e7739a1804 clamav.post-install +c9e80578c6e82d6154bc91f18dfd23ea clamav.pre-upgrade" diff --git a/extra/clamav/clamav.logrotate b/extra/clamav/clamav.logrotate new file mode 100644 index 000000000..757442841 --- /dev/null +++ b/extra/clamav/clamav.logrotate @@ -0,0 +1,15 @@ +/var/log/clamav/clamd.log { + missingok + postrotate + /etc/init.d/clamd logfix + /bin/kill -HUP `cat /var/run/clamav/clamd.pid 2> /dev/null` 2>/dev/null || true + endscript +} + +/var/log/clamav/freshclam.log { + missingok + postrotate + /etc/init.d/freshclam logfix + /bin/kill -HUP `cat /var/run/clamav/freshclam.pid 2> /dev/null` 2>/dev/null || true + endscript +} diff --git a/extra/clamav/clamav.pre-upgrade b/extra/clamav/clamav.pre-upgrade new file mode 100644 index 000000000..9956f95d6 --- /dev/null +++ b/extra/clamav/clamav.pre-upgrade @@ -0,0 +1,16 @@ +#!/bin/sh + +# make sure we don't lose our config +mkdir -p /etc/clamav +if [ -f /etc/clamav.conf ]; then + mv /etc/clamav.conf /etc/clamav/ + ln -s clamav/clamav.conf /etc/clamav.conf +fi + +if [ -f /etc/freshclam.conf ]; then + mv /etc/freshclam.conf /etc/clamav/ + ln -s clamav/freshclam.conf /etc/freshclam.conf +fi + +exit 0 + diff --git a/extra/clamav/clamd.confd b/extra/clamav/clamd.confd index 8d08b6868..bc8072aea 100644 --- a/extra/clamav/clamd.confd +++ b/extra/clamav/clamd.confd @@ -1,5 +1,6 @@ -# -# Specify daemon $OPTS here. -# -OPTS="" +CLAMD_NICELEVEL=0 + +# make sure we also start freshclam +# comment out if you dont want start freshclam +rc_need="freshclam" diff --git a/extra/clamav/clamd.initd b/extra/clamav/clamd.initd index 8aad87fb6..d3b915557 100644 --- a/extra/clamav/clamd.initd +++ b/extra/clamav/clamd.initd @@ -1,25 +1,32 @@ #!/sbin/runscript -# Sample init.d file for alpine linux. - +opts="logfix reload" NAME=clamd -DAEMON=/usr/sbin/$NAME +CONF=/etc/clamav/clamd.conf depend() { need net + provide antivirus } start() { + local clamd_socket=$(awk '$1 == "LocalSocket" { print $2 }' $CONF) + + logfix + + if [ -S "${clamd_socket:=/tmp/clamd}" ]; then + rm -f ${clamd_socket} + fi ebegin "Starting ${NAME}" - start-stop-daemon --start --quiet --background \ - --exec ${DAEMON} -- ${OPTS} - eend $? + start-stop-daemon --start --quiet \ + --nicelevel ${CLAMD_NICELEVEL:-0} \ + --exec /usr/sbin/clamd + eend $? "Failed to start ${NAME}" } stop() { ebegin "Stopping ${NAME}" - start-stop-daemon --stop --quiet \ - --exec ${DAEMON} --name $NAME \ + start-stop-daemon --stop --quiet --exec /usr/sbin/clamd eend $? } @@ -30,7 +37,20 @@ reload() { return 1 fi start-stop-daemon --stop --oknodo --signal HUP \ - --exec ${DAEMON} --name $NAME + --exec /usr/sbin/clamd eend $? } +logfix() { + # fix clamd log permissions + # (might be clobbered by logrotate or something) + local logfile=`awk '$1 == "LogFile" { print $2 }' $CONF` + local clamav_user=`awk '$1 == "User" { print $2 }' $CONF` + if [ -n "${logfile}" ] && [ -n "${clamav_user}" ]; then + if [ ! -f "${logfile}" ]; then + touch ${logfile} + fi + chown ${clamav_user} ${logfile} + chmod 640 ${logfile} + fi +} diff --git a/extra/clamav/freshclam.confd b/extra/clamav/freshclam.confd index 8d08b6868..17559037d 100644 --- a/extra/clamav/freshclam.confd +++ b/extra/clamav/freshclam.confd @@ -1,5 +1,3 @@ -# -# Specify daemon $OPTS here. -# -OPTS="" +FRESHCLAM_NICELEVEL=0 + diff --git a/extra/clamav/freshclam.initd b/extra/clamav/freshclam.initd index e4643bc60..7961c7f80 100644 --- a/extra/clamav/freshclam.initd +++ b/extra/clamav/freshclam.initd @@ -1,23 +1,32 @@ #!/sbin/runscript +opts="logfix reload" + NAME=freshclam DAEMON=/usr/bin/$NAME +CONF=/etc/clamav/freshclam.conf depend() { need net } start() { - ebegin "Starting ${NAME}" - start-stop-daemon --start --quiet --background \ - --exec ${DAEMON} -- -d ${OPTS} - eend $? + ebegin "Starting freshclam" + start-stop-daemon --start --quiet \ + --nicelevel ${FRESHCLAM_NICELEVEL:-0} \ + --exec /usr/bin/freshclam -- -d + retcode=$? + if [ ${retcode} = 1 ]; then + eend 0 + einfo "Virus databases are already up to date." + else + eend ${retcode} "Failed to start freshclam" + fi } stop() { ebegin "Stopping ${NAME}" - start-stop-daemon --stop --quiet \ - --exec ${DAEMON} --name $NAME \ + start-stop-daemon --stop --quiet --name ${NAME} eend $? } @@ -32,3 +41,18 @@ reload() { eend $? } + +logfix() { + # fix freshclam log permissions + # (might be clobbered by logrotate or something) + logfile=$(awk '$1 == "UpdateLogFile" { print $2 }' $CONF) + local freshclam_user=$(awk '$1 == "DatabaseOwner" { print $2 }' $CONF) + if [ -n "${logfile}" -a -n "${clamav_user}" ]; then + if [ ! -f "${logfile}" ]; then + touch ${logfile} + fi + chown ${freshclam_user} ${logfile} + chmod 640 ${logfile} + fi +} + diff --git a/x11/gst-plugins-base/APKBUILD b/x11/gst-plugins-base/APKBUILD new file mode 100644 index 000000000..5e1896776 --- /dev/null +++ b/x11/gst-plugins-base/APKBUILD @@ -0,0 +1,33 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=gst-plugins-base +pkgver=0.10.23 +pkgrel=0 +pkgdesc="GStreamer Multimedia Framework Base Plugins" +url="http://gstreamer.freedesktop.org/" +license="GPL LGPL" +subpackages="$pkgname-dev $pkgname-doc" +depends= +makedepends="pkgconfig gstreamer-dev alsa-lib-dev libvorbis-dev liboil-dev + perl libogg-dev gtk+-dev libtheora-dev libice-dev libsm-dev libxv-dev + e2fsprogs-dev expat-dev" +# cdparanoia>=10.2 libvisual libtheora" +source="http://gstreamer.freedesktop.org/src/$pkgname/$pkgname-$pkgver.tar.bz2" + +depends_dev="gstreamer-dev" + +build () +{ + cd "$srcdir"/$pkgname-$pkgver + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --disable-experimental \ + --with-package-name="GStreamer Base Plugins (Alpine Linux)" \ + --with-package-origin="http://www.alpinelinux.org/" \ + || return 1 + make || return 1 + make DESTDIR="$pkgdir" install || return 1 +} + +md5sums="641cc7def2d8667b9b4df15e69dba25f gst-plugins-base-0.10.23.tar.bz2" diff --git a/x11/xfce4-mixer/APKBUILD b/x11/xfce4-mixer/APKBUILD new file mode 100644 index 000000000..633f397d1 --- /dev/null +++ b/x11/xfce4-mixer/APKBUILD @@ -0,0 +1,26 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=xfce4-mixer +pkgver=4.6.1 +pkgrel=0 +pkgdesc="The volume control plugin for the Xfce panel" +url="http://www.xfce.org/" +license="GPL2" +depends="hicolor-icon-theme" +makedepends="pkgconfig xfce4-panel-dev gstreamer-dev intltool + gst-plugins-base-dev expat-dev libsm-dev e2fsprogs-dev" +install=xfce4-mixer.install +source="http://www.xfce.org/archive/xfce-$pkgver/src/$pkgname-$pkgver.tar.bz2" + +build () +{ + cd "$srcdir"/$pkgname-$pkgver + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --libexecdir=/usr/lib \ + --localstatedir=/var \ + --disable-static \ + --with-sound=alsa || return 1 + make || return 1 + make DESTDIR="$pkgdir" install || return 1 +} +md5sums="a99e2455445480ef5081fe69454a46fc xfce4-mixer-4.6.1.tar.bz2" diff --git a/x11/xfce4-mixer/xfce4-mixer.post-deinstall b/x11/xfce4-mixer/xfce4-mixer.post-deinstall new file mode 120000 index 000000000..59bfac9d7 --- /dev/null +++ b/x11/xfce4-mixer/xfce4-mixer.post-deinstall @@ -0,0 +1 @@ +xfce4-mixer.post-install
\ No newline at end of file diff --git a/x11/xfce4-mixer/xfce4-mixer.post-install b/x11/xfce4-mixer/xfce4-mixer.post-install new file mode 100644 index 000000000..c523d78da --- /dev/null +++ b/x11/xfce4-mixer/xfce4-mixer.post-install @@ -0,0 +1,4 @@ +#!/bin/sh + +gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + diff --git a/x11/xfce4-mixer/xfce4-mixer.post-upgrade b/x11/xfce4-mixer/xfce4-mixer.post-upgrade new file mode 120000 index 000000000..59bfac9d7 --- /dev/null +++ b/x11/xfce4-mixer/xfce4-mixer.post-upgrade @@ -0,0 +1 @@ +xfce4-mixer.post-install
\ No newline at end of file |