Open perpetuallyhorni opened 1 month ago
my PKGBUILD:
# Maintainer: Jonathon Fernyhough <jonathon at+m2x dev>
# Contributor: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Romain Bouchaud-Leduc <r0m1.bl@camaris.org>
pkgname=trickle-git
pkgver=r23.09a1d95
pkgrel=3
pkgdesc="Lightweight userspace bandwidth shaper"
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/mariusae/trickle"
license=('BSD')
depends=('libevent' 'libtirpc')
makedepends=('git')
provides=("${pkgname/-git/}")
conflicts=("${pkgname/-git/}")
source=("git+$url.git"
"remove-libtrickle.patch"
"fix-trickle-overload.patch"
"$url/pull/28/commits/4171f1716eb2e37d36fb9189800c53b83723569d.patch"
"$url/pull/29/commits/29de2a4704d9843d3c6cba1d4a4ac177f2d6e568.patch"
trickle-gcc14.patch)
sha256sums=('SKIP'
'7e148c9526dbd6667c94ce3ee4f1a1fd550e61ab185735939c4d5312cf13b7a1'
'd3f91fa4b05777c936cb95fbfee04b5955e366755e682368e626d004f07d9c75'
'dfffeb04a403e7eeb67e0fd5e611f2e428569b68139324fe7af8dee7e7b7cacb'
'0b5ae4357c8b383b30235172a10b673eb2bfa5d640cfe86dd0b890d0d8c3dcc0'
'07614e2a07ab61e95572da44b22b7a05b14d958ec62f4c400f7527104ff3492f')
pkgver() {
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' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
prepare() {
cd ${pkgname/-git/}
# https://github.com/mariusae/trickle/issues/16
patch -Np1 -i ../remove-libtrickle.patch
# https://aur.archlinux.org/packages/trickle-git#comment-885736
# https://github.com/mariusae/trickle/pull/29
patch -Np1 -i ../fix-trickle-overload.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
patch -Np1 -i ../trickle-gcc14.patch
autoconf
}
build() {
cd ${pkgname/-git/}
autoreconf -if
./configure --prefix=/usr \
--mandir=/usr/share/man
make -j1
}
package() {
cd ${pkgname/-git/}
make DESTDIR="${pkgdir}" install
install -Dm644 -t "${pkgdir}"/usr/share/licenses/${pkgname}/ LICENSE
}
patch with sha256 sum '07614e2a07ab61e95572da44b22b7a05b14d958ec62f4c400f7527104ff3492f':
diff --git a/configure.in b/configure.in
index 6ebf3b2..5c85682 100644
--- a/configure.in
+++ b/configure.in
@@ -198,6 +198,7 @@ if test "$HAVEMETHOD" = "no"; then
AC_TRY_RUN(
#include <dlfcn.h>
#include <stdio.h>
+ #include <stdlib.h>
int
main(int argc, char **argv)
diff --git a/xdr.c b/xdr.c
index ed8bf5b..a20bbd9 100644
--- a/xdr.c
+++ b/xdr.c
@@ -103,7 +103,7 @@ xdr_msg(XDR *xdrs, struct msg *msg)
{
X(xdr_short(xdrs, &msg->status));
X(xdr_union(xdrs, (int *)&msg->type, (char *)&msg->data,
- xdr_msg_discrim, _xdr_void));
+ xdr_msg_discrim, (xdrproc_t)_xdr_void));
return (TRUE);
}
I have successfully built. All I did was apply the patch above to regular trickle from AUR as opposed to applying it to trickle-git.
PKGBUILD:
# Maintainer: Jonathon Fernyhough <jonathon+m2x+dev>
# Contributor: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Romain Bouchaud-Leduc <r0m1.bl@camaris.org>
pkgname=trickle
pkgver=1.07
pkgrel=12
pkgdesc="Lightweight userspace bandwidth shaper"
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/mariusae/trickle"
license=('BSD')
depends=('libevent' 'libtirpc')
_commit=a2aeb9f30aa3c651580b9be9ba3c9c13bf51a416 # "import of trickle 1.07"
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mariusae/trickle/archive/${_commit}.tar.gz"
"fix-crasher.patch"
"$url/commit/20f221f166fc03323ed28dc3cad0b0da2c879513.patch"
trickle-gcc14.patch)
sha256sums=('b07ffdff831d11972dc802a4fc2d4000af844933b39ad7f88de20a2866a55f37'
'495aeb95039dcdeb3bfde46c40b3391fe2416ec51678a1ded9bbeced6f6d1349'
'432194c2a25e934a865a06de9fa876545431a1729028ca1a60943554865fb40c'
'07614e2a07ab61e95572da44b22b7a05b14d958ec62f4c400f7527104ff3492f')
prepare() {
cd $pkgname-$_commit
# FS#27549
sed -i 's|^_select(int|select(int|' trickle-overload.c
# FS#35872
patch -Np1 -i ../fix-crasher.patch
# Fix build with -Werror=format-security, https://github.com/mariusae/trickle/commit/20f221f166fc03323ed28dc3cad0b0da2c879513
patch -Np1 -i ../20f221f166fc03323ed28dc3cad0b0da2c879513.patch
patch -Np1 -i ../trickle-gcc14.patch
autoconf
}
build() {
cd $pkgname-$_commit
CPPFLAGS+=" -I/usr/include/tirpc/"
LDFLAGS+=" -ltirpc"
./configure --prefix=/usr \
--mandir=/usr/share/man \
--build=$(gcc -dumpmachine)
sed -i "s|.*in_addr_t.*||g" config.h
make -j1
}
package(){
cd $pkgname-$_commit
make DESTDIR="${pkgdir}" install
install -Dm644 -t "${pkgdir}"/usr/share/licenses/${pkgname}/ LICENSE
}
FIXED
I have successfully built. All I did was apply the patch above to regular trickle from AUR as opposed to applying it to trickle-git.
PKGBUILD:
# Maintainer: Jonathon Fernyhough <jonathon+m2x+dev> # Contributor: Jaroslav Lichtblau <svetlemodry@archlinux.org> # Contributor: Romain Bouchaud-Leduc <r0m1.bl@camaris.org> pkgname=trickle pkgver=1.07 pkgrel=12 pkgdesc="Lightweight userspace bandwidth shaper" arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') url="https://github.com/mariusae/trickle" license=('BSD') depends=('libevent' 'libtirpc') _commit=a2aeb9f30aa3c651580b9be9ba3c9c13bf51a416 # "import of trickle 1.07" source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mariusae/trickle/archive/${_commit}.tar.gz" "fix-crasher.patch" "$url/commit/20f221f166fc03323ed28dc3cad0b0da2c879513.patch" trickle-gcc14.patch) sha256sums=('b07ffdff831d11972dc802a4fc2d4000af844933b39ad7f88de20a2866a55f37' '495aeb95039dcdeb3bfde46c40b3391fe2416ec51678a1ded9bbeced6f6d1349' '432194c2a25e934a865a06de9fa876545431a1729028ca1a60943554865fb40c' '07614e2a07ab61e95572da44b22b7a05b14d958ec62f4c400f7527104ff3492f') prepare() { cd $pkgname-$_commit # FS#27549 sed -i 's|^_select(int|select(int|' trickle-overload.c # FS#35872 patch -Np1 -i ../fix-crasher.patch # Fix build with -Werror=format-security, https://github.com/mariusae/trickle/commit/20f221f166fc03323ed28dc3cad0b0da2c879513 patch -Np1 -i ../20f221f166fc03323ed28dc3cad0b0da2c879513.patch patch -Np1 -i ../trickle-gcc14.patch autoconf } build() { cd $pkgname-$_commit CPPFLAGS+=" -I/usr/include/tirpc/" LDFLAGS+=" -ltirpc" ./configure --prefix=/usr \ --mandir=/usr/share/man \ --build=$(gcc -dumpmachine) sed -i "s|.*in_addr_t.*||g" config.h make -j1 } package(){ cd $pkgname-$_commit make DESTDIR="${pkgdir}" install install -Dm644 -t "${pkgdir}"/usr/share/licenses/${pkgname}/ LICENSE }
Yes this worked for me too. Only on trickle from AUR (v1.07-12), but not on the more recent version.
I compiled this on a freshly installed and updated arch VPS around 15 days ago, today I'm trying to install (on a freshly installed as well) local arch machine to no avail. Tried AUR, AUR 'trickle-git', this repo and echiu64's fork
log reads:
I tried applying the patch described in ArchLinux forums post from 2024-05-13: Cannot install trickle because libc is not found to AUR's trickle-git
but that results in
If anyone gets this to work could you share your PKGBUILD file please?