Name:           libsoup
Version:        2.74.3
Release:        8
Summary:        An HTTP library implementation
License:        LGPLv2
URL:            https://wiki.gnome.org/Projects/libsoup
Source0:        https://download.gnome.org/sources/%{name}/2.74/%{name}-%{version}.tar.xz
BuildRequires:  glib2-devel glib-networking krb5-devel gobject-introspection-devel gettext
BuildRequires:  libxml2-devel libpsl-devel sqlite-devel vala gtk-doc meson libxslt
BuildRequires:  samba-winbind-clients brotli-devel git
BuildRequires:  pkgconfig(sysprof-capture-4)

Requires:       glib2 glib-networking

Patch6000:      backport-skip-tls_interaction-test.patch
Patch6001:      backport-CVE-2024-52530.patch
Patch6002:      backport-0001-CVE-2024-52531.patch
Patch6003:      backport-0002-CVE-2024-52531.patch
Patch6004:      backport-0001-CVE-2024-52532.patch
Patch6005:      backport-0002-CVE-2024-52532.patch
Patch6007:      backport-CVE-2025-32050.patch
Patch6008:      backport-CVE-2025-32052.patch
Patch6009:      backport-0001-CVE-2025-32053.patch
Patch6010:      backport-0002-CVE-2025-32053.patch
Patch6011:      backport-CVE-2025-2784.patch
Patch6012:      backport-0001-CVE-2025-32906.patch
Patch6013:      backport-0002-CVE-2025-32906.patch
Patch6014:      backport-0001-CVE-2025-32910-CVE-2025-32912.patch
Patch6015:      backport-0002-CVE-2025-32910-CVE-2025-32912.patch
Patch6016:      backport-0003-CVE-2025-32910-CVE-2025-32912.patch
Patch6017:      backport-0001-CVE-2025-32911-CVE-2025-32913.patch
Patch6018:      backport-0002-CVE-2025-32911-CVE-2025-32913.patch
Patch6019:      backport-0004-CVE-2025-32912.patch
Patch6020:      backport-0005-CVE-2025-32912.patch
Patch6021:      backport-0006-CVE-2025-32912.patch
Patch6022:      backport-Handle-sniffing-bytes-with-0-size.patch
Patch6023:      backport-content-sniffer-empty-resources-should-be-considered-text-plain.patch
Patch6024:      backport-CVE-2025-32909.patch
Patch6025:      backport-CVE-2025-32914.patch
Patch6026:      backport-CVE-2025-32907.patch

%description
libsoup is an HTTP client/server library for GNOME. It uses GObjects and the glib main loop,
to integrate well with GNOME applications, and also has a synchronous API,
for use in threaded applications.

%package        devel
Summary:        Header files for %{name}
Requires:       %{name} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for %{name}.

%package_help

%prep
%autosetup -n %{name}-%{version} -p1 -S git

%build
%meson -Dgtk_doc=true
%meson_build

%install
%meson_install
sed -i 's/idm[0-9]\{5,32\}/idm12345678912345/g' %{buildroot}%{_datadir}/gtk-doc/html/libsoup-2.4/ix01.html

%check
%meson_test

%files
%defattr(-,root,root)
%doc AUTHORS
%license COPYING
%{_libdir}/*.so.*
%{_datadir}/locale/*
%{_libdir}/girepository-1.0/Soup*2.4.typelib

%files          devel
%defattr(-,root,root)
%{_includedir}/%{name}*-2.4
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gir-1.0/Soup*2.4.gir
%{_datadir}/vala/vapi/libsoup-2.4.*

%files          help
%defattr(-,root,root)
%doc README NEWS
%{_datadir}/gtk-doc/html/libsoup-2.4/*

%changelog
* Wed Apr 23 2025 zhangpan <zhangpan103@h-partners.com> - 2.74.3-8
- Type:cves
- ID:CVE-2025-32907 CVE-2025-32914
- SUG:NA
- DESC:fix CVE-2025-32907 CVE-2025-32914

* Mon Apr 21 2025 zhangpan <zhangpan103@h-partners.com> - 2.74.3-7
- Type:cves
- ID:CVE-2025-32906 CVE-2025-32909 CVE-2025-32910 CVE-2025-32911 CVE-2025-32912 CVE-2025-32913
- SUG:NA
- DESC:fix CVE-2025-32906 CVE-2025-32909 CVE-2025-32910 CVE-2025-32911 CVE-2025-32912 CVE-2025-32913

* Thu Apr 17 2025 maoyanping <maoyanping@xfusion.com> - 2.74.3-6
- Type:cves
- ID:CVE-2025-32912
- SUG:NA
- DESC:fix CVE-2025-32912

* Tue Apr 8 2025 zhangpan <zhangpan103@h-partners.com> - 2.74.3-5
- Type:cves
- ID:CVE-2025-32050 CVE-2025-32052 CVE-2025-32053 CVE-2025-2784
- SUG:NA
- DESC:fix CVE-2025-32050 CVE-2025-32052 CVE-2025-32053 CVE-2025-2784

* Thu Nov 14 2024 xinghe <xinghe2@h-partners.com> - 2.74.3-4
- Type:cves
- ID:CVE-2024-52530 CVE-2024-52531 CVE-2024-52532
- SUG:NA
- DESC:fix CVE-2024-52530 CVE-2024-52531 CVE-2024-52532

* Thu Apr 18 2024 zhangpan <zhangpan103@h-partners.com> - 2.74.3-3
- Rebuild for next release

* Mon Feb 19 2024 hanhuihui <hanhuihui5@huawei.com> - 2.74.3-2
- rebuild for glib2 without sysprof

* Mon Jan 2 2023 lin zhang <lin.zhang@turbolinux.com.cn> - 2.74.3-1
- update to 2.74.3

* Wed Oct 26 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 2.74.2-2
- Rebuild for next release

* Thu Dec 09 2021 liuyumeng <liuyumeng5@huawei.com> - 2.74.2-1
- update to libsoup-2.74.2

* Mon Apr 19 2021 zhanzhimin<zhanzhimin@huawei.com> - 2.72.0-3
- DESC:fix the complie failure due to glib-networking upgrade

* Mon Apr 19 2021 zhanzhimin<zhanzhimin@huawei.com> - 2.72.0-2
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:sed html idm for eliminate difference

* Wed Jan 27 2021 hanhui <hanhui15@huawei.com> - 2.72.0-1
- Type: enhancement
- ID:   NA
- SUG:  NA
- DESC: update to 2.72.0

* Thu Jul 23 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.71.0-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:upgrade to 2.71.0

* Wed Aug 28 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.66.1-1
- Package init
