From 8de9e7548a17d988f64865493b31af679f4a1d06 Mon Sep 17 00:00:00 2001 From: Robin Lee Date: Nov 26 2020 02:24:16 +0000 Subject: [packit] 5.3.0.20 upstream release Upstream tag: 5.3.0.20 Upstream commit: 2467369c Signed-off-by: Robin Lee --- diff --git a/.gitignore b/.gitignore index 5ce2b9b..fe59131 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /dde-qt-dbus-factory-1.1.0.tar.gz /dde-qt-dbus-factory-5.0.1.tar.gz /dde-qt-dbus-factory-5.3.0.19.tar.gz +/dde-qt-dbus-factory-5.3.0.20.tar.gz diff --git a/.packit.yaml b/.packit.yaml index bf95529..45e9b45 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -8,10 +8,14 @@ synced_files: - rpm/deepin-qt-dbus-factory.spec - .packit.yaml +upstream_ref: 5.3.0.20 upstream_package_name: dde-qt-dbus-factory # downstream (Fedora) RPM package name downstream_package_name: deepin-qt-dbus-factory actions: fix-spec-file: | - bash -c "sed -i -r \"s/Version:(\s*)\S*/Version:\1${PACKIT_PROJECT_VERSION}/\" rpm/deepin-qt-dbus-factory.spec" + bash -c "sed -i -r \"0,/Version:/ s/Version:(\s*)\S*/Version:\1${PACKIT_PROJECT_VERSION}/\" rpm/deepin-qt-dbus-factory.spec" + post-upstream-clone: | + cp rpm/dde-qt-dbus-factory.spec rpm/deepin-qt-dbus-factory.spec + diff --git a/0001-fix-QVariant-should-be-created-with-QMetaProperty-us.patch b/0001-fix-QVariant-should-be-created-with-QMetaProperty-us.patch new file mode 100644 index 0000000..dfe2b37 --- /dev/null +++ b/0001-fix-QVariant-should-be-created-with-QMetaProperty-us.patch @@ -0,0 +1,44 @@ +From 6e425c72be1c73c4b3139b749d1f5d0cabe9de6a Mon Sep 17 00:00:00 2001 +From: Robin Lee +Date: Tue, 3 Nov 2020 16:34:36 +0800 +Subject: [PATCH 1/2] fix: QVariant should be created with + QMetaProperty::userType() + +QMetaProperty::type() always returns QVariant::UserType for any user-defined +type. So QVariant of type id 1024(QVariant::UserType) is always created instead +of the right type whose type ID is returned from QMetaProperty::userType(). +Creating QVariant with wrong type may crash the process. + +Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1892710 + +Log: QVariant should be created with QMetaProperty::userType() +Signed-off-by: Robin Lee +--- + .../qtdbusextended/dbusextendedabstractinterface.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libdframeworkdbus/qtdbusextended/dbusextendedabstractinterface.cpp b/libdframeworkdbus/qtdbusextended/dbusextendedabstractinterface.cpp +index b00ec1a..54d46f3 100644 +--- a/libdframeworkdbus/qtdbusextended/dbusextendedabstractinterface.cpp ++++ b/libdframeworkdbus/qtdbusextended/dbusextendedabstractinterface.cpp +@@ -177,7 +177,7 @@ QVariant DBusExtendedAbstractInterface::internalPropGet(const char *propname, vo + if (m_useCache) { + int propertyIndex = metaObject()->indexOfProperty(propname); + QMetaProperty metaProperty = metaObject()->property(propertyIndex); +- return QVariant(metaProperty.type(), propertyPtr); ++ return QVariant(metaProperty.userType(), propertyPtr); + } + + if (m_sync) { +@@ -233,7 +233,7 @@ QVariant DBusExtendedAbstractInterface::internalPropGet(const char *propname, vo + } + + asyncProperty(propname); +- return QVariant(metaProperty.type(), propertyPtr); ++ return QVariant(metaProperty.userType(), propertyPtr); + } + } + +-- +2.26.2 + diff --git a/0002-feat-Initial-packit-setup.patch b/0002-feat-Initial-packit-setup.patch new file mode 100644 index 0000000..d556d62 --- /dev/null +++ b/0002-feat-Initial-packit-setup.patch @@ -0,0 +1,102 @@ +From e84f841d7e3620af8cd28954620f4e10961e4fb5 Mon Sep 17 00:00:00 2001 +From: Robin Lee +Date: Mon, 28 Sep 2020 15:09:58 +0800 +Subject: [PATCH 2/2] feat: Initial packit setup + +This commit contains the specfile for building the official package for Fedora +with a Packit setup. + +Ultimately, a unified specfile is targeted for Fedora and any other rpm-based +distributions, e.g. openEuler. + +And Packit(https://packit.dev/) is a tool for maintaining specfile within +upstream source. It requires a simple config file(.packit.yaml). + +Log: Initial packit setup +Signed-off-by: Robin Lee +--- + rpm/dde-qt-dbus-factory.spec | 32 ++++++++++++++++++++------------ + 1 file changed, 20 insertions(+), 12 deletions(-) + +diff --git a/rpm/dde-qt-dbus-factory.spec b/rpm/dde-qt-dbus-factory.spec +index acfff02..8af3c86 100644 +--- a/rpm/dde-qt-dbus-factory.spec ++++ b/rpm/dde-qt-dbus-factory.spec +@@ -1,21 +1,34 @@ + %global soname dframeworkdbus + %global repo dde-qt-dbus-factory + ++%if 0%{?fedora} ++Name: deepin-qt-dbus-factory ++%else + Name: dde-qt-dbus-factory +-Version: 5.2.0.0 +-Release: 3 ++%endif ++Version: 5.3.0.20 ++Release: 1%{?fedora:%dist} + Summary: A repository stores auto-generated Qt5 dbus code + # The entire source code is GPLv3+ except + # libdframeworkdbus/qtdbusextended/ which is LGPLv2+ + License: GPLv3+ and LGPLv2+ ++%if 0%{?fedora} ++URL: https://github.com/linuxdeepin/dde-qt-dbus-factory ++Source0: %{url}/archive/%{version}/%{repo}-%{version}.tar.gz ++%else + URL: http://shuttle.corp.deepin.com/cache/repos/eagle/release-candidate/56qX566h6IGU6LCD5rWL6K-V6aqM6K-BMDUyMTQ5Mg/pool/main/d/dde-qt-dbus-factory/ + Source0: %{name}_%{version}.orig.tar.xz ++%endif + +-BuildRequires: python3-devel ++BuildRequires: python3 + BuildRequires: pkgconfig(gl) + BuildRequires: pkgconfig(Qt5Core) + BuildRequires: pkgconfig(Qt5DBus) + BuildRequires: pkgconfig(Qt5Gui) ++%if 0%{?fedora} ++BuildRequires: qt5-qtbase-private-devel ++%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}} ++%endif + + %description + A repository stores auto-generated Qt5 dbus code. +@@ -29,32 +42,27 @@ Requires: cmake-filesystem + Header files and libraries for %{name}. + + %prep +-%setup -q -n %{repo}-%{version} ++%autosetup -p1 -n %{repo}-%{version} + sed -i "s/env python$/env python3/g" libdframeworkdbus/generate_code.py + sed -i "s/python/python3/g" libdframeworkdbus/libdframeworkdbus.pro + + %build + %qmake_qt5 LIB_INSTALL_DIR=%{_libdir} +-sed -i "s/python/python3/g" Makefile + %make_build + + %install + %make_install INSTALL_ROOT=%{buildroot} + +-%post -p /sbin/ldconfig +- +-%postun -p /sbin/ldconfig +- + %files +-#%doc README ++%doc README.md CHANGELOG.md technology-overview.md + %license LICENSE +-%{_libdir}/lib%{soname}.so.* ++%{_libdir}/lib%{soname}.so.2* + + %files devel + %{_includedir}/lib%{soname}-2.0/ + %{_libdir}/pkgconfig/%{soname}.pc + %{_libdir}/lib%{soname}.so +-%{_libdir}/cmake/DFrameworkdbus/DFrameworkdbusConfig.cmake ++%{_libdir}/cmake/DFrameworkdbus/ + + %changelog + * Thu Jun 09 2020 uoser - 5.2.0.2-1 +-- +2.26.2 + diff --git a/README.packit b/README.packit index 73ac72c..cd7d6b0 100644 --- a/README.packit +++ b/README.packit @@ -1,3 +1,3 @@ This repository is maintained by packit. https://packit.dev/ -The file was generated using packit 0.16.1.dev31+g5d22fb7. +The file was generated using packit 0.19.0. diff --git a/deepin-qt-dbus-factory.spec b/deepin-qt-dbus-factory.spec index 8e6f939..288bc4f 100644 --- a/deepin-qt-dbus-factory.spec +++ b/deepin-qt-dbus-factory.spec @@ -1,9 +1,13 @@ %global soname dframeworkdbus %global repo dde-qt-dbus-factory +%if 0%{?fedora} Name: deepin-qt-dbus-factory -Version: 5.3.0.19 -Release: 2%{?dist} +%else +Name: dde-qt-dbus-factory +%endif +Version: 5.3.0.20 +Release: 1%{?fedora:%dist} Summary: A repository stores auto-generated Qt5 dbus code # The entire source code is GPLv3+ except # libdframeworkdbus/qtdbusextended/ which is LGPLv2+ @@ -16,13 +20,26 @@ URL: http://shuttle.corp.deepin.com/cache/repos/eagle/release-candida Source0: %{name}_%{version}.orig.tar.xz %endif +# PATCHES FROM SOURCE GIT: + +# fix: QVariant should be created with QMetaProperty::userType() +# Author: Robin Lee +Patch0001: 0001-fix-QVariant-should-be-created-with-QMetaProperty-us.patch + +# feat: Initial packit setup +# Author: Robin Lee +Patch0002: 0002-feat-Initial-packit-setup.patch + + BuildRequires: python3 BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5Gui) +%if 0%{?fedora} BuildRequires: qt5-qtbase-private-devel %{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}} +%endif %description A repository stores auto-generated Qt5 dbus code. @@ -36,7 +53,7 @@ Requires: cmake-filesystem Header files and libraries for %{name}. %prep -%setup -q -n %{repo}-%{version} +%autosetup -p1 -n %{repo}-%{version} sed -i "s/env python$/env python3/g" libdframeworkdbus/generate_code.py sed -i "s/python/python3/g" libdframeworkdbus/libdframeworkdbus.pro @@ -59,6 +76,9 @@ sed -i "s/python/python3/g" libdframeworkdbus/libdframeworkdbus.pro %{_libdir}/cmake/DFrameworkdbus/ %changelog +* Thu Nov 26 2020 Robin Lee - 5.3.0.20-1 +- new upstream release: 5.3.0.20 + * Mon Nov 23 07:51:26 CET 2020 Jan Grulich - 5.3.0.19-2 - rebuild (qt5) diff --git a/sources b/sources index 2b96e76..cbb9783 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (dde-qt-dbus-factory-5.3.0.19.tar.gz) = 9f6068130dd67ce7f41de30fc42430392a704462b0b6b052dafa4bfddc3702d4cac0d5ef63053bd86255bd3d3ad9ee4c9558d7da5c298552506b80797775bc9b +SHA512 (dde-qt-dbus-factory-5.3.0.20.tar.gz) = 1a8ab91eb7f5e961b493b8a3be77e03761991f9129c7366b94940aa9348ad0d270b73052f22411c360d84eb76c75b08be9c6edf5eb5bd4486a998266017401c7