Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libyui-qt-rest-api for openSUSE:Factory checked in at 2021-02-26 21:58:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libyui-qt-rest-api (Old) and /work/SRC/openSUSE:Factory/.libyui-qt-rest-api.new.2378 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui-qt-rest-api" Fri Feb 26 21:58:16 2021 rev:9 rq:872582 version:4.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libyui-qt-rest-api/libyui-qt-rest-api.changes 2020-12-01 14:21:34.577514757 +0100 +++ /work/SRC/openSUSE:Factory/.libyui-qt-rest-api.new.2378/libyui-qt-rest-api.changes 2021-02-26 21:58:19.223761220 +0100 @@ -1,0 +2,13 @@ +Mon Feb 15 15:25:55 UTC 2021 - Stefan Hundhammer <[email protected]> + +- Require libyui-qt (bsc#1181653) +- 4.0.1 + +------------------------------------------------------------------- +Mon Feb 1 14:59:19 UTC 2021 - Stefan Hundhammer <[email protected]> + +- New CMake build environment (bsc#1181653) +- Bumped SO version to 15 +- 4.0.0 + +------------------------------------------------------------------- Old: ---- libyui-qt-rest-api-0.2.4.tar.bz2 New: ---- libyui-qt-rest-api-4.0.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libyui-qt-rest-api.spec ++++++ --- /var/tmp/diff_new_pack.PfI5rj/_old 2021-02-26 21:58:19.723761659 +0100 +++ /var/tmp/diff_new_pack.PfI5rj/_new 2021-02-26 21:58:19.727761663 +0100 @@ -1,7 +1,7 @@ # # spec file for package libyui-qt-rest-api # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,49 +16,47 @@ # -%define so_version 14 -%define bin_name %{name}%{so_version} -%define libyui_devel_version libyui-devel >= 3.10.1 - Name: libyui-qt-rest-api -Version: 0.2.4 + +# DO NOT manually bump the version here; instead, use rake version:bump +Version: 4.0.1 Release: 0 -Summary: Libyui - The REST API plugin for the Qt frontend -License: LGPL-2.1-only OR LGPL-3.0-only -Group: System/Libraries -URL: http://github.com/libyui/libyui-qt-rest-api -Source: %{name}-%{version}.tar.bz2 + +%define so_version 15 +%define libyui_devel_version libyui-devel >= 3.10.1 +%define bin_name %{name}%{so_version} BuildRequires: %{libyui_devel_version} -BuildRequires: cmake >= 2.8 -BuildRequires: fontconfig-devel +BuildRequires: boost-devel +BuildRequires: cmake >= 3.10 BuildRequires: gcc-c++ BuildRequires: libyui-qt-devel BuildRequires: libyui-rest-api-devel + BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5X11Extras) -%if 0%{?suse_version} > 1325 -BuildRequires: libboost_headers-devel -BuildRequires: libboost_test-devel -%else -BuildRequires: boost-devel -%endif + +Summary: Libyui - The REST API plugin for the Qt frontend +License: LGPL-2.1-only OR LGPL-3.0-only +URL: http://github.com/libyui/ +Source: %{name}-%{version}.tar.bz2 %description -This package provides a libyui REST API plugin. +This package provides a libyui REST API plugin for the Qt frontend. It allows inspecting and controlling the UI remotely via -an HTTP REST API, it is designed for automated tests. +an HTTP REST API. This is designed for automated tests. + %package -n %{bin_name} Summary: Libyui - The REST API plugin for the Qt frontend -Group: System/Libraries -URL: http://github.com/libyui/libyui-qt-rest-api + Requires: libyui%{so_version} +Requires: libyui-qt%{so_version} Requires: libyui-rest-api%{so_version} Requires: yui_backend = %{so_version} Provides: %{name} = %{version} @@ -68,58 +66,58 @@ This package provides a libyui REST API plugin for the Qt frontend. It allows inspecting and controlling the UI remotely via -an HTTP REST API, it is designed for automated tests. +an HTTP REST API. This is designed for automated tests. + %package devel -Summary: Libyui header files -Group: Development/Languages/C and C++ -URL: http://github.com/libyui/libyui-qt-rest-api -BuildRequires: libyui-rest-api-devel +Summary: Libyui - Header files for the Qt REST API plugin + Requires: %{bin_name} = %{version} Requires: glibc-devel Requires: libstdc++-devel Requires: libyui-qt-devel Requires: libyui-rest-api-devel -%if 0%{?suse_version} > 1325 -Requires: libboost_headers-devel -Requires: libboost_test-devel -%else -Requires: boost-devel -%endif %description devel -This package provides a libyui REST API plugin for the Qt frontend. +This provides a libyui REST API plugin for the Qt frontend. + +This package contains the header files for the plugin. + +This is not needed for using the REST API, only for developing +extensions for it. -This is a development subpackage. %prep %setup -q %build -export CFLAGS="%{optflags} -DNDEBUG" -export CXXFLAGS="%{optflags} -DNDEBUG" +export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG" +export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG" -./bootstrap.sh %{_prefix} +mkdir build +cd build -# NOTE: %%cmake changes the CWD to "build" which is later expected by -# %%cmake_build, be careful when running additional commands later... -%cmake -DYPREFIX=%{_prefix} \ - -DDOC_DIR=%{_docdir} \ - -DLIB_DIR=%{_lib} \ %if %{?_with_debug:1}%{!?_with_debug:0} - -DCMAKE_BUILD_TYPE=RELWITHDEBINFO +CMAKE_OPTS="-DCMAKE_BUILD_TYPE=RELWITHDEBINFO" %else - -DCMAKE_BUILD_TYPE=RELEASE +CMAKE_OPTS="-DCMAKE_BUILD_TYPE=RELEASE" %endif -%cmake_build +cmake .. \ + -DDOC_DIR=%{_docdir} \ + -DLIB_DIR=%{_lib} \ + $CMAKE_OPTS + +make %{?jobs:-j%jobs} %install -%cmake_install -install -m0755 -d %{buildroot}/%{_docdir}/%{bin_name}/ + +cd build +make install DESTDIR="$RPM_BUILD_ROOT" install -m0755 -d %{buildroot}/%{_libdir}/yui -install -m0644 COPYING* %{buildroot}/%{_docdir}/%{bin_name}/ +install -m0755 -d %{buildroot}/%{_docdir}/%{bin_name}/ +install -m0644 ../COPYING* %{buildroot}/%{_docdir}/%{bin_name}/ %post -n %{bin_name} -p /sbin/ldconfig %postun -n %{bin_name} -p /sbin/ldconfig @@ -131,10 +129,7 @@ %license %{_docdir}/%{bin_name}/COPYING* %files devel -%dir %{_docdir}/%{bin_name} %{_libdir}/yui/lib*.so -%{_includedir}/yui -%{_libdir}/pkgconfig/%{name}.pc -%{_libdir}/cmake/%{name} +%{_includedir}/yui/qt-rest-api %changelog ++++++ libyui-qt-rest-api-0.2.4.tar.bz2 -> libyui-qt-rest-api-4.0.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/CMakeLists.txt new/libyui-qt-rest-api-4.0.1/CMakeLists.txt --- old/libyui-qt-rest-api-0.2.4/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/CMakeLists.txt 2021-02-15 16:41:37.000000000 +0100 @@ -0,0 +1,60 @@ +# CMakeLists.txt for libyui-qt-rest-api +# +# Usage: +# +# mkdir build +# cd build +# cmake .. +# +# make +# sudo make install +# +# Restart with a clean build environment: +# rm -rf build +# +# Show the complete compiler commands with all arguments: +# make VERBOSE=1 + +cmake_minimum_required( VERSION 3.10 ) +project( libyui-qt-rest-api ) + +# Options usage: +# +# cmake -DBUILD_DOC=on -DBUILD_EXAMPLES=off .. + +option( BUILD_SRC "Build in src/ subdirectory" on ) +option( BUILD_DOC "Build class documentation" off ) +option( WERROR "Treat all compiler warnings as errors" on ) + +# Non-boolean options +set( DOC_DESTDIR "" CACHE STRING "Destination directory prefix for installing docs" ) + +#---------------------------------------------------------------------- + + +# As of now, no support for /usr/local instead of /usr. But CMake DESTDIR works. +set( CMAKE_INSTALL_PREFIX /usr ) + +set( CMAKE_INSTALL_MESSAGE LAZY ) # Suppress "up-to-date" messages during "make install" + + +# Initialize compiler flags for all targets in all subdirectories +add_compile_options( "-Wall" ) +add_compile_options( "-Os" ) # Optimize for size (overrides CMake's -O3 in RELEASE builds) + +if ( WERROR ) + add_compile_options( "-Werror" ) +endif() + + +# +# Descend into subdirectories +# + +if ( BUILD_SRC ) + add_subdirectory( src ) +endif() + +if ( BUILD_DOC ) + add_subdirectory( doc ) +endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/Makefile.cvs new/libyui-qt-rest-api-4.0.1/Makefile.cvs --- old/libyui-qt-rest-api-0.2.4/Makefile.cvs 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/Makefile.cvs 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -# -# Makefile.cvs -# - -all: configure - -configure: clean - ./bootstrap.sh ; \ - mkdir build ; \ - cd build ; \ - cmake -DCMAKE_BUILD_TYPE=RELEASE .. - -install: configure - cd build ; \ - make && make install - -reconf: - cd build ; \ - cmake rebuild_cache - -clean: - rm -rf build \ - CMakeLists.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/Makefile.repo new/libyui-qt-rest-api-4.0.1/Makefile.repo --- old/libyui-qt-rest-api-0.2.4/Makefile.repo 1970-01-01 01:00:00.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/Makefile.repo 2021-02-15 16:41:37.000000000 +0100 @@ -0,0 +1,63 @@ +# +# Makefile.repo for libyui-qt-rest-api +# + +# Local Variables: +# mode: Makefile +# End: + + +all: clean configure build-hint + +build-hint: + @echo "" + @echo "To build:" + @echo "" + @echo " cd build" + @echo " make" + @echo "" + +configure: + mkdir build; \ + cd build; \ + cmake .. + +build: clean configure + cd build; \ + make -j $$(nproc) + +# This needs root privileges, of course +install: configure + cd build; \ + make -j $$(nproc) && make install + +clean: + rm -rf build + +package: + rake package + +doc: + test -d build || mkdir build + cd build; \ + cmake -DBUILD_DOC=on .. ; \ + make doc + +install-doc: doc + cd build; \ + make install-doc + +version-bump: + rake version:bump + +# Just an alias +bump-version: version-bump + + +# Enforce rebuilding some targets unconditionally, even if a file or directory +# with that name exists; otherwise the timestamp of that file or directory +# would be checked. +# +# We need this because we have a subdirectory doc/, a subdirectory package/ +# and possibly a subdirectory build/ here. +.PHONY: doc package build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/PROJECTINFO.cmake new/libyui-qt-rest-api-4.0.1/PROJECTINFO.cmake --- old/libyui-qt-rest-api-0.2.4/PROJECTINFO.cmake 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/PROJECTINFO.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -##### PROJECTINFO for CMake - -SET( BASELIB "yui" ) # don't change this - -##### MAKE ALL NEEDED CHANGES HERE ##### - -SET( PLUGINNAME qt-rest-api ) -SET( SUBDIRS src ) -SET( LIB_DEPS Qt5Core Qt5Gui Qt5Widgets Qt5Svg Qt5X11Extras ) # define the plugin's dependecies CMake should look for separated with spaces; libyui-internal deps go in the next line -SET( LIB_LINKER dl pthread ) # define the libs to link against with their -l name for separated with spaces, e.g. pthread dl; include libyui or it's plugins (if needed), too! -SET( EXTRA_INCLUDES ) # set include-dir which are not picked by CMake automagically here. -SET( INTERNAL_DEPS Libyui Libyui-rest-api Libyui-qt ) -SET( URL "http://github.com/libyui/" ) -SET( SUMMARY "GUI-abstraction library - the REST API bindings for the Qt UI plugin" ) -SET( DESCRIPTION "This is the REST API plugin for the Qt UI." ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/Rakefile new/libyui-qt-rest-api-4.0.1/Rakefile --- old/libyui-qt-rest-api-0.2.4/Rakefile 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/Rakefile 2021-02-15 16:41:37.000000000 +0100 @@ -1,6 +1,16 @@ -# -*- coding: utf-8 -*- -# make continuous integration using rubygem-packaging_rake_tasks and -# rubygem-libyui-rake. -# Copyright ?? 2014 SUSE LLC - +#-- +# Copyright (c) 2015-2019 SUSE LLC +# Copyright (c) 2020-2021 SUSE LLC +# +# make continuous integration using rubygem-libyui-rake. +# +# MIT license +#++ require "libyui/rake" + +Libyui::Tasks.configuration do |conf| + include Libyui::Tasks::Helpers + + conf.skip_license_check << /^Makefile\.repo$/ + conf.skip_license_check << /CMakeLists\.txt$/ +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/SOURCECONF.cmake new/libyui-qt-rest-api-4.0.1/SOURCECONF.cmake --- old/libyui-qt-rest-api-0.2.4/SOURCECONF.cmake 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/SOURCECONF.cmake 1970-01-01 01:00:00.000000000 +0100 @@ -1,13 +0,0 @@ -SET( ${TARGETLIB}_SOURCES - YQHttpUI.cc - YQHttpWidgetsActionHandler.cc - YQTableActionHandler.cc - YQWidgetActionHandler.cc -) - -SET( ${TARGETLIB}_HEADERS - YQHttpUI.h - YQHttpWidgetsActionHandler.h - YQTableActionHandler.h - YQWidgetActionHandler.h -) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/VERSION.cmake new/libyui-qt-rest-api-4.0.1/VERSION.cmake --- old/libyui-qt-rest-api-0.2.4/VERSION.cmake 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/VERSION.cmake 2021-02-15 16:41:37.000000000 +0100 @@ -1,14 +1,9 @@ -SET( VERSION_MAJOR "0") -SET( VERSION_MINOR "2" ) -SET( VERSION_PATCH "4" ) -SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" ) +SET( VERSION_MAJOR "4") +SET( VERSION_MINOR "0" ) +SET( VERSION_PATCH "1" ) +SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" ) -##### This is need for the libyui core ONLY. -##### These will be overridden from exports in LibyuiConfig.cmake -# Currently you must also change so_version in libyui.spec -# *and also in **all** other* libyui-*.spec files in the other repositories. -# Yes, such a design is suboptimal. -SET( SONAME_MAJOR "0" ) +SET( SONAME_MAJOR "15" ) SET( SONAME_MINOR "0" ) SET( SONAME_PATCH "0" ) SET( SONAME "${SONAME_MAJOR}.${SONAME_MINOR}.${SONAME_PATCH}" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/bootstrap.sh new/libyui-qt-rest-api-4.0.1/bootstrap.sh --- old/libyui-qt-rest-api-0.2.4/bootstrap.sh 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/bootstrap.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,26 +0,0 @@ -#!/bin/sh -set -e - -prefix="/usr" - -if [ ! -z $1 ] -then - prefix="$1" -fi - -cmake_common="$prefix/share/libyui/buildtools/CMakeLists.common" -cmake_target="./CMakeLists.txt" - -echo "checking for $cmake_common..." - -if [ -f "$cmake_common" ] -then - ln -fs "$cmake_common" "$cmake_target" - echo "OK: linked to `pwd`/$cmake_target." -else - echo " Use must have libyui(-devel) >= 3.0.4 installed" - echo " in \"$prefix\" first !!!" - exit 1 -fi - -exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/doc/CMakeLists.txt new/libyui-qt-rest-api-4.0.1/doc/CMakeLists.txt --- old/libyui-qt-rest-api-0.2.4/doc/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/doc/CMakeLists.txt 2021-02-15 16:41:37.000000000 +0100 @@ -0,0 +1,42 @@ +# CMakeLists.txt for libyui-qt-rest-api/doc + +include( ../VERSION.cmake ) + +find_package( Doxygen REQUIRED dot ) + + +set( PKG_NAME libyui-qt-rest-api${SONAME_MAJOR} ) +set( DOC_INSTALL_DIR ${DOC_DESTDIR}/usr/share/doc/packages/${PKG_NAME} ) + + +# +# Doxygen-generated autodocs +# + +if ( DOXYGEN_FOUND ) + + set( DOXYGEN_GENERATE_TREEVIEW yes ) # Enable views tree HTML frame + set( DOXYGEN_QUIET yes ) # Less verbose output + set( DOXYGEN_WARN_LOGFILE doxygen-warnings.log ) + # See build/CMakeDoxyfile.in for more supported variables + + doxygen_add_docs( doc ../src ) + +else() + message( WARNING "Missing doxygen package" ) +endif() + + +# Define a new custom make target "install-doc". +# Notice that we can't use DESTDIR here since CMake only sets that +# for "make install", not for this custom "make install-doc". +# https://gist.github.com/shundhammer/12b6343309544a5920f51cd0063eeecf + +add_custom_target( install-doc + DEPENDS doc + + COMMAND mkdir -m 755 -p ${DOC_INSTALL_DIR}/html + COMMAND cp -r ${CMAKE_CURRENT_BINARY_DIR}/html ${DOC_INSTALL_DIR} + + COMMENT "Installing documentation to ${DOC_INSTALL_DIR}" ) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/package/libyui-qt-rest-api.changes new/libyui-qt-rest-api-4.0.1/package/libyui-qt-rest-api.changes --- old/libyui-qt-rest-api-0.2.4/package/libyui-qt-rest-api.changes 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/package/libyui-qt-rest-api.changes 2021-02-15 16:41:37.000000000 +0100 @@ -1,4 +1,17 @@ ------------------------------------------------------------------- +Mon Feb 15 15:25:55 UTC 2021 - Stefan Hundhammer <[email protected]> + +- Require libyui-qt (bsc#1181653) +- 4.0.1 + +------------------------------------------------------------------- +Mon Feb 1 14:59:19 UTC 2021 - Stefan Hundhammer <[email protected]> + +- New CMake build environment (bsc#1181653) +- Bumped SO version to 15 +- 4.0.0 + +------------------------------------------------------------------- Thu Nov 26 13:43:21 UTC 2020 - Rodion Iafarov <[email protected]> - Add activation for YTable (bsc#1139747) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/package/libyui-qt-rest-api.spec new/libyui-qt-rest-api-4.0.1/package/libyui-qt-rest-api.spec --- old/libyui-qt-rest-api-0.2.4/package/libyui-qt-rest-api.spec 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/package/libyui-qt-rest-api.spec 2021-02-15 16:41:37.000000000 +0100 @@ -2,6 +2,7 @@ # spec file for package libyui-qt-rest-api # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020-2021 SUSE LLC, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,49 +17,47 @@ # -%define so_version 14 -%define bin_name %{name}%{so_version} -%define libyui_devel_version libyui-devel >= 3.10.1 - Name: libyui-qt-rest-api -Version: 0.2.4 + +# DO NOT manually bump the version here; instead, use rake version:bump +Version: 4.0.1 Release: 0 -Summary: Libyui - The REST API plugin for the Qt frontend -License: LGPL-2.1-only OR LGPL-3.0-only -Group: System/Libraries -URL: http://github.com/libyui/libyui-qt-rest-api -Source: %{name}-%{version}.tar.bz2 +%define so_version 15 +%define libyui_devel_version libyui-devel >= 3.10.1 +%define bin_name %{name}%{so_version} + +BuildRequires: cmake >= 3.10 +BuildRequires: gcc-c++ +BuildRequires: boost-devel +BuildRequires: libyui-qt-devel +BuildRequires: libyui-rest-api-devel BuildRequires: %{libyui_devel_version} -BuildRequires: cmake >= 2.8 -BuildRequires: fontconfig-devel + BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5X11Extras) BuildRequires: pkgconfig(Qt5Svg) -BuildRequires: gcc-c++ -BuildRequires: libyui-qt-devel -BuildRequires: libyui-rest-api-devel -%if 0%{?suse_version} > 1325 -BuildRequires: libboost_headers-devel -BuildRequires: libboost_test-devel -%else -BuildRequires: boost-devel -%endif + +Summary: Libyui - The REST API plugin for the Qt frontend +License: LGPL-2.1-only OR LGPL-3.0-only +URL: http://github.com/libyui/ +Source: %{name}-%{version}.tar.bz2 %description -This package provides a libyui REST API plugin. +This package provides a libyui REST API plugin for the Qt frontend. It allows inspecting and controlling the UI remotely via -an HTTP REST API, it is designed for automated tests. +an HTTP REST API. This is designed for automated tests. + %package -n %{bin_name} Summary: Libyui - The REST API plugin for the Qt frontend -Group: System/Libraries -URL: http://github.com/libyui/libyui-qt-rest-api + Requires: libyui%{so_version} +Requires: libyui-qt%{so_version} Requires: libyui-rest-api%{so_version} Requires: yui_backend = %{so_version} Provides: %{name} = %{version} @@ -68,73 +67,75 @@ This package provides a libyui REST API plugin for the Qt frontend. It allows inspecting and controlling the UI remotely via -an HTTP REST API, it is designed for automated tests. +an HTTP REST API. This is designed for automated tests. + %package devel -Summary: Libyui header files -Group: Development/Languages/C and C++ -URL: http://github.com/libyui/libyui-qt-rest-api -BuildRequires: libyui-rest-api-devel +Summary: Libyui - Header files for the Qt REST API plugin + Requires: %{bin_name} = %{version} Requires: glibc-devel Requires: libstdc++-devel Requires: libyui-qt-devel Requires: libyui-rest-api-devel -%if 0%{?suse_version} > 1325 -Requires: libboost_headers-devel -Requires: libboost_test-devel -%else -Requires: boost-devel -%endif + %description devel -This package provides a libyui REST API plugin for the Qt frontend. +This provides a libyui REST API plugin for the Qt frontend. + +This package contains the header files for the plugin. + +This is not needed for using the REST API, only for developing +extensions for it. -This is a development subpackage. %prep %setup -q %build -export CFLAGS="%{optflags} -DNDEBUG" -export CXXFLAGS="%{optflags} -DNDEBUG" +export CFLAGS="$RPM_OPT_FLAGS -DNDEBUG" +export CXXFLAGS="$RPM_OPT_FLAGS -DNDEBUG" -./bootstrap.sh %{_prefix} +mkdir build +cd build -# NOTE: %%cmake changes the CWD to "build" which is later expected by -# %%cmake_build, be careful when running additional commands later... -%cmake -DYPREFIX=%{_prefix} \ - -DDOC_DIR=%{_docdir} \ - -DLIB_DIR=%{_lib} \ %if %{?_with_debug:1}%{!?_with_debug:0} - -DCMAKE_BUILD_TYPE=RELWITHDEBINFO +CMAKE_OPTS="-DCMAKE_BUILD_TYPE=RELWITHDEBINFO" %else - -DCMAKE_BUILD_TYPE=RELEASE +CMAKE_OPTS="-DCMAKE_BUILD_TYPE=RELEASE" %endif -%cmake_build +cmake .. \ + -DDOC_DIR=%{_docdir} \ + -DLIB_DIR=%{_lib} \ + $CMAKE_OPTS + +make %{?jobs:-j%jobs} + %install -%cmake_install -install -m0755 -d %{buildroot}/%{_docdir}/%{bin_name}/ + +cd build +make install DESTDIR="$RPM_BUILD_ROOT" install -m0755 -d %{buildroot}/%{_libdir}/yui -install -m0644 COPYING* %{buildroot}/%{_docdir}/%{bin_name}/ +install -m0755 -d %{buildroot}/%{_docdir}/%{bin_name}/ +install -m0644 ../COPYING* %{buildroot}/%{_docdir}/%{bin_name}/ + %post -n %{bin_name} -p /sbin/ldconfig %postun -n %{bin_name} -p /sbin/ldconfig + %files -n %{bin_name} %dir %{_libdir}/yui %{_libdir}/yui/lib*.so.* %doc %dir %{_docdir}/%{bin_name} %license %{_docdir}/%{bin_name}/COPYING* + %files devel -%dir %{_docdir}/%{bin_name} %{_libdir}/yui/lib*.so -%{_includedir}/yui -%{_libdir}/pkgconfig/%{name}.pc -%{_libdir}/cmake/%{name} +%{_includedir}/yui/qt-rest-api %changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/src/CMakeLists.txt new/libyui-qt-rest-api-4.0.1/src/CMakeLists.txt --- old/libyui-qt-rest-api-0.2.4/src/CMakeLists.txt 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/src/CMakeLists.txt 2021-02-15 16:41:37.000000000 +0100 @@ -1,10 +1,151 @@ -# Find includes in corresponding build directories -set( CMAKE_INCLUDE_CURRENT_DIR ON ) +# CMakeLists.txt for libyui-qt-rest-api/src -# Instruct CMake to run moc automatically when needed. -set( CMAKE_AUTOMOC ON ) +include( ../VERSION.cmake ) +include( GNUInstallDirs ) # set CMAKE_INSTALL_INCLUDEDIR, ..._LIBDIR -PROCESS_SOURCES() -target_link_libraries( - ${TARGETLIB} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Svg Qt5::X11Extras +# +# Qt-specific +# + +# We only link against Qt5::Core, but we need Qt5::Widgets for the include dir +# for <yui/qt/YQ*.h> headers that use them +find_package( Qt5 COMPONENTS Widgets REQUIRED ) + +set( CMAKE_AUTOMOC on ) # Automatically handle "moc" preprocessor (Q_OBJECTs) + + +# +# libyui-rest-api plugin specific +# + +set( TARGETLIB libyui-qt-rest-api ) +set( TARGETLIB_BASE yui-qt-rest-api ) + +set( HEADERS_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}/yui/qt-rest-api ) +set( PLUGIN_DIR ${CMAKE_INSTALL_LIBDIR}/yui ) # /usr/lib64/yui + +# if DESTDIR is set, CMAKE_INSTALL_INCLUDEDIR already contains it +# during "make install" (but not for other make targets!): +# +# sudo make install DESTDIR=/work/foo +# or +# DESTDIR=/work/foo sudo make install +# +# -> the include files are installed to /work/foo/usr/include/... +# We need that for RPM builds to install everything to $RPM_BUILD_ROOT. + + +set( SOURCES + YQHttpUI.cc + YQHttpWidgetsActionHandler.cc + YQTableActionHandler.cc + YQWidgetActionHandler.cc + ) + + +set( HEADERS + YQHttpUI.h + YQHttpWidgetsActionHandler.h + YQTableActionHandler.h + YQWidgetActionHandler.h + ) + + +# Add shared lib to be built +add_library( ${TARGETLIB} SHARED + ${SOURCES} + ${HEADERS} + ) + + +# +# Include directories and compile options +# + +set( LOCAL_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include ) + +# Create an include dir with some symlinks to include headers from sibling projects: +# build/src/include/yui/qt -> ../../libyui-qt/src +# build/src/include/yui/rest-api -> ../../libyui-rest-api/src +# build/src/include/yui/yui -> ../../libyui/src +add_custom_target( local-include-dir + COMMAND rm -rf ${LOCAL_INCLUDE_DIR} + COMMAND mkdir -p ${LOCAL_INCLUDE_DIR}/yui + COMMAND ln -s ${CMAKE_CURRENT_SOURCE_DIR}/../../libyui/src ${LOCAL_INCLUDE_DIR}/yui/yui + COMMAND ln -s ${CMAKE_CURRENT_SOURCE_DIR}/../../libyui-qt/src ${LOCAL_INCLUDE_DIR}/yui/qt + COMMAND ln -s ${CMAKE_CURRENT_SOURCE_DIR}/../../libyui-rest-api/src ${LOCAL_INCLUDE_DIR}/yui/rest-api ) + +add_dependencies( ${TARGETLIB} local-include-dir ) + +# <yui/qt/YQFoo.h> from build/src/include/yui/qt -> ../../libyui-qt/src +# <yui/rest-api/YRestFoo.h> from build/src/include/yui/rest-api -> ../../libyui-rest-api/src +target_include_directories( ${TARGETLIB} BEFORE PUBLIC ${LOCAL_INCLUDE_DIR} ) + +# <yui/YFoo.h> from build/src/include/yui/yui -> ../../libyui/src +target_include_directories( ${TARGETLIB} BEFORE PUBLIC ${LOCAL_INCLUDE_DIR}/yui ) + + +# FIXME start +# Also add those directories directly until the full transition is done: +# The headers of older libyui-rest-api packages still #include "YSomeWidget.h" +target_include_directories( ${TARGETLIB} BEFORE PUBLIC /usr/include/yui ) +# Remove this when those old packages are history. +# FIXME end + +# Make the version from ../VERSION.cmake available as a #define +target_compile_definitions( ${TARGETLIB} PUBLIC VERSION="${VERSION}" ) + +# We need the headers for QApplication etc. for the <yui/qt/YQ*.h> headers, +# but we don't need to link against Qt5::Widgets, only Qt5::Core +target_include_directories( ${TARGETLIB} BEFORE PUBLIC ${Qt5Widgets_INCLUDE_DIRS}) + +# Add more compile options to this target in addition to those +# added in the toplevel CMakeLists.txt. +# +# Notice that CMake will automatically add -fPIC etc. where needed, +# like for this shared lib. +### target_compile_options( ${TARGETLIB} PUBLIC "-Dfoo" ) + +# Show the complete compiler commands with all arguments: +# make VERBOSE=1 + +# Add more compile options to an individual source file: +### set_source_files_properties( YUI.cc PROPERTIES COMPILE_OPTIONS "-Dfoo" ) + + +# +# Linking +# + +# Find yui during a combined build +target_link_directories( ${TARGETLIB} BEFORE PUBLIC ../../libyui/build/src ) + + +# Libraries that are needed to build this shared lib +# +# If in doubt what is really needed, check with "ldd -u" which libs are unused. +target_link_libraries( ${TARGETLIB} + yui + Qt5::Core + ) + +# We are not using any of Qt5::Widgets or Qt5::Gui here; we only needed +# Qt5::Widgets for its include files which are used from <yui/qt/YQ*.h> +# headers. + + +# https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html#target-properties +set_target_properties( ${TARGETLIB} PROPERTIES + VERSION ${SONAME} # From ../VERSION.cmake + SOVERSION ${SONAME_MAJOR} # From ../VERSION.cmake + OUTPUT_NAME ${TARGETLIB_BASE} ) + + +# +# Install +# + +# Install the headers first so the message about the lib does not scroll away +install( FILES ${HEADERS} DESTINATION ${HEADERS_INSTALL_DIR} ) +install( TARGETS ${TARGETLIB} LIBRARY DESTINATION ${PLUGIN_DIR} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/src/YQHttpUI.cc new/libyui-qt-rest-api-4.0.1/src/YQHttpUI.cc --- old/libyui-qt-rest-api-0.2.4/src/YQHttpUI.cc 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/src/YQHttpUI.cc 2021-02-15 16:41:37.000000000 +0100 @@ -13,18 +13,19 @@ Floor, Boston, MA 02110-1301 USA */ -#define YUILogComponent "qt-rest-api" #include <QThread> #include <QSocketNotifier> + +#define YUILogComponent "qt-rest-api" #include <yui/YUILog.h> -#include <yui/Libyui_config.h> -#include "YHttpServer.h" +#include <yui/rest-api/YHttpServer.h> + #include "YQHttpUI.h" -#include "YQUI.h" #include "YQHttpWidgetsActionHandler.h" + YQHttpUI::YQHttpUI( bool withThreads ) : YQUI( withThreads, false ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/src/YQHttpUI.h new/libyui-qt-rest-api-4.0.1/src/YQHttpUI.h --- old/libyui-qt-rest-api-0.2.4/src/YQHttpUI.h 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/src/YQHttpUI.h 2021-02-15 16:41:37.000000000 +0100 @@ -25,7 +25,8 @@ #ifndef YQHttpUI_h #define YQHttpUI_h -#include "YQUI.h" +#include <yui/qt/YQUI.h> + //! The class of a pointer expression. // To be used in connect(foo, &pclass(foo)::mysignal, bar, &pclass(bar)::myslot); @@ -36,8 +37,6 @@ class QSocketNotifier; class YQHttpUISignalReceiver; -using std::string; -using std::vector; class YQHttpUI: public YQUI { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/src/YQHttpWidgetsActionHandler.cc new/libyui-qt-rest-api-4.0.1/src/YQHttpWidgetsActionHandler.cc --- old/libyui-qt-rest-api-0.2.4/src/YQHttpWidgetsActionHandler.cc 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/src/YQHttpWidgetsActionHandler.cc 2021-02-15 16:41:37.000000000 +0100 @@ -14,14 +14,9 @@ Floor, Boston, MA 02110-1301 USA */ -#ifndef YUILogComponent -#define YUILogComponent "qt-rest-api" -#endif //YUILogComponent - -#include "YUILog.h" - #include "YQHttpWidgetsActionHandler.h" + YWidgetActionHandler* YQHttpWidgetsActionHandler::get_widget_handler() { if( !widget_action_handler ){ widget_action_handler = new YQWidgetActionHandler(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/src/YQHttpWidgetsActionHandler.h new/libyui-qt-rest-api-4.0.1/src/YQHttpWidgetsActionHandler.h --- old/libyui-qt-rest-api-0.2.4/src/YQHttpWidgetsActionHandler.h 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/src/YQHttpWidgetsActionHandler.h 2021-02-15 16:41:37.000000000 +0100 @@ -17,11 +17,12 @@ #ifndef YQHttpWidgetsActionHandler_h #define YQHttpWidgetsActionHandler_h -#include "YHttpWidgetsActionHandler.h" +#include <yui/rest-api/YHttpWidgetsActionHandler.h> #include "YQWidgetActionHandler.h" #include "YQTableActionHandler.h" + class YQHttpWidgetsActionHandler : public YHttpWidgetsActionHandler { public: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/src/YQTableActionHandler.cc new/libyui-qt-rest-api-4.0.1/src/YQTableActionHandler.cc --- old/libyui-qt-rest-api-0.2.4/src/YQTableActionHandler.cc 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/src/YQTableActionHandler.cc 2021-02-15 16:41:37.000000000 +0100 @@ -14,9 +14,11 @@ Floor, Boston, MA 02110-1301 USA */ +#include <yui/YEvent.h> + +#include "YQHttpUI.h" #include "YQTableActionHandler.h" -#include <yui/YEvent.h> void YQTableActionHandler::activate_widget( YTable * widget, YItem * item ) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/src/YQTableActionHandler.h new/libyui-qt-rest-api-4.0.1/src/YQTableActionHandler.h --- old/libyui-qt-rest-api-0.2.4/src/YQTableActionHandler.h 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/src/YQTableActionHandler.h 2021-02-15 16:41:37.000000000 +0100 @@ -17,15 +17,8 @@ #ifndef YQTableActionHandler_h #define YQTableActionHandler_h -#include <iostream> -#include <functional> -#include <microhttpd.h> -#include <sstream> +#include <yui/rest-api/YTableActionHandler.h> -#include "YQHttpUI.h" -#include "YTableActionHandler.h" - -#include <boost/algorithm/string.hpp> class YQTableActionHandler : public YTableActionHandler { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/src/YQWidgetActionHandler.cc new/libyui-qt-rest-api-4.0.1/src/YQWidgetActionHandler.cc --- old/libyui-qt-rest-api-0.2.4/src/YQWidgetActionHandler.cc 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/src/YQWidgetActionHandler.cc 2021-02-15 16:41:37.000000000 +0100 @@ -16,6 +16,7 @@ #include "YQWidgetActionHandler.h" + void YQWidgetActionHandler::activate_widget( YCheckBoxFrame * widget ) { widget->handleChildrenEnablement( widget->value() ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.2.4/src/YQWidgetActionHandler.h new/libyui-qt-rest-api-4.0.1/src/YQWidgetActionHandler.h --- old/libyui-qt-rest-api-0.2.4/src/YQWidgetActionHandler.h 2020-11-30 09:55:22.000000000 +0100 +++ new/libyui-qt-rest-api-4.0.1/src/YQWidgetActionHandler.h 2021-02-15 16:41:37.000000000 +0100 @@ -17,16 +17,10 @@ #ifndef YQWidgetActionHandler_h #define YQWidgetActionHandler_h -#include <iostream> -#include <functional> -#include <microhttpd.h> -#include <sstream> #include <yui/YEvent.h> - +#include <yui/rest-api/YWidgetActionHandler.h> #include "YQHttpUI.h" -#include "YWidgetActionHandler.h" -#include <boost/algorithm/string.hpp> class YQWidgetActionHandler : public YWidgetActionHandler {
