diff --git a/fatresize-0.1.tar.bz2 b/fatresize-0.1.tar.bz2 deleted file mode 100644 index 7e27847..0000000 --- a/fatresize-0.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d38e580c61216f059528c18612d6d80d9e4eb4fea01d3f670877c45aef78150b -size 1542 diff --git a/fatresize-0.2.tar.xz b/fatresize-0.2.tar.xz new file mode 100644 index 0000000..b8e8565 --- /dev/null +++ b/fatresize-0.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f06a0a83d086d44295b7b79983d00988a99abe22b286dfa59785efd09c9b7c74 +size 2152 diff --git a/fatresize-fix-getting-dev-name.patch b/fatresize-fix-getting-dev-name.patch deleted file mode 100644 index 5f8f5a1..0000000 --- a/fatresize-fix-getting-dev-name.patch +++ /dev/null @@ -1,73 +0,0 @@ -From: Sebastian Parschauer -Date: Sun, 3 Dec 2017 12:09:44 +0100 -Subject: Fix getting the device name from partition name -References: boo#959181 -Patch-mainline: submitted, https://github.com/ya-mouse/fatresize/pull/4 - -There are many partition device names like e.g. /dev/mmcblk0p1 where -it is not enough to trim the trailing digits to get the disk device -name. Using open() here would depend on a POSIX platform. So do it -like _ped_device_probe() and silence libparted exceptions and try -to get the device with ped_device_get(). Trim further trailing -characters until libparted finds it. Print an error and exit if -the partition name is invalid. - -Fixes #2 - -Signed-off-by: Sebastian Parschauer ---- - fatresize/fatresize.c | 29 +++++++++++++++++++++++++++++ - 1 file changed, 29 insertions(+) - ---- a/fatresize/fatresize.c -+++ b/fatresize/fatresize.c -@@ -9,6 +9,7 @@ - #include - #include - -+#include - #include - #include - -@@ -79,6 +80,18 @@ resize(const char* disk_device, int part - } - - -+/* Code parts have been taken from _ped_device_probe(). */ -+static void -+probe_device(PedDevice **dev, const char *path) -+{ -+ ped_exception_fetch_all(); -+ *dev = ped_device_get(path); -+ if (!*dev) -+ ped_exception_catch(); -+ ped_exception_leave_all(); -+} -+ -+ - int - main(int argc, char** argv) - { -@@ -126,6 +139,22 @@ main(int argc, char** argv) - disk_device = strndup(argv[1], pos - argv[1] + 1); - partition_number = strtol(pos + 1, NULL, 10); - -+ PedDevice *peddev = NULL; -+ /* check if the device really exists */ -+ while (pos != argv[1] && *pos != '/' && !peddev) -+ { -+ disk_device[pos - argv[1] + 1] = '\0'; -+ probe_device(&peddev, disk_device); -+ --pos; -+ } -+ if (!peddev) -+ { -+ free(disk_device); -+ fprintf(stderr, "invalid device\n"); -+ exit(EXIT_FAILURE); -+ } -+ ped_device_destroy(peddev); -+ - if (argc == 3) - { - char* endptr = NULL; diff --git a/parted.changes b/parted.changes index f136087..6173d12 100644 --- a/parted.changes +++ b/parted.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Oct 05 11:18:18 CEST 2023 - aschnell@suse.com + +- updated fatresize to version 0.2 which includes a man-page + removed patches: + - fatresize-fix-getting-dev-name.patch + ------------------------------------------------------------------- Thu Jun 23 07:34:55 CEST 2022 - aschnell@suse.com @@ -1816,7 +1823,7 @@ Thu Jun 27 11:18:53 CEST 2002 - fehr@suse.de ------------------------------------------------------------------- Mon Jun 10 12:55:00 CEST 2002 - fehr@suse.de -- add patch to resize also partitions with unkown fs under YaST2 +- add patch to resize also partitions with unknown fs under YaST2 ------------------------------------------------------------------- Tue May 7 13:04:28 CEST 2002 - fehr@suse.de diff --git a/parted.spec b/parted.spec index 395e9fe..0e4b273 100644 --- a/parted.spec +++ b/parted.spec @@ -1,7 +1,7 @@ # # spec file for package parted # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,7 +28,7 @@ Source1: ftp://ftp.gnu.org/gnu/parted/%{name}-%{version}.tar.xz.sig # Taken from https://savannah.gnu.org/project/release-gpgkeys.php?group=parted&download=1 Source2: %{name}.keyring Source3: baselibs.conf -Source4: fatresize-0.1.tar.bz2 +Source4: fatresize-0.2.tar.xz # Build patches Patch1: parted-2.4-ncursesw6.patch @@ -67,7 +67,6 @@ Patch39: type-command.patch # bsc#1164907 # Fatresize Patch100: parted-fatresize-autoconf.patch -Patch101: fatresize-fix-getting-dev-name.patch # Tests patches Patch156: tests-add-helper-require_swap_.patch Patch157: tests-add-dev-md-check-to-t6100.patch @@ -161,7 +160,6 @@ to develop applications that require these. %patch38 -p1 %patch39 -p1 %patch100 -p1 -%patch101 -p1 %patch156 -p1 %patch157 -p1 %patch158 -p1 @@ -204,6 +202,7 @@ rm %{buildroot}%{_libdir}/*.la %doc AUTHORS BUGS ChangeLog NEWS README THANKS TODO %{_sbindir}/* %{_mandir}/man8/part*.8.gz +%{_mandir}/man8/fatresize.8.gz %doc %{_infodir}/*.info* %files devel