Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: build on Ubuntu 24.04 #632

Closed
raharper opened this issue Aug 9, 2024 · 1 comment
Closed

Feat: build on Ubuntu 24.04 #632

raharper opened this issue Aug 9, 2024 · 1 comment

Comments

@raharper
Copy link
Contributor

raharper commented Aug 9, 2024

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

Let's get a fix in for Noble's lxc packaging so we can compile and build stacker on Ubuntu Noble

Describe alternatives you've considered

We could look at using this golang-gopkg-lxc-go-lxc.v2-dev package

$ apt-cache show golang-gopkg-lxc-go-lxc.v2-dev
Package: golang-gopkg-lxc-go-lxc.v2-dev
Architecture: all
Version: 0.0+git20230621.be98af2-1
Priority: extra
Section: universe/devel
Source: golang-gopkg-lxc-go-lxc.v2
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 248
Depends: lxc-dev, pkg-config
Filename: pool/universe/g/golang-gopkg-lxc-go-lxc.v2/golang-gopkg-lxc-go-lxc.v2-dev_0.0+git20230621.be98af2-1_all.deb
Size: 33932
MD5sum: 779dfc5844cf3c78048be1bd9100cf57
SHA1: cb346145a131d31940509f18d6f38dc47b2390a0
SHA256: 59e4ceaf7e5a7aadb7f22b21587533e695983684f6bd08d67f084299ba8ca805
SHA512: 6d09eecfbdc41861dd2948eef64b626a3aa809d7fc254a6ecc7b91d4d76169b114c109069e1604462c4bb11a5f14852ffa1be52f4ac25ca5787c2313bc3b54bd
Homepage: https://github.com/lxc/go-lxc
Description-en: Go bindings for liblxc
 This package contains the source tree of the go-lxc project
 .
 go-lxc implements Go bindings for the LXC C API using cgo and the LXC C
 library (liblxc).

Additional context

Spent some time trying to update the github build workflow for Noble (Ubuntu 24.04)
There's some Ubuntu Noble changes around lxc, lxc-dev, liblxc, etc which make building stacker fail due to the lxc-wrapper not compiling.

None of the lxc library/dev packages provide a liblxc.a for static linking
Further, even the lxc-git-master ppa fails on noble, in that scenario, it seems to be the same trouble with getting a libsystemd.a

https://launchpadlibrarian.net/742837071/buildlog_ubuntu-noble-amd64.lxc_1%3A6.0.0+main~20240808-0805-0ubuntu1~noble_BUILDING.txt.gz

rchincha added a commit to rchincha/stacker that referenced this issue Aug 14, 2024
Fixes issue project-stacker#632

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
@raharper
Copy link
Contributor Author

raharper commented Sep 9, 2024

I have a fix for the missing liblxc.a file:

https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/2080069

I'll see if I can upload a src package to the puzzlefs PPA shortly

raharper added a commit to raharper/stacker that referenced this issue Sep 11, 2024
Fix build on Ubuntu 24.04

- install libsystem-dev for static libsystemd library
- Use ppa:puzzleos/dev to pull in patched lxc 5.0.3 which includes
  liblxc.a in the lxc-dev package
- Handle modifying kernel tunables for user-namespace and apparmor
  restrictions
- Adjust Makefile to add -lsystemd to the libs when making
  stacker-dynamic, but omit the library when stacker-static is building
  built
- Add default container policy to rfs if not already present

Fixes: project-stacker#632

Signed-off-by: Ryan Harper <rharper@woxford.com>
raharper added a commit to raharper/stacker that referenced this issue Sep 11, 2024
Fix build on Ubuntu 24.04

- install libsystem-dev for static libsystemd library
- Use ppa:puzzleos/dev to pull in patched lxc 5.0.3 which includes
  liblxc.a in the lxc-dev package
- Handle modifying kernel tunables for user-namespace and apparmor
  restrictions
- Adjust Makefile to add -lsystemd to the libs when making
  stacker-dynamic, but omit the library when stacker-static is building
  built
- Add default container policy to rfs if not already present
- Fix whiteouts.bats test, don't quote the bsdtar | grep or we get
  command not found.

Fixes: project-stacker#632

Signed-off-by: Ryan Harper <rharper@woxford.com>
raharper added a commit to raharper/stacker that referenced this issue Sep 11, 2024
Fix build on Ubuntu 24.04

- install libsystem-dev for static libsystemd library
- Use ppa:puzzleos/dev to pull in patched lxc 5.0.3 which includes
  liblxc.a in the lxc-dev package
- Handle modifying kernel tunables for user-namespace and apparmor
  restrictions
- Adjust Makefile to add -lsystemd to the libs when making
  stacker-dynamic, but omit the library when stacker-static is building
  built
- Add default container policy to rfs if not already present
- Fix whiteouts.bats test, don't quote the bsdtar | grep or we get
  command not found, further, check the grep return code, if it's
  0, then we found the whiteout file in the tar and the test should
  fail.

Fixes: project-stacker#632

Signed-off-by: Ryan Harper <rharper@woxford.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant