8b1fd4
Summary: The GNU disk partition manipulation program
8b1fd4
Name:    parted
04e2fe
Version: 3.5
04e2fe
Release: 2%{?dist}
8b1fd4
License: GPLv3+
8b1fd4
URL:     http://www.gnu.org/software/parted
8b1fd4
8b1fd4
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
8b1fd4
Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
8b1fd4
Source2: pubkey.phillip.susi
8b1fd4
Source3: pubkey.brian.lane
8b1fd4
04e2fe
# Upstream patches since v3.5 release
04e2fe
Patch0001: 0001-maint-post-release-administrivia.patch
04e2fe
Patch0002: 0002-parted-add-type-command.patch
04e2fe
Patch0003: 0003-libparted-add-swap-flag-for-DASD-label.patch
04e2fe
Patch0004: 0004-parted-Reset-the-filesystem-type-when-changing-the-i.patch
04e2fe
Patch0005: 0005-tests-t3200-type-change-now-passes.patch
04e2fe
Patch0006: 0006-libparted-Fix-handling-of-gpt-partition-types.patch
04e2fe
Patch0007: 0007-tests-Add-a-libparted-test-for-ped_partition_set_sys.patch
04e2fe
Patch0008: 0008-libparted-Fix-handling-of-msdos-partition-types.patch
04e2fe
Patch0009: 0009-tests-Add-a-libparted-test-for-ped_partition_set_sys.patch
04e2fe
8b1fd4
8b1fd4
BuildRequires: gcc
8b1fd4
BuildRequires: e2fsprogs-devel
8b1fd4
BuildRequires: readline-devel
8b1fd4
BuildRequires: ncurses-devel
8b1fd4
BuildRequires: gettext-devel
8b1fd4
BuildRequires: texinfo
8b1fd4
BuildRequires: device-mapper-devel
8b1fd4
BuildRequires: libuuid-devel
8b1fd4
BuildRequires: libblkid-devel >= 2.17
8b1fd4
BuildRequires: gnupg2
8b1fd4
BuildRequires: git
04e2fe
BuildRequires: autoconf
04e2fe
BuildRequires: automake
04e2fe
BuildRequires: libtool
8b1fd4
BuildRequires: e2fsprogs
8b1fd4
BuildRequires: xfsprogs
8b1fd4
BuildRequires: dosfstools
8b1fd4
BuildRequires: perl-Digest-CRC
8b1fd4
BuildRequires: bc
8b1fd4
Buildrequires: python3
8b1fd4
BuildRequires: gperf
8b1fd4
BuildRequires: make
04e2fe
BuildRequires: check-devel
8b1fd4
8b1fd4
# bundled gnulib library exception, as per packaging guidelines
8b1fd4
# https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries
8b1fd4
Provides: bundled(gnulib)
8b1fd4
8b1fd4
%description
8b1fd4
The GNU Parted program allows you to create, destroy, resize, move,
8b1fd4
and copy hard disk partitions. Parted can be used for creating space
8b1fd4
for new operating systems, reorganizing disk usage, and copying data
8b1fd4
to new hard disks.
8b1fd4
8b1fd4
8b1fd4
%package devel
8b1fd4
Summary:  Files for developing apps which will manipulate disk partitions
8b1fd4
Requires: %{name} = %{version}-%{release}
8b1fd4
Requires: pkgconfig
8b1fd4
8b1fd4
%description devel
8b1fd4
The GNU Parted library is a set of routines for hard disk partition
8b1fd4
manipulation. If you want to develop programs that manipulate disk
8b1fd4
partitions and filesystems using the routines provided by the GNU
8b1fd4
Parted library, you need to install this package.
8b1fd4
8b1fd4
8b1fd4
%prep
8b1fd4
%autosetup -S git_am
8b1fd4
gpg2 --import %{SOURCE2} %{SOURCE3}
8b1fd4
gpg2 --verify %{SOURCE1} %{SOURCE0}
8b1fd4
iconv -f ISO-8859-1 -t UTF8 AUTHORS > tmp; touch -r AUTHORS tmp; mv tmp AUTHORS
8b1fd4
8b1fd4
%build
04e2fe
# RHEL has 2.69 which works fine with the macros parted uses
04e2fe
sed -i s/2.71/2.69/ configure.ac
04e2fe
autoreconf -fiv
8b1fd4
CFLAGS="$RPM_OPT_FLAGS -Wno-unused-but-set-variable"; export CFLAGS
8b1fd4
%configure --disable-static --disable-gcc-warnings
8b1fd4
# Don't use rpath!
8b1fd4
%{__sed} -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
8b1fd4
%{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
8b1fd4
%make_build
8b1fd4
8b1fd4
8b1fd4
%install
8b1fd4
%{__rm} -rf %{buildroot}
8b1fd4
%make_install
8b1fd4
8b1fd4
# Remove components we do not ship
8b1fd4
%{__rm} -rf %{buildroot}%{_libdir}/*.la
8b1fd4
%{__rm} -rf %{buildroot}%{_infodir}/dir
8b1fd4
%{__rm} -rf %{buildroot}%{_bindir}/label
8b1fd4
%{__rm} -rf %{buildroot}%{_bindir}/disk
8b1fd4
8b1fd4
%find_lang %{name}
8b1fd4
8b1fd4
8b1fd4
%check
8b1fd4
export LD_LIBRARY_PATH=$(pwd)/libparted/.libs:$(pwd)/libparted/fs/.libs
8b1fd4
make check
8b1fd4
8b1fd4
%files -f %{name}.lang
8b1fd4
%doc AUTHORS NEWS README THANKS
8b1fd4
%{!?_licensedir:%global license %%doc}
8b1fd4
%license COPYING
8b1fd4
%{_sbindir}/parted
8b1fd4
%{_sbindir}/partprobe
8b1fd4
%{_mandir}/man8/parted.8.gz
8b1fd4
%{_mandir}/man8/partprobe.8.gz
8b1fd4
%{_libdir}/libparted.so.2
04e2fe
%{_libdir}/libparted.so.2.0.4
8b1fd4
%{_libdir}/libparted-fs-resize.so.0
04e2fe
%{_libdir}/libparted-fs-resize.so.0.0.4
8b1fd4
%{_infodir}/parted.info.*
8b1fd4
8b1fd4
%files devel
8b1fd4
%doc TODO doc/API doc/FAT
8b1fd4
%{_includedir}/parted
8b1fd4
%{_libdir}/libparted.so
8b1fd4
%{_libdir}/libparted-fs-resize.so
8b1fd4
%{_libdir}/pkgconfig/libparted.pc
8b1fd4
%{_libdir}/pkgconfig/libparted-fs-resize.pc
8b1fd4
8b1fd4
8b1fd4
%changelog
04e2fe
* Tue Aug 09 2022 Brian C. Lane <bcl@redhat.com> - 3.5-2
04e2fe
- Fix ped_partition_set_system handling of existing flags
04e2fe
  Resolves: rhbz#2116505
04e2fe
04e2fe
* Fri May 27 2022 Brian C. Lane <bcl@redhat.com> - 3.5-1
04e2fe
- Rebase to upstream release 3.5
04e2fe
- Drop patches included in new upstream tar
04e2fe
- Add upstream patches for new type command
04e2fe
- Add upstream patch for swap flag on DASD
04e2fe
  Resolves: rhbz#1999333
04e2fe
8b1fd4
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.4-6
8b1fd4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
8b1fd4
  Related: rhbz#1991688
8b1fd4
8b1fd4
* Tue Jun 15 2021 Brian C. Lane <bcl@redhat.com> - 3.4-5
8b1fd4
- Install to /usr/sbin and /usr/lib64
8b1fd4
  Resolves: rhbz#1972346
8b1fd4
8b1fd4
* Thu Jun 10 2021 Brian C. Lane <bcl@redhat.com> - 3.4-4
8b1fd4
- Fix issues that covscan classifies as important
8b1fd4
  Resolves: rhbz#1938836
8b1fd4
- Work around a mkswap bug
8b1fd4
8b1fd4
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.4-3
8b1fd4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
8b1fd4
8b1fd4
* Wed Feb 03 2021 Brian C. Lane <bcl@redhat.com> - 3.4-2
8b1fd4
- Add --fix support from upstream
8b1fd4
8b1fd4
* Wed Jan 27 2021 Brian C. Lane <bcl@redhat.com> - 3.4-1
8b1fd4
- New stable upstream release v3.4
8b1fd4
8b1fd4
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.52-2
8b1fd4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
8b1fd4
8b1fd4
* Mon Dec 14 2020 Brian C. Lane <bcl@redhat.com> - 3.3.52-1
8b1fd4
- New upstream ALPHA release v3.3.52
8b1fd4
- Includes all patches
8b1fd4
8b1fd4
* Mon Nov 30 2020 Brian C. Lane <bcl@redhat.com> - 3.3-8
8b1fd4
- Add upstream commits to fix various gcc 10 warnings (bcl)
8b1fd4
8b1fd4
* Thu Nov 05 2020 Brian C. Lane <bcl@redhat.com> - 3.3-7
8b1fd4
- Do not link to libselinux
8b1fd4
8b1fd4
* Fri Sep 25 2020 Brian C. Lane <bcl@redhat.com> - 3.3-6
8b1fd4
- tests: Add a test for resizepart on a busy partition (bcl)
8b1fd4
- parted: Preserve resizepart End when prompted for busy partition (bcl)
8b1fd4
- tests: Add f2fs to the fs probe test (romain.perier)
8b1fd4
- Add support for the F2FS filesystem (romain.perier)
8b1fd4
- Removed reference to ped_file_system_create (max)
8b1fd4
8b1fd4
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-5
8b1fd4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
8b1fd4
8b1fd4
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 3.3-4
8b1fd4
- Use make macros
8b1fd4
  https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
8b1fd4
- Switch to using %%autosetup instead of %%setup and git (bcl)
8b1fd4
- Update tests.yml to install git and simplify source usage (bgoncalv)
8b1fd4
8b1fd4
* Fri Mar 06 2020 Brian C. Lane <bcl@redhat.com> - 3.3-3
8b1fd4
- Add chromeos_kernel partition flag for gpt disklabels
8b1fd4
- Add bls_boot partition flag for msdos and gpt disklabels
8b1fd4
8b1fd4
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-3
8b1fd4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
8b1fd4
8b1fd4
* Mon Dec 16 2019 Brian C. Lane <bcl@redhat.com> - 3.3-2
8b1fd4
- tests: Test incomplete resizepart command
8b1fd4
- Fix end_input usage in do_resizepart
8b1fd4
  Resolves: rhbz#1701411
8b1fd4
8b1fd4
* Fri Oct 11 2019 Brian C. Lane <bcl@redhat.com> - 3.3-1
8b1fd4
- New upstream release v3.3
8b1fd4
  Includes the DASD virtio-blk fix.
8b1fd4
- Dropping pre-3.2 changelog entries