!100 解决X86/ARM下e2fsprogs.i686包和e2fsprogs.x86_64在替换过程中冲突的问题

From: @handsome_brother 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
This commit is contained in:
openeuler-ci-bot 2022-06-23 08:01:44 +00:00 committed by Gitee
commit 9bb10fcb05
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 38 additions and 1 deletions

View File

@ -1,10 +1,11 @@
Name: e2fsprogs
Version: 1.46.4
Release: 10
Release: 11
Summary: Second extended file system management tools
License: GPLv2+ and LGPLv2 and MIT
URL: http://e2fsprogs.sourceforge.net/
Source0: https://www.kernel.org/pub/linux/kernel/people/tytso/%{name}/v%{version}/%{name}-%{version}.tar.xz
Source1: ext2_types-wrapper.h
Patch1: 0001-e2fsprogs-set-hugefile-from-4T-to-1T-in-hugefile-tes.patch
Patch2: 0002-libss-add-newer-libreadline.so.8-to-dlopen-path.patch
@ -83,11 +84,28 @@ make install install-libs DESTDIR=%{buildroot} INSTALL="%{__install} -p" \
root_sbindir=%{_sbindir} root_libdir=%{_libdir}
chmod +w %{buildroot}%{_libdir}/*.a
# Replace arch-dependent header file with arch-independent stub (when needed).
#%multilib_fix_c_header --file %{_includedir}/ext2fs/ext2_types.h
# ugly hack to allow parallel install of 32-bit and 64-bit -devel packages:
%define multilib_arches %{ix86} x86_64
%ifarch %{multilib_arches}
mv -f %{buildroot}%{_includedir}/ext2fs/ext2_types.h \
%{buildroot}%{_includedir}/ext2fs/ext2_types-%{_arch}.h
install -p -m 644 %{SOURCE1} %{buildroot}%{_includedir}/ext2fs/ext2_types.h
%endif
%find_lang %{name}
rm -f %{buildroot}/etc/cron.d/e2scrub_all
rm -f %{buildroot}%{_libdir}/e2fsprogs/e2scrub_all_cron
%ifarch i686
rm -rf %{buildroot}%{_unitdir}/e2scrub*
%endif
%check
make fullcheck
@ -119,7 +137,9 @@ exit 0
%{_libdir}/libss.so.*
%{_sbindir}/*
%{_udevrulesdir}/*.rules
%ifnarch i686
%{_unitdir}/e2scrub*
%endif
%files devel
%{_bindir}/compile_et
@ -143,6 +163,9 @@ exit 0
%{_mandir}/man8/*
%changelog
* Tue Jun 21 2022 lihaoxiang <lihaoxiang9@huawei.com> - 1.46.4-11
- DESC:add wrapper header file for i686 and x86_64 then fix conflicts when intall i686 rpms.
* Sat May 28 2022 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 1.46.4-10
- fix CVE-2022-1304

14
ext2_types-wrapper.h Normal file
View File

@ -0,0 +1,14 @@
/* This file is here to prevent a file conflict on multiarch systems. A
* conflict will occur because ext2_types.h has arch-specific definitions.
*
* DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */
#if defined(__i386__)
#include "ext2_types-i386.h"
#elif defined(__x86_64__)
#include "ext2_types-x86_64.h"
#elif defined(__arm__)
#include "ext2_types-arm.h"
#else
#error "This e2fsprogs-devel package does not work your architecture?"
#endif