Date: Fri, 28 Mar 2025 19:40:52 +0100 From: Daniel Engberg <diizzy@FreeBSD.org> To: Renato Botelho <garga@FreeBSD.org>, ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: Re: git: ef8919adec5c - main - net-mgmt/andwatch: Add new port Message-ID: <b9106228-b3de-4c42-be4c-3cabc6257a04@FreeBSD.org> In-Reply-To: <202503281145.52SBjOHY097550@gitrepo.freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On 2025-03-28 12:45, Renato Botelho wrote: > The branch main has been updated by garga: > > URL:https://cgit.FreeBSD.org/ports/commit/?id=ef8919adec5cb3e4256c3421529a7bbbfbf55917 > > commit ef8919adec5cb3e4256c3421529a7bbbfbf55917 > Author: Denny Page<dennypage@me.com> > AuthorDate: 2025-03-27 18:18:43 +0000 > Commit: Renato Botelho<garga@FreeBSD.org> > CommitDate: 2025-03-28 11:45:12 +0000 > > net-mgmt/andwatch: Add new port > > ANDwatch monitors Arp (IPV4) and Neighbor Discovery (IPv6) > packets, maintains a database of IP address to hardware > address (Ethernet) mappings, and issues notifications when > the hardware address of an IP address changes. > > PR: 284907 > --- > net-mgmt/Makefile | 1 + > net-mgmt/andwatch/Makefile | 41 ++++++++++++++++++++++++++++++++++ > net-mgmt/andwatch/distinfo | 3 +++ > net-mgmt/andwatch/files/pkg-message.in | 20 +++++++++++++++++ > net-mgmt/andwatch/pkg-descr | 4 ++++ > net-mgmt/andwatch/pkg-plist | 6 +++++ > 6 files changed, 75 insertions(+) > > diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile > index 148a708d12c7..fb024a06c187 100644 > --- a/net-mgmt/Makefile > +++ b/net-mgmt/Makefile > @@ -7,6 +7,7 @@ > SUBDIR += aggregate > SUBDIR += aircrack-ng > SUBDIR += alertmanager > + SUBDIR += andwatch > SUBDIR += ap-utils > SUBDIR += argus3 > SUBDIR += argus3-clients > diff --git a/net-mgmt/andwatch/Makefile b/net-mgmt/andwatch/Makefile > new file mode 100644 > index 000000000000..34972ed87c8c > --- /dev/null > +++ b/net-mgmt/andwatch/Makefile > @@ -0,0 +1,41 @@ > +PORTNAME= andwatch > +PORTVERSION= 2.1.0 > +DISTVERSIONPREFIX= v > +CATEGORIES= net-mgmt > + > +MAINTAINER= dennypage@me.com > +COMMENT= ANDwatch - Arp and Neighbor Discovery monitor > +WWW= https://github.com/dennypage/andwatch > + > +LICENSE= BSD2CLAUSE > + > +LIB_DEPENDS= libpcap.so:net/libpcap \ > + libsqlite3.so:databases/sqlite3 \ > + libcurl.so:ftp/curl > + > +USE_GITHUB= yes > +GH_ACCOUNT= dennypage > + > +CFLAGS+= -I${LOCALBASE}/include > +LDFLAGS+= -L${LOCALBASE}/lib > + > +SUB_FILES= pkg-message > + > +post-patch: > + ${REINPLACE_CMD} -e "/LIB_DIR/s,/var/lib,/var/db," \ > + ${WRKSRC}/andwatch.h > + ${REINPLACE_CMD} -e 's/$$(CC)/$$(CC) $$(CFLAGS) $$(LDFLAGS)/' \ > + ${WRKSRC}/Makefile > + > +do-install: > + ${INSTALL_PROGRAM} ${WRKSRC}/andwatchd ${STAGEDIR}${PREFIX}/bin > + ${INSTALL_PROGRAM} ${WRKSRC}/andwatch-query ${STAGEDIR}${PREFIX}/bin > + ${INSTALL_PROGRAM} ${WRKSRC}/andwatch-query-ma ${STAGEDIR}${PREFIX}/bin > + ${INSTALL_PROGRAM} ${WRKSRC}/andwatch-update-ma ${STAGEDIR}${PREFIX}/bin > + @${MKDIR} ${STAGEDIR}${DATADIR} > + ${INSTALL_DATA} ${WRKSRC}/andwatch-notify.sh ${STAGEDIR}${DATADIR} > + > +post-install: > + ${MKDIR} ${STAGEDIR}/var/db/andwatch > + > +.include <bsd.port.mk> > diff --git a/net-mgmt/andwatch/distinfo b/net-mgmt/andwatch/distinfo > new file mode 100644 > index 000000000000..5a10cdfa910e > --- /dev/null > +++ b/net-mgmt/andwatch/distinfo > @@ -0,0 +1,3 @@ > +TIMESTAMP = 1740595076 > +SHA256 (dennypage-andwatch-v2.1.0_GH0.tar.gz) = c02df4ab16214d1a4f98051d056f98a53cf33504caa8296f50b4cc8b3b6b09fc > +SIZE (dennypage-andwatch-v2.1.0_GH0.tar.gz) = 20475 > diff --git a/net-mgmt/andwatch/files/pkg-message.in b/net-mgmt/andwatch/files/pkg-message.in > new file mode 100644 > index 000000000000..2e55879274fa > --- /dev/null > +++ b/net-mgmt/andwatch/files/pkg-message.in > @@ -0,0 +1,20 @@ > +[ > +{ type: install > + message: <<EOM > +Before using ANDwatch, you must create the MAC Address database. The > +The MAC Address database is created with the following command: > + > + %%PREFIX%%/bin/andwatch-update-ma > + > +It is generally a good idea to update the MAC Address database on a > +periodic basis to incorporate new address assignments. This update > +can be done via cron. Here is an example cron entry to update the > +MAC Address database once per month: > + > + 0 0 1 * * root /usr/bin/nice -n20 %%PREFIX%%/bin/andwatch-update-ma > + > +Note that the database update is performed live, and andwatchd does > +not need to be stopped in order to run the update. > +EOM > +} > +] > diff --git a/net-mgmt/andwatch/pkg-descr b/net-mgmt/andwatch/pkg-descr > new file mode 100644 > index 000000000000..789e027aa5f2 > --- /dev/null > +++ b/net-mgmt/andwatch/pkg-descr > @@ -0,0 +1,4 @@ > +ANDwatch monitors Arp (IPV4) and Neighbor Discovery (IPv6) > +packets, maintains a database of IP address to hardware > +address (Ethernet) mappings, and issues notifications when > +the hardware address of an IP address changes. > diff --git a/net-mgmt/andwatch/pkg-plist b/net-mgmt/andwatch/pkg-plist > new file mode 100644 > index 000000000000..24c4f3a176d2 > --- /dev/null > +++ b/net-mgmt/andwatch/pkg-plist > @@ -0,0 +1,6 @@ > +bin/andwatchd > +bin/andwatch-query > +bin/andwatch-query-ma > +bin/andwatch-update-ma > +%%DATADIR%%/andwatch-notify.sh > +@dir /var/db/andwatch Hi, Please follow Porters Handbook (variables and ordering), https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github See Example 16 sqlite3 should use the sqlite helper, https://docs.freebsd.org/en/books/porters-handbook/book/#using-databases-uses C/LDFLAGS should use the localbase helper, https://cgit.freebsd.org/ports/tree/Mk/Uses/localbase.mk Since submitter is upstream, why not ask submitter fix the project Makefile instead of doing a bunch of hacks? Best regards, Daniel [-- Attachment #2 --] <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <div class="moz-cite-prefix">On 2025-03-28 12:45, Renato Botelho wrote:<br> </div> <blockquote type="cite" cite="mid:202503281145.52SBjOHY097550@gitrepo.freebsd.org"> <pre wrap="" class="moz-quote-pre">The branch main has been updated by garga: URL: <a class="moz-txt-link-freetext" href="https://cgit.FreeBSD.org/ports/commit/?id=ef8919adec5cb3e4256c3421529a7bbbfbf55917">https://cgit.FreeBSD.org/ports/commit/?id=ef8919adec5cb3e4256c3421529a7bbbfbf55917</a> commit ef8919adec5cb3e4256c3421529a7bbbfbf55917 Author: Denny Page <a class="moz-txt-link-rfc2396E" href="mailto:dennypage@me.com"><dennypage@me.com></a> AuthorDate: 2025-03-27 18:18:43 +0000 Commit: Renato Botelho <a class="moz-txt-link-rfc2396E" href="mailto:garga@FreeBSD.org"><garga@FreeBSD.org></a> CommitDate: 2025-03-28 11:45:12 +0000 net-mgmt/andwatch: Add new port ANDwatch monitors Arp (IPV4) and Neighbor Discovery (IPv6) packets, maintains a database of IP address to hardware address (Ethernet) mappings, and issues notifications when the hardware address of an IP address changes. PR: 284907 --- net-mgmt/Makefile | 1 + net-mgmt/andwatch/Makefile | 41 ++++++++++++++++++++++++++++++++++ net-mgmt/andwatch/distinfo | 3 +++ net-mgmt/andwatch/files/pkg-message.in | 20 +++++++++++++++++ net-mgmt/andwatch/pkg-descr | 4 ++++ net-mgmt/andwatch/pkg-plist | 6 +++++ 6 files changed, 75 insertions(+) diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index 148a708d12c7..fb024a06c187 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -7,6 +7,7 @@ SUBDIR += aggregate SUBDIR += aircrack-ng SUBDIR += alertmanager + SUBDIR += andwatch SUBDIR += ap-utils SUBDIR += argus3 SUBDIR += argus3-clients diff --git a/net-mgmt/andwatch/Makefile b/net-mgmt/andwatch/Makefile new file mode 100644 index 000000000000..34972ed87c8c --- /dev/null +++ b/net-mgmt/andwatch/Makefile @@ -0,0 +1,41 @@ +PORTNAME= andwatch +PORTVERSION= 2.1.0 +DISTVERSIONPREFIX= v +CATEGORIES= net-mgmt + +MAINTAINER= <a class="moz-txt-link-abbreviated" href="mailto:dennypage@me.com">dennypage@me.com</a> +COMMENT= ANDwatch - Arp and Neighbor Discovery monitor +WWW= <a class="moz-txt-link-freetext" href="https://github.com/dennypage/andwatch">https://github.com/dennypage/andwatch</a> + +LICENSE= BSD2CLAUSE + +LIB_DEPENDS= libpcap.so:net/libpcap \ + libsqlite3.so:databases/sqlite3 \ + libcurl.so:ftp/curl + +USE_GITHUB= yes +GH_ACCOUNT= dennypage + +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +SUB_FILES= pkg-message + +post-patch: + ${REINPLACE_CMD} -e "/LIB_DIR/s,/var/lib,/var/db," \ + ${WRKSRC}/andwatch.h + ${REINPLACE_CMD} -e 's/$$(CC)/$$(CC) $$(CFLAGS) $$(LDFLAGS)/' \ + ${WRKSRC}/Makefile + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/andwatchd ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/andwatch-query ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/andwatch-query-ma ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/andwatch-update-ma ${STAGEDIR}${PREFIX}/bin + @${MKDIR} ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/andwatch-notify.sh ${STAGEDIR}${DATADIR} + +post-install: + ${MKDIR} ${STAGEDIR}/var/db/andwatch + +.include <bsd.port.mk> diff --git a/net-mgmt/andwatch/distinfo b/net-mgmt/andwatch/distinfo new file mode 100644 index 000000000000..5a10cdfa910e --- /dev/null +++ b/net-mgmt/andwatch/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1740595076 +SHA256 (dennypage-andwatch-v2.1.0_GH0.tar.gz) = c02df4ab16214d1a4f98051d056f98a53cf33504caa8296f50b4cc8b3b6b09fc +SIZE (dennypage-andwatch-v2.1.0_GH0.tar.gz) = 20475 diff --git a/net-mgmt/andwatch/files/pkg-message.in b/net-mgmt/andwatch/files/pkg-message.in new file mode 100644 index 000000000000..2e55879274fa --- /dev/null +++ b/net-mgmt/andwatch/files/pkg-message.in @@ -0,0 +1,20 @@ +[ +{ type: install + message: <<EOM +Before using ANDwatch, you must create the MAC Address database. The +The MAC Address database is created with the following command: + + %%PREFIX%%/bin/andwatch-update-ma + +It is generally a good idea to update the MAC Address database on a +periodic basis to incorporate new address assignments. This update +can be done via cron. Here is an example cron entry to update the +MAC Address database once per month: + + 0 0 1 * * root /usr/bin/nice -n20 %%PREFIX%%/bin/andwatch-update-ma + +Note that the database update is performed live, and andwatchd does +not need to be stopped in order to run the update. +EOM +} +] diff --git a/net-mgmt/andwatch/pkg-descr b/net-mgmt/andwatch/pkg-descr new file mode 100644 index 000000000000..789e027aa5f2 --- /dev/null +++ b/net-mgmt/andwatch/pkg-descr @@ -0,0 +1,4 @@ +ANDwatch monitors Arp (IPV4) and Neighbor Discovery (IPv6) +packets, maintains a database of IP address to hardware +address (Ethernet) mappings, and issues notifications when +the hardware address of an IP address changes. diff --git a/net-mgmt/andwatch/pkg-plist b/net-mgmt/andwatch/pkg-plist new file mode 100644 index 000000000000..24c4f3a176d2 --- /dev/null +++ b/net-mgmt/andwatch/pkg-plist @@ -0,0 +1,6 @@ +bin/andwatchd +bin/andwatch-query +bin/andwatch-query-ma +bin/andwatch-update-ma +%%DATADIR%%/andwatch-notify.sh +@dir /var/db/andwatch</pre> </blockquote> <p>Hi,</p> <p>Please follow Porters Handbook (variables and ordering), <br> </p> <p><a class="moz-txt-link-freetext" href="https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github">https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github</a><br> </p> <p>See Example 16 </p> <p>sqlite3 should use the sqlite helper, <a class="moz-txt-link-freetext" href="https://docs.freebsd.org/en/books/porters-handbook/book/#using-databases-uses">https://docs.freebsd.org/en/books/porters-handbook/book/#using-databases-uses</a></p> <p>C/LDFLAGS should use the localbase helper, <a class="moz-txt-link-freetext" href="https://cgit.freebsd.org/ports/tree/Mk/Uses/localbase.mk">https://cgit.freebsd.org/ports/tree/Mk/Uses/localbase.mk</a></p> <p>Since submitter is upstream, why not ask submitter fix the project Makefile instead of doing a bunch of hacks?</p> <p>Best regards,</p> <p>Daniel<br> </p> <p><br> </p> <p></p> <p><span style="white-space: pre-wrap"> </span></p> </body> </html>home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b9106228-b3de-4c42-be4c-3cabc6257a04>
