butido icon indicating copy to clipboard operation
butido copied to clipboard

SYS_BUILD_DEPENDS_RH8 vs. build = ["example = 1.2.3"]

Open christophprokop opened this issue 2 years ago • 2 comments

[environment]
SYS_BUILD_DEPENDS_RH8  = "libX11-devel"

vs.

[dependencies]
runtime = []
build   = ["example =1.2.3"]  

Why are the system deps not configured in the same way as the packages that are butido built?

christophprokop avatar Mar 08 '23 14:03 christophprokop

Why are the system deps not configured in the same way as the packages that are butido built?

I've looked into this and Butido doesn't have a concept of system dependencies. For Butido, SYS_BUILD_DEPENDS_RH8 is just a normal environment variable. All of the logic that makes this work is implemented in our packages repository (we have a list of allowed environment variables configured in config.toml and the logic is implemented in phases scripts in pkg.toml that determine the OS and install packages based on the corresponding environment variables).

We could try to move this part into Butido itself, which would probably make sense as it's quite a useful and essential feature and we could even extend the functionality. A clean implementation might require major/fundamental changes though as Butido only knows about container images, or rather only image names. We could likely simply extend the docker.images setting to include OS information to make this work. A drawback would certainly be that Butido would then need to support a given set of operating systems. We could decide on a core set but ideally it should be kept extensible (probably not worth the additional time it would take to implement though).

Anyway, I guess the next important questions before we even start whether to move this logic into Butido or not would be the following:

  1. What are the current limitations that we want to avoid / what is the motivation behind this issue?
  2. What would the concrete design look like (content in pkg.toml, supported features, etc.)
  3. Would it be simpler to improve/extend our custom logic in the packages repo?
  4. Collect advantages and drawbacks (not really a question :D)

primeos-work avatar Oct 16 '23 15:10 primeos-work

@christophprokop do you still remember what we discussed here? Was the goal also to handle this via a preprocessor? And if so: Should we close this issue and #184 or should we leave them open for now?

primeos-work avatar Dec 04 '23 13:12 primeos-work

Let's also close this issue for now (to clean things up) as the idea was to start with a preprocessor, at least as a PoC, and then reconsider if we need/want this in butido. Feel free to reopen if necessary.

primeos-work avatar Sep 13 '24 16:09 primeos-work