New package: parpd-1.7

This commit is contained in:
Arsen Arsenović 2021-10-03 15:03:40 +02:00 committed by Michal Vasilek
parent e0fd315bcc
commit b385a977dd
5 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1 @@
# see parpd.conf(5)

View file

@ -0,0 +1,3 @@
#!/bin/sh
[ -r conf ] && . ./conf
exec parpd ${OPTS:=-fl} 1>&2

View file

@ -0,0 +1,24 @@
From 466a788c7533b19f20f6d91514773e89e87f5f6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
Date: Wed, 6 Oct 2021 11:37:14 +0200
Subject: [PATCH 1/2] fix building on musl
---
parpd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/parpd.c b/parpd.c
index a178696..19e266c 100644
--- a/parpd.c
+++ b/parpd.c
@@ -57,6 +57,7 @@ const char copyright[] = "Copyright (c) 2008-2017 Roy Marples";
#include <search.h>
#include <stdio.h>
#include <stdlib.h>
+#include <signal.h>
#include <string.h>
#include <syslog.h>
#include <unistd.h>
--
2.32.0

View file

@ -0,0 +1,43 @@
From 5b32ed79ccc1c9bb9a5bd815c28c4a4730cd1cc5 Mon Sep 17 00:00:00 2001
From: Roy Marples <roy@marples.name>
Date: Mon, 7 Oct 2019 15:07:25 +0100
Subject: [PATCH 2/2] Linux: File compile warnings
---
lpf.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lpf.c b/lpf.c
index 36cbd1c..cfd517b 100644
--- a/lpf.c
+++ b/lpf.c
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <sys/uio.h>
#include <arpa/inet.h>
#include <net/if.h>
@@ -91,7 +92,7 @@ bpf_open_arp(struct interface *ifp)
memset(&su, 0, sizeof(su));
su.sll.sll_family = PF_PACKET;
su.sll.sll_protocol = htons(ETH_P_ALL);
- su.sll.sll_ifindex = if_nametoindex(ifp->ifname);
+ su.sll.sll_ifindex = (int)if_nametoindex(ifp->ifname);
if (bind(s, &su.sa, sizeof(su.sll)) == -1)
goto eexit;
@@ -140,7 +141,7 @@ bpf_read(struct interface *ifp, void *data, size_t len)
}
bytes -= ETHER_HDR_LEN;
if ((size_t)bytes > len)
- bytes = len;
- memcpy(data, ifp->buffer + ETHER_HDR_LEN, bytes);
+ bytes = (ssize_t)len;
+ memcpy(data, ifp->buffer + ETHER_HDR_LEN, (size_t)bytes);
return bytes;
}
--
2.32.0

20
srcpkgs/parpd/template Normal file
View file

@ -0,0 +1,20 @@
# Template file for 'parpd'
pkgname=parpd
version=1.7
revision=1
build_style=gnu-makefile
make_install_args="BINDIR=/usr/bin"
short_desc="RFC 1027 compliant Proxy ARP Daemon"
maintainer="Arsen Arsenović <arsen@aarsen.me>"
license="BSD-2-Clause"
homepage="https://roy.marples.name/projects/parpd/"
distfiles="https://roy.marples.name/downloads/parpd/parpd-${version}.tar.xz"
checksum=f1f2ed753243b86205922ab0ec1cd0f426779e6b8c273206f0568e819a3fe3b4
conf_files=/etc/parpd.conf
post_install() {
vsv parpd
vlicense LICENSE
vconf "${FILESDIR}/parpd.conf"
}