Architecture specific change in rpms/libsvm.git
by githook-noreply@fedoraproject.org
The package rpms/libsvm.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/libsvm.git/commit/?id=e6b06f5e1ec....
Change:
-%ifarch ppc ppc64
Thanks.
Full change:
============
commit e6b06f5e1ecb99478ac787124851e2f343e7e5b4
Author: Ding-Yi Chen <dchen(a)redhat.com>
Date: Thu Jul 19 11:46:10 2018 +1000
Upstream update to 3.23
diff --git a/.gitignore b/.gitignore
index c5ed10e..48a9e12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ libsvm-3.91.tar.gz
/libsvm-svm-toy-qt.desktop
/libsvm-3.20.tar.gz
/libsvm-3.21.tar.gz
+/libsvm-3.23.tar.gz
diff --git a/libsvm-svm-toy-gtk.desktop b/libsvm-svm-toy-gtk.desktop
deleted file mode 100644
index 3b8613d..0000000
--- a/libsvm-svm-toy-gtk.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Name=svm-toy-gtk
-GenericName=svm-toy GTK version
-Comment=GTK version of svm-toy (libsvm demostration program)
-Exec=svm-toy-gtk
-Icon=libsvm-svm-toy-gtk-48
-StartupNotify=true
-Terminal=false
-Type=Application
-Categories=GTK;Education;Science;Math;DataVisualization
diff --git a/libsvm.javaDir.patch b/libsvm.javaDir.patch
index ed7cf4b..5131c4f 100644
--- a/libsvm.javaDir.patch
+++ b/libsvm.javaDir.patch
@@ -1,34 +1,21 @@
diff -up ./java/Makefile.javaDir ./java/Makefile
---- ./java/Makefile.javaDir 2009-02-18 10:41:04.000000000 +1000
-+++ ./java/Makefile 2010-11-08 10:59:11.229518442 +1000
-@@ -4,13 +4,21 @@ FILES = libsvm/svm.class libsvm/svm_mode
- libsvm/svm_print_interface.class \
+--- ./java/Makefile.javaDir 2016-12-22 04:58:49.000000000 +1000
++++ ./java/Makefile 2018-04-17 12:11:53.773004141 +1000
+@@ -5,8 +5,8 @@ FILES = libsvm/svm.class libsvm/svm_mode
svm_train.class svm_predict.class svm_toy.class svm_scale.class
-
-+JAVA_DOC_DIR=${INSTDIR}/share/javadoc/libsvm-${LIBSVM_VER}
-+CLASSPATH = .
+
#JAVAC = jikes
--JAVAC_FLAGS = -target 1.5 -source 1.5
-+JAVAC_FLAGS = -target 1.5 -source 1.5 -classpath ${CLASSPATH}
-+ifndef JAVAC
- JAVAC = javac
-+endif
+-JAVAC_FLAGS = -target 1.7 -source 1.7
+-JAVAC = javac
++JAVAC_FLAGS = -target 1.7 -source 1.7 -classpath ${CLASSPATH}
++JAVAC ?= javac
# JAVAC_FLAGS =
-
-+ifndef JAR
-+JAR=jar
-+endif
-+
- all: $(FILES)
-- jar cvf libsvm.jar *.class libsvm/*.class
-+ ${JAR} cvf libsvm.jar *.class libsvm/*.class
-
- .java.class:
- $(JAVAC) $(JAVAC_FLAGS) $<
-@@ -18,8 +26,23 @@ all: $(FILES)
+ export CLASSPATH := .:$(CLASSPATH)
+
+@@ -19,8 +19,20 @@ all: $(FILES)
libsvm/svm.java: libsvm/svm.m4
m4 libsvm/svm.m4 > libsvm/svm.java
-
+
+javadoc: docs/index.html
+
+docs/index.html: $(FILES)
@@ -37,21 +24,18 @@ diff -up ./java/Makefile.javaDir ./java/Makefile
+install:
+ mkdir -p ${JAVA_TARGET_DIR}
+ install -m 644 libsvm.jar ${JAVA_TARGET_DIR}
-+# mkdir -p ${JAVA_DOC_DIR}
-+# cd docs; cp -R * ${JAVA_DOC_DIR}
+uninstall:
-+ rm -fr ${JAVA_TARGETDIR}
-+# rm -fr ${JAVA_DOC_DIR}
++ rm -fr ${JAVA_TARGET_DIR}
+
clean:
rm -f libsvm/*.class *.class *.jar libsvm/*~ *~ libsvm/svm.java
+ rm -rf docs
-
+
dist: clean all
rm *.class libsvm/*.class
diff -up ./java/test_applet.html.javaDir ./java/test_applet.html
---- ./java/test_applet.html.javaDir 2003-07-12 14:07:32.000000000 +1000
-+++ ./java/test_applet.html 2010-11-08 10:59:11.229518442 +1000
+--- ./java/test_applet.html.javaDir 2016-12-22 04:58:51.000000000 +1000
++++ ./java/test_applet.html 2018-04-17 11:51:17.927996424 +1000
@@ -1 +1,3 @@
-<APPLET code="svm_toy.class" archive="libsvm.jar" width=300 height=350></APPLET>
+<html>
diff --git a/libsvm.packageMain.patch b/libsvm.packageMain.patch
index dee23cd..f594c5b 100644
--- a/libsvm.packageMain.patch
+++ b/libsvm.packageMain.patch
@@ -4,7 +4,7 @@ diff -up ./Makefile.packageMain ./Makefile
@@ -1,11 +1,45 @@
CXX ?= g++
-CFLAGS = -Wall -Wconversion -O3 -fPIC
-+CFLAGS = ${RPM_CFLAGS} -Wall -Wconversion -O3 -fPIC
++CFLAGS = ${RPM_CFLAGS} -Wconversion -fPIC
SHVER = 2
+export SHVER
OS = $(shell uname)
@@ -15,11 +15,11 @@ diff -up ./Makefile.packageMain ./Makefile
+IS_64:=$(shell /bin/uname -i | awk '/64/ {print 64}')
+PREFIXDIR?= /usr
+export PREFIXDIR
-
+
-all: svm-train svm-predict svm-scale
+LIBDIR?=${PREFIXDIR}/lib${IS_64}
+export LIBDIR
-
+
-lib: svm.o
+DATADIR?=${PREFIXDIR}/share
+export DATADIR
@@ -39,7 +39,7 @@ diff -up ./Makefile.packageMain ./Makefile
+BINDIR_INSTALL:=${DESTDIR}/${BINDIR}
+export BINDIR_INSTALL
+
-+all: lib svm-train svm-predict svm-scale svm-python svm-java svm-toy-gtk svm-toy-qt
++all: lib svm-train svm-predict svm-scale svm-python svm-toy-qt
+
+lib: libsvm.so.$(SHVER) libsvm.so
+
@@ -50,9 +50,9 @@ diff -up ./Makefile.packageMain ./Makefile
if [ "$(OS)" = "Darwin" ]; then \
SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,libsvm.so.$(SHVER)"; \
else \
-@@ -14,12 +48,72 @@ lib: svm.o
+@@ -14,12 +48,46 @@ lib: svm.o
$(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER)
-
+
svm-predict: svm-predict.c svm.o
- $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm
+ $(CXX) $(CFLAGS) svm-predict.c $(LIBS) -o svm-predict -lm
@@ -65,19 +65,12 @@ diff -up ./Makefile.packageMain ./Makefile
$(CXX) $(CFLAGS) -c svm.cpp
clean:
- rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER)
-+ rm -f *~ svm.o svm-train svm-predict svm-scale svm-toy/gtk/svm-toy-gtk svm-toy/qt/svm-toy-qt
++ rm -f *~ svm.o svm-train svm-predict svm-scale svm-toy/qt/svm-toy-qt
+ ${MAKE} -C python clean
+ ${MAKE} -C java clean
+svm-python:
+ ${MAKE} -C python
+
-+svm-java:
-+ifneq ("${NO_JAVA}","NO_JAVA")
-+ ${MAKE} -C java
-+endif
-+svm-toy-gtk:
-+ ${MAKE} -C svm-toy/gtk
-+
+svm-toy-qt:
+ ${MAKE} -C svm-toy/qt
+
@@ -91,23 +84,7 @@ diff -up ./Makefile.packageMain ./Makefile
+# install package libsvm-devel
+ mkdir -p ${INCLUDEDIR_INSTALL}/libsvm
+ install -m 644 svm.h ${INCLUDEDIR_INSTALL}/libsvm
-+ mkdir -p ${DATADIR_INSTALL}/libsvm/src/java/libsvm
-+ install -m 644 *.h ${DATADIR_INSTALL}/libsvm/src
-+ install -m 644 *.c ${DATADIR_INSTALL}/libsvm/src
-+ install -m 644 *.cpp ${DATADIR_INSTALL}/libsvm/src
-+ install -m 644 Makefile ${DATADIR_INSTALL}/libsvm/src
-+ifneq ("${NO_JAVA}","NO_JAVA")
-+ install -m 644 java/*.java ${DATADIR_INSTALL}/libsvm/src/java
-+ install -m 644 java/Makefile ${DATADIR_INSTALL}/libsvm/src/java
-+ install -m 644 java/libsvm/*.java ${DATADIR_INSTALL}/libsvm/src/java/libsvm
-+ install -m 644 java/libsvm/*.m4 ${DATADIR_INSTALL}/libsvm/src/java/libsvm
-+# install package libsvm-java
-+ ${MAKE} -C java install
-+endif
-+# install package libsvm-python
-+ ${MAKE} -C python install
+# install package svm-toy
-+ install -m 755 svm-toy/gtk/svm-toy-gtk ${BINDIR_INSTALL}
+ install -m 755 svm-toy/qt/svm-toy-qt ${BINDIR_INSTALL}
+# install examples
+ mkdir -p ${DATADIR_INSTALL}/libsvm/examples
@@ -120,9 +97,6 @@ diff -up ./Makefile.packageMain ./Makefile
+ rm -f ${INCLUDEDIR_INSTALL}/libsvm/svm.h
+ rm -f ${LIBDIR_INSTALL}/libsvm.so*
+ ${MAKE} -C python uninstall
-+ifneq ("${NO_JAVA}","NO_JAVA")
+ ${MAKE} -C java uninstall
-+endif
-+ rm -f ${BINDIR_INSTALL}/svm-toy-gtk
+ rm -f ${BINDIR_INSTALL}/svm-toy-qt
+
diff --git a/libsvm.pythonDir.patch b/libsvm.pythonDir.patch
deleted file mode 100644
index ff0991d..0000000
--- a/libsvm.pythonDir.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -up ./python/Makefile.pythonDir ./python/Makefile
---- ./python/Makefile.pythonDir 2011-05-10 09:35:15.000000000 +1000
-+++ ./python/Makefile 2011-11-08 09:49:54.280501207 +1000
-@@ -1,4 +1,20 @@
-+PYTHONDIR_NAME ?= python${PYTHON_VERSION}/site-packages/libsvm
-+PYTHONDIR?=${LIBDIR}/${PYTHONDIR_NAME}
-+PYTHONDIR_INSTALL=${DESTDIR}/${PYTHONDIR}
-+SVM_TOOLS:= $(notdir $(wildcard ../tools/*.py))
-+
- all = lib
-
--lib:
-+all: lib
-+
-+lib: ../svm.cpp ../svm.h
- make -C .. lib
-+
-+install: all
-+ mkdir -p ${PYTHONDIR_INSTALL}
-+ install -m 755 *.py ${PYTHONDIR_INSTALL}
-+ install -m 755 ../tools/*.py ${PYTHONDIR_INSTALL}
-+ $(foreach toolPy,$(SVM_TOOLS),ln -s ${PYTHONDIR}/$(toolPy) ${BINDIR_INSTALL}/svm-$(toolPy);)
-+
-+uninstall:
-+ rm -fr ${LIBDIR}/${PYTHON_PATH} $(addprefix ${BINDIR_INSTALL}/svm-,$(SVM_TOOLS))
diff --git a/libsvm.spec b/libsvm.spec
index 12348e4..5b9f40c 100644
--- a/libsvm.spec
+++ b/libsvm.spec
@@ -1,15 +1,46 @@
%define shver 2
-%{!?pyver: %global pyver %(python -c 'import sys; print(sys.version[0:3])')}
-%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-%define libdir_libsvm %{_libdir}/libsvm
-%define libsvm_python_dir %{python_sitearch}/libsvm
+# EL7 and EL6 only have python_version
+%{!?python2_version: %global python2_version %{python_version}}
+%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
+%{!?python2_sitelib: %global python2_sitearch %{python_sitelib}}
+%global libdir_libsvm %{_libdir}/libsvm
+%global python2_libsvm_dir %{python2_sitearch}/libsvm
+%global python3_libsvm_dir %{python3_sitearch}/libsvm
%global maven_group_id tw.edu.ntu.csie
%global pom_file_version 3.17
%global pom_file_name JPP.%{maven_group_id}-%{name}.pom
+# el_version is RHEL major version, but empty in Fedora
+%global el_version %(/usr/lib/rpm/redhat/dist.sh --el)
+
+# EL <= 6 does not have enable_maven
+%if 0%{?el_version} != 0 && 0%{?el_version} <= 6
+%global java_dependency java
+%ifarch ppc64
+%bcond_with java
+%else
+%bcond_without java
+%endif
+%global cpp_std c++0x
+%else
+%define java_dependency java-headless
+%bcond_without java
+%bcond_without maven
+%global cpp_std c++11
+%endif
+
+# EL <= 7 python 3 is not available by default
+%if 0%{?el_version} != 0 && 0%{?el_version} <= 7
+%global python2_package_name libsvm-python
+%bcond_with python3
+%else
+%global python2_package_name python2-libsvm
+%bcond_without python3
+%endif
+
Name: libsvm
-Version: 3.21
-Release: 8%{?dist}
+Version: 3.23
+Release: 1%{?dist}
Summary: A Library for Support Vector Machines
Group: Development/Libraries
@@ -18,38 +49,15 @@ URL: http://www.csie.ntu.edu.tw/~cjlin/libsvm/
Source0: http://www.csie.ntu.edu.tw/~cjlin/libsvm/%{name}-%{version}.tar.gz
Source1: http://www.csie.ntu.edu.tw/~cjlin/libsvm/log
Source2: http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf
-Source3: libsvm-svm-toy-gtk.desktop
Source4: libsvm-svm-toy-qt.desktop
Source5: LibSVM-svm-toy-48.png
Source6: http://central.maven.org/maven2/tw/edu/ntu/csie/libsvm/%{pom_file_version...
Patch0: %{name}.packageMain.patch
-Patch1: %{name}.pythonDir.patch
Patch2: %{name}.javaDir.patch
-Patch3: %{name}.svm-toy.patch
Patch4: %{name}.toolsDir.patch
+Patch5: %{name}.svm-toy-qt5.patch
BuildRequires: grep
-%if 0%{?rhel} != 0 && 0%{?rhel} <= 5
-%define moc_path %{_libdir}/qt4/bin/moc
-%define with_vendor "fedora"
-%else
-%define moc_path %{_bindir}/moc-qt4
-%endif
-
-# RHEL6 does not have enable_add_maven_depmap
-%define no_java FALSE
-%if 0%{?rhel} != 0 && 0%{?rhel} <= 6
-%define java_dependency java
-%define enable_add_maven_depmap FALSE
-%ifarch ppc ppc64
-%define no_java NO_JAVA
-Obsoletes: libsvm-java < 2.88-1
-%endif
-%else
-%define java_dependency java-headless
-%define enable_add_maven_depmap TRUE
-%endif
-
%description
LIBSVM is an integrated software for support vector classification,
(C-SVC, nu-SVC ), regression (epsilon-SVR, nu-SVR) and distribution
@@ -65,34 +73,52 @@ Requires: %{name} = %{version}-%{release}
Header file, object file of libsvm in C, C++ and Java.
Install this package if you want to develop programs with libsvm.
-
-%package -n python2-libsvm
+%package -n %{python2_package_name}
%{?python_provide:%python_provide python2-libsvm}
-# Remove before F30
Provides: %{name}-python%{?_isa} = %{version}-%{release}
-Obsoletes: %{name}-python < %{version}-%{release}
-Summary: Python tools and interfaces for libsvm
+Obsoletes: %{name}-python%{?_isa} < %{version}-%{release}
+Summary: Python2 tools and interfaces for libsvm
Group: Development/Libraries
-BuildRequires: python-devel >= 2.4 gawk
+BuildRequires: python2-devel >= 2.4 gawk
#gnuplot is required by easy.py
Requires: %{name} = %{version}-%{release}
Requires: gnuplot
-%description -n python2-libsvm
-Python tools and interfaces for libsvm.
+%description -n %{python2_package_name}
+Python2 tools and interfaces for libsvm.
Install this package if you want to develop
-programs with libsvm in Python.
+programs with libsvm in Python2.
-%if "%{no_java}" == "FALSE"
+%if %{with python3}
+%package -n python3-%{name}
+%{?python_provide:%python_provide python3-%{name}}
+Provides: %{name}-python%{?_isa} = %{version}-%{release}
+Obsoletes: %{name}-python%{?_isa} < %{version}-%{release}
+Summary: Python3 tools and interfaces for libsvm
+Group: Development/Libraries
+BuildRequires: python3-devel gawk
+#gnuplot is required by easy.py
+Requires: %{name} = %{version}-%{release}
+Requires: gnuplot
+
+%description -n python3-%{name}
+Python3 tools and interfaces for libsvm.
+Install this package if you want to develop
+programs with libsvm in Python3.
+%endif
+
+%if %{with java}
%package java
Summary: Java tools and interfaces for libsvm
Group: Development/Libraries
-BuildRequires: java-devel >= 1.5.0
+BuildRequires: java-devel >= 1.7.0
BuildRequires: jpackage-utils
-
-Requires: %{java_dependency} >= 1.5.0
+%if %{with maven}
+BuildRequires: maven-local
+%endif
+Requires: %{java_dependency} >= 1.7.0
Requires: jpackage-utils
-Requires: %{name} = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
%description java
Java tools and interfaces for libsvm.
@@ -100,26 +126,14 @@ Install this package if you want to develop
programs with libsvm in Java.
%endif
-%package svm-toy-gtk
-Summary: GTK version of svm-toy (libsvm demonstration program)
-Group: Development/Libraries
-BuildRequires: gtk2-devel
-BuildRequires: desktop-file-utils
-Requires: gtk2
-Requires: %{name} = %{version}-%{release}
-
-%description svm-toy-gtk
-svm-toy is a libsvm demonstration program which has a gtk-GUI to
-display the derived separating hyperplane.
-
%package svm-toy-qt
Summary: QT version of svm-toy (libsvm demonstration program)
Group: Development/Libraries
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig
-BuildRequires: qt4-devel
-Requires: qt4
+BuildRequires: qt5-qtbase-devel
+Requires: qt5
Requires: %{name} = %{version}-%{release}
%description svm-toy-qt
@@ -129,18 +143,20 @@ display the derived separating hyperplane.
%prep
%setup -q
%patch0 -p0 -b .packageMain
-%patch1 -p0 -b .pythonDir
%patch2 -p0 -b .javaDir
-%patch3 -p0 -b .svm-toy
%patch4 -p0 -b .toolsDir
+%patch5 -p0 -b .svm-toy-qt5
cp %{SOURCE1} ChangeLog
cp %{SOURCE2} .
-cp %{SOURCE3} .
cp %{SOURCE4} .
-cp %{SOURCE5} %{name}-svm-toy-gtk-48.png
cp %{SOURCE5} %{name}-svm-toy-qt-48.png
-%if "%{no_java}" == "FALSE"
+# Fix the error: narrowing conversion
+sed -i.narrowing -e "s|{x,y,v}|{x,y,(signed char) v}|" svm-toy/qt/svm-toy.cpp
+sed -i -e "s|{x,y,current_value}|{x,y,(signed char) current_value}|" svm-toy/qt/svm-toy.cpp
+sed -i -e "s|(double)event->y()/YLEN, current_value|(double)event->y()/YLEN,(signed char) current_value|" svm-toy/qt/svm-toy.cpp
+
+%if %{with maven}
# Update the POM file, which is stuck on version 3.17
# pom_xpath_set does not work in rpm-4.11.1
# as it generated something like
@@ -153,94 +169,96 @@ cp %{SOURCE5} %{name}-svm-toy-qt-48.png
%{__sed} -e 's/%{pom_file_version}/%{version}/' %{SOURCE6} > %{name}.pom
%{__sed} -i 's|<url>http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu...</url>|<url>https://github.com/cjlin1/libsvm</url>|' %{name}.pom
%{__sed} -i 's|<connection>http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu...</connection>|<connection>scm:git:https://github.com/cjlin1/libsvm.git</connection>|' %{name}.pom
+
+%mvn_file %{maven_group_id}:%{name} %{maven_group_id}/%{name}
%endif
%build
%{__sed} -i 's/\r//' FAQ.html
%{__sed} -i 's/\r//' ChangeLog
-make all RPM_CFLAGS="$RPM_OPT_FLAGS" PYTHON_VERSION="%{pyver}" JAVAC="javac" JAR="jar" LIBDIR="%{_libdir}" MOC_PATH="%{moc_path}" NO_JAVA="%{no_java}"
+make all RPM_CFLAGS="$RPM_OPT_FLAGS" LIBDIR="%{_libdir}" CPP_STD="%{cpp_std}"
+%if %{with java}
+make -C java
+%endif
mv python/README python/README-Python
mv tools/README tools/README-Tools
cp README java/README-Java
-cp README svm-toy/gtk
cp README svm-toy/qt
+%if %{with maven}
+%mvn_artifact %{name}.pom java/%{name}.jar
+%endif
+
%install
rm -rf %{buildroot}
-make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} PYTHON_VERSION="%{pyver}" LIBSVM_VER="%{version}" NO_JAVA="%{no_java}" JAVA_TARGET_DIR="%{buildroot}/%{_javadir}"
-rm -rf %{buildroot}%{_datadir}/%{name}/src
+make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} LIBSVM_VER="%{version}" CPP_STD="%{cpp_std}"
+%if %{with java}
+make -C java install JAVA_TARGET_DIR="%{buildroot}/%{_javadir}"
+%endif
mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/
-cp %{name}-svm-toy-gtk-48.png %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/
cp %{name}-svm-toy-qt-48.png %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/
mkdir -p %{buildroot}/%{_datadir}/applications
-cp %{name}-svm-toy-gtk.desktop %{buildroot}/%{_datadir}/applications
cp %{name}-svm-toy-qt.desktop %{buildroot}/%{_datadir}/applications
%__ln_s %{name}.so.%{shver} %{buildroot}/%{_libdir}/%{name}.so
+## Python2
# [Bug 521194] Python: 'import libsvm' doesn't work
-mkdir -p %{buildroot}/%{libsvm_python_dir}
+mkdir -p %{buildroot}/%{python2_libsvm_dir}
echo -e "# This file is not in the original libsvm tarball, but added for convenience of import libsvm.\n\
# This file is released under BSD license, just like the rest of the package.\n"\
- > %{buildroot}/%{libsvm_python_dir}/__init__.py
-
-%if 0%{?with_vendor:1}
-desktop-file-install --delete-original --vendor=%{with_vendor} \
- --dir=%{buildroot}%{_datadir}/applications \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop
-%else
-desktop-file-install --delete-original \
- --dir=%{buildroot}%{_datadir}/applications \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop
-%endif
-
-# Python
+ > %{buildroot}/%{python2_libsvm_dir}/__init__.py
+install -p -m 755 tools/*.py %{buildroot}/%{python2_libsvm_dir}
+install -p -m 755 python/*.py %{buildroot}/%{python2_libsvm_dir}
# Fix Bug 646154 - libsvm-python's pth is not set correctly
-echo 'libsvm' > %{buildroot}/%{python_sitearch}/libsvm.pth
-for p in %{buildroot}%{libsvm_python_dir}/*.py;do
+echo 'libsvm' > %{buildroot}/%{python2_sitearch}/libsvm.pth
+for p in %{buildroot}%{python2_libsvm_dir}/*.py;do
sed -i -e 's|#!/usr/bin/env python|#!%{__python2}|' $p
done
-# Java
-%if "%{no_java}" == "FALSE"
-## Move jars to correct directory
-mkdir -p %{buildroot}/%{_javadir}/%{maven_group_id}
-mv %{buildroot}/%{_javadir}/%{name}.jar %{buildroot}/%{_javadir}/%{maven_group_id}/%{name}.jar
-ln -s %{_javadir}/%{maven_group_id}/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar
-## Install the Java POM
-mkdir -p %{buildroot}%{_mavenpomdir}
-cp -p %{name}.pom %{buildroot}%{_mavenpomdir}/%{pom_file_name}
-
-# RHEL6 does not support enable_add_maven_depmap
-%if "%{enable_add_maven_depmap}" == "TRUE"
-%add_maven_depmap %{pom_file_name} %{maven_group_id}/%{name}.jar
+%if ! %{with python3}
+## Use python2 when python3 is not enabled.
+cd tools
+for p in *.py; do
+ ln -s %{python2_libsvm_dir}/$p %{buildroot}/%{_bindir}/svm-$p
+done
+cd -
%endif
+## Python3
+%if %{with python3}
+mkdir -p %{buildroot}/%{python3_libsvm_dir}
+echo -e "# This file is not in the original libsvm tarball, but added for convenience of import libsvm.\n\
+# This file is released under BSD license, just like the rest of the package.\n"\
+ > %{buildroot}/%{python2_libsvm_dir}/__init__.py
+install -p -m 755 tools/*.py %{buildroot}/%{python3_libsvm_dir}
+install -p -m 755 python/*.py %{buildroot}/%{python3_libsvm_dir}
+echo 'libsvm' > %{buildroot}/%{python3_sitearch}/libsvm.pth
+for p in %{buildroot}%{python3_libsvm_dir}/*.py;do
+ sed -i -e 's|#!/usr/bin/env python|#!%{__python3}|' $p
+done
+cd tools
+for p in *.py; do
+ ln -s %{python3_libsvm_dir}/$p %{buildroot}/%{_bindir}/svm-$p
+done
+cd -
%endif
+# Java
+%if %{with maven}
+%mvn_install
+%endif
+# Desktop files
+desktop-file-install --delete-original \
+ --dir=%{buildroot}%{_datadir}/applications \
+ %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop
-%post -p /sbin/ldconfig
-
-%post svm-toy-gtk
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
+%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-%postun svm-toy-gtk
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
-
-
-
%files
%doc COPYRIGHT FAQ.html ChangeLog guide.pdf
%{_bindir}/svm-predict
@@ -255,14 +273,24 @@ fi
%{_includedir}/%{name}/
%{_libdir}/%{name}.so
-%files -n python2-libsvm
+%files -n %{python2_package_name}
%doc python/README-Python tools/README-Tools
-%{libsvm_python_dir}
+%{python2_libsvm_dir}
+%if ! %{with python3}
%{_bindir}/svm-*.py
-%{python_sitearch}/libsvm.pth
+%endif
+%{python2_sitearch}/libsvm.pth
-%if "%{no_java}" == "FALSE"
-%if "%{enable_add_maven_depmap}" == "TRUE"
+%if %{with python3}
+%files -n python3-%{name}
+%doc python/README-Python tools/README-Tools
+%{python3_libsvm_dir}
+%{_bindir}/svm-*.py
+%{python3_sitearch}/libsvm.pth
+%endif
+
+%if %{with java}
+%if %{with maven}
%files java -f .mfiles
%else
%files java
@@ -270,18 +298,11 @@ fi
%defattr(-,root,root,-)
%doc java/README-Java java/test_applet.html
%{_javadir}/%{name}.jar
-%if "%{enable_add_maven_depmap}" == "FALSE"
+%if %{with maven}
%{_javadir}/%{maven_group_id}/%{name}.jar
-%{_mavenpomdir}/%{pom_file_name}
%endif
%endif
-%files svm-toy-gtk
-%doc svm-toy/gtk/README
-%{_bindir}/svm-toy-gtk
-%{_datadir}/icons/hicolor/48x48/apps/%{name}-svm-toy-gtk-48.png
-%{_datadir}/applications/*%{name}-svm-toy-gtk.desktop
-
%files svm-toy-qt
%doc svm-toy/qt/README
%{_bindir}/svm-toy-qt
@@ -289,6 +310,21 @@ fi
%{_datadir}/applications/*%{name}-svm-toy-qt.desktop
%changelog
+* Thu Jul 19 2018 Ding-Yi Chen <dchen(a)redhat.com> - 3.23-1
+- Upstream update to 3.23
+ + add more digits of predicted file, model file, scaled data and data
+ from matlab libsvmwrite: to .17g
+ + svm-toy-gtk is no longer supported
+ + Dependency qt is updated to qt5
+- probability output:
+ + if 2 classes, directly output the predited probabilities
+ rather than run the iterative algorithms for multi-class situations
+- java:
+ + libsvm.jar generated by java 1.7 rather than 1.5
+ + change the use of "_" in svm.java, which won't be allowed in later java
+- python:
+ + split to python2 and python3
+
* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.21-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
@@ -313,7 +349,7 @@ fi
* Wed Jul 20 2016 Ding-Yi Chen <dchen(a)redhat.com> - 3.21-1
- Upstream update to 3.21
-- Fixes Bug 1277450 - libsvm(-java) remove versioned jars from {_javadir}
+- Fixes Bug 1277450 - libsvm(-java) remove versioned jars from {_javadir}
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 3.20-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
@@ -348,7 +384,7 @@ fi
* Tue Apr 22 2014 Ding-Yi Chen <dchen(a)redhat.com> - 3.18-1
- Upstream update to 3.18
- svm.cpp and svm-scale.c: check return values of fscanf
-- matlab interface: Makefile no longer handles octave
+- matlab interface: Makefile no longer handles octave
because make.m should be used
* Fri Mar 28 2014 Michael Simacek <msimacek(a)redhat.com> - 3.17-4
diff --git a/libsvm.svm-toy-qt5.patch b/libsvm.svm-toy-qt5.patch
new file mode 100644
index 0000000..9d589c2
--- /dev/null
+++ b/libsvm.svm-toy-qt5.patch
@@ -0,0 +1,28 @@
+diff -up ./svm-toy/qt/Makefile.svm-toy-qt5 ./svm-toy/qt/Makefile
+--- ./svm-toy/qt/Makefile.svm-toy-qt5 2018-07-16 00:16:58.000000000 +1000
++++ ./svm-toy/qt/Makefile 2018-07-18 18:10:40.157485623 +1000
+@@ -1,13 +1,14 @@
+ # use ``export QT_SELECT=qt5'' in a command window for using qt5
+ # may need to adjust the path of header files
+ CXX? = g++
+-INCLUDE = /usr/include/x86_64-linux-gnu/qt5
+-CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=c++11
++INCLUDE = /usr/include/qt5
++CPP_STD ?= c++11
++CFLAGS = ${RPM_CFLAGS} -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=${CPP_STD}
+ LIB = -lQt5Widgets -lQt5Gui -lQt5Core
+-MOC = /usr/bin/moc
++MOC ?= /usr/bin/moc-qt5
+
+ svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o
+- $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy $(LIB)
++ $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy-qt $(LIB)
+
+ svm-toy.moc: svm-toy.cpp
+ $(MOC) svm-toy.cpp -o svm-toy.moc
+@@ -16,4 +17,4 @@ svm-toy.moc: svm-toy.cpp
+ make -C ../.. svm.o
+
+ clean:
+- rm -f *~ svm-toy svm-toy.moc ../../svm.o
++ rm -f *~ svm-toy-qt svm-toy.moc ../../svm.o
diff --git a/libsvm.svm-toy.patch b/libsvm.svm-toy.patch
deleted file mode 100644
index 4fc0982..0000000
--- a/libsvm.svm-toy.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -up ./svm-toy/gtk/Makefile.svm-toy ./svm-toy/gtk/Makefile
---- ./svm-toy/gtk/Makefile.svm-toy 2015-12-14 23:49:17.000000000 +1000
-+++ ./svm-toy/gtk/Makefile 2016-07-20 11:56:30.157119649 +1000
-@@ -1,10 +1,12 @@
- CC? = gcc
- CXX? = g++
--CFLAGS = -Wall -O3 -g `pkg-config --cflags gtk+-2.0`
--LIBS = `pkg-config --libs gtk+-2.0`
-+CFLAGS = -Wall -O3 -g `pkg-config --cflags --libs gtk+-2.0`
-+LOCAL_LIBDIR=../..
-+LIBS = -L${LOCAL_LIBDIR} -lsvm
-
--svm-toy: main.o interface.o callbacks.o ../../svm.o
-- $(CXX) $(CFLAGS) main.o interface.o callbacks.o ../../svm.o -o svm-toy $(LIBS)
-+
-+svm-toy-gtk: main.o interface.o callbacks.o ${LOCAL_LIBDIR}/svm.o
-+ $(CXX) $(CFLAGS) main.o interface.o callbacks.o $(LIBS) -o $@
-
- main.o: main.c
- $(CC) $(CFLAGS) -c main.c
-@@ -15,8 +17,8 @@ interface.o: interface.c interface.h
- callbacks.o: callbacks.cpp callbacks.h
- $(CXX) $(CFLAGS) -c callbacks.cpp
-
--../../svm.o: ../../svm.cpp ../../svm.h
-- make -C ../.. svm.o
-+${LOCAL_LIBDIR}/svm.o: ${LOCAL_LIBDIR}/svm.cpp ${LOCAL_LIBDIR}/svm.h
-+ make -C ${LOCAL_LIBDIR} svm.o
-
- clean:
-- rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o ../../svm.o
-+ rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o ${LOCAL_LIBDIR}/svm.o
-diff -up ./svm-toy/qt/Makefile.svm-toy ./svm-toy/qt/Makefile
---- ./svm-toy/qt/Makefile.svm-toy 2016-07-20 11:56:30.157119649 +1000
-+++ ./svm-toy/qt/Makefile 2016-07-20 13:40:21.876341574 +1000
-@@ -1,17 +1,25 @@
- CXX? = g++
-+-CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtGui -lQtGui
-+-MOC = /usr/bin/moc-qt4
- INCLUDE = /usr/include/qt4
--CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore
-+SHVER?=2
-+CFLAGS = -Wall -O3 `pkg-config --cflags --libs QtGui`
- LIB = -lQtGui -lQtCore
--MOC = /usr/bin/moc-qt4
-+MOC=${MOC_PATH}
-+LOCAL_LIBDIR=../..
-+LIBS = -L${LOCAL_LIBDIR} -lsvm
-+LIBSVM_SO_SHVER=${LOCAL_LIBDIR}/libsvm.so.$(SHVER)
-
--svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o
-- $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy $(LIB)
-+all: svm-toy-qt
-+
-+svm-toy-qt: svm-toy.cpp svm-toy.moc $(LIBSVM_SO_SHVER)
-+ $(CXX) $(CFLAGS) svm-toy.cpp ${LIBS} -o $@
-
- svm-toy.moc: svm-toy.cpp
- $(MOC) svm-toy.cpp -o svm-toy.moc
-
--../../svm.o: ../../svm.cpp ../../svm.h
-- make -C ../.. svm.o
-+$(LIBSVM_SO_SHVER): ${LOCAL_LIBDIR}/svm.cpp ${LOCAL_LIBDIR}/svm.h
-+ make -C ${LOCAL_LIBDIR} lib
-
- clean:
- rm -f *~ svm-toy svm-toy.moc ../../svm.o
diff --git a/libsvm.toolsDir.patch b/libsvm.toolsDir.patch
index a303895..b0375b9 100644
--- a/libsvm.toolsDir.patch
+++ b/libsvm.toolsDir.patch
@@ -2,7 +2,7 @@ diff -up ./tools/easy.py.toolsDir ./tools/easy.py
--- ./tools/easy.py.toolsDir 2013-03-31 17:06:49.000000000 +1000
+++ ./tools/easy.py 2013-04-13 23:17:53.399526910 +1000
@@ -12,10 +12,10 @@ if len(sys.argv) <= 1:
-
+
is_win32 = (sys.platform == 'win32')
if not is_win32:
- svmscale_exe = "../svm-scale"
@@ -16,28 +16,6 @@ diff -up ./tools/easy.py.toolsDir ./tools/easy.py
gnuplot_exe = "/usr/bin/gnuplot"
else:
# example for windows
-@@ -47,7 +47,7 @@ if len(sys.argv) > 2:
-
- cmd = '{0} -s "{1}" "{2}" > "{3}"'.format(svmscale_exe, range_file, train_pathname, scaled_file)
- print('Scaling training data...')
--Popen(cmd, shell = True, stdout = PIPE).communicate()
-+Popen(cmd, shell = True, stdout = PIPE).communicate()
-
- cmd = '{0} -svmtrain "{1}" -gnuplot "{2}" "{3}"'.format(grid_py, svmtrain_exe, gnuplot_exe, scaled_file)
- print('Cross validation...')
-@@ -70,10 +70,10 @@ print('Output model: {0}'.format(model_f
- if len(sys.argv) > 2:
- cmd = '{0} -r "{1}" "{2}" > "{3}"'.format(svmscale_exe, range_file, test_pathname, scaled_test_file)
- print('Scaling testing data...')
-- Popen(cmd, shell = True, stdout = PIPE).communicate()
-+ Popen(cmd, shell = True, stdout = PIPE).communicate()
-
- cmd = '{0} "{1}" "{2}" "{3}"'.format(svmpredict_exe, scaled_test_file, model_file, predict_test_file)
- print('Testing...')
-- Popen(cmd, shell = True).communicate()
-+ Popen(cmd, shell = True).communicate()
-
- print('Output prediction: {0}'.format(predict_test_file))
diff -up ./tools/grid.py.toolsDir ./tools/grid.py
--- ./tools/grid.py.toolsDir 2013-03-31 17:06:50.000000000 +1000
+++ ./tools/grid.py 2013-04-13 23:18:53.964522769 +1000
diff --git a/log b/log
index c6074b0..8531e06 100644
--- a/log
+++ b/log
@@ -282,4 +282,27 @@ i subroutines to get SVs
pre-built windows exe files changed from 32 to 64 bit
matlab interface:
now use #include "../svm.h"
- fix some minor issues in make.m of matlab interface
\ No newline at end of file
+ fix some minor issues in make.m of matlab interface
+
+3.22: 2016/12/22
+ probability output:
+ if 2 classes, directly output the predited probabilities
+ rather than run the iterative algorithms for multi-class situations
+ java:
+ libsvm.jar generated by java 1.7 rather than 1.5
+ change the use of "_" in svm.java, which won't be allowed in later java
+
+3.23: 2018/7/15
+ add more digits of predicted file, model file, scaled data and data from matlab libsvmwrite: to %.17g
+ revise svm-scale.c so features in test data that do not appear in training data are scaled to zero.
+ remove unnecessary tab or space in all files
+ python interface:
+ add Scipy support
+ add scaling (csr_find_scale_param and csr_scale functions)
+ put some utility functions identical in LIBLINEAR to commonutil.py.
+ functions for scaling are put in commonutil.py.
+ sort column indices of csr matrix before training as feature indices must be ascending
+ convert Qt version of svm-toy from Qt4 to Qt5
+ remove gtk svm-toy because we stop maintaining this tool
+ minor improvement of descriptions in README
+
\ No newline at end of file
diff --git a/sources b/sources
index 46bd5da..77237b8 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-e7392f325efd1c6ddacd8e2c8bb023d1 guide.pdf
-30d2a0a8043e0f66cb7903b3ce45b3bf libsvm-3.21.tar.gz
+SHA512 (guide.pdf) = 5e97a7b76ad4217d7987c5c07f0420e780b61b82fb88fe0e6015681fabb5078980b280cec4a0a7208ea225b9fa84de878295039f4513df26f0d404a21812e44c
+SHA512 (libsvm-3.23.tar.gz) = 15e1a22a9075d3910414b0519b2ce8a93edc42be76a034d31435dc9463b08fbc510b806a3e6f64abff4ba3da771582436182e4e7d658ed2e54f311bc8cdbc121
commit e584449fa411030b95629038103e3960ff737bea
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Fri Jul 13 08:53:56 2018 +0000
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/libsvm.spec b/libsvm.spec
index ceca677..12348e4 100644
--- a/libsvm.spec
+++ b/libsvm.spec
@@ -9,7 +9,7 @@
Name: libsvm
Version: 3.21
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: A Library for Support Vector Machines
Group: Development/Libraries
@@ -289,6 +289,9 @@ fi
%{_datadir}/applications/*%{name}-svm-toy-qt.desktop
%changelog
+* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.21-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
* Wed Feb 07 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.21-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
commit 5b7bc69c03eba54ac37cf09b8cc38fc6c7ed025c
Author: Jason Tibbitts <tibbs(a)math.uh.edu>
Date: Tue Jul 10 01:47:30 2018 -0500
Remove needless use of %defattr
diff --git a/libsvm.spec b/libsvm.spec
index b9b9f96..ceca677 100644
--- a/libsvm.spec
+++ b/libsvm.spec
@@ -242,7 +242,6 @@ fi
%files
-%defattr(-,root,root,-)
%doc COPYRIGHT FAQ.html ChangeLog guide.pdf
%{_bindir}/svm-predict
%{_bindir}/svm-scale
@@ -252,13 +251,11 @@ fi
%{_libdir}/%{name}.so.%{shver}
%files devel
-%defattr(-,root,root,-)
%doc README
%{_includedir}/%{name}/
%{_libdir}/%{name}.so
%files -n python2-libsvm
-%defattr(-,root,root,-)
%doc python/README-Python tools/README-Tools
%{libsvm_python_dir}
%{_bindir}/svm-*.py
@@ -280,14 +277,12 @@ fi
%endif
%files svm-toy-gtk
-%defattr(-,root,root,-)
%doc svm-toy/gtk/README
%{_bindir}/svm-toy-gtk
%{_datadir}/icons/hicolor/48x48/apps/%{name}-svm-toy-gtk-48.png
%{_datadir}/applications/*%{name}-svm-toy-gtk.desktop
%files svm-toy-qt
-%defattr(-,root,root,-)
%doc svm-toy/qt/README
%{_bindir}/svm-toy-qt
%{_datadir}/icons/hicolor/48x48/apps/%{name}-svm-toy-qt-48.png
commit 7a0be5133e7f13fcdd37a3f4edb820bcff640783
Author: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
Date: Wed Feb 14 07:19:27 2018 +0100
Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.
Signed-off-by: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
diff --git a/libsvm.spec b/libsvm.spec
index 91e64a8..b9b9f96 100644
--- a/libsvm.spec
+++ b/libsvm.spec
@@ -240,9 +240,6 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then
fi
-%clean
-rm -rf %{buildroot}
-
%files
%defattr(-,root,root,-)
commit 1abeac56ccbd89a924db9472e5e0a24c5f322987
Author: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
Date: Tue Feb 13 23:43:35 2018 +0100
Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now
Signed-off-by: Igor Gnatenko <ignatenkobrain(a)fedoraproject.org>
diff --git a/libsvm.spec b/libsvm.spec
index f2dd774..91e64a8 100644
--- a/libsvm.spec
+++ b/libsvm.spec
@@ -27,7 +27,6 @@ Patch1: %{name}.pythonDir.patch
Patch2: %{name}.javaDir.patch
Patch3: %{name}.svm-toy.patch
Patch4: %{name}.toolsDir.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: grep
%if 0%{?rhel} != 0 && 0%{?rhel} <= 5
commit 0bb2e735e7c8bdc2670e653a11ef4182ffeccd4a
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Wed Feb 7 23:26:59 2018 +0000
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/libsvm.spec b/libsvm.spec
index 487ec8b..f2dd774 100644
--- a/libsvm.spec
+++ b/libsvm.spec
@@ -9,7 +9,7 @@
Name: libsvm
Version: 3.21
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: A Library for Support Vector Machines
Group: Development/Libraries
@@ -298,6 +298,9 @@ rm -rf %{buildroot}
%{_datadir}/applications/*%{name}-svm-toy-qt.desktop
%changelog
+* Wed Feb 07 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.21-7
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
* Sat Aug 19 2017 Zbigniew Jdrzejewski-Szmek <zbyszek(a)in.waw.pl> - 3.21-6
- Python 2 binary package renamed to python2-libsvm
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
commit 4add8ae170c82cac48a5bcc2e59f6e0d40038992
Author: Zbigniew Jdrzejewski-Szmek <zbyszek(a)in.waw.pl>
Date: Sat Aug 19 09:38:52 2017 -0400
Python 2 binary package renamed to python2-libsvm
diff --git a/libsvm.spec b/libsvm.spec
index 1974f31..487ec8b 100644
--- a/libsvm.spec
+++ b/libsvm.spec
@@ -9,7 +9,7 @@
Name: libsvm
Version: 3.21
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: A Library for Support Vector Machines
Group: Development/Libraries
@@ -67,7 +67,11 @@ Header file, object file of libsvm in C, C++ and Java.
Install this package if you want to develop programs with libsvm.
-%package python
+%package -n python2-libsvm
+%{?python_provide:%python_provide python2-libsvm}
+# Remove before F30
+Provides: %{name}-python%{?_isa} = %{version}-%{release}
+Obsoletes: %{name}-python < %{version}-%{release}
Summary: Python tools and interfaces for libsvm
Group: Development/Libraries
BuildRequires: python-devel >= 2.4 gawk
@@ -75,7 +79,7 @@ BuildRequires: python-devel >= 2.4 gawk
Requires: %{name} = %{version}-%{release}
Requires: gnuplot
-%description python
+%description -n python2-libsvm
Python tools and interfaces for libsvm.
Install this package if you want to develop
programs with libsvm in Python.
@@ -257,7 +261,7 @@ rm -rf %{buildroot}
%{_includedir}/%{name}/
%{_libdir}/%{name}.so
-%files python
+%files -n python2-libsvm
%defattr(-,root,root,-)
%doc python/README-Python tools/README-Tools
%{libsvm_python_dir}
@@ -294,6 +298,10 @@ rm -rf %{buildroot}
%{_datadir}/applications/*%{name}-svm-toy-qt.desktop
%changelog
+* Sat Aug 19 2017 Zbigniew Jdrzejewski-Szmek <zbyszek(a)in.waw.pl> - 3.21-6
+- Python 2 binary package renamed to python2-libsvm
+ See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
+
* Thu Aug 03 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.21-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
5 years, 9 months
Architecture specific change in rpms/libsvm.git
by githook-noreply@fedoraproject.org
The package rpms/libsvm.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/libsvm.git/commit/?id=e6b06f5e1ec....
Change:
-%ifarch ppc ppc64
Thanks.
Full change:
============
commit e6b06f5e1ecb99478ac787124851e2f343e7e5b4
Author: Ding-Yi Chen <dchen(a)redhat.com>
Date: Thu Jul 19 11:46:10 2018 +1000
Upstream update to 3.23
diff --git a/.gitignore b/.gitignore
index c5ed10e..48a9e12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ libsvm-3.91.tar.gz
/libsvm-svm-toy-qt.desktop
/libsvm-3.20.tar.gz
/libsvm-3.21.tar.gz
+/libsvm-3.23.tar.gz
diff --git a/libsvm-svm-toy-gtk.desktop b/libsvm-svm-toy-gtk.desktop
deleted file mode 100644
index 3b8613d..0000000
--- a/libsvm-svm-toy-gtk.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Name=svm-toy-gtk
-GenericName=svm-toy GTK version
-Comment=GTK version of svm-toy (libsvm demostration program)
-Exec=svm-toy-gtk
-Icon=libsvm-svm-toy-gtk-48
-StartupNotify=true
-Terminal=false
-Type=Application
-Categories=GTK;Education;Science;Math;DataVisualization
diff --git a/libsvm.javaDir.patch b/libsvm.javaDir.patch
index ed7cf4b..5131c4f 100644
--- a/libsvm.javaDir.patch
+++ b/libsvm.javaDir.patch
@@ -1,34 +1,21 @@
diff -up ./java/Makefile.javaDir ./java/Makefile
---- ./java/Makefile.javaDir 2009-02-18 10:41:04.000000000 +1000
-+++ ./java/Makefile 2010-11-08 10:59:11.229518442 +1000
-@@ -4,13 +4,21 @@ FILES = libsvm/svm.class libsvm/svm_mode
- libsvm/svm_print_interface.class \
+--- ./java/Makefile.javaDir 2016-12-22 04:58:49.000000000 +1000
++++ ./java/Makefile 2018-04-17 12:11:53.773004141 +1000
+@@ -5,8 +5,8 @@ FILES = libsvm/svm.class libsvm/svm_mode
svm_train.class svm_predict.class svm_toy.class svm_scale.class
-
-+JAVA_DOC_DIR=${INSTDIR}/share/javadoc/libsvm-${LIBSVM_VER}
-+CLASSPATH = .
+
#JAVAC = jikes
--JAVAC_FLAGS = -target 1.5 -source 1.5
-+JAVAC_FLAGS = -target 1.5 -source 1.5 -classpath ${CLASSPATH}
-+ifndef JAVAC
- JAVAC = javac
-+endif
+-JAVAC_FLAGS = -target 1.7 -source 1.7
+-JAVAC = javac
++JAVAC_FLAGS = -target 1.7 -source 1.7 -classpath ${CLASSPATH}
++JAVAC ?= javac
# JAVAC_FLAGS =
-
-+ifndef JAR
-+JAR=jar
-+endif
-+
- all: $(FILES)
-- jar cvf libsvm.jar *.class libsvm/*.class
-+ ${JAR} cvf libsvm.jar *.class libsvm/*.class
-
- .java.class:
- $(JAVAC) $(JAVAC_FLAGS) $<
-@@ -18,8 +26,23 @@ all: $(FILES)
+ export CLASSPATH := .:$(CLASSPATH)
+
+@@ -19,8 +19,20 @@ all: $(FILES)
libsvm/svm.java: libsvm/svm.m4
m4 libsvm/svm.m4 > libsvm/svm.java
-
+
+javadoc: docs/index.html
+
+docs/index.html: $(FILES)
@@ -37,21 +24,18 @@ diff -up ./java/Makefile.javaDir ./java/Makefile
+install:
+ mkdir -p ${JAVA_TARGET_DIR}
+ install -m 644 libsvm.jar ${JAVA_TARGET_DIR}
-+# mkdir -p ${JAVA_DOC_DIR}
-+# cd docs; cp -R * ${JAVA_DOC_DIR}
+uninstall:
-+ rm -fr ${JAVA_TARGETDIR}
-+# rm -fr ${JAVA_DOC_DIR}
++ rm -fr ${JAVA_TARGET_DIR}
+
clean:
rm -f libsvm/*.class *.class *.jar libsvm/*~ *~ libsvm/svm.java
+ rm -rf docs
-
+
dist: clean all
rm *.class libsvm/*.class
diff -up ./java/test_applet.html.javaDir ./java/test_applet.html
---- ./java/test_applet.html.javaDir 2003-07-12 14:07:32.000000000 +1000
-+++ ./java/test_applet.html 2010-11-08 10:59:11.229518442 +1000
+--- ./java/test_applet.html.javaDir 2016-12-22 04:58:51.000000000 +1000
++++ ./java/test_applet.html 2018-04-17 11:51:17.927996424 +1000
@@ -1 +1,3 @@
-<APPLET code="svm_toy.class" archive="libsvm.jar" width=300 height=350></APPLET>
+<html>
diff --git a/libsvm.packageMain.patch b/libsvm.packageMain.patch
index dee23cd..f594c5b 100644
--- a/libsvm.packageMain.patch
+++ b/libsvm.packageMain.patch
@@ -4,7 +4,7 @@ diff -up ./Makefile.packageMain ./Makefile
@@ -1,11 +1,45 @@
CXX ?= g++
-CFLAGS = -Wall -Wconversion -O3 -fPIC
-+CFLAGS = ${RPM_CFLAGS} -Wall -Wconversion -O3 -fPIC
++CFLAGS = ${RPM_CFLAGS} -Wconversion -fPIC
SHVER = 2
+export SHVER
OS = $(shell uname)
@@ -15,11 +15,11 @@ diff -up ./Makefile.packageMain ./Makefile
+IS_64:=$(shell /bin/uname -i | awk '/64/ {print 64}')
+PREFIXDIR?= /usr
+export PREFIXDIR
-
+
-all: svm-train svm-predict svm-scale
+LIBDIR?=${PREFIXDIR}/lib${IS_64}
+export LIBDIR
-
+
-lib: svm.o
+DATADIR?=${PREFIXDIR}/share
+export DATADIR
@@ -39,7 +39,7 @@ diff -up ./Makefile.packageMain ./Makefile
+BINDIR_INSTALL:=${DESTDIR}/${BINDIR}
+export BINDIR_INSTALL
+
-+all: lib svm-train svm-predict svm-scale svm-python svm-java svm-toy-gtk svm-toy-qt
++all: lib svm-train svm-predict svm-scale svm-python svm-toy-qt
+
+lib: libsvm.so.$(SHVER) libsvm.so
+
@@ -50,9 +50,9 @@ diff -up ./Makefile.packageMain ./Makefile
if [ "$(OS)" = "Darwin" ]; then \
SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,libsvm.so.$(SHVER)"; \
else \
-@@ -14,12 +48,72 @@ lib: svm.o
+@@ -14,12 +48,46 @@ lib: svm.o
$(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER)
-
+
svm-predict: svm-predict.c svm.o
- $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm
+ $(CXX) $(CFLAGS) svm-predict.c $(LIBS) -o svm-predict -lm
@@ -65,19 +65,12 @@ diff -up ./Makefile.packageMain ./Makefile
$(CXX) $(CFLAGS) -c svm.cpp
clean:
- rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER)
-+ rm -f *~ svm.o svm-train svm-predict svm-scale svm-toy/gtk/svm-toy-gtk svm-toy/qt/svm-toy-qt
++ rm -f *~ svm.o svm-train svm-predict svm-scale svm-toy/qt/svm-toy-qt
+ ${MAKE} -C python clean
+ ${MAKE} -C java clean
+svm-python:
+ ${MAKE} -C python
+
-+svm-java:
-+ifneq ("${NO_JAVA}","NO_JAVA")
-+ ${MAKE} -C java
-+endif
-+svm-toy-gtk:
-+ ${MAKE} -C svm-toy/gtk
-+
+svm-toy-qt:
+ ${MAKE} -C svm-toy/qt
+
@@ -91,23 +84,7 @@ diff -up ./Makefile.packageMain ./Makefile
+# install package libsvm-devel
+ mkdir -p ${INCLUDEDIR_INSTALL}/libsvm
+ install -m 644 svm.h ${INCLUDEDIR_INSTALL}/libsvm
-+ mkdir -p ${DATADIR_INSTALL}/libsvm/src/java/libsvm
-+ install -m 644 *.h ${DATADIR_INSTALL}/libsvm/src
-+ install -m 644 *.c ${DATADIR_INSTALL}/libsvm/src
-+ install -m 644 *.cpp ${DATADIR_INSTALL}/libsvm/src
-+ install -m 644 Makefile ${DATADIR_INSTALL}/libsvm/src
-+ifneq ("${NO_JAVA}","NO_JAVA")
-+ install -m 644 java/*.java ${DATADIR_INSTALL}/libsvm/src/java
-+ install -m 644 java/Makefile ${DATADIR_INSTALL}/libsvm/src/java
-+ install -m 644 java/libsvm/*.java ${DATADIR_INSTALL}/libsvm/src/java/libsvm
-+ install -m 644 java/libsvm/*.m4 ${DATADIR_INSTALL}/libsvm/src/java/libsvm
-+# install package libsvm-java
-+ ${MAKE} -C java install
-+endif
-+# install package libsvm-python
-+ ${MAKE} -C python install
+# install package svm-toy
-+ install -m 755 svm-toy/gtk/svm-toy-gtk ${BINDIR_INSTALL}
+ install -m 755 svm-toy/qt/svm-toy-qt ${BINDIR_INSTALL}
+# install examples
+ mkdir -p ${DATADIR_INSTALL}/libsvm/examples
@@ -120,9 +97,6 @@ diff -up ./Makefile.packageMain ./Makefile
+ rm -f ${INCLUDEDIR_INSTALL}/libsvm/svm.h
+ rm -f ${LIBDIR_INSTALL}/libsvm.so*
+ ${MAKE} -C python uninstall
-+ifneq ("${NO_JAVA}","NO_JAVA")
+ ${MAKE} -C java uninstall
-+endif
-+ rm -f ${BINDIR_INSTALL}/svm-toy-gtk
+ rm -f ${BINDIR_INSTALL}/svm-toy-qt
+
diff --git a/libsvm.pythonDir.patch b/libsvm.pythonDir.patch
deleted file mode 100644
index ff0991d..0000000
--- a/libsvm.pythonDir.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -up ./python/Makefile.pythonDir ./python/Makefile
---- ./python/Makefile.pythonDir 2011-05-10 09:35:15.000000000 +1000
-+++ ./python/Makefile 2011-11-08 09:49:54.280501207 +1000
-@@ -1,4 +1,20 @@
-+PYTHONDIR_NAME ?= python${PYTHON_VERSION}/site-packages/libsvm
-+PYTHONDIR?=${LIBDIR}/${PYTHONDIR_NAME}
-+PYTHONDIR_INSTALL=${DESTDIR}/${PYTHONDIR}
-+SVM_TOOLS:= $(notdir $(wildcard ../tools/*.py))
-+
- all = lib
-
--lib:
-+all: lib
-+
-+lib: ../svm.cpp ../svm.h
- make -C .. lib
-+
-+install: all
-+ mkdir -p ${PYTHONDIR_INSTALL}
-+ install -m 755 *.py ${PYTHONDIR_INSTALL}
-+ install -m 755 ../tools/*.py ${PYTHONDIR_INSTALL}
-+ $(foreach toolPy,$(SVM_TOOLS),ln -s ${PYTHONDIR}/$(toolPy) ${BINDIR_INSTALL}/svm-$(toolPy);)
-+
-+uninstall:
-+ rm -fr ${LIBDIR}/${PYTHON_PATH} $(addprefix ${BINDIR_INSTALL}/svm-,$(SVM_TOOLS))
diff --git a/libsvm.spec b/libsvm.spec
index 12348e4..5b9f40c 100644
--- a/libsvm.spec
+++ b/libsvm.spec
@@ -1,15 +1,46 @@
%define shver 2
-%{!?pyver: %global pyver %(python -c 'import sys; print(sys.version[0:3])')}
-%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-%define libdir_libsvm %{_libdir}/libsvm
-%define libsvm_python_dir %{python_sitearch}/libsvm
+# EL7 and EL6 only have python_version
+%{!?python2_version: %global python2_version %{python_version}}
+%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
+%{!?python2_sitelib: %global python2_sitearch %{python_sitelib}}
+%global libdir_libsvm %{_libdir}/libsvm
+%global python2_libsvm_dir %{python2_sitearch}/libsvm
+%global python3_libsvm_dir %{python3_sitearch}/libsvm
%global maven_group_id tw.edu.ntu.csie
%global pom_file_version 3.17
%global pom_file_name JPP.%{maven_group_id}-%{name}.pom
+# el_version is RHEL major version, but empty in Fedora
+%global el_version %(/usr/lib/rpm/redhat/dist.sh --el)
+
+# EL <= 6 does not have enable_maven
+%if 0%{?el_version} != 0 && 0%{?el_version} <= 6
+%global java_dependency java
+%ifarch ppc64
+%bcond_with java
+%else
+%bcond_without java
+%endif
+%global cpp_std c++0x
+%else
+%define java_dependency java-headless
+%bcond_without java
+%bcond_without maven
+%global cpp_std c++11
+%endif
+
+# EL <= 7 python 3 is not available by default
+%if 0%{?el_version} != 0 && 0%{?el_version} <= 7
+%global python2_package_name libsvm-python
+%bcond_with python3
+%else
+%global python2_package_name python2-libsvm
+%bcond_without python3
+%endif
+
Name: libsvm
-Version: 3.21
-Release: 8%{?dist}
+Version: 3.23
+Release: 1%{?dist}
Summary: A Library for Support Vector Machines
Group: Development/Libraries
@@ -18,38 +49,15 @@ URL: http://www.csie.ntu.edu.tw/~cjlin/libsvm/
Source0: http://www.csie.ntu.edu.tw/~cjlin/libsvm/%{name}-%{version}.tar.gz
Source1: http://www.csie.ntu.edu.tw/~cjlin/libsvm/log
Source2: http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf
-Source3: libsvm-svm-toy-gtk.desktop
Source4: libsvm-svm-toy-qt.desktop
Source5: LibSVM-svm-toy-48.png
Source6: http://central.maven.org/maven2/tw/edu/ntu/csie/libsvm/%{pom_file_version...
Patch0: %{name}.packageMain.patch
-Patch1: %{name}.pythonDir.patch
Patch2: %{name}.javaDir.patch
-Patch3: %{name}.svm-toy.patch
Patch4: %{name}.toolsDir.patch
+Patch5: %{name}.svm-toy-qt5.patch
BuildRequires: grep
-%if 0%{?rhel} != 0 && 0%{?rhel} <= 5
-%define moc_path %{_libdir}/qt4/bin/moc
-%define with_vendor "fedora"
-%else
-%define moc_path %{_bindir}/moc-qt4
-%endif
-
-# RHEL6 does not have enable_add_maven_depmap
-%define no_java FALSE
-%if 0%{?rhel} != 0 && 0%{?rhel} <= 6
-%define java_dependency java
-%define enable_add_maven_depmap FALSE
-%ifarch ppc ppc64
-%define no_java NO_JAVA
-Obsoletes: libsvm-java < 2.88-1
-%endif
-%else
-%define java_dependency java-headless
-%define enable_add_maven_depmap TRUE
-%endif
-
%description
LIBSVM is an integrated software for support vector classification,
(C-SVC, nu-SVC ), regression (epsilon-SVR, nu-SVR) and distribution
@@ -65,34 +73,52 @@ Requires: %{name} = %{version}-%{release}
Header file, object file of libsvm in C, C++ and Java.
Install this package if you want to develop programs with libsvm.
-
-%package -n python2-libsvm
+%package -n %{python2_package_name}
%{?python_provide:%python_provide python2-libsvm}
-# Remove before F30
Provides: %{name}-python%{?_isa} = %{version}-%{release}
-Obsoletes: %{name}-python < %{version}-%{release}
-Summary: Python tools and interfaces for libsvm
+Obsoletes: %{name}-python%{?_isa} < %{version}-%{release}
+Summary: Python2 tools and interfaces for libsvm
Group: Development/Libraries
-BuildRequires: python-devel >= 2.4 gawk
+BuildRequires: python2-devel >= 2.4 gawk
#gnuplot is required by easy.py
Requires: %{name} = %{version}-%{release}
Requires: gnuplot
-%description -n python2-libsvm
-Python tools and interfaces for libsvm.
+%description -n %{python2_package_name}
+Python2 tools and interfaces for libsvm.
Install this package if you want to develop
-programs with libsvm in Python.
+programs with libsvm in Python2.
-%if "%{no_java}" == "FALSE"
+%if %{with python3}
+%package -n python3-%{name}
+%{?python_provide:%python_provide python3-%{name}}
+Provides: %{name}-python%{?_isa} = %{version}-%{release}
+Obsoletes: %{name}-python%{?_isa} < %{version}-%{release}
+Summary: Python3 tools and interfaces for libsvm
+Group: Development/Libraries
+BuildRequires: python3-devel gawk
+#gnuplot is required by easy.py
+Requires: %{name} = %{version}-%{release}
+Requires: gnuplot
+
+%description -n python3-%{name}
+Python3 tools and interfaces for libsvm.
+Install this package if you want to develop
+programs with libsvm in Python3.
+%endif
+
+%if %{with java}
%package java
Summary: Java tools and interfaces for libsvm
Group: Development/Libraries
-BuildRequires: java-devel >= 1.5.0
+BuildRequires: java-devel >= 1.7.0
BuildRequires: jpackage-utils
-
-Requires: %{java_dependency} >= 1.5.0
+%if %{with maven}
+BuildRequires: maven-local
+%endif
+Requires: %{java_dependency} >= 1.7.0
Requires: jpackage-utils
-Requires: %{name} = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
%description java
Java tools and interfaces for libsvm.
@@ -100,26 +126,14 @@ Install this package if you want to develop
programs with libsvm in Java.
%endif
-%package svm-toy-gtk
-Summary: GTK version of svm-toy (libsvm demonstration program)
-Group: Development/Libraries
-BuildRequires: gtk2-devel
-BuildRequires: desktop-file-utils
-Requires: gtk2
-Requires: %{name} = %{version}-%{release}
-
-%description svm-toy-gtk
-svm-toy is a libsvm demonstration program which has a gtk-GUI to
-display the derived separating hyperplane.
-
%package svm-toy-qt
Summary: QT version of svm-toy (libsvm demonstration program)
Group: Development/Libraries
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig
-BuildRequires: qt4-devel
-Requires: qt4
+BuildRequires: qt5-qtbase-devel
+Requires: qt5
Requires: %{name} = %{version}-%{release}
%description svm-toy-qt
@@ -129,18 +143,20 @@ display the derived separating hyperplane.
%prep
%setup -q
%patch0 -p0 -b .packageMain
-%patch1 -p0 -b .pythonDir
%patch2 -p0 -b .javaDir
-%patch3 -p0 -b .svm-toy
%patch4 -p0 -b .toolsDir
+%patch5 -p0 -b .svm-toy-qt5
cp %{SOURCE1} ChangeLog
cp %{SOURCE2} .
-cp %{SOURCE3} .
cp %{SOURCE4} .
-cp %{SOURCE5} %{name}-svm-toy-gtk-48.png
cp %{SOURCE5} %{name}-svm-toy-qt-48.png
-%if "%{no_java}" == "FALSE"
+# Fix the error: narrowing conversion
+sed -i.narrowing -e "s|{x,y,v}|{x,y,(signed char) v}|" svm-toy/qt/svm-toy.cpp
+sed -i -e "s|{x,y,current_value}|{x,y,(signed char) current_value}|" svm-toy/qt/svm-toy.cpp
+sed -i -e "s|(double)event->y()/YLEN, current_value|(double)event->y()/YLEN,(signed char) current_value|" svm-toy/qt/svm-toy.cpp
+
+%if %{with maven}
# Update the POM file, which is stuck on version 3.17
# pom_xpath_set does not work in rpm-4.11.1
# as it generated something like
@@ -153,94 +169,96 @@ cp %{SOURCE5} %{name}-svm-toy-qt-48.png
%{__sed} -e 's/%{pom_file_version}/%{version}/' %{SOURCE6} > %{name}.pom
%{__sed} -i 's|<url>http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu...</url>|<url>https://github.com/cjlin1/libsvm</url>|' %{name}.pom
%{__sed} -i 's|<connection>http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu...</connection>|<connection>scm:git:https://github.com/cjlin1/libsvm.git</connection>|' %{name}.pom
+
+%mvn_file %{maven_group_id}:%{name} %{maven_group_id}/%{name}
%endif
%build
%{__sed} -i 's/\r//' FAQ.html
%{__sed} -i 's/\r//' ChangeLog
-make all RPM_CFLAGS="$RPM_OPT_FLAGS" PYTHON_VERSION="%{pyver}" JAVAC="javac" JAR="jar" LIBDIR="%{_libdir}" MOC_PATH="%{moc_path}" NO_JAVA="%{no_java}"
+make all RPM_CFLAGS="$RPM_OPT_FLAGS" LIBDIR="%{_libdir}" CPP_STD="%{cpp_std}"
+%if %{with java}
+make -C java
+%endif
mv python/README python/README-Python
mv tools/README tools/README-Tools
cp README java/README-Java
-cp README svm-toy/gtk
cp README svm-toy/qt
+%if %{with maven}
+%mvn_artifact %{name}.pom java/%{name}.jar
+%endif
+
%install
rm -rf %{buildroot}
-make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} PYTHON_VERSION="%{pyver}" LIBSVM_VER="%{version}" NO_JAVA="%{no_java}" JAVA_TARGET_DIR="%{buildroot}/%{_javadir}"
-rm -rf %{buildroot}%{_datadir}/%{name}/src
+make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} LIBSVM_VER="%{version}" CPP_STD="%{cpp_std}"
+%if %{with java}
+make -C java install JAVA_TARGET_DIR="%{buildroot}/%{_javadir}"
+%endif
mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/
-cp %{name}-svm-toy-gtk-48.png %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/
cp %{name}-svm-toy-qt-48.png %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/
mkdir -p %{buildroot}/%{_datadir}/applications
-cp %{name}-svm-toy-gtk.desktop %{buildroot}/%{_datadir}/applications
cp %{name}-svm-toy-qt.desktop %{buildroot}/%{_datadir}/applications
%__ln_s %{name}.so.%{shver} %{buildroot}/%{_libdir}/%{name}.so
+## Python2
# [Bug 521194] Python: 'import libsvm' doesn't work
-mkdir -p %{buildroot}/%{libsvm_python_dir}
+mkdir -p %{buildroot}/%{python2_libsvm_dir}
echo -e "# This file is not in the original libsvm tarball, but added for convenience of import libsvm.\n\
# This file is released under BSD license, just like the rest of the package.\n"\
- > %{buildroot}/%{libsvm_python_dir}/__init__.py
-
-%if 0%{?with_vendor:1}
-desktop-file-install --delete-original --vendor=%{with_vendor} \
- --dir=%{buildroot}%{_datadir}/applications \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop
-%else
-desktop-file-install --delete-original \
- --dir=%{buildroot}%{_datadir}/applications \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop
-%endif
-
-# Python
+ > %{buildroot}/%{python2_libsvm_dir}/__init__.py
+install -p -m 755 tools/*.py %{buildroot}/%{python2_libsvm_dir}
+install -p -m 755 python/*.py %{buildroot}/%{python2_libsvm_dir}
# Fix Bug 646154 - libsvm-python's pth is not set correctly
-echo 'libsvm' > %{buildroot}/%{python_sitearch}/libsvm.pth
-for p in %{buildroot}%{libsvm_python_dir}/*.py;do
+echo 'libsvm' > %{buildroot}/%{python2_sitearch}/libsvm.pth
+for p in %{buildroot}%{python2_libsvm_dir}/*.py;do
sed -i -e 's|#!/usr/bin/env python|#!%{__python2}|' $p
done
-# Java
-%if "%{no_java}" == "FALSE"
-## Move jars to correct directory
-mkdir -p %{buildroot}/%{_javadir}/%{maven_group_id}
-mv %{buildroot}/%{_javadir}/%{name}.jar %{buildroot}/%{_javadir}/%{maven_group_id}/%{name}.jar
-ln -s %{_javadir}/%{maven_group_id}/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar
-## Install the Java POM
-mkdir -p %{buildroot}%{_mavenpomdir}
-cp -p %{name}.pom %{buildroot}%{_mavenpomdir}/%{pom_file_name}
-
-# RHEL6 does not support enable_add_maven_depmap
-%if "%{enable_add_maven_depmap}" == "TRUE"
-%add_maven_depmap %{pom_file_name} %{maven_group_id}/%{name}.jar
+%if ! %{with python3}
+## Use python2 when python3 is not enabled.
+cd tools
+for p in *.py; do
+ ln -s %{python2_libsvm_dir}/$p %{buildroot}/%{_bindir}/svm-$p
+done
+cd -
%endif
+## Python3
+%if %{with python3}
+mkdir -p %{buildroot}/%{python3_libsvm_dir}
+echo -e "# This file is not in the original libsvm tarball, but added for convenience of import libsvm.\n\
+# This file is released under BSD license, just like the rest of the package.\n"\
+ > %{buildroot}/%{python2_libsvm_dir}/__init__.py
+install -p -m 755 tools/*.py %{buildroot}/%{python3_libsvm_dir}
+install -p -m 755 python/*.py %{buildroot}/%{python3_libsvm_dir}
+echo 'libsvm' > %{buildroot}/%{python3_sitearch}/libsvm.pth
+for p in %{buildroot}%{python3_libsvm_dir}/*.py;do
+ sed -i -e 's|#!/usr/bin/env python|#!%{__python3}|' $p
+done
+cd tools
+for p in *.py; do
+ ln -s %{python3_libsvm_dir}/$p %{buildroot}/%{_bindir}/svm-$p
+done
+cd -
%endif
+# Java
+%if %{with maven}
+%mvn_install
+%endif
+# Desktop files
+desktop-file-install --delete-original \
+ --dir=%{buildroot}%{_datadir}/applications \
+ %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop
-%post -p /sbin/ldconfig
-
-%post svm-toy-gtk
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
+%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-%postun svm-toy-gtk
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
-
-
-
%files
%doc COPYRIGHT FAQ.html ChangeLog guide.pdf
%{_bindir}/svm-predict
@@ -255,14 +273,24 @@ fi
%{_includedir}/%{name}/
%{_libdir}/%{name}.so
-%files -n python2-libsvm
+%files -n %{python2_package_name}
%doc python/README-Python tools/README-Tools
-%{libsvm_python_dir}
+%{python2_libsvm_dir}
+%if ! %{with python3}
%{_bindir}/svm-*.py
-%{python_sitearch}/libsvm.pth
+%endif
+%{python2_sitearch}/libsvm.pth
-%if "%{no_java}" == "FALSE"
-%if "%{enable_add_maven_depmap}" == "TRUE"
+%if %{with python3}
+%files -n python3-%{name}
+%doc python/README-Python tools/README-Tools
+%{python3_libsvm_dir}
+%{_bindir}/svm-*.py
+%{python3_sitearch}/libsvm.pth
+%endif
+
+%if %{with java}
+%if %{with maven}
%files java -f .mfiles
%else
%files java
@@ -270,18 +298,11 @@ fi
%defattr(-,root,root,-)
%doc java/README-Java java/test_applet.html
%{_javadir}/%{name}.jar
-%if "%{enable_add_maven_depmap}" == "FALSE"
+%if %{with maven}
%{_javadir}/%{maven_group_id}/%{name}.jar
-%{_mavenpomdir}/%{pom_file_name}
%endif
%endif
-%files svm-toy-gtk
-%doc svm-toy/gtk/README
-%{_bindir}/svm-toy-gtk
-%{_datadir}/icons/hicolor/48x48/apps/%{name}-svm-toy-gtk-48.png
-%{_datadir}/applications/*%{name}-svm-toy-gtk.desktop
-
%files svm-toy-qt
%doc svm-toy/qt/README
%{_bindir}/svm-toy-qt
@@ -289,6 +310,21 @@ fi
%{_datadir}/applications/*%{name}-svm-toy-qt.desktop
%changelog
+* Thu Jul 19 2018 Ding-Yi Chen <dchen(a)redhat.com> - 3.23-1
+- Upstream update to 3.23
+ + add more digits of predicted file, model file, scaled data and data
+ from matlab libsvmwrite: to .17g
+ + svm-toy-gtk is no longer supported
+ + Dependency qt is updated to qt5
+- probability output:
+ + if 2 classes, directly output the predited probabilities
+ rather than run the iterative algorithms for multi-class situations
+- java:
+ + libsvm.jar generated by java 1.7 rather than 1.5
+ + change the use of "_" in svm.java, which won't be allowed in later java
+- python:
+ + split to python2 and python3
+
* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.21-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
@@ -313,7 +349,7 @@ fi
* Wed Jul 20 2016 Ding-Yi Chen <dchen(a)redhat.com> - 3.21-1
- Upstream update to 3.21
-- Fixes Bug 1277450 - libsvm(-java) remove versioned jars from {_javadir}
+- Fixes Bug 1277450 - libsvm(-java) remove versioned jars from {_javadir}
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 3.20-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
@@ -348,7 +384,7 @@ fi
* Tue Apr 22 2014 Ding-Yi Chen <dchen(a)redhat.com> - 3.18-1
- Upstream update to 3.18
- svm.cpp and svm-scale.c: check return values of fscanf
-- matlab interface: Makefile no longer handles octave
+- matlab interface: Makefile no longer handles octave
because make.m should be used
* Fri Mar 28 2014 Michael Simacek <msimacek(a)redhat.com> - 3.17-4
diff --git a/libsvm.svm-toy-qt5.patch b/libsvm.svm-toy-qt5.patch
new file mode 100644
index 0000000..9d589c2
--- /dev/null
+++ b/libsvm.svm-toy-qt5.patch
@@ -0,0 +1,28 @@
+diff -up ./svm-toy/qt/Makefile.svm-toy-qt5 ./svm-toy/qt/Makefile
+--- ./svm-toy/qt/Makefile.svm-toy-qt5 2018-07-16 00:16:58.000000000 +1000
++++ ./svm-toy/qt/Makefile 2018-07-18 18:10:40.157485623 +1000
+@@ -1,13 +1,14 @@
+ # use ``export QT_SELECT=qt5'' in a command window for using qt5
+ # may need to adjust the path of header files
+ CXX? = g++
+-INCLUDE = /usr/include/x86_64-linux-gnu/qt5
+-CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=c++11
++INCLUDE = /usr/include/qt5
++CPP_STD ?= c++11
++CFLAGS = ${RPM_CFLAGS} -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=${CPP_STD}
+ LIB = -lQt5Widgets -lQt5Gui -lQt5Core
+-MOC = /usr/bin/moc
++MOC ?= /usr/bin/moc-qt5
+
+ svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o
+- $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy $(LIB)
++ $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy-qt $(LIB)
+
+ svm-toy.moc: svm-toy.cpp
+ $(MOC) svm-toy.cpp -o svm-toy.moc
+@@ -16,4 +17,4 @@ svm-toy.moc: svm-toy.cpp
+ make -C ../.. svm.o
+
+ clean:
+- rm -f *~ svm-toy svm-toy.moc ../../svm.o
++ rm -f *~ svm-toy-qt svm-toy.moc ../../svm.o
diff --git a/libsvm.svm-toy.patch b/libsvm.svm-toy.patch
deleted file mode 100644
index 4fc0982..0000000
--- a/libsvm.svm-toy.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -up ./svm-toy/gtk/Makefile.svm-toy ./svm-toy/gtk/Makefile
---- ./svm-toy/gtk/Makefile.svm-toy 2015-12-14 23:49:17.000000000 +1000
-+++ ./svm-toy/gtk/Makefile 2016-07-20 11:56:30.157119649 +1000
-@@ -1,10 +1,12 @@
- CC? = gcc
- CXX? = g++
--CFLAGS = -Wall -O3 -g `pkg-config --cflags gtk+-2.0`
--LIBS = `pkg-config --libs gtk+-2.0`
-+CFLAGS = -Wall -O3 -g `pkg-config --cflags --libs gtk+-2.0`
-+LOCAL_LIBDIR=../..
-+LIBS = -L${LOCAL_LIBDIR} -lsvm
-
--svm-toy: main.o interface.o callbacks.o ../../svm.o
-- $(CXX) $(CFLAGS) main.o interface.o callbacks.o ../../svm.o -o svm-toy $(LIBS)
-+
-+svm-toy-gtk: main.o interface.o callbacks.o ${LOCAL_LIBDIR}/svm.o
-+ $(CXX) $(CFLAGS) main.o interface.o callbacks.o $(LIBS) -o $@
-
- main.o: main.c
- $(CC) $(CFLAGS) -c main.c
-@@ -15,8 +17,8 @@ interface.o: interface.c interface.h
- callbacks.o: callbacks.cpp callbacks.h
- $(CXX) $(CFLAGS) -c callbacks.cpp
-
--../../svm.o: ../../svm.cpp ../../svm.h
-- make -C ../.. svm.o
-+${LOCAL_LIBDIR}/svm.o: ${LOCAL_LIBDIR}/svm.cpp ${LOCAL_LIBDIR}/svm.h
-+ make -C ${LOCAL_LIBDIR} svm.o
-
- clean:
-- rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o ../../svm.o
-+ rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o ${LOCAL_LIBDIR}/svm.o
-diff -up ./svm-toy/qt/Makefile.svm-toy ./svm-toy/qt/Makefile
---- ./svm-toy/qt/Makefile.svm-toy 2016-07-20 11:56:30.157119649 +1000
-+++ ./svm-toy/qt/Makefile 2016-07-20 13:40:21.876341574 +1000
-@@ -1,17 +1,25 @@
- CXX? = g++
-+-CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtGui -lQtGui
-+-MOC = /usr/bin/moc-qt4
- INCLUDE = /usr/include/qt4
--CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore
-+SHVER?=2
-+CFLAGS = -Wall -O3 `pkg-config --cflags --libs QtGui`
- LIB = -lQtGui -lQtCore
--MOC = /usr/bin/moc-qt4
-+MOC=${MOC_PATH}
-+LOCAL_LIBDIR=../..
-+LIBS = -L${LOCAL_LIBDIR} -lsvm
-+LIBSVM_SO_SHVER=${LOCAL_LIBDIR}/libsvm.so.$(SHVER)
-
--svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o
-- $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy $(LIB)
-+all: svm-toy-qt
-+
-+svm-toy-qt: svm-toy.cpp svm-toy.moc $(LIBSVM_SO_SHVER)
-+ $(CXX) $(CFLAGS) svm-toy.cpp ${LIBS} -o $@
-
- svm-toy.moc: svm-toy.cpp
- $(MOC) svm-toy.cpp -o svm-toy.moc
-
--../../svm.o: ../../svm.cpp ../../svm.h
-- make -C ../.. svm.o
-+$(LIBSVM_SO_SHVER): ${LOCAL_LIBDIR}/svm.cpp ${LOCAL_LIBDIR}/svm.h
-+ make -C ${LOCAL_LIBDIR} lib
-
- clean:
- rm -f *~ svm-toy svm-toy.moc ../../svm.o
diff --git a/libsvm.toolsDir.patch b/libsvm.toolsDir.patch
index a303895..b0375b9 100644
--- a/libsvm.toolsDir.patch
+++ b/libsvm.toolsDir.patch
@@ -2,7 +2,7 @@ diff -up ./tools/easy.py.toolsDir ./tools/easy.py
--- ./tools/easy.py.toolsDir 2013-03-31 17:06:49.000000000 +1000
+++ ./tools/easy.py 2013-04-13 23:17:53.399526910 +1000
@@ -12,10 +12,10 @@ if len(sys.argv) <= 1:
-
+
is_win32 = (sys.platform == 'win32')
if not is_win32:
- svmscale_exe = "../svm-scale"
@@ -16,28 +16,6 @@ diff -up ./tools/easy.py.toolsDir ./tools/easy.py
gnuplot_exe = "/usr/bin/gnuplot"
else:
# example for windows
-@@ -47,7 +47,7 @@ if len(sys.argv) > 2:
-
- cmd = '{0} -s "{1}" "{2}" > "{3}"'.format(svmscale_exe, range_file, train_pathname, scaled_file)
- print('Scaling training data...')
--Popen(cmd, shell = True, stdout = PIPE).communicate()
-+Popen(cmd, shell = True, stdout = PIPE).communicate()
-
- cmd = '{0} -svmtrain "{1}" -gnuplot "{2}" "{3}"'.format(grid_py, svmtrain_exe, gnuplot_exe, scaled_file)
- print('Cross validation...')
-@@ -70,10 +70,10 @@ print('Output model: {0}'.format(model_f
- if len(sys.argv) > 2:
- cmd = '{0} -r "{1}" "{2}" > "{3}"'.format(svmscale_exe, range_file, test_pathname, scaled_test_file)
- print('Scaling testing data...')
-- Popen(cmd, shell = True, stdout = PIPE).communicate()
-+ Popen(cmd, shell = True, stdout = PIPE).communicate()
-
- cmd = '{0} "{1}" "{2}" "{3}"'.format(svmpredict_exe, scaled_test_file, model_file, predict_test_file)
- print('Testing...')
-- Popen(cmd, shell = True).communicate()
-+ Popen(cmd, shell = True).communicate()
-
- print('Output prediction: {0}'.format(predict_test_file))
diff -up ./tools/grid.py.toolsDir ./tools/grid.py
--- ./tools/grid.py.toolsDir 2013-03-31 17:06:50.000000000 +1000
+++ ./tools/grid.py 2013-04-13 23:18:53.964522769 +1000
diff --git a/log b/log
index c6074b0..8531e06 100644
--- a/log
+++ b/log
@@ -282,4 +282,27 @@ i subroutines to get SVs
pre-built windows exe files changed from 32 to 64 bit
matlab interface:
now use #include "../svm.h"
- fix some minor issues in make.m of matlab interface
\ No newline at end of file
+ fix some minor issues in make.m of matlab interface
+
+3.22: 2016/12/22
+ probability output:
+ if 2 classes, directly output the predited probabilities
+ rather than run the iterative algorithms for multi-class situations
+ java:
+ libsvm.jar generated by java 1.7 rather than 1.5
+ change the use of "_" in svm.java, which won't be allowed in later java
+
+3.23: 2018/7/15
+ add more digits of predicted file, model file, scaled data and data from matlab libsvmwrite: to %.17g
+ revise svm-scale.c so features in test data that do not appear in training data are scaled to zero.
+ remove unnecessary tab or space in all files
+ python interface:
+ add Scipy support
+ add scaling (csr_find_scale_param and csr_scale functions)
+ put some utility functions identical in LIBLINEAR to commonutil.py.
+ functions for scaling are put in commonutil.py.
+ sort column indices of csr matrix before training as feature indices must be ascending
+ convert Qt version of svm-toy from Qt4 to Qt5
+ remove gtk svm-toy because we stop maintaining this tool
+ minor improvement of descriptions in README
+
\ No newline at end of file
diff --git a/sources b/sources
index 46bd5da..77237b8 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-e7392f325efd1c6ddacd8e2c8bb023d1 guide.pdf
-30d2a0a8043e0f66cb7903b3ce45b3bf libsvm-3.21.tar.gz
+SHA512 (guide.pdf) = 5e97a7b76ad4217d7987c5c07f0420e780b61b82fb88fe0e6015681fabb5078980b280cec4a0a7208ea225b9fa84de878295039f4513df26f0d404a21812e44c
+SHA512 (libsvm-3.23.tar.gz) = 15e1a22a9075d3910414b0519b2ce8a93edc42be76a034d31435dc9463b08fbc510b806a3e6f64abff4ba3da771582436182e4e7d658ed2e54f311bc8cdbc121
commit e584449fa411030b95629038103e3960ff737bea
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Fri Jul 13 08:53:56 2018 +0000
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/libsvm.spec b/libsvm.spec
index ceca677..12348e4 100644
--- a/libsvm.spec
+++ b/libsvm.spec
@@ -9,7 +9,7 @@
Name: libsvm
Version: 3.21
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: A Library for Support Vector Machines
Group: Development/Libraries
@@ -289,6 +289,9 @@ fi
%{_datadir}/applications/*%{name}-svm-toy-qt.desktop
%changelog
+* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.21-8
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
* Wed Feb 07 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.21-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
commit 5b7bc69c03eba54ac37cf09b8cc38fc6c7ed025c
Author: Jason Tibbitts <tibbs(a)math.uh.edu>
Date: Tue Jul 10 01:47:30 2018 -0500
Remove needless use of %defattr
diff --git a/libsvm.spec b/libsvm.spec
index b9b9f96..ceca677 100644
--- a/libsvm.spec
+++ b/libsvm.spec
@@ -242,7 +242,6 @@ fi
%files
-%defattr(-,root,root,-)
%doc COPYRIGHT FAQ.html ChangeLog guide.pdf
%{_bindir}/svm-predict
%{_bindir}/svm-scale
@@ -252,13 +251,11 @@ fi
%{_libdir}/%{name}.so.%{shver}
%files devel
-%defattr(-,root,root,-)
%doc README
%{_includedir}/%{name}/
%{_libdir}/%{name}.so
%files -n python2-libsvm
-%defattr(-,root,root,-)
%doc python/README-Python tools/README-Tools
%{libsvm_python_dir}
%{_bindir}/svm-*.py
@@ -280,14 +277,12 @@ fi
%endif
%files svm-toy-gtk
-%defattr(-,root,root,-)
%doc svm-toy/gtk/README
%{_bindir}/svm-toy-gtk
%{_datadir}/icons/hicolor/48x48/apps/%{name}-svm-toy-gtk-48.png
%{_datadir}/applications/*%{name}-svm-toy-gtk.desktop
%files svm-toy-qt
-%defattr(-,root,root,-)
%doc svm-toy/qt/README
%{_bindir}/svm-toy-qt
%{_datadir}/icons/hicolor/48x48/apps/%{name}-svm-toy-qt-48.png
5 years, 9 months
Architecture specific change in rpms/libsvm.git
by githook-noreply@fedoraproject.org
The package rpms/libsvm.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/libsvm.git/commit/?id=e6b06f5e1ec....
Change:
-%ifarch ppc ppc64
Thanks.
Full change:
============
commit e6b06f5e1ecb99478ac787124851e2f343e7e5b4
Author: Ding-Yi Chen <dchen(a)redhat.com>
Date: Thu Jul 19 11:46:10 2018 +1000
Upstream update to 3.23
diff --git a/.gitignore b/.gitignore
index c5ed10e..48a9e12 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ libsvm-3.91.tar.gz
/libsvm-svm-toy-qt.desktop
/libsvm-3.20.tar.gz
/libsvm-3.21.tar.gz
+/libsvm-3.23.tar.gz
diff --git a/libsvm-svm-toy-gtk.desktop b/libsvm-svm-toy-gtk.desktop
deleted file mode 100644
index 3b8613d..0000000
--- a/libsvm-svm-toy-gtk.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Name=svm-toy-gtk
-GenericName=svm-toy GTK version
-Comment=GTK version of svm-toy (libsvm demostration program)
-Exec=svm-toy-gtk
-Icon=libsvm-svm-toy-gtk-48
-StartupNotify=true
-Terminal=false
-Type=Application
-Categories=GTK;Education;Science;Math;DataVisualization
diff --git a/libsvm.javaDir.patch b/libsvm.javaDir.patch
index ed7cf4b..5131c4f 100644
--- a/libsvm.javaDir.patch
+++ b/libsvm.javaDir.patch
@@ -1,34 +1,21 @@
diff -up ./java/Makefile.javaDir ./java/Makefile
---- ./java/Makefile.javaDir 2009-02-18 10:41:04.000000000 +1000
-+++ ./java/Makefile 2010-11-08 10:59:11.229518442 +1000
-@@ -4,13 +4,21 @@ FILES = libsvm/svm.class libsvm/svm_mode
- libsvm/svm_print_interface.class \
+--- ./java/Makefile.javaDir 2016-12-22 04:58:49.000000000 +1000
++++ ./java/Makefile 2018-04-17 12:11:53.773004141 +1000
+@@ -5,8 +5,8 @@ FILES = libsvm/svm.class libsvm/svm_mode
svm_train.class svm_predict.class svm_toy.class svm_scale.class
-
-+JAVA_DOC_DIR=${INSTDIR}/share/javadoc/libsvm-${LIBSVM_VER}
-+CLASSPATH = .
+
#JAVAC = jikes
--JAVAC_FLAGS = -target 1.5 -source 1.5
-+JAVAC_FLAGS = -target 1.5 -source 1.5 -classpath ${CLASSPATH}
-+ifndef JAVAC
- JAVAC = javac
-+endif
+-JAVAC_FLAGS = -target 1.7 -source 1.7
+-JAVAC = javac
++JAVAC_FLAGS = -target 1.7 -source 1.7 -classpath ${CLASSPATH}
++JAVAC ?= javac
# JAVAC_FLAGS =
-
-+ifndef JAR
-+JAR=jar
-+endif
-+
- all: $(FILES)
-- jar cvf libsvm.jar *.class libsvm/*.class
-+ ${JAR} cvf libsvm.jar *.class libsvm/*.class
-
- .java.class:
- $(JAVAC) $(JAVAC_FLAGS) $<
-@@ -18,8 +26,23 @@ all: $(FILES)
+ export CLASSPATH := .:$(CLASSPATH)
+
+@@ -19,8 +19,20 @@ all: $(FILES)
libsvm/svm.java: libsvm/svm.m4
m4 libsvm/svm.m4 > libsvm/svm.java
-
+
+javadoc: docs/index.html
+
+docs/index.html: $(FILES)
@@ -37,21 +24,18 @@ diff -up ./java/Makefile.javaDir ./java/Makefile
+install:
+ mkdir -p ${JAVA_TARGET_DIR}
+ install -m 644 libsvm.jar ${JAVA_TARGET_DIR}
-+# mkdir -p ${JAVA_DOC_DIR}
-+# cd docs; cp -R * ${JAVA_DOC_DIR}
+uninstall:
-+ rm -fr ${JAVA_TARGETDIR}
-+# rm -fr ${JAVA_DOC_DIR}
++ rm -fr ${JAVA_TARGET_DIR}
+
clean:
rm -f libsvm/*.class *.class *.jar libsvm/*~ *~ libsvm/svm.java
+ rm -rf docs
-
+
dist: clean all
rm *.class libsvm/*.class
diff -up ./java/test_applet.html.javaDir ./java/test_applet.html
---- ./java/test_applet.html.javaDir 2003-07-12 14:07:32.000000000 +1000
-+++ ./java/test_applet.html 2010-11-08 10:59:11.229518442 +1000
+--- ./java/test_applet.html.javaDir 2016-12-22 04:58:51.000000000 +1000
++++ ./java/test_applet.html 2018-04-17 11:51:17.927996424 +1000
@@ -1 +1,3 @@
-<APPLET code="svm_toy.class" archive="libsvm.jar" width=300 height=350></APPLET>
+<html>
diff --git a/libsvm.packageMain.patch b/libsvm.packageMain.patch
index dee23cd..f594c5b 100644
--- a/libsvm.packageMain.patch
+++ b/libsvm.packageMain.patch
@@ -4,7 +4,7 @@ diff -up ./Makefile.packageMain ./Makefile
@@ -1,11 +1,45 @@
CXX ?= g++
-CFLAGS = -Wall -Wconversion -O3 -fPIC
-+CFLAGS = ${RPM_CFLAGS} -Wall -Wconversion -O3 -fPIC
++CFLAGS = ${RPM_CFLAGS} -Wconversion -fPIC
SHVER = 2
+export SHVER
OS = $(shell uname)
@@ -15,11 +15,11 @@ diff -up ./Makefile.packageMain ./Makefile
+IS_64:=$(shell /bin/uname -i | awk '/64/ {print 64}')
+PREFIXDIR?= /usr
+export PREFIXDIR
-
+
-all: svm-train svm-predict svm-scale
+LIBDIR?=${PREFIXDIR}/lib${IS_64}
+export LIBDIR
-
+
-lib: svm.o
+DATADIR?=${PREFIXDIR}/share
+export DATADIR
@@ -39,7 +39,7 @@ diff -up ./Makefile.packageMain ./Makefile
+BINDIR_INSTALL:=${DESTDIR}/${BINDIR}
+export BINDIR_INSTALL
+
-+all: lib svm-train svm-predict svm-scale svm-python svm-java svm-toy-gtk svm-toy-qt
++all: lib svm-train svm-predict svm-scale svm-python svm-toy-qt
+
+lib: libsvm.so.$(SHVER) libsvm.so
+
@@ -50,9 +50,9 @@ diff -up ./Makefile.packageMain ./Makefile
if [ "$(OS)" = "Darwin" ]; then \
SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,libsvm.so.$(SHVER)"; \
else \
-@@ -14,12 +48,72 @@ lib: svm.o
+@@ -14,12 +48,46 @@ lib: svm.o
$(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER)
-
+
svm-predict: svm-predict.c svm.o
- $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm
+ $(CXX) $(CFLAGS) svm-predict.c $(LIBS) -o svm-predict -lm
@@ -65,19 +65,12 @@ diff -up ./Makefile.packageMain ./Makefile
$(CXX) $(CFLAGS) -c svm.cpp
clean:
- rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER)
-+ rm -f *~ svm.o svm-train svm-predict svm-scale svm-toy/gtk/svm-toy-gtk svm-toy/qt/svm-toy-qt
++ rm -f *~ svm.o svm-train svm-predict svm-scale svm-toy/qt/svm-toy-qt
+ ${MAKE} -C python clean
+ ${MAKE} -C java clean
+svm-python:
+ ${MAKE} -C python
+
-+svm-java:
-+ifneq ("${NO_JAVA}","NO_JAVA")
-+ ${MAKE} -C java
-+endif
-+svm-toy-gtk:
-+ ${MAKE} -C svm-toy/gtk
-+
+svm-toy-qt:
+ ${MAKE} -C svm-toy/qt
+
@@ -91,23 +84,7 @@ diff -up ./Makefile.packageMain ./Makefile
+# install package libsvm-devel
+ mkdir -p ${INCLUDEDIR_INSTALL}/libsvm
+ install -m 644 svm.h ${INCLUDEDIR_INSTALL}/libsvm
-+ mkdir -p ${DATADIR_INSTALL}/libsvm/src/java/libsvm
-+ install -m 644 *.h ${DATADIR_INSTALL}/libsvm/src
-+ install -m 644 *.c ${DATADIR_INSTALL}/libsvm/src
-+ install -m 644 *.cpp ${DATADIR_INSTALL}/libsvm/src
-+ install -m 644 Makefile ${DATADIR_INSTALL}/libsvm/src
-+ifneq ("${NO_JAVA}","NO_JAVA")
-+ install -m 644 java/*.java ${DATADIR_INSTALL}/libsvm/src/java
-+ install -m 644 java/Makefile ${DATADIR_INSTALL}/libsvm/src/java
-+ install -m 644 java/libsvm/*.java ${DATADIR_INSTALL}/libsvm/src/java/libsvm
-+ install -m 644 java/libsvm/*.m4 ${DATADIR_INSTALL}/libsvm/src/java/libsvm
-+# install package libsvm-java
-+ ${MAKE} -C java install
-+endif
-+# install package libsvm-python
-+ ${MAKE} -C python install
+# install package svm-toy
-+ install -m 755 svm-toy/gtk/svm-toy-gtk ${BINDIR_INSTALL}
+ install -m 755 svm-toy/qt/svm-toy-qt ${BINDIR_INSTALL}
+# install examples
+ mkdir -p ${DATADIR_INSTALL}/libsvm/examples
@@ -120,9 +97,6 @@ diff -up ./Makefile.packageMain ./Makefile
+ rm -f ${INCLUDEDIR_INSTALL}/libsvm/svm.h
+ rm -f ${LIBDIR_INSTALL}/libsvm.so*
+ ${MAKE} -C python uninstall
-+ifneq ("${NO_JAVA}","NO_JAVA")
+ ${MAKE} -C java uninstall
-+endif
-+ rm -f ${BINDIR_INSTALL}/svm-toy-gtk
+ rm -f ${BINDIR_INSTALL}/svm-toy-qt
+
diff --git a/libsvm.pythonDir.patch b/libsvm.pythonDir.patch
deleted file mode 100644
index ff0991d..0000000
--- a/libsvm.pythonDir.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -up ./python/Makefile.pythonDir ./python/Makefile
---- ./python/Makefile.pythonDir 2011-05-10 09:35:15.000000000 +1000
-+++ ./python/Makefile 2011-11-08 09:49:54.280501207 +1000
-@@ -1,4 +1,20 @@
-+PYTHONDIR_NAME ?= python${PYTHON_VERSION}/site-packages/libsvm
-+PYTHONDIR?=${LIBDIR}/${PYTHONDIR_NAME}
-+PYTHONDIR_INSTALL=${DESTDIR}/${PYTHONDIR}
-+SVM_TOOLS:= $(notdir $(wildcard ../tools/*.py))
-+
- all = lib
-
--lib:
-+all: lib
-+
-+lib: ../svm.cpp ../svm.h
- make -C .. lib
-+
-+install: all
-+ mkdir -p ${PYTHONDIR_INSTALL}
-+ install -m 755 *.py ${PYTHONDIR_INSTALL}
-+ install -m 755 ../tools/*.py ${PYTHONDIR_INSTALL}
-+ $(foreach toolPy,$(SVM_TOOLS),ln -s ${PYTHONDIR}/$(toolPy) ${BINDIR_INSTALL}/svm-$(toolPy);)
-+
-+uninstall:
-+ rm -fr ${LIBDIR}/${PYTHON_PATH} $(addprefix ${BINDIR_INSTALL}/svm-,$(SVM_TOOLS))
diff --git a/libsvm.spec b/libsvm.spec
index 12348e4..5b9f40c 100644
--- a/libsvm.spec
+++ b/libsvm.spec
@@ -1,15 +1,46 @@
%define shver 2
-%{!?pyver: %global pyver %(python -c 'import sys; print(sys.version[0:3])')}
-%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-%define libdir_libsvm %{_libdir}/libsvm
-%define libsvm_python_dir %{python_sitearch}/libsvm
+# EL7 and EL6 only have python_version
+%{!?python2_version: %global python2_version %{python_version}}
+%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
+%{!?python2_sitelib: %global python2_sitearch %{python_sitelib}}
+%global libdir_libsvm %{_libdir}/libsvm
+%global python2_libsvm_dir %{python2_sitearch}/libsvm
+%global python3_libsvm_dir %{python3_sitearch}/libsvm
%global maven_group_id tw.edu.ntu.csie
%global pom_file_version 3.17
%global pom_file_name JPP.%{maven_group_id}-%{name}.pom
+# el_version is RHEL major version, but empty in Fedora
+%global el_version %(/usr/lib/rpm/redhat/dist.sh --el)
+
+# EL <= 6 does not have enable_maven
+%if 0%{?el_version} != 0 && 0%{?el_version} <= 6
+%global java_dependency java
+%ifarch ppc64
+%bcond_with java
+%else
+%bcond_without java
+%endif
+%global cpp_std c++0x
+%else
+%define java_dependency java-headless
+%bcond_without java
+%bcond_without maven
+%global cpp_std c++11
+%endif
+
+# EL <= 7 python 3 is not available by default
+%if 0%{?el_version} != 0 && 0%{?el_version} <= 7
+%global python2_package_name libsvm-python
+%bcond_with python3
+%else
+%global python2_package_name python2-libsvm
+%bcond_without python3
+%endif
+
Name: libsvm
-Version: 3.21
-Release: 8%{?dist}
+Version: 3.23
+Release: 1%{?dist}
Summary: A Library for Support Vector Machines
Group: Development/Libraries
@@ -18,38 +49,15 @@ URL: http://www.csie.ntu.edu.tw/~cjlin/libsvm/
Source0: http://www.csie.ntu.edu.tw/~cjlin/libsvm/%{name}-%{version}.tar.gz
Source1: http://www.csie.ntu.edu.tw/~cjlin/libsvm/log
Source2: http://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf
-Source3: libsvm-svm-toy-gtk.desktop
Source4: libsvm-svm-toy-qt.desktop
Source5: LibSVM-svm-toy-48.png
Source6: http://central.maven.org/maven2/tw/edu/ntu/csie/libsvm/%{pom_file_version...
Patch0: %{name}.packageMain.patch
-Patch1: %{name}.pythonDir.patch
Patch2: %{name}.javaDir.patch
-Patch3: %{name}.svm-toy.patch
Patch4: %{name}.toolsDir.patch
+Patch5: %{name}.svm-toy-qt5.patch
BuildRequires: grep
-%if 0%{?rhel} != 0 && 0%{?rhel} <= 5
-%define moc_path %{_libdir}/qt4/bin/moc
-%define with_vendor "fedora"
-%else
-%define moc_path %{_bindir}/moc-qt4
-%endif
-
-# RHEL6 does not have enable_add_maven_depmap
-%define no_java FALSE
-%if 0%{?rhel} != 0 && 0%{?rhel} <= 6
-%define java_dependency java
-%define enable_add_maven_depmap FALSE
-%ifarch ppc ppc64
-%define no_java NO_JAVA
-Obsoletes: libsvm-java < 2.88-1
-%endif
-%else
-%define java_dependency java-headless
-%define enable_add_maven_depmap TRUE
-%endif
-
%description
LIBSVM is an integrated software for support vector classification,
(C-SVC, nu-SVC ), regression (epsilon-SVR, nu-SVR) and distribution
@@ -65,34 +73,52 @@ Requires: %{name} = %{version}-%{release}
Header file, object file of libsvm in C, C++ and Java.
Install this package if you want to develop programs with libsvm.
-
-%package -n python2-libsvm
+%package -n %{python2_package_name}
%{?python_provide:%python_provide python2-libsvm}
-# Remove before F30
Provides: %{name}-python%{?_isa} = %{version}-%{release}
-Obsoletes: %{name}-python < %{version}-%{release}
-Summary: Python tools and interfaces for libsvm
+Obsoletes: %{name}-python%{?_isa} < %{version}-%{release}
+Summary: Python2 tools and interfaces for libsvm
Group: Development/Libraries
-BuildRequires: python-devel >= 2.4 gawk
+BuildRequires: python2-devel >= 2.4 gawk
#gnuplot is required by easy.py
Requires: %{name} = %{version}-%{release}
Requires: gnuplot
-%description -n python2-libsvm
-Python tools and interfaces for libsvm.
+%description -n %{python2_package_name}
+Python2 tools and interfaces for libsvm.
Install this package if you want to develop
-programs with libsvm in Python.
+programs with libsvm in Python2.
-%if "%{no_java}" == "FALSE"
+%if %{with python3}
+%package -n python3-%{name}
+%{?python_provide:%python_provide python3-%{name}}
+Provides: %{name}-python%{?_isa} = %{version}-%{release}
+Obsoletes: %{name}-python%{?_isa} < %{version}-%{release}
+Summary: Python3 tools and interfaces for libsvm
+Group: Development/Libraries
+BuildRequires: python3-devel gawk
+#gnuplot is required by easy.py
+Requires: %{name} = %{version}-%{release}
+Requires: gnuplot
+
+%description -n python3-%{name}
+Python3 tools and interfaces for libsvm.
+Install this package if you want to develop
+programs with libsvm in Python3.
+%endif
+
+%if %{with java}
%package java
Summary: Java tools and interfaces for libsvm
Group: Development/Libraries
-BuildRequires: java-devel >= 1.5.0
+BuildRequires: java-devel >= 1.7.0
BuildRequires: jpackage-utils
-
-Requires: %{java_dependency} >= 1.5.0
+%if %{with maven}
+BuildRequires: maven-local
+%endif
+Requires: %{java_dependency} >= 1.7.0
Requires: jpackage-utils
-Requires: %{name} = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
%description java
Java tools and interfaces for libsvm.
@@ -100,26 +126,14 @@ Install this package if you want to develop
programs with libsvm in Java.
%endif
-%package svm-toy-gtk
-Summary: GTK version of svm-toy (libsvm demonstration program)
-Group: Development/Libraries
-BuildRequires: gtk2-devel
-BuildRequires: desktop-file-utils
-Requires: gtk2
-Requires: %{name} = %{version}-%{release}
-
-%description svm-toy-gtk
-svm-toy is a libsvm demonstration program which has a gtk-GUI to
-display the derived separating hyperplane.
-
%package svm-toy-qt
Summary: QT version of svm-toy (libsvm demonstration program)
Group: Development/Libraries
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig
-BuildRequires: qt4-devel
-Requires: qt4
+BuildRequires: qt5-qtbase-devel
+Requires: qt5
Requires: %{name} = %{version}-%{release}
%description svm-toy-qt
@@ -129,18 +143,20 @@ display the derived separating hyperplane.
%prep
%setup -q
%patch0 -p0 -b .packageMain
-%patch1 -p0 -b .pythonDir
%patch2 -p0 -b .javaDir
-%patch3 -p0 -b .svm-toy
%patch4 -p0 -b .toolsDir
+%patch5 -p0 -b .svm-toy-qt5
cp %{SOURCE1} ChangeLog
cp %{SOURCE2} .
-cp %{SOURCE3} .
cp %{SOURCE4} .
-cp %{SOURCE5} %{name}-svm-toy-gtk-48.png
cp %{SOURCE5} %{name}-svm-toy-qt-48.png
-%if "%{no_java}" == "FALSE"
+# Fix the error: narrowing conversion
+sed -i.narrowing -e "s|{x,y,v}|{x,y,(signed char) v}|" svm-toy/qt/svm-toy.cpp
+sed -i -e "s|{x,y,current_value}|{x,y,(signed char) current_value}|" svm-toy/qt/svm-toy.cpp
+sed -i -e "s|(double)event->y()/YLEN, current_value|(double)event->y()/YLEN,(signed char) current_value|" svm-toy/qt/svm-toy.cpp
+
+%if %{with maven}
# Update the POM file, which is stuck on version 3.17
# pom_xpath_set does not work in rpm-4.11.1
# as it generated something like
@@ -153,94 +169,96 @@ cp %{SOURCE5} %{name}-svm-toy-qt-48.png
%{__sed} -e 's/%{pom_file_version}/%{version}/' %{SOURCE6} > %{name}.pom
%{__sed} -i 's|<url>http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu...</url>|<url>https://github.com/cjlin1/libsvm</url>|' %{name}.pom
%{__sed} -i 's|<connection>http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu...</connection>|<connection>scm:git:https://github.com/cjlin1/libsvm.git</connection>|' %{name}.pom
+
+%mvn_file %{maven_group_id}:%{name} %{maven_group_id}/%{name}
%endif
%build
%{__sed} -i 's/\r//' FAQ.html
%{__sed} -i 's/\r//' ChangeLog
-make all RPM_CFLAGS="$RPM_OPT_FLAGS" PYTHON_VERSION="%{pyver}" JAVAC="javac" JAR="jar" LIBDIR="%{_libdir}" MOC_PATH="%{moc_path}" NO_JAVA="%{no_java}"
+make all RPM_CFLAGS="$RPM_OPT_FLAGS" LIBDIR="%{_libdir}" CPP_STD="%{cpp_std}"
+%if %{with java}
+make -C java
+%endif
mv python/README python/README-Python
mv tools/README tools/README-Tools
cp README java/README-Java
-cp README svm-toy/gtk
cp README svm-toy/qt
+%if %{with maven}
+%mvn_artifact %{name}.pom java/%{name}.jar
+%endif
+
%install
rm -rf %{buildroot}
-make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} PYTHON_VERSION="%{pyver}" LIBSVM_VER="%{version}" NO_JAVA="%{no_java}" JAVA_TARGET_DIR="%{buildroot}/%{_javadir}"
-rm -rf %{buildroot}%{_datadir}/%{name}/src
+make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} LIBSVM_VER="%{version}" CPP_STD="%{cpp_std}"
+%if %{with java}
+make -C java install JAVA_TARGET_DIR="%{buildroot}/%{_javadir}"
+%endif
mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/
-cp %{name}-svm-toy-gtk-48.png %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/
cp %{name}-svm-toy-qt-48.png %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps/
mkdir -p %{buildroot}/%{_datadir}/applications
-cp %{name}-svm-toy-gtk.desktop %{buildroot}/%{_datadir}/applications
cp %{name}-svm-toy-qt.desktop %{buildroot}/%{_datadir}/applications
%__ln_s %{name}.so.%{shver} %{buildroot}/%{_libdir}/%{name}.so
+## Python2
# [Bug 521194] Python: 'import libsvm' doesn't work
-mkdir -p %{buildroot}/%{libsvm_python_dir}
+mkdir -p %{buildroot}/%{python2_libsvm_dir}
echo -e "# This file is not in the original libsvm tarball, but added for convenience of import libsvm.\n\
# This file is released under BSD license, just like the rest of the package.\n"\
- > %{buildroot}/%{libsvm_python_dir}/__init__.py
-
-%if 0%{?with_vendor:1}
-desktop-file-install --delete-original --vendor=%{with_vendor} \
- --dir=%{buildroot}%{_datadir}/applications \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop
-%else
-desktop-file-install --delete-original \
- --dir=%{buildroot}%{_datadir}/applications \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \
- %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop
-%endif
-
-# Python
+ > %{buildroot}/%{python2_libsvm_dir}/__init__.py
+install -p -m 755 tools/*.py %{buildroot}/%{python2_libsvm_dir}
+install -p -m 755 python/*.py %{buildroot}/%{python2_libsvm_dir}
# Fix Bug 646154 - libsvm-python's pth is not set correctly
-echo 'libsvm' > %{buildroot}/%{python_sitearch}/libsvm.pth
-for p in %{buildroot}%{libsvm_python_dir}/*.py;do
+echo 'libsvm' > %{buildroot}/%{python2_sitearch}/libsvm.pth
+for p in %{buildroot}%{python2_libsvm_dir}/*.py;do
sed -i -e 's|#!/usr/bin/env python|#!%{__python2}|' $p
done
-# Java
-%if "%{no_java}" == "FALSE"
-## Move jars to correct directory
-mkdir -p %{buildroot}/%{_javadir}/%{maven_group_id}
-mv %{buildroot}/%{_javadir}/%{name}.jar %{buildroot}/%{_javadir}/%{maven_group_id}/%{name}.jar
-ln -s %{_javadir}/%{maven_group_id}/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar
-## Install the Java POM
-mkdir -p %{buildroot}%{_mavenpomdir}
-cp -p %{name}.pom %{buildroot}%{_mavenpomdir}/%{pom_file_name}
-
-# RHEL6 does not support enable_add_maven_depmap
-%if "%{enable_add_maven_depmap}" == "TRUE"
-%add_maven_depmap %{pom_file_name} %{maven_group_id}/%{name}.jar
+%if ! %{with python3}
+## Use python2 when python3 is not enabled.
+cd tools
+for p in *.py; do
+ ln -s %{python2_libsvm_dir}/$p %{buildroot}/%{_bindir}/svm-$p
+done
+cd -
%endif
+## Python3
+%if %{with python3}
+mkdir -p %{buildroot}/%{python3_libsvm_dir}
+echo -e "# This file is not in the original libsvm tarball, but added for convenience of import libsvm.\n\
+# This file is released under BSD license, just like the rest of the package.\n"\
+ > %{buildroot}/%{python2_libsvm_dir}/__init__.py
+install -p -m 755 tools/*.py %{buildroot}/%{python3_libsvm_dir}
+install -p -m 755 python/*.py %{buildroot}/%{python3_libsvm_dir}
+echo 'libsvm' > %{buildroot}/%{python3_sitearch}/libsvm.pth
+for p in %{buildroot}%{python3_libsvm_dir}/*.py;do
+ sed -i -e 's|#!/usr/bin/env python|#!%{__python3}|' $p
+done
+cd tools
+for p in *.py; do
+ ln -s %{python3_libsvm_dir}/$p %{buildroot}/%{_bindir}/svm-$p
+done
+cd -
%endif
+# Java
+%if %{with maven}
+%mvn_install
+%endif
+# Desktop files
+desktop-file-install --delete-original \
+ --dir=%{buildroot}%{_datadir}/applications \
+ %{buildroot}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop
-%post -p /sbin/ldconfig
-
-%post svm-toy-gtk
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
+%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-%postun svm-toy-gtk
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
-
-
-
%files
%doc COPYRIGHT FAQ.html ChangeLog guide.pdf
%{_bindir}/svm-predict
@@ -255,14 +273,24 @@ fi
%{_includedir}/%{name}/
%{_libdir}/%{name}.so
-%files -n python2-libsvm
+%files -n %{python2_package_name}
%doc python/README-Python tools/README-Tools
-%{libsvm_python_dir}
+%{python2_libsvm_dir}
+%if ! %{with python3}
%{_bindir}/svm-*.py
-%{python_sitearch}/libsvm.pth
+%endif
+%{python2_sitearch}/libsvm.pth
-%if "%{no_java}" == "FALSE"
-%if "%{enable_add_maven_depmap}" == "TRUE"
+%if %{with python3}
+%files -n python3-%{name}
+%doc python/README-Python tools/README-Tools
+%{python3_libsvm_dir}
+%{_bindir}/svm-*.py
+%{python3_sitearch}/libsvm.pth
+%endif
+
+%if %{with java}
+%if %{with maven}
%files java -f .mfiles
%else
%files java
@@ -270,18 +298,11 @@ fi
%defattr(-,root,root,-)
%doc java/README-Java java/test_applet.html
%{_javadir}/%{name}.jar
-%if "%{enable_add_maven_depmap}" == "FALSE"
+%if %{with maven}
%{_javadir}/%{maven_group_id}/%{name}.jar
-%{_mavenpomdir}/%{pom_file_name}
%endif
%endif
-%files svm-toy-gtk
-%doc svm-toy/gtk/README
-%{_bindir}/svm-toy-gtk
-%{_datadir}/icons/hicolor/48x48/apps/%{name}-svm-toy-gtk-48.png
-%{_datadir}/applications/*%{name}-svm-toy-gtk.desktop
-
%files svm-toy-qt
%doc svm-toy/qt/README
%{_bindir}/svm-toy-qt
@@ -289,6 +310,21 @@ fi
%{_datadir}/applications/*%{name}-svm-toy-qt.desktop
%changelog
+* Thu Jul 19 2018 Ding-Yi Chen <dchen(a)redhat.com> - 3.23-1
+- Upstream update to 3.23
+ + add more digits of predicted file, model file, scaled data and data
+ from matlab libsvmwrite: to .17g
+ + svm-toy-gtk is no longer supported
+ + Dependency qt is updated to qt5
+- probability output:
+ + if 2 classes, directly output the predited probabilities
+ rather than run the iterative algorithms for multi-class situations
+- java:
+ + libsvm.jar generated by java 1.7 rather than 1.5
+ + change the use of "_" in svm.java, which won't be allowed in later java
+- python:
+ + split to python2 and python3
+
* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.21-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
@@ -313,7 +349,7 @@ fi
* Wed Jul 20 2016 Ding-Yi Chen <dchen(a)redhat.com> - 3.21-1
- Upstream update to 3.21
-- Fixes Bug 1277450 - libsvm(-java) remove versioned jars from {_javadir}
+- Fixes Bug 1277450 - libsvm(-java) remove versioned jars from {_javadir}
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 3.20-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
@@ -348,7 +384,7 @@ fi
* Tue Apr 22 2014 Ding-Yi Chen <dchen(a)redhat.com> - 3.18-1
- Upstream update to 3.18
- svm.cpp and svm-scale.c: check return values of fscanf
-- matlab interface: Makefile no longer handles octave
+- matlab interface: Makefile no longer handles octave
because make.m should be used
* Fri Mar 28 2014 Michael Simacek <msimacek(a)redhat.com> - 3.17-4
diff --git a/libsvm.svm-toy-qt5.patch b/libsvm.svm-toy-qt5.patch
new file mode 100644
index 0000000..9d589c2
--- /dev/null
+++ b/libsvm.svm-toy-qt5.patch
@@ -0,0 +1,28 @@
+diff -up ./svm-toy/qt/Makefile.svm-toy-qt5 ./svm-toy/qt/Makefile
+--- ./svm-toy/qt/Makefile.svm-toy-qt5 2018-07-16 00:16:58.000000000 +1000
++++ ./svm-toy/qt/Makefile 2018-07-18 18:10:40.157485623 +1000
+@@ -1,13 +1,14 @@
+ # use ``export QT_SELECT=qt5'' in a command window for using qt5
+ # may need to adjust the path of header files
+ CXX? = g++
+-INCLUDE = /usr/include/x86_64-linux-gnu/qt5
+-CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=c++11
++INCLUDE = /usr/include/qt5
++CPP_STD ?= c++11
++CFLAGS = ${RPM_CFLAGS} -I$(INCLUDE) -I$(INCLUDE)/QtWidgets -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore -fPIC -std=${CPP_STD}
+ LIB = -lQt5Widgets -lQt5Gui -lQt5Core
+-MOC = /usr/bin/moc
++MOC ?= /usr/bin/moc-qt5
+
+ svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o
+- $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy $(LIB)
++ $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy-qt $(LIB)
+
+ svm-toy.moc: svm-toy.cpp
+ $(MOC) svm-toy.cpp -o svm-toy.moc
+@@ -16,4 +17,4 @@ svm-toy.moc: svm-toy.cpp
+ make -C ../.. svm.o
+
+ clean:
+- rm -f *~ svm-toy svm-toy.moc ../../svm.o
++ rm -f *~ svm-toy-qt svm-toy.moc ../../svm.o
diff --git a/libsvm.svm-toy.patch b/libsvm.svm-toy.patch
deleted file mode 100644
index 4fc0982..0000000
--- a/libsvm.svm-toy.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -up ./svm-toy/gtk/Makefile.svm-toy ./svm-toy/gtk/Makefile
---- ./svm-toy/gtk/Makefile.svm-toy 2015-12-14 23:49:17.000000000 +1000
-+++ ./svm-toy/gtk/Makefile 2016-07-20 11:56:30.157119649 +1000
-@@ -1,10 +1,12 @@
- CC? = gcc
- CXX? = g++
--CFLAGS = -Wall -O3 -g `pkg-config --cflags gtk+-2.0`
--LIBS = `pkg-config --libs gtk+-2.0`
-+CFLAGS = -Wall -O3 -g `pkg-config --cflags --libs gtk+-2.0`
-+LOCAL_LIBDIR=../..
-+LIBS = -L${LOCAL_LIBDIR} -lsvm
-
--svm-toy: main.o interface.o callbacks.o ../../svm.o
-- $(CXX) $(CFLAGS) main.o interface.o callbacks.o ../../svm.o -o svm-toy $(LIBS)
-+
-+svm-toy-gtk: main.o interface.o callbacks.o ${LOCAL_LIBDIR}/svm.o
-+ $(CXX) $(CFLAGS) main.o interface.o callbacks.o $(LIBS) -o $@
-
- main.o: main.c
- $(CC) $(CFLAGS) -c main.c
-@@ -15,8 +17,8 @@ interface.o: interface.c interface.h
- callbacks.o: callbacks.cpp callbacks.h
- $(CXX) $(CFLAGS) -c callbacks.cpp
-
--../../svm.o: ../../svm.cpp ../../svm.h
-- make -C ../.. svm.o
-+${LOCAL_LIBDIR}/svm.o: ${LOCAL_LIBDIR}/svm.cpp ${LOCAL_LIBDIR}/svm.h
-+ make -C ${LOCAL_LIBDIR} svm.o
-
- clean:
-- rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o ../../svm.o
-+ rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o ${LOCAL_LIBDIR}/svm.o
-diff -up ./svm-toy/qt/Makefile.svm-toy ./svm-toy/qt/Makefile
---- ./svm-toy/qt/Makefile.svm-toy 2016-07-20 11:56:30.157119649 +1000
-+++ ./svm-toy/qt/Makefile 2016-07-20 13:40:21.876341574 +1000
-@@ -1,17 +1,25 @@
- CXX? = g++
-+-CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtGui -lQtGui
-+-MOC = /usr/bin/moc-qt4
- INCLUDE = /usr/include/qt4
--CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtGui -I$(INCLUDE)/QtCore
-+SHVER?=2
-+CFLAGS = -Wall -O3 `pkg-config --cflags --libs QtGui`
- LIB = -lQtGui -lQtCore
--MOC = /usr/bin/moc-qt4
-+MOC=${MOC_PATH}
-+LOCAL_LIBDIR=../..
-+LIBS = -L${LOCAL_LIBDIR} -lsvm
-+LIBSVM_SO_SHVER=${LOCAL_LIBDIR}/libsvm.so.$(SHVER)
-
--svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o
-- $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy $(LIB)
-+all: svm-toy-qt
-+
-+svm-toy-qt: svm-toy.cpp svm-toy.moc $(LIBSVM_SO_SHVER)
-+ $(CXX) $(CFLAGS) svm-toy.cpp ${LIBS} -o $@
-
- svm-toy.moc: svm-toy.cpp
- $(MOC) svm-toy.cpp -o svm-toy.moc
-
--../../svm.o: ../../svm.cpp ../../svm.h
-- make -C ../.. svm.o
-+$(LIBSVM_SO_SHVER): ${LOCAL_LIBDIR}/svm.cpp ${LOCAL_LIBDIR}/svm.h
-+ make -C ${LOCAL_LIBDIR} lib
-
- clean:
- rm -f *~ svm-toy svm-toy.moc ../../svm.o
diff --git a/libsvm.toolsDir.patch b/libsvm.toolsDir.patch
index a303895..b0375b9 100644
--- a/libsvm.toolsDir.patch
+++ b/libsvm.toolsDir.patch
@@ -2,7 +2,7 @@ diff -up ./tools/easy.py.toolsDir ./tools/easy.py
--- ./tools/easy.py.toolsDir 2013-03-31 17:06:49.000000000 +1000
+++ ./tools/easy.py 2013-04-13 23:17:53.399526910 +1000
@@ -12,10 +12,10 @@ if len(sys.argv) <= 1:
-
+
is_win32 = (sys.platform == 'win32')
if not is_win32:
- svmscale_exe = "../svm-scale"
@@ -16,28 +16,6 @@ diff -up ./tools/easy.py.toolsDir ./tools/easy.py
gnuplot_exe = "/usr/bin/gnuplot"
else:
# example for windows
-@@ -47,7 +47,7 @@ if len(sys.argv) > 2:
-
- cmd = '{0} -s "{1}" "{2}" > "{3}"'.format(svmscale_exe, range_file, train_pathname, scaled_file)
- print('Scaling training data...')
--Popen(cmd, shell = True, stdout = PIPE).communicate()
-+Popen(cmd, shell = True, stdout = PIPE).communicate()
-
- cmd = '{0} -svmtrain "{1}" -gnuplot "{2}" "{3}"'.format(grid_py, svmtrain_exe, gnuplot_exe, scaled_file)
- print('Cross validation...')
-@@ -70,10 +70,10 @@ print('Output model: {0}'.format(model_f
- if len(sys.argv) > 2:
- cmd = '{0} -r "{1}" "{2}" > "{3}"'.format(svmscale_exe, range_file, test_pathname, scaled_test_file)
- print('Scaling testing data...')
-- Popen(cmd, shell = True, stdout = PIPE).communicate()
-+ Popen(cmd, shell = True, stdout = PIPE).communicate()
-
- cmd = '{0} "{1}" "{2}" "{3}"'.format(svmpredict_exe, scaled_test_file, model_file, predict_test_file)
- print('Testing...')
-- Popen(cmd, shell = True).communicate()
-+ Popen(cmd, shell = True).communicate()
-
- print('Output prediction: {0}'.format(predict_test_file))
diff -up ./tools/grid.py.toolsDir ./tools/grid.py
--- ./tools/grid.py.toolsDir 2013-03-31 17:06:50.000000000 +1000
+++ ./tools/grid.py 2013-04-13 23:18:53.964522769 +1000
diff --git a/log b/log
index c6074b0..8531e06 100644
--- a/log
+++ b/log
@@ -282,4 +282,27 @@ i subroutines to get SVs
pre-built windows exe files changed from 32 to 64 bit
matlab interface:
now use #include "../svm.h"
- fix some minor issues in make.m of matlab interface
\ No newline at end of file
+ fix some minor issues in make.m of matlab interface
+
+3.22: 2016/12/22
+ probability output:
+ if 2 classes, directly output the predited probabilities
+ rather than run the iterative algorithms for multi-class situations
+ java:
+ libsvm.jar generated by java 1.7 rather than 1.5
+ change the use of "_" in svm.java, which won't be allowed in later java
+
+3.23: 2018/7/15
+ add more digits of predicted file, model file, scaled data and data from matlab libsvmwrite: to %.17g
+ revise svm-scale.c so features in test data that do not appear in training data are scaled to zero.
+ remove unnecessary tab or space in all files
+ python interface:
+ add Scipy support
+ add scaling (csr_find_scale_param and csr_scale functions)
+ put some utility functions identical in LIBLINEAR to commonutil.py.
+ functions for scaling are put in commonutil.py.
+ sort column indices of csr matrix before training as feature indices must be ascending
+ convert Qt version of svm-toy from Qt4 to Qt5
+ remove gtk svm-toy because we stop maintaining this tool
+ minor improvement of descriptions in README
+
\ No newline at end of file
diff --git a/sources b/sources
index 46bd5da..77237b8 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-e7392f325efd1c6ddacd8e2c8bb023d1 guide.pdf
-30d2a0a8043e0f66cb7903b3ce45b3bf libsvm-3.21.tar.gz
+SHA512 (guide.pdf) = 5e97a7b76ad4217d7987c5c07f0420e780b61b82fb88fe0e6015681fabb5078980b280cec4a0a7208ea225b9fa84de878295039f4513df26f0d404a21812e44c
+SHA512 (libsvm-3.23.tar.gz) = 15e1a22a9075d3910414b0519b2ce8a93edc42be76a034d31435dc9463b08fbc510b806a3e6f64abff4ba3da771582436182e4e7d658ed2e54f311bc8cdbc121
5 years, 9 months
Architecture specific change in rpms/cjdns.git
by githook-noreply@fedoraproject.org
The package rpms/cjdns.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/cjdns.git/commit/?id=88f1da130053....
Change:
+%ifarch s390x
Thanks.
Full change:
============
commit 0de5b24e0c27c8751f5ca0b01f8de756f78c9928
Merge: 59ef759 88f1da1
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Wed Jul 18 21:50:28 2018 -0400
Merge branch 'master' into f28
commit 88f1da1300534e2de803cfae74bd95da83064d30
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Wed Jul 18 21:42:43 2018 -0400
mtune=generic not supported on s390x
diff --git a/cjdns.spec b/cjdns.spec
index 4d1b86a..6a4f0d5 100644
--- a/cjdns.spec
+++ b/cjdns.spec
@@ -289,7 +289,11 @@ EOF
chmod a+x cjdns-up.sh
%if %{generic_build}
+%ifarch s390x
+sed -i -e 's/-march=native/-mtune=native/' node_build/make.js
+%else
sed -i -e 's/-march=native/-mtune=generic/' node_build/make.js
+%endif
rm node_build/dependencies/cnacl/node_build/plans/*_AVX_plan.json
# Leaving SSE2 code in since x86 is secondary arch and pretty much everyone
# is going to have SSE2, except things like XO-1 which needs custom build.
5 years, 9 months
Architecture specific change in rpms/cjdns.git
by githook-noreply@fedoraproject.org
The package rpms/cjdns.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/cjdns.git/commit/?id=4fcbbff9e28a....
Change:
-ExcludeArch: s390x
Thanks.
Full change:
============
commit 59ef75905d0d379d60e205cc88c943b20a4d0e85
Merge: dcc84e1 7b61aa8
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Wed Jul 18 21:20:12 2018 -0400
Merge branch 'master' into f28
commit 7b61aa8ff0f85f96ecc17c25a5f1f418dd476016
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Wed Jul 18 18:32:34 2018 -0400
f29 requires explicit gcc Build dependency.
diff --git a/cjdns.spec b/cjdns.spec
index 7b43a72..4d1b86a 100644
--- a/cjdns.spec
+++ b/cjdns.spec
@@ -129,7 +129,7 @@ Patch17: cjdns.s390x.patch
BuildRequires: nodejs, nodejs-ronn, python2
# Automated package review hates explicit BR on make, but it *is* needed
-BuildRequires: make
+BuildRequires: make gcc
%if !0%{use_embedded}
# x86_64 and ARM libnacl are not compiled with -fPIC before Fedora release 11.
commit 9da2f5d98614bc560e66208453552515fc81b971
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Wed Jul 18 18:26:00 2018 -0400
Remove CPU specific optimizations for generic build.
diff --git a/cjdns.dyn.patch b/cjdns.dyn.patch
index 9dc22e0..666bd32 100644
--- a/cjdns.dyn.patch
+++ b/cjdns.dyn.patch
@@ -1,7 +1,7 @@
diff -up ./node_build/make.js.dyn ./node_build/make.js
---- ./node_build/make.js.dyn 2016-10-11 17:39:44.000000000 -0400
-+++ ./node_build/make.js 2016-10-14 22:08:23.018241766 -0400
-@@ -252,44 +252,9 @@ Builder.configure({
+--- ./node_build/make.js.dyn 2018-04-18 03:35:41.000000000 -0400
++++ ./node_build/make.js 2018-06-28 13:50:51.922657841 -0400
+@@ -256,48 +256,9 @@ Builder.configure({
}).nThen(function (waitFor) {
@@ -26,13 +26,17 @@ diff -up ./node_build/make.js.dyn ./node_build/make.js
-
- args.unshift(builder.config.optimizeLevel, '-fomit-frame-pointer');
-
+- if (!/^\-O0$/.test(builder.config.optimizeLevel)) {
+- args.unshift('-D_FORTIFY_SOURCE=2');
+- }
+-
- if (CFLAGS) {
- [].push.apply(args, CFLAGS.split(' '));
- }
-
- if (!builder.config.crossCompiling) {
-- if (NO_MARCH_FLAG.indexOf(process.arch) < -1) {
-- builder.config.cflags.push('-march=native');
+- if (NO_MARCH_FLAG.indexOf(process.arch) == -1) {
+- args.unshift('-march=native');
- }
- }
-
@@ -49,7 +53,7 @@ diff -up ./node_build/make.js.dyn ./node_build/make.js
}).nThen(function (waitFor) {
-@@ -430,7 +395,7 @@ Builder.configure({
+@@ -442,7 +403,7 @@ Builder.configure({
builder.buildExecutable('crypto/random/randombytes.c');
builder.lintFiles(function (fileName, file, callback) {
diff --git a/cjdns.spec b/cjdns.spec
index 1858592..7b43a72 100644
--- a/cjdns.spec
+++ b/cjdns.spec
@@ -2,25 +2,40 @@
# Fedora review: http://bugzilla.redhat.com/1268716
# Option to enable SUBNODE mode (WIP)
+# Fedora generally runs on systems that easily support a full node
%bcond_with subnode
# Option to use the optimized libnacl embedded with cjdns
+# Required since v20 due to use of private cnacl APIs
%bcond_without embedded
+# Option to enable CPU specific optimization
+# Default to generic for distro builds
+%bcond_without generic
+# Option to use libsodium instead of nacl (broken since v20)
+%bcond_with libsodium
+# Option to disable SECCOMP: confusing backward logic
+# Needed to run on openvz and other container systems
+%bcond_without seccomp
-%if %{with subnode} || %{with embedded}
+
+%if %{with embedded}
%global use_embedded 1
%else
%global use_embedded 0
%endif
-# Use libsodium instead of nacl
-%global use_libsodium 1
-# Option to disable SECCOMP: confusing backward logic
-%bcond_without seccomp
-%if 0%{use_libsodium}
+%if %{with generic}
+%global generic_build 1
+%else
+%global generic_build 0
+%endif
+
+%if %{with libsodium}
+%global use_libsodium 1
%global nacl_name libsodium
%global nacl_version 1.0.14
%global nacl_lib %{_libdir}/libsodium.so
%else
+%global use_libsodium 0
%global nacl_name nacl
%global nacl_version 20110221
%global nacl_lib %{_libdir}/libnacl.so
@@ -50,7 +65,7 @@
Name: cjdns
# major version is cjdns protocol version:
Version: 20.2
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: The privacy-friendly network without borders
Group: System Environment/Base
# cjdns is all GPLv3 except libuv which is MIT and BSD and ISC
@@ -116,7 +131,7 @@ BuildRequires: nodejs, nodejs-ronn, python2
# Automated package review hates explicit BR on make, but it *is* needed
BuildRequires: make
-%if !%{use_embedded}
+%if !0%{use_embedded}
# x86_64 and ARM libnacl are not compiled with -fPIC before Fedora release 11.
BuildRequires: %{nacl_name}-devel >= %{nacl_version}
%endif
@@ -202,7 +217,9 @@ Python graphing tools for cjdns.
cp %{SOURCE2} contrib/systemd
-%if !%{use_embedded}
+%if 0%{use_embedded}
+# disable CPU opt
+%else !use_embedded
# use system nacl library if provided.
if test -x %{nacl_lib}; then
%if 0%{use_libsodium}
@@ -233,7 +250,9 @@ fi
#patch14 -b .entropy
#patch15 -b .benc
%patch16 -b .python3
+%if 0%{use_embedded}
%patch17 -p1 -b .s390x
+%endif
cp %{SOURCE1} README_Fedora.md
@@ -269,6 +288,14 @@ EOF
chmod a+x cjdns-up.sh
+%if %{generic_build}
+sed -i -e 's/-march=native/-mtune=generic/' node_build/make.js
+rm node_build/dependencies/cnacl/node_build/plans/*_AVX_plan.json
+# Leaving SSE2 code in since x86 is secondary arch and pretty much everyone
+# is going to have SSE2, except things like XO-1 which needs custom build.
+#rm node_build/dependencies/cnacl/node_build/plans/x86_SSE2_plan.json
+%endif
+
# FIXME: grep Version_CURRENT_PROTOCOL util/version/Version.h and
# check that it matches major %%{version}
commit 0cee7087eead87d85c3cdd31d14dfd2480fe8ae8
Merge: 4fcbbff ff61106
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Wed Jul 18 11:18:09 2018 -0400
Merge branch 'master' of ssh://pkgs.fedoraproject.org/rpms/cjdns
diff --cc cjdns.spec
index ac2548d,bedd2bb..1858592
--- a/cjdns.spec
+++ b/cjdns.spec
@@@ -540,8 -545,8 +540,12 @@@ f
%{_bindir}/graphStats
%changelog
- * Fri Jun 22 2018 Stuart Gathman <stuart(a)gathman.org> - 20.2-3
++* Wed Jul 18 2018 Stuart Gathman <stuart(a)gathman.org> - 20.2-4
+- cjdns-20.2 bundles libuv-0.11.19
++- disable CPU specific optimization
++
+ * Thu Jul 12 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 20.2-3
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu May 31 2018 Stuart Gathman <stuart(a)gathman.org> - 20.2-2
- Add cnacl s390x support BZ#1584480
commit ff6110692a9f9224fdc00d4b2cdb8ff3df0da3c7
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Thu Jul 12 21:48:27 2018 +0000
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/cjdns.spec b/cjdns.spec
index b59487b..bedd2bb 100644
--- a/cjdns.spec
+++ b/cjdns.spec
@@ -50,7 +50,7 @@
Name: cjdns
# major version is cjdns protocol version:
Version: 20.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The privacy-friendly network without borders
Group: System Environment/Base
# cjdns is all GPLv3 except libuv which is MIT and BSD and ISC
@@ -545,6 +545,9 @@ fi
%{_bindir}/graphStats
%changelog
+* Thu Jul 12 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 20.2-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
* Thu May 31 2018 Stuart Gathman <stuart(a)gathman.org> - 20.2-2
- Add cnacl s390x support BZ#1584480
commit 4fcbbff9e28a06c88d8b72c34c659c343998ca5e
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Thu Jun 28 13:01:36 2018 -0400
Update bundled libuv version to 0.11.19
diff --git a/cjdns.spec b/cjdns.spec
index b59487b..ac2548d 100644
--- a/cjdns.spec
+++ b/cjdns.spec
@@ -50,7 +50,7 @@
Name: cjdns
# major version is cjdns protocol version:
Version: 20.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The privacy-friendly network without borders
Group: System Environment/Base
# cjdns is all GPLv3 except libuv which is MIT and BSD and ISC
@@ -129,17 +129,12 @@ Requires(preun): systemd
Requires(postun): systemd
%endif
Requires(pre): shadow-utils
-Provides: bundled(libuv) = 0.11.4
+Provides: bundled(libuv) = 0.11.19
%if 0%{use_embedded}
Provides: bundled(nacl) = 20110221
%endif
# build system requires nodejs, unfortunately
ExclusiveArch: %{nodejs_arches}
-%if 0 && 0%{use_embedded}
-# The nodejs build system for embedded cnacl has no "plan" for s390x.
-# It might work to copy another big endian plan like ppc64.
-ExcludeArch: s390x
-%endif
%description
Cjdns implements an encrypted IPv6 network using public-key cryptography for
@@ -545,6 +540,9 @@ fi
%{_bindir}/graphStats
%changelog
+* Fri Jun 22 2018 Stuart Gathman <stuart(a)gathman.org> - 20.2-3
+- cjdns-20.2 bundles libuv-0.11.19
+
* Thu May 31 2018 Stuart Gathman <stuart(a)gathman.org> - 20.2-2
- Add cnacl s390x support BZ#1584480
5 years, 9 months
Architecture specific change in rpms/cjdns.git
by githook-noreply@fedoraproject.org
The package rpms/cjdns.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/cjdns.git/commit/?id=88f1da130053....
Change:
+%ifarch s390x
Thanks.
Full change:
============
commit 88f1da1300534e2de803cfae74bd95da83064d30
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Wed Jul 18 21:42:43 2018 -0400
mtune=generic not supported on s390x
diff --git a/cjdns.spec b/cjdns.spec
index 4d1b86a..6a4f0d5 100644
--- a/cjdns.spec
+++ b/cjdns.spec
@@ -289,7 +289,11 @@ EOF
chmod a+x cjdns-up.sh
%if %{generic_build}
+%ifarch s390x
+sed -i -e 's/-march=native/-mtune=native/' node_build/make.js
+%else
sed -i -e 's/-march=native/-mtune=generic/' node_build/make.js
+%endif
rm node_build/dependencies/cnacl/node_build/plans/*_AVX_plan.json
# Leaving SSE2 code in since x86 is secondary arch and pretty much everyone
# is going to have SSE2, except things like XO-1 which needs custom build.
5 years, 9 months
Architecture specific change in rpms/cjdns.git
by githook-noreply@fedoraproject.org
The package rpms/cjdns.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/cjdns.git/commit/?id=4fcbbff9e28a....
Change:
-ExcludeArch: s390x
Thanks.
Full change:
============
commit 7b61aa8ff0f85f96ecc17c25a5f1f418dd476016
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Wed Jul 18 18:32:34 2018 -0400
f29 requires explicit gcc Build dependency.
diff --git a/cjdns.spec b/cjdns.spec
index 7b43a72..4d1b86a 100644
--- a/cjdns.spec
+++ b/cjdns.spec
@@ -129,7 +129,7 @@ Patch17: cjdns.s390x.patch
BuildRequires: nodejs, nodejs-ronn, python2
# Automated package review hates explicit BR on make, but it *is* needed
-BuildRequires: make
+BuildRequires: make gcc
%if !0%{use_embedded}
# x86_64 and ARM libnacl are not compiled with -fPIC before Fedora release 11.
commit 9da2f5d98614bc560e66208453552515fc81b971
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Wed Jul 18 18:26:00 2018 -0400
Remove CPU specific optimizations for generic build.
diff --git a/cjdns.dyn.patch b/cjdns.dyn.patch
index 9dc22e0..666bd32 100644
--- a/cjdns.dyn.patch
+++ b/cjdns.dyn.patch
@@ -1,7 +1,7 @@
diff -up ./node_build/make.js.dyn ./node_build/make.js
---- ./node_build/make.js.dyn 2016-10-11 17:39:44.000000000 -0400
-+++ ./node_build/make.js 2016-10-14 22:08:23.018241766 -0400
-@@ -252,44 +252,9 @@ Builder.configure({
+--- ./node_build/make.js.dyn 2018-04-18 03:35:41.000000000 -0400
++++ ./node_build/make.js 2018-06-28 13:50:51.922657841 -0400
+@@ -256,48 +256,9 @@ Builder.configure({
}).nThen(function (waitFor) {
@@ -26,13 +26,17 @@ diff -up ./node_build/make.js.dyn ./node_build/make.js
-
- args.unshift(builder.config.optimizeLevel, '-fomit-frame-pointer');
-
+- if (!/^\-O0$/.test(builder.config.optimizeLevel)) {
+- args.unshift('-D_FORTIFY_SOURCE=2');
+- }
+-
- if (CFLAGS) {
- [].push.apply(args, CFLAGS.split(' '));
- }
-
- if (!builder.config.crossCompiling) {
-- if (NO_MARCH_FLAG.indexOf(process.arch) < -1) {
-- builder.config.cflags.push('-march=native');
+- if (NO_MARCH_FLAG.indexOf(process.arch) == -1) {
+- args.unshift('-march=native');
- }
- }
-
@@ -49,7 +53,7 @@ diff -up ./node_build/make.js.dyn ./node_build/make.js
}).nThen(function (waitFor) {
-@@ -430,7 +395,7 @@ Builder.configure({
+@@ -442,7 +403,7 @@ Builder.configure({
builder.buildExecutable('crypto/random/randombytes.c');
builder.lintFiles(function (fileName, file, callback) {
diff --git a/cjdns.spec b/cjdns.spec
index 1858592..7b43a72 100644
--- a/cjdns.spec
+++ b/cjdns.spec
@@ -2,25 +2,40 @@
# Fedora review: http://bugzilla.redhat.com/1268716
# Option to enable SUBNODE mode (WIP)
+# Fedora generally runs on systems that easily support a full node
%bcond_with subnode
# Option to use the optimized libnacl embedded with cjdns
+# Required since v20 due to use of private cnacl APIs
%bcond_without embedded
+# Option to enable CPU specific optimization
+# Default to generic for distro builds
+%bcond_without generic
+# Option to use libsodium instead of nacl (broken since v20)
+%bcond_with libsodium
+# Option to disable SECCOMP: confusing backward logic
+# Needed to run on openvz and other container systems
+%bcond_without seccomp
-%if %{with subnode} || %{with embedded}
+
+%if %{with embedded}
%global use_embedded 1
%else
%global use_embedded 0
%endif
-# Use libsodium instead of nacl
-%global use_libsodium 1
-# Option to disable SECCOMP: confusing backward logic
-%bcond_without seccomp
-%if 0%{use_libsodium}
+%if %{with generic}
+%global generic_build 1
+%else
+%global generic_build 0
+%endif
+
+%if %{with libsodium}
+%global use_libsodium 1
%global nacl_name libsodium
%global nacl_version 1.0.14
%global nacl_lib %{_libdir}/libsodium.so
%else
+%global use_libsodium 0
%global nacl_name nacl
%global nacl_version 20110221
%global nacl_lib %{_libdir}/libnacl.so
@@ -50,7 +65,7 @@
Name: cjdns
# major version is cjdns protocol version:
Version: 20.2
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: The privacy-friendly network without borders
Group: System Environment/Base
# cjdns is all GPLv3 except libuv which is MIT and BSD and ISC
@@ -116,7 +131,7 @@ BuildRequires: nodejs, nodejs-ronn, python2
# Automated package review hates explicit BR on make, but it *is* needed
BuildRequires: make
-%if !%{use_embedded}
+%if !0%{use_embedded}
# x86_64 and ARM libnacl are not compiled with -fPIC before Fedora release 11.
BuildRequires: %{nacl_name}-devel >= %{nacl_version}
%endif
@@ -202,7 +217,9 @@ Python graphing tools for cjdns.
cp %{SOURCE2} contrib/systemd
-%if !%{use_embedded}
+%if 0%{use_embedded}
+# disable CPU opt
+%else !use_embedded
# use system nacl library if provided.
if test -x %{nacl_lib}; then
%if 0%{use_libsodium}
@@ -233,7 +250,9 @@ fi
#patch14 -b .entropy
#patch15 -b .benc
%patch16 -b .python3
+%if 0%{use_embedded}
%patch17 -p1 -b .s390x
+%endif
cp %{SOURCE1} README_Fedora.md
@@ -269,6 +288,14 @@ EOF
chmod a+x cjdns-up.sh
+%if %{generic_build}
+sed -i -e 's/-march=native/-mtune=generic/' node_build/make.js
+rm node_build/dependencies/cnacl/node_build/plans/*_AVX_plan.json
+# Leaving SSE2 code in since x86 is secondary arch and pretty much everyone
+# is going to have SSE2, except things like XO-1 which needs custom build.
+#rm node_build/dependencies/cnacl/node_build/plans/x86_SSE2_plan.json
+%endif
+
# FIXME: grep Version_CURRENT_PROTOCOL util/version/Version.h and
# check that it matches major %%{version}
commit 0cee7087eead87d85c3cdd31d14dfd2480fe8ae8
Merge: 4fcbbff ff61106
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Wed Jul 18 11:18:09 2018 -0400
Merge branch 'master' of ssh://pkgs.fedoraproject.org/rpms/cjdns
diff --cc cjdns.spec
index ac2548d,bedd2bb..1858592
--- a/cjdns.spec
+++ b/cjdns.spec
@@@ -540,8 -545,8 +540,12 @@@ f
%{_bindir}/graphStats
%changelog
- * Fri Jun 22 2018 Stuart Gathman <stuart(a)gathman.org> - 20.2-3
++* Wed Jul 18 2018 Stuart Gathman <stuart(a)gathman.org> - 20.2-4
+- cjdns-20.2 bundles libuv-0.11.19
++- disable CPU specific optimization
++
+ * Thu Jul 12 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 20.2-3
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu May 31 2018 Stuart Gathman <stuart(a)gathman.org> - 20.2-2
- Add cnacl s390x support BZ#1584480
commit 4fcbbff9e28a06c88d8b72c34c659c343998ca5e
Author: Stuart D. Gathman <stuart(a)gathman.org>
Date: Thu Jun 28 13:01:36 2018 -0400
Update bundled libuv version to 0.11.19
diff --git a/cjdns.spec b/cjdns.spec
index b59487b..ac2548d 100644
--- a/cjdns.spec
+++ b/cjdns.spec
@@ -50,7 +50,7 @@
Name: cjdns
# major version is cjdns protocol version:
Version: 20.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The privacy-friendly network without borders
Group: System Environment/Base
# cjdns is all GPLv3 except libuv which is MIT and BSD and ISC
@@ -129,17 +129,12 @@ Requires(preun): systemd
Requires(postun): systemd
%endif
Requires(pre): shadow-utils
-Provides: bundled(libuv) = 0.11.4
+Provides: bundled(libuv) = 0.11.19
%if 0%{use_embedded}
Provides: bundled(nacl) = 20110221
%endif
# build system requires nodejs, unfortunately
ExclusiveArch: %{nodejs_arches}
-%if 0 && 0%{use_embedded}
-# The nodejs build system for embedded cnacl has no "plan" for s390x.
-# It might work to copy another big endian plan like ppc64.
-ExcludeArch: s390x
-%endif
%description
Cjdns implements an encrypted IPv6 network using public-key cryptography for
@@ -545,6 +540,9 @@ fi
%{_bindir}/graphStats
%changelog
+* Fri Jun 22 2018 Stuart Gathman <stuart(a)gathman.org> - 20.2-3
+- cjdns-20.2 bundles libuv-0.11.19
+
* Thu May 31 2018 Stuart Gathman <stuart(a)gathman.org> - 20.2-2
- Add cnacl s390x support BZ#1584480
5 years, 9 months
Architecture specific change in rpms/community-mysql.git
by githook-noreply@fedoraproject.org
The package rpms/community-mysql.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/community-mysql.git/commit/?id=c8....
Change:
+%ifarch aarch64
Thanks.
Full change:
============
commit c8f4ec8188a529525ffce5b1e543ef5781e65916
Author: Honza Horak <hhorak(a)redhat.com>
Date: Wed Jul 18 18:32:48 2018 +0200
Disable the lately added tests on aarch64, not arm
diff --git a/community-mysql.spec b/community-mysql.spec
index 8fe578e..c0ce3cb 100644
--- a/community-mysql.spec
+++ b/community-mysql.spec
@@ -420,6 +420,10 @@ add_test perfschema.func_file_io : missing hw on arm32
add_test perfschema.setup_objects : missing hw on arm32
add_test perfschema.global_read_lock : missing hw on arm32
add_test perfschema.func_mutex : missing hw on arm32
+%endif
+
+# these tests fail on aarch64
+%ifarch aarch64
add_test import_5_7 : 8.0 issue/aarch64
add_test sdi : 8.0 issue/aarch64
add_test dd_upgrade_partition : 8.0 issue/aarch64
5 years, 9 months
Architecture specific change in rpms/libmodulemd.git
by githook-noreply@fedoraproject.org
The package rpms/libmodulemd.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/libmodulemd.git/commit/?id=aea038....
Change:
+%ifarch %{power64}
Thanks.
Full change:
============
commit 247d91a9a5bba1b9ac297dfcb59b41dfd925be0a
Author: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Wed Jul 18 09:33:30 2018 -0400
Drop unused patch
Signed-off-by: Stephen Gallagher <sgallagh(a)redhat.com>
diff --git a/0001-Allocate-Modulemd.props.buildopts-at-object-creation.patch b/0001-Allocate-Modulemd.props.buildopts-at-object-creation.patch
deleted file mode 100644
index 7f2a717..0000000
--- a/0001-Allocate-Modulemd.props.buildopts-at-object-creation.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 0039d41002629342e245d43350702b502aabe3f1 Mon Sep 17 00:00:00 2001
-From: Stephen Gallagher <sgallagh(a)redhat.com>
-Date: Fri, 22 Jun 2018 13:26:01 -0400
-Subject: [PATCH] Allocate Modulemd.props.buildopts at object creation
-
-Resolves: https://github.com/fedora-modularity/libmodulemd/issues/72
-
-Signed-off-by: Stephen Gallagher <sgallagh(a)redhat.com>
----
- modulemd/modulemd-module.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/modulemd/modulemd-module.c b/modulemd/modulemd-module.c
-index 9eb391a4ff82f4b1b2f660276cb3f46962f774b7..49c4818a9130c7af31d4abf0cbbb898f06d779a3 100644
---- a/modulemd/modulemd-module.c
-+++ b/modulemd/modulemd-module.c
-@@ -3460,10 +3460,12 @@ modulemd_module_class_init (ModulemdModuleClass *klass)
-
- static void
- modulemd_module_init (ModulemdModule *self)
- {
- /* Allocate the members */
-+ self->buildopts = modulemd_buildopts_new ();
-+
- self->buildrequires =
- g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
-
- self->module_components =
- g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
---
-2.17.1
-
commit aea038eeabe0cbfc2ee7a4d8a7fbcee9a2a86c82
Author: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Tue Jul 3 11:51:08 2018 -0400
Update to 1.6.0
Signed-off-by: Stephen Gallagher <sgallagh(a)redhat.com>
diff --git a/.gitignore b/.gitignore
index 80e98b9..d38aa68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@
/modulemd-1.5.0.tar.xz
/modulemd-1.5.1.tar.xz
/modulemd-1.5.2.tar.xz
+/modulemd-1.6.0.tar.xz
diff --git a/libmodulemd.spec b/libmodulemd.spec
index ebf0146..8532a34 100644
--- a/libmodulemd.spec
+++ b/libmodulemd.spec
@@ -1,12 +1,12 @@
%global majorversion 1
-%global minorversion 5
-%global patchversion 2
+%global minorversion 6
+%global patchversion 0
%global majorminorversion %{majorversion}.%{minorversion}
%global nsversion %{majorversion}.0
Name: libmodulemd
Version: %{majorminorversion}%{?patchversion:.%{patchversion}}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: Module metadata manipulation library
License: MIT
@@ -20,6 +20,7 @@ BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(yaml-0.1)
BuildRequires: pkgconfig(gtk-doc)
BuildRequires: python3-gobject-base
+BuildRequires: valgrind
# Patches
@@ -43,7 +44,15 @@ Development files for libmodulemd.
%meson_build
%check
+
export LC_CTYPE=C.utf8
+
+%ifarch %{power64}
+# Valgrind is broken on ppc64[le] with GCC7:
+# https://bugs.kde.org/show_bug.cgi?id=386945
+export MMD_SKIP_VALGRIND=1
+%endif
+
%meson_test
%install
@@ -67,9 +76,24 @@ export LC_CTYPE=C.utf8
%{_datadir}/gir-1.0/Modulemd-%{nsversion}.gir
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
-%{_datadir}/gtk-doc/html/modulemd/
+%{_datadir}/gtk-doc/html/modulemd-1.0/
%changelog
+* Wed Jul 18 2018 Stephen Gallagher <sgallagh(a)redhat.com> - 1.6.0-1
+- Update to 1.6.0
+- Adds Modulemd.ModuleStream object, deprecating Modulemd.Module
+- Adds Modulemd.Translation and Modulemd.TranslationEntry objects
+- Adds Modulemd.ImprovedModule object that collects streams, defaults and
+ translations together
+- Adds new Modulemd.index_from_*() funtions to get a hash table of
+ Modulemd.ImprovedModule objects for easier searching
+- Moves function documentation to the public headers
+- Corrects the license headers to MIT (they were incorrectly listed as MITNFA
+ in previous releases)
+- Makes the "eol" field optional for Modulemd.ServiceLevel
+- Clean up HTML documentation
+- Fixes a type error on 32-bit systems
+
* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
diff --git a/sources b/sources
index 1f3a110..5f7d2f9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (modulemd-1.5.2.tar.xz) = ba368712c37cdf7ff72649efa7ef165d4e38522909471d106a4f39e57f20fc437aaa7d0200516cea373eb83779a6abb53377306ea99d0c901f4f647d47ab8f00
+SHA512 (modulemd-1.6.0.tar.xz) = 76fb0e1c8fd2bc66ec68740ac177705746834eac15291d326339b186b9f7dd5c42f1c870963e65f29b68eb25538a5f015995b5a10db099c2ffa867911fb69481
commit 5d6ef73e7e72f4f163072f05b4eab1c2ae966a76
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Fri Jul 13 08:27:19 2018 +0000
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/libmodulemd.spec b/libmodulemd.spec
index 31d9480..ebf0146 100644
--- a/libmodulemd.spec
+++ b/libmodulemd.spec
@@ -6,7 +6,7 @@
Name: libmodulemd
Version: %{majorminorversion}%{?patchversion:.%{patchversion}}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Module metadata manipulation library
License: MIT
@@ -70,6 +70,9 @@ export LC_CTYPE=C.utf8
%{_datadir}/gtk-doc/html/modulemd/
%changelog
+* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.5.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
* Sat Jun 23 2018 Stephen Gallagher <sgallagh(a)redhat.com> - 1.5.2-1
- Update to libdmodulemd 1.5.2
- Don't free uninitialized memory
5 years, 9 months
Architecture specific change in rpms/libmodulemd.git
by githook-noreply@fedoraproject.org
The package rpms/libmodulemd.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/libmodulemd.git/commit/?id=aea038....
Change:
+%ifarch %{power64}
Thanks.
Full change:
============
commit 247d91a9a5bba1b9ac297dfcb59b41dfd925be0a
Author: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Wed Jul 18 09:33:30 2018 -0400
Drop unused patch
Signed-off-by: Stephen Gallagher <sgallagh(a)redhat.com>
diff --git a/0001-Allocate-Modulemd.props.buildopts-at-object-creation.patch b/0001-Allocate-Modulemd.props.buildopts-at-object-creation.patch
deleted file mode 100644
index 7f2a717..0000000
--- a/0001-Allocate-Modulemd.props.buildopts-at-object-creation.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 0039d41002629342e245d43350702b502aabe3f1 Mon Sep 17 00:00:00 2001
-From: Stephen Gallagher <sgallagh(a)redhat.com>
-Date: Fri, 22 Jun 2018 13:26:01 -0400
-Subject: [PATCH] Allocate Modulemd.props.buildopts at object creation
-
-Resolves: https://github.com/fedora-modularity/libmodulemd/issues/72
-
-Signed-off-by: Stephen Gallagher <sgallagh(a)redhat.com>
----
- modulemd/modulemd-module.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/modulemd/modulemd-module.c b/modulemd/modulemd-module.c
-index 9eb391a4ff82f4b1b2f660276cb3f46962f774b7..49c4818a9130c7af31d4abf0cbbb898f06d779a3 100644
---- a/modulemd/modulemd-module.c
-+++ b/modulemd/modulemd-module.c
-@@ -3460,10 +3460,12 @@ modulemd_module_class_init (ModulemdModuleClass *klass)
-
- static void
- modulemd_module_init (ModulemdModule *self)
- {
- /* Allocate the members */
-+ self->buildopts = modulemd_buildopts_new ();
-+
- self->buildrequires =
- g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
-
- self->module_components =
- g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
---
-2.17.1
-
commit aea038eeabe0cbfc2ee7a4d8a7fbcee9a2a86c82
Author: Stephen Gallagher <sgallagh(a)redhat.com>
Date: Tue Jul 3 11:51:08 2018 -0400
Update to 1.6.0
Signed-off-by: Stephen Gallagher <sgallagh(a)redhat.com>
diff --git a/.gitignore b/.gitignore
index 80e98b9..d38aa68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,4 @@
/modulemd-1.5.0.tar.xz
/modulemd-1.5.1.tar.xz
/modulemd-1.5.2.tar.xz
+/modulemd-1.6.0.tar.xz
diff --git a/libmodulemd.spec b/libmodulemd.spec
index ebf0146..8532a34 100644
--- a/libmodulemd.spec
+++ b/libmodulemd.spec
@@ -1,12 +1,12 @@
%global majorversion 1
-%global minorversion 5
-%global patchversion 2
+%global minorversion 6
+%global patchversion 0
%global majorminorversion %{majorversion}.%{minorversion}
%global nsversion %{majorversion}.0
Name: libmodulemd
Version: %{majorminorversion}%{?patchversion:.%{patchversion}}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: Module metadata manipulation library
License: MIT
@@ -20,6 +20,7 @@ BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(yaml-0.1)
BuildRequires: pkgconfig(gtk-doc)
BuildRequires: python3-gobject-base
+BuildRequires: valgrind
# Patches
@@ -43,7 +44,15 @@ Development files for libmodulemd.
%meson_build
%check
+
export LC_CTYPE=C.utf8
+
+%ifarch %{power64}
+# Valgrind is broken on ppc64[le] with GCC7:
+# https://bugs.kde.org/show_bug.cgi?id=386945
+export MMD_SKIP_VALGRIND=1
+%endif
+
%meson_test
%install
@@ -67,9 +76,24 @@ export LC_CTYPE=C.utf8
%{_datadir}/gir-1.0/Modulemd-%{nsversion}.gir
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
-%{_datadir}/gtk-doc/html/modulemd/
+%{_datadir}/gtk-doc/html/modulemd-1.0/
%changelog
+* Wed Jul 18 2018 Stephen Gallagher <sgallagh(a)redhat.com> - 1.6.0-1
+- Update to 1.6.0
+- Adds Modulemd.ModuleStream object, deprecating Modulemd.Module
+- Adds Modulemd.Translation and Modulemd.TranslationEntry objects
+- Adds Modulemd.ImprovedModule object that collects streams, defaults and
+ translations together
+- Adds new Modulemd.index_from_*() funtions to get a hash table of
+ Modulemd.ImprovedModule objects for easier searching
+- Moves function documentation to the public headers
+- Corrects the license headers to MIT (they were incorrectly listed as MITNFA
+ in previous releases)
+- Makes the "eol" field optional for Modulemd.ServiceLevel
+- Clean up HTML documentation
+- Fixes a type error on 32-bit systems
+
* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
diff --git a/sources b/sources
index 1f3a110..5f7d2f9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (modulemd-1.5.2.tar.xz) = ba368712c37cdf7ff72649efa7ef165d4e38522909471d106a4f39e57f20fc437aaa7d0200516cea373eb83779a6abb53377306ea99d0c901f4f647d47ab8f00
+SHA512 (modulemd-1.6.0.tar.xz) = 76fb0e1c8fd2bc66ec68740ac177705746834eac15291d326339b186b9f7dd5c42f1c870963e65f29b68eb25538a5f015995b5a10db099c2ffa867911fb69481
commit 5d6ef73e7e72f4f163072f05b4eab1c2ae966a76
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Fri Jul 13 08:27:19 2018 +0000
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>
diff --git a/libmodulemd.spec b/libmodulemd.spec
index 31d9480..ebf0146 100644
--- a/libmodulemd.spec
+++ b/libmodulemd.spec
@@ -6,7 +6,7 @@
Name: libmodulemd
Version: %{majorminorversion}%{?patchversion:.%{patchversion}}
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Module metadata manipulation library
License: MIT
@@ -70,6 +70,9 @@ export LC_CTYPE=C.utf8
%{_datadir}/gtk-doc/html/modulemd/
%changelog
+* Fri Jul 13 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 1.5.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
* Sat Jun 23 2018 Stephen Gallagher <sgallagh(a)redhat.com> - 1.5.2-1
- Update to libdmodulemd 1.5.2
- Don't free uninitialized memory
5 years, 9 months