1Name: glib2 2Version: 2.72.2 3Release: 13 4Summary: The core library that forms the basis for projects such as GTK+ and GNOME 5License: LGPLv2+ 6URL: http://www.gtk.org 7Source0: https://download.gnome.org/sources/glib/2.71/glib-%{version}.tar.xz 8 9Patch6000: backport-add-version-macros-for-GLib-2.74.patch 10Patch6001: backport-gtype-Add-G_TYPE_FLAG_NONE.patch 11Patch6002: backport-gioenums-Add-G_TLS_CERTIFICATE_FLAGS_NONE.patch 12Patch6003: backport-gtestutils-Add-G_TEST_SUBPROCESS_DEFAULT.patch 13Patch6004: backport-gsignal-Add-G_CONNECT_DEFAULT.patch 14Patch6005: backport-giomodule-test-Dont-pass-a-magic-number-to-g_test_trap_subprocess.patch 15Patch6006: backport-giochannel-Add-G_IO_FLAG_NONE.patch 16Patch6007: backport-gmarkup-Add-G_MARKUP_PARSE_FLAGS_NONE.patch 17Patch6008: backport-gregex-Add-G_REGEX_DEFAULT-G_REGEX_MATCH_DEFAULT.patch 18Patch6009: backport-replace-pcre1-with-pcre2.patch 19Patch6010: backport-gregex-format-specifier-for-localized-error-message.patch 20Patch6011: backport-gregex-ensure-we-translate-the-errcode.patch 21Patch6012: backport-gregex-Free-match-info-if-offset-matching-recalc-failed.patch 22Patch6013: backport-gregex-use-G_REGEX_OPTIMIZE-flag-to-enable-JIT-compilation.patch 23Patch6014: backport-gregex-use-g_debug-instead-of-g_warning-in-case-JIT-is-not-available.patch 24Patch6015: backport-gregex-do-not-set-match-and-recursion-limits-on-match-context.patch 25Patch6016: backport-gregex-add-original-test-case.patch 26Patch6017: backport-gregex-use-correct-size-for-pcre2_pattern_info.patch 27Patch6018: backport-regex-Add-debug-strings-for-compile-and-match-option-flags.patch 28Patch6019: backport-regex-Actually-check-for-match-options-changes.patch 29Patch6020: backport-regex-Do-not-mix-PCRE2-Compile-Match-Newline-and-BSR-flags.patch 30Patch6021: backport-regex-Add-test-for-gtksourceview-regression.patch 31Patch6022: backport-gregex-Mark-g_match_info_get_regex-as-transfer-none.patch 32Patch6023: backport-gregex-Do-not-try-access-the-undefined-match-offsets.patch 33Patch6024: backport-gregex-Fix-a-potential-PCRE2-code-leak-on-reallocation-failures.patch 34Patch6025: backport-regex-Use-size-types-more-in-line-with-PCRE2-returned-values.patch 35Patch6026: backport-gregex-Handle-the-case-we-need-to-re-allocate-the-match-data.patch 36Patch6027: backport-gregex-Avoid-re-allocating-if-we-have-no-size-change.patch 37Patch6028: backport-regex-Compute-the-offsets-size-based-on-match-results.patch 38Patch6029: backport-regex-Avoid-allocating-offsets-until-we-ve-a-match.patch 39Patch6030: backport-regex-Handle-JIT-errors-more-explicitly.patch 40Patch6031: backport-regex-Make-possible-to-test-replacements-with-options.patch 41Patch6032: backport-regex-Do-not-use-JIT-when-using-unsupported-match-options.patch 42Patch6033: backport-regex-Perform-more-tests-both-with-and-without-optimizations.patch 43Patch6034: backport-gsocketclient-Fix-still-reachable-references-to-cancellables.patch 44Patch6035: backport-Add-lock-in-_g_get_unix_mount_points-around-fsent-functions.patch 45Patch6036: backport-g_get_unix_mount_points-reduce-syscalls-inside-loop.patch 46Patch6037: backport-xdgmime-fix-double-free.patch 47Patch6038: backport-Implement-GFileIface.set_display_name-for-resource-files.patch 48Patch6039: backport-tests-dbus-appinfo-Add-test-case-for-flatpak-opening-an-invalid-file.patch 49Patch6040: backport-documentportal-Fix-small-leak-in-add_documents-with-empty-URI-list.patch 50Patch6041: backport-gio-tests-gdbus-proxy-threads-Unref-GVariant-s-that-we-own.patch 51Patch6042: backport-gio-tests-gdbus-peer-Unref-cached-property-GVariant-value.patch 52Patch6043: backport-gdesktopappinfo-Unref-the-GDBus-call-results.patch 53Patch6044: backport-Handling-collision-between-standard-i-o-file-descriptors-and-newly-created-ones.patch 54Patch6045: backport-glocalfileoutputstream-Do-not-double-close-an-fd-on-unlink-error.patch 55Patch6046: backport-gregex-Use-pcre2-error-messages-if-we-dont-provide-a-specific-one.patch 56Patch6047: backport-regex-Use-critical-messages-if-an-unexpected-NULL-parameter-is-provided.patch 57Patch6048: backport-gregex-Allow-G_REGEX_JAVASCRIPT_COMPAT-in-compile-mask-for-g_regex_new.patch 58Patch6049: backport-gregex-Drop-explanation-G_REGEX_JAVASCRIPT_COMPAT.patch 59Patch6050: backport-gregex-Remove-an-unreachable-return-statement.patch 60Patch6051: backport-gmessages-Add-missing-trailing-newline-in-fallback-log-hander.patch 61Patch6052: backport-Revert-Handling-collision-between-standard-i-o-filedescriptors-and-newly-created-ones.patch 62patch6053: backport-gdbusinterfaceskeleton-Fix-a-use-after-free-of-a-GDBusMethodInvocation.patch 63patch6054: backport-CVE-2023-24593_CVE-2023-25180-1.patch 64patch6055: backport-CVE-2023-24593_CVE-2023-25180-2.patch 65patch6056: backport-gdbusconnection-Fix-double-unref-on-timeout-cancel-sending-a-message.patch 66patch6057: backport-add-g_free_sized-and-g_aligned_free_sized.patch 67patch6058: backport-gkeyfile-Fix-group-comment-management.patch 68patch6059: backport-gkeyfile-Ensure-we-don-t-add-extra-blank-line-above-new-group.patch 69patch6060: backport-gkeyfile-Skip-group-comment-when-adding-a-new-key-to-a-group.patch 70patch6061: backport-glocalfilemonitor-Avoid-file-monitor-destruction-from-event-thread.patch 71patch6062: backport-glocalfilemonitor-Skip-event-handling-if-the-source-has-been-destroyed.patch 72patch6063: backport-tests-Add-a-test-for-GFileMonitor-deadlocks.patch 73 74Patch6064: backport-gregex-set-default-max-stack-size-for-PCRE2-JIT-compiler-to-512KiB.patch 75Patch6065: backport-gregex-if-JIT-stack-limit-is-reached-fall-back-to-interpretive-matching.patch 76Patch6066: backport-Make-sure-the-GTask-is-freed-on-a-graceful-disconnect.patch 77Patch6067: backport-gmessages-fix-dropping-irrelevant-log-domains.patch 78Patch6068: backport-gutils-Fix-an-unlikely-minor-leak-in-g_build_user_data_dir.patch 79Patch6069: backport-openharmony-adapt.patch 80Patch6070: backport-openharmony-dummy.patch 81 82BuildRequires: chrpath gcc gcc-c++ gettext perl-interpreter 83BUildRequires: glibc-devel libattr-devel libselinux-devel meson 84BuildRequires: systemtap-sdt-devel pkgconfig(libelf) pkgconfig(libffi) 85BuildRequires: pkgconfig(libpcre2-8) pkgconfig(mount) pkgconfig(zlib) 86BuildRequires: python3-devel 87%ifnarch i686 88BuildRequires: desktop-file-utils shared-mime-info gtk-doc 89%if %{?openEuler:1}0 90BuildRequires: pkgconfig(sysprof-capture-4) 91%endif 92%endif 93 94Provides: %{name}-fam = %{version}-%{release} 95Obsoletes: %{name}-fam < %{version}-%{release} 96 97Recommends: shared-mime-info 98Conflicts: gcr < 3.28.1 99 100Provides: bundled(gnulib) 101Provides: bundled(gvdb) 102Provides: bundled(libcharset) 103Provides: bundled(xdgmime) 104 105%description 106GLib is a bundle of three (formerly five) low-level system libraries 107written in C and developed mainly by GNOME. GLib's code was separated 108from GTK, so it can be used by software other than GNOME and has been 109developed in parallel ever since. 110 111%package devel 112Summary: Development for the GLib library 113Requires: %{name} = %{version}-%{release} 114Requires: gdb-headless 115 116%description devel 117Development for the GLib library. 118 119%package static 120Summary: glib static 121Requires: pcre2-static 122%if %{?openEuler:1}0 123Requires: sysprof-capture-static 124%endif 125Requires: %{name}-devel = %{version}-%{release} 126Provides: %{name}-static = %{version}-%{release} 127Obsoletes: %{name}-static < %{version}-%{release} 128 129%description static 130The %{name}-static subpackage contains libraries for %{name}. 131 132%package tests 133Summary: Tests for the glib2 package 134Requires: %{name}-devel = %{version}-%{release} 135Provides: %{name}-tests = %{version}-%{release} 136Obsoletes: %{name}-tests < %{version}-%{release} 137 138%description tests 139The glib2-tests package contains tests that can be used to verify 140the functionality of the installed package. 141 142%ifnarch i686 143%package help 144Summary: help document for the glib2 package 145Buildarch: noarch 146Provides: %{name}-doc = %{version}-%{release} 147Obsoletes: %{name}-doc < %{version}-%{release} 148 149%description help 150help document for the glib2 package. 151%endif 152 153%prep 154%autosetup -n glib-%{version} -p1 155 156%build 157 158%meson --default-library=both -Ddtrace=true \ 159%ifnarch i686 160%if %{?openEuler:1}0 161 -Dsysprof=enabled \ 162%endif 163 -Dman=true -Dgtk_doc=true \ 164%else 165 -Dsysprof=disabled -Dman=false -Dgtk_doc=false \ 166%endif 167 -Dsystemtap=true -Dinstalled_tests=true \ 168 -Dglib_debug=disabled 169 170%meson_build 171find . -name *.dtrace-temp.c -exec rm -f {} \; 172 173%check 174%meson_test 175 176%install 177%meson_install 178%global py_reproducible_pyc_path %{buildroot}%{_datadir} 179touch -r gio/gdbus-2.0/codegen/config.py.in %{buildroot}%{_datadir}/glib-2.0/codegen/*.py 180chrpath --delete %{buildroot}%{_libdir}/*.so 181 182export PYTHONHASHSEED=0 183%py_byte_compile %{__python3} %{buildroot}%{_datadir} 184 185mv %{buildroot}%{_bindir}/gio-querymodules %{buildroot}%{_bindir}/gio-querymodules-%{__isa_bits} 186sed -i -e "/^gio_querymodules=/s/gio-querymodules/gio-querymodules-%{__isa_bits}/" %{buildroot}%{_libdir}/pkgconfig/gio-2.0.pc 187mkdir -p %{buildroot}%{_libdir}/gio/modules 188touch %{buildroot}%{_libdir}/gio/modules/giomodule.cache 189 190# remove pycache 191rm -rf %{buildroot}/%{_datadir}/gdb/auto-load/%{_libdir}/__pycache__ 192rm -rf %{buildroot}/%{_datadir}/glib-2.0/codegen/__pycache__ 193rm -rf %{buildroot}/%{_datadir}/glib-2.0/gdb/__pycache__ 194 195# remove rpath 196chrpath -d %{buildroot}%{_libexecdir}/installed-tests/glib/gdbus-peer 197 198%find_lang glib20 199 200%transfiletriggerin -- %{_libdir}/gio/modules 201gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules &> /dev/null || : 202 203%transfiletriggerpostun -- %{_libdir}/gio/modules 204gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules &> /dev/null || : 205 206%transfiletriggerin -- %{_datadir}/glib-2.0/schemas 207glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : 208 209%transfiletriggerpostun -- %{_datadir}/glib-2.0/schemas 210glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : 211 212%files -f glib20.lang 213%defattr(-,root,root) 214%doc AUTHORS NEWS README 215%license COPYING 216%{_libdir}/*.so.* 217%dir %{_libdir}/gio 218%ghost %{_libdir}/gio/modules/giomodule.cache 219 220%dir %{_datadir}/glib-2.0 221%dir %{_datadir}/bash-completion 222%{_datadir}/bash-completion/completions/gapplication 223%{_datadir}/bash-completion/completions/gdbus 224%{_datadir}/bash-completion/completions/gio 225%{_datadir}/bash-completion/completions/gsettings 226 227%{_bindir}/gio 228%{_bindir}/gio-querymodules* 229%{_bindir}/glib-compile-schemas 230%{_bindir}/gsettings 231%{_bindir}/gdbus 232%{_bindir}/gapplication 233 234%files devel 235%{_libdir}/lib*.so 236%{_libdir}/glib-2.0 237%{_libdir}/pkgconfig/* 238%{_includedir}/* 239 240%{_datadir}/aclocal/* 241%{_datadir}/glib-2.0/* 242%{_datadir}/bash-completion/completions/gresource 243%{_datadir}/gdb/auto-load/%{_libdir}/*-gdb.py 244%{_datadir}/gettext/ 245%{_datadir}/systemtap/ 246 247%{_bindir}/glib-genmarshal 248%{_bindir}/glib-gettextize 249%{_bindir}/glib-mkenums 250%{_bindir}/gobject-query 251%{_bindir}/gtester 252%{_bindir}/gdbus-codegen 253%{_bindir}/glib-compile-resources 254%{_bindir}/gresource 255%attr (0755, root, root) %{_bindir}/gtester-report 256 257%files static 258%{_libdir}/*.a 259 260%files tests 261%{_libexecdir}/installed-tests 262%exclude %{_libexecdir}/installed-tests/glib/cert-tests 263%exclude %{_libexecdir}/installed-tests/glib/tls-certificate 264 265%{_datadir}/installed-tests 266%exclude %{_datadir}/installed-tests/glib/tls-certificate.test 267 268%ifnarch i686 269%files help 270%defattr(-,root,root) 271%{_mandir}/man1/* 272%doc %{_datadir}/gtk-doc/html/* 273%endif 274 275%changelog 276* Thu Jan 11 2024 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-13 277- fix pcre2 error , memory leak and log domains error 278 279* Mon Sep 25 2023 liningjie <liningjie@xfusion.com> - 2.72.2-12 280- glocalfilemonitor: Avoid file monitor destruction from event thread 281 282* Sat Aug 19 2023 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-11 283- fix double unref and fix group comment management 284 285* Sat Apr 1 2023 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-10 286- fix CVE-2023-24593 and CVE-2023-25180 287 288* Tue Mar 14 2023 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-9 289- fix a use-after-free of GDBusMethodInvocation 290 291* Thu Feb 16 2023 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-8 292- backport some patches from community 293 294* Tue Jan 10 2023 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-7 295- adjust pcre2 requires 296 297* Tue Dec 27 2022 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-6 298- fix some pcre2 error 299 300* Wed Nov 9 2022 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-5 301- separate the test and static package from devel package 302 303* Sat Oct 15 2022 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-4 304- backport some patches from community 305 306* Mon Sep 5 2022 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-3 307- replace pcre1 with pcre2 308 309* Sat Jun 18 2022 zhujunhao <zhujunhao11@huawei.com> - 2.72.2-2 310- remove gnutls require 311 312* Mon Jun 6 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 2.72.2-1 313- Update to 2.72.2 314 315* Thu Jun 2 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 2.72.0-1 316- Update to 2.72.0 317 318* Thu Apr 28 2022 yanan <yanan@huawei.com> - 2.68.1-12 319- Type:bugfix 320- DESC:fix issues found by svace static code analyzer 321 fix segfault,memory leak,EOF,arguments leak 322 323* Wed Apr 6 2022 hanhui <hanhui15@h-partners.com> - 2.68.1-11 324- DESC:fix gfileenumerator/gdbusobjectmanagerservice/gdbusauth of memory leak 325 326* Fri Mar 11 2022 weijin deng <weijin.deng@turbolinux.com.cn> - 2.68.1-10 327- Type:bugfix 328- DESC:solve glib2 enable "glib2_debug" option causes gnome-calendar reopen 329 coredumped in gtk3's _gtk_widget_get_toplevel() 330 331* Wed Mar 9 2022 yangcheng<yangcheng87@h-partners.com> - 2.68.1-9 332- Type:bugfix 333- Id:NA 334- SUG:NA 335- DESC:remove gdbus-peer rpath compile option 336 337* Wed Mar 2 2022 hanhui<hanhui15@h-partners.com> - 2.68.1-8 338- Type:bugfix 339- Id:NA 340- SUG:NA 341- DESC:custom installation depend on sysprof 342 343* Sat Feb 19 2022 wangkerong<wangkerong@h-partners.com> - 2.68.1-7 344- Type:bugfix 345- Id:NA 346- SUG:NA 347- DESC:add i686 options,fix build failure on i686 348 349* Sun Nov 14 2021 fengtao<fengtao40@huawei.com> - 2.68.1-6 350- Type:bugfix 351- Id:NA 352- SUG:NA 353- DESC:add require gdb-headless for devel 354 355 356* Tue Sep 14 2021 yangcheng<yangcheng87@huawei.com> - 2.68.1-5 357- Type:bugfix 358- Id:NA 359- SUG:NA 360- DESC:Drop dependebcy on gamin 361 362* Tue Sep 7 2021 fengtao<fengtao40@huawei.com> - 2.68.1-4 363- Type:bugfix 364- Id:NA 365- SUG:NA 366- DESC:enable all tests 367 368* Sat Aug 14 2021 liuyumeng<liuyumeng5@huawei.com> - 2.68.1-3 369- Type:bugfix 370- Id:NA 371- SUG:NA 372- DESC:fix a memory leak 373 374* Tue Aug 10 2021 liuyumeng<liuyumeng5@huawei.com> - 2.68.1-2 375- Type:bugfix 376- Id:NA 377- SUG:NA 378- DESC:fix the third parameter of clise-range 379 380* Wed Jun 30 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 2.68.1-1 381- Upgrade to 2.68.1 because gnome-builder and more new gnome applications 382 need function g_memdup2 which needs glib2 ≥2.67.3 to instead of g_memdup 383 384* Wed May 19 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 2.66.8-1 385- Upgrade to 2.66.8 386- Update Version, Release 387- Delete patch files, delete gio-launch-desktop(not exist in 2.66.8) 388- Correct date, make it match weekday 389 390* Tue Apr 13 2021 hanhui<hanhui15@huawei.com> - 2.62.5-5 391- Type:cve 392- Id:CVE-2021-28153 393- SUG:NA 394- DESC:fix CVE-2021-28153 395 396* Sat Mar 6 2021 hanhui<hanhui15@huawei.com> - 2.62.5-4 397- Type:cve 398- Id:CVE-2021-27219 399- SUG:NA 400- DESC:fix CVE-2021-27219 401 402* Mon Mar 1 2021 jinzhimin<jinzhimin2@huawei.com> - 2.62.5-3 403- Type:cve 404- Id:CVE-2021-27218 405- SUG:NA 406- DESC:fix CVE-2021-27218 407 408* Sat Feb 27 2021 zhujunhao<zhujunhao8@huawei.com> - 2.62.5-2 409- Type:cve 410- Id:CVE-2020-35457 411- SUG:NA 412- DESC:fix CVE-2020-35457 413 414* Tue Jul 21 2020 hanhui<hanhui15@huawei.com> - 2.62.5-1 415- Update to 2.62.5 416 417* Mon Mar 2 2020 hexiujun<hexiujun1@huawei.com> - 2.62.1-4 418- Type:bugfix 419- Id:NA 420- SUG:NA 421- DESC:fix accidentally delete temp file within dtrace 422 423* Fri Feb 28 2020 zhangrui <zhangrui182@huawei.com> - 2.62.1-3 424- Type:bugfix 425- Id:NA 426- SUG:NA 427- DESC:remove dist in spec 428 429* Mon Feb 24 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.62.1-2 430- Type:bugfix 431- Id:NA 432- SUG:NA 433- DESC:exclude some unnecessary files 434 435* Thu Jan 9 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.62.1-1 436- update to 2.62.1 437 438* Tue Dec 24 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.58.1-6 439- change the path of files 440 441* Sat Dec 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.58.1-5 442- Type:bugfix 443- Id:NA 444- SUG:NA 445- DESC:Fix a leaking GRemoteActionGroup member 446 447* Sat Nov 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.58.1-4 448- Type:bugfix 449- Id:NA 450- SUG:NA 451- DESC:add the libxslt in buildrequires 452 453* Wed Sep 25 2019 huzunhao<huzunhao2@huawei.com> - 2.58.1-3 454- Type:cves 455- ID:CVE-2019-12450 CVE-2019-13012 456- SUG:restart 457- DESC:fix CVE-2019-12450 CVE-2019-13012 458 459* Thu Sep 19 2019 Lijin Yang <yanglijin@huawei.com> - 2.58.1-2 460- Package init 461