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