GNU bug report logs - #66327
PARTED_CHECK_LIBPARTED shipped with parted 3.6 fails to detect it

Previous Next

Package: parted;

Reported by: Jan Palus <jpalus <at> fastmail.com>

Date: Tue, 3 Oct 2023 17:25:02 UTC

Severity: normal

To reply to this bug, email your comments to 66327 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#66327; Package parted. (Tue, 03 Oct 2023 17:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jan Palus <jpalus <at> fastmail.com>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Tue, 03 Oct 2023 17:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jan Palus <jpalus <at> fastmail.com>
To: bug-parted <at> gnu.org
Subject: PARTED_CHECK_LIBPARTED shipped with parted 3.6 fails to detect it
Date: Tue, 3 Oct 2023 19:01:52 +0200
autoconf macro PARTED_CHECK_LIBPARTED requires ped_get_version() to
return 3 part version string or otherwise it fails with "3.6, bad
version string"

	if ( !(version = ped_get_version ()) )
		exit(EXIT_FAILURE);
	if (sscanf(version, "%d.%d.%d", &major, &minor, &micro) != 3) {
		printf("%s, bad version string\n", version);
		exit(EXIT_FAILURE);
	}

Therefore it fails for two part version string like "3.6".




Information forwarded to bug-parted <at> gnu.org:
bug#66327; Package parted. (Wed, 04 Oct 2023 20:53:01 GMT) Full text and rfc822 format available.

Message #8 received at 66327 <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: Jan Palus <jpalus <at> fastmail.com>
Cc: 66327 <at> debbugs.gnu.org
Subject: Re: bug#66327: PARTED_CHECK_LIBPARTED shipped with parted 3.6 fails
 to detect it
Date: Wed, 4 Oct 2023 13:52:03 -0700
On Tue, Oct 03, 2023 at 07:01:52PM +0200, Jan Palus wrote:
> autoconf macro PARTED_CHECK_LIBPARTED requires ped_get_version() to
> return 3 part version string or otherwise it fails with "3.6, bad
> version string"
> 
> 	if ( !(version = ped_get_version ()) )
> 		exit(EXIT_FAILURE);
> 	if (sscanf(version, "%d.%d.%d", &major, &minor, &micro) != 3) {
> 		printf("%s, bad version string\n", version);
> 		exit(EXIT_FAILURE);
> 	}
> 
> Therefore it fails for two part version string like "3.6".
> 
> 
> 

Thanks for the report. Where is this causing problems for you? As far as
I can tell that code has been there since the start of the git history,
and I've never seen a failure. I'm actually not sure it ever gets called
by anything -- nothing uses the PARTED_CHECK_LIBPARTED macro in the
upstream code.

I'm inclined to just delete it.

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart





Information forwarded to bug-parted <at> gnu.org:
bug#66327; Package parted. (Fri, 06 Oct 2023 05:04:02 GMT) Full text and rfc822 format available.

Message #11 received at 66327 <at> debbugs.gnu.org (full text, mbox):

From: Jan Palus <jpalus <at> fastmail.com>
To: "Brian C. Lane" <bcl <at> redhat.com>
Cc: 66327 <at> debbugs.gnu.org
Subject: Re: bug#66327: PARTED_CHECK_LIBPARTED shipped with parted 3.6 fails
 to detect it
Date: Fri, 6 Oct 2023 00:12:44 +0200
On 04.10.2023 13:52, Brian C. Lane wrote:
> On Tue, Oct 03, 2023 at 07:01:52PM +0200, Jan Palus wrote:
> > autoconf macro PARTED_CHECK_LIBPARTED requires ped_get_version() to
> > return 3 part version string or otherwise it fails with "3.6, bad
> > version string"
> > 
> > 	if ( !(version = ped_get_version ()) )
> > 		exit(EXIT_FAILURE);
> > 	if (sscanf(version, "%d.%d.%d", &major, &minor, &micro) != 3) {
> > 		printf("%s, bad version string\n", version);
> > 		exit(EXIT_FAILURE);
> > 	}
> > 
> > Therefore it fails for two part version string like "3.6".
> > 
> > 
> > 
> 
> Thanks for the report. Where is this causing problems for you? As far as
> I can tell that code has been there since the start of the git history,
> and I've never seen a failure. I'm actually not sure it ever gets called
> by anything -- nothing uses the PARTED_CHECK_LIBPARTED macro in the
> upstream code.
> 
> I'm inclined to just delete it.

Noticed the issue when checking original fatresize codebase. Don't get
me wrong I'm completely fine with either fixing or dropping it entirely.
I just don't think it should be shipped in current shape.




Information forwarded to bug-parted <at> gnu.org:
bug#66327; Package parted. (Fri, 06 Oct 2023 15:17:02 GMT) Full text and rfc822 format available.

Message #14 received at 66327 <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: Jan Palus <jpalus <at> fastmail.com>
Cc: 66327 <at> debbugs.gnu.org
Subject: Re: bug#66327: PARTED_CHECK_LIBPARTED shipped with parted 3.6 fails
 to detect it
Date: Fri, 6 Oct 2023 08:15:23 -0700
On Fri, Oct 06, 2023 at 12:12:44AM +0200, Jan Palus wrote:
> On 04.10.2023 13:52, Brian C. Lane wrote:
> > On Tue, Oct 03, 2023 at 07:01:52PM +0200, Jan Palus wrote:
> > > autoconf macro PARTED_CHECK_LIBPARTED requires ped_get_version() to
> > > return 3 part version string or otherwise it fails with "3.6, bad
> > > version string"
> > > 
> > > 	if ( !(version = ped_get_version ()) )
> > > 		exit(EXIT_FAILURE);
> > > 	if (sscanf(version, "%d.%d.%d", &major, &minor, &micro) != 3) {
> > > 		printf("%s, bad version string\n", version);
> > > 		exit(EXIT_FAILURE);
> > > 	}
> > > 
> > > Therefore it fails for two part version string like "3.6".
> > > 
> > > 
> > > 
> > 
> > Thanks for the report. Where is this causing problems for you? As far as
> > I can tell that code has been there since the start of the git history,
> > and I've never seen a failure. I'm actually not sure it ever gets called
> > by anything -- nothing uses the PARTED_CHECK_LIBPARTED macro in the
> > upstream code.
> > 
> > I'm inclined to just delete it.
> 
> Noticed the issue when checking original fatresize codebase. Don't get
> me wrong I'm completely fine with either fixing or dropping it entirely.
> I just don't think it should be shipped in current shape.
> 

Ah, ok. Wanted to make sure it wasn't something you were depending on
somehow :) This codebase is *really* old at this point so there are
bound to be unused corners like this -- especially if it isn't used and
this looks like it never would have worked, the first release in git is
1.8

Thanks,

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart





This bug report was last modified 1 year and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.