How do I find more information about linting messages and adding new packages?

Hi,

I’m super new to ostree and ublue and stuff.
I want to build a bluefin derivative and add a custom package that is not distributed by fedora nor is it available in copr.

I have a tarball. I extracted it to /var/opt/p4v where p4v is the name of my application, but then bootc container lint complains about this:

Lint warning: var-tmpfiles: Found content in /var missing systemd tmpfiles.d entries:
  d /var/lib/dnf 0755 root root - -
  d /var/lib/dnf/repos 0755 root root - -
  d /var/lib/dnf/repos/updates-e19adde8fd271134 0755 root root - -
  d /var/opt/bin 0755 root root - -
  d /var/opt/p4v 0755 root root - -
  ...and 45 more
Found non-directory/non-symlink files in /var:
  var/lib/dnf/repos/updates-e19adde8fd271134/countme
  var/opt/bin/p4
  var/opt/p4v/bin/QtWebEngineProcess
  var/opt/p4v/bin/p4admin
  var/opt/p4v/bin/p4admin.bin
  ...and 164 more

What am I doing wrong? Am I supposed to delete these files from the container after running ostree container commit?

What’s the better approach of adding a custom package like this?
One assumption is that I’m not allowed to redistribute p4v, so I don’t want to create a copr repo for this reason.

If p4v is a binary distribution (looks like it is), you can put it in your home folder and add the needed folders to your PATH.

Try to run it and see if any libraries it needs are missing.

If so, you might want to create a distrobox with Ubuntu or Fedora, install p4v in the distrobox, and that way you can add any libraries, etc. that are needed.
You can then use (from inside the distrobox) distrobox-export --app <your_app> or distrobox-export --bin <your_bin> to make them available outside the distrobox.
So they run inside the distrobox, but have access to your home folder and files.

You can use distroshelf (it’s a flatpak) to manage your distroboxes, or the command line.

Thanks for the idea!
It makes sense for a one off, but I would like to build a base distro that I can redistribute internally to my team. It’s why I wanted to put it directly in the container: so that not everyone has to install this binary package.

I looked into adding files in to /etc/skel so that a new user would download the binary archive and extract it, but the files that I put in /etc/skel, but also have a similar warning.

My understanding is that the content of “/var” is taken from the image and deployed to the host only on installation. Updates and rebases etc on the host will ignore what the container brings inside “/var”. So the linter is warning you here that these files won’t get picked up by end hosts unless it’s a fresh install.

That’s my understanding at least.

I think you probably need to find another location to install this application during image build. Perhaps in “/opt” or “/usr/local”. I think the Bootc documentation has some guidance on how various directories are handled.

Found the docs: Filesystem - bootc

I was right about “/var” I think but my suggestion to try “/usr/local” was bad. The docs suggest that path should be a symlink to a directory under “/var”.

So yeah.. read those docs, I hope they help you figure out the best location. :slight_smile:

Nice! Thanks, I needed this!

You know, I read “build a derivative” then completely forgot that you said that.
Glad you got it sorted!

1 Like

@ublue-user p4v - blast from my past!

I wrote an article here summarizing how /var is handled.

Why not create another user for the Perforce server? It probably should be installed that way anyway. But, on these OSes it really should run in a container - but still with its own UID.

My $0.02.

1 Like

Simple: you are mixing up the server and the client. p4v is the Perforce visual client, which is not the server and makes sense to have it run as the user.

I finally got the higher ups to switch away from perforce! I look forwards to ditching the perforce and switch to git!

1 Like

Jujutsu is worth a look.

2 Likes

I’ve been using gitbutler for a little while for smaller projects and it’s been great. It’s also worth checking out too!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.