public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: app-forensics/libpreloadvaccine/, app-forensics/libpreloadvaccine/files/
@ 2021-10-18 10:00 Alessandro Barbieri
  0 siblings, 0 replies; 2+ messages in thread
From: Alessandro Barbieri @ 2021-10-18 10:00 UTC (permalink / raw
  To: gentoo-commits

commit:     b4ba7ddab031bc37b25b0b339f2d51babfdbc2b1
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Mon Oct 18 10:00:01 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Mon Oct 18 10:00:50 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b4ba7dda

app-forensics/libpreloadvaccine: initial import

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 app-forensics/libpreloadvaccine/Manifest           |  1 +
 .../files/libpreloadvaccine-makefile.patch         | 33 ++++++++++++++++++++++
 .../libpreloadvaccine-0_pre20190831.ebuild         | 32 +++++++++++++++++++++
 app-forensics/libpreloadvaccine/metadata.xml       | 12 ++++++++
 4 files changed, 78 insertions(+)

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>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: app-forensics/libpreloadvaccine/, app-forensics/libpreloadvaccine/files/
@ 2021-10-21  5:42 Alessandro Barbieri
  0 siblings, 0 replies; 2+ messages in thread
From: Alessandro Barbieri @ 2021-10-21  5:42 UTC (permalink / raw
  To: gentoo-commits

commit:     eb75be22516ed2f91e160cd7e330672a1dd6b7a1
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Thu Oct 21 05:41:53 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu Oct 21 05:42:56 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=eb75be22

app-forensics/libpreloadvaccine: disable tests

Closes: https://bugs.gentoo.org/819090
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 .../files/libpreloadvaccine-fix-typo.patch         | 23 ++++++++++++++++++++++
 .../libpreloadvaccine-0_pre20190831.ebuild         | 12 ++++++++---
 2 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/app-forensics/libpreloadvaccine/files/libpreloadvaccine-fix-typo.patch b/app-forensics/libpreloadvaccine/files/libpreloadvaccine-fix-typo.patch
new file mode 100644
index 000000000..88adda88d
--- /dev/null
+++ b/app-forensics/libpreloadvaccine/files/libpreloadvaccine-fix-typo.patch
@@ -0,0 +1,23 @@
+From 9b55c68551fccf7bdb7514af35045a592b9da2db Mon Sep 17 00:00:00 2001
+From: Alessandro Barbieri <lssndrbarbieri@gmail.com>
+Date: Thu, 21 Oct 2021 07:15:26 +0200
+Subject: [PATCH] fix typo
+
+--- a/test/test_libpreloadvaccine.c
++++ b/test/test_libpreloadvaccine.c
+@@ -33,7 +33,7 @@ static void test_file_contains_object(void)
+ static void test_file_contains_object_bad_file(void)
+ {
+     char *working_dir = getenv("PWD");
+-    char *test_path = strcat(working_dir,"/test/test_data/ld.so.prload");
++    char *test_path = strcat(working_dir,"/test/test_data/ld.so.preload");
+     TEST_ASSERT_FALSE(file_contains_object("/tmp/libpreload.so", test_path));
+ }
+ 
+@@ -62,4 +62,4 @@ int main(void)
+    RUN_TEST(test_file_contains_object_bad_file);
+ 
+    return UnityEnd();
+-}
+\ No newline at end of file
++}

diff --git a/app-forensics/libpreloadvaccine/libpreloadvaccine-0_pre20190831.ebuild b/app-forensics/libpreloadvaccine/libpreloadvaccine-0_pre20190831.ebuild
index 7d512256f..318aaf44e 100644
--- a/app-forensics/libpreloadvaccine/libpreloadvaccine-0_pre20190831.ebuild
+++ b/app-forensics/libpreloadvaccine/libpreloadvaccine-0_pre20190831.ebuild
@@ -16,8 +16,12 @@ KEYWORDS="~amd64"
 IUSE="test"
 
 DOCS=( README.md )
-PATCHES=( "${FILESDIR}/${PN}-makefile.patch" )
-RESTRICT="!test? ( test )"
+PATCHES=(
+	"${FILESDIR}/${PN}-makefile.patch"
+	"${FILESDIR}/${PN}-fix-typo.patch"
+)
+#RESTRICT="!test? ( test )"
+RESTRICT="test"
 
 src_compile() {
 	emake build
@@ -27,6 +31,8 @@ src_compile() {
 src_install() {
 	dolib.so libpreloadvaccine.so
 	einstalldocs
-	echo "😃LD_AUDIT=/usr/$(get_libdir)/libpreloadvaccine.so" > 99libpreloadvaccine || die
+	cat > 99libpreloadvaccine <<- EOF
+		😃LD_AUDIT="/usr/$(get_libdir)/libpreloadvaccine.so"
+	EOF
 	doenvd 99libpreloadvaccine
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-21  5:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-18 10:00 [gentoo-commits] repo/proj/guru:dev commit in: app-forensics/libpreloadvaccine/, app-forensics/libpreloadvaccine/files/ Alessandro Barbieri
  -- strict thread matches above, loose matches on Subject: below --
2021-10-21  5:42 Alessandro Barbieri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox