Add support for FreeBSD as a target#60
Conversation
|
|
||
| - name: Install the MySQL dependencies on FreeBSD | ||
| pkgng: | ||
| name: "mysql56-client" |
There was a problem hiding this comment.
Is this the most stable name to depend on? Is there no number-free variant that will be stable over more years?
There was a problem hiding this comment.
Unfortunately I think yes. FreeBSD provides a separate port for both the server and the client portion of both MySQL and PostgreSQL. When building from source, you can specify a different version.
I went with the version that is default in the source:
https://svnweb.freebsd.org/ports/head/Mk/bsd.default-versions.mk?view=markup
I guess one could extract it into a variable, so that all these dependencies could be included in the vars/ directory. This would have the benefit of helping those people who build their own packages.
There was a problem hiding this comment.
Do I understand correctly that the powerdns package does not depend on the mysql client package?
There was a problem hiding this comment.
It does have databases/mysql56-client as a dependency. See: https://www.freshports.org/dns/powerdns/
If you use the default packages that are built by the FreeBSD-team, it will be pulled in as a dependency while installing powerdns.
This would only install the client in the case where you "forgot" to install it the normal way, otherwise it would already find it there.
There was a problem hiding this comment.
I looked into this a little more, and it seems that there is also a similar problem with the python version, which comes in two flavors: py27- vs py36-
I will take another look at this.
There was a problem hiding this comment.
If you use the default packages that are built by the FreeBSD-team, it will be pulled in as a dependency while installing powerdns.
Then we should think about not hardcoding mysql56-client in this role. If we remove it, the role will work for most users for many years. But if we keep it in, it might break on the next FreeBSD release.
There was a problem hiding this comment.
I checked this against a Fedora machine, where is also broke because it needed other packages.
Since this would have created yet another do-when block, I extracted it into a separate variable.
Having it hardcoded in the vars/FreeBSD.yml file does not seem to much, the default is rarely changes. If someone builds their own packages, they can override it in the playbook.
Edit: this should also open up for using mariadb instead of mysql for those who are so inclined.
There was a problem hiding this comment.
As per comment by RvdE(#60 (comment)), I removed the installation of dependencies for FreeBSD, but left them for the Linux flavours.
| default_pdns_debug_symbols_package_name: "pdns-server-dbg" | ||
|
|
||
| # List of PowerDNS Authoritative Server Backends packages on Debian | ||
| default_pdns_backends_packages: |
There was a problem hiding this comment.
why is this list for Debian in vars/FreeBSD.yml?
There was a problem hiding this comment.
(I understand it was copied from the Debian file, but it doesn't make sense for FreeBSD)
There was a problem hiding this comment.
The conditionals from tasks/install-FreeBSD.yml break is the variables are not defined.
name: Install the PowerDNS Authoritative Server debug symbols ... when: pdns_install_debug_symbols_package
name: Install the PowerDNS Authoritative Server backends ... when: pdns_backends_packages is defined
That was the only way I found (within the time I put into it) to solve the issue. There is almost certainly a better way.
There was a problem hiding this comment.
I checked some more, and my other suggestion would be to change the conditionals to
when: not pdns_install_debug_symbols_package_name and set the default to be false.
When a package name is entered, it logs that the feature isnt supported. That was along the lines I had in mind.
Co-Authored-By: Peter van Dijk <peter.van.dijk@powerdns.com>
|
Hi. I'm the maintainer for dns/powerdns (and dns/powerdns-recursor) on FreeBSD. If dns/powerdns is installed using pkg (or manually by using make install from the port's directory) it will install everything it depends on automatically. If you install from FreeBSD's repo you'll get the MySQL, PgSql and SQLite3 backends. So IMO there's no need to add any dependencies in the yaml for FreeBSD. |
|
I have looked at the test-failures, and do not believe that they are caused by my changes. |
Looks like we're trying to test on an ancient ubuntu :-). #62 should take care of that |
Any chance of someone rerunning the tests to see if they pass? I do not know how to trigger the tests without an extra commit, and I don't have any changes. |
|
you should be able to rebase on master and push, that'll retrigger the tests. |
FreeBSD was not supported as an installation target.
There are a number of differences which are taken card of by these changes.