OPNsense Forum

English Forums => Development and Code Review => Topic started by: Patrick M. Hausen on July 20, 2021, 08:53:08 pm

Title: Changes to the bootstrap procedure for 21.7?
Post by: Patrick M. Hausen on July 20, 2021, 08:53:08 pm
Hi all,

I just picked up the latest changes in the opnsense-bootstrap code for my Vagrant project and it works again for 21.1, now.

When I try to change the major release to 21.7, I get the following error message during provisioning/bootstrapping:
Code: [Select]
make: /tmp/opnsense-bootstrap/core-stable-21.7/Makefile
line 39: Cannot build without CORE_PHP set

Any hints welcome.

Thanks!
Patrick
Title: Re: Changes to the bootstrap procedure for 21.7?
Post by: franco on July 20, 2021, 09:05:06 pm
Meh, I am trying to avoid hardcoding version information in core.git, but if you do an empty bootstrap that is obviously not working so well. Let me try to fix that tomorrow.

I think you can get away with that by issuing

# export DEVABI=21.7

prior to bootstrap.


Cheers,
Franco
Title: Re: Changes to the bootstrap procedure for 21.7?
Post by: Patrick M. Hausen on July 20, 2021, 09:09:20 pm
Will a 21.1 bootstrap work if I set DEVABI=21.1, too? Because I could unconditionally code it into my Vagrantfile in that case.

But if you are going to make it run without in the next couple of days, I'll better just wait and try again. I don't need a 21.7 OPNsense now. I am just trying to update my small project to be future proof.
Title: Re: Changes to the bootstrap procedure for 21.7?
Post by: franco on July 21, 2021, 07:50:43 am
21.1 doesn't have the new code that causes this, but in any case there is no harm doing it like you propose.


Cheers,
Franco
Title: Re: Changes to the bootstrap procedure for 21.7?
Post by: franco on July 21, 2021, 09:24:32 am
Can you see if it's fixed now? I removed DEVABI support and demoted the errors to warnings.


Cheers,
Franco
Title: Re: Changes to the bootstrap procedure for 21.7?
Post by: Patrick M. Hausen on July 21, 2021, 09:54:42 am
Yes, working now - thanks!
Title: Re: Changes to the bootstrap procedure for 21.7?
Post by: franco on July 21, 2021, 09:57:03 am
Thanks. I'm changing the instructions in the README to 21.7 now. No need to wait and -r 21.1 is still possible :)

https://github.com/opnsense/update/commit/bd8180887db


Cheers,
Franco
Title: Re: Changes to the bootstrap procedure for 21.7?
Post by: Patrick M. Hausen on July 21, 2021, 11:02:12 am
Just updated the docs and pushed. Thanks again.

Why the rename of the file to opnsense-bootstrap.sh.in?
Title: Re: Changes to the bootstrap procedure for 21.7?
Post by: franco on July 21, 2021, 11:31:14 am
We always did this when a new release was necessary:

https://github.com/opnsense/update/commit/1b53e5ec21a4ae

Now we can set it from the port if no code changed in the update tools:

https://github.com/opnsense/update/commit/a1ad3f6721
https://github.com/opnsense/update/commit/9b1525b89

The .in suffix is necessary to get the replacement from Makefile going. The downside is that the default release of the bootstrap file is %%RELEASE%% when downloaded directly from GitHub.


Cheers,
Franco
Title: Re: Changes to the bootstrap procedure for 21.7?
Post by: franco on July 21, 2021, 11:33:04 am
PS: We do want to hardcode the release into the script on the installation to have the checksumming of packages spot issues with it, i.e. modified locally or whole file trashed for some reason.