%bcond_without sequoia

Name:          rpm
Version:       4.18.2
Release:       40
Summary:       RPM Package Manager
License:       GPL-2.0-or-later
URL:           https://rpm.org/
Source0:       https://ftp.osuosl.org/pub/rpm/releases/rpm-4.18.x/%{name}-%{version}.tar.bz2

Patch1: Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch
Patch2: rpm-4.12.0-rpm2cpio-hack.patch
Patch3: add-dist-to-release-by-default.patch
Patch4: revert-always-execute-file-trigger-scriptlet-callbac.patch
Patch5: bugfix-rpm-4.11.3-add-aarch64_ilp32-arch.patch
Patch6: bugfix-rpm-4.14.2-wait-once-get-rpmlock-fail.patch
Patch7: get-in-use-of-ndb.patch
Patch8: still-in-use-of-python-scripts-from-old-version.patch
Patch9: Add-loongarch-architecture-support.patch
Patch10: rpm-Add-sw64-architecture.patch
Patch11: add-default-machine-name-to-support-loongarch.patch
Patch12: rpm-selinux-plugin-check-context-file-exist.patch
Patch13: disable-automatic-maintenance-also.patch

Patch6000: backport-revert-Permit-building-rpm-from-git-without-pandoc.patch
Patch6001: backport-Check-inside-root-when-querying-for-files.patch
Patch6002: backport-Use-unsigned-integers-for-buildtime-too-for-Y2K38-sa.patch
Patch6003: backport-Fix-a-theoretical-use-of-uninitialized-struct-member.patch
Patch6004: backport-Fix-spec-parser-leaks-from-trans-f-file.patch
Patch6005: backport-Tip-toe-around-rpmfiFN-thin-ice-in-fsm.patch
Patch6006: backport-Fix-a-memleak-on-invalid-command-line-options.patch
Patch6007: backport-Let-eBPF-ELF-files-be-packaged-in-noarch-packages.patch
Patch6008: backport-Fix-some-int-enum-confusion-in-the-build-code.patch
Patch6009: backport-Use-the-internal-DB_CTRL-enum-for-intenal-uses-consi.patch
Patch6010: backport-An-enumeration-is-not-a-bitfield-use-an-integer-inst.patch
Patch6011: backport-Fix-an-enum-int-type-mismatch-in-rpmfiArchiveReadToF.patch
Patch6012: backport-Fix-an-enum-int-type-mismatch-in-transaction-verify-.patch
Patch6013: backport-Fix-enum-type-mismatch-in-rpmTagGetValue.patch
Patch6014: backport-Free-old-cookie-value-to-prevent-a-memory-leak.patch
Patch6015: backport-Fix-pointer-bogosity-in-rpmlog-callback.patch
Patch6016: backport-Fix-an-ancient-memleak-on-caps-parsing-add-tests.patch
Patch6017: backport-Fix-potential-use-of-uninitialized-pipe-array.patch
Patch6018: backport-Fix-potential-use-of-uninitialized-pgp-struct.patch
Patch6019: backport-Use-unsigned-integers-more-consistently-in-the-handl.patch
Patch6020: backport-Use-proper-type-for-copyTagsFromMainDebug.patch
Patch6021: backport-Reset-recursion-depth-for-error-message.patch
Patch6022: backport-Fix-division-by-zero-in-elfdeps-RhBug-2299414.patch
Patch6023: backport-Make-sure-dirs-are-not-relocated-twice.patch
Patch6024: backport-Fix-root-relocation-regression.patch
Patch6025: backport-Fix-crash-on-Lua-file-trigger-exiting-with-return-ed.patch
Patch6026: backport-Fix-V-option-usage-in-our-tests.patch
Patch6027: backport-Remove-libtool-la-symlinks.patch
Patch6028: backport-Specify-the-private-key-in-rpm-addsign.patch
Patch6029: backport-Use-EVP_PKEY_verify-to-verify-DSA-signatures.patch
Patch6030: backport-No-longer-use-the-low-level-API-in-openssl-3.patch
Patch6031: backport-Add-ECDSA-support-to-digest_openssl.patch
Patch6032: backport-Support-NIST-P-521.patch
Patch6033: backport-Allow-signing-with-ECDSA-keys.patch
Patch6034: backport-Support-ECDSA-in-key-parsing.patch
Patch6035: backport-Fix-memleak-when-process-policies.patch
Patch6036: backport-Enforce-the-same-sanity-checks-on-db-add-and-rebuild.patch
Patch6037: backport-Fix-a-memory-leak-on-rpmdb-importdb.patch
Patch6038: backport-Require-macro-filenames-to-end-in-alphanum-char.patch
Patch6039: backport-Allow-version-to-be-omitted-in-the-replace-test-spec.patch
Patch6040: backport-Fix-wrong-return-code-on-O_DIRECTORY-open-of-invalid.patch
Patch6041: backport-Refactor-fsmOpenat-return-style-for-consistency-with.patch
Patch6042: backport-Report-unsafe-symlinks-during-installation-as-a-spec.patch
Patch6043: backport-Fix-FA_TOUCH-ed-files-getting-removed-on-failed-upda.patch
Patch6044: backport-Fix-race-condition-in-rpmioMkpath.patch
Patch6045: backport-Ignore-EPERM-for-root-when-setting-IMA-signature-xat.patch
Patch6046: backport-Fix-a-copy-paste-help-description-of-rpmbuild-rf-and.patch
Patch6047: backport-Return-1-from-fdSize-for-non-regular-files.patch
Patch6048: backport-Check-RPATH-and-RUNPATH-separately-in-check-rpaths.patch
Patch6049: backport-Avoid-Python-reference-leaks.patch
Patch6050: backport-Ensure-header-object-is-cleaned-even-in-case-of-an-e.patch
Patch6051: backport-revert-Make-brp-strip-comment-note-multi-process.patch
Patch6052: backport-rpmrc-Drop-left-over-free.patch
Patch6053: backport-Fix-segfault-in-rpmgraph.patch
Patch6054: backport-rpmgraph-Prevent-memory-leaks-in-error-handling.patch
Patch6055: backport-Fix-rpmds-trigger-index-to-be-optional-as-originally.patch
Patch6056: backport-Fix-rpmds-segfault-s-memleaks-on-incomplete-header-d.patch
Patch6057: backport-Prevent-buffer-overruns-in-findPreambleTag-for-language-string.patch
Patch6058: backport-Split-testsuite-rpmdb-reset-to-a-macro-of-its-own.patch
Patch6059: backport-Add-a-test-for-CVE-2026-44605.patch
Patch6060: backport-CVE-2026-44605-Harden-the-ndb-implementation-against-integer-overfl.patch
Patch6061: backport-Add-the-ability-for-other-macro-files-to-pass-option.patch

Patch9000: Add-digest-list-plugin.patch
Patch9001: Add-IMA-digest-list-support.patch
Patch9002: Support-sm2p256v1-of-ECDSA-and-sm3-of-hash.patch
Patch9003: support-config-enable-default-subr-macro.patch
Patch9004: huawei-fix-test-failed-basic-file-tigger-scripts.patch
Patch9005: fix-two-tests-failed.patch

BuildRequires: gcc autoconf automake libtool make gawk popt-devel openssl-devel readline-devel
BuildRequires: zlib-devel zstd-devel >= 1.3.8 xz-devel bzip2-devel libarchive-devel ima-evm-utils-devel
BuildRequires: dbus-devel fakechroot elfutils-devel elfutils-libelf-devel ima-evm-utils
BuildRequires: lua-devel libcap-devel libacl-devel libselinux-devel file-devel gettext-devel ncurses-devel
BuildRequires: system-rpm-config dwz gnupg2 debugedit
%if %{with sequoia}
BuildRequires: pkgconfig(rpm-sequoia)
%endif
Requires:      coreutils popt curl zstd >= 1.5.0-1 libcap crontabs logrotate
Obsoletes:     %{name}-build-libs %{name}-sign-libs %{name}-sign %{name}-cron
Provides:      %{name}-build-libs %{name}-sign-libs %{name}-sign %{name}-cron
Obsoletes:     %{name}-plugin-selinux %{name}-plugin-syslog %{name}-plugin-systemd-inhibit < 4.15.1-28  %{name}-plugin-ima %{name}-plugin-prioreset
Provides:      %{name}-plugin-selinux %{name}-plugin-syslog %{name}-plugin-ima %{name}-plugin-prioreset

%description
The RPM Package Manager (RPM) is a powerful package management system capability as below

-building computer software from source into easily distributable packages
-installing, updating and uninstalling packaged software
-querying detailed information about the packaged software, whether installed or not
-verifying integrity of packaged software and resulting software installation

%package libs
Summary:     Shared library of rpm 4.18
Requires:    %{name} = %{version}-%{release}

%description libs
Shared library of rpm 4.18.

%package build
Summary:     Scripts and executable programs used to build packages
Requires:    %{name} = %{version}-%{release}
Requires:    elfutils binutils findutils sed grep gawk diffutils file patch
Requires:    tar unzip gzip bzip2 cpio xz zstd pkgconfig system-rpm-config
Requires:    gdb-headless debugedit

%description build
This package provides scripts and executable programs that used to
build rpm packages.

%package -n python3-%{name}
Summary: Python3 bindings for RPM user
BuildRequires: python3-devel
%{?python_provide:%python_provide python3-%{name}}
Requires: %{name} = %{version}-%{release}
Provides: %{name}-python3 = %{version}-%{release}
Obsoletes: %{name}-python3 < %{version}-%{release}

%description -n python3-%{name}
This package contains a module that allow applications
written with Python3 to use the interface
supplied by RPM.

%package devel
Summary:  Development files for RPM handling
Requires: %{name} = %{version}-%{release}
Requires: popt-devel

%description devel
%{summary}.

%package plugin-systemd-inhibit
Summary: rpm plugin to get systemd-inhibit lock
Requires: %{name} = %{version}-%{release}

%description plugin-systemd-inhibit
This package use systemd-inhibit to block systemd from entering
idle, sleep or shutdown while an rpm transcation is running.

%package help
Summary: Man page for %{name}
BuildArch: noarch
Obsoletes: apidocs

%description help
%{summary}.

%prep
%autosetup -n %{name}-%{version} -p1
%ifnarch sw_64
%patch -P10 -R -p1
%endif

%build
CPPFLAGS="$CPPFLAGS -DLUA_COMPAT_APIINTCASTS"
CFLAGS="$RPM_OPT_FLAGS -DLUA_COMPAT_APIINTCASTS"
LDFLAGS="$LDFLAGS %{?__global_ldflags}"
export CPPFLAGS CFLAGS LDFLAGS

autoreconf -i -f

for i in $(find . -name ltmain.sh) ; do
     %{__sed} -i.backup -e 's~compiler_flags=$~compiler_flags="%{_hardened_ldflags}"~' $i
done;

./configure \
    --prefix=%{_usr} \
    --sysconfdir=%{_sysconfdir} \
    --localstatedir=%{_var} \
    --sharedstatedir=%{_var}/lib \
    --libdir=%{_libdir} \
    --build=%{_target_platform} \
    --host=%{_target_platform} \
    --with-vendor=%{_vendor} \
    --with-selinux \
    --with-cap \
    --with-acl \
    --with-imaevm \
    --enable-zstd \
    --enable-python \
    --enable-bdb-ro \
    --enable-ndb \
    --enable-sqlite=no \
%if %{with sequoia}
    --with-crypto=sequoia \
%else
    --with-crypto=openssl \
%endif
    --with-fapolicyd=no \
    --with-fsverity=no \
    --enable-python

%make_build

%install
%make_install
%delete_la

mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily
install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm

# During the upgrade of the major rpm version, the dynamic library may not be compatible.
# Therefore, ensure that no other rpm command is executed during the upgrade. A judgment
# is added to the RPM script of the scheduled task. If the dynamic library is not the
# dynamic library of the current version, exits directly.
pushd ${RPM_BUILD_ROOT}%{_libdir}
export SONAME=`ls librpm.so.*.*.*`
popd
sed -i "/bin\/sh/a \
if [ ! -e %{_libdir}\/${SONAME} ]; then\n\
    exit 0\n\
fi" ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm
cp ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm ${RPM_BUILD_ROOT}%{_rpmconfigdir}/rpm.daily

mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/rpm

install -m 755 build-aux/config.guess ${RPM_BUILD_ROOT}%{_rpmconfigdir}/
install -m 755 build-aux/config.sub ${RPM_BUILD_ROOT}%{_rpmconfigdir}/

mkdir -p ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d
echo "r /var/lib/rpm/__db.*" > ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d/rpm.conf

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
mkdir -p $RPM_BUILD_ROOT/var/lib/rpm

./rpmdb --define "_db_backend ndb" --dbpath=$(pwd)/ndb/ --initdb
cp -va ndb/. $RPM_BUILD_ROOT/var/lib/rpm/

%find_lang %{name}

rm -f $RPM_BUILD_ROOT/%{_rpmconfigdir}/{perldeps.pl,perl.*,pythond*}
rm -f $RPM_BUILD_ROOT/%{_fileattrsdir}/{perl*,python*}
rm -f $RPM_BUILD_ROOT/%{_rpmconfigdir}/{tcl.req,osgideps.pl}
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/dbus-1/system.d/org.rpm.conf
rm -f $RPM_BUILD_ROOT/%{_libdir}/rpm-plugins/fsverity.so
rm -f $RPM_BUILD_ROOT/%{_libdir}/rpm-plugins/dbus_announce.so
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/rpm-plugin-dbus-announce.8*

%check
%ifnarch loongarch64
make check || (cat tests/rpmtests.log; exit 0)
# rpmbuild will automatically remove the build directory since b34333fa.
# But it fails to remove some directories, see the issue #1382. We need
# to explictly make clean it after checking.
make clean
%endif

%posttrans
{
    set -e
    disable_auto_rebuilddb=$(rpm -E 0%%{?_disable_auto_rebuilddb})
    if [ ${disable_auto_rebuilddb} -eq 0 ]; then
        dbpath=$(rpm -E %{_dbpath})
        while [ -e ${dbpath}/Packages ]
        do
            date >> /var/log/rebuilddb.log 2>&1
            rpm -vvv --rebuilddb >> /var/log/rebuilddb.log 2>&1
        done
    fi
} &

%files -f %{name}.lang
%license COPYING
%doc CREDITS
/usr/lib/tmpfiles.d/rpm.conf
%{_sysconfdir}/cron.daily/rpm
%config(noreplace) %{_sysconfdir}/logrotate.d/rpm
%dir %{_sysconfdir}/rpm
%dir /var/lib/rpm
%attr(0644, root, root) %ghost %config(missingok,noreplace) /var/lib/rpm/*
%attr(0644, root, root) %ghost /var/lib/rpm/.*.lock
%lang(fr) %{_mandir}/fr/man[18]/*.[18]*
%lang(ko) %{_mandir}/ko/man[18]/*.[18]*
%lang(ja) %{_mandir}/ja/man[18]/*.[18]*
%lang(pl) %{_mandir}/pl/man[18]/*.[18]*
%lang(ru) %{_mandir}/ru/man[18]/*.[18]*
%lang(sk) %{_mandir}/sk/man[18]/*.[18]*

%attr(0755, root, root) %dir %{_rpmconfigdir}
%{_rpmconfigdir}/macros
%{_rpmconfigdir}/macros.d
%{_rpmconfigdir}/rpmpopt*
%{_rpmconfigdir}/rpmrc
%{_rpmconfigdir}/rpmdb_*
%{_rpmconfigdir}/rpm.daily
%{_rpmconfigdir}/rpm.log
%{_rpmconfigdir}/rpm.supp
%{_rpmconfigdir}/rpm2cpio.sh
%{_rpmconfigdir}/tgpg
%{_rpmconfigdir}/platform
%dir %{_libdir}/rpm-plugins
%{_libdir}/rpm-plugins/digest_list.so
%{_libdir}/rpm-plugins/ima.so
%{_libdir}/rpm-plugins/prioreset.so
%{_libdir}/rpm-plugins/selinux.so
%{_libdir}/rpm-plugins/syslog.so
%dir %{_rpmconfigdir}/fileattrs
%{_bindir}/rpm
%{_bindir}/rpm2archive
%{_bindir}/rpm2cpio
%{_bindir}/rpmdb
%{_bindir}/rpmkeys
%{_bindir}/rpmquery
%{_bindir}/rpmverify
%{_bindir}/rpmsign
%{_bindir}/rpmlua
/usr/lib/rpm/rpmuncompress

%files libs
%{_libdir}/librpm*.so.9*

%files build
%{_bindir}/rpmbuild
%{_bindir}/gendiff
%{_bindir}/rpmspec
%{_mandir}/man1/gendiff.1*
%{_mandir}/man8/rpmbuild.8*
%{_mandir}/man8/rpmdeps.8*
%{_mandir}/man8/rpmspec.8*

%{_rpmconfigdir}/brp-*
%{_rpmconfigdir}/check-*
%{_rpmconfigdir}/find-lang.sh
%{_rpmconfigdir}/*provides*
%{_rpmconfigdir}/*requires*
%{_rpmconfigdir}/*deps*
%{_rpmconfigdir}/*.prov
%{_rpmconfigdir}/*.req
%{_rpmconfigdir}/mkinstalldirs
%{_rpmconfigdir}/fileattrs/*
%{_rpmconfigdir}/config.*

%files -n python3-%{name}
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}*.egg-info

%files devel
%{_bindir}/rpmgraph
%{_libdir}/librp*[a-z].so
%{_libdir}/pkgconfig/%{name}.pc
%{_includedir}/%{name}/

%files plugin-systemd-inhibit
%{_libdir}/rpm-plugins/systemd_inhibit.so
%{_mandir}/man8/rpm-plugin-systemd-inhibit.8*

%files help
%doc docs/manual/[a-z]*
%doc docs/librpm/html/*
%{_mandir}/man8/rpm*.8*
%exclude %{_mandir}/man8/rpm-plugin-systemd-inhibit.8*
%exclude %{_mandir}/man8/rpmbuild.8*
%exclude %{_mandir}/man8/rpmdeps.8*
%exclude %{_mandir}/man8/rpmspec.8*

%changelog
* Tue Jul 21 2026 Funda Wang <fundawang@yeah.net> - 4.18.2-40
- Add the ability for other macro files to pass options to
  the find_debuginfo script via a new variable: _find_debuginfo_vendor_opts
  (https://github.com/rpm-software-management/rpm/pull/3958)

* Tue Jul 21 2026 fly_fzc <2385803914@qq.com> - 4.18.2-39
- adapt CVE-2026-44605 test case

* Fri Jul 17 2026 fly_fzc <2385803914@qq.com> - 4.18.2-38
- fix CVE-2026-44605
- fix tests failed:
    basic file trigger scripts
    rpm -U <corrupted unsigned 1>
    rpm -U <corrupted signed 3>

* Wed Jul 15 2026 shaojiansong <shaojiansong@kylinos.cn> - 4.18.2-37
- Prevent buffer overruns in findPreambleTag() for language string

* Tue Jul 07 2026 zhangyao <zhangyao108@h-partners.com> 4.18.2-36
- Modify the generation logic for self-developed package versions

* Fri Jun 19 2026 Funda Wang <fundawang@yeah.net> - 4.18.2-35
- support building with sequoia

* Sat Jun 06 2026 Funda Wang <fundawang@yeah.net> - 4.18.2-34
- disable automatic maintenance when autopatching with git
  https://github.com/git/git/commit/1942d48380fec53f76361e9adebef15b5db9628a
- sync patches within branches

* Wed Dec 17 2025 hugel <gengqihu2@h-partners.com> - 4.18.2-30
- backport community patches

* Mon Sep 22 2025 hugel <gengqihu2@h-partners.com> - 4.18.2-29
- revert Make brp-strip-comment-note multi process

* Thu Aug 14 2025 fuanan <fuanan3@h-partners.com> - 4.18.2-28
- sync patches from upstream

* Wed Aug 13 2025 fuanan <fuanan3@h-partners.com> - 4.18.2-27
- revert 'backport Remove checks during parsing of packages'

* Fri Jul 18 2025 andy <majianhan@kylinos.cn> - 4.18.2-26
- backport Remove checks during parsing of packages

* Wed Jul 2 2025 andy <liuyang01@kylinos.cn> - 4.18.2-25
- sync patches form upstream

* Mon Jun 16 2025 Linux_zhang <zhangruifang@h-partners.com> - 4.18.2-24
- sync patches from upstream

* Mon Dec 2 2024 hugel<gengqihu2@h-partners.com> - 4.18.2-23
- sync patches from upstream

* Wed Nov 27 2024 hugel<gengqihu2@h-partners.com> - 4.18.2-22
- Require macro filenames to end in alphanum char

* Tue Nov 26 2024 hugel<gengqihu2@h-partners.com> - 4.18.2-21
- sync patches from upstream

* Tue Oct 29 2024 xujing<xujing125@huawei.com> - 4.18.2-20
- Support sm2p256v1 of ECDSA and sm3 of hash

* Sat Oct 26 2024 Funda Wang <fundawang@yeah.net> - 4.18.2-19
- fix RPM_LD_FLAGS not got exported

* Fri Oct 25 2024 xuce<xuce10@h-partners.com> - 4.18.2-18
- Separate the SELinux patch from the IMA digest list patch

* Sun Sep 29 2024 hugel<gengqihu2@h-partners.com> - 4.18.2-17
- Fix testcase failed of rpm addsign

* Wed Sep 18 2024 Funda Wang <fundawang@yeah.net> - 4.18.2-16
- Remove symlinks towards libtool .la also
- cleanup spec

* Wed Sep 11 2024 luhuaxin <luhuaxin1@huawei.com> - 4.18.2-15
- Fix the log level of IMA digest_list

* Wed Sep 4 2024 gengqihu<gengqihu2@h-partners.com> - 4.18.2-14
- Backport some patches from upstream

* Tue Sep 3 2024 gengqihu<gengqihu2@h-partners.com> - 4.18.2-13
- Backport some patches from upstream

* Thu Aug 22 2024 luhuaxin <luhuaxin1@huawei.com> - 4.18.2-12
- Fix the calculation of hdr size

* Tue Aug 20 2024 luhuaxin <luhuaxin1@huawei.com> - 4.18.2-11
- Fix the wrong IMA signature header check

* Mon Aug 19 2024 luhuaxin <luhuaxin1@huawei.com> - 4.18.2-10
- Fix the judgement of digests count

* Fri Aug 16 2024 luhuaxin <luhuaxin1@huawei.com> - 4.18.2-9
- IMA digest list plugin support signature within IMA header

* Wed Jul 24 2024 gengqihu<gengqihu2@h-partners.com> - 4.18.2-8
- Backport some patches from upstream

* Tue Jul 23 2024 zhangxingrong<zhangxingrong@uniontech.cn> - 4.18.2-7
- Free old cookie value to prevent a memory leak

* Mon Jun 3 2024 gengqihu<gengqihu2@h-partners.com> - 4.18.2-6
- Backport some patches from upstream

* Mon Mar 25 2024 hongjinghao<hongjinghao@huawei.com> - 4.18.2-5
- Fix memleak and let eBPF ELF files be packaged in noarch packages

* Thu Mar 21 2024 zhangguangzhi<zhangguangzhi3@huawei.com> - 4.18.2-4
- ima digest list support modsig

* Thu Mar 14 2024 gengqihu<gengqihu2@h-partners.com> - 4.18.2-3
- Backport some patches from upstream

* Wed Feb 21 2024 gengqihu<gengqihu2@h-partners.com> - 4.18.2-2
- Modify the version of zstd in Requires

* Sat Jan 27 2024 xujing<xujing125@huawei.com> - 4.18.2-1
- update version to 4.18.2 (https://rpm.org/wiki/Releases/4.18.2)

* Tue Sep 26 2023 renhongxun<renhongxun@h-partners.com> - 4.18.1-9
- Fix potential segmentation fault

* Fri Sep 08 2023 renhongxun<renhongxun@h-partners.com> - 4.18.1-8
- support _disable_auto_rebuilddb macro in posttrans

* Wed Sep 06 2023 renhongxun<renhongxun@h-partners.com> - 4.18.1-7
- Fix a copy-paste error in --help

* Tue Sep 05 2023 renhongxun<renhongxun@h-partners.com> - 4.18.1-6
- Fix the coredump which may occur during upgrading of rpm

* Tue Sep 5 2023 hongjinghao<hongjinghao@huawei.com> - 4.18.1-5
- Fix a segfault on a non-stringable argument to macro call from Lua

* Tue Aug 29 2023 renhongxun<renhongxun@h-partners.com> - 4.18.1-4
- Check inside --root when querying for files

* Wed Aug 02 2023 renhongxun<renhongxun@h-partners.com> - 4.18.1-3
- backport some patches from upstream

* Fri Jul 21 2023 xujing<xujing125@huawei.com> - 4.18.1-2
- fix Unbundle-config-site-and-add-RPM-LD-FLAGS-macro.patch is incorrectly adapted

* Tue Jun 20 2023 renhongxun<renhongxun@h-partners.com> - 4.18.1-1
- upgrade version to 4.18.1

* Tue Jun 20 2023 renhongxun<renhongxun@h-partners.com> - 4.18.0-11
- Fix per-file plugin hook regression introduced in 4.18

* Mon Jun 19 2023 renhongxun<renhongxun@h-partners.com> - 4.18.0-10
- Fix a segfault on a non-stringable argument to macro call from Lua

* Fri Jun 16 2023 zhoushuiqing<zhoushuiqing2@huawei.com> - 4.18.0-9
* Add digest list plugin support

* Wed Jun 14 2023 renhongxun<renhongxun@h-partners.com> - 4.18.0-8
* Fix a copy-paste --help description of --whatconflicts

* Tue Feb 28 2023 renhongxun<renhongxun@h-partners.com> - 4.18.0-7
- bugfix with upstream patches about fifo

* Wed Feb 08 2023 gaoyusong<gaoyusong2@huawei.com> - 4.18.0-6
- Revert digest list patches

* Wed Feb 08 2023 gaoyusong<gaoyusong2@huawei.com> - 4.18.0-5
- Sync IMA related patches

* Wed Feb 08 2023 gaoyusong<gaoyusong2@huawei.com> - 4.18.0-4
- Add digest list plugin support

* Mon Feb 06 2023 xujing<xujing125@huawei.com> - 4.18.0-3
- make clean after check to adapt rpm upstream logic

* Mon Feb 06 2023 xujing<xujing125@huawei.com> - 4.18.0-2
- don't automatically execute rmbuild

* Thu Feb 02 2023 xujing<xujing125@huawei.com> - 4.18.0-1
- update version to 4.18.0

* Mon Dec 26 2022 xujing<xujing125@huawei.com> - 4.17.0-21
- backport patches from upstream to fix resource leak

* Mon Dec 19 2022 xujing<xujing125@huawei.com> - 4.17.0-20
- Fix file leak when src rpm in URL format is used for installation

* Mon Dec 19 2022 xujing<xujing125@huawei.com> - 4.17.0-19
- backport patches from upstream to fix memleak

* Mon Nov 28 2022 renhongxun<renhongxun@h-partners.com> - 4.17.0-18
- Move file metadata setting back to unpack stage

* Fri Nov 18 2022 huajingyun<huajingyun@loongson.cn> - 4.17.0-17
- add default machine name loongarch support
- disable test on loongarch

* Wed Nov 16 2022 xujing<xujing125@huawei.com> - 4.17.0-16
- rpm: fix rpm is blocked when open fifo file

* Tue Nov 15 2022 yuelg<yuelg@chinaunicom.cn> - 4.17.0-15
- Move rpm-build's help to rpm binary package

* Mon Nov 14 2022 wuzx<wuzx1226@qq.com> - 4.17.0-14
- Add sw64 architecture

* Tue Nov 01 2022 licunlong<licunlong1@huawei.com> - 4.17.0-13
- sync patches from upstream

* Fri Sep 09 2022 renhongxun<renhongxun@h-partners.com> - 4.17.0-12
- sync patches from upstream

* Wed Aug 31 2022 Hongxun Ren<renhongxun@h-partners.com> - 4.17.0-11
- fix CVE-2021-35937 CVE-2021-35938 CVE-2021-35939

* Tue Aug 16 2022 Kou Wenqi<kouwenqi@kylinos.cn> - 4.17.0-10
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:requires zstd-devel >= 1.3.8 in build

* Mon Aug 15 2022 Kou Wenqi<kouwenqi@kylinos.cn> - 4.17.0-9
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:requires zstd >= 1.4.0

* Thu Aug 11 2022 renhongxun<renhongxun@h-partners.com> - 4.17.0-8
- sync some patches from upstream

* Thu Aug 11 2022 renhongxun<renhongxun@h-partners.com> - 4.17.0-7
- sync some patches from upstream

* Thu Aug 11 2022 renhongxun<renhongxun@h-partners.com> - 4.17.0-6
- sync some patches from upstream

* Tue Aug 09 2022 renhongxun<renhongxun@h-partners.com> - 4.17.0-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:sync changes from openEuler-22.03-LTS

*Sat Jun 25 2022 lujie<lujie54@huawei.com> - 4.17.0-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:rpm selinux plugin check context file exist

*Thu Feb 17 2022 renhongxun<renhongxun@h-partners.com> - 4.17.0-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:delete some libdb symbolic link

* Wed Feb 16 2022 renhongxun<renhongxun@h-partners.com> - 4.17.0-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:bugfix on finding python3.x dir

* Mon Dec 27 2021 renhongxun<renhongxun@huawei.com> - 4.17.0-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:upgrade to 4.17.0

* Mon Sep 13 2021 zhangtianxing<zhangtianxing3@huawei.com> - 4.15.1-30
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix lsetxattr error in container

* Thu Jul 22 2021 liudabo<liudabo1@huawei.com> - 4.15.1-29
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:deleting gdb build dependency

* Thu Jul 08 2021 shixuantong <shixuantong@huawei.com> - 4.15.1-28
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:split rpm-plugin-systemd-inhibit out of rpm.

* Thu Jul 08 2021 shixuantong <shixuantong@huawei.com> - 4.15.1-27
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:remove unnecessary installation dependencies

* Mon Jun 28 2021 shangyibin <shangyibin1@huawei.com> - 4.15.1-26
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:modify dependency

* Wed Jun 09 2021 shixuantong <shixuantong@huawei.com> - 4.15.1-25
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Fix data race in packageBinaries() function and prioritize large packages

* Wed Jun 2 2021 guoxiaoqi<guoxiaoqi2@huawei.com> - 4.15.1-23
- Type:cve
- ID:NA
- SUG:NA
- DESC:fix CVE-2021-20266

* Sat May 22 2021 liudabo<liudabo1@huawei.com> - 4.15.1-22
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Optimize signature header merge a bit

* Tue Apr 13 2021 liudabo<liudabo1@huawei.com> - 4.15.1-22
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:Fix CVE-2021-20271

* Mon Jan 11 2021 Liquor <lirui130@huawei.com> - 4.15.1-21
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:backport patches from upstream

* Thu Dec 17 2020 Anakin Zhang <benjamin93@163.com> - 4.15.1-20
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:call process_digest_list before files are added

* Thu Dec 17 2020 Anakin Zhang <benjamin93@163.com> - 4.15.1-19
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:use user.digest_list to avoid duplicate processing of the digest lists

* Thu Oct 29 2020 Liquor <lirui130@huawei.com> - 4.15.1-18
- Type:requirement
- ID:NA
- SUG:NA
- DESC:remove python2

* Tue Jul 14 2020 Roberto Sassu <roberto.sassu@huawei.com> - 4.15.1-17
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:add support for digest lists

* Fri May 22 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-16
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:solve the error of setexecfilecon

* Wed May 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-15
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:solve the failure of rpmsigdig.at test

* Mon Mar 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-14
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add requires of some common build packages to rpm-build

* Wed Mar 25 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-13
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:revert always execute file trigger scriptlet callbacks with owning header

* Fri Mar 6 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-12
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:silence spurious error message from lsetfilecon()

* Wed Mar 4 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-11
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add dist to release by default

* Mon Mar 2 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-10
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:revert last commit

* Thu Feb 27 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-9
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add dist to the name of package

* Fri Feb 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-8
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:skip update the preference of gpg during make check

* Mon Jan 20 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-7
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:delete unneeded obsoletes

* Sat Jan 18 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-6
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:delete unneeded shared library

* Tue Jan 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:change requires to build requires

* Tue Jan 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add build requires of ima-evm-utils and old shared library

* Mon Jan 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add requires of shared library

* Mon Jan 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add subpack of librpm8 and librpm9 to support update

* Fri Jan 10 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.1-1
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:update version to 4.15.1

* Tue Dec 24 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.14.2-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:bugfix in files

* Wed Nov 13 2019 hexiaowen<hexiaowen@huawei.com> - 4.14.2-4
- add system-rpm-config buildrequires

* Fri Sep 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.14.2-3
- Delete redundant information

* Mon Sep 09 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.14.2-2
- Package init