From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1VJ3tq-0004Mj-SJ for ptxdist@pengutronix.de; Mon, 09 Sep 2013 18:01:14 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1VJ3tq-0000d1-Qp for ptxdist@pengutronix.de; Mon, 09 Sep 2013 18:01:14 +0200 Date: Mon, 9 Sep 2013 18:01:14 +0200 From: Michael Olbrich Message-ID: <20130909160114.GD26086@pengutronix.de> References: <1378388934-7790-1-git-send-email-post@lespocky.de> <20130909094951.GF31967@pengutronix.de> <3406c8c7a7f86889725df181f01f999a@idefix.lespocky.dyndns.org> <20130909144551.GA26086@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [ptxdist] [PATCH] lldpd: add package Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Mon, Sep 09, 2013 at 05:20:09PM +0200, Alexander Dahl wrote: > Hei Michael, > > Am 2013-09-09 16:45, schrieb Michael Olbrich: > > please change the subject to "lldpd: ..." > > I'll do it in the next patch, I noticed this right after sending it. :-/ > > >> Yes. This is tricky and didn't have a good idea how to check it. There's > >> the parameter NET_SNMP_MIB_MODULES which is used in this parameter in > >> the prepare stage: > >> > >> --with-mib-modules=$(PTXCONF_NET_SNMP_MIB_MODULES) > >> > >> You have to add/include "agentx" in the ptxdist menuconfig entry > >> NET_SNMP_MIB_MODULES. You can add other and there's no simple switch for > >> each of them. This is the way to enable several things in net-snmp and > >> lldpd seems to check it the right way, but I had no idea how to > >> "translate" this mechanism to the ptxdist layer above. > > > > Make an option for "agentx", so you can select it. > > This would be an option in net-snmp package and this is the difficulty. > At the moment there's PTXCONF_NET_SNMP_MIB_MODULES which is a space > separated list. From the `./configure --help` of net-snmp: > > --with-mib-modules="item1 ..." Compile with additional mib modules > (Space separated list). > --with-out-mib-modules="list" Compile without these mib modules. > > Possible entries make a list of two screen pages, I guess around 30 > entries (and "agentx" is one of them). If I choose one of them to be a > separate option in ptxdist net-snmp conf (maybe as submenu) while > keeping the list in PTXCONF_NET_SNMP_MIB_MODULES, we would have to test > the new option in net-snmp.make and add it to the list if selected. But > what if someone puts the same option in the list? > > Or would it be better to put variables for almost 30 options to the > ptxdist config? > > However this is no change in lldpd package but in net-snmp, which would > have to be made first. Yes, this should be a change in net-snmp. Take a look at how the modules are handled in lighttpd. It's the same idea. Use options for modules with extra dependencies (not relevant here) or for modules that are needed by other packages and keep the string variable for all the rest. NET_SNMP_MIB_MODULES-y := $(PTXCONF_NET_SNMP_MIB_MODULES) NET_SNMP_MIB_MODULES-$(PTXCONF_NET_SNMP_MIB_MODULE_XAGENT) += agentx [...] --with-mib-modules=$(NET_SNMP_MIB_MODULES-y) [...] > >> This is the default lldpd uses. See the output of ./configure from > >> lldpd: > >> > >> --with-privsep-user Which user to use for privilege separation > >> [default=_lldpd] > >> --with-privsep-group Which group to use for privilege separation > >> [default=_lldpd] > >> --with-privsep-chroot Which directory to use to chroot lldpd > >> [default=/var/run/lldpd] > >> > >> Actually I set this user to nobody and the group to daemon. As far as I > >> understood lldpd this is hardcoded and I wanted to have it configurable > >> so I added it to the ptxdist menu and copied the defaults from lldpd. > >> Maybe the do not make sense for most of the users. Do you have a better > >> suggestion for this user and group? > > > > use "nobody" by default. Otherwise the defaults break targetinstall > > Okay, and for the group? "nogroup" Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de