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