From 488f5d0be3651d2e5134aabcaf5efb7d7f804501 Mon Sep 17 00:00:00 2001 From: Josef Ridky Date: Tue, 17 Apr 2018 14:27:53 +0200 Subject: [PATCH] New upstream version 2.0.25 with Python3 support --- .gitignore | 1 + ...I-2.0.19-man.patch.patch => 0001-man.patch | 0 ...obundle.patch.patch => 0002-nobundle.patch | 0 0003-Python3.patch | 167 ++++++++++++++++++ OpenIPMI.spec | 35 ++-- sources | 2 +- 6 files changed, 190 insertions(+), 15 deletions(-) rename 0002-Apply-.-OpenIPMI-2.0.19-man.patch.patch => 0001-man.patch (100%) rename 0003-Apply-OpenIPMI-2.0.21-nobundle.patch.patch => 0002-nobundle.patch (100%) create mode 100644 0003-Python3.patch diff --git a/.gitignore b/.gitignore index 7559be3..06183e6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ OpenIPMI-2.0.18.tar.gz /OpenIPMI-2.0.22.tar.gz /OpenIPMI-2.0.23.tar.gz /OpenIPMI-2.0.24.tar.gz +/OpenIPMI-2.0.25.tar.gz diff --git a/0002-Apply-.-OpenIPMI-2.0.19-man.patch.patch b/0001-man.patch similarity index 100% rename from 0002-Apply-.-OpenIPMI-2.0.19-man.patch.patch rename to 0001-man.patch diff --git a/0003-Apply-OpenIPMI-2.0.21-nobundle.patch.patch b/0002-nobundle.patch similarity index 100% rename from 0003-Apply-OpenIPMI-2.0.21-nobundle.patch.patch rename to 0002-nobundle.patch diff --git a/0003-Python3.patch b/0003-Python3.patch new file mode 100644 index 0000000..7c7e9bb --- /dev/null +++ b/0003-Python3.patch @@ -0,0 +1,167 @@ +diff -urNp a/configure b/configure +--- a/configure 2018-04-17 08:47:58.528284066 +0200 ++++ b/configure 2018-04-17 10:00:24.091372864 +0200 +@@ -13406,7 +13406,7 @@ if test "x$pythoncflags" = "x" -o "x$pyt + pythonprog= + if test "x$trypython" != "xno"; then + # Extract the first word of "python", so it can be a program name with args. +-set dummy python; ac_word=$2 ++set dummy python3; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_path_pythonprog+:} false; then : +@@ -13474,7 +13474,7 @@ fi + + $as_echo "#define HAVE_PYTHON /**/" >>confdefs.h + +- PYTHON_DIR=python ++ PYTHON_DIR=python3.6 + PYTHON_CFLAGS="$pythoncflags" + PYTHON_INSTALL_DIR="$pythoninstalldir" + PYTHON_INSTALL_LIB_DIR="$pythoninstalllibdir" +@@ -13491,7 +13491,7 @@ else + + $as_echo "#define HAVE_PYTHON /**/" >>confdefs.h + +- PYTHON_DIR=python ++ PYTHON_DIR=python3.6 + PYTHON_CFLAGS="$pythoncflags" + PYTHON_INSTALL_DIR="$pythoninstalldir" + PYTHON_INSTALL_LIB_DIR="$pythoninstalllibdir" +@@ -13500,12 +13500,12 @@ if test "x$pythonprog" != "x"; then + if test "x$pythonusepthreads" = "x"; then + cat - <<_ACEOF >conftest.py + try: +- import thread ++ import threading + print('yes') + except: + print('no') + _ACEOF +- pythonusepthreads=`python conftest.py` ++ pythonusepthreads=`python3 conftest.py` + rm -f conftest.py + fi + echo "checking for python threads... $pythonusepthreads" +@@ -13537,7 +13537,7 @@ try: + except: + print('no') + _ACEOF +- tkinter=`python conftest.py` ++ tkinter=`python3 conftest.py` + rm -f conftest.py + fi + fi +diff -urNp a/configure.ac b/configure.ac +--- a/configure.ac 2018-04-17 08:47:58.529284062 +0200 ++++ b/configure.ac 2018-04-17 10:01:02.115576922 +0200 +@@ -526,7 +526,7 @@ AC_SUBST(PERL_POSIX_SO) + if test "x$pythoncflags" = "x" -o "x$pythoninstalldir" = "x"; then + pythonprog= + if test "x$trypython" != "xno"; then +- AC_PATH_PROG(pythonprog, python) ++ AC_PATH_PROG(pythonprog, python3) + fi + if test "x$pythonprog" != "x"; then + # Now find a proper installation location. +@@ -578,12 +578,12 @@ if test "x$pythonprog" != "x"; then + if test "x$pythonusepthreads" = "x"; then + cat - <<_ACEOF >conftest.py + try: +- import thread ++ import threading + print('yes') + except: + print('no') + _ACEOF +- pythonusepthreads=`python conftest.py` ++ pythonusepthreads=`python3 conftest.py` + rm -f conftest.py + fi + echo "checking for python threads... $pythonusepthreads" +@@ -615,7 +615,7 @@ try: + except: + print('no') + _ACEOF +- tkinter=`python conftest.py` ++ tkinter=`python3 conftest.py` + rm -f conftest.py + fi + fi +diff -urNp a/swig/python/Makefile.am b/swig/python/Makefile.am +--- a/swig/python/Makefile.am 2018-04-17 08:47:58.547283986 +0200 ++++ b/swig/python/Makefile.am 2018-04-17 13:08:09.752299116 +0200 +@@ -22,19 +22,14 @@ EXTRA_DIST = OpenIPMI_lang.i OpenIPMI.h + OpenIPMI.pyc: OpenIPMI.py _OpenIPMI.la + -PYTHONPATH=$(PYPATH) $(pythonprog) -c 'import OpenIPMI.py' + +-OpenIPMI.pyo: OpenIPMI.py _OpenIPMI.la +- -PYTHONPATH=$(PYPATH) $(pythonprog) -O -c 'import OpenIPMI.py' +- + OpenIPMI_wrap.c OpenIPMI.py: $(top_srcdir)/swig/OpenIPMI.i OpenIPMI_lang.i + $(SWIG) $(DEFS) -python -o OpenIPMI_wrap.c -I$(top_srcdir)/swig/python $< + +-CLEANFILES = OpenIPMI_wrap.c OpenIPMI.py OpenIPMI.pyo OpenIPMI.pyc ++CLEANFILES = OpenIPMI_wrap.c OpenIPMI.py + +-install-exec-local: _OpenIPMI.la OpenIPMI.py OpenIPMI.pyc OpenIPMI.pyo ++install-exec-local: _OpenIPMI.la OpenIPMI.py + $(INSTALL) -d $(DESTDIR)$(PYTHON_INSTALL_DIR) + $(INSTALL_DATA) OpenIPMI.py "$(DESTDIR)$(PYTHON_INSTALL_DIR)" +- $(INSTALL_DATA) OpenIPMI.pyc "$(DESTDIR)$(PYTHON_INSTALL_DIR)" +- $(INSTALL_DATA) OpenIPMI.pyo "$(DESTDIR)$(PYTHON_INSTALL_DIR)" + if test "x$(PYTHON_GUI_DIR)" = "xopenipmigui"; then \ + $(INSTALL) -d $(DESTDIR)$(bindir); \ + $(INSTALL_SCRIPT) $(srcdir)/openipmigui.py "$(DESTDIR)$(bindir)/openipmigui";\ +@@ -43,8 +38,6 @@ install-exec-local: _OpenIPMI.la OpenIPM + uninstall-local: + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(PYTHON_INSTALL_LIB_DIR)/_OpenIPMI.so" + rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.py" +- rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.pyc" +- rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.pyo" + rm -f "$(DESTDIR)$(bindir)/openipmigui" + + rungui: +diff -urNp a/swig/python/Makefile.in b/swig/python/Makefile.in +--- a/swig/python/Makefile.in 2018-04-17 08:47:58.547283986 +0200 ++++ b/swig/python/Makefile.in 2018-04-17 13:08:50.130269660 +0200 +@@ -443,7 +443,7 @@ nodist__OpenIPMI_la_SOURCES = OpenIPMI_w + _OpenIPMI_la_LDFLAGS = -module -avoid-version + _OpenIPMI_la_LIBADD = $(OPENIPMI_SWIG_LIBS) $(PYTHON_POSIX_LIB) + EXTRA_DIST = OpenIPMI_lang.i OpenIPMI.h openipmigui.py sample.py sample2.py +-CLEANFILES = OpenIPMI_wrap.c OpenIPMI.py OpenIPMI.pyo OpenIPMI.pyc ++CLEANFILES = OpenIPMI_wrap.c OpenIPMI.py + all: all-recursive + + .SUFFIXES: +@@ -837,20 +837,12 @@ uninstall-am: uninstall-local uninstall- + .PRECIOUS: Makefile + + +-OpenIPMI.pyc: OpenIPMI.py _OpenIPMI.la +- -PYTHONPATH=$(PYPATH) $(pythonprog) -c 'import OpenIPMI.py' +- +-OpenIPMI.pyo: OpenIPMI.py _OpenIPMI.la +- -PYTHONPATH=$(PYPATH) $(pythonprog) -O -c 'import OpenIPMI.py' +- + OpenIPMI_wrap.c OpenIPMI.py: $(top_srcdir)/swig/OpenIPMI.i OpenIPMI_lang.i + $(SWIG) $(DEFS) -python -o OpenIPMI_wrap.c -I$(top_srcdir)/swig/python $< + +-install-exec-local: _OpenIPMI.la OpenIPMI.py OpenIPMI.pyc OpenIPMI.pyo ++install-exec-local: _OpenIPMI.la OpenIPMI.py + $(INSTALL) -d $(DESTDIR)$(PYTHON_INSTALL_DIR) + $(INSTALL_DATA) OpenIPMI.py "$(DESTDIR)$(PYTHON_INSTALL_DIR)" +- $(INSTALL_DATA) OpenIPMI.pyc "$(DESTDIR)$(PYTHON_INSTALL_DIR)" +- $(INSTALL_DATA) OpenIPMI.pyo "$(DESTDIR)$(PYTHON_INSTALL_DIR)" + if test "x$(PYTHON_GUI_DIR)" = "xopenipmigui"; then \ + $(INSTALL) -d $(DESTDIR)$(bindir); \ + $(INSTALL_SCRIPT) $(srcdir)/openipmigui.py "$(DESTDIR)$(bindir)/openipmigui";\ +@@ -859,8 +851,6 @@ install-exec-local: _OpenIPMI.la OpenIPM + uninstall-local: + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(PYTHON_INSTALL_LIB_DIR)/_OpenIPMI.so" + rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.py" +- rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.pyc" +- rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.pyo" + rm -f "$(DESTDIR)$(bindir)/openipmigui" + + rungui: diff --git a/OpenIPMI.spec b/OpenIPMI.spec index 9a30d51..67659e7 100644 --- a/OpenIPMI.spec +++ b/OpenIPMI.spec @@ -3,20 +3,20 @@ Summary: IPMI (Intelligent Platform Management Interface) library and tools Name: OpenIPMI -Version: 2.0.24 -Release: 4%{?dist} +Version: 2.0.25 +Release: 1%{?dist} License: LGPLv2+ and GPLv2+ or BSD URL: http://sourceforge.net/projects/openipmi/ Source: http://downloads.sourceforge.net/openipmi/%{name}-%{version}.tar.gz Source1: openipmi.sysconf Source2: openipmi-helper Source3: ipmi.service -Patch1: 0001-Apply-OpenIPMI-2.0.18-pthread-pkgconfig.patch.patch -Patch2: 0002-Apply-.-OpenIPMI-2.0.19-man.patch.patch -Patch3: 0003-Apply-OpenIPMI-2.0.21-nobundle.patch.patch +Patch1: 0001-man.patch +Patch2: 0002-nobundle.patch +Patch3: 0003-Python3.patch BuildRequires: gdbm-devel swig glib2-devel net-snmp-devel ncurses-devel -BuildRequires: openssl-devel python2-devel perl-devel perl-generators +BuildRequires: openssl-devel python3-devel perl-devel perl-generators BuildRequires: pkgconfig BuildRequires: libedit-devel BuildRequires: automake @@ -49,17 +49,17 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description perl The OpenIPMI-perl package contains the Perl language bindings for OpenIPMI. -%package -n python2-openipmi -%{?python_provide:%python_provide python2-openipmi} -%{?python_provide:%python_provide python2-OpenIPMI} +%package -n python3-openipmi +%{?python_provide:%python_provide python3-openipmi} +%{?python_provide:%python_provide python3-OpenIPMI} # Remove before F30 Provides: %{name}-python = %{version}-%{release} Provides: %{name}-python%{?_isa} = %{version}-%{release} -Obsoletes: %{name}-python < %{version}-%{release} +Obsoletes: %{name}-python2 < %{version}-%{release} Summary: IPMI Python language bindings Requires: %{name}-libs%{?_isa} = %{version}-%{release} -%description -n python2-openipmi +%description -n python3-openipmi The OpenIPMI-python package contains the Python language bindings for OpenIPMI. %package devel @@ -101,7 +101,7 @@ export EDIT_LIBS=`pkg-config --libs libedit` LDFLAGS="%{__global_ldflags} -Wl,--as-needed" \ --disable-dependency-tracking \ --disable-static \ - --with-pythoninstall=%{python2_sitearch} \ + --with-pythoninstall=%{python3_sitearch} \ --with-tcl=no \ --with-tkinter=no @@ -181,8 +181,9 @@ echo ".so man1/openipmish.1" > %{buildroot}%{_mandir}/man1/ipmish.1 %attr(644,root,root) %{perl_vendorarch}/OpenIPMI.pm %{perl_vendorarch}/auto/OpenIPMI -%files -n python2-openipmi -%{python2_sitearch}/*OpenIPMI* +%files -n python3-openipmi +%{python3_sitearch}/*OpenIPMI* +%{python3_sitearch}/__pycache__/OpenIPMI.*.pyc %files libs %{_libdir}/libOpenIPMI*.so.* @@ -206,6 +207,12 @@ echo ".so man1/openipmish.1" > %{buildroot}%{_mandir}/man1/ipmish.1 %{_mandir}/man5/ipmi_sim_cmd.5* %changelog +* Tue Apr 17 2018 Josef Ridky - 2.0.25-1 +- New upstream release 2.0.25 (#1568194) +- Replace Python2 with Python3 +- Drop OpenIPMI-python2 and set it as Obsolete +- Introduce new OpenIPMI-python3 package + * Tue Mar 06 2018 Josef Ridky - 2.0.24-5 - use ldconfig macros diff --git a/sources b/sources index 1b83eda..26a13b2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (OpenIPMI-2.0.24.tar.gz) = de1e0a46d7e25af06e07a0f5b8e23deac14d2bca854fbe09b221e776b46b5cf13b5af6b7ee1e8d0984eb792aa4bd095d66d98775674809feafe0a357ca95d677 +SHA512 (OpenIPMI-2.0.25.tar.gz) = 5d89deb5d0d0ff44d6f62a9759577dba92aa58c208477e317aecbd01e71ccf7ba0dab138a1d8feff22d523c85d6ceaee9e478e26834ffcd91949b81d2d9c1f86