Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1052462: parted: libparted2 package dependencies (dmidecode) differ between arm64 and amd64

20 views
Skip to first unread message

Phil Roche

unread,
Sep 22, 2023, 10:50:06 AM9/22/23
to
Package: parted
Version: 3.5-3
Severity: normal

Dear Maintainer,

   * What led up to the situation?

Hi,

While working on new arm64 Ubuntu 23.10 Mantic minimal cloud images
`dmidecode` was not being installed in the arm64 images.

In debugging, I found that the package dependencies of the libparted2 package
differ between arm64 and amd64. arm64 `libparted2` does not depend on
`dmidecode` but on amd64 it does.

#### arm64
```
ubuntu@cloudimg:~$ apt show libparted2
Package: libparted2
Version: 3.6-3
Priority: standard
Section: libs
Source: parted
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-dev...@lists.ubuntu.com>
Original-Maintainer: Parted Maintainer Team <parted-maintainers@alioth-
Installed-Size: 397 kB
Provides: libparted
Depends: libblkid1 (>= 2.17.2), libc6 (>= 2.34), libdevmapper1.02.1 (>=
2:1.02.97), libuuid1 (>= 2.16)
Suggests: parted, libparted-dev, libparted-i18n (= 3.6-3)
Task: standard, cloud-minimal
Download-Size: 150 kB
APT-Manual-Installed: no
APT-Sources: http://ports.ubuntu.com/ubuntu-ports mantic/main arm64 Packages
Description: disk partition manipulator - shared library
 GNU Parted is a program that allows you to create, destroy, resize,
 move, and copy disk partitions. This is useful for creating space
 for new operating systems, reorganizing disk usage, and copying data
 to new hard disks.
 .
 This package contains the shared library.

```

#### amd64
```
buntu@cloudimg:~$ apt show libparted2
Package: libparted2
Version: 3.6-3
Priority: standard
Section: libs
Source: parted
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-dev...@lists.ubuntu.com>
Original-Maintainer: Parted Maintainer Team <parted-maintainers@alioth-
Installed-Size: 385 kB
Provides: libparted
Depends: libblkid1 (>= 2.17.2), libc6 (>= 2.34), libdevmapper1.02.1 (>=
2:1.02.97), libuuid1 (>= 2.16), dmidecode
Suggests: parted, libparted-dev, libparted-i18n (= 3.6-3)
Task: standard, cloud-minimal
Download-Size: 151 kB
APT-Manual-Installed: no
APT-Sources: http://archive.ubuntu.com/ubuntu mantic/main amd64 Packages
Description: disk partition manipulator - shared library
 GNU Parted is a program that allows you to create, destroy, resize,
 move, and copy disk partitions. This is useful for creating space
 for new operating systems, reorganizing disk usage, and copying data
 to new hard disks.
 .
 This package contains the shared library.

```

Is this a bug, or is there reasoning why this is the case?

I note the change to dependencies `, dmidecode [amd64 i386]` was added as part
of changes in version 3.2-21 in Apr 2018 to address bug

I have filed a bug against Ubuntu too @

My concerns is the diff in dependencies but in the Ubuntu bug xnox points out
why there might be a diff in arm64 and amd64

```
#if (defined(__i386__) || defined(__x86_64__)) && defined(__linux__)
# define USE_DMI
#endif

#define APPLE_DMI "Apple Computer, Inc."
#define APPLE_DMI_2 "Apple Inc."
static int is_apple = 0;

static char *
dmi_system_manufacturer (void)
{
#ifdef USE_DMI
  FILE *dmidecode;
  char *manufacturer = NULL;
  size_t manufacturer_len = 0;

  dmidecode = popen ("dmidecode -s system-manufacturer 2>/dev/null", "r");
  if (getline (&manufacturer, &manufacturer_len, dmidecode) < 0) {
    /* ignore; will return NULL */
  }
  pclose (dmidecode);
  if (manufacturer) {
    char *newline = strchr (manufacturer, '\n');
    if (newline)
      *newline = '\0';
  }
  return manufacturer;
#else /* !USE_DMI */
  return NULL;
#endif /* USE_DMI */
}

```

As I understand it, dmi is available on other arches too to find the
manufacturer.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Installed parted2 on arm64 system

   * What was the outcome of this action?

parted2 was installed but dmidecode was not

   * What outcome did you expect instead?

I expected dmidecode to be installed as it is with amd64.



-- System Information:
Debian Release: bookworm/sid
  APT prefers lunar-updates
  APT policy: (500, 'lunar-updates'), (500, 'lunar-security'), (500, 'lunar'), (100, 'lunar-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.2.0-32-generic (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE=en_IE:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages parted depends on:
ii  libc6         2.37-0ubuntu2
ii  libparted2    3.5-3
ii  libreadline8  8.2-1.3
ii  libtinfo6     6.4-2ubuntu0.1

parted recommends no packages.

Versions of packages parted suggests:
pn  parted-doc  <none>

-- no debconf information

Colin Watson

unread,
Sep 22, 2023, 11:20:04 AM9/22/23
to
On Fri, Sep 22, 2023 at 03:41:53PM +0100, Phil Roche wrote:
> While working on new arm64 Ubuntu 23.10 Mantic minimal cloud images
> (http://cloud-images.ubuntu.com/minimal/daily/mantic/) we discovered that
> `dmidecode` was not being installed in the arm64 images.
>
> In debugging, I found that the package dependencies of the libparted2
> package
> differ between arm64 and amd64. arm64 `libparted2` does not depend on
> `dmidecode` but on amd64 it does.

This is intentional, because libparted only uses dmidecode for
identifying old Intel Macs with special GPT quirks, and that's only
relevant on x86. I don't personally see why this needs to be extended
to arm64, although of course if somebody comes forward and explicitly
confirms that it's relevant to partitioning on Apple Silicon or whatever
then we could do that - but I wouldn't do it just for architectural
symmetry.

If you explicitly need dmidecode to be on your images, then I think you
should have an explicit dependency or similar to ensure that, rather
than relying on a dependency via libparted (which is an implementation
detail). Is that a problem?

--
Colin Watson (he/him) [cjwa...@debian.org]

Phil Roche

unread,
Sep 25, 2023, 7:40:05 AM9/25/23
to
Thank you for the background. This can be marked as invalid. 
--
Phil Roche
Staff Software Engineer
Canonical Public Cloud
0 new messages