Bug 217326 - [MAINTAINER-UPDATE] dns/knot-resolver: update to 1.2.3
Summary: [MAINTAINER-UPDATE] dns/knot-resolver: update to 1.2.3
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: Ruslan Makhmatkhanov
Depends on:
Reported: 2017-02-24 16:24 UTC by Leo Vandewoestijne
Modified: 2017-02-26 15:20 UTC (History)
1 user (show)

See Also:

knot-resolver 1.2.3 (3.29 KB, patch)
2017-02-24 16:24 UTC, Leo Vandewoestijne
freebsd: maintainer-approval+
Details | Diff
knot-resolver 1.2.3 - but relative (3.10 KB, patch)
2017-02-25 20:09 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 2017-02-24 16:24:58 UTC
Created attachment 180263 [details]
knot-resolver 1.2.3

Knot-Resolver was already updated three times in the past period.
Attached patch is to upgrade to 1.2.3 and is tested with poudriere 10.3 and 11, both AMD and i386.

This PR absolutes PR 217251
Comment 1 Ruslan Makhmatkhanov freebsd_committer 2017-02-24 21:27:52 UTC
Something is still wrong with the patch:
rm@smsh-zfs:/usr/ports/dns/knot-resolver> head -2 Makefile
# Created by: Leo Vandewoestijne <freebsd@dns-lab.com>
# $FreeBSD: head/dns/knot-resolver/Makefile 430235 2017-01-01 03:45:12Z sunpoet $
rm@smsh-zfs:/usr/ports/dns/knot-resolver> fetch -o 1.diff "https://bz-attachments.freebsd.org/attachment.cgi?id=180263"
fetch: https://bz-attachments.freebsd.org/attachment.cgi?id=180263: size of remote file is not known
1.diff                                                3365  B 3477 kBps 00m00s
rm@smsh-zfs:/usr/ports/dns/knot-resolver> patch < 1.diff 
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
|diff -ru dns/knot-resolver.orig/Makefile dns/knot-resolver/Makefile
|--- dns/knot-resolver.orig/Makefile     2017-02-24 01:20:04.696769000 +0000
|+++ dns/knot-resolver/Makefile  2017-02-23 23:28:24.607524000 +0000
Patching file Makefile using Plan A...
Hunk #1 failed at 2.
Hunk #2 failed at 21.
2 out of 2 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 -ru dns/knot-resolver.orig/distinfo dns/knot-resolver/distinfo
|--- dns/knot-resolver.orig/distinfo     2017-02-24 01:20:04.697253000 +0000
|+++ dns/knot-resolver/distinfo  2017-02-23 23:28:29.636000000 +0000
Patching file distinfo using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
|Only in dns/knot-resolver.orig/files: patch-daemon_daemon.mk
|Only in dns/knot-resolver.orig/files: patch-lib_lib.mk
|Only in dns/knot-resolver.orig/files: patch-lib_nsrep.h
|Only in dns/knot-resolver.orig/files: patch-lib_resolve.h
|Only in dns/knot-resolver.orig/files: patch-platform.mk
|diff -ru dns/knot-resolver.orig/pkg-plist dns/knot-resolver/pkg-plist
|--- dns/knot-resolver.orig/pkg-plist    2017-02-24 01:20:04.697660000 +0000
|+++ dns/knot-resolver/pkg-plist 2017-02-20 10:09:15.790991000 +0000
Patching file pkg-plist using Plan A...
Hunk #1 succeeded at 13.
Hunk #2 succeeded at 47.
Hunk #3 succeeded at 54.
rm@smsh-zfs:/usr/ports/dns/knot-resolver> cat Mak
Makefile       Makefile.orig  Makefile.rej   
rm@smsh-zfs:/usr/ports/dns/knot-resolver> cat Makefile.rej 
@@ -2,8 +2,7 @@
 # $FreeBSD: head/dns/knot-resolver/Makefile 430235 2017-01-01 03:45:12Z sunpoet $
 PORTNAME=      knot-resolver
 CATEGORIES=    dns ipv6
 MASTER_SITES=  https://secure.nic.cz/files/knot-resolver/ \
@@ -22,10 +21,11 @@
 CONFLICTS=     knot-1.* knot1-[0-6].*
-MAKE_ARGS+=    PKG_CONFIG_PATH=${LOCALBASE}/libdata/pkgconfig
-MAKE_ARGS+=    lmdb_CFLAGS=-I${LOCALBASE}/include lmdb_LIBS=-llmdb
+MAKE_ARGS+=    PKGCONFIGDIR=${PREFIX}/libdata/pkgconfig
+MAKE_ARGS+=    lmdb_CFLAGS=-I${PREFIX}/include lmdb_LIBS=-llmdb
 USES=          gmake libtool pkgconfig tar:xz
 USE_CSTD=      c99

And if I apply rejected parts manually, then `make patch` fails. Would you please recheck your submission? And btw, what the point of changing PREFIX=${PREFIX} to PREFIX=${LOCALBASE}? They are the same in most times.
Comment 2 Leo Vandewoestijne 2017-02-25 20:09:22 UTC
Created attachment 180293 [details]
knot-resolver 1.2.3 - but relative

> rm@smsh-zfs:/usr/ports/dns/knot-resolver> patch < 1.diff 
...shows the patch was applied from the port directory, in stead of the ports hierarchy's root (in above case the very common /usr/ports).
The new patch should allow to do so.

> And btw, what the point of changing PREFIX=${PREFIX} to PREFIX=${LOCALBASE}?
> They are the same in most times.
To be cascading and consistent, in stead of opposite.
Comment 3 Ruslan Makhmatkhanov freebsd_committer 2017-02-25 20:13:56 UTC
(In reply to Leo Vandewoestijne from comment #2)
I also tried to apply from /usr/ports, but rejects were against /usr/ports/Makefile... Anyway, I'm trying new patch now,
Comment 4 Ruslan Makhmatkhanov freebsd_committer 2017-02-25 20:17:21 UTC
Yes, now everything is good with the submission, thank you!
But it still fails upon `make patch`:

===> Fetching all distfiles required by knot-resolver-1.2.3 for building
===>  Extracting for knot-resolver-1.2.3
=> SHA256 Checksum OK for knot-resolver-1.2.3.tar.xz.
===>  Patching for knot-resolver-1.2.3
===>  Applying FreeBSD patches for knot-resolver-1.2.3
1 out of 1 hunks failed--saving rejects to daemon/daemon.mk.rej
=> FreeBSD patch patch-daemon_daemon.mk failed to apply cleanly.
*** Error code 1

Should anything be done with patches in files/ subdirectory? I see that strange:
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
|Only in ../knot-resolver.orig/files: patch-daemon_daemon.mk
|Only in ../knot-resolver.orig/files: patch-lib_lib.mk
|Only in ../knot-resolver.orig/files: patch-lib_nsrep.h
|Only in ../knot-resolver.orig/files: patch-lib_resolve.h
|Only in ../knot-resolver.orig/files: patch-platform.mk
Comment 5 Leo Vandewoestijne 2017-02-26 14:09:52 UTC
> Should anything be done with patches in files/ subdirectory?
Yes; files/patch-* should all be removed.
Comment 6 Ruslan Makhmatkhanov freebsd_committer 2017-02-26 15:16:26 UTC
Ok, please explicitly mention that in PR next time, or just use something like diff -ruNa to create the patch, so the info about deleted files was in the patch itself.
Comment 7 commit-hook freebsd_committer 2017-02-26 15:18:13 UTC
A commit references this bug:

Author: rm
Date: Sun Feb 26 15:17:59 UTC 2017
New revision: 434888
URL: https://svnweb.freebsd.org/changeset/ports/434888

  dns/knot-resolver: update to 1.2.3

  - tweak make variables
  - remove unneeded local patches

  PR:		217326
  Submitted by:	 Leo Vandewoestijne <freebsd@dns-lab.com> (maintainer)

Comment 8 Ruslan Makhmatkhanov freebsd_committer 2017-02-26 15:20:10 UTC
Committed, thank you!