Github messages for voidlinux
 help / color / mirror / Atom feed
From: lemmi <lemmi@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: passt-2023.02.27.c538ee8
Date: Thu, 02 Mar 2023 20:15:24 +0100	[thread overview]
Message-ID: <20230302191524.bnlrzwvXUzPEgyRQ3FPmuh6fgBEHWz96dMmvG6N2HWo@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42517@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 928 bytes --]

There is an updated pull request by lemmi against master on the void-packages repository

https://github.com/lemmi/void-packages passt
https://github.com/void-linux/void-packages/pull/42517

New package: passt-2023.02.27.c538ee8
[podman-v4.4.0](https://github.com/containers/podman/releases/tag/v4.4.0) added support for [pasta](https://passt.top/passt/about/) with <https://github.com/containers/podman/pull/16141>. It's interesting for proper IPv6 forwarding with rootless containers.

There is an [open issue](https://bugs.passt.top/show_bug.cgi?id=4) for `musl` support.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**


A patch file from https://github.com/void-linux/void-packages/pull/42517.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-passt-42517.patch --]
[-- Type: text/x-diff, Size: 4008 bytes --]

From 83237bdd1e09cd38817dc83a904f03be513b2dde Mon Sep 17 00:00:00 2001
From: lemmi <lemmi@nerd2nerd.org>
Date: Wed, 1 Mar 2023 04:27:04 +0100
Subject: [PATCH] New package: passt-2023.02.27.c538ee8

---
 srcpkgs/passt/patches/musl.patch | 96 ++++++++++++++++++++++++++++++++
 srcpkgs/passt/template           | 20 +++++++
 srcpkgs/passt/update             |  2 +
 3 files changed, 118 insertions(+)
 create mode 100644 srcpkgs/passt/patches/musl.patch
 create mode 100644 srcpkgs/passt/template
 create mode 100644 srcpkgs/passt/update

diff --git a/srcpkgs/passt/patches/musl.patch b/srcpkgs/passt/patches/musl.patch
new file mode 100644
index 000000000000..810b501a1a74
--- /dev/null
+++ b/srcpkgs/passt/patches/musl.patch
@@ -0,0 +1,96 @@
+diff --git a/conf.c b/conf.c
+index 0e512f4..3e38948 100644
+--- a/conf.c
++++ b/conf.c
+@@ -1305,13 +1305,13 @@ void conf(struct ctx *c, int argc, char **argv)
+ 			if (logfile)
+ 				die("Can't log to both file and stderr");
+ 
+-			if (c->stderr)
++			if (c->_stderr)
+ 				die("Multiple --stderr options given");
+ 
+-			c->stderr = 1;
++			c->_stderr = 1;
+ 			break;
+ 		case 'l':
+-			if (c->stderr)
++			if (c->_stderr)
+ 				die("Can't log to both stderr and file");
+ 
+ 			if (logfile)
+diff --git a/passt.c b/passt.c
+index 5b8146e..6d6dfcb 100644
+--- a/passt.c
++++ b/passt.c
+@@ -241,7 +241,7 @@ int main(int argc, char **argv)
+ 	conf(&c, argc, argv);
+ 	trace_init(c.trace);
+ 
+-	if (c.stderr || isatty(fileno(stdout)))
++	if (c._stderr || isatty(fileno(stdout)))
+ 		__openlog(log_name, LOG_PERROR, LOG_DAEMON);
+ 
+ 	quit_fd = pasta_netns_quit_init(&c);
+diff --git a/passt.h b/passt.h
+index e0383eb..697b8f0 100644
+--- a/passt.h
++++ b/passt.h
+@@ -32,7 +32,7 @@ struct tap_l4_msg {
+ union epoll_ref;
+ 
+ #include <stdbool.h>
+-
++#include <limits.h>
+ #include "packet.h"
+ #include "icmp.h"
+ #include "port_fwd.h"
+@@ -197,7 +197,7 @@ struct ctx {
+ 	int trace;
+ 	int quiet;
+ 	int foreground;
+-	int stderr;
++	int _stderr;
+ 	int nofile;
+ 	char sock_path[UNIX_PATH_MAX];
+ 	char pcap[PATH_MAX];
+diff --git a/util.h b/util.h
+index 570094c..7315ce2 100644
+--- a/util.h
++++ b/util.h
+@@ -7,7 +7,10 @@
+ #define UTIL_H
+ 
+ #include <stdlib.h>
++#include <stdio.h>
+ #include <stdarg.h>
++#include <signal.h>
++#include <byteswap.h>
+ 
+ #include "log.h"
+ 
+@@ -88,6 +91,8 @@
+ #define MAC_ZERO		((uint8_t [ETH_ALEN]){ 0 })
+ #define MAC_IS_ZERO(addr)	(!memcmp((addr), MAC_ZERO, ETH_ALEN))
+ 
++#if defined(__GLIBC__) || defined(__UCLIBC__)
++
+ #if __BYTE_ORDER == __BIG_ENDIAN
+ #define	htons_constant(x)	(x)
+ #define	htonl_constant(x)	(x)
+@@ -96,6 +101,15 @@
+ #define	htonl_constant(x)	(__bswap_constant_32(x))
+ #endif
+ 
++#else 
++
++/* mainly musl fallback */
++
++#define	htons_constant(x)	(x)
++#define	htonl_constant(x)	(x)
++
++#endif
++
+ #define IN4_IS_ADDR_UNSPECIFIED(a) \
+ 	((a)->s_addr == htonl(INADDR_ANY))
+ #define IN4_IS_ADDR_BROADCAST(a) \
diff --git a/srcpkgs/passt/template b/srcpkgs/passt/template
new file mode 100644
index 000000000000..3adf19be4f6a
--- /dev/null
+++ b/srcpkgs/passt/template
@@ -0,0 +1,20 @@
+# Template file for 'passt'
+pkgname=passt
+version=2023.02.27.c538ee8
+revision=1
+# upstream uses YYYY_MM_DD.COMMIT
+_version=${version/./_}
+_version=${_version/./_}
+# https://bugs.passt.top/show_bug.cgi?id=4
+build_style=gnu-makefile
+short_desc="Plug A Simple Socket Transport"
+maintainer="lemmi <lemmi@nerd2nerd.org>"
+license="AGPL-3.0-or-later, BSD-3-Clause"
+homepage="https://passt.top"
+distfiles="https://passt.top/passt/snapshot/passt-${_version}.tar.xz"
+checksum=e09399ca10d1ddfb372580ac7e2540d00e417e1621d917b5f8ee1cd6adbd6772
+
+post_install() {
+	vlicense LICENSES/AGPL-3.0-or-later.txt
+	vlicense LICENSES/BSD-3-Clause.txt
+}
diff --git a/srcpkgs/passt/update b/srcpkgs/passt/update
new file mode 100644
index 000000000000..53a028708654
--- /dev/null
+++ b/srcpkgs/passt/update
@@ -0,0 +1,2 @@
+site="https://passt.top/passt"
+pattern='passt-\K[\d._abcdef]+(?=.tar.xz)'

  parent reply	other threads:[~2023-03-02 19:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01  4:07 [PR PATCH] " lemmi
2023-03-01 15:32 ` [PR REVIEW] " sgn
2023-03-01 17:28 ` lemmi
2023-03-02  0:07 ` sbrivio-rh
2023-03-02  0:33 ` lemmi
2023-03-02  8:58 ` sbrivio-rh
2023-03-02 13:53 ` sbrivio-rh
2023-03-02 19:11 ` [PR PATCH] [Updated] " lemmi
2023-03-02 19:14 ` lemmi
2023-03-02 19:15 ` lemmi [this message]
2023-03-09  9:15 ` sbrivio-rh
2023-03-10  3:12 ` [PR PATCH] [Updated] " lemmi
2023-03-19  6:38 ` [PR PATCH] [Updated] New package: passt-2023.03.09.7c7625d lemmi
2023-03-24 14:09 ` lemmi
2023-03-24 14:12 ` [PR PATCH] [Merged]: " lemmi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230302191524.bnlrzwvXUzPEgyRQ3FPmuh6fgBEHWz96dMmvG6N2HWo@z \
    --to=lemmi@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).