Created
June 19, 2017 15:32
-
-
Save Thermi/3dd83f4e868271cc3e4e33aea4ab3e95 to your computer and use it in GitHub Desktop.
PKGBUILD and stuff for openl2tp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From c694a83d871855bf8e26bcb6f7b3d85503753ca9 Mon Sep 17 00:00:00 2001 | |
From: Noel Kuntze <noel@familie-kuntze.de> | |
Date: Mon, 19 Jun 2017 17:30:56 +0200 | |
Subject: [PATCH] Fix compiler warnings in usl_timer.c | |
--- | |
usl/usl_timer.c | 12 +++++++----- | |
1 file changed, 7 insertions(+), 5 deletions(-) | |
diff --git a/usl/usl_timer.c b/usl/usl_timer.c | |
index 04ad2fb..714a1a1 100644 | |
--- a/usl/usl_timer.c | |
+++ b/usl/usl_timer.c | |
@@ -88,14 +88,17 @@ void (*usl_timer_tick_hook)(void); | |
*/ | |
void usl_timer_tick(void) | |
{ | |
- int result; | |
char msg = '\0'; | |
- | |
+ ssize_t ret = 0; | |
+ errno = 0; | |
usl_tick++; | |
if (!usl_tick_pending) { | |
usl_tick_pending = 1; | |
- result = write(usl_tick_pipe[1], &msg, sizeof(msg)); | |
+ ret = write(usl_tick_pipe[1], &msg, sizeof(msg)); | |
+ if (ret == -1) { | |
+ fprintf(stderr, "Failed to write to internal pipe: %s\n", strerror(errno)); | |
+ } | |
} | |
} | |
@@ -112,11 +115,10 @@ static void usl_timer_tick_handler(int fd, void *arg) | |
struct usl_ord_list_head *tmp; | |
struct usl_list_head *iwalk; | |
struct usl_list_head *itmp; | |
- int result; | |
char msg; | |
USL_LIST_HEAD(expire_list); | |
- result = usl_fd_read(usl_tick_pipe[0], &msg, sizeof(msg)); | |
+ usl_fd_read(usl_tick_pipe[0], &msg, sizeof(msg)); | |
usl_tick_pending = 0; | |
usl_list_for_each(walk, tmp, &usl_timer_list) { | |
-- | |
2.13.1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 53fa6296607a3edd12e7dae4acf2b7c86820a4cf Mon Sep 17 00:00:00 2001 | |
From: Noel Kuntze <noel@familie-kuntze.de> | |
Date: Mon, 19 Jun 2017 17:26:08 +0200 | |
Subject: [PATCH] Fix warnings in pppd_dummy.c | |
--- | |
test/pppd_dummy.c | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
diff --git a/test/pppd_dummy.c b/test/pppd_dummy.c | |
index 148e7d2..35ff664 100644 | |
--- a/test/pppd_dummy.c | |
+++ b/test/pppd_dummy.c | |
@@ -26,6 +26,7 @@ | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include <syslog.h> | |
+#include <unistd.h> | |
#define PPPD_DUMMY_TMP_FILE "/tmp/pppd_dummy" | |
@@ -40,7 +41,7 @@ int main(int argc, char **argv) | |
if (file == NULL) { | |
syslog(LOG_ERR, "Failed to open %s\n", filename); | |
- return; | |
+ return 1; | |
} | |
for (arg = 1; arg < argc; arg++) { | |
-- | |
2.13.1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Kanogin Alex <alex at 5252 dot ru> | |
# Contributor: Aleksey Frolov <atommixz at gmail dotcom> | |
# Contributor: Orivej Desh <smpuj at bk dotru> | |
pkgname=openl2tp | |
pkgver=1.8 | |
pkgrel=6 | |
pkgdesc="L2TP client / server, written by Katalix Systems specifically for Linux" | |
arch=(i686 x86_64) | |
url="http://opensource.katalix.com/openl2tp" | |
license=("GPL") | |
backup=('etc/conf.d/openl2tpd' | |
'etc/ppp/chap-secrets.openl2tp' | |
'etc/openl2tpd.conf') | |
depends=('rpcbind' | |
'ppp') | |
makedepends=('linux-headers') | |
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz | |
0001-Fix-compiler-warnings-in-usl_timer.c.patch | |
0002-Fix-warnings-in-pppd_dummy.c.patch | |
openl2tp.service | |
openl2tpd-conf.d | |
openl2tpd.conf | |
chap-secrets.openl2tp | |
example-client.openl2tpd.conf | |
example-server.openl2tpd.conf | |
example-server.options.openl2tpd | |
example-server-radius.openl2tpd.conf | |
gentoo-openl2tp-1.8-clientip_as_ipparam.patch | |
gentoo-openl2tp-1.8-l2tpconfig.patch | |
gentoo-openl2tp-1.8-ldflags.patch | |
gentoo-openl2tp-1.8-man.patch | |
gentoo-openl2tp-1.8-optionsfile.patch | |
gentoo-openl2tp-1.8-parallelbuild.patch | |
gentoo-openl2tp-1.8-pppd-2.patch | |
gentoo-openl2tp-1.8-setkey.patch | |
gentoo-openl2tp-1.8-werror.patch) | |
options=(!emptydirs) | |
prepare() { | |
cd "$pkgname-$pkgver" | |
sed -i -e 's|-Werror||' Makefile | |
sed -i -e 's|source|build|' Makefile | |
sed -i -e 's|/usr/sbin|/usr/bin|' Makefile | |
patch -p1 < "$srcdir/0001-Fix-compiler-warnings-in-usl_timer.c.patch" | |
patch -p1 < "$srcdir/0002-Fix-warnings-in-pppd_dummy.c.patch" | |
} | |
build() { | |
cd "$pkgname-$pkgver" | |
make | |
} | |
package() { | |
cd "$pkgname-$pkgver" | |
make \ | |
SYS_LIBDIR=/usr/lib \ | |
"DESTDIR=${pkgdir}" \ | |
install | |
install -Dm644 ../openl2tpd-conf.d "$pkgdir"/etc/conf.d/openl2tpd | |
install -Dm644 ../openl2tp.service "$pkgdir"/usr/lib/systemd/system/openl2tp.service | |
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE | |
install -Dm644 ../chap-secrets.openl2tp "$pkgdir"/etc/ppp/chap-secrets.openl2tp | |
install -Dm644 ../openl2tpd.conf "$pkgdir"/etc/openl2tpd.conf | |
} | |
sha256sums=('1c97704d4b963a87fbc0e741668d4530933991515ae9ab0dffd11b5444f4860f' | |
'fb30f72fc6aae2df1af0972d6a8e8a88c14bb2a7bc5628c8d415abfc17d1f984' | |
'13f087b9f979a80778dca4d1a00e0f294d3b6ac1a635d89a34c009c6534ad59b' | |
'52626383dc28e7acffdaa9ded0781e68f00888609af17971d436b3db8ba88e56' | |
'427c94c761447cc115b800a0c9755b05e353855c57ce27e85b86c988ac1fb658' | |
'de7cd63dd86fd5defe54a7aede675943f443fa1407de95501464a19c33ff8192' | |
'af1a96a0d9a6deac7af80b15f552a99ba5b71a5afd24f0b92e376c99df16d947' | |
'8f6b6bd8150b2275e3b0886fbe38fe79dc83870fc6d6ae848bdebda42e70d4a4' | |
'57ff632190e81207f7cb6572ff697b66939e297b63894f58d2f941134e2ed5bb' | |
'49684079d3c73d0622cb2dc7b614453e818fab165dcc9664822aa2888e50c55d' | |
'32c3acef12bc78b5fab53c0b7265220323f23d61d8160c70ed4fdef826955f4a' | |
'ae0bd3029c921b515716c7b8087c6a586a1e58fd031d670d08890026d07bc67c' | |
'f7176518baad226d276006fa3d0c877b5ebab982266ffaef954f6d72dcf1bb8a' | |
'94f13f30bbfb79f0f656dbdc84153ba926e25c926864fbb5067ed6bda117b988' | |
'6752ee913ca7fae689408da9bc1148dd302cc5a97a18c7c0b9280d12e9f933c3' | |
'b38adc12e53663453bc82a60c1dd52677f6b5ac1ebaec27a5f132e3127db2b66' | |
'2e358acab1ac32221414ae2508e7ae213af12e50ae1dcdfd8d32c07d8d12e47f' | |
'5385e280d2c7db0b6bea1389295ae39b961f7cb202b31f54e0e12842de2d1de3' | |
'66f7a8de192525a0eb538493465023ec4530215ef87ad0540eb644d4b1bbdc95' | |
'5da5272f697d803c71256f298070c3a9783c1e8e43c890576a4615a407e069aa') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment