diff options
author | Alessandro Barbieri <lssndrbarbieri@gmail.com> | 2021-10-18 12:00:01 +0200 |
---|---|---|
committer | Alessandro Barbieri <lssndrbarbieri@gmail.com> | 2021-10-18 12:00:50 +0200 |
commit | b4ba7ddab031bc37b25b0b339f2d51babfdbc2b1 (patch) | |
tree | c84cd6370bd1593226805e63e06592cdcc3241c3 /app-forensics | |
parent | dev-util/rust-analyzer: add 20211018, drop 20211004 (diff) | |
download | guru-b4ba7ddab031bc37b25b0b339f2d51babfdbc2b1.tar.gz guru-b4ba7ddab031bc37b25b0b339f2d51babfdbc2b1.tar.bz2 guru-b4ba7ddab031bc37b25b0b339f2d51babfdbc2b1.zip |
app-forensics/libpreloadvaccine: initial import
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'app-forensics')
4 files changed, 78 insertions, 0 deletions
diff --git a/app-forensics/libpreloadvaccine/Manifest b/app-forensics/libpreloadvaccine/Manifest new file mode 100644 index 000000000..1edea9178 --- /dev/null +++ b/app-forensics/libpreloadvaccine/Manifest @@ -0,0 +1 @@ +DIST libpreloadvaccine-0_pre20190831.tar.gz 84112 BLAKE2B 1a1aae9f036d753f1bb65645bc1775eadb8818577b917c48bcc94be370b35ddc9f27e3e05770c320dc47927284f198313922be46b3e2c57d1294e877455dbe63 SHA512 7990868f307e272c1d16c8c31dda89d6df40eafac45a4e03bd22b37a3829472cf71f96eb3bab939973fcdbdee009f2d66d41edeed05f3368c4acbb828624e8a2 diff --git a/app-forensics/libpreloadvaccine/files/libpreloadvaccine-makefile.patch b/app-forensics/libpreloadvaccine/files/libpreloadvaccine-makefile.patch new file mode 100644 index 000000000..852cb5313 --- /dev/null +++ b/app-forensics/libpreloadvaccine/files/libpreloadvaccine-makefile.patch @@ -0,0 +1,33 @@ +--- a/makefile 2019-08-31 06:10:16.000000000 +0200 ++++ b/makefile 2021-10-18 11:35:15.173731696 +0200 +@@ -4,17 +4,14 @@ + LIBS = -lm + + ### +-CFLAGS = -std=c99 +-CFLAGS += -g ++CFLAGS += -std=c99 + CFLAGS += -Wall + CFLAGS += -Wextra + CFLAGS += -pedantic +-CFLAGS += -Werror + CFLAGS += -Wmissing-declarations + CFLAGS += -DUNITY_SUPPORT_64 + + BUILDFLAGS = -Wall +-BUILDFLAGS += -g + BUILDFLAGS += -fPIC + BUILDFLAGS += -shared + +@@ -38,8 +35,8 @@ + + tests.out: test/*.c src/*.c src/*.h + @echo Compiling $@ +- @$(CC) $(CFLAGS) src/*.c test/vendor/unity.c test/*.c -o tests.out $(LIBS) ++ @$(CC) $(CFLAGS) -fPIE $(LDFLAGS) src/*.c test/vendor/unity.c test/*.c -o tests.out $(LIBS) + + build: src/*.c src/*.h + @echo Compiling $@ +- @$(CC) $(BUILDFLAGS) src/*.c -o libpreloadvaccine.so $(BUILDLIBS) +\ Manca newline alla fine del file ++ @$(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libpreloadvaccine.so src/*.c -o libpreloadvaccine.so $(BUILDLIBS) diff --git a/app-forensics/libpreloadvaccine/libpreloadvaccine-0_pre20190831.ebuild b/app-forensics/libpreloadvaccine/libpreloadvaccine-0_pre20190831.ebuild new file mode 100644 index 000000000..7d512256f --- /dev/null +++ b/app-forensics/libpreloadvaccine/libpreloadvaccine-0_pre20190831.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +COMMIT="634e0155e77bb539a5b35c0ea964bbc525ae3f74" + +DESCRIPTION=" Whitelisting LD_PRELOAD libraries using LD_AUDIT" +HOMEPAGE="https://github.com/ForensicITGuy/libpreloadvaccine" +SRC_URI="https://github.com/ForensicITGuy/libpreloadvaccine/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${COMMIT}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" + +DOCS=( README.md ) +PATCHES=( "${FILESDIR}/${PN}-makefile.patch" ) +RESTRICT="!test? ( test )" + +src_compile() { + emake build + use test && emake tests.out +} + +src_install() { + dolib.so libpreloadvaccine.so + einstalldocs + echo "😃LD_AUDIT=/usr/$(get_libdir)/libpreloadvaccine.so" > 99libpreloadvaccine || die + doenvd 99libpreloadvaccine +} diff --git a/app-forensics/libpreloadvaccine/metadata.xml b/app-forensics/libpreloadvaccine/metadata.xml new file mode 100644 index 000000000..011384e12 --- /dev/null +++ b/app-forensics/libpreloadvaccine/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>lssndrbarbieri@gmail.com</email> + <name>Alessandro Barbieri</name> + </maintainer> + <upstream> + <bugs-to>https://github.com/ForensicITGuy/libpreloadvaccine/issues</bugs-to> + <remote-id type="github">ForensicITGuy/libpreloadvaccine</remote-id> + </upstream> +</pkgmetadata> |