-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f93eced
commit 141831d
Showing
12 changed files
with
531 additions
and
0 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
app-admin/opensnitch-ebpf-module/opensnitch-ebpf-module-1.6.6.ebuild
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Copyright 1999-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
inherit linux-info | ||
|
||
DESCRIPTION="eBPF process monitor module for opensnitch" | ||
HOMEPAGE="https://github.com/evilsocket/opensnitch" | ||
# NOTE: app-admin/opensnitch and this ebuild share the same source | ||
SRC_URI=" | ||
https://github.com/evilsocket/opensnitch/archive/refs/tags/v${PV}.tar.gz -> opensnitch-${PV}.gh.tar.gz | ||
" | ||
|
||
S="${WORKDIR}/opensnitch-${PV}" | ||
LICENSE="GPL-3" | ||
SLOT="0" | ||
KEYWORDS="amd64" | ||
IUSE="dist-kernel" | ||
|
||
EBPF_DIR=ebpf_prog | ||
MINKV=5.5 # only compatible with kernels >= 5.5 | ||
|
||
RDEPEND=" | ||
dist-kernel? ( virtual/dist-kernel:= ) | ||
~app-admin/opensnitch-$PV | ||
" | ||
|
||
DEPEND=" | ||
virtual/linux-sources | ||
>=sys-kernel/linux-headers-${MINKV} | ||
" | ||
|
||
BDEPEND=" | ||
sys-devel/bc | ||
sys-devel/clang | ||
sys-devel/llvm | ||
" | ||
|
||
RESTRICT="strip test" | ||
QA_PREBUILT="*" | ||
|
||
pkg_setup() { | ||
# see https://github.com/evilsocket/opensnitch/discussions/978 | ||
local CONFIG_CHECK=" | ||
CGROUP_BPF | ||
BPF_EVENTS | ||
FTRACE_SYSCALLS | ||
KPROBES_ON_FTRACE | ||
KPROBE_EVENTS | ||
UPROBE_EVENTS | ||
" | ||
|
||
linux-info_pkg_setup | ||
kernel_is -ge ${MINKV//./ } || die "Kernel version at least ${MINKV} required" | ||
} | ||
|
||
src_compile() { | ||
MODULES_MAKEARGS+=( | ||
ARCH="x86" | ||
EXTRA_FLAGS="-fno-stack-protector -fcf-protection" | ||
KERNEL_DIR="${KV_DIR}" | ||
KERNEL_HEADERS=/usr # gentoo installs linux-headers to /usr | ||
) | ||
emake "${MODULES_MAKEARGS[@]}" -C "$EBPF_DIR" || die | ||
llvm-strip -g "$EBPF_DIR"/opensnitch*.o | ||
} | ||
|
||
src_install(){ | ||
insinto /usr/lib/opensnitchd/ebpf/ | ||
doins "$EBPF_DIR"/opensnitch.o | ||
doins "$EBPF_DIR"/opensnitch-dns.o | ||
doins "$EBPF_DIR"/opensnitch-procs.o | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright 1999-2023 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
DISTUTILS_USE_PEP517=setuptools | ||
PYTHON_COMPAT=( python3_{10..12} ) | ||
PYTHON_REQ_USE='threads(+)' | ||
|
||
inherit distutils-r1 | ||
|
||
DESCRIPTION="Program converting Python programs into stand-alone executables" | ||
HOMEPAGE="https://www.pyinstaller.org" | ||
|
||
if [[ ${PV} == 9999 ]]; then | ||
inherit git-r3 | ||
EGIT_REPO_URI="https://github.com/pyinstaller/pyinstaller" | ||
EGIT_BRANCH="develop" | ||
else | ||
MY_PN="PyInstaller" | ||
MY_P="${MY_PN}-${PV}" | ||
SRC_URI="https://github.com/pyinstaller/pyinstaller/releases/download/v${PV}/${MY_P}.tar.gz" | ||
KEYWORDS="amd64 ~arm64 x86" | ||
|
||
S="${WORKDIR}/${MY_P}" | ||
fi | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
IUSE="clang debug doc leak-detector" | ||
REQUIRED_USE="${PYTHON_REQUIRED_USE}" | ||
|
||
QA_PREBUILT="usr/lib/python*/site-packages/PyInstaller/bootloader/Linux-*" | ||
|
||
RDEPEND="${PYTHON_DEPS} | ||
sys-libs/zlib | ||
>=dev-python/macholib-1.8[${PYTHON_USEDEP}] | ||
dev-python/altgraph[${PYTHON_USEDEP}] | ||
>=dev-python/pefile-2018.08.08[${PYTHON_USEDEP}]" | ||
DEPEND="${RDEPEND} | ||
leak-detector? ( dev-libs/boehm-gc ) | ||
clang? ( sys-devel/clang ) | ||
!clang? ( sys-devel/gcc )" | ||
|
||
src_install() { | ||
distutils-r1_src_install | ||
insinto /etc/revdep-rebuild | ||
doins "${FILESDIR}"/50${PN} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright 1999-2023 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
DISTUTILS_USE_PEP517=setuptools | ||
PYTHON_COMPAT=( python3_{10..12} ) | ||
PYTHON_REQ_USE='threads(+)' | ||
|
||
inherit distutils-r1 pypi | ||
|
||
DESCRIPTION="Program converting Python programs into stand-alone executables" | ||
HOMEPAGE="https://www.pyinstaller.org" | ||
|
||
if [[ ${PV} == 9999 ]]; then | ||
inherit git-r3 | ||
EGIT_REPO_URI="https://github.com/pyinstaller/pyinstaller" | ||
EGIT_BRANCH="develop" | ||
else | ||
# MY_PN="PyInstaller" | ||
# MY_P="${MY_PN}-${PV}" | ||
# SRC_URI="https://github.com/pyinstaller/pyinstaller/releases/download/v${PV}/${MY_P}.tar.gz" | ||
KEYWORDS="amd64 ~arm64 x86" | ||
|
||
# S="${WORKDIR}/${MY_P}" | ||
fi | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
IUSE="clang debug doc leak-detector" | ||
REQUIRED_USE="${PYTHON_REQUIRED_USE}" | ||
|
||
RESTRICT="test" | ||
|
||
QA_PREBUILT="usr/lib/python*/site-packages/PyInstaller/bootloader/Linux-*" | ||
|
||
RDEPEND="${PYTHON_DEPS} | ||
sys-libs/zlib | ||
dev-python/altgraph[${PYTHON_USEDEP}] | ||
>=dev-python/pefile-2022.5.30[${PYTHON_USEDEP}] | ||
>=dev-python/macholib-1.8[${PYTHON_USEDEP}] | ||
>=dev-python/pyinstaller-hooks-contrib-2021.4[${PYTHON_USEDEP}] | ||
>=dev-python/packaging-22.0[${PYTHON_USEDEP}] | ||
" | ||
DEPEND="${RDEPEND} | ||
leak-detector? ( dev-libs/boehm-gc ) | ||
clang? ( sys-devel/clang ) | ||
!clang? ( sys-devel/gcc )" | ||
|
||
src_install() { | ||
distutils-r1_src_install | ||
insinto /etc/revdep-rebuild | ||
doins "${FILESDIR}"/50${PN} | ||
} |
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
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 | ||
|
||
DESCRIPTION="Pentoo mobile meta ebuild" | ||
HOMEPAGE="https://www.pentoo.org" | ||
LICENSE="GPL-3" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="+android +ios pentoo-extra pentoo-full" | ||
|
||
#projects to add? | ||
#https://github.com/504ensicslabs/lime | ||
#https://github.com/mwrlabs/drozer | ||
#https://github.com/mwrlabs/needle | ||
#https://github.com/JesusFreke/smali | ||
|
||
PDEPEND="dev-util/frida-tools | ||
pentoo-full? ( | ||
dev-debug/dwarf-debugger | ||
dev-util/objection | ||
dev-util/lief | ||
) | ||
android? ( dev-util/apktool | ||
dev-util/dex2jar | ||
dev-util/android-tools | ||
pentoo-full? ( | ||
dev-util/appmon | ||
dev-python/apkid | ||
app-misc/gplaycli | ||
dev-util/androguard | ||
) | ||
) | ||
ios? ( | ||
app-pda/ideviceinstaller | ||
app-pda/ifuse | ||
app-pda/usbmuxd | ||
pentoo-full? ( sys-devel/clang ) | ||
)" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DIST autofdo-0.18.tar.gz 62947085 BLAKE2B 2aef2bf35787339b8be86104a484a9a76adb0b54abe272965941c38bf963c7f49062246aefb2f710807ad4d55058c6babd610ba7290fc4c2114bfb2599cd267b SHA512 7f3b735347f69846c085d1ccd528c6cccd098cb6c768bfddfe4e4d5eb53b750775257da2fbf62f046ea073b5a499149d23b57bdf6ee6282630a69ceda0f1dd12 | ||
DIST autofdo-0.19.tar.gz 364598015 BLAKE2B 44647c8c172a0bb65cc8961171cb4acfe09cb6041230db8db3837337ff21bee5cebfb0124d1d6902bccc5c3820958a38774bd4428b12a4b56e384fb2572d99fa SHA512 774fec8ae240c44589519131efc24133eec96dc3387b5c6cd3c02182893e2896ae91241e93b70aa7d3baec803e9a3949a90ee215e1d58e254f0566d48e275e00 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 1999-2018 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit autotools | ||
|
||
DESCRIPTION="System to simplify real-world deployment of feedback-directed optimization" | ||
HOMEPAGE="https://gcc.gnu.org/wiki/AutoFDO" | ||
SRC_URI="https://github.com/google/autofdo/archive/${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
|
||
DEPEND=">=sys-devel/llvm-5.0.1:* | ||
sys-devel/gcc:*" | ||
|
||
RDEPEND="${DEPEND}" | ||
|
||
src_prepare(){ | ||
#has Google forgot got change it? | ||
sed -i "s|\[0.14\]|\[${PV}\]|" configure.ac | ||
eautoreconf | ||
eapply_user | ||
} | ||
|
||
src_configure(){ | ||
econf --with-llvm | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 1999-2019 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit autotools | ||
|
||
DESCRIPTION="System to simplify real-world deployment of feedback-directed optimization" | ||
HOMEPAGE="https://gcc.gnu.org/wiki/AutoFDO" | ||
#SRC_URI="https://github.com/google/autofdo/archive/${PV}.tar.gz -> ${P}.tar.gz" | ||
SRC_URI="https://github.com/google/autofdo/releases/download/0.19/0.19.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
#KEYWORDS="~amd64 ~x86" | ||
|
||
DEPEND=">=sys-devel/llvm-5.0.1:* | ||
sys-devel/gcc:*" | ||
|
||
RDEPEND="${DEPEND}" | ||
|
||
src_prepare(){ | ||
eapply "${FILESDIR}/disable-rpath.diff" | ||
eapply "${FILESDIR}/link-atomic.diff" | ||
# eapply "${FILESDIR}/link-libgflags.diff" | ||
# eapply "${FILESDIR}/link-libglog.diff" | ||
|
||
eautoreconf | ||
eapply_user | ||
} | ||
|
||
src_configure(){ | ||
econf --with-llvm | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright 1999-2019 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit git-r3 autotools | ||
|
||
DESCRIPTION="System to simplify real-world deployment of feedback-directed optimization" | ||
HOMEPAGE="https://gcc.gnu.org/wiki/AutoFDO" | ||
EGIT_REPO_URI="https://github.com/kim-phillips-arm/autofdo.git" | ||
#EGIT_COMMIT="" | ||
EGIT_BRANCH="fixissue55try3" | ||
|
||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
|
||
DEPEND=">=sys-devel/llvm-5.0.1:* | ||
sys-devel/gcc:*" | ||
|
||
RDEPEND="${DEPEND}" | ||
|
||
src_prepare(){ | ||
eautoreconf | ||
eapply_user | ||
} | ||
|
||
src_configure(){ | ||
econf --with-llvm | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- a/m4/ax_llvm.m4 | ||
+++ b/m4/ax_llvm.m4 | ||
@@ -67,8 +67,7 @@ AC_DEFUN([AX_LLVM], | ||
-ldl -lpthread -ltinfo" | ||
elif test "x$shared_mode" = "xshared"; then | ||
rpath="$($ac_llvm_config_path --libdir)" | ||
- LLVM_LDFLAGS="-Wl,-rpath $rpath \ | ||
- $($ac_llvm_config_path --ldflags)" | ||
+ LLVM_LDFLAGS="$($ac_llvm_config_path --ldflags)" | ||
LLVM_LIBS="$($ac_llvm_config_path --libs $1)" | ||
fi | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- a/third_party/protobuf/configure.ac | ||
+++ b/third_party/protobuf/configure.ac | ||
@@ -189,6 +189,16 @@ AM_CONDITIONAL([HAVE_PTHREAD], [test "x$ | ||
# We still keep this for improving pbconfig.h for unsupported platforms. | ||
AC_CXX_STL_HASH | ||
|
||
+AC_MSG_CHECKING([whether linking wiht -latomic succeeds]) | ||
+save_LIBS=$LIBS | ||
+LIBS="$LIBS -latomic" | ||
+AC_LINK_IFELSE( | ||
+ [AC_LANG_SOURCE([int main() { return 0; }])], | ||
+ [LIBATOMIC=-latomic; AC_MSG_RESULT(yes)], | ||
+ [LIBATOMIC=; AC_MSG_RESULT(no)]) | ||
+AC_SUBST(LIBATOMIC) | ||
+LIBS=$save_LIBS | ||
+ | ||
case "$target_os" in | ||
mingw* | cygwin* | win* | aix*) | ||
;; | ||
--- a/third_party/protobuf/src/Makefile.am | ||
+++ b/third_party/protobuf/src/Makefile.am | ||
@@ -211,7 +211,7 @@ libprotobuf_lite_la_SOURCES = | ||
google/protobuf/io/zero_copy_stream.cc \ | ||
google/protobuf/io/zero_copy_stream_impl_lite.cc | ||
|
||
-libprotobuf_la_LIBADD = $(PTHREAD_LIBS) | ||
+libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC) | ||
libprotobuf_la_LDFLAGS = -version-info 15:1:0 -export-dynamic -no-undefined | ||
if HAVE_LD_VERSION_SCRIPT | ||
libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map |
Oops, something went wrong.