diff options
author | root <root@rshg054.dnsready.net> | 2013-04-19 01:05:57 -0700 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-04-19 01:05:57 -0700 |
commit | 1fedf1f5d5351aefd88268cba7353c79adac9b8a (patch) | |
tree | 513a073013b058d237750fe3214cd466cbeaf1b6 /extra/dnsmasq | |
parent | 55c3b92ede6a3b9eb17f254b338931f01a3ea5c6 (diff) |
Fri Apr 19 01:05:57 PDT 2013
Diffstat (limited to 'extra/dnsmasq')
-rw-r--r-- | extra/dnsmasq/0001-Fix-wrong-size-in-memset-call.patch | 26 | ||||
-rw-r--r-- | extra/dnsmasq/PKGBUILD | 28 | ||||
-rw-r--r-- | extra/dnsmasq/dnsmasq.confd | 9 | ||||
-rwxr-xr-x | extra/dnsmasq/rc.dnsmasq | 64 |
4 files changed, 40 insertions, 87 deletions
diff --git a/extra/dnsmasq/0001-Fix-wrong-size-in-memset-call.patch b/extra/dnsmasq/0001-Fix-wrong-size-in-memset-call.patch new file mode 100644 index 000000000..05223cdb2 --- /dev/null +++ b/extra/dnsmasq/0001-Fix-wrong-size-in-memset-call.patch @@ -0,0 +1,26 @@ +From 71aaad9f663efda7032e27c201a7025ff6332a2d Mon Sep 17 00:00:00 2001 +From: Simon Kelley <simon@thekelleys.org.uk> +Date: Thu, 18 Apr 2013 09:47:49 +0100 +Subject: [PATCH] Fix wrong size in memset() call. + +Thanks to Dave Reisner. +--- + src/ipset.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ipset.c b/src/ipset.c +index a34ed96..f175fa4 100644 +--- a/src/ipset.c ++++ b/src/ipset.c +@@ -110,7 +110,7 @@ static int new_add_to_ipset(const char *setname, const struct all_addr *ipaddr, + return -1; + } + +- memset(buffer, 0, sizeof(buffer)); ++ memset(buffer, 0, BUFF_SZ); + + nlh = (struct nlmsghdr *)buffer; + nlh->nlmsg_len = NL_ALIGN(sizeof(struct nlmsghdr)); +-- +1.8.2.1 + diff --git a/extra/dnsmasq/PKGBUILD b/extra/dnsmasq/PKGBUILD index 09757a55a..38accba08 100644 --- a/extra/dnsmasq/PKGBUILD +++ b/extra/dnsmasq/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 173229 2012-12-14 17:31:42Z dreisner $ +# $Id: PKGBUILD 183176 2013-04-18 12:45:45Z dreisner $ # Maintainer: Dave Reisner <dreisner@archlinux.org> # Contributor: Paul Mattal <paul@archlinux.org> # Contributor: Tom Newsom <Jeepster@gmx.co.uk> pkgname=dnsmasq -pkgver=2.65 +pkgver=2.66 pkgrel=1 pkgdesc="Lightweight, easy to configure DNS forwarder and DHCP server" url="http://www.thekelleys.org.uk/dnsmasq/doc.html" @@ -12,17 +12,20 @@ arch=('i686' 'x86_64') license=('GPL') depends=('glibc' 'dbus-core') install=$pkgname.install -backup=('etc/dnsmasq.conf' - 'etc/conf.d/dnsmasq') -source=("http://www.thekelleys.org.uk/$pkgname/$pkgname-$pkgver.tar.gz" - 'dnsmasq.confd' - 'rc.dnsmasq' +backup=('etc/dnsmasq.conf') +source=("http://www.thekelleys.org.uk/$pkgname/$pkgname-$pkgver.tar.xz" + '0001-Fix-wrong-size-in-memset-call.patch' 'dnsmasq.service') -md5sums=('a91534a5d6f053d5c80f67ef502afa34' - '66479e99123faeab83ebaed709ef95b5' - '819fbdf6440d710616e6df5f8ca9cdba' +md5sums=('cd1c70dd66d2e3ad02b66ca6af4ebf20' + '05ccefefde68ebdebce5e40d2b3c78be' '7ac45726cabef4145db40d758cc7fedf') +prepare() { + cd "$pkgname-$pkgver" + + patch -Np1 <"$srcdir/0001-Fix-wrong-size-in-memset-call.patch" +} + build() { cd "$pkgname-$pkgver" @@ -30,7 +33,7 @@ build() { # compile time opts report properly on startup. yuck. sed -i '/^#ifdef DNSMASQ_COMPILE_OPTS/ i#define HAVE_DBUS' src/config.h - make + make "CFLAGS=$CPPFLAGS $CFLAGS" "LDFLAGS=$LDFLAGS" } package() { @@ -38,9 +41,6 @@ package() { make BINDIR=/usr/bin PREFIX=/usr DESTDIR="$pkgdir" install - install -Dm755 "$srcdir"/rc.dnsmasq "$pkgdir"/etc/rc.d/dnsmasq - install -Dm644 "$srcdir"/dnsmasq.confd "$pkgdir/etc/conf.d/dnsmasq" - install -Dm644 "dbus/dnsmasq.conf" "$pkgdir"/etc/dbus-1/system.d/dnsmasq.conf install -Dm644 "dnsmasq.conf.example" "$pkgdir"/etc/dnsmasq.conf install -Dm644 "$srcdir/dnsmasq.service" "$pkgdir"/usr/lib/systemd/system/dnsmasq.service diff --git a/extra/dnsmasq/dnsmasq.confd b/extra/dnsmasq/dnsmasq.confd deleted file mode 100644 index 933b92850..000000000 --- a/extra/dnsmasq/dnsmasq.confd +++ /dev/null @@ -1,9 +0,0 @@ -# -# runtime config for dnsmasq -# - -# if unset, dnsmasq will run as nobody. -DNSMASQ_USER=dnsmasq - -# other runtime options. treated as an array. -DNSMASQ_OPTS=() diff --git a/extra/dnsmasq/rc.dnsmasq b/extra/dnsmasq/rc.dnsmasq deleted file mode 100755 index 4030c2896..000000000 --- a/extra/dnsmasq/rc.dnsmasq +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/dnsmasq - -checkconfig() { - local testout - - if ! testout=$(/usr/bin/dnsmasq --test 2>&1); then - echo "$testout" - return 1 - fi - - return 0 -} - -pidfile=/run/dnsmasq.pid -if [[ -r $pidfile ]]; then - read -r PID < "$pidfile" - if [[ ! -d /proc/$PID ]]; then - # stale pidfile - unset PID - rm -f "$pidfile" - fi -fi - -case $1 in - start) - stat_busy "Starting DNS/DHCP daemon" - if [[ -z $PID ]] && checkconfig && - /usr/bin/dnsmasq "--user=${DNSMASQ_USER:-nobody}" \ - "--pid-file=$pidfile" \ - "${DNSMASQ_OPTS[@]}"; then - add_daemon dnsmasq - stat_done - else - stat_fail - fi - ;; - stop) - stat_busy "Stopping DNS/DHCP daemon" - if [[ $PID ]] && kill "$PID" &> /dev/null; then - # dnsmasq doesn't clean up after itself - rm -f "$pidfile" - rm_daemon dnsmasq - stat_done - else - stat_fail - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - checkconfig) - # diagnostics will be printed, with zero/non-zero exit - /usr/bin/dnsmasq --test - ;; - *) - echo "usage: $0 <start|stop|restart|checkconfig>" -esac - |