diff options
Diffstat (limited to 'app-forensics')
86 files changed, 2225 insertions, 1294 deletions
diff --git a/app-forensics/afflib/Manifest b/app-forensics/afflib/Manifest index 76fd811dba8d..b00e6dbceb28 100644 --- a/app-forensics/afflib/Manifest +++ b/app-forensics/afflib/Manifest @@ -1 +1,2 @@ DIST afflib-3.7.19.tar.gz 540165 BLAKE2B dea0998741121d2c1ae0e42ced9652ec46816282128469af75e0a32f9e4e2d09ac4afb4888ee7925366a03a867932f2446bfcd3800ab4dc021939ab6c38c797b SHA512 6e0df7477bf7dbd3814099d94e3fce122e0cf9b714a425521b7458f4eedc6e8b8e7283fd37926b7c992cdf21d3adec620df29a79a6a5311bf1d1b5d4930768bc +DIST afflib-3.7.20.tar.gz 560441 BLAKE2B 6934efc30566b4b72e55e5727c46657362237872acae9d161f2625439d3d6e12da702b3ed82e3442b7015d8cb707097152cc73a6d0cc31d1ad61467f4022f7d4 SHA512 1ac623cb8462fc929a8ad1c014e92d319a3ebf5226ef07aa0777e4cbb77a9ee20adf570f39c960c9186ac2a477e861dfd5565d3364fdff22f9870f8c9ab30479 diff --git a/app-forensics/afflib/afflib-3.7.19-r1.ebuild b/app-forensics/afflib/afflib-3.7.19-r1.ebuild index 1becd23f068c..00cbc11a8892 100644 --- a/app-forensics/afflib/afflib-3.7.19-r1.ebuild +++ b/app-forensics/afflib/afflib-3.7.19-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_COMPAT=( python3_{9..10} ) inherit autotools python-single-r1 MY_PN=AFFLIBv3 diff --git a/app-forensics/afflib/afflib-3.7.20.ebuild b/app-forensics/afflib/afflib-3.7.20.ebuild new file mode 100644 index 000000000000..a8d20b77ec2b --- /dev/null +++ b/app-forensics/afflib/afflib-3.7.20.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +inherit autotools python-single-r1 + +MY_PN=AFFLIBv3 +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Library that implements the AFF image standard" +HOMEPAGE="https://github.com/sshock/AFFLIBv3/" +SRC_URI="https://github.com/sshock/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm ~hppa ppc x86 ~x64-macos" +IUSE="fuse ncurses python qemu readline s3 static-libs threads" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +# Tests don't play well with sandbox +RESTRICT="test" + +RDEPEND=" + dev-libs/expat + sys-libs/zlib:= + fuse? ( sys-fs/fuse:0 ) + dev-libs/openssl:= + ncurses? ( sys-libs/ncurses:= ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]') + ) + readline? ( sys-libs/readline:= ) + s3? ( net-misc/curl ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-3.7.19-search-path.patch" +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + default + + sed -i \ + -e '/FLAGS/s: -g::' \ + -e 's:-D_FORTIFY_SOURCE=2::' \ + configure.ac || die + + eautoreconf +} + +src_configure() { + # Hacks for automagic dependencies + use ncurses || export ac_cv_lib_ncurses_initscr=no + use readline || export ac_cv_lib_readline_readline=no + + local myeconfargs=( + $(use_enable fuse) + $(use_enable python) + $(use_enable qemu) + $(use_enable s3) + $(use_enable static-libs static) + $(use_enable threads threading) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + find "${ED}" -name "*.la" -delete || die +} diff --git a/app-forensics/afflib/metadata.xml b/app-forensics/afflib/metadata.xml index 2b3358158649..9f097fab65d8 100644 --- a/app-forensics/afflib/metadata.xml +++ b/app-forensics/afflib/metadata.xml @@ -8,6 +8,6 @@ <flag name="s3">Enable support for Amazon S3</flag> </use> <upstream> - <remote-id type="github">simsong/AFFLIBv3</remote-id> + <remote-id type="github">sshock/AFFLIBv3</remote-id> </upstream> </pkgmetadata> diff --git a/app-forensics/afl/afl-2.57b-r2.ebuild b/app-forensics/afl/afl-2.57b-r2.ebuild index 95bfacc4b55c..1d63aae81046 100644 --- a/app-forensics/afl/afl-2.57b-r2.ebuild +++ b/app-forensics/afl/afl-2.57b-r2.ebuild @@ -1,12 +1,15 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit multilib toolchain-funcs flag-o-matic +inherit toolchain-funcs # See https://github.com/google/AFL/pull/117 -PATCHES=( "${FILESDIR}/${P}-install-readmemd.diff" ) +PATCHES=( + "${FILESDIR}/${P}-install-readmemd.diff" + "${FILESDIR}/${P}-implicit-int-clang16.patch" +) DESCRIPTION="american fuzzy lop - compile-time instrumentation fuzzer" HOMEPAGE="https://lcamtuf.coredump.cx/afl/" diff --git a/app-forensics/afl/files/afl-2.57b-implicit-int-clang16.patch b/app-forensics/afl/files/afl-2.57b-implicit-int-clang16.patch new file mode 100644 index 000000000000..dc432c5c08c4 --- /dev/null +++ b/app-forensics/afl/files/afl-2.57b-implicit-int-clang16.patch @@ -0,0 +1,14 @@ +Bug: https://bugs.gentoo.org/894514 +diff --git a/Makefile b/Makefile +index 3819312..536c20b 100644 +--- a/Makefile ++++ b/Makefile +@@ -50,7 +50,7 @@ ifndef AFL_NO_X86 + + test_x86: + @echo "[*] Checking for the ability to compile x86 code..." +- @echo 'main() { __asm__("xorb %al, %al"); }' | $(CC) -w -x c - -o .test || ( echo; echo "Oops, looks like your compiler can't generate x86 code."; echo; echo "Don't panic! You can use the LLVM or QEMU mode, but see docs/INSTALL first."; echo "(To ignore this error, set AFL_NO_X86=1 and try again.)"; echo; exit 1 ) ++ @echo 'int main() { __asm__("xorb %al, %al"); }' | $(CC) -w -x c - -o .test || ( echo; echo "Oops, looks like your compiler can't generate x86 code."; echo; echo "Don't panic! You can use the LLVM or QEMU mode, but see docs/INSTALL first."; echo "(To ignore this error, set AFL_NO_X86=1 and try again.)"; echo; exit 1 ) + @rm -f .test + @echo "[+] Everything seems to be working, ready to compile." + diff --git a/app-forensics/aflplusplus/Manifest b/app-forensics/aflplusplus/Manifest index a99f8f055073..1d808f455616 100644 --- a/app-forensics/aflplusplus/Manifest +++ b/app-forensics/aflplusplus/Manifest @@ -1 +1,3 @@ -DIST aflplusplus-4.00c.tar.gz 2805041 BLAKE2B c1ce15aa9860fc02a7d6f608cae9dd8987b72253b465ea734c721d1b6927e482c31b907aeafe82c00618465227e2e140bfc595151ea5d73037638c3ee630872c SHA512 23a7a4260e581f7c212393e1e14704464bbbc3ff5465b3472db31c6c7f2cd25a9ecc5ad81fad8958c775fcd01b22269085e6c69419a07fbbdb9ec317a3e39beb +DIST aflplusplus-4.07c-patches.tar.xz 4788 BLAKE2B de109198fbabfce2554459fee6a14f66002a952f5584ff265a6ff7d7646f520ed53a6d9c8c125a05eb5a4aa0c1cc675dca82647ad4c0965cdab10d3aa2f09467 SHA512 0ea4279b261d55cf209e32ca4b7fd7dc1181ec902dd7e4c7f36854d84f14037e643a543dcbb849927b41919c527303fc5877c9fab5b09c8988fbfab499b8f8bc +DIST aflplusplus-4.07c.tar.gz 2878659 BLAKE2B c3c4c5507e29ed8015784378a13a55cb6b389dec915979749b1869496c16366ce876f1eecc91eb09d51cc58266a92296218cd5eda2a201f5cf4faaa2ea61942f SHA512 c62fce112d59ef5ffb847adab9a7ff8486d44e6316a391392979da19a8160b55f9af7f75fd39cdc98997b3e166f4f6a33ddf31b827c9414a1392657701ecb5e8 +DIST aflplusplus-4.08c.tar.gz 2894794 BLAKE2B 5576ec54969c7ae10b05fe10320581b348f989c1bc412bd63b2ca7ecb3bd1782a90c2660d971375667f6dd820f9035d7abb2207f59a1aaa5e7640d352eaa5757 SHA512 52c35ed544db8be778b79a64977fcc74092b541c4c07a788b20f4b9e8db95ff9c52c997ebf6f5a1056f962f3551df06a5eca02679bc2b71bb9d8944c1f77984a diff --git a/app-forensics/aflplusplus/aflplusplus-4.00c.ebuild b/app-forensics/aflplusplus/aflplusplus-4.07c-r1.ebuild index 3cc127a6a3d0..81389b9c438e 100644 --- a/app-forensics/aflplusplus/aflplusplus-4.00c.ebuild +++ b/app-forensics/aflplusplus/aflplusplus-4.07c-r1.ebuild @@ -1,45 +1,52 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{8,9,10} ) -LLVM_MAX_SLOT=13 +PYTHON_COMPAT=( python3_{10..11} ) +LLVM_MAX_SLOT=16 inherit toolchain-funcs llvm optfeature python-single-r1 +AFL_PATCHSET="${PN}-4.07c-patches" DESCRIPTION="A fork of AFL, the popular compile-time instrumentation fuzzer" HOMEPAGE="https://github.com/AFLplusplus/AFLplusplus" SRC_URI="https://github.com/AFLplusplus/AFLplusplus/archive/${PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/AFLplusplus-${PV}" +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${AFL_PATCHSET}.tar.xz" +S="${WORKDIR}"/AFLplusplus-${PV} LICENSE="Apache-2.0" SLOT="0" KEYWORDS="amd64 arm64" IUSE="test" - REQUIRED_USE="${PYTHON_REQUIRED_USE}" # Tests involve heavy use of LD_PRELOAD in some cases # This isn't compatible with sandbox RESTRICT="test" -# It turns out we need Clang too -RDEPEND="${PYTHON_DEPS} - >=sys-devel/llvm-11:= +RDEPEND=" + ${PYTHON_DEPS} + <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):= || ( - sys-devel/clang:11 - sys-devel/clang:12 - sys-devel/clang:13 + sys-devel/clang:14 + sys-devel/clang:15 + sys-devel/clang:${LLVM_MAX_SLOT} ) - !app-forensics/afl" -DEPEND="${RDEPEND} - test? ( dev-util/cmocka )" + !app-forensics/afl +" +DEPEND=" + ${RDEPEND} + test? ( dev-util/cmocka ) +" +QA_FLAGS_IGNORED=" + usr/lib.*/afl/afl-gcc-cmplog-pass.so + usr/lib.*/afl/afl-gcc-cmptrs-pass.so +" QA_PREBUILT="usr/share/afl/testcases/others/elf/small_exec.elf" PATCHES=( - "${FILESDIR}"/${PN}-4.00c-respect-flags.patch - "${FILESDIR}"/${PN}-4.00c-no-ignore-errors-makefile.patch + "${WORKDIR}"/${AFL_PATCHSET} ) llvm_check_deps() { @@ -52,33 +59,30 @@ pkg_setup() { python-single-r1_pkg_setup } -src_compile() { +mymake() { emake \ CC="$(tc-getCC)" \ CXX="$(tc-getCXX)" \ CFLAGS_FLTO="" \ + LLVM_CONFIG="$(get_llvm_prefix ${LLVM_MAX_SLOT})"/bin/llvm-config \ PREFIX="${EPREFIX}/usr" \ HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \ DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \ - MAN_PATH="${EPREFIX}/usr/share/man/man8" + MAN_PATH="${EPREFIX}/usr/share/man/man8" \ + "$@" +} + +src_compile() { + mymake } src_test() { - emake \ - CC="$(tc-getCC)" \ - CXX="$(tc-getCXX)" + mymake test } src_install() { - emake \ - CC="$(tc-getCC)" \ - CXX="$(tc-getCXX)" \ - DESTDIR="${D}" \ - PREFIX="${EPREFIX}/usr" \ - HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \ - DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \ - MAN_PATH="${EPREFIX}/usr/share/man/man8" \ - install + mymake DESTDIR="${D}" install + dostrip -x /usr/share/afl/testcases/ } pkg_postinst() { diff --git a/app-forensics/aflplusplus/aflplusplus-4.08c-r1.ebuild b/app-forensics/aflplusplus/aflplusplus-4.08c-r1.ebuild new file mode 100644 index 000000000000..f4311f8fd156 --- /dev/null +++ b/app-forensics/aflplusplus/aflplusplus-4.08c-r1.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +LLVM_MAX_SLOT=17 +LLVM_MIN_SLOT=14 +inherit toolchain-funcs llvm optfeature python-single-r1 + +AFL_PATCHSET="${PN}-4.07c-patches" +DESCRIPTION="Fork of AFL, the popular compile-time instrumentation fuzzer" +HOMEPAGE="https://github.com/AFLplusplus/AFLplusplus" +SRC_URI="https://github.com/AFLplusplus/AFLplusplus/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${AFL_PATCHSET}.tar.xz" +S="${WORKDIR}"/AFLplusplus-${PV} + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 arm64" +IUSE="test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# Tests involve heavy use of LD_PRELOAD in some cases +# This isn't compatible with sandbox +RESTRICT="test" + +LLVM_DEPS=" + <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):= + || ( +" +# We go downwards as Portage prefers left-most in || ( .. ) +for ((i=${LLVM_MAX_SLOT}; i >= ${LLVM_MIN_SLOT}; i--)) ; do + LLVM_DEPS+=" sys-devel/clang:${i}" +done +LLVM_DEPS+=" )" +unset i + +RDEPEND=" + ${PYTHON_DEPS} + ${LLVM_DEPS} + !app-forensics/afl +" +DEPEND=" + ${RDEPEND} + test? ( dev-util/cmocka ) +" + +QA_FLAGS_IGNORED=" + usr/lib.*/afl/afl-gcc-cmplog-pass.so + usr/lib.*/afl/afl-gcc-cmptrs-pass.so +" +QA_PREBUILT="usr/share/afl/testcases/others/elf/small_exec.elf" + +PATCHES=( + "${WORKDIR}"/${AFL_PATCHSET} +) + +llvm_check_deps() { + has_version -b "sys-devel/clang:${LLVM_SLOT}" && \ + has_version -b "sys-devel/llvm:${LLVM_SLOT}" +} + +pkg_setup() { + llvm_pkg_setup + python-single-r1_pkg_setup +} + +mymake() { + emake \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + CFLAGS_FLTO="" \ + LLVM_CONFIG="$(get_llvm_prefix ${LLVM_MAX_SLOT})"/bin/llvm-config \ + PREFIX="${EPREFIX}/usr" \ + HELPER_PATH="${EPREFIX}/usr/$(get_libdir)/afl" \ + DOC_PATH="${EPREFIX}/usr/share/doc/${PF}" \ + MAN_PATH="${EPREFIX}/usr/share/man/man8" \ + "$@" +} + +src_compile() { + mymake +} + +src_test() { + mymake test +} + +src_install() { + mymake DESTDIR="${D}" install + dostrip -x /usr/share/afl/testcases/ +} + +pkg_postinst() { + # TODO: Any others? + optfeature "fuzzing with AFL_USE_ASAN" sys-libs/compiler-rt-sanitizers[asan] + optfeature "fuzzing with AFL_USE_MSAN" sys-libs/compiler-rt-sanitizers[msan] +} diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.00c-no-ignore-errors-makefile.patch b/app-forensics/aflplusplus/files/aflplusplus-4.00c-no-ignore-errors-makefile.patch deleted file mode 100644 index 50d9268ac9bb..000000000000 --- a/app-forensics/aflplusplus/files/aflplusplus-4.00c-no-ignore-errors-makefile.patch +++ /dev/null @@ -1,121 +0,0 @@ -https://bugs.gentoo.org/800941 - ---- a/GNUmakefile -+++ b/GNUmakefile -@@ -310,13 +310,13 @@ all: test_x86 test_shm test_python ready $(PROGS) afl-as llvm gcc_plugin test_bu - - .PHONY: llvm - llvm: -- -$(MAKE) -j4 -f GNUmakefile.llvm -+ $(MAKE) -j4 -f GNUmakefile.llvm - @test -e afl-cc || { echo "[-] Compiling afl-cc failed. You seem not to have a working compiler." ; exit 1; } - - .PHONY: gcc_plugin - gcc_plugin: - ifneq "$(SYS)" "Darwin" -- -$(MAKE) -f GNUmakefile.gcc_plugin -+ $(MAKE) -f GNUmakefile.gcc_plugin - endif - - .PHONY: man -@@ -565,19 +565,19 @@ all_done: test_build - .PHONY: clean - clean: - rm -rf $(PROGS) afl-fuzz-document afl-as as afl-g++ afl-clang afl-clang++ *.o src/*.o *~ a.out core core.[1-9][0-9]* *.stackdump .test .test1 .test2 test-instr .test-instr0 .test-instr1 afl-cs-proxy afl-qemu-trace afl-gcc-fast afl-g++-fast ld *.so *.8 test/unittests/*.o test/unittests/unit_maybe_alloc test/unittests/preallocable .afl-* afl-gcc afl-g++ afl-clang afl-clang++ test/unittests/unit_hash test/unittests/unit_rand *.dSYM -- -$(MAKE) -f GNUmakefile.llvm clean -- -$(MAKE) -f GNUmakefile.gcc_plugin clean -- -$(MAKE) -C utils/libdislocator clean -- -$(MAKE) -C utils/libtokencap clean -+ $(MAKE) -f GNUmakefile.llvm clean -+ $(MAKE) -f GNUmakefile.gcc_plugin clean -+ $(MAKE) -C utils/libdislocator clean -+ $(MAKE) -C utils/libtokencap clean - $(MAKE) -C utils/aflpp_driver clean -- -$(MAKE) -C utils/afl_network_proxy clean -- -$(MAKE) -C utils/socket_fuzzing clean -- -$(MAKE) -C utils/argv_fuzzing clean -- -$(MAKE) -C utils/plot_ui clean -- -$(MAKE) -C qemu_mode/unsigaction clean -- -$(MAKE) -C qemu_mode/libcompcov clean -- -$(MAKE) -C qemu_mode/libqasan clean -- -$(MAKE) -C frida_mode clean -+ $(MAKE) -C utils/afl_network_proxy clean -+ $(MAKE) -C utils/socket_fuzzing clean -+ $(MAKE) -C utils/argv_fuzzing clean -+ $(MAKE) -C utils/plot_ui clean -+ $(MAKE) -C qemu_mode/unsigaction clean -+ $(MAKE) -C qemu_mode/libcompcov clean -+ $(MAKE) -C qemu_mode/libqasan clean -+ $(MAKE) -C frida_mode clean - rm -rf nyx_mode/packer/linux_initramfs/init.cpio.gz nyx_mode/libnyx/libnyx/target/release/* nyx_mode/QEMU-Nyx/x86_64-softmmu/qemu-system-x86_64 - ifeq "$(IN_REPO)" "1" - -test -e coresight_mode/coresight-trace/Makefile && $(MAKE) -C coresight_mode/coresight-trace clean || true -@@ -607,20 +607,20 @@ endif - - .PHONY: distrib - distrib: all -- -$(MAKE) -j4 -f GNUmakefile.llvm -+ $(MAKE) -j4 -f GNUmakefile.llvm - ifneq "$(SYS)" "Darwin" -- -$(MAKE) -f GNUmakefile.gcc_plugin -+ $(MAKE) -f GNUmakefile.gcc_plugin - endif -- -$(MAKE) -C utils/libdislocator -- -$(MAKE) -C utils/libtokencap -- -$(MAKE) -C utils/afl_network_proxy -- -$(MAKE) -C utils/socket_fuzzing -- -$(MAKE) -C utils/argv_fuzzing -+ $(MAKE) -C utils/libdislocator -+ $(MAKE) -C utils/libtokencap -+ $(MAKE) -C utils/afl_network_proxy -+ $(MAKE) -C utils/socket_fuzzing -+ $(MAKE) -C utils/argv_fuzzing - # -$(MAKE) -C utils/plot_ui -- -$(MAKE) -C frida_mode -+ $(MAKE) -C frida_mode - ifneq "$(SYS)" "Darwin" - ifeq "$(ARCH)" "aarch64" -- -$(MAKE) -C coresight_mode -+ $(MAKE) -C coresight_mode - endif - ifeq "$(SYS)" "Linux" - -cd nyx_mode && ./build_nyx_support.sh -@@ -651,12 +651,12 @@ endif - - .PHONY: source-only - source-only: all -- -$(MAKE) -j4 -f GNUmakefile.llvm -+ $(MAKE) -j4 -f GNUmakefile.llvm - ifneq "$(SYS)" "Darwin" -- -$(MAKE) -f GNUmakefile.gcc_plugin -+ $(MAKE) -f GNUmakefile.gcc_plugin - endif -- -$(MAKE) -C utils/libdislocator -- -$(MAKE) -C utils/libtokencap -+ $(MAKE) -C utils/libdislocator -+ $(MAKE) -C utils/libtokencap - # -$(MAKE) -C utils/plot_ui - ifeq "$(SYS)" "Linux" - -cd nyx_mode && ./build_nyx_support.sh -@@ -702,9 +702,9 @@ install: all $(MANPAGES) - @if [ -f utils/afl_network_proxy/afl-network-server ]; then $(MAKE) -C utils/afl_network_proxy install; fi - @if [ -f utils/aflpp_driver/libAFLDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLDriver.a $${DESTDIR}$(HELPER_PATH); fi - @if [ -f utils/aflpp_driver/libAFLQemuDriver.a ]; then set -e; install -m 644 utils/aflpp_driver/libAFLQemuDriver.a $${DESTDIR}$(HELPER_PATH); fi -- -$(MAKE) -f GNUmakefile.llvm install -+ $(MAKE) -f GNUmakefile.llvm install - ifneq "$(SYS)" "Darwin" -- -$(MAKE) -f GNUmakefile.gcc_plugin install -+ $(MAKE) -f GNUmakefile.gcc_plugin install - endif - ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-gcc - ln -sf afl-cc $${DESTDIR}$(BIN_PATH)/afl-g++ ---- a/GNUmakefile.llvm -+++ b/GNUmakefile.llvm -@@ -457,6 +457,7 @@ document: - test_build: $(PROGS) - @echo "[*] Testing the CC wrapper and instrumentation output..." - unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; ASAN_OPTIONS=detect_leaks=0 AFL_QUIET=1 AFL_PATH=. AFL_LLVM_LAF_ALL=1 ./afl-cc $(CFLAGS) $(CPPFLAGS) ./test-instr.c -o test-instr $(LDFLAGS) -+ @test -e test-instr || { echo "[-] Testing CC wrapper failed. You seem not to have a working compiler." ; exit 1; } - ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null - echo 1 | ASAN_OPTIONS=detect_leaks=0 ./afl-showmap -m none -q -o .test-instr1 ./test-instr - @rm -f test-instr diff --git a/app-forensics/aflplusplus/files/aflplusplus-4.00c-respect-flags.patch b/app-forensics/aflplusplus/files/aflplusplus-4.00c-respect-flags.patch deleted file mode 100644 index 47ccbe008c89..000000000000 --- a/app-forensics/aflplusplus/files/aflplusplus-4.00c-respect-flags.patch +++ /dev/null @@ -1,122 +0,0 @@ ---- a/GNUmakefile -+++ b/GNUmakefile -@@ -420,7 +420,7 @@ afl-as: src/afl-as.c include/afl-as.h $(COMM_HDR) | test_x86 - @ln -sf afl-as as - - src/afl-performance.o : $(COMM_HDR) src/afl-performance.c include/hash.h -- $(CC) $(CFLAGS) -Iinclude $(SPECIAL_PERFORMANCE) -O3 -fno-unroll-loops -c src/afl-performance.c -o src/afl-performance.o -+ $(CC) $(CFLAGS) -Iinclude $(SPECIAL_PERFORMANCE) -fno-unroll-loops -c src/afl-performance.c -o src/afl-performance.o - - src/afl-common.o : $(COMM_HDR) src/afl-common.c include/common.h - $(CC) $(CFLAGS) $(CFLAGS_FLTO) -c src/afl-common.c -o src/afl-common.o ---- a/GNUmakefile.gcc_plugin -+++ b/GNUmakefile.gcc_plugin -@@ -131,18 +131,18 @@ afl-common.o: ./src/afl-common.c - $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ $(LDFLAGS) - - ./afl-compiler-rt.o: instrumentation/afl-compiler-rt.o.c -- $(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -fPIC -c $< -o $@ -+ $(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -c $< -o $@ - - ./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c - @printf "[*] Building 32-bit variant of the runtime (-m32)... " -- @$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-32.o afl-llvm-rt-32.o; else echo "failed (that's fine)"; fi -+ @$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-32.o afl-llvm-rt-32.o; else echo "failed (that's fine)"; fi - - ./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c - @printf "[*] Building 64-bit variant of the runtime (-m64)... " -- @$(CC) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o; else echo "failed (that's fine)"; fi -+ @$(CC) $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o; else echo "failed (that's fine)"; fi - - ./afl-gcc-pass.so: instrumentation/afl-gcc-pass.so.cc | test_deps -- $(CXX) $(CXXEFLAGS) $(PLUGIN_FLAGS) -shared $< -o $@ -+ $(CXX) $(CXXEFLAGS) $(PLUGIN_FLAGS) -shared $< -o $@ $(LDFLAGS) - ln -sf afl-cc afl-gcc-fast - ln -sf afl-cc afl-g++-fast - ln -sf afl-cc.8 afl-gcc-fast.8 ---- a/GNUmakefile.llvm -+++ b/GNUmakefile.llvm -@@ -438,20 +438,20 @@ afl-llvm-dict2file.so: instrumentation/afl-llvm-dict2file.so.cc instrumentation/ - - .PHONY: document - document: -- $(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt.o -- @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -m32 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-32.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi -- @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -O3 -Wno-unused-result -m64 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-64.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi -+ $(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt.o -+ @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -m32 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-32.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi -+ @$(CLANG_BIN) -D_AFL_DOCUMENT_MUTATIONS $(CFLAGS) $(CFLAGS_SAFE) $(CPPFLAGS) $(CLANG_CFL) -Wno-unused-result -m64 -fPIC -c instrumentation/afl-compiler-rt.o.c -o ./afl-compiler-rt-64.o 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; else echo "failed (that's fine)"; fi - - ./afl-compiler-rt.o: instrumentation/afl-compiler-rt.o.c -- $(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -fPIC -c $< -o $@ -+ $(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -fPIC -c $< -o $@ - - ./afl-compiler-rt-32.o: instrumentation/afl-compiler-rt.o.c - @printf "[*] Building 32-bit variant of the runtime (-m32)... " -- @$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-32.o afl-llvm-rt-32.o; else echo "failed (that's fine)"; fi -+ @$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m32 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-32.o afl-llvm-rt-32.o; else echo "failed (that's fine)"; fi - - ./afl-compiler-rt-64.o: instrumentation/afl-compiler-rt.o.c - @printf "[*] Building 64-bit variant of the runtime (-m64)... " -- @$(CC) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -O3 -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o; else echo "failed (that's fine)"; fi -+ @$(CC) $(CFLAGS) $(CLANG_CFL) $(CFLAGS_SAFE) $(CPPFLAGS) -Wno-unused-result -m64 -fPIC -c $< -o $@ 2>/dev/null; if [ "$$?" = "0" ]; then echo "success!"; ln -sf afl-compiler-rt-64.o afl-llvm-rt-64.o; else echo "failed (that's fine)"; fi - - .PHONY: test_build - test_build: $(PROGS) ---- a/custom_mutators/honggfuzz/Makefile -+++ b/custom_mutators/honggfuzz/Makefile -@@ -1,5 +1,6 @@ - --CFLAGS = -O3 -funroll-loops -fPIC -Wl,-Bsymbolic -+CFLAGS ?= -O3 -+CFLAGS += -funroll-loops -fPIC -Wl,-Bsymbolic - - all: honggfuzz-mutator.so - ---- a/custom_mutators/libfuzzer/Makefile -+++ b/custom_mutators/libfuzzer/Makefile -@@ -1,5 +1,6 @@ - --CFLAGS = -g -O3 -funroll-loops -fPIC -fpermissive -std=c++11 -+CFLAGS ?= -g -O3 -+CFLAGS += -funroll-loops -fpermissive -std=c++11 -fPIC - #CFLAGS = -g -O0 -fPIC -fpermissive -std=c++11 - CXX ?= clang++ - ---- a/frida_mode/GNUmakefile -+++ b/frida_mode/GNUmakefile -@@ -17,7 +17,6 @@ CFLAGS+=-fPIC \ - -D_GNU_SOURCE \ - -D_FORTIFY_SOURCE=2 \ - -g \ -- -O3 \ - -funroll-loops \ - -ffunction-sections \ - ---- a/frida_mode/test/png/persistent/hook/GNUmakefile -+++ b/frida_mode/test/png/persistent/hook/GNUmakefile -@@ -5,11 +5,9 @@ BUILD_DIR:=$(PWD)build/ - AFLPP_FRIDA_DRIVER_HOOK_OBJ=$(ROOT)frida_mode/build/frida_hook.so - AFLPP_QEMU_DRIVER_HOOK_OBJ=$(ROOT)frida_mode/build/qemu_hook.so - --CFLAGS+=-O3 \ -- -funroll-loops \ -+CFLAGS+= -funroll-loops \ - -g \ -- -fPIC \ -- -funroll-loops \ -+ -fPIC - - LDFLAGS+=-shared \ - ---- a/utils/aflpp_driver/GNUmakefile -+++ b/utils/aflpp_driver/GNUmakefile -@@ -7,7 +7,7 @@ ifneq "" "$(LLVM_BINDIR)" - LLVM_BINDIR := $(LLVM_BINDIR)/ - endif - --CFLAGS := -O3 -funroll-loops -g -fPIC -+CFLAGS ?= -O3 -funroll-loops -g -fPIC - - all: libAFLDriver.a libAFLQemuDriver.a aflpp_qemu_driver_hook.so - diff --git a/app-forensics/aide/Manifest b/app-forensics/aide/Manifest index a2aadd38e2c3..50d4b98fc6ec 100644 --- a/app-forensics/aide/Manifest +++ b/app-forensics/aide/Manifest @@ -1 +1,5 @@ DIST aide-0.17.4.tar.gz 331783 BLAKE2B 584a385d0a0e80edf0b89eef202431adfea7fe8ba04c774e49dfb7230e766e19a48572e9d6c80386668572e459db9770b04978df484bd49c7de6433657500e13 SHA512 b6dba54fd204e1899d47b0b4139786cbeaa51c388027e2cfc1bb839297a70ae8ad6f37429594a730fac8007d62b4ba5b61a4aa22edbc55cbe986ccfaf5197f31 +DIST aide-0.18.2.tar.gz 382582 BLAKE2B 267233a4dfdbc5a433389c20a1abe753133dfa01ecc205769c89a9b4699535b1d00e9df6527ae8298f4cb920e2f755e4d75d17b4a2449041a85c8c5e5ecc2abc SHA512 3a209db9dc1adb345494ce20a5c3def9f40ae49723d3a978d8e9b38f43239496a330b484ed93adba88154770ce1f1a0f3cdeb2ff8d991d28a1d66cfa6cd9b68b +DIST aide-0.18.3.tar.gz 382694 BLAKE2B f5e79d80c1fa2ba15096d38c1a1d197fc8665bc0ff03665367abce7722561f2054cc64f51429a1411d6aaa0df315869ac99314e660acdff31bf1dc6b471a62b8 SHA512 22f1d2d3e14fa88639587f5a61e114b89c784a87f636c1bbb245e620254b60ec07692e51ae27386a84810d7a915e0ddf5c5073fecb6eb72148ff5035ef8525eb +DIST aide-0.18.4.tar.gz 382874 BLAKE2B e8fe8a115236f055f24b907ddcf540f02658b85c1df99ff9a8f58dfa9489de3d542b25bb947e047c8363c81d1f0ad0730fd77efacabe15fa24bbafc3fd807687 SHA512 31a17fc97ed9bda5dc4a492bcee699442cee1ea3829b1b06cf91ef9234a8b033677c281979902cbc6a8db0269c7f00499897940df07beff14cbb88b8fe6390f5 +DIST aide-0.18.tar.gz 375922 BLAKE2B 03c961682fd25581831ca0715e57546b5595057115a456778ac0846fd1f23622600a061e2d8524f7381dfa6d43cefcdaa52d00eed2639dd60c7f3501efe8b474 SHA512 99d8140523ebe1d80b5d73c20bf13b8559aa22f08a9df485c15daeba7f5448c27d86ed310f2e7963076958dbe1fc2e4636807ca073dd0a6568b4eb8af2a38f4b diff --git a/app-forensics/aide/aide-0.17.4-r2.ebuild b/app-forensics/aide/aide-0.17.4-r4.ebuild index eee74dece344..71aa7366350b 100644 --- a/app-forensics/aide/aide-0.17.4-r2.ebuild +++ b/app-forensics/aide/aide-0.17.4-r4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -12,9 +12,10 @@ SRC_URI="https://github.com/aide/aide/releases/download/v${PV}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~arm64 x86" -IUSE="acl audit curl e2fs mhash selinux xattr zlib" +IUSE="acl audit curl e2fs mhash selinux xattr" DEPEND="dev-libs/libpcre + sys-libs/zlib acl? ( virtual/acl ) audit? ( sys-process/audit ) curl? ( net-misc/curl ) @@ -25,12 +26,11 @@ DEPEND="dev-libs/libpcre ) mhash? ( app-crypt/mhash ) selinux? ( sys-libs/libselinux ) - xattr? ( sys-apps/attr ) - zlib? ( sys-libs/zlib )" + xattr? ( sys-apps/attr )" RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-aide )" -BDEPEND="sys-devel/bison - sys-devel/flex +BDEPEND="app-alternatives/yacc + app-alternatives/lex virtual/pkgconfig" DISABLE_AUTOFORMATTING=1 @@ -44,7 +44,7 @@ management easier. Please run 'aideinit --help' for more information." PATCHES=( "${FILESDIR}"/${PN}-0.16-fix-acl-configure-option.patch - "${FILESDIR}"/${PN}-0.17.4-bashism.patch + "${FILESDIR}"/${PN}-0.17.4-configure.patch ) src_prepare() { @@ -65,12 +65,16 @@ src_configure() { local myeconfargs=( --sysconfdir="${EPREFIX}"/etc/${PN} + # Needed even in EAPI=8, >=portage-3.0.40 skips it here (bug #887177) + --disable-static + # Disable broken l10n support: https://sourceforge.net/p/aide/bugs/98/ # This doesn't affect anything because there are no localizations yet. --without-locale --without-prelink - $(use_with zlib) + + --with-zlib $(use_with curl) $(use_with acl posix-acl) $(use_with selinux) diff --git a/app-forensics/aide/aide-0.18.2.ebuild b/app-forensics/aide/aide-0.18.2.ebuild new file mode 100644 index 000000000000..d444643eab3b --- /dev/null +++ b/app-forensics/aide/aide-0.18.2.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit readme.gentoo-r1 + +DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a file integrity checker" +HOMEPAGE="https://aide.github.io/ https://github.com/aide/aide" +SRC_URI="https://github.com/aide/aide/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86" +IUSE="acl audit curl e2fs mhash selinux xattr" + +DEPEND=" + dev-libs/libpcre2 + sys-libs/zlib + acl? ( virtual/acl ) + audit? ( sys-process/audit ) + curl? ( net-misc/curl ) + e2fs? ( sys-fs/e2fsprogs ) + !mhash? ( + dev-libs/libgcrypt:= + dev-libs/libgpg-error + ) + mhash? ( app-crypt/mhash ) + selinux? ( sys-libs/libselinux ) + xattr? ( sys-apps/attr ) +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-aide ) +" +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig +" + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS=" +Example configuration file was installed at '${EPREFIX}/etc/aide/aide.conf'. +Please edit it to meet your needs. Refer to aide.conf(5) manual page +for more information. + +A helper script, aideinit, was installed and can be used to make AIDE +management easier. Please run 'aideinit --help' for more information." + +src_prepare() { + default + + sed -i -e 's| -Werror||g' configure.ac || die + + # Only needed for snapshots. + if [[ ${PV} == *_p* ]] ; then + echo "m4_define([AIDE_VERSION], [${PV}])" > version.m4 || die + fi +} + +src_configure() { + # Needs Bison, flex + unset YACC + export LEX=flex + + local myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/${PN} + + # Needed even in EAPI=8, >=portage-3.0.40 skips it here (bug #887177) + --disable-static + + # Disable broken l10n support: https://sourceforge.net/p/aide/bugs/98/ + # This doesn't affect anything because there are no localizations yet. + --without-locale + + --with-zlib + $(use_with curl) + $(use_with acl posix-acl) + $(use_with selinux) + $(use_with xattr) + $(use_with e2fs e2fsattrs) + $(use_with mhash mhash) + $(use_with !mhash gcrypt) + $(use_with audit) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + readme.gentoo_create_doc + + insinto /etc/${PN} + insopts -m0600 + newins "${FILESDIR}"/aide.conf-r2 aide.conf + + dosbin "${FILESDIR}"/aideinit + dodoc -r contrib/ "${FILESDIR}"/aide.cron-r2 + + keepdir /var/{lib,log}/${PN} +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/app-forensics/aide/aide-0.18.3.ebuild b/app-forensics/aide/aide-0.18.3.ebuild new file mode 100644 index 000000000000..d7e4d4b1948d --- /dev/null +++ b/app-forensics/aide/aide-0.18.3.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit readme.gentoo-r1 + +DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a file integrity checker" +HOMEPAGE="https://aide.github.io/ https://github.com/aide/aide" +SRC_URI="https://github.com/aide/aide/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86" +IUSE="acl audit curl e2fs mhash selinux xattr" + +DEPEND=" + dev-libs/libpcre2 + sys-libs/zlib + acl? ( virtual/acl ) + audit? ( sys-process/audit ) + curl? ( net-misc/curl ) + e2fs? ( sys-fs/e2fsprogs ) + !mhash? ( + dev-libs/libgcrypt:= + dev-libs/libgpg-error + ) + mhash? ( app-crypt/mhash ) + selinux? ( sys-libs/libselinux ) + xattr? ( sys-apps/attr ) +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-aide ) +" +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig +" + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS=" +Example configuration file was installed at '${EPREFIX}/etc/aide/aide.conf'. +Please edit it to meet your needs. Refer to aide.conf(5) manual page +for more information. + +A helper script, aideinit, was installed and can be used to make AIDE +management easier. Please run 'aideinit --help' for more information." + +src_prepare() { + default + + # Only needed for snapshots. + if [[ ${PV} == *_p* ]] ; then + echo "m4_define([AIDE_VERSION], [${PV}])" > version.m4 || die + fi +} + +src_configure() { + # Needs Bison, flex + unset YACC + export LEX=flex + + local myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/${PN} + + # Needed even in EAPI=8, >=portage-3.0.40 skips it here (bug #887177) + --disable-static + + # Disable broken l10n support: https://sourceforge.net/p/aide/bugs/98/ + # This doesn't affect anything because there are no localizations yet. + --without-locale + + --with-zlib + $(use_with curl) + $(use_with acl posix-acl) + $(use_with selinux) + $(use_with xattr) + $(use_with e2fs e2fsattrs) + $(use_with mhash mhash) + $(use_with !mhash gcrypt) + $(use_with audit) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + readme.gentoo_create_doc + + insinto /etc/${PN} + insopts -m0600 + newins "${FILESDIR}"/aide.conf-r2 aide.conf + + dosbin "${FILESDIR}"/aideinit + dodoc -r contrib/ "${FILESDIR}"/aide.cron-r2 + + keepdir /var/{lib,log}/${PN} +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/app-forensics/aide/aide-0.18.4.ebuild b/app-forensics/aide/aide-0.18.4.ebuild new file mode 100644 index 000000000000..d7e4d4b1948d --- /dev/null +++ b/app-forensics/aide/aide-0.18.4.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit readme.gentoo-r1 + +DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a file integrity checker" +HOMEPAGE="https://aide.github.io/ https://github.com/aide/aide" +SRC_URI="https://github.com/aide/aide/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86" +IUSE="acl audit curl e2fs mhash selinux xattr" + +DEPEND=" + dev-libs/libpcre2 + sys-libs/zlib + acl? ( virtual/acl ) + audit? ( sys-process/audit ) + curl? ( net-misc/curl ) + e2fs? ( sys-fs/e2fsprogs ) + !mhash? ( + dev-libs/libgcrypt:= + dev-libs/libgpg-error + ) + mhash? ( app-crypt/mhash ) + selinux? ( sys-libs/libselinux ) + xattr? ( sys-apps/attr ) +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-aide ) +" +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig +" + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS=" +Example configuration file was installed at '${EPREFIX}/etc/aide/aide.conf'. +Please edit it to meet your needs. Refer to aide.conf(5) manual page +for more information. + +A helper script, aideinit, was installed and can be used to make AIDE +management easier. Please run 'aideinit --help' for more information." + +src_prepare() { + default + + # Only needed for snapshots. + if [[ ${PV} == *_p* ]] ; then + echo "m4_define([AIDE_VERSION], [${PV}])" > version.m4 || die + fi +} + +src_configure() { + # Needs Bison, flex + unset YACC + export LEX=flex + + local myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/${PN} + + # Needed even in EAPI=8, >=portage-3.0.40 skips it here (bug #887177) + --disable-static + + # Disable broken l10n support: https://sourceforge.net/p/aide/bugs/98/ + # This doesn't affect anything because there are no localizations yet. + --without-locale + + --with-zlib + $(use_with curl) + $(use_with acl posix-acl) + $(use_with selinux) + $(use_with xattr) + $(use_with e2fs e2fsattrs) + $(use_with mhash mhash) + $(use_with !mhash gcrypt) + $(use_with audit) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + readme.gentoo_create_doc + + insinto /etc/${PN} + insopts -m0600 + newins "${FILESDIR}"/aide.conf-r2 aide.conf + + dosbin "${FILESDIR}"/aideinit + dodoc -r contrib/ "${FILESDIR}"/aide.cron-r2 + + keepdir /var/{lib,log}/${PN} +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/app-forensics/aide/aide-0.18.ebuild b/app-forensics/aide/aide-0.18.ebuild new file mode 100644 index 000000000000..d444643eab3b --- /dev/null +++ b/app-forensics/aide/aide-0.18.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit readme.gentoo-r1 + +DESCRIPTION="AIDE (Advanced Intrusion Detection Environment) is a file integrity checker" +HOMEPAGE="https://aide.github.io/ https://github.com/aide/aide" +SRC_URI="https://github.com/aide/aide/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm64 x86" +IUSE="acl audit curl e2fs mhash selinux xattr" + +DEPEND=" + dev-libs/libpcre2 + sys-libs/zlib + acl? ( virtual/acl ) + audit? ( sys-process/audit ) + curl? ( net-misc/curl ) + e2fs? ( sys-fs/e2fsprogs ) + !mhash? ( + dev-libs/libgcrypt:= + dev-libs/libgpg-error + ) + mhash? ( app-crypt/mhash ) + selinux? ( sys-libs/libselinux ) + xattr? ( sys-apps/attr ) +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-aide ) +" +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig +" + +DISABLE_AUTOFORMATTING=1 +DOC_CONTENTS=" +Example configuration file was installed at '${EPREFIX}/etc/aide/aide.conf'. +Please edit it to meet your needs. Refer to aide.conf(5) manual page +for more information. + +A helper script, aideinit, was installed and can be used to make AIDE +management easier. Please run 'aideinit --help' for more information." + +src_prepare() { + default + + sed -i -e 's| -Werror||g' configure.ac || die + + # Only needed for snapshots. + if [[ ${PV} == *_p* ]] ; then + echo "m4_define([AIDE_VERSION], [${PV}])" > version.m4 || die + fi +} + +src_configure() { + # Needs Bison, flex + unset YACC + export LEX=flex + + local myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/${PN} + + # Needed even in EAPI=8, >=portage-3.0.40 skips it here (bug #887177) + --disable-static + + # Disable broken l10n support: https://sourceforge.net/p/aide/bugs/98/ + # This doesn't affect anything because there are no localizations yet. + --without-locale + + --with-zlib + $(use_with curl) + $(use_with acl posix-acl) + $(use_with selinux) + $(use_with xattr) + $(use_with e2fs e2fsattrs) + $(use_with mhash mhash) + $(use_with !mhash gcrypt) + $(use_with audit) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + readme.gentoo_create_doc + + insinto /etc/${PN} + insopts -m0600 + newins "${FILESDIR}"/aide.conf-r2 aide.conf + + dosbin "${FILESDIR}"/aideinit + dodoc -r contrib/ "${FILESDIR}"/aide.cron-r2 + + keepdir /var/{lib,log}/${PN} +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/app-forensics/aide/files/aide-0.17.4-bashism.patch b/app-forensics/aide/files/aide-0.17.4-bashism.patch deleted file mode 100644 index e25463dbf772..000000000000 --- a/app-forensics/aide/files/aide-0.17.4-bashism.patch +++ /dev/null @@ -1,60 +0,0 @@ -Fixed upstream, so backport to 0.17.4 of -https://github.com/aide/aide/commit/5161886c49060228811eee6da319844ef62dff6d -https://github.com/aide/aide/commit/007eb4f32e8874ce457b4f15d9789c2a9d61731b - -Fixed in master but not 0.17.x. ---- a/configure.ac -+++ b/configure.ac -@@ -329,7 +329,7 @@ fi - AC_CHECK_HEADERS(syslog.h inttypes.h fcntl.h ctype.h) - - PCRELIB="-lpcre" --if test "$aide_static_choice" == "yes"; then -+if test "$aide_static_choice" = "yes"; then - PCRELIB="$PCRELIB -pthread" - fi - AC_CHECK_LIB(pcre, pcre_exec, [ -@@ -426,14 +426,14 @@ AS_IF([test "x$with_selinux_support" != xno], - AC_DEFINE(WITH_SELINUX,1,[use SELinux]) - [AC_MSG_RESULT(yes) - if test "x$PKG_CONFIG" != xno && $PKG_CONFIG --exists libselinux; then -- if test "$aide_static_choice" == "yes"; then -+ if test "$aide_static_choice" = "yes"; then - SELINUXLIB=$(${PKG_CONFIG} --libs libselinux --static) - else - SELINUXLIB=$(${PKG_CONFIG} --libs libselinux) - fi - else - SELINUXLIB="-lselinux" -- if test "$aide_static_choice" == "yes"; then -+ if test "$aide_static_choice" = "yes"; then - saveLIBS=$LIBS - LIBS="-static $SELINUXLIB" - AC_SEARCH_LIBS([lgetfilecon_raw], [], [], [SELINUXLIB="$SELINUXLIB -lpthread"]) -@@ -555,7 +555,7 @@ AC_ARG_ENABLE([default_db], - [do not set default values for database_in and database_out config options]), - [enable_default_db=$enableval],[enable_default_db=yes]) - --if test "$enable_default_db" == "yes"; then -+if test "$enable_default_db" = "yes"; then - - if test "x$sysconfdir" != x'${prefix}/etc'; then - evalled_sysconfdir=`eval echo "$sysconfdir"` -@@ -592,7 +592,7 @@ AC_ARG_WITH([curl], - [use curl library for http, https and ftp database backend (default: no)]), - [with_curl=$withval], [with_curl=no]) - AS_IF([test "x$with_curl" = "xyes"], [ -- if test "$aide_static_choice" == "yes"; then -+ if test "$aide_static_choice" = "yes"; then - PKG_CHECK_MODULES_STATIC(CURL, [libcurl], , [AC_MSG_RESULT([libcurl not found by pkg-config - Try --without-curl or add directory containing libcurl.pc to PKG_CONFIG_PATH environment variable])]) - else - PKG_CHECK_MODULES(CURL, [libcurl], , [AC_MSG_RESULT([libcurl not found by pkg-config - Try --without-curl or add directory containing libcurl.pc to PKG_CONFIG_PATH environment variable])]) -@@ -671,7 +671,7 @@ AS_IF([test "x$with_audit" != xno], - AC_MSG_ERROR(You don't have libaudit properly installed. Install it if you need it.) - ) - AUDITLIB="-laudit" -- if test "$aide_static_choice" == "yes"; then -+ if test "$aide_static_choice" = "yes"; then - saveLIBS=$LIBS - LIBS="-static $AUDITLIB" - AC_CHECK_LIB([audit], [audit_log_user_message], [], [ diff --git a/app-forensics/aide/files/aide-0.17.4-configure.patch b/app-forensics/aide/files/aide-0.17.4-configure.patch new file mode 100644 index 000000000000..adf9925d9458 --- /dev/null +++ b/app-forensics/aide/files/aide-0.17.4-configure.patch @@ -0,0 +1,131 @@ +https://github.com/aide/aide/pull/145 +https://bugs.gentoo.org/881707 + +From 0a7f36406f3f21e4fcdc0c410ff626c352f2d080 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Fri, 18 Nov 2022 00:04:10 +0000 +Subject: [PATCH 1/2] Fix bashisms in build system +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +configure scripts need to be runnable with a POSIX-compliant /bin/sh. + +On many (but not all!) systems, /bin/sh is provided by Bash, so errors +like this aren't spotted. Notably Debian defaults to /bin/sh provided +by dash which doesn't tolerate such bashisms as '=='. + +This retains compatibility with bash. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/configure.ac ++++ b/configure.ac +@@ -329,7 +329,7 @@ fi + AC_CHECK_HEADERS(syslog.h inttypes.h fcntl.h ctype.h) + + PCRELIB="-lpcre" +-if test "$aide_static_choice" == "yes"; then ++if test "$aide_static_choice" = "yes"; then + PCRELIB="$PCRELIB -pthread" + fi + AC_CHECK_LIB(pcre, pcre_exec, [ +@@ -426,14 +426,14 @@ AS_IF([test "x$with_selinux_support" != xno], + AC_DEFINE(WITH_SELINUX,1,[use SELinux]) + [AC_MSG_RESULT(yes) + if test "x$PKG_CONFIG" != xno && $PKG_CONFIG --exists libselinux; then +- if test "$aide_static_choice" == "yes"; then ++ if test "$aide_static_choice" = "yes"; then + SELINUXLIB=$(${PKG_CONFIG} --libs libselinux --static) + else + SELINUXLIB=$(${PKG_CONFIG} --libs libselinux) + fi + else + SELINUXLIB="-lselinux" +- if test "$aide_static_choice" == "yes"; then ++ if test "$aide_static_choice" = "yes"; then + saveLIBS=$LIBS + LIBS="-static $SELINUXLIB" + AC_SEARCH_LIBS([lgetfilecon_raw], [], [], [SELINUXLIB="$SELINUXLIB -lpthread"]) +@@ -555,7 +555,7 @@ AC_ARG_ENABLE([default_db], + [do not set default values for database_in and database_out config options]), + [enable_default_db=$enableval],[enable_default_db=yes]) + +-if test "$enable_default_db" == "yes"; then ++if test "$enable_default_db" = "yes"; then + + if test "x$sysconfdir" != x'${prefix}/etc'; then + evalled_sysconfdir=`eval echo "$sysconfdir"` +@@ -592,7 +592,7 @@ AC_ARG_WITH([curl], + [use curl library for http, https and ftp database backend (default: no)]), + [with_curl=$withval], [with_curl=no]) + AS_IF([test "x$with_curl" = "xyes"], [ +- if test "$aide_static_choice" == "yes"; then ++ if test "$aide_static_choice" = "yes"; then + PKG_CHECK_MODULES_STATIC(CURL, [libcurl], , [AC_MSG_RESULT([libcurl not found by pkg-config - Try --without-curl or add directory containing libcurl.pc to PKG_CONFIG_PATH environment variable])]) + else + PKG_CHECK_MODULES(CURL, [libcurl], , [AC_MSG_RESULT([libcurl not found by pkg-config - Try --without-curl or add directory containing libcurl.pc to PKG_CONFIG_PATH environment variable])]) +@@ -671,7 +671,7 @@ AS_IF([test "x$with_audit" != xno], + AC_MSG_ERROR(You don't have libaudit properly installed. Install it if you need it.) + ) + AUDITLIB="-laudit" +- if test "$aide_static_choice" == "yes"; then ++ if test "$aide_static_choice" = "yes"; then + saveLIBS=$LIBS + LIBS="-static $AUDITLIB" + AC_CHECK_LIB([audit], [audit_log_user_message], [], [ + +From 67ad6efc7596c9b3ffdeb411bae942d757e2d96f Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Fri, 18 Nov 2022 00:04:53 +0000 +Subject: [PATCH 2/2] Fix configure.ac compatibility with Clang 16 + +Clang 16 makes -Wimplicit-function-declaration and -Wimplicit-int errors by default. + +Unfortunately, this can lead to misconfiguration or miscompilation of software as configure +tests may then return the wrong result. + +We also fix -Wstrict-prototypes while here as it's easy to do and it prepares +us for C23. + +For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki [2], +or the (new) c-std-porting mailing list [3]. + +[0] https://lwn.net/Articles/913505/ +[1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 +[2] https://wiki.gentoo.org/wiki/Modern_C_porting +[3] hosted at lists.linux.dev. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/configure.ac ++++ b/configure.ac +@@ -295,8 +295,11 @@ AC_CHECK_FUNCS(fcntl ftruncate posix_fadvise asprintf snprintf \ + AC_CACHE_CHECK([for open/O_NOATIME], db_cv_open_o_noatime, [ + echo "test for working open/O_NOATIME" > __o_noatime_file + AC_TRY_RUN([ +-#include <sys/types.h> + #include <fcntl.h> ++#include <stdlib.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <unistd.h> + #ifndef O_NOATIME + #if defined(__linux__) && (defined(__i386__) || defined(__PPC__)) + #define O_NOATIME 01000000 +@@ -304,13 +307,14 @@ AC_TRY_RUN([ + #define O_NOATIME 0 + #endif + #endif +-main() { ++int main(void) { + int c, fd = open("__o_noatime_file", O_RDONLY | O_NOATIME, 0); + exit ((!O_NOATIME) || (fd == -1) || (read(fd, &c, 1) != 1)); + }], [db_cv_open_o_noatime=yes], [db_cv_open_o_noatime=no], + AC_TRY_LINK([ +-#include <sys/types.h> + #include <fcntl.h> ++#include <sys/types.h ++#include <sys/stat.h> + #ifndef O_NOATIME + #if defined(__linux__) && (defined(__i386__) || defined(__PPC__)) + #define O_NOATIME 01000000 + diff --git a/app-forensics/chkrootkit/Manifest b/app-forensics/chkrootkit/Manifest index f0bd77cfc441..b797fbd24363 100644 --- a/app-forensics/chkrootkit/Manifest +++ b/app-forensics/chkrootkit/Manifest @@ -2,3 +2,5 @@ DIST chkrootkit-0.54-gentoo.diff.xz 4848 BLAKE2B 25d1736bb839533fae36550518b311e DIST chkrootkit-0.54.tar.gz 41461 BLAKE2B 61384fda7db08ca2a52ab060ee4ea3edb7311cb9908599a511459dac22340f28e75d732b10d827aaeed89a1ecb6fc7f69ab8fef970aae5a73bae8c7949944831 SHA512 fe8955ac33abaabf304f5580b6f12929f8bf02329ab442380eaa6298440cf1cb0eee2db8e5667ea7d78b89ee2bceb82c10ebb732a71d6bcdda9400569cd587fd DIST chkrootkit-0.55-gentoo.patch.bz2 5028 BLAKE2B f8f809252d89b9195601953c6741c9a653b658d86669f149380dc94da91085921f58fef7e6f232cc421cf62f7321630120a85ec4dfdf369d6e92c0a7ae81e0f1 SHA512 bdae4fed6f8c61337e855235bf84b20faa363a3dfad9b2f22a017bd232aaf7f4bc0680f2b5567d6545ef3cb6ce7d41cc2287f4f0a2baf68ce3c56c68df8c77b8 DIST chkrootkit-0.55.tar.gz 42630 BLAKE2B 0e6bc4d411a7836cd8ab72782027e5bd80b5c8845d8de1f48ff57bc0617a368cff2471835a66c30d007f4cfc243639110e0c39e02eecc3ec9c5c0a66a4b7891b SHA512 742dca90a761ecff149d8704cb3a252adfe8f9d5e15dd060e9db4d5f6dcd3820933ae13cbee99ea5a8c6144932cf97c0616a177af3ba5a1726b51bb304e7d63e +DIST chkrootkit-0.57-gentoo.patch.bz2 5143 BLAKE2B 2b6018881b12121d6317f45d1b761a0b27e13bcfe4d936a468a13968357039419bb85650a4e0aa85f475226cd196fc17d3bac1222dc5be39f715c3d01a64b8a6 SHA512 21a389bfe1fc838cbf527db107ac7081ad61a90da04ab96d7a1bdd352f1e40745b0a5e31559fde7ff8f4214718510a281f9eb67de38df33f13b9ac2e3c640251 +DIST chkrootkit-0.57.tar.gz 41948 BLAKE2B b75bec7e5f582aad363c84308c57de9881facf0176ef8c32adcdffdb04182f248b1dcc40b6df439bb9014580383b7f43e7503877098e8ecba6740c21b46b23a1 SHA512 ff35f01042bc68bdd10c4e26dbde7af7127768442c7a10f114260188dcc7e357e2c48d157c0b83b99e2fd465db3ed3933c84ae12fa411c5c28f64b955e742ff7 diff --git a/app-forensics/chkrootkit/chkrootkit-0.57.ebuild b/app-forensics/chkrootkit/chkrootkit-0.57.ebuild new file mode 100644 index 000000000000..7424ed154276 --- /dev/null +++ b/app-forensics/chkrootkit/chkrootkit-0.57.ebuild @@ -0,0 +1,70 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd toolchain-funcs + +GENTOO_PATCH="${P}-gentoo.patch" + +DESCRIPTION="Tool to locally check for signs of a rootkit" +HOMEPAGE="http://www.chkrootkit.org/" +SRC_URI="ftp://chkrootkit.org/pub/seg/pac/${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~tupone/distfiles/${CATEGORY}/${PN}/${GENTOO_PATCH}.bz2" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" +IUSE="+cron" + +RDEPEND="cron? ( virtual/cron )" + +PATCHES=( + "${WORKDIR}/${P}-gentoo.patch" + "${FILESDIR}/${PN}-0.55-fcntl_h.patch" + "${FILESDIR}/${PN}-0.55-limits_h.patch" +) + +src_prepare() { + default + + sed -e 's:/var/adm/:/var/log/:g' \ + -i chklastlog.c || die +} + +src_compile() { + emake CC="$(tc-getCC)" STRIP=/bin/true sense +} + +src_install() { + dosbin chkdirs chklastlog chkproc chkrootkit chkwtmp chkutmp ifpromisc strings-static + dodoc ACKNOWLEDGMENTS README* + + if use cron ; then + exeinto /etc/cron.weekly + newexe "${FILESDIR}"/${PN}.cron ${PN} + fi + + systemd_dounit "${FILESDIR}/${PN}.timer" "${FILESDIR}/${PN}.service" +} + +pkg_postinst() { + if use cron ; then + elog + elog "Edit ${EROOT}/etc/cron.weekly/chkrootkit to activate chkrootkit!" + elog + fi + + if systemd_is_booted || has_version sys-apps/systemd ; then + elog + elog "To enable the systemd timer, run the following command:" + elog " systemctl enable --now chkrootkit.timer" + elog + fi + + elog + elog "Some applications, such as portsentry, will cause chkrootkit" + elog "to produce false positives. Read the chkrootkit FAQ at" + elog "http://www.chkrootkit.org/ for more information." + elog +} diff --git a/app-forensics/dfxml/dfxml-20170921-r1.ebuild b/app-forensics/dfxml/dfxml-20170921-r2.ebuild index d291bbf43c4d..2cd2be159d72 100644 --- a/app-forensics/dfxml/dfxml-20170921-r1.ebuild +++ b/app-forensics/dfxml/dfxml-20170921-r2.ebuild @@ -1,33 +1,28 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 + inherit autotools DESCRIPTION="Digital Forensics XML" HOMEPAGE="https://github.com/simsong/dfxml" SRC_URI="https://api.github.com/repos/simsong/${PN}/tarball/7d11eaa7da8d31f588ce8aecb4b4f5e7e8169ba6 -> ${P}.tar.gz" +S="${WORKDIR}/${P}/src" LICENSE="LGPL-3" SLOT="0" KEYWORDS="~amd64" -DEPEND=" - dev-libs/expat -" -RDEPEND=" - ${DEPEND} -" - -S=${WORKDIR}/${P}/src +DEPEND="dev-libs/expat:=" +RDEPEND="${DEPEND}" src_unpack() { - unpack ${A} + default mv simsong-dfxml-* ${P} || die } src_prepare() { default - eautoreconf } diff --git a/app-forensics/dfxml/dfxml-99999999.ebuild b/app-forensics/dfxml/dfxml-99999999.ebuild deleted file mode 100644 index c51103649341..000000000000 --- a/app-forensics/dfxml/dfxml-99999999.ebuild +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit autotools git-r3 - -DESCRIPTION="Digital Forensics XML" -HOMEPAGE="https://github.com/simsong/dfxml" -EGIT_REPO_URI="https://github.com/simsong/dfxml" - -LICENSE="LGPL-3" -SLOT="0" -KEYWORDS="" - -DEPEND=" - dev-libs/expat -" -RDEPEND=" - ${DEPEND} -" - -S=${WORKDIR}/${P}/src - -src_prepare() { - default - - eautoreconf -} diff --git a/app-forensics/dfxml/metadata.xml b/app-forensics/dfxml/metadata.xml index c73b0839b368..3e4ac58b16c2 100644 --- a/app-forensics/dfxml/metadata.xml +++ b/app-forensics/dfxml/metadata.xml @@ -1,7 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="project"> -<email>netmon@gentoo.org</email> -</maintainer> + <maintainer type="project"> + <email>netmon@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">simsong/dfxml</remote-id> + </upstream> </pkgmetadata> diff --git a/app-forensics/foremost/files/foremost-1.5.7-musl.patch b/app-forensics/foremost/files/foremost-1.5.7-musl.patch new file mode 100644 index 000000000000..18bca055c584 --- /dev/null +++ b/app-forensics/foremost/files/foremost-1.5.7-musl.patch @@ -0,0 +1,33 @@ +Index: foremost-1.5.7/main.c +=================================================================== +--- foremost-1.5.7.orig/main.c ++++ foremost-1.5.7/main.c +@@ -232,9 +232,7 @@ int main(int argc, char **argv) + char **temp = argv; + DIR* dir; + +-#ifndef __GLIBC__ +- __progname = basename(argv[0]); +-#endif ++ char * __progname = basename(argv[0]); + + /*Initialize the global state struct*/ + if (initialize_state(s, argc, argv)) +Index: foremost-1.5.7/main.h +=================================================================== +--- foremost-1.5.7.orig/main.h ++++ foremost-1.5.7/main.h +@@ -187,12 +187,8 @@ int getopt(int argc, char *const argv[], + #endif /* ifdef _WIN32 */
+
+
+-/* On non-glibc systems we have to manually set the __progname variable */
+-#ifdef __GLIBC__
++/* On non-GNU systems we have to manually set the __progname variable */
+ extern char *__progname;
+-#else
+-char *__progname;
+-#endif /* ifdef __GLIBC__ */
+
+ /* -----------------------------------------------------------------
+ Program Defaults
diff --git a/app-forensics/foremost/foremost-1.5.7-r3.ebuild b/app-forensics/foremost/foremost-1.5.7-r4.ebuild index c3742c315533..0f553f7f35d8 100644 --- a/app-forensics/foremost/foremost-1.5.7-r3.ebuild +++ b/app-forensics/foremost/foremost-1.5.7-r4.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit toolchain-funcs +inherit toolchain-funcs prefix DESCRIPTION="Console program to recover files based on their headers and footers" HOMEPAGE="http://foremost.sourceforge.net/" @@ -13,19 +13,26 @@ SRC_URI="http://foremost.sourceforge.net/pkg/${P}.tar.gz" LICENSE="public-domain" SLOT="0" -KEYWORDS="amd64 ppc x86" -IUSE="" +KEYWORDS="amd64 ppc x86 ~arm64-macos ~x64-macos" -PATCHES=( - "${FILESDIR}/${PN}-1.4-config-location.patch" - "${FILESDIR}/${PN}-1.5.7-format-security.patch" # bug 521038 - "${FILESDIR}/${PN}-1.5.7-set-but-unused.patch" # bug 706886 - "${FILESDIR}/${PN}-1.5.7-fno-common.patch" # bug 722196 -) +src_prepare() { + PATCHES=( + "${FILESDIR}/${PN}-1.4-config-location.patch" + "${FILESDIR}/${PN}-1.5.7-format-security.patch" # bug 521038 + "${FILESDIR}/${PN}-1.5.7-set-but-unused.patch" # bug 706886 + "${FILESDIR}/${PN}-1.5.7-fno-common.patch" # bug 722196 + "${FILESDIR}/${PN}-1.5.7-musl.patch" # bug 830473 + ) + + default + hprefixify config.c +} src_compile() { + # see also bug 906187 + emake \ - RAW_FLAGS="${CFLAGS} -Wall ${LDFLAGS}" \ + RAW_FLAGS="${CFLAGS} -Wall ${LDFLAGS} -D_LARGEFILE64_SOURCE" \ RAW_CC="$(tc-getCC) -DVERSION=\\\"${PV}\\\"" \ CONF=/etc } diff --git a/app-forensics/galleta/galleta-20040505_p1.ebuild b/app-forensics/galleta/galleta-20040505_p1-r1.ebuild index 9192b6bdb8cb..6125303a4df7 100644 --- a/app-forensics/galleta/galleta-20040505_p1.ebuild +++ b/app-forensics/galleta/galleta-20040505_p1-r1.ebuild @@ -1,22 +1,21 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 inherit toolchain-funcs -MY_P=${PN}_${PV/_p/_} +MY_P="${PN}_${PV/_p/_}" DESCRIPTION="IE Cookie Parser" HOMEPAGE="https://sourceforge.net/projects/odessa/" SRC_URI="mirror://sourceforge/odessa/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}/src" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~ppc x86" -IUSE="" -S=${WORKDIR}/${MY_P}/src PATCHES=( "${FILESDIR}"/${P}-fix-build-system.patch "${FILESDIR}"/${P}-Wimplicit-function-declaration.patch diff --git a/app-forensics/honggfuzz/Manifest b/app-forensics/honggfuzz/Manifest index 4fcf6705c343..c7ef97138e2c 100644 --- a/app-forensics/honggfuzz/Manifest +++ b/app-forensics/honggfuzz/Manifest @@ -1 +1,2 @@ DIST honggfuzz-2.5.tar.gz 65224877 BLAKE2B 610a15a674cfa928eb4b4d9fda91e5494fe08be4b01857f390c36925872479c77b5424c06ed4df87ad791de29598d848d88eb5437d6f5f9bf9521ff67aaa5ded SHA512 d1ff23471372a3d9d62de768bda8beba0e75c49f9550bc106efb4ab49ea626c1ccc078f7a9950051a99fbc841615a81faae2c3b39270facd6c0064e28956c419 +DIST honggfuzz-2.6.tar.gz 65227315 BLAKE2B 527d36dd66974b74be29e3dc22e22c893d0e35654a768bfd93c6a919de82841cc1552af2b479ac0d65ce2fcfd66886ca0e43bc95db5b8187c8d13191e65de320 SHA512 cdd97b65e679652be888b966e2c010fe29af262e88d6c94b94b2e78c88258c5c53b4928fdf9e8afe54029c0742c5dfb0f6f8e8cb8157093e7f5ffdcfa5c92fd4 diff --git a/app-forensics/honggfuzz/files/honggfuzz-2.5_binutils239.patch b/app-forensics/honggfuzz/files/honggfuzz-2.5_binutils239.patch new file mode 100644 index 000000000000..af574bc495a0 --- /dev/null +++ b/app-forensics/honggfuzz/files/honggfuzz-2.5_binutils239.patch @@ -0,0 +1,51 @@ +From 23c3da7ea63e4a841fa0e181d173e16b437adff0 Mon Sep 17 00:00:00 2001 +From: Robert Swiecki <robert@swiecki.net> +Date: Thu, 2 Jun 2022 23:17:49 +0200 +Subject: [PATCH] Always pass 4 arguments to init_disassemble_info(), no matter + what's the declaration. binutils/libopcode offers an unstable interface + +--- + linux/bfd.c | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/linux/bfd.c b/linux/bfd.c +index 228365f69..236f050ec 100644 +--- a/linux/bfd.c ++++ b/linux/bfd.c +@@ -197,6 +197,24 @@ static int arch_bfdFPrintF(void* buf, const char* fmt, ...) { + return ret; + } + ++static int arch_bfdFPrintFStyled(void* buf, int style HF_ATTR_UNUSED, const char* fmt, ...) { ++ va_list args; ++ va_start(args, fmt); ++ int ret = util_vssnprintf(buf, _HF_INSTR_SZ, fmt, args); ++ va_end(args); ++ ++ return ret; ++} ++ ++/* ++ * binutils/libopcode has an unstable public interface. At some point in time the function ++ * init_disassemble_info() started taking 4 arguments instead of 3. Always pass 4 arguments to it, ++ * no matter what's the declaration. ++ */ ++static void arch_bfdInitDisassembleInfoStub( ++ struct disassemble_info* info, char* instr, void* bfd_printf_func, void* bfd_printf_styled_func) ++ __attribute__((weakref, alias("init_disassemble_info"))); ++ + void arch_bfdDisasm(pid_t pid, uint8_t* mem, size_t size, char* instr) { + MX_SCOPED_LOCK(&arch_bfd_mutex); + +@@ -227,8 +245,9 @@ void arch_bfdDisasm(pid_t pid, uint8_t* mem, size_t size, char* instr) { + return; + } + +- struct disassemble_info info; +- init_disassemble_info(&info, instr, arch_bfdFPrintF); ++ struct disassemble_info info = {}; ++ ++ arch_bfdInitDisassembleInfoStub(&info, instr, arch_bfdFPrintF, arch_bfdFPrintFStyled); + info.arch = bfd_get_arch(bfdh); + info.mach = bfd_get_mach(bfdh); + info.buffer = mem; diff --git a/app-forensics/honggfuzz/files/honggfuzz-2.6-no-werror.patch b/app-forensics/honggfuzz/files/honggfuzz-2.6-no-werror.patch new file mode 100644 index 000000000000..d8af6bd046f8 --- /dev/null +++ b/app-forensics/honggfuzz/files/honggfuzz-2.6-no-werror.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -26,7 +26,7 @@ + BIN := honggfuzz + HFUZZ_CC_BIN := hfuzz_cc/hfuzz-cc + HFUZZ_CC_SRCS := hfuzz_cc/hfuzz-cc.c +-COMMON_CFLAGS := -std=c11 -I/usr/local/include -D_GNU_SOURCE -Wall -Wextra -Werror -Wno-format-truncation -Wno-override-init -I. ++COMMON_CFLAGS := -std=c11 -I/usr/local/include -D_GNU_SOURCE -Wall -Wextra -Wno-format-truncation -Wno-override-init -I. + COMMON_LDFLAGS := -pthread -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lm + COMMON_SRCS := $(sort $(wildcard *.c)) + CFLAGS ?= -O3 -mtune=native -funroll-loops diff --git a/app-forensics/honggfuzz/honggfuzz-2.5.ebuild b/app-forensics/honggfuzz/honggfuzz-2.5-r1.ebuild index db12e6d64274..54fe2dc7889f 100644 --- a/app-forensics/honggfuzz/honggfuzz-2.5.ebuild +++ b/app-forensics/honggfuzz/honggfuzz-2.5-r1.ebuild @@ -33,6 +33,7 @@ DOCS=( PATCHES=( "${FILESDIR}"/${PN}-2.0-no-werror.patch + "${FILESDIR}"/${PN}-2.5_binutils239.patch ) pkg_pretend() { diff --git a/app-forensics/honggfuzz/honggfuzz-2.6.ebuild b/app-forensics/honggfuzz/honggfuzz-2.6.ebuild new file mode 100644 index 000000000000..234ac8b97131 --- /dev/null +++ b/app-forensics/honggfuzz/honggfuzz-2.6.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="A general purpose fuzzer with feedback support" +HOMEPAGE="https://honggfuzz.dev/" +SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="clang" + +RDEPEND=" + >=sys-libs/binutils-libs-2.29:= + sys-libs/libunwind:= + app-arch/xz-utils + clang? ( sys-libs/blocksruntime ) +" + +DEPEND="${RDEPEND} + elibc_musl? ( sys-libs/queue-standalone )" + +DOCS=( + CHANGELOG + COPYING + CONTRIBUTING.md + README.md +) + +PATCHES=( + "${FILESDIR}"/${PN}-2.6-no-werror.patch +) + +pkg_pretend() { + if tc-is-clang; then + use clang || die "${P}: to use clang enable USE=clang for ${P} (bug #729256)." + fi +} + +src_prepare() { + default + tc-export AR CC + export CFLAGS + export LDFLAGS +} + +src_install() { + dobin ${PN} + dobin hfuzz_cc/hfuzz-cc + + einstalldocs +} diff --git a/app-forensics/libewf/files/libewf-20171104-openssl-3.patch b/app-forensics/libewf/files/libewf-20171104-openssl-3.patch new file mode 100644 index 000000000000..2d30da7042f8 --- /dev/null +++ b/app-forensics/libewf/files/libewf-20171104-openssl-3.patch @@ -0,0 +1,27 @@ +https://bugs.gentoo.org/805188 +https://github.com/libyal/libewf/commit/033ea5b4e5f8f1248f74a2ec61fc1be183c6c46b +--- a/ewftools/ewftools_output.c ++++ b/ewftools/ewftools_output.c +@@ -238,12 +238,20 @@ void ewfoutput_version_detailed_fprint( + LIBHMAC_VERSION_STRING ); + + #if defined( HAVE_LIBCRYPTO ) ++#if defined( SHLIB_VERSION_NUMBER ) + fprintf( + stream, + " (libcrypto %s)", + SHLIB_VERSION_NUMBER ); +-#endif +-#endif ++#elif defined( OPENSSL_VERSION_MAJOR ) && defined( OPENSSL_VERSION_MINOR ) ++ fprintf( ++ stream, ++ " (libcrypto %d.%d)", ++ OPENSSL_VERSION_MAJOR, ++ OPENSSL_VERSION_MINOR ); ++#endif ++#endif ++#endif + + #if defined( HAVE_LIBODRAW ) || defined( HAVE_LOCAL_LIBODRAW ) + fprintf( diff --git a/app-forensics/libewf/libewf-20171104-r1.ebuild b/app-forensics/libewf/libewf-20171104-r2.ebuild index 6e872b922cf9..b45a35d521a8 100644 --- a/app-forensics/libewf/libewf-20171104-r1.ebuild +++ b/app-forensics/libewf/libewf-20171104-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -9,12 +9,12 @@ SRC_URI="https://github.com/libyal/libewf/releases/download/${PV}/${PN}-experime LICENSE="BSD" SLOT="0/3" -KEYWORDS="amd64 ~arm ~hppa ppc ~ppc64 ~riscv x86" -# upstream bug #2597171, pyewf has implicit declarations +KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ~ppc64 ~riscv x86" +# Upstream bug #2597171, pyewf has implicit declarations #IUSE="debug python unicode" IUSE="bfio bzip2 debug +fuse nls +ssl static-libs +uuid unicode zlib" -# uses bundled libbfio until tree version is bumped +# Uses bundled libbfio until tree version is bumped RDEPEND=" bzip2? ( app-arch/bzip2 ) fuse? ( sys-fs/fuse:0= ) @@ -26,14 +26,19 @@ RDEPEND=" ssl? ( dev-libs/openssl:0= ) zlib? ( sys-libs/zlib ) " -DEPEND="${RDEPEND} +DEPEND="${RDEPEND}" +BDEPEND=" virtual/pkgconfig nls? ( sys-devel/gettext ) " -# issues finding test executables +# Issues finding test executables RESTRICT="test" +PATCHES=( + "${FILESDIR}"/${P}-openssl-3.patch +) + src_configure() { local econfargs=( $(use_enable static-libs static) @@ -48,10 +53,14 @@ src_configure() { $(use_with uuid libuuid) $(use_with fuse libfuse) ) + econf "${econfargs[@]}" } src_install() { default - use static-libs || find "${ED}"/usr -name '*.la' -delete + + if ! use static-libs ; then + find "${ED}"/usr -name '*.la' -delete || die + fi } diff --git a/app-forensics/lynis/Manifest b/app-forensics/lynis/Manifest index 8ebbc512db93..a205a47150f4 100644 --- a/app-forensics/lynis/Manifest +++ b/app-forensics/lynis/Manifest @@ -1 +1 @@ -DIST lynis-3.0.8.tar.gz 339467 BLAKE2B 490bd6799619a4247c3fa68cc96f2f1fead651b23db0ffb512394960f8ca0360ab7f25d2bb8d9e742641558972e1fdd4b1e18d7de0d13007988276eed3a97b1f SHA512 df41aa8b7518a72ee17732eb7e69ccc62ca6e1323d3adc7aec509cd1c21494fece873e101bc317655dafbf58b32699f56dd27eec13a2ce615801cee75961cd33 +DIST lynis-3.1.1.tar.gz 344324 BLAKE2B 056e689f00ac0fa74bd1a6dc3915cbd70f28cdb5461e0749b68ce2cf84e425c295425f7bb6d5aeb0208693a0e38290cb90925e392928257c79bc5887f6e58498 SHA512 c37366154e03a661a7e995d14c651d5503c7189f50edfd194d8b7034e001b9610bfe79917221156ab3607f7c348625ea956fb0acb46a6c7e64a7d189dbcfd4ee diff --git a/app-forensics/lynis/lynis-3.0.8.ebuild b/app-forensics/lynis/lynis-3.1.1.ebuild index 6209f7360914..e0246de21ae4 100644 --- a/app-forensics/lynis/lynis-3.0.8.ebuild +++ b/app-forensics/lynis/lynis-3.1.1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI="8" inherit bash-completion-r1 systemd @@ -9,17 +9,15 @@ DESCRIPTION="Security and system auditing tool" HOMEPAGE="https://cisofy.com/lynis/" SRC_URI="https://cisofy.com/files/${P}.tar.gz" +S="${WORKDIR}/${PN}" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="+cron systemd" -DEPEND="" RDEPEND=" app-shells/bash - !systemd? ( virtual/cron )" - -S="${WORKDIR}/${PN}" + cron? ( !systemd? ( virtual/cron ) )" src_install() { doman lynis.8 diff --git a/app-forensics/mac-robber/files/mac-robber-1.02-posix.patch b/app-forensics/mac-robber/files/mac-robber-1.02-posix.patch new file mode 100644 index 000000000000..a45d4718e51b --- /dev/null +++ b/app-forensics/mac-robber/files/mac-robber-1.02-posix.patch @@ -0,0 +1,19 @@ +--- a/mac-robber.c ++++ b/mac-robber.c +@@ -45,6 +45,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <dirent.h> ++#include <limits.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +@@ -238,7 +239,7 @@ + /* Make a buffer for the full path + * the 2 is for 1 NULL and 1 '/' for recursive directories + */ +- path_len = dir_len + MAXNAMLEN + 2; ++ path_len = dir_len + NAME_MAX + 2; + if (!(curpath = (char *) malloc(path_len))) { + printf("error allocating space for curpath\n"); + exit(1); diff --git a/app-forensics/mac-robber/mac-robber-1.02.ebuild b/app-forensics/mac-robber/mac-robber-1.02-r1.ebuild index b8497f78d985..b5e75816e7ae 100644 --- a/app-forensics/mac-robber/mac-robber-1.02.ebuild +++ b/app-forensics/mac-robber/mac-robber-1.02-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 inherit toolchain-funcs @@ -12,18 +12,24 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~ppc x86" -IUSE="" + +PATCHES=( "${FILESDIR}"/${P}-posix.patch ) src_prepare() { default - sed -i -e 's:$(GCC_CFLAGS):\0 $(LDFLAGS):' Makefile || die + # just rely on implicit rules + rm Makefile || die +} + +src_configure() { + tc-export CC } src_compile() { - emake CC="$(tc-getCC)" GCC_OPT="${CFLAGS}" + emake mac-robber } src_install() { dobin mac-robber - dodoc CHANGES README + einstalldocs } diff --git a/app-forensics/mac-robber/metadata.xml b/app-forensics/mac-robber/metadata.xml index 4cf2ee79205f..0c56b2d46030 100644 --- a/app-forensics/mac-robber/metadata.xml +++ b/app-forensics/mac-robber/metadata.xml @@ -3,20 +3,20 @@ <pkgmetadata> <!-- maintainer-needed --> <longdescription> -mac-robber is a digital forensics and incident response tool that collects data from allocated files in a mounted file system. -The data can be used by the mactime tool in The Sleuth Kit to make a timeline of file activity. The mac-robber tool is based on -the grave-robber tool from TCT and is written in C instead of Perl. + mac-robber is a digital forensics and incident response tool that collects data from allocated files in a mounted file system. + The data can be used by the mactime tool in The Sleuth Kit to make a timeline of file activity. The mac-robber tool is based on + the grave-robber tool from TCT and is written in C instead of Perl. -mac-robber requires that the file system be mounted by the operating system, unlike the tools in The Sleuth Kit that process the -file system themselves. Therefore, mac-robber will not collect data from deleted files or files that have been hidden by -rootkits. mac-robber will also modify the Access times on directories that are mounted with write permissions. + mac-robber requires that the file system be mounted by the operating system, unlike the tools in The Sleuth Kit that process the + file system themselves. Therefore, mac-robber will not collect data from deleted files or files that have been hidden by + rootkits. mac-robber will also modify the Access times on directories that are mounted with write permissions. -"What is mac-robber good for then", you ask? mac-robber is useful when dealing with a file system that is not supported by The -Sleuth Kit or other forensic tools. mac-robber is very basic C and should compile on any UNIX system. Therefore, you can run -mac-robber on an obscure, suspect UNIX file system that has been mounted read-only on a trusted system. I have also used -mac-robber during investigations of common UNIX systems such as AIX. -</longdescription> + "What is mac-robber good for then", you ask? mac-robber is useful when dealing with a file system that is not supported by The + Sleuth Kit or other forensic tools. mac-robber is very basic C and should compile on any UNIX system. Therefore, you can run + mac-robber on an obscure, suspect UNIX file system that has been mounted read-only on a trusted system. I have also used + mac-robber during investigations of common UNIX systems such as AIX. + </longdescription> <upstream> <remote-id type="sourceforge">mac-robber</remote-id> </upstream> diff --git a/app-forensics/magicrescue/files/magicrescue-1.1.10-fhs-paths.patch b/app-forensics/magicrescue/files/magicrescue-1.1.10-fhs-paths.patch new file mode 100644 index 000000000000..e249f67f280d --- /dev/null +++ b/app-forensics/magicrescue/files/magicrescue-1.1.10-fhs-paths.patch @@ -0,0 +1,67 @@ +https://github.com/jbj/magicrescue/commit/0426af2a23918d7064d58ac5f9a2a752eb329501 +https://bugs.gentoo.org/875383 + +From 0426af2a23918d7064d58ac5f9a2a752eb329501 Mon Sep 17 00:00:00 2001 +From: Jonas Jensen <jbj@knef.dk> +Date: Sun, 29 Aug 2021 20:14:33 +0200 +Subject: [PATCH] Debian's 040_fix-install.patch + +Description: fix and modernize install, in accordance with FHS 3.0 +Author: Joao Eriberto Mota Filho <eriberto@debian.org> +Last-Update: 2020-04-06 +--- a/Makefile.in ++++ b/Makefile.in +@@ -56,32 +56,32 @@ docs-clean: + maintainer-clean: distclean docs-clean + + install: all +- mkdir -p $(INSTALLDIR)/share/magicrescue/tools \ ++ mkdir -p $(INSTALLDIR)/libexec/magicrescue/tools \ + $(INSTALLDIR)/share/magicrescue/recipes \ +- $(INSTALLDIR)/man/man1 \ ++ $(INSTALLDIR)/share/man/man1 \ + $(INSTALLDIR)/bin + + cp magicrescue$(EXE) dupemap$(EXE) magicsort $(INSTALLDIR)/bin/ + cp recipes/* $(INSTALLDIR)/share/magicrescue/recipes/ +- cp $(DOCS) $(INSTALLDIR)/man/man1 ++ cp $(DOCS) $(INSTALLDIR)/share/man/man1 + + for f in tools/*; do \ + if [ -x "$$f" ]; then \ +- cp -f "$$f" $(INSTALLDIR)/share/magicrescue/tools/; \ ++ cp -f "$$f" $(INSTALLDIR)/libexec/magicrescue/tools/; \ + fi; \ + done +- cp -f tools/laola.pl $(INSTALLDIR)/share/magicrescue/tools/ ++ cp -f tools/laola.pl $(INSTALLDIR)/libexec/magicrescue/tools/ ++ chmod 755 $(INSTALLDIR)/libexec/magicrescue/tools/laola.pl + + uninstall: + rm -f $(INSTALLDIR)/bin/magicrescue$(EXE) + rm -f $(INSTALLDIR)/bin/dupemap$(EXE) + rm -f $(INSTALLDIR)/bin/magicsort + for f in $(DOCS); do \ +- rm -f "$(INSTALLDIR)/man/man1/`basename $$f`"; \ ++ rm -f "$(INSTALLDIR)/share/man/man1/`basename $$f`"; \ + done +- rm -rf $(INSTALLDIR)/share/magicrescue/tools +- rm -rf $(INSTALLDIR)/share/magicrescue/recipes +- -rmdir $(INSTALLDIR)/share/magicrescue ++ rm -rf $(INSTALLDIR)/libexec/magicrescue/ ++ rm -rf $(INSTALLDIR)/share/magicrescue/ + + .PHONY: all clean distclean docs-clean maintainer-clean install uninstall docs + +--- a/config.d/80magicrescue_defs ++++ b/config.d/80magicrescue_defs +@@ -1,7 +1,7 @@ + #!/bin/sh + + cat >> config.h << EOF +-#define COMMAND_PATH "$prefix/share/magicrescue/tools" ++#define COMMAND_PATH "$prefix/libexec/magicrescue/tools" + #define RECIPE_PATH "$prefix/share/magicrescue/recipes" + #include "largefile.h" + EOF + diff --git a/app-forensics/magicrescue/files/magicrescue-1.1.10-remove_toolsdir.patch b/app-forensics/magicrescue/files/magicrescue-1.1.10-remove_toolsdir.patch deleted file mode 100644 index b3a238b1bbea..000000000000 --- a/app-forensics/magicrescue/files/magicrescue-1.1.10-remove_toolsdir.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff -Naur a/config.d/80magicrescue_defs b/config.d/80magicrescue_defs ---- a/config.d/80magicrescue_defs 2018-11-24 20:21:20.000000000 +0100 -+++ b/config.d/80magicrescue_defs 2019-11-14 09:41:34.030848527 +0100 -@@ -1,7 +1,7 @@ - #!/bin/sh - - cat >> config.h << EOF --#define COMMAND_PATH "$prefix/share/magicrescue/tools" -+#define COMMAND_PATH "$prefix/bin" - #define RECIPE_PATH "$prefix/share/magicrescue/recipes" - #include "largefile.h" - EOF -diff -Naur a/doc/magicrescue.1 b/doc/magicrescue.1 ---- a/doc/magicrescue.1 2018-11-24 20:21:20.000000000 +0100 -+++ b/doc/magicrescue.1 2019-11-14 09:41:34.030848527 +0100 -@@ -358,7 +358,7 @@ - This means that you may have to write your own tool or wrap an existing program - in some scripts that make it behave better. For example, this could be to - extract the first 10MB into a temporary file and let the program work on that. --Or perhaps you can use \fItools/safecat\fR if the file may be very large. -+Or perhaps you can use \fIsafecat\fR if the file may be very large. - .SS "Recipe format reference" - .IX Subsection "Recipe format reference" - Empty lines and lines starting with \f(CW\*(C`#\*(C'\fR will be skipped. A recipe contains a -@@ -424,7 +424,7 @@ - should be set to 512. - .PP - To test whether your recipe actually works, either just run it on your hard --disk or use the \fItools/checkrecipe\fR script to pick out files that should match -+disk or use the \fIcheckrecipe\fR script to pick out files that should match - but don't. - .PP - If you have created a recipe that works, please mail it to me at jbj@knef.dk so -diff -Naur a/doc/magicrescue.pod b/doc/magicrescue.pod ---- a/doc/magicrescue.pod 2018-11-24 20:21:20.000000000 +0100 -+++ b/doc/magicrescue.pod 2019-11-14 09:41:34.030848527 +0100 -@@ -239,7 +239,7 @@ - This means that you may have to write your own tool or wrap an existing program - in some scripts that make it behave better. For example, this could be to - extract the first 10MB into a temporary file and let the program work on that. --Or perhaps you can use F<tools/safecat> if the file may be very large. -+Or perhaps you can use F<safecat> if the file may be very large. - - =head2 Recipe format reference - -@@ -322,7 +322,7 @@ - =back - - To test whether your recipe actually works, either just run it on your hard --disk or use the F<tools/checkrecipe> script to pick out files that should match -+disk or use the F<checkrecipe> script to pick out files that should match - but don't. - - If you have created a recipe that works, please mail it to me at jbj@knef.dk so -diff -Naur a/src/magicrescue.c b/src/magicrescue.c ---- a/src/magicrescue.c 2018-11-24 20:21:20.000000000 +0100 -+++ b/src/magicrescue.c 2019-11-14 09:41:34.030848527 +0100 -@@ -552,7 +552,7 @@ - - buf = malloc(bufsize); - -- sprintf(buf, "PATH=%s%s%s:%s", "tools", -+ sprintf(buf, "PATH=%s%s%s:%s", - #ifdef COMMAND_PATH - ":", COMMAND_PATH, - #else -diff -Naur a/tools/checkrecipe b/tools/checkrecipe ---- a/tools/checkrecipe 2018-11-24 20:21:20.000000000 +0100 -+++ b/tools/checkrecipe 2019-11-14 09:41:34.030848527 +0100 -@@ -8,7 +8,7 @@ - a recipe. - - Usage: --./magicrescue -Mio OPTIONS FILES|tools/checkrecipe [OPTIONS] -+./magicrescue -Mio OPTIONS FILES|checkrecipe [OPTIONS] - - Options: - -s VALUE Size tolerance, in percent. Specifies when checkrecipe should -@@ -18,13 +18,13 @@ - - find / -name \*.png -print0 \ - |xargs -0 ./magicrescue -Mio -r png -d /tmp/test-output 2>/dev/null \ --|tools/checkrecipe -+|checkrecipe - - or - - slocate \*.png|sed "s/['\"\\\\[:blank:]]/\\\\\\\\&/g" \ - |xargs ./magicrescue -Mio -r png -d /tmp/test-output 2>/dev/null \ --|tools/checkrecipe -+|checkrecipe - ); - exit; - } -diff -Naur a/tools/ole_rename.pl b/tools/ole_rename.pl ---- a/tools/ole_rename.pl 2018-11-24 20:21:20.000000000 +0100 -+++ b/tools/ole_rename.pl 2019-11-14 09:41:34.030848527 +0100 -@@ -32,7 +32,7 @@ - my %extensions = @extensions; # for quick lookup - - # When invoked by magicrescue, laola.pl should be in the PATH --push @INC, grep /tools/, split /:/, $ENV{PATH}; -+push @INC, split /:/, $ENV{PATH}; - require 'laola.pl'; - - my $file = $ARGV[0]; diff --git a/app-forensics/magicrescue/magicrescue-1.1.10-r2.ebuild b/app-forensics/magicrescue/magicrescue-1.1.10-r4.ebuild index 792a497947f0..5c3b26f1aa10 100644 --- a/app-forensics/magicrescue/magicrescue-1.1.10-r2.ebuild +++ b/app-forensics/magicrescue/magicrescue-1.1.10-r4.ebuild @@ -11,27 +11,20 @@ SRC_URI="https://github.com/jbj/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2+" SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" +KEYWORDS="amd64 ~ppc x86" +# - File collision with net-mail/safecat, bug #702004 +# - BDEPEND on perl for pod2man, bug #852671 DEPEND="sys-libs/gdbm:=" RDEPEND="${DEPEND} !net-mail/safecat" -# File collision with net-mail/safecat, bug #702004 +BDEPEND="dev-lang/perl" PATCHES=( "${FILESDIR}/${P}-ldflags.patch" - "${FILESDIR}/${P}-remove_toolsdir.patch" + "${FILESDIR}/${P}-fhs-paths.patch" ) -src_prepare() { - default - - sed -i -e "\ - s:\$(INSTALLDIR)/share/magicrescue/recipes:\$(INSTALLDIR)/share/doc/${PF}/recipes:;\ - s:\$(INSTALLDIR)/man/man1:\$(INSTALLDIR)/share/man/man1:;\ - s:\$(INSTALLDIR)/share/magicrescue/tools:\$(INSTALLDIR)/bin:" Makefile.in || die "could not mangle Makefile.in" -} - src_configure() { tc-export CC diff --git a/app-forensics/magicrescue/magicrescue-1.1.10.ebuild b/app-forensics/magicrescue/magicrescue-1.1.10.ebuild deleted file mode 100644 index d9f26ef7e6b8..000000000000 --- a/app-forensics/magicrescue/magicrescue-1.1.10.ebuild +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -DESCRIPTION="Find deleted files in block devices" -HOMEPAGE="https://github.com/jbj/magicrescue" -SRC_URI="https://github.com/jbj/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="amd64 ~ppc x86" -IUSE="" - -DEPEND="|| ( sys-libs/gdbm sys-libs/db:* )" -RDEPEND="${DEPEND} - !net-mail/safecat" -# File collision with net-mail/safecat, #702004 - -PATCHES=( "${FILESDIR}/${P}-ldflags.patch" - "${FILESDIR}/${P}-remove_toolsdir.patch" ) - -src_prepare() { - tc-export CC - sed -i -e "\ - s:\$(INSTALLDIR)/share/magicrescue/recipes:\$(INSTALLDIR)/share/doc/${P}/recipes:;\ - s:\$(INSTALLDIR)/man/man1:\$(INSTALLDIR)/share/man/man1:;\ - s:\$(INSTALLDIR)/share/magicrescue/tools:\$(INSTALLDIR)/bin:" Makefile.in || die "could not mangle Makefile.in" - default -} - -src_configure() { - # Not autotools, just looks like it sometimes - ./configure --prefix=/usr || die -} diff --git a/app-forensics/magicrescue/metadata.xml b/app-forensics/magicrescue/metadata.xml index 36058885bf77..f944e32e2d77 100644 --- a/app-forensics/magicrescue/metadata.xml +++ b/app-forensics/magicrescue/metadata.xml @@ -1,13 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<!-- maintainer-needed --> -<longdescription> -Magic Rescue scans a block device for file types it knows how to recover and calls an external program to extract them. It looks -at "magic bytes" in file contents, so it can be used both as an undelete utility and for recovering a corrupted drive or -partition. As long as the file data is there, it will find it. + <!-- maintainer-needed --> + <longdescription> + Magic Rescue scans a block device for file types it knows how to recover and calls an external program to extract them. It looks + at "magic bytes" in file contents, so it can be used both as an undelete utility and for recovering a corrupted drive or + partition. As long as the file data is there, it will find it. -It works on any file system, but on very fragmented file systems it can only recover the first chunk of each file. Practical -experience (this program was not written for fun) shows, however, that chunks of 30-50MB are not uncommon. -</longdescription> + It works on any file system, but on very fragmented file systems it can only recover the first chunk of each file. Practical + experience (this program was not written for fun) shows, however, that chunks of 30-50MB are not uncommon. + </longdescription> + <upstream> + <remote-id type="github">jbj/magicrescue</remote-id> + </upstream> </pkgmetadata> diff --git a/app-forensics/ovaldi/Manifest b/app-forensics/ovaldi/Manifest deleted file mode 100644 index 10d46d80f07b..000000000000 --- a/app-forensics/ovaldi/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST ovaldi-5.10.1.7-src.tar.bz2 20391784 BLAKE2B 7e2c719f0819f967c6aee533bb881c29ffac756461460d73e3231f1cffd254d88a26e716f0334d023daa7fa6f9c314bf7a42b6c13e2a90daa558e589d135479c SHA512 22c373436889b03ffb5d479bd322703bbd8b5b335f116a3b38a3d206ddaaf3115961ab89597c3907b6e5d745eb302a042c135c73cde0eaae10e51f5d6e3e55ec diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable-acl.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable-acl.patch deleted file mode 100644 index 0a8b5fa6a188..000000000000 --- a/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable-acl.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/src/probes/unix/FileProbe.cpp -+++ b/src/probes/unix/FileProbe.cpp -@@ -386,18 +386,8 @@ - 6) If a file has an ACL, the value will be 'true'. - */ - -- int hasExtendedAcl = acl_extended_file(filePath.c_str()); -- if(hasExtendedAcl > -1){ // behavior 4, 5, and 6 -- item->AppendElement(new ItemEntity("has_extended_acl",Common::ToString(hasExtendedAcl),OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_EXISTS,0)); -- }else{ -- if(errno == EOPNOTSUPP){ // behavior 3 -- item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_DOES_NOT_EXIST,0)); -- }else{ // behavior 2 -- item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_ERROR,0)); -- item->AppendMessage(new OvalMessage(string("Error reading ACL data: ") + strerror(errno))); -- } -- } -- -+ // behavior 1 -+ item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_NOT_COLLECTED,0)); - # else - // behavior 1 - item->AppendElement(new ItemEntity("has_extended_acl","",OvalEnum::DATATYPE_BOOLEAN,OvalEnum::STATUS_NOT_COLLECTED,0)); diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable_RetrieveSelinuxDomainLabel.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable_RetrieveSelinuxDomainLabel.patch deleted file mode 100644 index 9f0a0e05e401..000000000000 --- a/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable_RetrieveSelinuxDomainLabel.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/probes/unix/Process58Probe.cpp -+++ b/src/probes/unix/Process58Probe.cpp -@@ -743,26 +743,8 @@ - } - - bool Process58Probe::RetrieveSelinuxDomainLabel(pid_t pid, string *label, string *err) { -- security_context_t sctx; -- int ec = getpidcon(pid, &sctx); -- if (ec == -1) { -- // getpidcon man page doesn't say errno is set... so we can't get a -- // reason for the error. -- *err = "getpidcon() failed"; -- return false; -- } -- -- SecurityContextGuard scg(sctx); -- ContextGuard cg(sctx); -- -- const char *tmp = context_type_get(cg); -- if (!tmp) { -- *err = string("context_get_type(")+sctx+"): "+strerror(errno); -- return false; -- } -- -- *label = tmp; -- return true; -+ *err = string("context_get_type(NotImplmented)"); -+ return false; - } - - #elif defined SUNOS diff --git a/app-forensics/ovaldi/files/ovaldi-5.10.1.7-gcc11.patch b/app-forensics/ovaldi/files/ovaldi-5.10.1.7-gcc11.patch deleted file mode 100644 index 1c71f7016d77..000000000000 --- a/app-forensics/ovaldi/files/ovaldi-5.10.1.7-gcc11.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- a/src/AbsProbe.cpp -+++ b/src/AbsProbe.cpp -@@ -52,7 +52,7 @@ - // use const wherever it makes sense, to ensure const-correctness?? - // Or maybe I should have implemented operator<() for items and - // used the default std::less template...? -- typedef set<Item*, std::less<const Item*> > ItemCache; -+ typedef set<Item*, std::less<Item*> > ItemCache; - ItemCache globalItemCache; - } - ---- a/src/ErrnoException.h -+++ b/src/ErrnoException.h -@@ -49,10 +49,10 @@ - SetErrorMessage(syscall+": "+std::strerror(errnoVal)); - } - -- virtual ~ErrnoException() throw () { -+ virtual ~ErrnoException() { - } - -- virtual const char* what() const throw() { -+ virtual const char* what() const noexcept { - return errorMessage.c_str(); - } - }; ---- a/src/OutOfMemoryException.h -+++ b/src/OutOfMemoryException.h -@@ -47,10 +47,10 @@ - : Exception(msg, severity, cause) { - } - -- virtual ~OutOfMemoryException() throw () { -+ virtual ~OutOfMemoryException() { - } - -- virtual const char* what() const throw() { -+ virtual const char* what() const noexcept { - return errorMessage.c_str(); - } - }; ---- a/src/probes/unix/RunLevelProbe.cpp -+++ b/src/probes/unix/RunLevelProbe.cpp -@@ -125,7 +125,7 @@ - - - void --RunLevelProbe::_verifyRunlevelObjectAttr( ObjectEntity * service_name, ObjectEntity * runlevel ) const throw( ProbeException ) { -+RunLevelProbe::_verifyRunlevelObjectAttr( ObjectEntity * service_name, ObjectEntity * runlevel ) const { - - // check datatypes - only allow string - if( service_name->GetDatatype() != OvalEnum::DATATYPE_STRING ){ ---- a/src/probes/unix/RunLevelProbe.h -+++ b/src/probes/unix/RunLevelProbe.h -@@ -76,7 +76,7 @@ - */ - struct ltrunlevel_item_comparator - { -- bool operator() ( const runlevel_item &r1, const runlevel_item &r2 ) -+ bool operator() ( const runlevel_item &r1, const runlevel_item &r2 ) const - { - return r1.service_name.compare(r2.service_name) < 0; - } -@@ -115,7 +115,7 @@ - @param runlevel the runlevel runlevel_object entity - @throws ProbeException if invalid operations or datatypes are encountered - */ -- void _verifyRunlevelObjectAttr( ObjectEntity * service_name, ObjectEntity * runlevel ) const throw( ProbeException ); -+ void _verifyRunlevelObjectAttr( ObjectEntity * service_name, ObjectEntity * runlevel ) const; - - /** - Checks to see if the given filename is either "." or ".." diff --git a/app-forensics/ovaldi/metadata.xml b/app-forensics/ovaldi/metadata.xml deleted file mode 100644 index 0011ef603d31..000000000000 --- a/app-forensics/ovaldi/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <!-- maintainer-needed --> - <upstream> - <remote-id type="sourceforge">ovaldi</remote-id> - </upstream> -</pkgmetadata> diff --git a/app-forensics/ovaldi/ovaldi-5.10.1.7-r1.ebuild b/app-forensics/ovaldi/ovaldi-5.10.1.7-r1.ebuild deleted file mode 100644 index 50a05b8d222f..000000000000 --- a/app-forensics/ovaldi/ovaldi-5.10.1.7-r1.ebuild +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -DESCRIPTION="Free implementation of OVAL" -HOMEPAGE="http://oval.mitre.org/language/interpreter.html" -SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2" -S="${WORKDIR}/${P}-src" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="acl ldap selinux" - -DEPEND=" - dev-libs/libgcrypt:= - dev-libs/libpcre:= - dev-libs/xalan-c:= - dev-libs/xerces-c:= - sys-apps/util-linux:= - sys-libs/libcap - acl? ( sys-apps/acl:= ) - ldap? ( net-nds/openldap:= ) - selinux? ( sys-libs/libselinux )" -RDEPEND="${DEPEND}" - -src_prepare() { - if ! use ldap ; then - einfo "Disabling LDAP probes" - sed -i 's,.*ldap,//&,' src/linux/ProbeFactory.cpp || die - sed -i 's,.*LDAP,//&,' src/linux/ProbeFactory.cpp || die - sed -i 's/-lldap//' project/linux/Makefile || die - sed -i 's/-llber//' project/linux/Makefile || die - sed -i 's/.*LDAPProbe.h.*//' src/linux/ProbeFactory.h || die - rm src/probes/independent/LDAPProbe.{cpp,h} || die - fi - - if ! use acl ; then - sed -i 's,.*libacl,//&,' src/probes/unix/FileProbe.h || die - eapply "${FILESDIR}"/${P}-disable-acl.patch - sed -i 's, -lacl , ,' project/linux/Makefile || die - fi - - einfo "Disabling rpm probes" - sed -i 's/^PACKAGE_RPM/#PACKAGE_RPM/' project/linux/Makefile || die - - # same thing for dpkg, but package dpkg is not sufficient, needs app-arch/apt-pkg that is not on tree - einfo "Disabling dpkg probes" - sed -i 's/^PACKAGE_DPKG/#PACKAGE_DPKG/' project/linux/Makefile || die - - #Disabling SELinux support - if ! use selinux ; then - rm src/probes/linux/SelinuxSecurityContextProbe.cpp || die - rm src/probes/linux/SelinuxBooleanProbe.cpp || die - rm src/probes/linux/SelinuxBooleanProbe.h || die - eapply "${FILESDIR}"/${P}-disable_RetrieveSelinuxDomainLabel.patch - sed -i 's,.*selinux.*,//&,' src/linux/ProbeFactory.cpp || die - sed -i 's,.*Selinux.*,//&,' src/linux/ProbeFactory.cpp || die - sed -i 's,.*selinux.*.h.*,//&,' src/probes/unix/Process58Probe.cpp || die - sed -i 's,.*SecurityContextGuard.h.*,//&,' src/probes/unix/Process58Probe.cpp || die - sed -i 's, -lselinux,,' project/linux/Makefile || die - fi - - # missing header for realloc and free - sed -i 's,#include <unistd.h>,&\n#include <stdlib.h>,' src/linux/NetworkInterfaces.cpp || die - sed -i 's,#include <unistd.h>,&\n#include <stdlib.h>,' src/linux/SystemInfo.cpp || die - - # respect CXX, CXXFLAGS and LDFLAGS - sed -e '/^CPPFLAGS/s/$(INCDIRS)/$(CXXFLAGS) \0/' \ - -e 's/$(CXX) $^/$(CXX) $(LDFLAGS) $^/g' \ - -i project/linux/Makefile || die - - # no such library on linux - sed -i 's,-lxalanMsg,,' project/linux/Makefile || die - - eapply "${FILESDIR}"/${P}-gcc11.patch - eapply_user -} - -src_configure() { - tc-export CXX -} - -src_compile() { - emake -C project/linux -} - -src_install() { - # no make install in Makefile - dosbin project/linux/Release/ovaldi project/linux/ovaldi.sh - dodir /var/log/ovaldi - - insinto /usr/share/ovaldi - doins -r xml/. - - dodoc docs/{README.txt,version.txt} - doman docs/ovaldi.1 -} diff --git a/app-forensics/pasco/pasco-20040505_p1-r1.ebuild b/app-forensics/pasco/pasco-20040505_p1-r2.ebuild index 848aa78cff30..fa40b7222c99 100644 --- a/app-forensics/pasco/pasco-20040505_p1-r1.ebuild +++ b/app-forensics/pasco/pasco-20040505_p1-r2.ebuild @@ -1,22 +1,21 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 inherit toolchain-funcs -MY_P=${PN}_${PV/_p/_} +MY_P="${PN}_${PV/_p/_}" DESCRIPTION="IE Activity Parser" HOMEPAGE="https://sourceforge.net/projects/odessa/" SRC_URI="mirror://sourceforge/odessa/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}/src" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~ppc x86" -IUSE="" -S=${WORKDIR}/${MY_P}/src PATCHES=( "${FILESDIR}"/${P}-fix-build-system.patch "${FILESDIR}"/${P}-Wimplicit-function-declaration.patch diff --git a/app-forensics/radamsa/Manifest b/app-forensics/radamsa/Manifest index 480d52b9c4e1..7cdb58000b92 100644 --- a/app-forensics/radamsa/Manifest +++ b/app-forensics/radamsa/Manifest @@ -1,2 +1,4 @@ DIST radamsa-0.6.c.gz 142359 BLAKE2B e9cfda273ca78e97d7e8a94f0399c2c8d7b543c578a7b6745a03c9a2a18aa965a13ead55e15aab27c5386bb4d4ab961cedfbdca72c72013dc1ace0931c237199 SHA512 b9f0b8801063821ebd435464057aa119c5eae2dec8c39b5ec295854832e25dd8b102d6beec2084a71c380dd0e1419fbce6ee2acc1064c8a4491ad32ff94673f9 DIST radamsa-0.6.tar.gz 51962 BLAKE2B c909b917e55ea2d69f4bec22981afb73dabc0d380d6942167f805ecfd96c3f3d724a5e6d80acf4b2abe2ddf9141dd596a9c0b2e22db98e6c441236c49a06502d SHA512 6808a7f9a42c1a38bfa18ca8613067f4550a5960500e7438011ff26a37a663707a92597f869678600a7bd20df9d2bda19d3c80b07cd12fc49bad3b123739bae7 +DIST radamsa-0.7.c.gz 139939 BLAKE2B ae3e2fca777bdc672431810ec6e9a245774e3f761fb4552ae973caf3b82348c73221e9cfac023e80f161c37fb3e63ff043aac2f98cb932056c1618a842245f52 SHA512 f0b0c21034cb33182be74d8927c879a2a49cb20c992e97556bb9d76c35c8a39f1caf2042a3d001f0063b09e80705fa5d285d1d95b9f8a2dd5c62deb9a18d9bde +DIST radamsa-v0.7.tar.bz2 49194 BLAKE2B a3e24302c67ed887373109ce3bd1b3b796c742ad50c04d83980caf7b5e92793668c9262791749653e72e15d65d7a4971d498013d3c5a8fafda9033cddc5b3e03 SHA512 ca55e499b739e4a24038b36115106dc10b6f68e3e127d3c45b0ab79676a1e6e82021be02e378bd6fd09f6df537d266ea4cf8f3528a25ed9e788548d6edc62fb5 diff --git a/app-forensics/radamsa/files/radamsa-0.7_prebuilt-c.patch b/app-forensics/radamsa/files/radamsa-0.7_prebuilt-c.patch new file mode 100644 index 000000000000..94fad4879f91 --- /dev/null +++ b/app-forensics/radamsa/files/radamsa-0.7_prebuilt-c.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -15,7 +15,7 @@ + mkdir -p bin + $(CC) $(CFLAGS) $(LDFLAGS) -o bin/radamsa radamsa.c + +-bin/radamsa: radamsa.c ++bin/radamsa: + mkdir -p bin + $(CC) $(CFLAGS) $(LDFLAGS) -o bin/radamsa radamsa.c + diff --git a/app-forensics/radamsa/radamsa-0.7.ebuild b/app-forensics/radamsa/radamsa-0.7.ebuild new file mode 100644 index 000000000000..baf922c968eb --- /dev/null +++ b/app-forensics/radamsa/radamsa-0.7.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_P="${PN}-v${PV}" + +DESCRIPTION="A general-purpose fuzzer" +HOMEPAGE="https://gitlab.com/akihe/radamsa" +SRC_URI=" + https://gitlab.com/akihe/${PN}/-/archive/v${PV}/${MY_P}.tar.bz2 + https://gitlab.com/akihe/${PN}/uploads/d774a42f7893012d0a56c490a75ae12b/${P}.c.gz +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# needs an owl-lisp +RESTRICT=test + +PATCHES=( + "${FILESDIR}"/${PN}-0.7_prebuilt-c.patch +) + +S="${WORKDIR}"/${MY_P} + +src_prepare() { + default + + cp "${WORKDIR}"/${P}.c "${S}"/${PN}.c || die +} + +src_compile() { + emake bin/radamsa CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + +src_install() { + dobin bin/radamsa + # avoid man compression by build system + doman doc/radamsa.1 + + einstalldocs +} diff --git a/app-forensics/rifiuti/rifiuti-20040505_p1.ebuild b/app-forensics/rifiuti/rifiuti-20040505_p1-r1.ebuild index bdb5212fbcc7..e0fdc1156b95 100644 --- a/app-forensics/rifiuti/rifiuti-20040505_p1.ebuild +++ b/app-forensics/rifiuti/rifiuti-20040505_p1-r1.ebuild @@ -1,22 +1,21 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 inherit toolchain-funcs -MY_P=${PN}_${PV/_p/_} +MY_P="${PN}_${PV/_p/_}" DESCRIPTION="Recycle Bin Analyzer" HOMEPAGE="https://sourceforge.net/projects/odessa/" SRC_URI="mirror://sourceforge/odessa/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}/src" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~ppc x86" -IUSE="" -S=${WORKDIR}/${MY_P}/src PATCHES=( "${FILESDIR}"/${P}-fix-build-system.patch "${FILESDIR}"/${P}-Wimplicit-function-declaration.patch diff --git a/app-forensics/rkhunter/Manifest b/app-forensics/rkhunter/Manifest index af34b039b9ea..a181f515787e 100644 --- a/app-forensics/rkhunter/Manifest +++ b/app-forensics/rkhunter/Manifest @@ -1 +1,2 @@ +DIST rkhunter-1.4.6-grep-3.8.patch.xz 7232 BLAKE2B a4be08fbe2094f531b0b71fe30dca3e3fb54f9be566f578b4008c7139737cee8d19aca20beb1369bbd877faa270f4ea43c195042b1431eeb34817f0d9063c100 SHA512 c5d21da2fbd8bffa282c716acc2550268fd5f436791635481b79986b1fa1dc631d6551f735344ff7bebbb835748b0e3a508949fb9a45bc4f76a4650732920230 DIST rkhunter-1.4.6.tar.gz 302137 BLAKE2B 89c61386b57f743f4205f8c826eaa8a9dc9a0d413ac47efb26b6f93d8d642f619f35b7a4c021521b662547c02a16071b8980d158cfb9e081a64870558dbaeff0 SHA512 c51a21b6b66ed1f73a19d8ce04eaba35999eefcb666acc824989c3bf53ac56d24a33ac4fec290be942e33fe24674406b371eafff73f7e697b9e03ec031b37216 diff --git a/app-forensics/rkhunter/rkhunter-1.4.6-r1.ebuild b/app-forensics/rkhunter/rkhunter-1.4.6-r2.ebuild index e591f19bb88c..8cb7e9e6f30a 100644 --- a/app-forensics/rkhunter/rkhunter-1.4.6-r1.ebuild +++ b/app-forensics/rkhunter/rkhunter-1.4.6-r2.ebuild @@ -1,15 +1,16 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 inherit bash-completion-r1 DESCRIPTION="Rootkit Hunter scans for known and unknown rootkits, backdoors, and sniffers" -HOMEPAGE="http://rkhunter.sf.net/" +HOMEPAGE="https://rkhunter.sf.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-grep-3.8.patch.xz" -LICENSE="GPL-2" +LICENSE="GPL-2+" SLOT="0" KEYWORDS="~alpha amd64 ~arm ~mips ppc x86" IUSE="" @@ -25,6 +26,7 @@ S="${WORKDIR}/${P}/files" PATCHES=( "${FILESDIR}/${PN}-1.4.6-conf.patch" "${FILESDIR}/${PN}-1.4.6-no-insecure-web.patch" + "${WORKDIR}/${PN}-1.4.6-grep-3.8.patch" ) src_install() { diff --git a/app-forensics/scalpel/Manifest b/app-forensics/scalpel/Manifest index 3128b6161b38..f5dc0da44e6d 100644 --- a/app-forensics/scalpel/Manifest +++ b/app-forensics/scalpel/Manifest @@ -1 +1 @@ -DIST scalpel-2.0.tar.gz 1436379 BLAKE2B 7a645c1d6ea32fbd1b0bcfcbfa0f704b6eb58ebe091b8a7ef89f59756c18ce9937849f9754f6ab8548c805e3503f9eb3cc58a2f835956a1315668db5ce19c41f SHA512 7bf8e36f2fd22eb34e0f454c44a3ec3bc4e61dfd44ecda6ae93f0cc41cc3ad2b9fd9604637329bb96274a606812a578c968dd435d9d4a3ac5533613c849d321a +DIST scalpel-2.1_pre20210326.tar.gz 1445147 BLAKE2B f70e16d6854c6f781c2ec389b4595e25055bedc5c69b4c0713ae263d138f0bd9824641099e224cd1969688f6b0acb07c707072afe43955c8752391132eb9b84e SHA512 76811437f01125dcdb27e185ad4f82ba589461eb47638a32af4291b0b81803180e095ccf89440d6c50e35e641e9c3eed63d6ffb33715b5ebe0a3a73389c25e5f diff --git a/app-forensics/scalpel/files/gcc-11-fix-literal-suffix.patch b/app-forensics/scalpel/files/gcc-11-fix-literal-suffix.patch new file mode 100644 index 000000000000..55809d58e178 --- /dev/null +++ b/app-forensics/scalpel/files/gcc-11-fix-literal-suffix.patch @@ -0,0 +1,255 @@ +fix "invalid suffix on literal; C++11 requires a space between literal and string macro" + +--- a/src/dig.cpp ++++ b/src/dig.cpp +@@ -378,10 +378,10 @@ + + + if(state->skip) { +- fprintf(state->auditFile, "\nSkipped the first %"PRIu64 "bytes of %s...\n", ++ fprintf(state->auditFile, "\nSkipped the first %" PRIu64 "bytes of %s...\n", + state->skip, scalpelInputGetId(state->inReader)); + if(state->modeVerbose) { +- fprintf(stdout, "\nSkipped the first %"PRIu64 "bytes of %s...\n", ++ fprintf(stdout, "\nSkipped the first %" PRIu64 "bytes of %s...\n", + state->skip, scalpelInputGetId(state->inReader)); + } + } +@@ -448,7 +448,7 @@ + // found a header--record location in header offsets database + if(state->modeVerbose) { + +- fprintf(stdout, "A %s header was found at : %"PRIu64 "\n", ++ fprintf(stdout, "A %s header was found at : %" PRIu64 "\n", + currentneedle->suffix, + positionUseCoverageBlockmap(state, startLocation)); + +@@ -478,7 +478,7 @@ + + if(state->modeVerbose) { + fprintf(stdout, +- "Memory reallocation performed, total header storage = %"PRIu64 "\n", ++ "Memory reallocation performed, total header storage = %" PRIu64 "\n", + currentneedle->offsets.headerstorage); + } + } +@@ -494,7 +494,7 @@ + // found a footer--record location in footer offsets database + if(state->modeVerbose) { + +- fprintf(stdout, "A %s footer was found at : %"PRIu64 "\n", ++ fprintf(stdout, "A %s footer was found at : %" PRIu64 "\n", + currentneedle->suffix, + positionUseCoverageBlockmap(state, startLocation)); + +@@ -524,7 +524,7 @@ + if(state->modeVerbose) { + + fprintf(stdout, +- "Memory reallocation performed, total footer storage = %"PRIu64 "\n", ++ "Memory reallocation performed, total footer storage = %" PRIu64 "\n", + currentneedle->offsets.footerstorage); + } + } +@@ -618,7 +618,7 @@ + // found a header--record location in header offsets database + if(state->modeVerbose) { + +- fprintf(stdout, "A %s header was found at : %"PRIu64 "\n", ++ fprintf(stdout, "A %s header was found at : %" PRIu64 "\n", + currentneedle->suffix, + positionUseCoverageBlockmap(state, startLocation)); + } +@@ -647,7 +647,7 @@ + if(state->modeVerbose) { + + fprintf(stdout, +- "Memory reallocation performed, total header storage = %"PRIu64 "\n", ++ "Memory reallocation performed, total header storage = %" PRIu64 "\n", + currentneedle->offsets.headerstorage); + + } +@@ -756,7 +756,7 @@ + startLocation = offset + (foundat[needlenum][i] - readbuffer); + if(state->modeVerbose) { + +- fprintf(stdout, "A %s footer was found at : %"PRIu64 "\n", ++ fprintf(stdout, "A %s footer was found at : %" PRIu64 "\n", + currentneedle->suffix, + positionUseCoverageBlockmap(state, startLocation)); + } +@@ -784,7 +784,7 @@ + if(state->modeVerbose) { + + fprintf(stdout, +- "Memory reallocation performed, total footer storage = %"PRIu64 "\n", ++ "Memory reallocation performed, total footer storage = %" PRIu64 "\n", + currentneedle->offsets.footerstorage); + } + } +@@ -991,7 +991,7 @@ + state->inReader)) > longestneedle - 1) { + + if(state->modeVerbose) { +- fprintf(stdout, "Read %"PRIu64 " bytes from image file.\n", bytesread); ++ fprintf(stdout, "Read %" PRIu64 " bytes from image file.\n", bytesread); + } + + if((err = scalpelInputGetError(state->inReader))) { +@@ -1106,7 +1106,7 @@ + + + if(state->modeVerbose) { +- fprintf(stdout, "Total file size is %"PRIu64 " bytes\n", filesize); ++ fprintf(stdout, "Total file size is %" PRIu64 " bytes\n", filesize); + } + + +@@ -1537,7 +1537,7 @@ + fprintf(stdout, "%s", currentneedle->endtext); + } + +- fprintf(stdout, "\" --> %"PRIu64 " files\n", currentneedle->numfilestocarve); ++ fprintf(stdout, "\" --> %" PRIu64 " files\n", currentneedle->numfilestocarve); + + + } +@@ -1915,7 +1915,7 @@ + (unsigned long + long)(ceil((double)filesize / (double)state->coverageblocksize)); + +- fprintf(stdout, "# of blocks in coverage blockmap is %"PRIu64 ".\n", ++ fprintf(stdout, "# of blocks in coverage blockmap is %" PRIu64 ".\n", + state->coveragenumblocks); + + +@@ -1970,7 +1970,7 @@ + (unsigned long long)ceil((double)filesize / + (double)state->coverageblocksize); + +- fprintf(stdout, "# of blocks in coverage blockmap is %"PRIu64 ".\n", ++ fprintf(stdout, "# of blocks in coverage blockmap is %" PRIu64 ".\n", + state->coveragenumblocks); + + fprintf(stdout, "Allocating and clearing in-core coverage bitmap.\n"); +@@ -2374,7 +2374,7 @@ + + if(state->modeVerbose && state->useCoverageBlockmap) { + fprintf(stdout, +- "Coverage map decreased current file position by %"PRIu64 " bytes.\n", ++ "Coverage map decreased current file position by %" PRIu64 " bytes.\n", + (unsigned long long)decrease); + } + } +@@ -2399,7 +2399,7 @@ + if(state->useCoverageBlockmap) { + if(state->modeVerbose) { + fprintf(stdout, +- "Issuing coverage map-based READ, wants %"PRIu64 " bytes.\n", ++ "Issuing coverage map-based READ, wants %" PRIu64 " bytes.\n", + neededbytes); + } + +@@ -2425,7 +2425,7 @@ + + if(state->modeVerbose) { + fprintf(stdout, +- "fread using coverage map to skip %"PRIu64 " bytes.\n", bytestoskip); ++ "fread using coverage map to skip %" PRIu64 " bytes.\n", bytestoskip); + } + + scalpelInputSeeko(inReader, (off64_t) bytestoskip, SCALPEL_SEEK_CUR); +@@ -2450,7 +2450,7 @@ + + if(state->modeVerbose) { + fprintf(stdout, +- "fread using coverage map found %"PRIu64 " consecutive bytes.\n", ++ "fread using coverage map found %" PRIu64 " consecutive bytes.\n", + bytestoread); + } + +@@ -2465,7 +2465,7 @@ + curpos += bytestoread; + + if(state->modeVerbose) { +- fprintf(stdout, "fread using coverage map read %"PRIu64 " bytes.\n", ++ fprintf(stdout, "fread using coverage map read %" PRIu64 " bytes.\n", + bytesread); + } + } +@@ -2879,7 +2879,7 @@ + } + + // # of headers +- if(fprintf(dbfile, "%"PRIu64 "\n", currentneedle->offsets.numheaders) ++ if(fprintf(dbfile, "%" PRIu64 "\n", currentneedle->offsets.numheaders) + <= 0) { + + fprintf(stderr, +@@ -2893,7 +2893,7 @@ + for(i = 0; i < currentneedle->offsets.numheaders; i++) { + #ifdef _WIN32 + if(fprintf +- (dbfile, "%"PRIu64 "\n", ++ (dbfile, "%" PRIu64 "\n", + positionUseCoverageBlockmap(state, + currentneedle->offsets. + headers[i])) <= 0) { +@@ -2913,7 +2913,7 @@ + } + + // # of footers +- if(fprintf(dbfile, "%"PRIu64 "\n", currentneedle->offsets.numfooters) ++ if(fprintf(dbfile, "%" PRIu64 "\n", currentneedle->offsets.numfooters) + <= 0) { + fprintf(stderr, + "Error writing to header/footer database file: %s\n", fn); +@@ -2925,7 +2925,7 @@ + // all footer positions for current suffix + for(i = 0; i < currentneedle->offsets.numfooters; i++) { + if(fprintf +- (dbfile, "%"PRIu64 "\n", ++ (dbfile, "%" PRIu64 "\n", + positionUseCoverageBlockmap(state, + currentneedle->offsets. + footers[i])) <= 0) { +--- a/src/helpers.cpp ++++ b/src/helpers.cpp +@@ -528,7 +528,7 @@ + if((scalpelInputSeeko(inReader, state->skip, SCALPEL_SEEK_SET))) { + + fprintf(stderr, +- "ERROR: Couldn't skip %"PRIu64 " bytes at the start of input file %s\n", ++ "ERROR: Couldn't skip %" PRIu64 " bytes at the start of input file %s\n", + state->skip, inputId); + + +@@ -543,7 +543,7 @@ + } + else { + +- fprintf(stderr, "\nSkipped the first %"PRIu64 " bytes of %s...\n", ++ fprintf(stderr, "\nSkipped the first %" PRIu64 " bytes of %s...\n", + state->skip, inputId); + + +--- a/src/scalpel_exec.cpp ++++ b/src/scalpel_exec.cpp +@@ -141,7 +141,7 @@ + } + + fprintf(stdout, +- "\nScalpel is done, files carved = %"PRIu64 ", elapsed = %ld secs.\n", ++ "\nScalpel is done, files carved = %" PRIu64 ", elapsed = %ld secs.\n", + state.fileswritten, (int)time(0) - starttime); + + destroy_threading_model(&state); +@@ -348,7 +348,7 @@ + numopts++; + state->skip = strtoull(optarg, NULL, 10); + fprintf(stdout, +- "Skipping the first %"PRIu64 " bytes of each image file.\n", state->skip); ++ "Skipping the first %" PRIu64 " bytes of each image file.\n", state->skip); + break; + + case 'c': diff --git a/app-forensics/scalpel/files/musl-error_h.patch b/app-forensics/scalpel/files/musl-error_h.patch new file mode 100644 index 000000000000..7f8139cf67a6 --- /dev/null +++ b/app-forensics/scalpel/files/musl-error_h.patch @@ -0,0 +1,83 @@ +https://raw.githubusercontent.com/gentoo/musl/master/dev-libs/elfutils/files/0.178/musl-error_h.patch + +From 9cb8fad40329cc6445233af0b6ac3f2adde19c65 Mon Sep 17 00:00:00 2001 +From: +Date: Thu, 12 Dec 2019 22:00:47 -0600 +Subject: [PATCH 9/9] Add hacked up error header for non GLIBC machines + +--- + lib/error.h | 27 +++++++++++++++++++++++++++ + src/error.h | 27 +++++++++++++++++++++++++++ + 2 files changed, 54 insertions(+) + create mode 100644 lib/error.h + create mode 100644 src/error.h + +diff --git a/lib/error.h b/lib/error.h +new file mode 100644 +index 0000000..ef06827 +--- /dev/null ++++ b/error.h +@@ -0,0 +1,27 @@ ++#ifndef _ERROR_H_ ++#define _ERROR_H_ ++ ++#include <stdarg.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <errno.h> ++ ++static unsigned int error_message_count = 0; ++ ++static inline void error(int status, int errnum, const char* format, ...) ++{ ++ va_list ap; ++ fprintf(stderr, "%s: ", program_invocation_name); ++ va_start(ap, format); ++ vfprintf(stderr, format, ap); ++ va_end(ap); ++ if (errnum) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ fprintf(stderr, "\n"); ++ error_message_count++; ++ if (status) ++ exit(status); ++} ++ ++#endif /* _ERROR_H_ */ +diff --git a/src/error.h b/src/error.h +new file mode 100644 +index 0000000..ef06827 +--- /dev/null ++++ b/src/error.h +@@ -0,0 +1,27 @@ ++#ifndef _ERROR_H_ ++#define _ERROR_H_ ++ ++#include <stdarg.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <errno.h> ++ ++static unsigned int error_message_count = 0; ++ ++static inline void error(int status, int errnum, const char* format, ...) ++{ ++ va_list ap; ++ fprintf(stderr, "%s: ", program_invocation_name); ++ va_start(ap, format); ++ vfprintf(stderr, format, ap); ++ va_end(ap); ++ if (errnum) ++ fprintf(stderr, ": %s", strerror(errnum)); ++ fprintf(stderr, "\n"); ++ error_message_count++; ++ if (status) ++ exit(status); ++} ++ ++#endif /* _ERROR_H_ */ +-- +2.24.1 + diff --git a/app-forensics/scalpel/metadata.xml b/app-forensics/scalpel/metadata.xml index 578929e27035..8eb003b19ca6 100644 --- a/app-forensics/scalpel/metadata.xml +++ b/app-forensics/scalpel/metadata.xml @@ -1,15 +1,22 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> - <longdescription lang="en"> - Scalpel is a fast file carver that reads a database of header and footer - definitions and extracts matching files or data fragments from a set of image - files or raw device files. Scalpel is filesystem-independent and will carve - files from FATx, NTFS, ext2/3, HFS+, or raw partitions. It is useful for both - digital forensics investigation and file recovery. - </longdescription> - <upstream> - <remote-id type="github">sleuthkit/scalpel</remote-id> - </upstream> + <maintainer type="person" proxied="yes"> + <email>martin.dummer@gmx.net</email> + <name>Martin Dummer</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription lang="en"> + Scalpel is a fast file carver that reads a database of header and footer + definitions and extracts matching files or data fragments from a set of image + files or raw device files. Scalpel is filesystem-independent and will carve + files from FATx, NTFS, ext2/3, HFS+, or raw partitions. It is useful for both + digital forensics investigation and file recovery. + </longdescription> + <upstream> + <remote-id type="github">sleuthkit/scalpel</remote-id> + </upstream> </pkgmetadata> diff --git a/app-forensics/scalpel/scalpel-2.0.ebuild b/app-forensics/scalpel/scalpel-2.0.ebuild deleted file mode 100644 index b09225018fc9..000000000000 --- a/app-forensics/scalpel/scalpel-2.0.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="A high performance file carver" -HOMEPAGE="https://github.com/sleuthkit/scalpel" -SRC_URI="http://www.digitalforensicssolutions.com/Scalpel/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -RDEPEND="dev-libs/tre" -DEPEND="${RDEPEND}" - -DOCS=( Changelog README ) - -src_prepare() { - # Set the default config file location - sed -i -e "s:scalpel.conf:/etc/\0:" src/scalpel.h || die "sed failed" - default -} - -src_install() { - default - - insinto /etc - doins scalpel.conf -} diff --git a/app-forensics/scalpel/scalpel-2.1_pre20210326.ebuild b/app-forensics/scalpel/scalpel-2.1_pre20210326.ebuild new file mode 100644 index 000000000000..dd1fe9be6aed --- /dev/null +++ b/app-forensics/scalpel/scalpel-2.1_pre20210326.ebuild @@ -0,0 +1,46 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit autotools flag-o-matic + +DESCRIPTION="A high performance file carver" +HOMEPAGE="https://github.com/sleuthkit/scalpel" +SCALPEL_COMMIT="35e1367ef2232c0f4883c92ec2839273c821dd39" +SRC_URI="https://github.com/sleuthkit/scalpel/archive/${SCALPEL_COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/scalpel-${SCALPEL_COMMIT}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="dev-libs/tre" +RDEPEND="${DEPEND}" +BDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/gcc-11-fix-literal-suffix.patch" ) +DOCS=( Changelog README ) + +src_prepare() { + # Set the default config file location + sed -e "s:scalpel.conf:/etc/\0:" -i src/scalpel.h || die "sed failed" + + sed -e 's|AM_CPPFLAGS =.*|AM_CPPFLAGS = -std=c++11|' -i Makefile.am src/Makefile.am || die "sed failed" + + # #716104 compile with musl misses error.h, solution borrowed from #701478 + if use elibc_musl; then + eapply "${FILESDIR}/musl-error_h.patch" + fi + + default + eautoreconf + + filter-lto # https://bugs.gentoo.org/865687 +} + +src_install() { + default + + insinto /etc + doins scalpel.conf +} diff --git a/app-forensics/sleuthkit/Manifest b/app-forensics/sleuthkit/Manifest index 9ab4c08b2ef5..0c620b66ce46 100644 --- a/app-forensics/sleuthkit/Manifest +++ b/app-forensics/sleuthkit/Manifest @@ -1,6 +1,5 @@ -DIST commons-validator-1.6.jar 186077 BLAKE2B 39080bebfde71d87847b65f212d47a51bab9567cb0aaf7122359a67a8eb817877a6cc80495a15aefb12936d0e36532ed771dc0a2dff8401fc301f658ed38ef88 SHA512 aded530d3b79ead6ba5c44668c6d6964d7721f9617249f6aaa1c8f558ad4b3d3c1b6d78b639a4cb8dd27a671879b662fdbba0502fd04e131f3286169507df30c -DIST gson-2.8.5.jar 241622 BLAKE2B b13887177b5d5f2a11b2dde1fdbaa3a95b55bb7b5500624c7eb0745e861c897ed1e27868bad19d30a1670c90f3068a8fd40e1b81e5e25e96819fa5c371a5e1af SHA512 5dd7214c542a7b93aab3eab0ba13e4ac3d6ddb05c795fb6d3992e21925a98dce87cb186ac67b4d3ad146f96e14d38b3892837eca57a27b4e845aca6d4e4f708a -DIST sleuthkit-4.10.1.tar.gz 3524246 BLAKE2B ddea16693730a993032868ea60423d4bfcf3cba470010854c7bd36ab0a033325d906a0e4760501d59fdda4f37e12052f8672d33e4e374d1a6cdb03e22d0de367 SHA512 3ee335ba98bbb16985207ad50bc15a607ea2bcf550bba392be1cace8982c893a29e9de64e6598d02f41f9f745dc720f829317ed31f068e6cb1f6c230699e47bf DIST sleuthkit-4.11.1.tar.gz 3718417 BLAKE2B 4ce1fa68f770e61942e00e6a05ac751afdd7f33d781ec1069e9a8cb9a27d22f0ed506e9affeaddaf9ecfa98e6d30f468314b5a00d35b20ba01fc312765dbef14 SHA512 04e4ca1c18bda56c816aa493eb3b887f2f62162e16c35079d4208b89464a78109fc189fec55ea6db8a60ab01a4e46c87902f00286abee203ff0c53ab572cfeda +DIST sleuthkit-4.12.1.tar.gz 3768424 BLAKE2B 506d21645cfe809994ebe3edac47402b3590ab4d5bc16260daa706b1fba5ceacf5eb2c3baa96cfa1b7404fbdfcf77705d6f28ddaf293e8d71a1e4cbde93f74a6 SHA512 f3efe1339edc9eb07023975a1e2e2dc7bc47d61d838aada941b7591e2c5beb74fc5298ebf68ae71875bf8f0f09c0d7929a11762fa47840e7e18398d3ff80b9fc DIST sleuthkit-libewf_64bit-20130416.tar.gz 23818247 BLAKE2B 23be933ed8a74e4834ee6571a28d81ba16e98e4e4e27b5b1b3b655d1d92a6eadcba35aadf96aa404e6e0a225b27f3f5daff2836879b87fe58440a3ad5645de44 SHA512 611cbb57de17600caee0330bbe9917c4481d7711a35dba8c072fd49cd3e1714e0a3ce30fd8fcac9981db848e80870bf5d215326c56808bb6f5b4c8dcc1e5a3c9 DIST sqlite-jdbc-3.25.2.jar 7064881 BLAKE2B 3917da6127137bab710a9e61f326f59320ce94654ebb8ae5e694b05aed6b9b1bd367ade2f08ce5bb52c3ac296992240ad949969f5eff712615d07a18588c6a17 SHA512 efd1ea26d7f4f9bc66bf0d5f80234a0c535829bd498e4c5a0cab42873b58ac69133497d8c45689a1d3a39e657a2d0474d6b930c7bc415dd623801ee4a7354ffb +DIST sqlite-jdbc-3.42.0.0.jar 13030515 BLAKE2B 02ffee9875fefd3f2ba4e9115d0b4fee53163bab994830b28033159ab08df264e5f86bbcfb7d1fae145c9aaafc6537fb9084594ce6b21c9715226a1cf644f174 SHA512 6d0491f7f2f542629f4e69d5891ded85e887f0d8dad8c4568ead07b1eda79e0b97f625374a635f12d419d2f42a4049976365e0a8265ee371172f330be9571616 diff --git a/app-forensics/sleuthkit/files/sleuthkit-4.12.0-configure-ac-test-fix.patch b/app-forensics/sleuthkit/files/sleuthkit-4.12.0-configure-ac-test-fix.patch new file mode 100644 index 000000000000..2bb52435fd9a --- /dev/null +++ b/app-forensics/sleuthkit/files/sleuthkit-4.12.0-configure-ac-test-fix.patch @@ -0,0 +1,34 @@ +https://github.com/sleuthkit/sleuthkit/pull/2835 + +From fd19051920849343631df1cbf8d4b86f1bf98b2c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=B6kt=C3=BCrk=20Y=C3=BCksek?= <gokturk@gentoo.org> +Date: Mon, 26 Jun 2023 22:05:47 -0700 +Subject: [PATCH] configure.ac: use '=' for comparison instead of '==' +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The operator '==' isn't POSIX compliant[0]. Use the standard '=', as it's +done everywhere else in configure.ac. + +[0] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html + +Bug: https://bugs.gentoo.org/870250 +Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index c4226f5be4..bec6ddbf62 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -252,7 +252,7 @@ AS_IF([test "x$enable_java" != "xno"], [ + dnl if we found everything we need, set ax_java_support for the + dnl status message and set X_JNI for use in Makefile + AS_IF([test "x$JNI_CPPFLAGS" != x && test "x$ANT_FOUND" != x && test "x$JAVA" != x], [ax_java_support=yes], [ax_java_support=no]) +-AM_CONDITIONAL([X_JNI],[test "x$ax_java_support" == "xyes"]) ++AM_CONDITIONAL([X_JNI],[test "x$ax_java_support" = "xyes"]) + + AC_CONFIG_COMMANDS([tsk/tsk_incs.h], + [echo "#ifndef _TSK_INCS_H" > tsk/tsk_incs.h diff --git a/app-forensics/sleuthkit/sleuthkit-4.10.1-r3.ebuild b/app-forensics/sleuthkit/sleuthkit-4.10.1-r3.ebuild deleted file mode 100644 index 345ed4e0ca35..000000000000 --- a/app-forensics/sleuthkit/sleuthkit-4.10.1-r3.ebuild +++ /dev/null @@ -1,301 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -JAVA_PKG_BSFIX_NAME="build.xml build-unix.xml" -inherit autotools java-pkg-opt-2 java-ant-2 - -DESCRIPTION="A collection of file system and media management forensic analysis tools" -HOMEPAGE="https://www.sleuthkit.org/sleuthkit/" -# TODO: sqlite-jdbc does not exist in the tree, we bundle it for now -# See: https://bugs.gentoo.org/690010 -# TODO: Upstream uses a very specific version of libewf which is not in -# the tree anymore. So we statically compile and link to sleuthkit. -# Hopefully upstream will figure something out in the future. -# See: https://bugs.gentoo.org/689752 -# TODO: gson-2.8.5 does not exist in the tree. Building it seems to -# require Java 9. We have Java 11 in the tree but I don't see a -# way to use it as a gentoo-vm in order to build gson. Sleuthkit -# upstream still uses Java 8. -# See: https://bugs.gentoo.org/706274 -# TODO: commons-validator-1.6 does not exist in the tree. The latest version -# as of writing this ebuild is 1.4.1, for which the build fails. As -# per #711930, this is a security sensitive bump. We're gonna fetch -# the jar file here and file a bug request for a bump as well: -# https://bugs.gentoo.org/721020 -SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz - java? ( - https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar - http://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.25.2/sqlite-jdbc-3.25.2.jar - https://repo1.maven.org/maven2/commons-validator/commons-validator/1.6/commons-validator-1.6.jar - ) - ewf? ( https://github.com/sleuthkit/libewf_64bit/archive/VisualStudio_2010.tar.gz -> sleuthkit-libewf_64bit-20130416.tar.gz )" - -LICENSE="BSD CPL-1.0 GPL-2+ IBM java? ( Apache-2.0 )" -SLOT="0/19" # subslot = major soname version -KEYWORDS="amd64 ~hppa ppc x86" -IUSE="aff doc ewf java static-libs test +threads zlib" -RESTRICT="!test? ( test )" - -DEPEND=" - dev-db/sqlite:3 - dev-lang/perl:* - aff? ( app-forensics/afflib ) - ewf? ( sys-libs/zlib ) - java? ( - >=dev-java/c3p0-0.9.5:0 - dev-java/commons-lang:3.6 - dev-java/guava:20 - >=dev-java/jdbc-postgresql-9.4:0 - >=dev-java/joda-time-2.4:0 - dev-java/sparsebitset - ) - zlib? ( sys-libs/zlib ) -" -# TODO: add support for not-in-tree libraries libvhdi and libvmdk -# libvhdi: https://github.com/libyal/libvhdi -# libvmdk: https://github.com/libyal/libvmdk -# DEPEND="${DEPEND} -# vhdi? ( dev-libs/libvhdi ) -# vmdk? ( dev-libs/libvmdk ) -# " - -RDEPEND="${DEPEND} - java? ( virtual/jre:1.8 ) -" -DEPEND="${DEPEND} - java? ( virtual/jdk:1.8 ) - doc? ( app-doc/doxygen ) - test? ( >=dev-util/cppunit-1.2.1 ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-4.1.0-tools-shared-libs.patch - "${FILESDIR}"/${PN}-4.6.4-default-jar-location-fix.patch - "${FILESDIR}"/${PN}-4.10.1-exclude-usr-local.patch -) - -src_unpack() { - local f - - unpack ${P}.tar.gz - - if use ewf; then - pushd "${T}" &>/dev/null || die - unpack sleuthkit-libewf_64bit-20130416.tar.gz - export TSK_LIBEWF_SRCDIR="${T}"/libewf_64bit-VisualStudio_2010 - popd &>/dev/null || die - fi - - # Copy the jar files that don't exist in the tree yet - if use java; then - TSK_JAR_DIR="${T}/lib" - mkdir "${TSK_JAR_DIR}" || die - for f in ${A}; do - if [[ ${f} =~ .jar$ ]]; then - cp "${DISTDIR}"/"${f}" "${TSK_JAR_DIR}" || die - fi - done - export TSK_JAR_DIR - fi -} - -tsk_prepare_libewf() { - # Inlining breaks the compilation, disable it - sed -e 's/LIBUNA_INLINE inline/LIBUNA_INLINE/' \ - -i "${TSK_LIBEWF_SRCDIR}"/libuna/libuna_inline.h || die -} - -src_prepare() { - use ewf && tsk_prepare_libewf - - # Do not pass '-Werror'. This is overkill for user builds. - sed -e '/AM_CXXFLAGS/ s/-Werror//g' \ - -i tsk/util/Makefile.am \ - -i tsk/pool/Makefile.am || die - # Remove -static from LDFLAGS because it doesn't actually create - # a static binary. It confuses libtool, who then inserts rpath - sed -e '/LDFLAGS/ s/-static//' \ - -i tools/pooltools/Makefile.am || die - - if use java; then - pushd "${S}"/bindings/java &>/dev/null || die - - # Prevent "make install" from installing - # jar files under /usr/share/java - # We'll use the java eclasses for this - # See: https://github.com/sleuthkit/sleuthkit/pull/1379 - sed -e '/^jar_DATA/ d;' -i Makefile.am || die - - java-pkg-opt-2_src_prepare - - popd &>/dev/null || die - fi - - # Override the doxygen output directories - if use doc; then - sed -e "/^OUTPUT_DIRECTORY/ s|=.*$|= ${T}/doc|" \ - -i tsk/docs/Doxyfile \ - -i bindings/java/doxygen/Doxyfile || die - fi - - # It's safe to call this even after java-pkg-opt-2_src_prepare - # because future calls to eapply_user do nothing and return 0 - default - - eautoreconf -} - -tsk_compile_libewf() { - local myeconfargs=( - --prefix=/ - --libdir=/lib - --enable-static - --disable-shared - --disable-winapi - --without-libbfio - --with-zlib - --without-bzip2 - --without-libhmac - --without-openssl - --without-libuuid - --without-libfuse - - --with-libcstring=no - --with-libcerror=no - --with-libcdata=no - --with-libclocale=no - --with-libcnotify=no - --with-libcsplit=no - --with-libuna=no - --with-libcfile=no - --with-libcpath=no - --with-libbfio=no - --with-libfcache=no - --with-libfvalue=no - - ) - # We want to contain our build flags - local CFLAGS="${CFLAGS}" - local LDFLAGS="${LDFLAGS}" - - pushd "${TSK_LIBEWF_SRCDIR}" &>/dev/null || die - - # Produce relocatable code - CFLAGS+=" -fPIC" - LDFLAGS+=" -fPIC" - econf "${myeconfargs[@]}" - - # Do not waste CPU cycles on building ewftools - sed -e '/ewftools/ d' -i Makefile || die - emake - - # Only install the headers and the library - emake -C libewf DESTDIR="${T}"/image install - emake -C include DESTDIR="${T}"/image install - find "${T}"/image -name '*.la' -delete || die - - popd &>/dev/null || die -} - -src_configure() { - local myeconfargs=( - --enable-offline="${TSK_JAR_DIR}" - $(use_enable java) - $(use_enable static-libs static) - $(use_enable threads multithreading) - $(use_with aff afflib) - $(use_with zlib) - ) - # TODO: add support for non-existing libraries libvhdi and libvmdk - # myeconfargs+=( - # $(use_with vhdi libvhdi) - # $(use_with vmdk libvmdk) - # ) - myeconfargs+=( - --without-libvhdi - --without-libvmdk - ) - - use ewf && tsk_compile_libewf - myeconfargs+=( $(use_with ewf libewf "${T}"/image) ) - - if use java; then - pushd "${S}"/bindings/java &>/dev/null || die - java-ant-2_src_configure - popd &>/dev/null || die - fi - - econf "${myeconfargs[@]}" -} - -src_compile() { - # Give it an existing bogus ivy home #672220 - local -x IVY_HOME="${T}" - - # Create symlinks of jars for the required dependencies - if use java; then - java-pkg_jar-from --into "${TSK_JAR_DIR}" c3p0 - java-pkg_jar-from --into "${TSK_JAR_DIR}" commons-lang:3.6 - java-pkg_jar-from --into "${TSK_JAR_DIR}" guava:20 - java-pkg_jar-from --into "${TSK_JAR_DIR}" jdbc-postgresql - java-pkg_jar-from --into "${TSK_JAR_DIR}" joda-time - java-pkg_jar-from --into "${TSK_JAR_DIR}" sparsebitset - - # case-uco needs gson and expects it under case-uco/java/lib - # symlink it to the jar dir we create for java bindings - ln -s "${TSK_JAR_DIR}" "${S}"/case-uco/java/lib || die - fi - - # Create the doc output dirs if requested - if use doc; then - mkdir -p "${T}"/doc/{api-docs,jni-docs} || die - fi - - emake all $(usex doc api-docs "") -} - -src_install() { - # Give it an existing bogus ivy home #756766 - local -x IVY_HOME="${T}" - local f - - if use java; then - pushd "${S}"/bindings/java &>/dev/null || die - - # Install case-uco - pushd "${S}"/case-uco/java &>/dev/null || die - java-pkg_newjar "dist/${PN}-caseuco-${PV}".jar "${PN}-caseuco.jar" - popd || die - - # Install the bundled jar files as well as the - # sleuthkit jar installed here by case-uco - pushd "${TSK_JAR_DIR}" &>/dev/null || die - for f in *; do - # Skip the symlinks java-pkg_jar-from created - [[ -f ${f} ]] || continue - - # Strip the version numbers as per eclass recommendation - [[ ${f} =~ -([0-9]+\.)+jar$ ]] || continue - - java-pkg_newjar "${f}" "${f/${BASH_REMATCH[0]}/.jar}" - done - popd &>/dev/null || die - - popd &>/dev/null || die - fi - - default - # Default install target for case-uco installs the jar in the wrong place - rm -r "${ED}"/usr/share/java - - # It unconditionally builds both api and jni docs - # We install conditionally based on the provided use flags - if use doc; then - dodoc -r "${T}"/doc/api-docs - use java && dodoc -r "${T}"/doc/jni-docs - fi - - find "${D}" -name '*.la' -delete || die -} diff --git a/app-forensics/sleuthkit/sleuthkit-4.11.1-r1.ebuild b/app-forensics/sleuthkit/sleuthkit-4.11.1-r2.ebuild index 145498c3e809..4d0ad720368c 100644 --- a/app-forensics/sleuthkit/sleuthkit-4.11.1-r1.ebuild +++ b/app-forensics/sleuthkit/sleuthkit-4.11.1-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -22,7 +22,7 @@ SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz LICENSE="BSD CPL-1.0 GPL-2+ IBM java? ( Apache-2.0 )" SLOT="0/19" # subslot = major soname version -KEYWORDS="~amd64 ~hppa ~ppc ~x86" +KEYWORDS="amd64 ~hppa ppc x86" IUSE="aff doc ewf java static-libs test +threads zlib" RESTRICT="!test? ( test )" @@ -35,7 +35,7 @@ DEPEND=" >=dev-java/c3p0-0.9.5:0 dev-java/commons-lang:3.6 >=dev-java/commons-validator-1.6:0 - >=dev-java/gson-2.8.5:2.6 + >=dev-java/gson-2.8.5:0 dev-java/guava:0 >=dev-java/jdbc-postgresql-9.4:0 >=dev-java/joda-time-2.4:0 @@ -62,7 +62,7 @@ DEPEND="${DEPEND} " BDEPEND=" virtual/pkgconfig - doc? ( app-doc/doxygen ) + doc? ( app-text/doxygen ) " PATCHES=( @@ -244,7 +244,7 @@ src_compile() { java-pkg_jar-from --into "${TSK_JAR_DIR}" c3p0 java-pkg_jar-from --into "${TSK_JAR_DIR}" commons-lang:3.6 java-pkg_jar-from --into "${TSK_JAR_DIR}" commons-validator - java-pkg_jar-from --into "${TSK_JAR_DIR}" gson:2.6 + java-pkg_jar-from --into "${TSK_JAR_DIR}" gson java-pkg_jar-from --into "${TSK_JAR_DIR}" guava java-pkg_jar-from --into "${TSK_JAR_DIR}" jdbc-postgresql java-pkg_jar-from --into "${TSK_JAR_DIR}" joda-time diff --git a/app-forensics/sleuthkit/sleuthkit-4.10.1-r5.ebuild b/app-forensics/sleuthkit/sleuthkit-4.12.1-r1.ebuild index 2376e0f7e793..3322803dbb6f 100644 --- a/app-forensics/sleuthkit/sleuthkit-4.10.1-r5.ebuild +++ b/app-forensics/sleuthkit/sleuthkit-4.12.1-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 JAVA_PKG_BSFIX_NAME="build.xml build-unix.xml" inherit autotools java-pkg-opt-2 java-ant-2 @@ -16,9 +16,10 @@ HOMEPAGE="https://www.sleuthkit.org/sleuthkit/" # See: https://bugs.gentoo.org/689752 SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz java? ( - http://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.25.2/sqlite-jdbc-3.25.2.jar + https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.42.0.0/sqlite-jdbc-3.42.0.0.jar ) - ewf? ( https://github.com/sleuthkit/libewf_64bit/archive/VisualStudio_2010.tar.gz -> sleuthkit-libewf_64bit-20130416.tar.gz )" + ewf? ( https://github.com/sleuthkit/libewf_64bit/archive/VisualStudio_2010.tar.gz + -> sleuthkit-libewf_64bit-20130416.tar.gz )" LICENSE="BSD CPL-1.0 GPL-2+ IBM java? ( Apache-2.0 )" SLOT="0/19" # subslot = major soname version @@ -32,23 +33,30 @@ DEPEND=" aff? ( app-forensics/afflib ) ewf? ( sys-libs/zlib ) java? ( - >=dev-java/c3p0-0.9.5:0 + >=dev-java/c3p0-0.9.5.5:0 dev-java/commons-lang:3.6 >=dev-java/commons-validator-1.6:0 - >=dev-java/gson-2.8.5:2.6 + >=dev-java/gson-2.8.5:0 dev-java/guava:0 >=dev-java/jdbc-postgresql-9.4:0 >=dev-java/joda-time-2.4:0 + >=dev-java/mchange-commons-0.2.20:0 dev-java/sparsebitset:0 ) zlib? ( sys-libs/zlib ) " -# TODO: add support for not-in-tree libraries libvhdi and libvmdk +# TODO: add support for not-in-tree libraries: # libvhdi: https://github.com/libyal/libvhdi # libvmdk: https://github.com/libyal/libvmdk +# libvslvm: https://github.com/libyal/libvslvm +# Upstream also says "A stand-alone version of libbfio is needed +# to allow libvslvm to directly read from a TSK_IMAGE." Not sure +# what it means yet. +# # DEPEND="${DEPEND} # vhdi? ( dev-libs/libvhdi ) # vmdk? ( dev-libs/libvmdk ) +# vslvm? ( dev-libs/libvslvm dev-libs/libbfio ) # " RDEPEND="${DEPEND} @@ -56,16 +64,20 @@ RDEPEND="${DEPEND} " DEPEND="${DEPEND} java? ( virtual/jdk:1.8 ) - test? ( >=dev-util/cppunit-1.2.1 ) + test? ( + >=dev-util/cppunit-1.2.1 + ) " BDEPEND=" - doc? ( app-doc/doxygen ) + virtual/pkgconfig + doc? ( app-text/doxygen ) " PATCHES=( "${FILESDIR}"/${PN}-4.1.0-tools-shared-libs.patch "${FILESDIR}"/${PN}-4.6.4-default-jar-location-fix.patch "${FILESDIR}"/${PN}-4.10.1-exclude-usr-local.patch + "${FILESDIR}"/${PN}-4.12.0-configure-ac-test-fix.patch ) src_unpack() { @@ -123,6 +135,15 @@ src_prepare() { java-pkg-opt-2_src_prepare popd &>/dev/null || die + + # Call ant with jar target for case-uco. + # The default invocation of ant tries to + # run junit tests, which there are none. + # It ends up failing with: + # junit.framework.AssertionFailedError: No tests found in org.sleuthkit.caseuco.TestSuite + sed -e '/\tant \$(ant_args)/ s|$| jar|' \ + -i "${S}"/case-uco/java/Makefile.am \ + || die fi # Override the doxygen output directories @@ -196,18 +217,23 @@ src_configure() { --enable-offline="${TSK_JAR_DIR}" $(use_enable java) $(use_enable static-libs static) + $(use_enable test cppunit) $(use_enable threads multithreading) $(use_with aff afflib) $(use_with zlib) ) - # TODO: add support for non-existing libraries libvhdi and libvmdk + # TODO: add support for non-existing libraries: # myeconfargs+=( # $(use_with vhdi libvhdi) # $(use_with vmdk libvmdk) + # $(use_with vslvm libvslvm) + # $(use_with vslvm libbfio) # not a typo # ) myeconfargs+=( --without-libvhdi --without-libvmdk + --without-libvslvm + --without-libbfio ) use ewf && tsk_compile_libewf @@ -231,10 +257,11 @@ src_compile() { java-pkg_jar-from --into "${TSK_JAR_DIR}" c3p0 java-pkg_jar-from --into "${TSK_JAR_DIR}" commons-lang:3.6 java-pkg_jar-from --into "${TSK_JAR_DIR}" commons-validator - java-pkg_jar-from --into "${TSK_JAR_DIR}" gson:2.6 + java-pkg_jar-from --into "${TSK_JAR_DIR}" gson java-pkg_jar-from --into "${TSK_JAR_DIR}" guava java-pkg_jar-from --into "${TSK_JAR_DIR}" jdbc-postgresql java-pkg_jar-from --into "${TSK_JAR_DIR}" joda-time + java-pkg_jar-from --into "${TSK_JAR_DIR}" mchange-commons java-pkg_jar-from --into "${TSK_JAR_DIR}" sparsebitset # case-uco needs gson and expects it under case-uco/java/lib @@ -269,7 +296,7 @@ src_install() { pushd "${TSK_JAR_DIR}" &>/dev/null || die for f in *; do # Skip the symlinks java-pkg_jar-from created - [[ -f ${f} ]] || continue + [[ -L ${f} ]] && continue # Strip the version numbers as per eclass recommendation [[ ${f} =~ -([0-9]+\.)+jar$ ]] || continue @@ -294,3 +321,7 @@ src_install() { find "${D}" -name '*.la' -delete || die } + +src_test() { + emake -C "${S}"/unit_tests check +} diff --git a/app-forensics/unhide/metadata.xml b/app-forensics/unhide/metadata.xml index 1d95e1e021dc..158683cc6fad 100644 --- a/app-forensics/unhide/metadata.xml +++ b/app-forensics/unhide/metadata.xml @@ -1,11 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <maintainer type="person"> - <email>blueness@gentoo.org</email> - <name>Anthony G. Basile</name> - </maintainer> + <!-- maintainer-needed --> <upstream> <remote-id type="sourceforge">unhide</remote-id> + <remote-id type="github">YJesus/Unhide</remote-id> </upstream> </pkgmetadata> diff --git a/app-forensics/unhide/unhide-20210124.ebuild b/app-forensics/unhide/unhide-20210124.ebuild index 1c0bcc068a31..41ce459b1ddd 100644 --- a/app-forensics/unhide/unhide-20210124.ebuild +++ b/app-forensics/unhide/unhide-20210124.ebuild @@ -1,21 +1,17 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="8" inherit toolchain-funcs -DESCRIPTION="A forensic tool to find hidden processes and TCP/UDP ports by rootkits/LKMs" -HOMEPAGE="http://www.unhide-forensics.info" +DESCRIPTION="Forensic tool to find hidden processes and TCP/UDP ports by rootkits/LKMs" +HOMEPAGE="https://www.unhide-forensics.info" SRC_URI="https://github.com/YJesus/Unhide/archive/refs/tags/v${PV}.tar.gz -> ${P}.tgz" -LICENSE="GPL-3" +LICENSE="GPL-3+" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="" - -DEPEND="" -RDEPEND="${DEPEND}" S="${WORKDIR}/Unhide-${PV}" diff --git a/app-forensics/volatility3/Manifest b/app-forensics/volatility3/Manifest index e4b31a5ab9ef..6cb4f7e97263 100644 --- a/app-forensics/volatility3/Manifest +++ b/app-forensics/volatility3/Manifest @@ -1 +1,4 @@ -DIST volatility3-2.0.1.tar.gz 427679 BLAKE2B eb9b4ebb885a8dd4de2769c666b503da4bef792389efbf487815808fd514cf84f7f10b5a12926cf398a4028e7b72a5b78892c4c92d3709fea37fe13a6f32af7d SHA512 752b3fc23b3668df4329f6dbefa2ff8eb2dd63bc6e22e18774096cebae93053567727e3dc6e5ecbf7a0731459c829c37cea8ac735564c62f96a4f652ad2b6cb9 +DIST volatility3-2.4.1.gh.tar.gz 486648 BLAKE2B 7f00ec6b57eb9ef6420f4c1aa735203fbd51fca39aa13200eb821d13842f879c8743f63da7c5bbcf7d84a2850709a15c0aadc2b0311edbdf34dfa026f2a3dcd6 SHA512 5f785a778654b76fc85b7b82b2e9ba9e6315a99169d4d956a9af84ae91086e7a38cac343b7df0f00d6830361c77d377408bf8eab3679c161c8a02212c696389c +DIST volatility3-2.5.2.gh.tar.gz 506557 BLAKE2B d6ea1b4a1fad3bcda8fbb38372a492d59659061e2cb9e7915a4f5d46af2fcdba0402b83575e5b5017f00f32975e98281c2885d7c9cfa576a3ee4a41f75f126a7 SHA512 02cfd06928f1667ec481e776c45e954d4a40fa6da6ffbdd30e0980bd5d09ce70d0e31de6e352a833c36045e67c2120ea6a10e2d3ec1327e9e4e4e1c2af494fcf +DIST volatility3-linux-sample-1.bin.gz 143967523 BLAKE2B 3321e991a50b6e4ccf19e0ee48d779664f43f4cdbdb950ca31a5d08c8ee9de0018e2d4f69f42206f7e8f1c6ea735c47f8aa42806ed0f85e9a837b611f07b3289 SHA512 82a34aa1d4e7d7deb9ea12e892f14ba0a28908b2da2e31ca76efd1e9e59d87769064a1ffffe8979a58b992cea7005fa20954df50984dbe1dd186513ad95168d7 +DIST volatility3-win-xp-laptop-2005-06-25.img.gz 180343409 BLAKE2B 9fc10ddb9208d7023854e9619f6cf5ce140f2a2aa5772ccd8bcd852dd50c6f77e36298dbf7df1512334e7976b6ab35dd77f4c49505e531c3a289dd0f26cfc01e SHA512 a1f758cc1b4febcf11f64bc01b872c7528d19c686d81f8e03d742424fa0600254914e656cdf35c3752b406354f769a8aa256622b2f2afe2d691c4bb6d3be3f52 diff --git a/app-forensics/volatility3/files/volatility3-2.4.1-install.patch b/app-forensics/volatility3/files/volatility3-2.4.1-install.patch new file mode 100644 index 000000000000..aee83bdf885a --- /dev/null +++ b/app-forensics/volatility3/files/volatility3-2.4.1-install.patch @@ -0,0 +1,81 @@ +From b4c6b661f01fc3dde54362a4f55be4d89e4cc6e5 Mon Sep 17 00:00:00 2001 +From: Mike Auty <mike.auty@gmail.com> +Date: Sun, 3 Sep 2023 21:11:36 +0100 +Subject: [PATCH] Core: Include only volatility3 in distributions packages +Upstream: https://github.com/volatilityfoundation/volatility3/commit/b4c6b661f01fc3dde54362a4f55be4d89e4cc6e5 + +Fixes #951 +--- a/setup.py ++++ b/setup.py +@@ -40,7 +40,7 @@ def get_install_requires(): + include_package_data=True, + exclude_package_data={"": ["development", "development.*"], "development": ["*"]}, + packages=setuptools.find_namespace_packages( +- exclude=["development", "development.*"] ++ include=["volatility3"] + ), + entry_points={ + "console_scripts": [ +From 05df365936a5965171632c7b0b0dbd1bee6c08a9 Mon Sep 17 00:00:00 2001 +From: Mike Auty <mike.auty@gmail.com> +Date: Tue, 5 Sep 2023 18:23:48 +0100 +Subject: [PATCH] Core: Fix missing packages in setup.py +Upstream: https://github.com/volatilityfoundation/volatility3/commit/05df365936a5965171632c7b0b0dbd1bee6c08a9 + +Fixes #1002. +--- a/setup.py ++++ b/setup.py +@@ -12,7 +12,7 @@ + + def get_install_requires(): + requirements = [] +- with open("requirements-minimal.txt", "r", encoding = "utf-8") as fh: ++ with open("requirements-minimal.txt", "r", encoding="utf-8") as fh: + for line in fh.readlines(): + stripped_line = line.strip() + if stripped_line == "" or stripped_line.startswith("#"): +@@ -20,6 +20,7 @@ def get_install_requires(): + requirements.append(stripped_line) + return requirements + ++ + setuptools.setup( + name="volatility3", + description="Memory forensics framework", +@@ -39,9 +40,8 @@ def get_install_requires(): + python_requires=">=3.7.0", + include_package_data=True, + exclude_package_data={"": ["development", "development.*"], "development": ["*"]}, +- packages=setuptools.find_namespace_packages( +- include=["volatility3"] +- ), ++ packages=setuptools.find_namespace_packages(where="volatility3"), ++ package_dir={"": "volatility3"}, + entry_points={ + "console_scripts": [ + "vol = volatility3.cli:main", +From 803c56e3c4c6495b2725b77cc7d045e39c98a9bd Mon Sep 17 00:00:00 2001 +From: Mike Auty <mike.auty@gmail.com> +Date: Tue, 5 Sep 2023 23:51:17 +0100 +Subject: [PATCH] Core: include the volatility3 package and all volatility3 + subpackages +Upstream: https://github.com/volatilityfoundation/volatility3/commit/803c56e3c4c6495b2725b77cc7d045e39c98a9bd + +--- a/setup.py ++++ b/setup.py +@@ -37,11 +37,12 @@ def get_install_requires(): + "Documentation": "https://volatility3.readthedocs.io/", + "Source Code": "https://github.com/volatilityfoundation/volatility3", + }, ++ packages=setuptools.find_namespace_packages( ++ include=["volatility3", "volatility3.*"] ++ ), ++ package_dir={"volatility3": "volatility3"}, + python_requires=">=3.7.0", + include_package_data=True, +- exclude_package_data={"": ["development", "development.*"], "development": ["*"]}, +- packages=setuptools.find_namespace_packages(where="volatility3"), +- package_dir={"": "volatility3"}, + entry_points={ + "console_scripts": [ + "vol = volatility3.cli:main", diff --git a/app-forensics/volatility3/volatility3-2.0.1.ebuild b/app-forensics/volatility3/volatility3-2.0.1.ebuild deleted file mode 100644 index c8b4955f0506..000000000000 --- a/app-forensics/volatility3/volatility3-2.0.1.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{8..10} ) -inherit distutils-r1 - -MY_PV=${PV//_beta/-beta.} - -DESCRIPTION="Framework for analyzing volatile memory" -HOMEPAGE="https://github.com/volatilityfoundation/volatility3/ https://www.volatilityfoundation.org/" -SRC_URI="https://github.com/volatilityfoundation/volatility3/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}"/${PN}-${MY_PV} - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="crypt disasm jsonschema leechcore snappy yara" - -RDEPEND=" - >=dev-python/pefile-2017.8.1[${PYTHON_USEDEP}] - crypt? ( >=dev-python/pycryptodome-3[${PYTHON_USEDEP}] ) - disasm? ( >=dev-libs/capstone-3.0.5[python,${PYTHON_USEDEP}] ) - jsonschema? ( >=dev-python/jsonschema-2.3.0[${PYTHON_USEDEP}] ) - leechcore? ( >=dev-python/leechcorepyc-2.4.0[${PYTHON_USEDEP}] ) - snappy? ( >=dev-python/snappy-0.6.0[${PYTHON_USEDEP}] ) - yara? ( >=dev-python/yara-python-3.8.0[${PYTHON_USEDEP}] ) -" -DEPEND="${RDEPEND}" diff --git a/app-forensics/volatility3/volatility3-2.4.1-r2.ebuild b/app-forensics/volatility3/volatility3-2.4.1-r2.ebuild new file mode 100644 index 000000000000..dd3306085d41 --- /dev/null +++ b/app-forensics/volatility3/volatility3-2.4.1-r2.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) +inherit distutils-r1 + +MY_PV=${PV//_beta/-beta.} + +DESCRIPTION="Framework for analyzing volatile memory" +HOMEPAGE="https://github.com/volatilityfoundation/volatility3/ https://www.volatilityfoundation.org/" +SRC_URI=" + https://github.com/volatilityfoundation/volatility3/archive/v${MY_PV}.tar.gz -> ${P}.gh.tar.gz + test? + ( + https://downloads.volatilityfoundation.org/volatility3/images/win-xp-laptop-2005-06-25.img.gz -> ${PN}-win-xp-laptop-2005-06-25.img.gz + https://downloads.volatilityfoundation.org/volatility3/images/linux-sample-1.bin.gz -> ${PN}-linux-sample-1.bin.gz + ) +" +S="${WORKDIR}"/${PN}-${MY_PV} + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="crypt disasm jsonschema leechcore snappy test yara" + +# We need to select *all* subslots of app-arch/snappy which select +# SONAME=libsnappy.so.1. See (https://github.com/gentoo/gentoo/pull/30585#discussion_r1167753625) +RDEPEND=" + >=dev-python/pefile-2017.8.1[${PYTHON_USEDEP}] + crypt? ( >=dev-python/pycryptodome-3[${PYTHON_USEDEP}] ) + disasm? ( >=dev-libs/capstone-3.0.5[python,${PYTHON_USEDEP}] ) + jsonschema? ( >=dev-python/jsonschema-2.3.0[${PYTHON_USEDEP}] ) + leechcore? ( >=dev-python/leechcorepyc-2.4.0[${PYTHON_USEDEP}] ) + snappy? ( + || ( + app-arch/snappy:0/1 + app-arch/snappy:0/1.1 + ) + ) + yara? ( >=dev-python/yara-python-3.8.0[${PYTHON_USEDEP}] ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-install.patch" +) + +# Tests require optional features +REQUIRED_USE="test? ( yara )" + +RESTRICT="!test? ( test )" + +python_test() { + # see .github/workflows/test.yaml + "${EPYTHON}" "${S}/test/test_volatility.py" --volatility=vol.py \ + --image "${WORKDIR}/${PN}-win-xp-laptop-2005-06-25.img" -k test_windows -v || \ + die "Tests fail with ${EPYTHON}" + "${EPYTHON}" "${S}/test/test_volatility.py" --volatility=vol.py \ + --image "${WORKDIR}/${PN}-linux-sample-1.bin" -k test_linux -v || \ + die "Tests fail with ${EPYTHON}" +} diff --git a/app-forensics/volatility3/volatility3-2.5.2.ebuild b/app-forensics/volatility3/volatility3-2.5.2.ebuild new file mode 100644 index 000000000000..71b0dba710b6 --- /dev/null +++ b/app-forensics/volatility3/volatility3-2.5.2.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) +inherit distutils-r1 + +MY_PV=${PV//_beta/-beta.} + +DESCRIPTION="Framework for analyzing volatile memory" +HOMEPAGE="https://github.com/volatilityfoundation/volatility3/ https://www.volatilityfoundation.org/" +SRC_URI=" + https://github.com/volatilityfoundation/volatility3/archive/v${MY_PV}.tar.gz -> ${P}.gh.tar.gz + test? + ( + https://downloads.volatilityfoundation.org/volatility3/images/win-xp-laptop-2005-06-25.img.gz -> ${PN}-win-xp-laptop-2005-06-25.img.gz + https://downloads.volatilityfoundation.org/volatility3/images/linux-sample-1.bin.gz -> ${PN}-linux-sample-1.bin.gz + ) +" +S="${WORKDIR}"/${PN}-${MY_PV} + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="crypt disasm jsonschema leechcore snappy test yara" + +# We need to select *all* subslots of app-arch/snappy which select +# SONAME=libsnappy.so.1. See (https://github.com/gentoo/gentoo/pull/30585#discussion_r1167753625) +RDEPEND=" + >=dev-python/pefile-2023.2.7[${PYTHON_USEDEP}] + crypt? ( >=dev-python/pycryptodome-3[${PYTHON_USEDEP}] ) + disasm? ( >=dev-libs/capstone-3.0.5[python,${PYTHON_USEDEP}] ) + jsonschema? ( >=dev-python/jsonschema-2.3.0[${PYTHON_USEDEP}] ) + leechcore? ( >=dev-python/leechcorepyc-2.4.0[${PYTHON_USEDEP}] ) + snappy? ( + || ( + app-arch/snappy:0/1 + app-arch/snappy:0/1.1 + ) + ) + yara? ( >=dev-python/yara-python-3.8.0[${PYTHON_USEDEP}] ) +" +DEPEND="${RDEPEND}" + +# Tests require optional features +REQUIRED_USE="test? ( yara )" + +RESTRICT="!test? ( test )" + +python_test() { + # see .github/workflows/test.yaml + "${EPYTHON}" "${S}/test/test_volatility.py" --volatility=vol.py \ + --image "${WORKDIR}/${PN}-win-xp-laptop-2005-06-25.img" -k test_windows -v || \ + die "Tests fail with ${EPYTHON}" + "${EPYTHON}" "${S}/test/test_volatility.py" --volatility=vol.py \ + --image "${WORKDIR}/${PN}-linux-sample-1.bin" -k test_linux -v || \ + die "Tests fail with ${EPYTHON}" +} diff --git a/app-forensics/yara/Manifest b/app-forensics/yara/Manifest index 9f554729d3ff..a117491f13c3 100644 --- a/app-forensics/yara/Manifest +++ b/app-forensics/yara/Manifest @@ -1,2 +1,2 @@ -DIST yara-4.2.0.tar.gz 1284059 BLAKE2B 735d161fde5f84199315f1ce6d31f1ad79488312bede85d2941a03cb97fe75c3c4db0b3cba75782d338a462d87e9d9ed57b393bbdb68decfb350a1bbd096258b SHA512 24ca707015c77d87126bcaac0991997f6b09403024765d615a06db47191a3f0177e1c1eb4a917ec8412876b61d28f4a708f36999ddd9214c3967968c71ae3b7c -DIST yara-4.2.1.tar.gz 1285173 BLAKE2B dc290bf7fe85d468fd519e68a12d88097d817ca064a665397ba64768078a2d572b46e488eb48747ea1904207598b41a72a510b4b8e4e8601cf518cb6ab98c322 SHA512 036a35d713647b23998135da0d27c13a8876aa44e18e3c9dc99fa425273d7c4a953cbdc78f413f29e8bf818d84b340d0719e241d2a83b7165a16d97e952c45b0 +DIST yara-4.4.0.tar.gz 2220068 BLAKE2B f9654592f3dbe493dc31bcda80c9f0e31a2a8998f47d1172afe7456a9d4ead8f475e3f0999140c952343cdeca1cedc8060a3b42c1bbe57ce617fd5b5a86dbfb3 SHA512 705db57b73e5165a26e0aaea728521f372b9f7f613665860dd22066c30e75a614815fb17ee8654780fcfc157f0137cbeda015ec088a698f31adcf071e233205f +DIST yara-4.5.0.tar.gz 2206492 BLAKE2B 788ed6c4989bbc2d0a113b46bcd1291e7544ab8f56ebe499725163b7b02feb016935210e8a08d9cb179fbffc09fafb461cc55156101d9616a23a480a78862d9e SHA512 c9fe8a89879d1a742236101f1754e6b25e70356cdf5c020b2583e3ac509600c3b462756c412b01f2ebcb17df351c83afcf04d1cfaa87e6753eb25bab0f797aa3 diff --git a/app-forensics/yara/files/yara-4.2-test.patch b/app-forensics/yara/files/yara-4.2-test.patch deleted file mode 100644 index 43a97030a4fd..000000000000 --- a/app-forensics/yara/files/yara-4.2-test.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://bugs.gentoo.org/836790 -https://github.com/VirusTotal/yara/pull/1683 ---- a/tests/test-rules.c -+++ b/tests/test-rules.c -@@ -3061,7 +3061,7 @@ void test_process_scan() - exit(EXIT_FAILURE); - } - -- spawn("/bin/sh", "-c", "VAR='Hello, world!'; sleep 600; true"); -+ spawn("/bin/sh", "-c", "VAR='Hello, world!'; sleep 600& PID=\$!; trap \"kill \$PID\" EXIT; wait; true"); - - counters.rules_matching = 0; - counters.rules_not_matching = 0; diff --git a/app-forensics/yara/metadata.xml b/app-forensics/yara/metadata.xml index a368fb9eb15d..a9b860305e6c 100644 --- a/app-forensics/yara/metadata.xml +++ b/app-forensics/yara/metadata.xml @@ -9,6 +9,10 @@ <email>sam@gentoo.org</email> <name>Sam James</name> </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> <longdescription> YARA is a tool aimed at (but not limited to) helping malware researchers to identify and classify malware samples. With YARA you can diff --git a/app-forensics/yara/yara-4.2.0-r1.ebuild b/app-forensics/yara/yara-4.4.0.ebuild index 55e7f11069d5..71cdcbc586e9 100644 --- a/app-forensics/yara/yara-4.2.0-r1.ebuild +++ b/app-forensics/yara/yara-4.4.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -6,15 +6,19 @@ EAPI=8 inherit autotools DESCRIPTION="A malware identification and classification tool" -HOMEPAGE="http://virustotal.github.io/yara/" -SRC_URI="https://github.com/virustotal/yara/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${PN}-${PV/_/-}" +HOMEPAGE="https://virustotal.github.io/yara/" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/VirusTotal/yara.git" +else + SRC_URI="https://github.com/virustotal/yara/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${PV/_/-}" + KEYWORDS="amd64 ~arm64 ~ppc64 x86" +fi LICENSE="Apache-2.0" SLOT="0/8" -if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~amd64 ~x86" -fi IUSE="+dex +dotnet +cuckoo +macho +magic profiling python test" RESTRICT="!test? ( test )" @@ -24,10 +28,9 @@ DEPEND=" magic? ( sys-apps/file:= ) " RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" PDEPEND="python? ( =dev-python/yara-python-$(ver_cut 1)* )" -PATCHES=( "${FILESDIR}/${PN}-$(ver_cut 1-2)-test.patch" ) - src_prepare() { default eautoreconf @@ -53,5 +56,5 @@ src_install() { # TODO: Allow tests to work against dyn. lib rather than building # statically just for tests. - find "${ED}" -name '*.a' -o -name '*.la' -delete || die + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die } diff --git a/app-forensics/yara/yara-4.2.1.ebuild b/app-forensics/yara/yara-4.5.0.ebuild index 55e7f11069d5..e5874a8e7202 100644 --- a/app-forensics/yara/yara-4.2.1.ebuild +++ b/app-forensics/yara/yara-4.5.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -6,15 +6,19 @@ EAPI=8 inherit autotools DESCRIPTION="A malware identification and classification tool" -HOMEPAGE="http://virustotal.github.io/yara/" -SRC_URI="https://github.com/virustotal/yara/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/${PN}-${PV/_/-}" +HOMEPAGE="https://virustotal.github.io/yara/" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/VirusTotal/yara.git" +else + SRC_URI="https://github.com/virustotal/yara/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${PV/_/-}" + KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +fi LICENSE="Apache-2.0" SLOT="0/8" -if [[ ${PV} != *_rc* ]] ; then - KEYWORDS="~amd64 ~x86" -fi IUSE="+dex +dotnet +cuckoo +macho +magic profiling python test" RESTRICT="!test? ( test )" @@ -24,10 +28,9 @@ DEPEND=" magic? ( sys-apps/file:= ) " RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" PDEPEND="python? ( =dev-python/yara-python-$(ver_cut 1)* )" -PATCHES=( "${FILESDIR}/${PN}-$(ver_cut 1-2)-test.patch" ) - src_prepare() { default eautoreconf @@ -53,5 +56,5 @@ src_install() { # TODO: Allow tests to work against dyn. lib rather than building # statically just for tests. - find "${ED}" -name '*.a' -o -name '*.la' -delete || die + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die } diff --git a/app-forensics/yara/yara-9999.ebuild b/app-forensics/yara/yara-9999.ebuild new file mode 100644 index 000000000000..389b8493c70f --- /dev/null +++ b/app-forensics/yara/yara-9999.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="A malware identification and classification tool" +HOMEPAGE="https://virustotal.github.io/yara/" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/VirusTotal/yara.git" +else + SRC_URI="https://github.com/virustotal/yara/archive/v${PV/_/-}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${PV/_/-}" + KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" +fi + +LICENSE="Apache-2.0" +SLOT="0/8" +IUSE="+dex +dotnet +cuckoo +macho +magic profiling python test" +RESTRICT="!test? ( test )" + +DEPEND=" + dev-libs/openssl:= + cuckoo? ( dev-libs/jansson:= ) + magic? ( sys-apps/file:= ) +" +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" +PDEPEND="python? ( =dev-python/yara-python-$(ver_cut 1)* )" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_enable profiling) \ + $(use_enable cuckoo) \ + $(use_enable magic) \ + $(use_enable dotnet) \ + $(use_enable macho) \ + $(use_enable dex) \ + $(use_enable test static) +} + +src_test() { + emake check +} + +src_install() { + default + + # TODO: Allow tests to work against dyn. lib rather than building + # statically just for tests. + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die +} diff --git a/app-forensics/zzuf/Manifest b/app-forensics/zzuf/Manifest index 54710407b8a1..134d8d844623 100644 --- a/app-forensics/zzuf/Manifest +++ b/app-forensics/zzuf/Manifest @@ -1 +1,2 @@ DIST zzuf-0.15_p20190208.tar.gz 140812 BLAKE2B 908661fdb51a5b2d5b188ac7df2731c5f069db8489651145f6d4a5cb0f02dc99fa10c3771a034645043f547ef92dfe9e3cfa3f1442dbad690d88ef620f2cfdd8 SHA512 e4d6b4356385642323520c1f1d476b572465881df539d0c6e7110ca7974da81b4b744896df7deac8b462707ca9e0db578ca0c118d6ba2da4bc78ffe31328f711 +DIST zzuf-0.15_p20220529.tar.gz 140825 BLAKE2B a36207082210e062575bed45eac4a83923cbe5f0e60c0b093053ac96abef085a0e6506d5b7db6b11ed7f0979462fbb92f69767ac548de1a1f96a12d84aac8584 SHA512 50e3c8908f579a70d41d7887ff7d87634f3b856ae82bb7ec6dccacccf363a6494d825e0b6debf683ed29408dcd5dc83dbb39c2d2000be0d79aee5f819d69185a diff --git a/app-forensics/zzuf/files/zzuf-0.15_autoconf-hardcoded-cflags.patch b/app-forensics/zzuf/files/zzuf-0.15_autoconf-hardcoded-cflags.patch new file mode 100644 index 000000000000..f8cbfa5c7642 --- /dev/null +++ b/app-forensics/zzuf/files/zzuf-0.15_autoconf-hardcoded-cflags.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -39,8 +39,6 @@ + AC_MSG_RESULT($SONAME) + AC_DEFINE_UNQUOTED(SONAME, "$SONAME", [Define to the libzzuf full name]) + +-# Optimizations +-AC_TRY_CFLAGS(-g -O2, CFLAGS="${CFLAGS} -g -O2") + # Code qui fait des warnings == code de porc == deux baffes dans ta gueule + AC_TRY_CFLAGS(-Wall, CFLAGS="${CFLAGS} -Wall") + AC_TRY_CFLAGS(-W, CFLAGS="${CFLAGS} -W") diff --git a/app-forensics/zzuf/files/zzuf-0.15_implicit_functions.patch b/app-forensics/zzuf/files/zzuf-0.15_implicit_functions.patch new file mode 100644 index 000000000000..aa73a6f03d2b --- /dev/null +++ b/app-forensics/zzuf/files/zzuf-0.15_implicit_functions.patch @@ -0,0 +1,32 @@ +--- a/src/libc_fcns.h ++++ b/src/libc_fcns.h +@@ -0,0 +1,8 @@ ++#ifndef _ZZUF_LIBC_FCNS_H ++#define _ZZUF_LIBC_FCNS_H ++ ++/* Prototypes for internal libc functions zzuf hooks into */ ++extern int __fseeko64(FILE *fp, off64_t offset, int whence); ++extern int _IO_getc(FILE *__fp); ++ ++#endif +--- a/src/libzzuf/lib-stream.c ++++ b/src/libzzuf/lib-stream.c +@@ -57,6 +57,7 @@ + #include "debug.h" + #include "fuzz.h" + #include "fd.h" ++#include "libc_fcns.h" + + #if defined HAVE_FPOS64_T + # define FPOS64_T fpos64_t +--- a/src/zzat.c ++++ b/src/zzat.c +@@ -51,6 +51,8 @@ + + #include "util/getopt.h" + ++#include "libc_fcns.h" ++ + static int run(char const *sequence, char const *file); + static void output(char const *buf, size_t len); + diff --git a/app-forensics/zzuf/files/zzuf-0.15_use-after-free.patch b/app-forensics/zzuf/files/zzuf-0.15_use-after-free.patch new file mode 100644 index 000000000000..3de95d91608c --- /dev/null +++ b/app-forensics/zzuf/files/zzuf-0.15_use-after-free.patch @@ -0,0 +1,20 @@ +--- a/test/zzone.c ++++ b/test/zzone.c +@@ -64,14 +64,14 @@ + last++; + } + +- free(buf); +- free(tmp); +- + size_t total = 0; + for (size_t i = last; i < size; i++) + total += countzeroes(buf[i]); + printf("%li\n", (long)total); + ++ free(buf); ++ free(tmp); ++ + return EXIT_SUCCESS; + } + diff --git a/app-forensics/zzuf/zzuf-0.15_p20220529.ebuild b/app-forensics/zzuf/zzuf-0.15_p20220529.ebuild new file mode 100644 index 000000000000..8b4f9015fa3c --- /dev/null +++ b/app-forensics/zzuf/zzuf-0.15_p20220529.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools multilib-minimal + +EGIT_COMMIT="a7111e51eac3086264fcca0c7026de22b5ab55c7" +DESCRIPTION="Transparent application input fuzzer" +HOMEPAGE="http://caca.zoy.org/wiki/zzuf" +SRC_URI="https://github.com/samhocevar/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + +LICENSE="WTFPL-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" + +# Uses dlopen hack to hijack many libc functions. +# Fails 2 tests with sandbox enabled: check-zzuf-A-autoinc check-utils +RESTRICT="test" + +DOCS=( AUTHORS COPYING TODO ) + +PATCHES=( + "${FILESDIR}"/${PN}-0.15_autoconf-hardcoded-cflags.patch + "${FILESDIR}"/${PN}-0.15_autoconf-musl.patch + "${FILESDIR}"/${PN}-0.15_implicit_functions.patch + "${FILESDIR}"/${PN}-0.15_use-after-free.patch +) + +S="${WORKDIR}"/${PN}-${EGIT_COMMIT} + +src_prepare() { + default + eautoreconf +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf +} + +multilib_src_install_all() { + default + + find "${ED}" -name '*.la' -delete || die +} |