You are here
Daniele Lolli (UncleDan) - Sat, 2024/05/04 - 18:08
I am to try to create a virtual appliance for this wonderful piece of software:
https://github.com/devcode-it/openstamanager
Unfortunately it supports up to PHP 8.1.
Any hint to downgrade PHP from 8.2 to 8.1? Add Sury repo? Some "smart" system variable? Some appliance with similar needs to copy/be inspired from?
Thanks in advance.
Forum:
We've got a script for that!
We've got a dedicated 'tkl-upgrade-hp' script for changing PHP version! Unfortunately it wasn't developed until part of the way through the v18.0 release, so assuming that you're using the LAMP appliance (which was one of the first released) then you won't have it. Even if you do have the script, there is a minor bug where the switches for one of command are in wrong order.
Once we finally finish the release, I do plan to re-release the early appliances so that that script and all the other improvements we've made along the way are included in the latest builds.
In the meantime, you can download it yourself:
Then run:
And follow the prompts. Let me know if you have any issues with it.
Where to launch the script?
Ok, thanks. But where should I run the script? In the makefile (I can not imagine how to see the propts there...) or in the TKLdev before making the iso?
Sorry I misunderstood
Sorry I misunderstood. It didn't occur to me that you were building an appliance (I'm not sure why after all the updates you did for v18.0!).
So please ignore my note re that script. In appliance build code, you'll need to do a couple of things:
Makefile:
Add this line:
If you want/need any other packages from the repo other than ones that start with 'php' or the Apache module, then they can be auto pinned (security) at build time by adding them as a space separated list to the PHP_EXTRA_PINS env var in the Makefile. E.g.:
Plan:
Replace the line that includes the lamp plan, with lamp81. I.e.:
And all the php module packages you include in the appliance plan need to include the version. E.g.:
Etc.
There is at least one exception. The only one I can think of that doesn't want the version is php-pear, although there may be others. If you get a package not found at build time for a package that includes 8.1 in the name, try removing the version number.
Good luck and ask if you have more questions and let me know how you go. I'm also have a look at your code if you push it to GitHub.
FYI, as is likely clear, the PHP version can be changed to any PHP versions provided by sury.org - scroll down and look for directories that start with phpX.Y. Although it will also need an associated version plan in common.
Also note that only PHP versions supported by upstream are guaranteed security updates - although I know that if sec updates are available for old, unsupported versions, the maintainer of DEB.SURY.ORG will apply them when possible. It's also important to be aware that non Debian PHP versions aren't auto updated and will required regular manual update.
It didn't occur to me that
Two main reasons:
Awesome, thanks mate! :)
Awesome, thanks mate! :)
I hope that my previous post helps. Good luck and as I say, please feel free to ask if you have more questions!
Add new comment