f8eaaa
From 153629a96b07a8ae96b0b28cce100fde9ea1398d Mon Sep 17 00:00:00 2001
f8eaaa
From: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
f8eaaa
Date: Thu, 28 Jan 2021 00:08:35 -0500
f8eaaa
Subject: [PATCH 1/2] Makefile: set DT_SONAME to trace.so
f8eaaa
f8eaaa
Fedora never requires SONAME versioning for plugins according to the
f8eaaa
Packaging Guidelines:
f8eaaa
f8eaaa
    https://docs.fedoraproject.org/en-US/packaging-guidelines/#_downstream_so_name_versioning
f8eaaa
f8eaaa
    In cases where upstream ships unversioned .so library (so this is
f8eaaa
    not needed for plugins, drivers, etc.), the packager MUST try to
f8eaaa
    convince upstream to start versioning it.
f8eaaa
f8eaaa
On the other hand, fedpkg lint still prints warning if the shared
f8eaaa
library doesn't have DT_SONAME. To surpress this, we set DT_SONAME
f8eaaa
field to trace.so for in case.
f8eaaa
f8eaaa
Signed-off-by: HATAYAMA Daisuke <d.hatayama@fujitsu.com>
f8eaaa
---
f8eaaa
 Makefile | 2 +-
f8eaaa
 1 file changed, 1 insertion(+), 1 deletion(-)
f8eaaa
f8eaaa
diff --git a/Makefile b/Makefile
f8eaaa
index a9e0a21..b4573b4 100755
f8eaaa
--- a/Makefile
f8eaaa
+++ b/Makefile
f8eaaa
@@ -28,4 +28,4 @@ INCDIR=/usr/include/crash
f8eaaa
 all: trace.so
f8eaaa
 	
f8eaaa
 trace.so: $(INCDIR)/defs.h trace.c 
f8eaaa
-	gcc $(RPM_OPT_FLAGS) -Wall -I$(INCDIR) -nostartfiles -shared -rdynamic -o trace.so trace.c -fPIC -D$(TARGET) $(TARGET_CFLAGS)
f8eaaa
+	gcc $(RPM_OPT_FLAGS) -Wall -I$(INCDIR) -nostartfiles -shared -rdynamic -Wl,-z,now -Wl,-soname,trace.so -o trace.so trace.c -fPIC -D$(TARGET) $(TARGET_CFLAGS)
f8eaaa
-- 
f8eaaa
2.29.2
f8eaaa