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