pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/lldpd



Module Name:    pkgsrc
Committed By:   hauke
Date:           Fri Jun 19 10:05:07 UTC 2020

Modified Files:
        pkgsrc/net/lldpd: Makefile PLIST distinfo
        pkgsrc/net/lldpd/files: lldpd.sh
Added Files:
        pkgsrc/net/lldpd/files: lldpd.conf
        pkgsrc/net/lldpd/patches: patch-src_daemon_lldpd.8.in

Log Message:
PKG_SYSCONFDIR fixes.

Install a sample config file. Mention, but do not install lldpd.d
directory.

The config file is not mandatory, adjust rc.d script.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 pkgsrc/net/lldpd/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/net/lldpd/PLIST
cvs rdiff -u -r1.14 -r1.15 pkgsrc/net/lldpd/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/lldpd/files/lldpd.conf
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/lldpd/files/lldpd.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/net/lldpd/patches/patch-src_daemon_lldpd.8.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/lldpd/Makefile
diff -u pkgsrc/net/lldpd/Makefile:1.28 pkgsrc/net/lldpd/Makefile:1.29
--- pkgsrc/net/lldpd/Makefile:1.28      Thu Jun 18 20:01:17 2020
+++ pkgsrc/net/lldpd/Makefile   Fri Jun 19 10:05:07 2020
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.28 2020/06/18 20:01:17 hauke Exp $
+# $NetBSD: Makefile,v 1.29 2020/06/19 10:05:07 hauke Exp $
 
 DISTNAME=              lldpd-1.0.5
-#PKGREVISION=          1
+PKGREVISION=           2
 CATEGORIES=            net
 MASTER_SITES=          http://media.luffy.cx/files/lldpd/
 
@@ -22,18 +22,17 @@ USE_LANGUAGES=              c
 CONFIGURE_ARGS+=       --with-privsep-chroot=${LLDPD_HOME}
 # Let pkgsrc handle security features.
 CONFIGURE_ARGS+=       --disable-hardening
-
 CONFIGURE_ARGS+=       --with-embedded-libevent=no
 CONFIGURE_ARGS+=       --with-readline
-
+CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
 # run/lldpd.socket is created under this directory
 # (the default is ${PRERIX}/var, changed since 0.7.9)
 CONFIGURE_ARGS+=       --localstatedir=${VARBASE}
+
 BUILD_DEFS+=           VARBASE
 
-PKG_SYSCONFSUBDIR=     lldpd.d
 EGDIR=                 share/examples/${PKGBASE}
-CONF_FILES=            ${EGDIR}/README.conf ${PKG_SYSCONFDIR}/README.conf
+CONF_FILES=            ${EGDIR}/lldpd.conf ${PKG_SYSCONFDIR}/lldpd.conf
 
 RCD_SCRIPTS=           lldpd
 
@@ -48,17 +47,26 @@ PKG_GROUPS=         ${LLDPD_GROUP}
 PKG_USERS=             ${LLDPD_USER}:${LLDPD_GROUP}
 PKG_HOME.${LLDPD_USER}=        ${LLDPD_HOME}
 
-TEST_TARGET=           check
+SUBST_CLASSES+=                files
+SUBST_STAGE.files=     pre-configure
+SUBST_FILES.files=     ../lldpd.conf
+SUBST_VARS.files=      PKG_SYSCONFDIR
+SUBST_MESSAGE.files=   Fixing default configuration file.
 
 INSTALLATION_DIRS+=    sbin include lib ${PKGMANDIR}/man5 ${PKGMANDIR}/man8
 INSTALLATION_DIRS+=    ${EGDIR} share/doc
 INSTALLATION_DIRS+=    share/bash-completion share/zsh/site-functions
 
+TEST_TARGET=           check
+
 .include "options.mk"
 
+post-patch:
+       ${CP} ${PKGDIR}/files/lldpd.conf ${WRKDIR}
+
 post-install:
-       ${MV} ${DESTDIR}${PREFIX}/etc/lldpd.d/README.conf \
-               ${DESTDIR}${PREFIX}/${EGDIR}
+       ${INSTALL_DATA} ${WRKDIR}/lldpd.conf \
+               ${DESTDIR}${PREFIX}/${EGDIR}/lldpd.conf
 
 
 BUILDLINK_API_DEPENDS.libevent+=       libevent>=2.0.5

Index: pkgsrc/net/lldpd/PLIST
diff -u pkgsrc/net/lldpd/PLIST:1.6 pkgsrc/net/lldpd/PLIST:1.7
--- pkgsrc/net/lldpd/PLIST:1.6  Wed Aug  8 14:10:16 2018
+++ pkgsrc/net/lldpd/PLIST      Fri Jun 19 10:05:07 2020
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.6 2018/08/08 14:10:16 prlw1 Exp $
+@comment $NetBSD: PLIST,v 1.7 2020/06/19 10:05:07 hauke Exp $
 include/lldp-const.h
 include/lldpctl.h
 lib/liblldpctl.la
@@ -15,5 +15,6 @@ share/doc/lldpd/ChangeLog
 share/doc/lldpd/LICENSE
 share/doc/lldpd/NEWS
 share/doc/lldpd/README.md
-share/examples/lldpd/README.conf
+share/examples/lldpd/lldpd.conf
 share/zsh/site-functions/_lldpcli
+@pkgdir man/man5

Index: pkgsrc/net/lldpd/distinfo
diff -u pkgsrc/net/lldpd/distinfo:1.14 pkgsrc/net/lldpd/distinfo:1.15
--- pkgsrc/net/lldpd/distinfo:1.14      Thu Jun 18 19:40:32 2020
+++ pkgsrc/net/lldpd/distinfo   Fri Jun 19 10:05:07 2020
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.14 2020/06/18 19:40:32 hauke Exp $
+$NetBSD: distinfo,v 1.15 2020/06/19 10:05:07 hauke Exp $
 
 SHA1 (lldpd-1.0.5.tar.gz) = ee911186120f482f5e9bbd80023bcf5b0a628161
 RMD160 (lldpd-1.0.5.tar.gz) = 2e8a2982dbdd6e73c865d6cad3a0c821e2538369
 SHA512 (lldpd-1.0.5.tar.gz) = ce6075b6e2f847c4854c117ffc81d6e9f852e857d2bf88151ea7b3d40fbebcf980f65d4a21f17332de7f27fc696ce3ada3c063b8fa7677d7b9eee3e4634e898e
 Size (lldpd-1.0.5.tar.gz) = 1624872 bytes
+SHA1 (patch-src_daemon_lldpd.8.in) = 13f08e48123ae6a3edce43fa465823353955534e

Index: pkgsrc/net/lldpd/files/lldpd.sh
diff -u pkgsrc/net/lldpd/files/lldpd.sh:1.1 pkgsrc/net/lldpd/files/lldpd.sh:1.2
--- pkgsrc/net/lldpd/files/lldpd.sh:1.1 Thu May  9 01:39:43 2013
+++ pkgsrc/net/lldpd/files/lldpd.sh     Fri Jun 19 10:05:07 2020
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: lldpd.sh,v 1.1 2013/05/09 01:39:43 mef Exp $
+# $NetBSD: lldpd.sh,v 1.2 2020/06/19 10:05:07 hauke Exp $
 #
 
 # PROVIDE: lldpd
@@ -12,7 +12,6 @@
 name="lldpd"
 rcvar="lldpd"
 command="@PREFIX@/sbin/${name}"
-#required_files="@PKG_SYSCONFDIR@/lldpd.conf"
 
 load_rc_config $name
 run_rc_command "$1"

Added files:

Index: pkgsrc/net/lldpd/files/lldpd.conf
diff -u /dev/null pkgsrc/net/lldpd/files/lldpd.conf:1.1
--- /dev/null   Fri Jun 19 10:05:07 2020
+++ pkgsrc/net/lldpd/files/lldpd.conf   Fri Jun 19 10:05:07 2020
@@ -0,0 +1,10 @@
+# $NetBSD: lldpd.conf,v 1.1 2020/06/19 10:05:07 hauke Exp $
+#
+# lldpd(8) configuration file - see lldpcli(8) for more details.
+#
+# You can also create the @PKG_SYSCONFDIR@/lldpd.d directory, and put
+# configuration snippets (suffixed by .conf) into it. 
+# Upon start, lldpd will read each file in this directory, and
+# execute the content as if it were passed as arguments to lldpcli(8).
+
+#configure system description 'my little server'

Index: pkgsrc/net/lldpd/patches/patch-src_daemon_lldpd.8.in
diff -u /dev/null pkgsrc/net/lldpd/patches/patch-src_daemon_lldpd.8.in:1.1
--- /dev/null   Fri Jun 19 10:05:07 2020
+++ pkgsrc/net/lldpd/patches/patch-src_daemon_lldpd.8.in        Fri Jun 19 10:05:07 2020
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_daemon_lldpd.8.in,v 1.1 2020/06/19 10:05:07 hauke Exp $
+
+Have configure replace /etc/
+
+--- src/daemon/lldpd.8.in.orig 2019-09-29 11:32:19.000000000 +0000
++++ src/daemon/lldpd.8.in
+@@ -394,13 +394,13 @@ column tells that only one neighbor will
+ .It @LLDPD_CTL_SOCKET@
+ Unix-domain socket used for communication with
+ .Xr lldpctl 8 .
+-.It /etc/lldpd.conf
++.It @sysconfdir@/lldpd.conf
+ Configuration file for
+ .Nm .
+ Commands in this files are executed by
+ .Xr lldpcli 8
+ at start.
+-.It /etc/lldpd.d
++.It @sysconfdir@/lldpd.d
+ Directory containing configuration files whose commands are executed
+ by
+ .Xr lldpcli 8



Home | Main Index | Thread Index | Old Index