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