Bug 256001 - dns/knot3: upgrade to 3.0.6
Summary: dns/knot3: upgrade to 3.0.6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Neel Chauhan
URL: https://www.knot-dns.cz/2021-05-12-ve...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-19 14:16 UTC by Leo Vandewoestijne
Modified: 2021-05-22 01:10 UTC (History)
2 users (show)

See Also:


Attachments
knot 3.0.6 svndiff (1.31 KB, patch)
2021-05-19 14:16 UTC, Leo Vandewoestijne
no flags Details | Diff
knot 3.0.6 diff (4.19 KB, patch)
2021-05-20 13:54 UTC, Leo Vandewoestijne
freebsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Vandewoestijne 2021-05-19 14:16:06 UTC
Created attachment 225086 [details]
knot 3.0.6 svndiff

Knot3 was upgraded to 3.0.6 recently.
This patch updates the port accordingly.

Tested using poudriere and portfmt.
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2021-05-20 09:55:43 UTC
Hello,

Before I can take this PR could you take a look at:

1. Could you provide a git diff instead of svn diff?
https://docs.freebsd.org/en/books/porters-handbook/upgrading/#git-diff

2. I've found several commented port options in Makefile:
---
#BUILD_DEPENDS= autoconf>=2.65:devel/autoconf \
#               gsed:textproc/gsed
and
#PLIST_FILES=   etc/rc.d/${PORTNAME}

Any particular reason for this comments?

3. `portclippy Makefile`:
---
# PORTNAME block
PORTNAME
DISTVERSION
CATEGORIES
MASTER_SITES
PKGNAMESUFFIX

# Maintainer block
MAINTAINER
COMMENT

# License block
LICENSE
LICENSE_FILE

# Dependencies
BUILD_DEPENDS
LIB_DEPENDS

# USES block
USES
+USE_LDCONFIG
+USE_RC_SUBR

-CONFLICTS

# Configure block
HAS_CONFIGURE

-BINARY_ALIAS

CONFIGURE_ARGS

-USE_RC_SUBR
# Make block
+INSTALL_TARGET

# Conflicts
+CONFLICTS

# Standard bsd.port.mk variables
+BINARY_ALIAS
SUB_FILES
+SUB_LIST

-USE_LDCONFIG

-INSTALL_TARGET

# Users and groups block
USERS
GROUPS

-SUB_LIST

# Packaging list block
PORTDOCS

# Options definitions
OPTIONS_DEFINE

# Options descriptions
DNSTAP_DESC
+FASTPARSER_DESC
+MAXMINDDB_DESC

# Options helpers
+DNSTAP_LIB_DEPENDS
DNSTAP_CONFIGURE_ENABLE
DNSTAP_CONFIGURE_WITH
-DNSTAP_LIB_DEPENDS
DNSTAP_CPPFLAGS
DOCS_CONFIGURE_OFF

-FASTPARSER_DESC
FASTPARSER_CONFIGURE_ENABLE
-IDN_CONFIGURE_WITH
IDN_CONFIGURE_OFF

-MAXMINDDB_DESC

+IDN_CONFIGURE_WITH
MAXMINDDB_LIB_DEPENDS
MAXMINDDB_CONFIGURE_ENABLE
---
You use portclippy to organize Makefile blocks
Comment 2 Leo Vandewoestijne 2021-05-20 13:54:49 UTC
Created attachment 225123 [details]
knot 3.0.6 diff

> git diff instead of svn diff
>
I seriously dislike maintaining the ridiculous amounts of dependencies for simply communicating a few lines of mutations.
So by these neither, but a normal diff.


> Any particular reason for this comments?
>
autoconf is listed as required at the instructions at knot-dns.cz,
but I think it was core maintainer who removed it.
The comment is a reminder of this conflicting information.

For IDN_LIB_DEPENDS counts the exact same.

But PLIST_FILES is likely safe to delete.


Then portlint / portfmt / portclippy have not been very useful to me in the past, mainly ruining cosmetics to provide a clear overview / disclosing direct correlation with one thing and another which now need to be listed devided far away.

But I admit portclippy does provide useful pointers (where portlint left you clueless).
Still, clearly it's a dangerous one to "fly by the tools":
It isn't always keeping in account things are within an "if" block.
Also I'm not really comfortable using variables before having them defined.
Is it safe to revers the order of these lines?

USERS=          knot
GROUPS=         knot
SUB_LIST+=      USERS="${USERS}" GROUPS="${GROUPS}"    

But for the rest I followed it's instructions as much as possible, and so;
poudriere is happy
portlint is happy
portfmt is happy
portclippy is almost entirely happy, and so am I.
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2021-05-21 05:57:50 UTC
    git diff instead of svn diff
    
    I seriously dislike maintaining the ridiculous amounts of dependencies for
    simply communicating a few lines of mutations.
    So by these neither, but a normal diff.


How to apply this diff? I've tried `git apply` and patch < knot-3.0.6.diff`:

---
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- dns/knot3.orig/Makefile     2021-05-20 13:36:55.791207000 +0000
|+++ dns/knot3/Makefile  2021-05-20 13:41:13.335190000 +0000
--------------------------
Patching file Makefile using Plan A...
Hunk #1 failed at 1.
Hunk #2 failed at 14.
Hunk #3 failed at 45.
Hunk #4 failed at 68.
Hunk #5 failed at 85.
5 out of 5 hunks failed--saving rejects to Makefile.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN dns/knot3.orig/distinfo dns/knot3/distinfo
|--- dns/knot3.orig/distinfo     2021-05-20 13:36:55.791321000 +0000
|+++ dns/knot3/distinfo  2021-05-20 13:18:01.279381000 +0000
--------------------------
Patching file dns/knot3/distinfo using Plan A...
Hunk #1 failed at 1.
1 out of 1 hunks failed--saving rejects to dns/knot3/distinfo.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN dns/knot3.orig/pkg-plist dns/knot3/pkg-plist
|--- dns/knot3.orig/pkg-plist    2021-05-20 13:36:55.791539000 +0000
|+++ dns/knot3/pkg-plist 2021-05-20 13:18:53.052281000 +0000
--------------------------
Patching file dns/knot3/pkg-plist using Plan A...
Hunk #1 failed at 41.
1 out of 1 hunks failed--saving rejects to dns/knot3/pkg-plist.rej
done
---
Any clues?
 

    But I admit portclippy does provide useful pointers (where portlint left you
    clueless).
    Still, clearly it's a dangerous one to "fly by the tools":
    It isn't always keeping in account things are within an "if" block.
    Also I'm not really comfortable using variables before having them defined.
    Is it safe to revers the order of these lines?

    USERS=          knot
    GROUPS=         knot
    SUB_LIST+=      USERS="${USERS}" GROUPS="${GROUPS}"


Yes, you are right, I think its better maintain this order.
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-05-22 01:10:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4ce74222e57947cb9134f897c971f4a7075bca65

commit 4ce74222e57947cb9134f897c971f4a7075bca65
Author:     Leo Vandewoestijne <freebsd@dns.company>
AuthorDate: 2021-05-22 01:08:51 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2021-05-22 01:08:51 +0000

    dns/knot3: Update to 3.0.6

    Changes: https://www.knot-dns.cz/2021-05-12-version-306.html

    PR:     256001

 dns/knot3/Makefile  | 2 +-
 dns/knot3/distinfo  | 6 +++---
 dns/knot3/pkg-plist | 2 ++
 3 files changed, 6 insertions(+), 4 deletions(-)
Comment 5 Neel Chauhan freebsd_committer freebsd_triage 2021-05-22 01:10:35 UTC
I have committed the earlier diff rebased on Git.