Skip to content

Commit

Permalink
net-misc/passt: add 2024.02.20 and bug fixes
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/920795
Closes: https://bugs.gentoo.org/924494
Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
  • Loading branch information
rahilarious committed Feb 23, 2024
1 parent 41f8984 commit 3840f85
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 2 deletions.
1 change: 1 addition & 0 deletions net-misc/passt/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST passt-2023.12.04.tar.xz 188136 BLAKE2B f1d72fbb4bbb25f6a11e9ff87a91cf9bac06e047b8cb9a8b40402ced1422c23b105fa7e64646698d38ad747efa449c34cfdaecf492a3e4984114cbcf60656cdc SHA512 febd9fa22363438b52b2688481183d81c22966e1775139fc559dbfa50437c9b00ba09800db867738d25fcea8ac05d4589b75dcd2d0c88eeffefc0598d4236001
DIST passt-2023.12.30.tar.xz 188596 BLAKE2B 75712a7cb7a00fea20427979153090d938b8c7b0e3da61c83cabb3751786034df35ebbe8afbd991d582a680f55b12792547b68efa931a5576dc181040b31e5fd SHA512 4b19d191e2526bacc61bb8ab2964f5da4e0535656b094a7592f91d6b437c855a586fc772e2abd89138ff4f89aae12ade494c6e0fe7bee1502fe319215200d8f0
DIST passt-2024.02.20.tar.xz 190756 BLAKE2B c3536cf9bde5d819782c7320798bdfd3fc4c6238f6ba516013a0808ea8a02de419ff67e367b987e94371ae6f20073fa887749ebb1026fbf5c311822823ee2224 SHA512 4c6ba0ab394bf0895524b98ac9eb6efb4a95edfa2954970dda82400c25740c0dc9aa7a730a218a43e98df8788a3d2d7036a91a69d14fbaca70c0781223b6fb13
26 changes: 26 additions & 0 deletions net-misc/passt/files/Makefile-2024.02.20.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Addressing following bugs:
https://bugs.gentoo.org/924494
https://bugs.gentoo.org/920795
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@

FLAGS := -Wall -Wextra -Wno-format-zero-length
FLAGS += -pedantic -std=c11 -D_XOPEN_SOURCE=700 -D_GNU_SOURCE
-FLAGS += -D_FORTIFY_SOURCE=2 -O2 -pie -fPIE
+FLAGS += -O2 -pie -fPIE
FLAGS += -DPAGE_SIZE=$(shell getconf PAGE_SIZE)
FLAGS += -DNETNS_RUN_DIR=\"/run/netns\"
FLAGS += -DPASST_AUDIT_ARCH=AUDIT_ARCH_$(AUDIT_ARCH)
@@ -287,11 +287,6 @@
-config='{CheckOptions: [{key: bugprone-suspicious-string-compare.WarnOnImplicitComparison, value: "false"}]}' \
--warnings-as-errors=* $(SRCS) -- $(filter-out -pie,$(FLAGS) $(CFLAGS) $(CPPFLAGS)) -DCLANG_TIDY_58992

-CPPCHECK_EXHAUSTIVE :=
-ifeq ($(shell cppcheck --check-level=exhaustive /dev/null > /dev/null 2>&1; echo $$?),0)
- CPPCHECK_EXHAUSTIVE += --check-level=exhaustive
-endif
-
SYSTEM_INCLUDES := /usr/include $(wildcard /usr/include/$(TARGET))
ifeq ($(shell $(CC) -v 2>&1 | grep -c "gcc version"),1)
VER := $(shell $(CC) -dumpversion)
40 changes: 40 additions & 0 deletions net-misc/passt/passt-2024.02.20.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit flag-o-matic

DESCRIPTION="User-mode networking daemons for VMs and namespaces, replacement for Slirp"
HOMEPAGE="https://passt.top/"

RELEASE_COMMIT="1e6f92b"

if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="git://passt.top/passt"
else
SRC_URI="https://passt.top/passt/snapshot/passt-${RELEASE_COMMIT}.tar.xz -> ${P}.tar.xz"
S="${WORKDIR}/${PN}-${RELEASE_COMMIT}"
KEYWORDS="~amd64"
fi

LICENSE="BSD GPL-2+"
SLOT="0"
IUSE="static"

PATCHES=(
"${FILESDIR}"/Makefile-2024.02.20.patch
)

src_prepare() {
default
tc-export CC
}

src_compile() {
[[ ${PV} != 9999* ]] && export VERSION="${PV}"
export prefix="${EPREFIX}/usr" docdir="${EPREFIX}/usr/share/doc/${P}"

emake $(usev static)
}
15 changes: 13 additions & 2 deletions net-misc/passt/passt-9999.ebuild
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Copyright 1999-2023 Gentoo Authors
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit flag-o-matic

DESCRIPTION="User-mode networking daemons for VMs and namespaces, replacement for Slirp"
HOMEPAGE="https://passt.top/"

RELEASE_COMMIT="b86afe3"
RELEASE_COMMIT="1e6f92b"

if [[ ${PV} == 9999* ]]; then
inherit git-r3
Expand All @@ -21,6 +23,15 @@ LICENSE="BSD GPL-2+"
SLOT="0"
IUSE="static"

PATCHES=(
"${FILESDIR}"/Makefile-2024.02.20.patch
)

src_prepare() {
default
tc-export CC
}

src_compile() {
[[ ${PV} != 9999* ]] && export VERSION="${PV}"
export prefix="${EPREFIX}/usr" docdir="${EPREFIX}/usr/share/doc/${P}"
Expand Down

0 comments on commit 3840f85

Please sign in to comment.