Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package dtkcommon for openSUSE:Factory 
checked in at 2022-03-07 17:46:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dtkcommon (Old)
 and      /work/SRC/openSUSE:Factory/.dtkcommon.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dtkcommon"

Mon Mar  7 17:46:25 2022 rev:3 rq:959473 version:5.5.20

Changes:
--------
--- /work/SRC/openSUSE:Factory/dtkcommon/dtkcommon.changes      2021-08-18 
08:55:45.706984603 +0200
+++ /work/SRC/openSUSE:Factory/.dtkcommon.new.1958/dtkcommon.changes    
2022-03-07 17:46:29.991127488 +0100
@@ -1,0 +2,6 @@
+Wed Feb 16 12:59:16 UTC 2022 - Hillwood Yang <hillw...@opensuse.org>
+
+- Update version to 5.5.20
+  * Add DtkInstallDConfigConfig 
+
+-------------------------------------------------------------------

Old:
----
  dtkcommon-5.5.17.tar.gz

New:
----
  dtkcommon-5.5.20.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ dtkcommon.spec ++++++
--- /var/tmp/diff_new_pack.N3OnUl/_old  2022-03-07 17:46:30.667127293 +0100
+++ /var/tmp/diff_new_pack.N3OnUl/_new  2022-03-07 17:46:30.671127292 +0100
@@ -17,7 +17,7 @@
 #
 
 Name:           dtkcommon
-Version:        5.5.17
+Version:        5.5.20
 Release:        0
 Summary:        The DTK Tools
 License:        GPL-3.0+
@@ -47,16 +47,13 @@
 %install
 %qmake5_install
 
-# workaroud boo#1181642
-# rm %{buildroot}%{_sysconfdir}/dbus-1/system.d/com.deepin.dtk.FileDrag.conf
-
 %files
 %defattr(-,root,root,-)
 %doc README.md
 %license LICENSE
-# %config %{_sysconfdir}/dbus-1/system.d/com.deepin.dtk.FileDrag.conf
 %dir %{_libdir}/cmake/Dtk
 %{_libdir}/cmake/Dtk/DtkConfig.cmake
+%{_libdir}/cmake/Dtk/DtkInstallDConfigConfig.cmake
 %{_libdir}/qt5/mkspecs/features/*.prf
 %{_libdir}/qt5/mkspecs/modules/qt_lib_dtkcommon.pri
 %{_datadir}/glib-2.0/schemas/com.deepin.dtk.gschema.xml

++++++ dtkcommon-5.5.17.tar.gz -> dtkcommon-5.5.20.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dtkcommon-5.5.17/cmake/Dtk/DtkConfig.cmake 
new/dtkcommon-5.5.20/cmake/Dtk/DtkConfig.cmake
--- old/dtkcommon-5.5.17/cmake/Dtk/DtkConfig.cmake      2021-06-17 
10:27:30.000000000 +0200
+++ new/dtkcommon-5.5.20/cmake/Dtk/DtkConfig.cmake      2021-11-12 
07:53:23.000000000 +0100
@@ -1,3 +1,5 @@
 foreach(module ${Dtk_FIND_COMPONENTS})
     find_package(Dtk${module})
 endforeach()
+
+include("${CMAKE_CURRENT_LIST_DIR}/DtkInstallDConfigConfig.cmake")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/dtkcommon-5.5.17/cmake/Dtk/DtkInstallDConfigConfig.cmake 
new/dtkcommon-5.5.20/cmake/Dtk/DtkInstallDConfigConfig.cmake
--- old/dtkcommon-5.5.17/cmake/Dtk/DtkInstallDConfigConfig.cmake        
1970-01-01 01:00:00.000000000 +0100
+++ new/dtkcommon-5.5.20/cmake/Dtk/DtkInstallDConfigConfig.cmake        
2021-11-12 07:53:23.000000000 +0100
@@ -0,0 +1,103 @@
+# This cmake file is used to deploy files that dconfig's meta and override 
configure.
+
+include(CMakeParseArguments)
+
+# get subpath according `FILE` and `BASE`.
+# e.g: FILE = /a/b/c/d/foo.json, BASE = /a/b, then return SUBPATH = /c/d/
+function(GET_SUBPATH FILE BASE SUBPATH)
+    get_filename_component(BASE_FILE_PATH ${BASE} REALPATH)
+    get_filename_component(FILE_PATH ${FILE} REALPATH)
+    string(REPLACE ${BASE_FILE_PATH} "" SUBPATH_FILE_NAME ${FILE_PATH})
+    get_filename_component(SUBPATH_PATH ${SUBPATH_FILE_NAME} DIRECTORY)
+
+    set(${SUBPATH} ${SUBPATH_PATH} PARENT_SCOPE)
+endfunction()
+
+
+# deploy some `meta` 's configure.
+#
+# option USE_OPT_DIR   - using uos standard to install destination directory.
+# FILES       - deployed files.
+# BASE        - used to get subpath, if it's empty, only copy files, and 
ignore it's subpath structure.
+# APPID       - working for the app.
+# COMMONID    - working for common.
+#
+# e.g:
+# dconfig_meta_files(APPID dconfigexample BASE ./configs FILES 
./configs/example.json ./configs/a/example.json)
+#
+function(DCONFIG_META_FILES)
+    set(options USE_OPT_DIR)
+    set(oneValueArgs BASE APPID COMMONID)
+    set(multiValueArgs FILES)
+
+    cmake_parse_arguments(METAITEM "${options}" "${oneValueArgs}" 
"${multiValueArgs}" ${ARGN})
+
+    if(DEFINED ENV{DSG_DATA_DIR})
+        set(DSG_DATA_DIR $ENV{DSG_DATA_DIR})
+    else()
+        set(DSG_DATA_DIR "/usr/share/dsg")
+    endif()
+
+    foreach(_current_FILE ${METAITEM_FILES})
+        set(SUBPATH "")
+        if (DEFINED METAITEM_BASE)
+            GET_SUBPATH(${_current_FILE} ${METAITEM_BASE} SUBPATH)
+        endif()
+
+        if (DEFINED METAITEM_APPID)
+            if (${METAITEM_USE_OPT_DIR} STREQUAL "TRUE")
+                install(FILES "${_current_FILE}" DESTINATION 
/opt/apps/${METAITEM_APPID}/files/schemas/configs/${SUBPATH})
+            else()
+                install(FILES "${_current_FILE}" DESTINATION 
/usr/share/dsg/apps/${METAITEM_APPID}/configs/${SUBPATH})
+            endif()
+        elseif (DEFINED METAITEM_COMMONID)
+            install(FILES ${_current_FILE} DESTINATION 
${DSG_DATA_DIR}/configs/${SUBPATH})
+        else()
+            message(FATAL_ERROR "Please set APPID or COMMONID for the meta 
item." ${_current_FILE})
+        endif()
+    endforeach()
+endfunction()
+
+
+# deploy some `meta` 's override configure.
+#
+# configuration for the `meta_name` 's  override configure.
+#
+# FILES       - deployed files.
+# BASE        - used to get subpath, if it's empty, only copy files, and 
ignore it's subpath structure.
+# APPID       - working for the app, if it's empty, working for all app.
+# META_NAME   - override for the meta configure.
+#
+# e.g :
+#dconfig_override_files(APPID dconfigexample BASE ./configs META_NAME example  
FILES ./configs/dconf-example.override.json 
./configs/a/dconf-example.override.a.json)
+#
+function(DCONFIG_OVERRIDE_FILES)
+    set(options)
+    set(oneValueArgs BASE APPID META_NAME)
+    set(multiValueArgs FILES)
+
+    cmake_parse_arguments(OVERRIDEITEM "${options}" "${oneValueArgs}" 
"${multiValueArgs}" ${ARGN})
+
+    if (NOT DEFINED OVERRIDEITEM_META_NAME)
+        message(FATAL_ERROR "Please set meta_name for the override 
configuration." ${FILES})
+    endif()
+
+    if(DEFINED ENV{DSG_DATA_DIR})
+        set(DSG_DATA_DIR $ENV{DSG_DATA_DIR})
+    else()
+        set(DSG_DATA_DIR "/usr/share/dsg")
+    endif()
+
+    foreach(_current_FILE ${OVERRIDEITEM_FILES})
+        set(SUBPATH "")
+        if (DEFINED OVERRIDEITEM_BASE)
+            GET_SUBPATH(${_current_FILE} ${OVERRIDEITEM_BASE} SUBPATH)
+        endif()
+
+        if (DEFINED OVERRIDEITEM_APPID)
+            install(FILES "${_current_FILE}" DESTINATION 
${DSG_DATA_DIR}/configs/overrides/${OVERRIDEITEM_APPID}/${OVERRIDEITEM_META_NAME}/${SUBPATH})
+        else()
+            install(FILES "${_current_FILE}" DESTINATION 
${DSG_DATA_DIR}/configs/overrides/${OVERRIDEITEM_META_NAME}/${SUBPATH})
+        endif()
+    endforeach()
+endfunction()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dtkcommon-5.5.17/debian/control 
new/dtkcommon-5.5.20/debian/control
--- old/dtkcommon-5.5.17/debian/control 2021-06-17 10:27:30.000000000 +0200
+++ new/dtkcommon-5.5.20/debian/control 2021-11-12 07:53:23.000000000 +0100
@@ -2,7 +2,7 @@
 Section: libdevel
 Priority: optional
 Maintainer: Deepin Packages Builder <packa...@deepin.com>
-Build-depends: debhelper (>= 9), pkg-config, libglib2.0-bin, 
qttools5-dev-tools, qtbase5-private-dev, git
+Build-depends: debhelper (>= 9), pkg-config, libglib2.0-bin, 
qttools5-dev-tools, qtbase5-private-dev
 Standards-Version: 3.9.8
 Homepage: http://www.deepin.org/
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dtkcommon-5.5.17/debian/libdtkcommon-dev.install 
new/dtkcommon-5.5.20/debian/libdtkcommon-dev.install
--- old/dtkcommon-5.5.17/debian/libdtkcommon-dev.install        2021-06-17 
10:27:30.000000000 +0200
+++ new/dtkcommon-5.5.20/debian/libdtkcommon-dev.install        2021-11-12 
07:53:23.000000000 +0100
@@ -1,3 +1,3 @@
-usr/lib/cmake/Dtk/DtkConfig.cmake
+usr/lib/cmake/Dtk/*
 usr/lib/*/*/mkspecs/features/*
 usr/lib/*/*/mkspecs/modules/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dtkcommon-5.5.17/dtkcommon.pro 
new/dtkcommon-5.5.20/dtkcommon.pro
--- old/dtkcommon-5.5.17/dtkcommon.pro  2021-06-17 10:27:30.000000000 +0200
+++ new/dtkcommon-5.5.20/dtkcommon.pro  2021-11-12 07:53:23.000000000 +0100
@@ -6,10 +6,6 @@
 SOURCES += \
         main.cpp
 
-isEmpty(PREFIX){
-    PREFIX = /usr
-}
-
 defineTest(checkDtkVersion) {
     isEmpty(VERSION) {
         isEmpty(VERSION): VERSION = $$system(git describe --tags --abbrev=0)
@@ -21,6 +17,20 @@
     return(true)
 }
 
+defineReplace(getQtMacroFromQMake) {
+    MACRO = $$1
+    var = $${system($${QMAKE_QMAKE} -query $$MACRO)}
+
+    return ($$var)
+}
+
+isEmpty(PREFIX){
+    PREFIX = $${getQtMacroFromQMake(QT_HOST_PREFIX)}
+    isEmpty(PREFIX) {
+    PREFIX = /usr
+    }
+}
+
 !checkDtkVersion():error("check dtk version failed")
 
 ver_list = $$split(VERSION, .)
@@ -46,10 +56,17 @@
 
 message("build version : $$VERSION 
($${VER_MAJ}.$${VER_MIN}.$${VER_PAT}.$${VER_BUI})")
 
+ARCH_INSTALL_DATA = $${getQtMacroFromQMake(QT_INSTALL_ARCHDATA)}
+INSTALL_LIBS = $${getQtMacroFromQMake(QT_INSTALL_LIBS)}
+
 mod_inst_pfx=$$_PRO_FILE_PWD_
 MODULE_PRI = $$mod_inst_pfx/qt_lib_dtkcommon.pri
-module_libs = $$PREFIX/lib/$$ARCH
-module_tools = $$PREFIX/lib/$$ARCH/libdtk-$$VERSION
+
+if (isEmpty(ARCH)):  module_libs = $${INSTALL_LIBS}
+else: module_libs = $$PREFIX/lib/$$ARCH
+if (isEmpty(ARCH)): module_tools = $${INSTALL_LIBS}/libdtk-$$VERSION
+else: module_tools = $$PREFIX/lib/$$ARCH/libdtk-$$VERSION
+
 MODULE_INCLUDES = $$PREFIX/include/libdtk-$$VERSION
 
 # Create a module .pri file
@@ -87,16 +104,28 @@
              features/dtk_cmake.prf \
              features/dtk_qmake.prf \
              features/dtk_multiversion.prf \
-             features/dtk_install_multiversion.prf
+             features/dtk_install_multiversion.prf \
+             features/dtk_install_dconfig.prf
+
+isEmpty(ARCH_INSTALL_DATA) {
+    prf.path = $$PREFIX/lib/$$ARCH/qt5/mkspecs/features
+} else {
+    prf.path = $${ARCH_INSTALL_DATA}/mkspecs/features
+}
 
-prf.path = $$PREFIX/lib/$$ARCH/qt5/mkspecs/features
 
+cmake_dtk.files = cmake/Dtk/DtkConfig.cmake \
+                    cmake/Dtk/DtkInstallDConfigConfig.cmake
 
-cmake_dtk.files = cmake/Dtk/DtkConfig.cmake
 cmake_dtk.path = $$PREFIX/lib/$(ARCH)/cmake/Dtk
 
 dtkcommon_module.files = $$MODULE_PRI
-dtkcommon_module.path = $$PREFIX/lib/$$ARCH/qt5/mkspecs/modules
+
+isEmpty(ARCH_INSTALL_DATA) {
+    dtkcommon_module.path = $$PREFIX/lib/$$ARCH/qt5/mkspecs/modules
+} else {
+    dtkcommon_module.path = $${ARCH_INSTALL_DATA}/mkspecs/modules
+}
 
 #conf.files = confs/com.deepin.dtk.FileDrag.conf
 #conf.path = /etc/dbus-1/system.d
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dtkcommon-5.5.17/features/dtk_build.prf 
new/dtkcommon-5.5.20/features/dtk_build.prf
--- old/dtkcommon-5.5.17/features/dtk_build.prf 2021-06-17 10:27:30.000000000 
+0200
+++ new/dtkcommon-5.5.20/features/dtk_build.prf 2021-11-12 07:53:23.000000000 
+0100
@@ -34,6 +34,11 @@
 isEmpty(target.path): target.path = $$LIB_INSTALL_DIR
 isEmpty(includes.path): includes.path = $$quote($$INCLUDE_INSTALL_DIR)
 
+# ????????????????????????
+QMAKE_LFLAGS += -z noexecstack -pie -z relro -z now
+QMAKE_CFLAGS += -fstack-protector-all -D_FORTITY_SOURCE=1
+QMAKE_CXXFLAGS += -fstack-protector-all -D_FORTITY_SOURCE=1
+
 !isEmpty(DTK_STATIC_LIB) {
     DEFINES += DTK_STATIC_LIB
     CONFIG += staticlib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dtkcommon-5.5.17/features/dtk_build_config.prf 
new/dtkcommon-5.5.20/features/dtk_build_config.prf
--- old/dtkcommon-5.5.17/features/dtk_build_config.prf  2021-06-17 
10:27:30.000000000 +0200
+++ new/dtkcommon-5.5.20/features/dtk_build_config.prf  2021-11-12 
07:53:23.000000000 +0100
@@ -23,6 +23,13 @@
     return(true)
 }
 
+defineReplace(getQtMacroFromQMake) {
+    MACRO = $$1
+    var = $${system($${QMAKE_QMAKE} -query $$MACRO)}
+
+    return ($$var)
+}
+
 !checkDtkVersion():error("check dtk version failed")
 
 message("build dtk with version $$VERSION")
@@ -49,7 +56,7 @@
 }
 
 isEmpty(PREFIX){
-    PREFIX = /usr
+    PREFIX = $${getQtMacroFromQMake(QT_HOST_PREFIX)}
 }
 
 isEmpty(LIB_INSTALL_DIR) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dtkcommon-5.5.17/features/dtk_install_dconfig.prf 
new/dtkcommon-5.5.20/features/dtk_install_dconfig.prf
--- old/dtkcommon-5.5.17/features/dtk_install_dconfig.prf       1970-01-01 
01:00:00.000000000 +0100
+++ new/dtkcommon-5.5.20/features/dtk_install_dconfig.prf       2021-11-12 
07:53:23.000000000 +0100
@@ -0,0 +1,89 @@
+# This prf file is used to deploy files that dconfig's meta and override 
configure.
+#
+# get enviroment `$$DSG_DATA_DIR` 's value, it???s consistent with class 
DConfigFile code.
+defineReplace(getDSGDataDir) {
+    isEmpty($$DSG_DATA_DIR) return ("/usr/share/dsg")
+    return ($$DSG_DATA_DIR)
+}
+
+
+# deploy some `meta` 's configure.
+#
+# files       - deployed files.
+# base        - used to get subpath, if it's empty, only copy files, and 
ignore it's subpath structure.
+# appid       - working for the app, if it's empty, depending on `TEMPLATE`.
+# commonid    - working for common, if it's empyt, depending on `TEMPLATE`.
+# use_opt_dir - using uos standard to install destination directory.
+#
+# e.g:
+# dconfig_example.files += \
+#     $$PWD/configs/dconf-example.json \
+#     $$PWD/configs/a/dconf-example.json
+# dconfig_example.base = $$PWD/configs
+# dconfig_example.appid = $$TARGET
+#
+# dconfig_example2.files += $$PWD/configs/a/dconf-example.json
+#
+# DCONFIG_META_FILES += dconfig_example dconfig_example2
+#
+for(metaitem, DCONFIG_META_FILES) {
+    eval(dconfig_meta_$${metaitem}.files = $$eval($${metaitem}.files))
+    eval(dconfig_meta_$${metaitem}.base = $$eval($${metaitem}.base))
+    isEmpty($${metaitem}.appid) {
+        isEmpty($${metaitem}.commonid) {
+            equals(TEMPLATE, app) {
+                !isEmpty($${metaitem}.use_opt_dir) {
+                    eval(dconfig_meta_$${metaitem}.path = 
/opt/apps/$$TARGET/files/schemas/configs)
+                 } else {
+                    eval(dconfig_meta_$${metaitem}.path = 
/usr/share/dsg/apps/$$TARGET/configs)
+                 }
+            } else {
+                eval(dconfig_meta_$${metaitem}.path = 
$$getDSGDataDir()/configs/)
+            }
+        } else {
+            eval(dconfig_meta_$${metaitem}.path = $$getDSGDataDir()/configs/)
+        }
+    } else {
+        !isEmpty($${metaitem}.use_opt_dir) {
+            eval(dconfig_meta_$${metaitem}.path = 
/opt/apps/$$eval($${overrideitem}.appid/files/schemas/configs))
+        } else {
+            eval(dconfig_meta_$${metaitem}.path = 
/usr/share/dsg/apps/$$eval($${overrideitem}.appid/configs))
+        }
+    }
+    INSTALLS += dconfig_meta_$${metaitem}
+}
+
+
+# deploy some `meta` 's override configure.
+#
+# configuration for the `meta_name` 's  override configure.
+#
+# files       - deployed files.
+# base        - used to get subpath, if it's empty, only copy files, and 
ignore it's subpath structure.
+# appid       - working for the app, if it's empty, working for all app.
+# meta_name   - override for the meta configure.
+#
+# e.g :
+# dconfig_example.files += \
+#     $$PWD/configs/dconf-example.override.json \
+#     $$PWD/configs/a/dconf-example.override.a.json
+# dconfig_example.base = $$PWD/configs
+# dconfig_example.meta_name = example
+# dconfig_example.appid = $$TARGET
+#
+# dconfig_example2.files += $$PWD/configs/a/dconf-example.override.a.json
+# dconfig_example2.meta_name = example2
+#
+# DCONFIG_OVERRIDE_FILES += dconfig_example dconfig_example2
+#
+for(overrideitem, DCONFIG_OVERRIDE_FILES) {
+    eval(dconfig_override_$${overrideitem}.files = 
$$eval($${overrideitem}.files))
+    eval(dconfig_override_$${overrideitem}.base = 
$$eval($${overrideitem}.base))
+    isEmpty($${overrideitem}.meta_name) : error("Please set meta_name for the 
override configuration." $${overrideitem})
+    isEmpty($${overrideitem}.appid) {
+        eval(dconfig_override_$${overrideitem}.path = 
$$getDSGDataDir()/configs/overrides/$$eval($${overrideitem}.meta_name))
+    } else {
+        eval(dconfig_override_$${overrideitem}.path = 
$$getDSGDataDir()/configs/overrides/$$eval($${overrideitem}.appid)/$$eval($${overrideitem}.meta_name))
+    }
+    INSTALLS += dconfig_override_$${overrideitem}
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dtkcommon-5.5.17/rpm/dtkcommon.spec 
new/dtkcommon-5.5.20/rpm/dtkcommon.spec
--- old/dtkcommon-5.5.17/rpm/dtkcommon.spec     1970-01-01 01:00:00.000000000 
+0100
+++ new/dtkcommon-5.5.20/rpm/dtkcommon.spec     2021-11-12 07:53:23.000000000 
+0100
@@ -0,0 +1,51 @@
+Name:    dtkcommon
+Version: 5.5.17
+Release: 1
+Summary: dtk common files
+Source0: %{name}-%{version}.orig.tar.xz
+
+License: GPLv3
+
+BuildRequires:  qt5-qtbase-devel
+
+Obsoletes:      dtkcore <= 5.4.10
+Obsoletes:      dtkcore-devel <= 5.4.10
+
+%global debug_package %{nil}
+
+%description
+dtk common files
+
+%package devel
+Summary:        Development package for %{sname}
+Requires:       %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+dtk common files - devel
+
+%prep
+%setup -q
+
+%build
+export QTDIR="%{_qt5_prefix}"
+export PATH="%{_qt5_bindir}:$PATH"
+%qmake_qt5
+%make_build
+
+%install
+%make_install INSTALL_ROOT=%{buildroot}
+
+
+%files
+%doc README.md
+%license LICENSE
+%{_datarootdir}/glib-2.0/schemas/*
+
+%files devel
+%doc README.md
+%license LICENSE
+%{_prefix}/lib/cmake/Dtk/*
+%{_libdir}/*/mkspecs/features/*
+%{_libdir}/*/mkspecs/modules/*
+
+%changelog

Reply via email to