Qubes-builder: How can I reliably replicate the current relese build?

I have followed the instructions for building an iso using the qubes-builder repo. Each time I try to build it, I encounder a series of errors/failures. I have manually edited some of the problems and the build will continue further only to eventually encounter another failure.

Is there a way to get the qubes-builder setting such that I can reliably build the iso based on the currently released version?

edited

I am currently using the v1 qubes-builder. I understand there is a qubes-builderv2.

I think my question really has to do with release/version tags on the various repos that are used during the build process. It seems like using the HEAD is fraught because you are working with a moving target (i.e. regular checkins to the source trees).

It should build without any problems if you use fedora 37, start with setup script from qubes-builder and then follow its instructions.

That is exactly what I have been doing, and I agree it should build without problems, however I have yet to see a sucessfully built iso.

Am I having errors in my thinking about this? The underlying sources seem to be getting updates regularly and so must by definition be diverging from the production build v4.1.2

I would really like to be able to first replicate the production build so that when I make my own changes I will know whether or not it is one of my changes that has caused a failure.

You’ll have to specify release r4.1 and dom0 fc32. It really shouldn’t pull from HEAD, since by default there’s a release4.1 branch in most ( if not every ) qubes repo.

I finally got

make qubes

to complete successfully (after a few local edits).

Now I am getting a failure on

make iso

The error is as follows … “No packages defined by templates.spec, syntax error?”

+ echo '--> Copying template fc37 RPM...'
--> Copying template fc37 RPM...
++ MAKEFLAGS=
++ make -s -C qubes-src/linux-template-builder DIST=fc37 template-name
+ export TEMPLATE_NAME=fedora-37
+ TEMPLATE_NAME=fedora-37
+ make -f Makefile.generic PACKAGE_SET=vm DIST=fc37 COMPONENT=linux-template-builder USE_DIST_BUILD_TOOLS=0 UPDATE_REPO=/home/user/dev/github.com/QubesOS/qubes-builder.git/qubes-src/installer-qubes-os/yum/qubes-dom0 update-repo
make[1]: Entering directory '/home/user/dev/github.com/QubesOS/qubes-builder.git'
packages=
No packages defined by templates.spec, syntax error?
make[1]: *** [/home/user/dev/github.com/QubesOS/qubes-builder.git/qubes-src/builder-rpm/Makefile.rpmbuilder:178: update-repo-do] Error 1
make[1]: Leaving directory '/home/user/dev/github.com/QubesOS/qubes-builder.git'
make: *** [Makefile:555: iso.copy-template-rpms.fc37] Error 2

Any help or suggestions on how to remedy this will be greatly appreciated.