# 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.2 Release: 39 Source: 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 Patch0001: 0001-maint-post-release-administrivia.patch Patch0002: 0002-libparted-also-link-to-UUID_LIBS.patch Patch0003: 0003-lib-fs-resize-Prevent-crash-resizing-FAT16-file-syst.patch Patch0004: 0004-tests-t3000-resize-fs.sh-Add-FAT16-resizing-test.patch Patch0005: 0005-tests-t3000-resize-fs.sh-Add-requirement-on-mkfs.vfa.patch Patch0006: 0006-tests-Change-minimum-size-to-256MiB.patch Patch0007: 0007-parted-don-t-crash-in-disk_set-when-disk-label-not-f.patch Patch0008: 0008-tests-Add-a-test-for-device-mapper-partition-sizes.patch Patch0009: 0009-libparted-device-mapper-uses-512b-sectors.patch Patch0010: 0010-Update-manpage-NAME-so-whatis-will-work.patch Patch0011: 0011-tests-Make-sure-the-extended-partition-length-is-cor.patch Patch0012: 0012-libparted-BLKPG_RESIZE_PARTITION-uses-bytes-not-sect.patch Patch0013: 0013-parted-Fix-crash-with-name-command-and-no-disklabel-.patch Patch0014: 0014-UI-Avoid-memory-leaks.patch Patch0015: 0015-libparted-Fix-memory-leaks.patch Patch0016: 0016-libparted-Fix-possible-memory-leaks.patch Patch0017: 0017-libparted-Stop-converting-.-in-sys-path-to.patch Patch0018: 0018-libparted-Use-read-only-when-probing-devices-on-linu.patch Patch0019: 0019-tests-Use-wait_for_dev_to_-functions.patch Patch0020: 0020-fdasd-geometry-handling-updated-from-upstream-s390-t.patch Patch0021: 0021-dasd-enhance-device-probing.patch Patch0022: 0022-parted-fix-build-error-on-s390.patch Patch0023: 0023-fdasd.c-Safeguard-against-geometry-misprobing.patch Patch0024: 0024-Add-libparted-fs-resize.pc.patch Patch0025: 0025-tests-Add-udevadm-settle-to-wait_for_-loop-1260664.patch Patch0026: 0026-tests-Add-wait-to-t9042-1257415.patch Patch0027: 0027-tests-Fix-t1700-failing-on-a-host-with-a-4k-xfs-file.patch Patch0028: 0028-lib-fs-resize-Prevent-crash-resizing-FAT-with-very-d.patch Patch0029: 0029-tests-t3000-resize-fs.sh-Add-very-deep-directory.patch Patch0030: 0030-Use-BLKSSZGET-to-get-device-sector-size-in-_device_p.patch Patch0031: 0031-parted-fix-the-rescue-command.patch Patch0032: 0032-Use-disk-geometry-as-basis-for-ext2-sector-sizes.patch Patch0033: 0033-docs-Add-list-of-filesystems-for-fs-type-1311596.patch Patch0034: 0034-parted-Display-details-of-partition-alignment-failur.patch Patch0035: 0035-libparted-Remove-fdasd-geometry-code-from-alloc_meta.patch Patch0036: 0036-libparted-Fix-probing-AIX-disks-on-other-arches.patch Patch0037: 0037-partprobe-Open-the-device-once-for-probing.patch Patch0038: 0038-Cleanup-mkpart-manpage-entry-1183077.patch Patch0039: 0039-doc-Add-information-about-quoting.patch Patch0040: 0040-libparted-dasd-correct-the-offset-where-the-first-pa.patch Patch0041: 0041-Add-support-for-NVMe-devices.patch Patch0042: 0042-docs-Improve-partition-description-in-parted.texi.patch Patch0043: 0043-libparted-only-IEC-units-are-treated-as-exact.patch Patch0044: 0044-tests-t3310-flags.sh-Query-libparted-for-all-flags-t.patch Patch0045: 0045-tests-t3310-flags.sh-Stop-excluding-certain-flags-fr.patch Patch0046: 0046-tests-t3310-flags.sh-Add-test-for-bsd-table-flags.patch Patch0047: 0047-libparted-Fix-to-report-success-when-setting-lvm-fla.patch Patch0048: 0048-libparted-Remove-commented-local-variable-from-bsd_p.patch Patch0049: 0049-tests-t3310-flags.sh-Add-test-for-mac-table-flags.patch Patch0050: 0050-tests-t3310-flags.sh-Add-test-for-dvh-table-flags.patch Patch0051: 0051-tests-t3310-flags.sh-Add-tests-for-remaining-table-t.patch Patch0052: 0052-tests-Set-optimal-blocks-to-64-for-scsi_debug-device.patch Patch0053: 0053-tests-t3310-flags.sh-skip-pc98-when-sector-size-512.patch Patch0054: 0054-tests-Stop-timing-t9040-1172675.patch Patch0055: 0055-libparted-Fix-starting-CHS-in-protective-MBR.patch Patch0056: 0056-libparted-Don-t-warn-if-no-HDIO_GET_IDENTITY-ioctl.patch Patch0057: 0057-libparted-dasd-unify-vtoc-handling-for-cdl-ldl.patch Patch0058: 0058-libparted-dasd-update-and-improve-fdasd-functions.patch Patch0059: 0059-libparted-dasd-add-new-fdasd-functions.patch Patch0060: 0060-libparted-dasd-add-test-cases-for-the-new-fdasd-func.patch Patch0061: 0061-libparted-set-swap-flag-on-GPT-partitions.patch Patch0062: 0062-tests-Update-t0220-and-t0280-for-the-swap-flag.patch Patch0063: 0063-libparted-tests-Move-get_sector_size-to-common.c.patch Patch0064: 0064-libparted-Add-support-for-atari-partition-tables.patch Patch0065: 0065-mac-copy-partition-type-and-name-correctly.patch Patch0066: 0066-libparted-Fix-MacOS-boot-support.patch Patch0067: 0067-libparted-Fix-typo-in-hfs-error-message.patch Patch0068: 0068-Fix-crash-when-localized.patch Patch0069: 0069-Add-support-for-RAM-drives.patch Patch0070: 0070-parted-check-the-name-of-partition-first-when-to-nam.patch Patch0071: 0071-parted-ui-remove-unneccesary-information-of-command-.patch Patch0072: 0072-libpartd-dasd-improve-flag-processing-for-DASD-LDL.patch Patch0073: 0073-libparted-dasd-add-an-exception-for-changing-DASD-LD.patch Patch0074: 0074-libparted-dasd-add-test-cases-for-the-new-fdasd-func.patch Patch0075: 0075-Increase-timeout-for-rmmod-scsi_debug-and-make-it-a-.patch Patch0076: 0076-tests-t1701-rescue-fs-wait-for-the-device-to-appear.patch Patch0077: 0077-libparted-Fix-udev-cookie-leak-in-_dm_resize_partiti.patch Patch0078: 0078-atari.c-Drop-xlocale.h-1476934.patch Patch0079: 0079-libparted-labels-link-with-libiconv-if-needed.patch Patch0080: 0080-Add-support-for-NVDIMM-devices.patch Patch0081: 0081-linux-Include-sys-sysmacros.h-for-major-macro.patch Patch0082: 0082-Fix-make-check.patch Patch0083: 0083-tests-fix-t6100-mdraid-partitions.patch Patch0084: 0084-Fix-set-and-disk_set-to-not-crash-when-no-flags-are-.patch Patch0085: 0085-mkpart-Allow-negative-start-value-when-FS-TYPE-is-no.patch Patch0086: 0086-Fix-resizepart-iec-unit-end-sector.patch Patch0087: 0087-build-Remove-unused-traces-of-dynamic-loading.patch Patch0088: 0088-Lift-512-byte-restriction-on-fat-resize.patch Patch0089: 0089-Fix-atari-label-false-positives.patch # Use python3 in the buildroot # Sent upstream 2018-06-27 Patch0090: 0090-Modify-gpt-header-move-and-msdos-overlap-to-work-wit.patch Patch0091: 0091-Switch-gpt-header-move-and-msdos-overlap-to-python3.patch Patch6000: 6000-Add-extra-judgment-for-a-partition-created-success.patch Patch6001: 6001-parted-fix-crash-due-to-improper-partition-number-in.patch Patch6002: 6002-parted-fix-wrong-error-label-jump-in-mkpart.patch Patch6003: 6003-clean-the-disk-information-when-commands-fail-in-int.patch Patch6004: 6004-libparted-Fix-ending-CHS-address-in-PMBR.patch Patch6005: 6005-Fix-the-length-of-several-strncpy-calls.patch Patch6006: 6006-parted.c-Always-free-peek_word.patch Patch6007: 6007-parted.c-Make-sure-dev_name-is-freed.patch Patch6008: 6008-Fix-potential-command-line-buffer-overflow.patch Patch6009: 6009-add-support-of-gpt_sync_mbr.patch Patch9000: 9000-bugfix-parted-fix-failure-of-mklabel-gpt_sync_mbr.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 -Sgit %build autoreconf 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-pc98=no \ --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} %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 * Tue Dec 31 2019 openEuler Buildteam - 3.2-39 - Type:enhancement - ID:NA - SUG:NA - DESC:delete unused file * Sat Sep 21 2019 suweifeng - 3.2-38 - Type:enhancement - ID:NA - SUG:NA - DESC:License update * Mon Sep 09 2019 suweifeng - 3.2-37 - Type:enhancement - ID:NA - SUG:NA - DESC:openEuler Debranding * Tue Aug 20 2019 luoshijie - 3.2-36.h5 - Type:bugfix - ID:NA - SUG:restart - DESC:change name of patch. * Wed May 8 2019 louhongxiang - 3.2-36.h4 - Type:bugfix - ID:NA - SUG:restart - DESC:change name of patch. * Thu Mar 21 2019 louhongxiang - 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 - 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 - 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 - Updated spec file * Mon Mar 13 2000 Fabian Emmes - changed "unset LINGUAS" line - reintroduced %build section ;) - started changelog