Page MenuHomeVyOS Platform

Proper target dependencies and error checking in the vyos-build makefile
Closed, ResolvedPublicENHANCEMENT


Looks like our build scripts are not as user-freiendly as they could have been. Today @Tania ran into T361, an error that experienced developers would shrug off because we know exactly what "lb" is and what to do to fix it, but for someone who's new to this, it's confusing. It would be nice to make the experiences as easy and streamlined for new contributors as possible.

I already moved the build env check for ISO build to ./configure and added safeguards against trying to run "make iso" with non-existend build config file that instruct the user to run ./configure first.
I believe we should do the same for VM image build dependencies. The only issue is that Packer is not in the repos, and not everyone will want to build VM images anyway, so this should be more granular.
I suggest that we add a configure option like --with-vm-image-build that will run these checks, and safeguards against running "make <qemu|vmware|hyperv>" if configure was run without that option (and tell the user what to do of course). @higebu, what do you think?

Also, the targets for VM images have no dependencies, even though they do depend on the ISO, and even each other. To my understanding, qemu depends on ISO, and the other VM targets depend on qemu. @higebu, is this correct?

It would be perfect to make the ISO a non-phony target, but since we have different build architectures, this would likely be more trouble than it's worth. On the other hand, if we make a symlink to the ISO like old build-iso did, maybe we can use it as a make target. Anyone knows if it's going to work?


Difficulty level
Hard (possibly days)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Internal change (not visible to end users)

Event Timeline

dmbaturin created this object with visibility "Public (No Login Required)".
dmbaturin created this object with edit policy "Subscribers".

@dmbaturin I agree with adding a configure option. Dependency of VM targets you wrote is correct.

syncer changed the subtype of this task from "Task" to "Enhancement".Oct 20 2018, 7:10 AM
dmbaturin changed Difficulty level from Unknown (require assessment) to Hard (possibly days).Jan 27 2021, 6:33 PM
dmbaturin set Is it a breaking change? to Unspecified (possibly destroys the router).
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.Sep 3 2021, 7:20 AM
dmbaturin set Issue type to Internal change (not visible to end users).