PowerDNS / weakforced

Anti-Abuse for servers at authentication time
GNU General Public License v3.0
123 stars 33 forks source link

Add missing dependencies to spec file #381

Closed fraenki closed 1 year ago

fraenki commented 1 year ago

While trying to build a RPM package I've noticed that several dependencies are not mentioned in the spec file, so I've added them:

+BuildRequires: drogon
+BuildRequires: prometheus-cpp-devel
+BuildRequires: yaml-cpp-devel

Besides that I've sorted the list of dependencies alphanumerically to make it easier to grasp :)

neilcook commented 1 year ago

BuildRequires: yaml-cpp-devel

This makes sense.

BuildRequires: drogon
BuildRequires: prometheus-cpp-devel

This I do not understand, since these packages are not available, at least on centos 7 or oracle linux 8.

fraenki commented 1 year ago

This I do not understand, since these packages are not available, at least on centos 7 or oracle linux 8.

That's true (I've created [source] RPMs for them). However, they are required, otherwise the build would fail. Tested with weakforced 2.6.2. I have no insights into the weakforced build environment, so I don't know how this problem is solved there.

neilcook commented 1 year ago

This I do not understand, since these packages are not available, at least on centos 7 or oracle linux 8.

That's true (I've created [source] RPMs for them). However, they are required, otherwise the build would fail. Tested with weakforced 2.6.2. I have no insights into the weakforced build environment, so I don't know how this problem is solved there.

So your changes would in fact break the weakforced build environment, as you can see by the failed CI.

I highly recommend using the weakforced build environment to build rpms; it's extremely simple to use:

git submodule init
builder/build.sh centos-7
builder/build.sh ol-8
builder/build.sh amazon-2

etc.

You can add new targets by adding the appropriate docker files in builder-support/dockerfiles.

fraenki commented 1 year ago

OK, I see that you're installing the dependencies from source in builder:

https://github.com/PowerDNS/weakforced/blob/2542d1f3a8979663648141452f0175b9d65db998/builder-support/dockerfiles/Dockerfile.rpmbuild#L34-L44

We won't use the builder, though, because we'd like to build all RPMs in the same way, hence the suggested additions to the SPEC file. I understand that it's not useful to weakforced, so I'll close this PR.