Bug 267363 - dns/powerdns: broken due to missing mandatory schema changes
Summary: dns/powerdns: broken due to missing mandatory schema changes
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-26 12:42 UTC by freebsd
Modified: 2022-10-27 16:13 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (tremere)


Attachments
Bump PORTREVISION and add message about mandatory schema changes (1.58 KB, patch)
2022-10-26 15:03 UTC, Ralf van der Enden
tremere: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description freebsd 2022-10-26 12:42:02 UTC
PowerDNS 4.7.0 comes with a mandatory schema change. When upgrading from 4.6.x there is not a single indication when installing the package that that is necessary. It should probably also feature prominently in UPGRADING. Note that the mandatory schema change is also not present in /usr/local/share/doc/powerdns. The schema upgrades there fall versionS behind and this should be rectified.

Current problem in PowerDNS (upgraded from 4.6.x to 4.7.0):

Oct 26 14:18:26 authdns1 pdns[5356]: Backend reported permanent error which prevented lookup (GSQLBackend unable to retrieve information about domain 'xxxxx': Could not prepare statement: select id,name,master,last_check,notified_serial,type,options,catalog,account from domains where name=?: Unknown column 'options' in 'field list'), aborting

(times 1 for every zone)
Comment 1 freebsd 2022-10-26 12:46:42 UTC
Also note that pkg-message contains nothing later than "If upgrading from < 4.2.0:"

There were > 1 mandatory schema changes after this, and they should always be hinted at, and INCLUDED.
Comment 2 freebsd 2022-10-26 13:04:20 UTC
For those who ended up here and are using the MySQL backend:

https://github.com/PowerDNS/pdns/blob/master/modules/gmysqlbackend/4.3.0_to_4.7.0_schema.mysql.sql

ALTER TABLE domains ADD options VARCHAR(64000) DEFAULT NULL;
ALTER TABLE domains ADD catalog VARCHAR(255) DEFAULT NULL;
ALTER TABLE domains MODIFY type VARCHAR(8) NOT NULL;
CREATE INDEX catalog_idx ON domains(catalog);

These should be run on database 'powerdns'.
Comment 3 freebsd 2022-10-26 13:05:42 UTC
The bug report is more about packaging than the software itself, so much should be clear.

Packager/porter: thanks for your efforts, but please include these essential details in the proper files and locations.
Comment 4 Ralf van der Enden 2022-10-26 15:03:32 UTC
Created attachment 237655 [details]
Bump PORTREVISION and add message about mandatory schema changes


Sorry for missing the necessary schema changes. As stated, they're not part of the tarball. Upstream said they'd release an update which does include them. It should be released this week.

To make people aware I've added a message when upgrading and bumped the portrevision to force display of it.
Comment 5 Fernando Apesteguía freebsd_committer freebsd_triage 2022-10-27 12:28:40 UTC
Minor thing:

dns/powerdns/pkg-descr: includes iso-8859-1, or other local characters.  files should be in plain 7-bit ASCII

NO NEED to update a new patch.
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-10-27 15:36:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=002779a7af3e1477e8ae6b0b78aadd89d2e9212f

commit 002779a7af3e1477e8ae6b0b78aadd89d2e9212f
Author:     Ralf van der Enden <tremere@cainites.net>
AuthorDate: 2022-10-27 12:27:07 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2022-10-27 15:31:27 +0000

    dns/powerdns: broken due to missing mandatory schema changes

    Add a message so people are aware and bump PORTREVISION to show it.

    PR:             267363
    Reported by:    freebsd@bengrimm.net (maintainer)

 dns/powerdns/Makefile             |  1 +
 dns/powerdns/files/pkg-message.in | 11 ++++++++++-
 dns/powerdns/pkg-descr            |  4 ++--
 3 files changed, 13 insertions(+), 3 deletions(-)
Comment 7 Fernando Apesteguía freebsd_committer freebsd_triage 2022-10-27 15:36:34 UTC
Committed,

Thanks!
Comment 8 freebsd 2022-10-27 16:13:23 UTC
Thanks all!