238 lines
6.7 KiB
RPMSpec
238 lines
6.7 KiB
RPMSpec
#needsrootforbuild
|
|
|
|
# This SPEC file come from GNU Parted Project(git://git.savannah.gnu.org/parted.git)
|
|
# Default to disabling device-mapper and SELinux
|
|
%define use_devmapper 0
|
|
%define use_selinux 0
|
|
%define use_sepol 0
|
|
|
|
# Enable device-mapper support if we find devmapper
|
|
%define use_devmapper %(pkg-config --libs devmapper >/dev/null 2>&1; [ $? -eq 0 ] && echo 1)
|
|
|
|
# Enable SELinux if we find libselinux and libsepol
|
|
%define use_selinux %([ -r %{_libdir}/libselinux.a ] && echo 1)
|
|
%define use_sepol %([ -r %{_libdir}/libsepol.so ] && echo 1)
|
|
|
|
Summary: The GNU disk partition manipulation program
|
|
Name: parted
|
|
Version: 3.4
|
|
Release: 4
|
|
URL: https://www.gnu.org/software/parted/
|
|
Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
|
License: GPLv3+
|
|
|
|
BuildRequires: e2fsprogs-devel e2fsprogs xfsprogs readline-devel ncurses-devel gettext-devel python3 gperf
|
|
BuildRequires: autoconf automake libtool gettext-devel texinfo pkgconfig gcc make bc dosfstools gnupg2 device-mapper-devel
|
|
BuildRequires: libblkid-devel >= 2.17
|
|
BuildRequires: device-mapper-devel, libselinux-devel libsepol-devel
|
|
|
|
Patch1: 0001-add-support-of-gpt_sync_mbr.patch
|
|
Patch2: 0002-Add-extra-judgment-for-a-partition-created-success.patch
|
|
Patch3: 0003-bugfix-parted-fix-failure-of-mklabel-gpt_sync_mbr.patch
|
|
Patch4: 0004-hfsplus_btree_search-free-node-when-hfsplus_file_rea.patch
|
|
Patch5: 0005-amiga_read-need-free-part-and-partition-when-constra.patch
|
|
Patch6: 0006-scsi_get_product_info-fix-memleak-and-avoid-to-use-N.patch
|
|
Patch7: 0007-fat_op_context_new-free-ctx-remap-and-goto-correct-l.patch
|
|
Patch8: 0008-hfsplus_cache_from_extent-fix-memleak.patch
|
|
Patch9: 0009-fat_clobber-set-boot_sector-NULL-and-free-boot_secto.patch
|
|
|
|
%description
|
|
The GNU Parted program allows you to create, destroy, resize, move,
|
|
and copy hard disk partitions. Parted can be used for creating space
|
|
for new operating systems, reorganizing disk usage, and copying data
|
|
to new hard disks.
|
|
|
|
%package devel
|
|
Summary: Files for developing apps which will manipulate disk partitions
|
|
Requires: %{name} = %{version}-%{release}
|
|
%description devel
|
|
The GNU Parted library is a set of routines for hard disk partition
|
|
manipulation. If you want to develop programs that manipulate disk
|
|
partitions and filesystems using the routines provided by the GNU
|
|
Parted library, you need to install this package.
|
|
|
|
%prep
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
%build
|
|
autoreconf -i
|
|
autoconf
|
|
%configure \
|
|
--enable-shared \
|
|
%if "%{use_devmapper}" == "1"
|
|
--enable-device-mapper \
|
|
%else
|
|
--disable-devmapper \
|
|
%endif
|
|
%if "%{use_selinux}" == "1" && "%{use_sepol}" == "1"
|
|
--enable-selinux \
|
|
%else
|
|
--disable-selinux \
|
|
%endif
|
|
--enable-part-static \
|
|
--enable-Werror=no \
|
|
--disable-dynamic-loading \
|
|
--disable-gcc-warnings
|
|
|
|
%{disable_rpath}
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
%install
|
|
%{__rm} -rf %{buildroot}
|
|
%{__make} install DESTDIR=%{buildroot}
|
|
%{delete_la_and_a}
|
|
%{__rm} -rf %{buildroot}%{_infodir}/dir
|
|
%find_lang %{name}
|
|
|
|
%clean
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
%check
|
|
export LD_LIBRARY_PATH=$(pwd)/libparted/.libs:$(pwd)/libparted/fs/.libs
|
|
make check
|
|
|
|
%post
|
|
if [ -f %{_infodir}/parted.info.gz ]; then
|
|
/sbin/install-info %{_infodir}/parted.info.gz %{_infodir}/dir || :
|
|
fi
|
|
|
|
%preun
|
|
if [ $1 = 0 ]; then
|
|
/sbin/install-info --delete %{_infodir}/parted.info.gz %{_infodir}/dir >/dev/null 2>&1 || :
|
|
fi
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%files -f %{name}.lang
|
|
%license COPYING
|
|
%doc README doc/API doc/FAT
|
|
%{_sbindir}/parted
|
|
%{_sbindir}/partprobe
|
|
%{_libdir}/libparted*.so.*
|
|
%{_mandir}/man8/parted.8.gz
|
|
%{_mandir}/man8/partprobe.8.gz
|
|
%{_infodir}/parted.info.gz
|
|
|
|
%files devel
|
|
%{_includedir}/parted
|
|
%{_libdir}/libparted*.so
|
|
%{_libdir}/pkgconfig/libparted*.pc
|
|
|
|
%changelog
|
|
* Thu Mar 3 2022 Li Jinlin <lijinlin3@huawei.com> - 3.4-4
|
|
- fix memory leak in libparted
|
|
|
|
* Thu Mar 3 2022 Li Jinlin <lijinlin3@huawei.com> - 3.4-3
|
|
- add need root for build
|
|
|
|
* Tue Dec 21 2021 Chenxi Mao <chenxi.mao@suse.com> - 3.4-2
|
|
- fix build error on SUSE Euler 2.0
|
|
|
|
* Tue Nov 23 2021 yanglongkang <yanglongkang@huawei.com> - 3.4-1
|
|
- update to 3.4
|
|
|
|
* Sat Aug 1 2020 volcanodragon <linfeilong@huawei.com> - 3.3-7
|
|
- delete useless file
|
|
|
|
* Sun Jul 12 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 3.3-6
|
|
- backport bugfix patches
|
|
|
|
* Sun Jul 5 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 3.3-5
|
|
- remove useless readme files
|
|
|
|
* Mon Jun 29 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 3.3-4
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC: renumber patches
|
|
|
|
* Wed Jun 17 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 3.3-3
|
|
- Type:bugfix
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC: add parted.tar.gz.sig file in Source tag
|
|
|
|
* Sat Mar 14 2020 hy-euler <eulerstoragemt@huawei.com> - 3.3-2
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC: delete -Sgit in %autosetup
|
|
|
|
* Wed Feb 19 2020 hy-euler <eulerstoragemt@huawei.com> - 3.3-1
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC:Add check part and enable pc98 in spec file
|
|
|
|
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.3-0
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC:update package from 3.2 to 3.3
|
|
|
|
* Tue Dec 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.2-39
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC:delete unused file
|
|
|
|
* Sat Sep 21 2019 suweifeng <suweifeng1@huawei.com> - 3.2-38
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC:License update
|
|
|
|
* Mon Sep 09 2019 suweifeng <suweifeng1@huawei.com> - 3.2-37
|
|
- Type:enhancement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC:openEuler Debranding
|
|
|
|
* Tue Aug 20 2019 luoshijie<luoshijie1@huawei.com> - 3.2-36.h5
|
|
- Type:bugfix
|
|
- ID:NA
|
|
- SUG:restart
|
|
- DESC:change name of patch.
|
|
|
|
* Wed May 8 2019 louhongxiang<louhongxiang@huawei.com> - 3.2-36.h4
|
|
- Type:bugfix
|
|
- ID:NA
|
|
- SUG:restart
|
|
- DESC:change name of patch.
|
|
|
|
* Thu Mar 21 2019 louhongxiang<louhongxiang@huawei.com> - 3.2-36.h3
|
|
- Type:bugfix
|
|
- ID:NA
|
|
- SUG:restart
|
|
- DESC:add support for gpt_sync_mbr and fix failure of it.
|
|
|
|
* Wed Mar 20 2019 yanghua<yanghua21@huawei.com> - 3.2-36.h2
|
|
- Type:bugfix
|
|
- ID:NA
|
|
- SUG:restart
|
|
- DESC:parted fix crash due to improper partition number in
|
|
parted fix wrong error label jump in mkpart
|
|
clean the disk information when commands fail in int
|
|
libparted Fix ending CHS address in PMBR
|
|
Fix the length of several strncpy calls
|
|
parted.c Always free peek_word
|
|
parted.c Make sure dev_name is freed
|
|
Fix potential command line buffer overflow
|
|
|
|
* Fri Jan 25 2019 Xiaoqi Guo<guoxiaoqi2@huawei.com> - 3.2-36.h1
|
|
- Type:new-packages
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC:add patches, include
|
|
huawei-bugfix-Add-extra-judgment-for-a-partition-created-success.patch
|
|
huawei-bugfix-add-support-of-gpt_sync_mbr.patch
|
|
|
|
|
|
* Tue Mar 13 2007 David Cantrell <dcantrell@redhat.com>
|
|
- Updated spec file
|
|
|
|
* Mon Mar 13 2000 Fabian Emmes <fab@orlen.de>
|
|
- changed "unset LINGUAS" line
|
|
- reintroduced %build section ;)
|
|
- started changelog
|