patch/patch.spec
Xibo.Wang 3e3761cbac Bakport commits from upstream
1. Skip "ed" test when the ed utility is not installed
	https://git.savannah.gnu.org/gitweb/?p=patch.git;a=commit;h=a5b442c
2. Abort when cleaning up fails
	https://git.savannah.gnu.org/gitweb/?p=patch.git;a=commit;h=b7b028a
3. Don't crash when RLIMIT_NOFILE is set to RLIM_INFINITY
	https://git.savannah.gnu.org/gitweb/?p=patch.git;a=commit;h=61d7788
4. Avoid invalid memory access in context format diffs
	https://git.savannah.gnu.org/gitweb/?p=patch.git;a=commit;h=15b158d
5. Fix failed assertion 'outstate->after_newline'
	https://git.savannah.gnu.org/gitweb/?p=patch.git;a=commit;h=76e7758
6. Add missing-section tests to context-format test case
	https://git.savannah.gnu.org/gitweb/?p=patch.git;a=commit;h=78ed9de
7. Fix test for presence of BASH_LINENO[0]
	https://git.savannah.gnu.org/gitweb/?p=patch.git;a=commit;h=7623b2d
2022-12-30 16:04:49 +08:00

140 lines
4.4 KiB
RPMSpec

Name: patch
Version: 2.7.6
Release: 20
Summary: Utiliity which applies a patch file to original files.
License: GPLv3+
URL: http://www.gnu.org/software/patch/patch.html
Source0: https://ftp.gnu.org/gnu/patch/patch-%{version}.tar.xz
Patch0: patch-CVE-2018-1000156.patch
Patch1: CVE-2018-6951.patch
Patch2: Fix-check-of-return-value-of-fwrite.patch
Patch3: Don-t-leak-temporary-file-on-failed-ed-style-patch.patch
Patch4: Don-t-leak-temporary-file-on-failed-multi-file-ed-st.patch
Patch5: Fix-swapping-fake-lines-in-pch_swap.patch
Patch6: CVE-2018-20969-and-CVE-2019-13638.patch
Patch7: CVE-2019-13636.patch
Patch8: patch-selinux.patch
Patch9: Avoid-set_file_attributes-sign-conversion-warnings.patch
Patch10: Test-suite-compatibility-fixes.patch
Patch11: Test-suite-fix-Korn-shell-incompatibility.patch
Patch12: backport-maint-avoid-warnings-from-GCC8.patch
Patch13: backport-Make-the-debug-2-output-more-useful.patch
Patch14: backport--Improve-support-for-memory-leak-detection.patch
Patch15: backport-Skip-ed-test-when-the-ed-utility-is-not-installed.patch
Patch16: backport-Abort-when-cleaning-up-fails.patch
Patch17: backport-Don-t-crash-when-RLIMIT_NOFILE-is-set-to-RLIM_INFINI.patch
Patch18: backport-Avoid-invalid-memory-access-in-context-format-diffs.patch
Patch19: backport-Fix-failed-assertion-outstate-after_newline.patch
Patch20: backport-Add-missing-section-tests-to-context-format-test-cas.patch
Patch21: backport-Fix-test-for-presence-of-BASH_LINENO-0.patch
BuildRequires: gcc libselinux-devel libattr-devel ed
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-root
%description
Patch takes a patch file containing a difference listing produced by the
diff program and applies those differences to one or more original files,
producing patched versions.
%package help
Summary: help document
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description help
This package provides help document for patch.
%prep
%autosetup -p1
%build
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
%configure --disable-silent-rules
%make_build
%check
%make_build check
%install
%makeinstall
%files
%defattr(-,root,root)
%doc README ChangeLog
%license COPYING
%{_bindir}/patch
%files help
%defattr(-,root,root)
%doc NEWS
%{_mandir}/man1/*
%changelog
* Fri Dec 30 2022 Xibo.Wang <wangxb12@chinatelecom.cn> - 2.7.6-20
- Skip "ed" test when the ed utility is not installed
- Abort when cleaning up fails
- Don't crash when RLIMIT_NOFILE is set to RLIM_INFINITY
- Avoid invalid memory access in context format diffs
- Fix failed assertion 'outstate->after_newline'
- Add missing-section tests to context-format test case
- Fix test for presence of BASH_LINENO[0]
* Wed Dec 28 2022 Xibo.Wang <wangxb12@chinatelecom.cn> - 2.7.6-19
- Improve support for memory leak detection
* Wed Dec 28 2022 Xibo.Wang <wangxb12@chinatelecom.cn> - 2.7.6-18
- Make the (debug & 2) output more useful
* Wed Dec 28 2022 Xibo.Wang <wangxb12@chinatelecom.cn> - 2.7.6-17
- maint: avoid warnings from GCC8
* Wed Dec 28 2022 Xibo.Wang <wangxb12@chinatelecom.cn> - 2.7.6-16
- Test suite: fix Korn shell incompatibility
* Wed Dec 28 2022 Xibo.Wang <wangxb12@chinatelecom.cn> - 2.7.6-15
- Test suite compatibility fixes
* Wed Dec 28 2022 Xibo.Wang <wangxb12@chinatelecom.cn> - 2.7.6-14
- Avoid set_file_attributes sign conversion warnings
* Wed Oct 19 2022 fuanan <fuanan3@h-partners.com> - 2.7.6-13
- optimize check by running make in parallel
* Wed Mar 18 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.7.6-12
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Fix memory leak
* Mon Feb 3 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.7.6-11
- Type:CVE
- ID:NA
- SUG:NA
- DESC:Fix CVE-2019-13636
* Thu Jan 9 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.7.6-10
- Type:NA
- ID:NA
- SUG:NA
- DESC:delete redundant file
* Mon Dec 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.7.6-9
- Type:NA
- ID:NA
- SUG:NA
- DESC:modify email adress
* Mon Dec 16 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.7.6-8
- Type:CVE
- ID:NA
- SUG:NA
- DESC:fix CVE-2018-20969 CVE-2019-13638
* Mon Oct 21 2019 shenyangyang <shenyangyang4@huawei.com> - 2.7.6-7
- Type:NA
- ID:NA
- SUG:NA
- DESC:move README and ChangeLog to main package
* Wed Aug 28 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.7.6-6
- Package Init