[Bug 2039873] Re: liblxc-dev was built with LXC_DEVEL=1 in Ubuntu 22.04 and later releases

Dave Jones 2039873 at bugs.launchpad.net
Mon Dec 11 15:16:20 UTC 2023


Thanks very much for the updated debdiff. There's a lot of changes here
to look at and unfortunately I've run out of time looking through it all
during my patch-pilot shift, but here's what I've got so far:

The major thing that I think needs correction is that this patch is
built on top of ubuntu/noble-devel by importing the upstream 5.0.3, but
what Stéphane suggested in comment 14 was to take the Debian upstream
(currently 5.0.3-2) and build on top of that. In this case, the commits
in the repo would be based on debian/sid rather than ubuntu/noble-devel.
This would ensure we incorporate the changes Debian has placed on top of
lxc, as well as our own (and means in future we can follow the git-
ubuntu merge process for this package).

The proposed changes also include package renames (which will be
necessary if we're basing off the upstream Debian version). As far as I
can tell they look sane but I haven't dug deep into this bit yet (it's
something I always need to read the policy guides and manuals for!).

The requested autopkgtest to ensure LXC_DEVEL==0 is present, and looks
good.

I have to dash to an appointment now, but I'll try and add some more
notes later this evening.

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2039873

Title:
  liblxc-dev was built with LXC_DEVEL=1 in Ubuntu 22.04 and later
  releases

Status in lxc package in Ubuntu:
  Confirmed

Bug description:
  [ Impact ]

  LXC 5.0.0 was built with LXC_DEVEL=1 set for Jammy. But for release
  build we should have LXC_DEVEL=0.

  LXC_DEVEL is a variable that appears in the /usr/include/lxc/version.h
  and then can be (and actually it is) used by other projects to detect
  if liblxc-dev is a development build or stable.

  Having LXC_DEVEL=1 makes problems for the users who want to build projects those are depend on liblxc
  from source (for example, LXD, go-lxc: https://github.com/canonical/lxd/pull/12420).

  Q: Why it was not a problem for so long?
  A: Because LXC API was stable for a long time, but recently we have extended liblxc API (https://github.com/lxc/lxc/pull/4260) and dependant package go-lxc was updated too (https://github.com/lxc/go-lxc/pull/166).
  This change was developed properly to be backward compatible with the old versions of liblxc. But, there is a problem. If LXC_DEVEL=1 then the macro check VERSION_AT_LEAST (https://github.com/lxc/go-lxc/blob/ccae595aa49e779f7ecc9250329967aa546acd31/lxc-binding.h#L7) is disabled. That's why we should *not* have LXC_DEVEL=1 for *any* release build of LXC.

  [ Test Plan ]

  Install liblxc-dev package and check /usr/include/lxc/version.h file
  LXC_DEVEL should be 0

  [ Where problems could occur ]

  Theoretically, build of a software which depends on liblxc-dev may start to fail
  if it assumes that LXC_DEVEL is 1.

  [ Other Info ]

  -

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/2039873/+subscriptions




More information about the Ubuntu-sponsors mailing list