Date: Sat, 27 Jan 2018 20:09:58 +0000 (UTC) From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r460149 - in head/dns/mdnsd: . files Message-ID: <201801272009.w0RK9waf093365@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yuri Date: Sat Jan 27 20:09:57 2018 New Revision: 460149 URL: https://svnweb.freebsd.org/changeset/ports/460149 Log: dns/mdnsd: Updating to the current revision PR: 225114 Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D13600 Added: head/dns/mdnsd/files/patch-libmdnsd_1035.c (contents, props changed) head/dns/mdnsd/files/patch-libmdnsd_mdnsd.c (contents, props changed) Deleted: head/dns/mdnsd/files/patch-1035.c head/dns/mdnsd/files/patch-Makefile head/dns/mdnsd/files/patch-mhttp.c head/dns/mdnsd/files/patch-sdtxt.c head/dns/mdnsd/files/patch-xht.c Modified: head/dns/mdnsd/Makefile head/dns/mdnsd/distinfo head/dns/mdnsd/files/patch-mdnsd.c head/dns/mdnsd/files/patch-mquery.c head/dns/mdnsd/pkg-message Modified: head/dns/mdnsd/Makefile ============================================================================== --- head/dns/mdnsd/Makefile Sat Jan 27 20:06:03 2018 (r460148) +++ head/dns/mdnsd/Makefile Sat Jan 27 20:09:57 2018 (r460149) @@ -2,19 +2,27 @@ # $FreeBSD$ PORTNAME= mdnsd -PORTVERSION= 0.7G -PORTREVISION= 1 +DISTVERSIONPREFIX= v +DISTVERSION= 0.7G-107 +DISTVERSIONSUFFIX= -gf4aee59 +PORTEPOCH= 1 CATEGORIES= dns -MASTER_SITES= http://www.cs.cmu.edu/~dpelleg/download/ MAINTAINER= daniel+mdnsd@pelleg.org COMMENT= Advertise a service via Rendezvous -PLIST_FILES= bin/mhttp bin/mquery +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE +USES= cmake:outsource +USE_GITHUB= yes +GH_ACCOUNT= Pro + +PLIST_FILES= bin/mdnsd bin/mquery + do-install: -.for f in mhttp mquery - ${INSTALL_PROGRAM} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin +.for f in mdnsd mquery + ${INSTALL_PROGRAM} ${CONFIGURE_WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin .endfor .include <bsd.port.mk> Modified: head/dns/mdnsd/distinfo ============================================================================== --- head/dns/mdnsd/distinfo Sat Jan 27 20:06:03 2018 (r460148) +++ head/dns/mdnsd/distinfo Sat Jan 27 20:09:57 2018 (r460149) @@ -1,2 +1,3 @@ -SHA256 (mdnsd-0.7G.tar.gz) = d8f07196504b8e9a243ff55e44962c843fd03b1cd4ea07022ce61ee00891cb86 -SIZE (mdnsd-0.7G.tar.gz) = 14873 +TIMESTAMP = 1514072404 +SHA256 (Pro-mdnsd-v0.7G-107-gf4aee59_GH0.tar.gz) = 5924dc3045d90ce0796dec1630d22e7f9ce191baa53e6d7fdfa4552086e1e5a2 +SIZE (Pro-mdnsd-v0.7G-107-gf4aee59_GH0.tar.gz) = 31944 Added: head/dns/mdnsd/files/patch-libmdnsd_1035.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/dns/mdnsd/files/patch-libmdnsd_1035.c Sat Jan 27 20:09:57 2018 (r460149) @@ -0,0 +1,11 @@ +--- libmdnsd/1035.c.orig 2017-11-22 13:47:51 UTC ++++ libmdnsd/1035.c +@@ -1,6 +1,7 @@ ++ ++#include <stdio.h> + #include "1035.h" + #include <string.h> +-#include <stdio.h> + + #if defined(_MSC_VER) && _MSC_VER < 1900 + Added: head/dns/mdnsd/files/patch-libmdnsd_mdnsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/dns/mdnsd/files/patch-libmdnsd_mdnsd.c Sat Jan 27 20:09:57 2018 (r460149) @@ -0,0 +1,11 @@ +--- libmdnsd/mdnsd.c.orig 2017-11-22 13:47:51 UTC ++++ libmdnsd/mdnsd.c +@@ -3,6 +3,8 @@ + #include <string.h> + #include <stdlib.h> + #include <errno.h> ++#include <netinet/in.h> ++#include <sys/socket.h> + + #define SPRIME 108 /* Size of query/publish hashes */ + #define LPRIME 1009 /* Size of cache hash */ Modified: head/dns/mdnsd/files/patch-mdnsd.c ============================================================================== --- head/dns/mdnsd/files/patch-mdnsd.c Sat Jan 27 20:06:03 2018 (r460148) +++ head/dns/mdnsd/files/patch-mdnsd.c Sat Jan 27 20:09:57 2018 (r460149) @@ -1,113 +1,19 @@ -diff -ruN mdnsd.c.orig mdnsd.c ---- mdnsd.c.orig Tue Feb 18 08:54:46 2003 -+++ mdnsd.c Mon Sep 25 22:11:17 2006 -@@ -1,5 +1,7 @@ - #include "mdnsd.h" -+#include <arpa/inet.h> - #include <string.h> -+#include <stdlib.h> +--- mdnsd.c.orig 2017-11-22 13:47:51 UTC ++++ mdnsd.c +@@ -13,6 +13,7 @@ + #endif - // size of query/publish hashes - #define SPRIME 108 -@@ -198,7 +200,7 @@ - struct cached *cur = 0; - q->nexttry = 0; - q->tries = 0; -- while(cur = _c_next(d,cur,q->name,q->type)) -+ while( (cur = _c_next(d,cur,q->name,q->type)) ) - if(q->nexttry == 0 || cur->rr.ttl - 7 < q->nexttry) q->nexttry = cur->rr.ttl - 7; - if(q->nexttry != 0 && q->nexttry < d->checkqlist) d->checkqlist = q->nexttry; - } -@@ -208,7 +210,7 @@ - struct cached *c = 0; - struct query *cur; - int i = _namehash(q->name) % LPRIME; -- while(c = _c_next(d,c,q->name,q->type)) c->q = 0; -+ while( (c = _c_next(d,c,q->name,q->type)) ) c->q = 0; - if(d->qlist == q) d->qlist = q->list; - else { - for(cur=d->qlist;cur->list != q;cur = cur->list); -@@ -288,13 +290,13 @@ + #include <sys/types.h> ++#include <sys/socket.h> - if(r->class == 32768 + d->class) - { // cache flush -- while(c = _c_next(d,c,r->name,r->type)) c->rr.ttl = 0; -+ while( (c = _c_next(d,c,r->name,r->type)) ) c->rr.ttl = 0; - _c_expire(d,&d->cache[i]); - } - - if(r->ttl == 0) - { // process deletes -- while(c = _c_next(d,c,r->name,r->type)) -+ while( (c = _c_next(d,c,r->name,r->type)) ) - if(_a_match(r,&c->rr)) - { - c->rr.ttl = 0; -@@ -330,7 +332,7 @@ - } - c->next = d->cache[i]; - d->cache[i] = c; -- if(c->q = _q_next(d, 0, r->name, r->type)) -+ if( (c->q = _q_next(d, 0, r->name, r->type)) ) - _q_answer(d,c); - } + #ifdef _WIN32 -@@ -344,7 +346,11 @@ +@@ -139,7 +140,7 @@ int msock(void) + int s, flag = 1, ittl = 255; + struct sockaddr_in in; + struct ip_mreq mc; +- char ttl = 255; // send to any reachable net, not only the subnet ++ u_char ttl = 255; // send to any reachable net, not only the subnet - int _r_out(mdnsd d, struct message *m, mdnsdr *list) - { // copy a published record into an outgoing message -- mdnsdr r, next; -+ /* -+ * Unused -+ * mdnsdr next; -+ */ -+ mdnsdr r; - int ret = 0; - while((r = *list) != 0 && message_packet_len(m) + _rr_len(&r->rr) < d->frame) - { -@@ -363,7 +369,10 @@ - - mdnsd mdnsd_new(int class, int frame) - { -- int i; -+ /* -+ * Unused -+ * int i; -+ */ - mdnsd d; - d = (mdnsd)malloc(sizeof(struct mdnsd_struct)); - bzero(d,sizeof(struct mdnsd_struct)); -@@ -401,7 +410,10 @@ - - void mdnsd_free(mdnsd d) - { -- int i; -+ /* -+ * Unused -+ * int i; -+ */ - // loop through all hashes, free everything - // free answers if any - free(d); -@@ -611,8 +623,11 @@ - - struct timeval *mdnsd_sleep(mdnsd d) - { -+ /* -+ * Unused -+ * mdnsdr r; -+ */ - int sec, usec; -- mdnsdr r; - d->sleep.tv_sec = d->sleep.tv_usec = 0; - #define RET while(d->sleep.tv_usec > 1000000) {d->sleep.tv_sec++;d->sleep.tv_usec -= 1000000;} return &d->sleep; - -@@ -665,7 +680,7 @@ - q->next = d->queries[i]; - q->list = d->qlist; - d->qlist = d->queries[i] = q; -- while(cur = _c_next(d,cur,q->name,q->type)) -+ while( (cur = _c_next(d,cur,q->name,q->type)) ) - cur->q = q; // any cached entries should be associated - _q_reset(d,q); - q->nexttry = d->checkqlist = d->now.tv_sec; // new questin, immediately send out + memset(&in, 0, sizeof(in)); + in.sin_family = AF_INET; Modified: head/dns/mdnsd/files/patch-mquery.c ============================================================================== --- head/dns/mdnsd/files/patch-mquery.c Sat Jan 27 20:06:03 2018 (r460148) +++ head/dns/mdnsd/files/patch-mquery.c Sat Jan 27 20:09:57 2018 (r460149) @@ -1,51 +1,11 @@ -diff -ruN mquery.c.orig mquery.c ---- mquery.c.orig Tue Feb 18 08:59:49 2003 -+++ mquery.c Mon Sep 25 22:11:18 2006 -@@ -1,21 +1,29 @@ - #include <sys/types.h> - #include <sys/socket.h> -+#include <stdio.h> - #include <netinet/in.h> -+#include <arpa/inet.h> - #include <fcntl.h> - #include <errno.h> -+#include <stdlib.h> -+#include <string.h> -+#include <strings.h> -+#include <unistd.h> +--- mquery.c.orig 2017-11-22 13:47:51 UTC ++++ mquery.c +@@ -10,6 +10,8 @@ + #include <stdlib.h> + #include <string.h> + #include <time.h> ++#include <sys/socket.h> ++#include <netinet/in.h> - #include "mdnsd.h" + #include <libmdnsd/mdnsd.h> - // print an answer - int ans(mdnsda a, void *arg) - { -+ struct in_addr ip; - int now; -+ ip.s_addr = a->ip; - if(a->ttl == 0) now = 0; - else now = a->ttl - time(0); - switch(a->type) - { - case QTYPE_A: -- printf("A %s for %d seconds to ip %s\n",a->name,now,inet_ntoa(a->ip)); -+ printf("A %s for %d seconds to ip %s\n",a->name,now,inet_ntoa(ip)); - break; - case QTYPE_PTR: - printf("PTR %s for %d seconds to %s\n",a->name,now,a->rdname); -@@ -26,6 +34,7 @@ - default: - printf("%d %s for %d seconds with %d data\n",a->type,a->name,now,a->rdlen); - } -+ return 0; - } - - // create multicast 224.0.0.251:5353 socket -@@ -74,7 +83,7 @@ - fd_set fds; - int s; - -- if(argc != 3) { printf("usage: mquery 12 _http._tcp.local.\n"); return; } -+ if(argc != 3) { printf("usage: mquery 12 _http._tcp.local.\n"); return 0; } - - d = mdnsd_new(1,1000); - if((s = msock()) == 0) { printf("can't create socket: %s\n",strerror(errno)); return 1; } Modified: head/dns/mdnsd/pkg-message ============================================================================== --- head/dns/mdnsd/pkg-message Sat Jan 27 20:06:03 2018 (r460148) +++ head/dns/mdnsd/pkg-message Sat Jan 27 20:09:57 2018 (r460149) @@ -1,4 +1,4 @@ To use: - mhttp 'unique name' 12.34.56.78 80 '/optionalpath' + mdnsd 'unique name' 12.34.56.78 80 '/optionalpath' For example: - mhttp audiotron 192.168.123.195 80 '/index.asp' & + mdnsd audiotron 192.168.123.195 80 '/index.asp' &
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801272009.w0RK9waf093365>