From 789d37e2160a4dd596313a4d6aac2f571cee8db6 Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Sun, 23 Sep 2018 11:34:12 +0800 Subject: [PATCH] Apply patch to change python-config to python2-config Apply patch to load dlm_lt by soname --- 0001-Explicit-call-Python-2-command.patch | 37 +++++++++++++++++++ ...libdlm_lt.so.3-instead-of-libdlm_lt..patch | 26 +++++++++++++ ocfs2-tools.spec | 10 ++++- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 0001-Explicit-call-Python-2-command.patch create mode 100644 0001-libo2dlm-dlopen-libdlm_lt.so.3-instead-of-libdlm_lt..patch diff --git a/0001-Explicit-call-Python-2-command.patch b/0001-Explicit-call-Python-2-command.patch new file mode 100644 index 0000000..3735fc6 --- /dev/null +++ b/0001-Explicit-call-Python-2-command.patch @@ -0,0 +1,37 @@ +From a32e9de8fd3d6965f76d04a94a39ea4ba8be7a3c Mon Sep 17 00:00:00 2001 +From: Robin Lee +Date: Sat, 22 Sep 2018 23:03:59 +0800 +Subject: [PATCH] Explicit call Python 2 command + +--- + ocfs2console/ocfs2interface/Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/ocfs2console/ocfs2interface/Makefile b/ocfs2console/ocfs2interface/Makefile +index 7c7c9b1c..4964bce2 100644 +--- a/ocfs2console/ocfs2interface/Makefile ++++ b/ocfs2console/ocfs2interface/Makefile +@@ -97,16 +97,16 @@ INSTALL_RULES = install-pylib + DIST_FILES = $(PLIST_CFILES) $(PLIST_HFILES) $(GIDLE_CFILES) $(OCFS2_CFILES) $(O2CB_CFILES) $(PYSRC) $(addsuffix .in,$(BUILT_PYSRC)) + + plistmodule.so: $(PLIST_OBJS) $(LIBOCFS2_DEPS) $(LIBO2DLM_DEPS) $(LIBO2CB_DEPS) $(BLKID_DEPS) +- $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(BLKID_LIBS) $(COM_ERR_LIBS) $(GLIB_LIBS) $(shell python-config --libs) ++ $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(BLKID_LIBS) $(COM_ERR_LIBS) $(GLIB_LIBS) $(shell python2-config --libs) + + gidlemodule.so: $(GIDLE_OBJS) +- $(LINK) -shared $(GLIB_LIBS) $(shell python-config --libs) ++ $(LINK) -shared $(GLIB_LIBS) $(shell python2-config --libs) + + ocfs2module.so: $(OCFS2_OBJS) $(LIBOCFS2_DEPS) $(LIBO2DLM_DEPS) $(LIBO2CB_DEPS) +- $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(UUID_LIBS) $(shell python-config --libs) ++ $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(UUID_LIBS) $(shell python2-config --libs) + + o2cbmodule.so: $(O2CB_OBJS) $(LIBO2CB_DEPS) +- $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(shell python-config --libs) ++ $(LINK) -shared $(LIBOCFS2_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(shell python2-config --libs) + + install-pylib: + $(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(pyexecdir)/ocfs2interface +-- +2.17.1 + diff --git a/0001-libo2dlm-dlopen-libdlm_lt.so.3-instead-of-libdlm_lt..patch b/0001-libo2dlm-dlopen-libdlm_lt.so.3-instead-of-libdlm_lt..patch new file mode 100644 index 0000000..31f3d29 --- /dev/null +++ b/0001-libo2dlm-dlopen-libdlm_lt.so.3-instead-of-libdlm_lt..patch @@ -0,0 +1,26 @@ +From 4ff2ee858381ec4da59bdfdf0e6d33a62a83293c Mon Sep 17 00:00:00 2001 +From: Valentin Vidic +Date: Thu, 25 Jan 2018 13:50:51 +0100 +Subject: [PATCH] libo2dlm: dlopen libdlm_lt.so.3 instead of libdlm_lt.so + +Because libdlm_lt.so is only shipped in the libdlm-dev package. +--- + libo2dlm/o2dlm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libo2dlm/o2dlm.c b/libo2dlm/o2dlm.c +index 0a2f6627..ad590a66 100644 +--- a/libo2dlm/o2dlm.c ++++ b/libo2dlm/o2dlm.c +@@ -803,7 +803,7 @@ static errcode_t load_fsdlm(struct o2dlm_ctxt *ctxt) + goto out; + } + +- ctxt->ct_lib_handle = dlopen("libdlm_lt.so", ++ ctxt->ct_lib_handle = dlopen("libdlm_lt.so.3", + RTLD_NOW | RTLD_LOCAL); + if (!ctxt->ct_lib_handle) + goto out; +-- +2.17.1 + diff --git a/ocfs2-tools.spec b/ocfs2-tools.spec index 10ce3d6..dccc600 100644 --- a/ocfs2-tools.spec +++ b/ocfs2-tools.spec @@ -3,7 +3,7 @@ Summary: Tools for managing the Oracle Cluster Filesystem 2 Name: ocfs2-tools Version: 1.8.5 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Source0: https://github.com/markfasheh/%{name}/archive/%{name}-%{version}/%{name}-%{version}.tar.gz # applied in upstream git 0ffd58b2 @@ -21,6 +21,10 @@ Patch4: 0001-Update-FSF-address-in-ipwidget.py.patch Patch5: 0001-mounted.ocfs2-use-sys-sysmacros.h-include-for-makede.patch # https://github.com/markfasheh/ocfs2-tools/pull/33 Patch6: 0001-Fix-build-with-glibc-2.28.patch +# For Fedora python2 deprecation +Patch7: 0001-Explicit-call-Python-2-command.patch +# https://github.com/markfasheh/ocfs2-tools/pull/27 +Patch8: 0001-libo2dlm-dlopen-libdlm_lt.so.3-instead-of-libdlm_lt..patch URL: https://github.com/markfasheh/ocfs2-tools Requires: bash Requires: coreutils @@ -195,6 +199,10 @@ chmod 755 %{buildroot}/%{python2_sitearch}/ocfs2interface/*.so %{_includedir}/ocfs2/* %changelog +* Sun Sep 23 2018 Robin Lee - 1.8.5-8 +- Apply patch to change python-config to python2-config +- Apply patch to load dlm_lt by soname + * Sun Jul 15 2018 Robin Lee - 1.8.5-7 - Fix python2_sitearch macro