diff options
author | Jonathon Fernyhough | 2021-07-31 19:44:01 +0100 |
---|---|---|
committer | Jonathon Fernyhough | 2021-07-31 19:44:01 +0100 |
commit | 130fbfbdc71090a7b270f456c52812b189250484 (patch) | |
tree | 77f858841339d283353225f880c315d7c002c91e | |
parent | 15f0afabb0faf8ab8f35ccc1cbe4e13895fe4b58 (diff) | |
download | aur-130fbfbdc71090a7b270f456c52812b189250484.tar.gz |
Include some fix PRs
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 34 | ||||
-rw-r--r-- | fix-crasher.patch | 86 |
3 files changed, 26 insertions, 101 deletions
@@ -1,6 +1,6 @@ pkgbase = trickle-git pkgdesc = Lightweight userspace bandwidth shaper - pkgver = latest + pkgver = r23.09a1d95 pkgrel = 2 url = https://github.com/mariusae/trickle arch = i686 @@ -16,8 +16,11 @@ pkgbase = trickle-git conflicts = trickle source = git+https://github.com/mariusae/trickle.git source = remove-libtrickle.patch + source = https://github.com/mariusae/trickle/pull/28/commits/4171f1716eb2e37d36fb9189800c53b83723569d.patch + source = https://github.com/mariusae/trickle/pull/29/commits/29de2a4704d9843d3c6cba1d4a4ac177f2d6e568.patch sha256sums = SKIP sha256sums = 7e148c9526dbd6667c94ce3ee4f1a1fd550e61ab185735939c4d5312cf13b7a1 + sha256sums = dfffeb04a403e7eeb67e0fd5e611f2e428569b68139324fe7af8dee7e7b7cacb + sha256sums = 0b5ae4357c8b383b30235172a10b673eb2bfa5d640cfe86dd0b890d0d8c3dcc0 pkgname = trickle-git - @@ -3,7 +3,7 @@ # Contributor: Romain Bouchaud-Leduc <r0m1.bl@camaris.org> pkgname=trickle-git -pkgver=latest +pkgver=r23.09a1d95 pkgrel=2 pkgdesc="Lightweight userspace bandwidth shaper" arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') @@ -13,13 +13,17 @@ depends=('libevent' 'libtirpc') makedepends=('git') provides=("${pkgname/-git/}") conflicts=("${pkgname/-git/}") -source=("git+https://github.com/mariusae/trickle.git" - 'remove-libtrickle.patch') +source=("git+$url.git" + "remove-libtrickle.patch" + "$url/pull/28/commits/4171f1716eb2e37d36fb9189800c53b83723569d.patch" + "$url/pull/29/commits/29de2a4704d9843d3c6cba1d4a4ac177f2d6e568.patch") sha256sums=('SKIP' - '7e148c9526dbd6667c94ce3ee4f1a1fd550e61ab185735939c4d5312cf13b7a1') + '7e148c9526dbd6667c94ce3ee4f1a1fd550e61ab185735939c4d5312cf13b7a1' + 'dfffeb04a403e7eeb67e0fd5e611f2e428569b68139324fe7af8dee7e7b7cacb' + '0b5ae4357c8b383b30235172a10b673eb2bfa5d640cfe86dd0b890d0d8c3dcc0') pkgver() { - cd "${srcdir}/${pkgname/-git/}" + cd ${pkgname/-git/} # https://wiki.archlinux.org/index.php/VCS_package_guidelines#The_pkgver.28.29_function ( set -o pipefail git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || @@ -28,28 +32,32 @@ pkgver() { } prepare() { - cd "${srcdir}/${pkgname/-git/}" + cd ${pkgname/-git/} # https://github.com/mariusae/trickle/issues/16 - patch -Np1 -i "${srcdir}/remove-libtrickle.patch" + patch -Np1 -i ../remove-libtrickle.patch + + # Fix rpc support, https://github.com/mariusae/trickle/pull/28 + patch -Np1 -i ../4171f1716eb2e37d36fb9189800c53b83723569d.patch + + # Use $libdir for preload object lookup, https://github.com/mariusae/trickle/pull/29 + patch -Np1 -i ../29de2a4704d9843d3c6cba1d4a4ac177f2d6e568.patch } build() { - cd "${srcdir}/${pkgname/-git/}" - - CPPFLAGS+=" -I/usr/include/tirpc/" - LDFLAGS+=" -ltirpc" + cd ${pkgname/-git/} autoreconf -if ./configure --prefix=/usr \ --mandir=/usr/share/man + sed -i "s|.*in_addr_t.*||g" config.h make -j1 } package() { - cd "${srcdir}/${pkgname/-git/}" + cd ${pkgname/-git/} make DESTDIR="${pkgdir}" install - install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 -t "${pkgdir}"/usr/share/licenses/${pkgname}/ LICENSE } diff --git a/fix-crasher.patch b/fix-crasher.patch deleted file mode 100644 index c660f1ad1ea1..000000000000 --- a/fix-crasher.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff --git a/trickle-overload.c b/trickle-overload.c -index e72eb0c..9254e89 100644 ---- a/trickle-overload.c -+++ b/trickle-overload.c -@@ -393,18 +393,14 @@ struct _pollfd { - } - - static struct delay * --select_shift(struct delayhead *dhead, struct timeval *inittv, -+select_shift(struct delayhead *dhead, struct timeval *difftv, - struct timeval **delaytv) - { -- struct timeval curtv, difftv; - struct delay *d; - struct sockdesc *sd; - -- gettimeofday(&curtv, NULL); -- timersub(&curtv, inittv, &difftv); -- - TAILQ_FOREACH(d, dhead, next) { -- if (timercmp(&d->delaytv, &difftv, >)) -+ if (timercmp(&d->delaytv, difftv, >)) - break; - sd = d->sd; - -@@ -413,7 +409,7 @@ struct _pollfd { - } - - if (d != NULL) -- timersub(&d->delaytv, &difftv, *delaytv); -+ timersub(&d->delaytv, difftv, *delaytv); - else - *delaytv = NULL; - -@@ -431,8 +427,8 @@ struct _pollfd { - { - struct sockdesc *sd; - fd_set *fdsets[] = { wfds, rfds }, *fds; -- struct timeval *delaytv, *selecttv = NULL, *timeout = NULL, _timeout, -- inittv, curtv, difftv; -+ struct timeval *delaytv, _delaytv, *selecttv = NULL, *timeout = NULL, -+ _timeout, inittv, curtv, difftv; - short which; - struct delayhead dhead; - struct delay *d, *_d; -@@ -462,15 +458,18 @@ struct _pollfd { - FD_ISSET(sd->sock, fds) && - select_delay(&dhead, sd, which)) { - FD_CLR(sd->sock, fds); -- nfds--; - } - - gettimeofday(&inittv, NULL); - curtv = inittv; - d = TAILQ_FIRST(&dhead); -- delaytv = d != NULL ? &d->delaytv : NULL; -+ if (d != NULL) { -+ _delaytv = d->delaytv; -+ delaytv = &_delaytv; -+ } else -+ delaytv = NULL; -+ timersub(&curtv, &inittv, &difftv); - again: -- timersub(&inittv, &curtv, &difftv); - selecttv = NULL; - - if (delaytv != NULL) -@@ -498,15 +497,15 @@ struct _pollfd { - #endif /* DEBUG */ - - if (ret == 0 && delaytv != NULL && selecttv == delaytv) { -- _d = select_shift(&dhead, &inittv, &delaytv); -+ gettimeofday(&curtv, NULL); -+ timersub(&curtv, &inittv, &difftv); -+ _d = select_shift(&dhead, &difftv, &delaytv); - while ((d = TAILQ_FIRST(&dhead)) != _d) { - FD_SET(d->sd->sock, fdsets[d->which]); -- nfds++; - TAILQ_REMOVE(&dhead, d, next); - free(d); - } - -- gettimeofday(&curtv, NULL); - goto again; - } - |