Re: Upgrading Net-SNMP to 5.9 on Raspberry Pi OS (i.e. ARMHF Debian 10 Buster)?
John Bize <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Since you mentioned it Tobias, In July of last year, I submitted a Debian backport request, but received no responses. https://lists.debian.org/debian-backports/2020/07/msg00004.html I realize of course that is not the same as RaspianOS, but this is the first mention I've seen since then. Thanks, John On 25-Feb-2021 2:37 AM, Tobias Frost wrote: > Hi Dachshund, > > (chiming in as /me being is involved in the Debian project. I'm not involved > in maintaining net-snmp though) > > Am Wed, Feb 24, 2021 at 01:59:03PM -0800 schrieb Dachshund Digital: >> So, Raspberry Pi OS, latest of this date, only has Net-SNMP 5.7.3 available >> in the official repository. >> The package owner of the Debian 10 (Buster) package for Pi OS, has not >> updated the official package for a very long time as well, it appears. > (One important correction: RaspianOS != Debian. Is is "just" derived > from Debian but there are many differences as well. But you can run > Debian on a Pi. I will talk about Debian below, it is likely that this > at least partly not applicable to RaspianOS, for example I dont know if > they roll a backport or testing suite.) > > I think you a refering to Debian stable, likely Debian 10 (buster), as > buster has 5.7.3. For stable releases, the Debian promise is stability: > stable releases will generally not get new upstream versions. This is > why buster is "only" at 5.7.3. > > If you look at https://tracker.debian.org/net-snmp, you'll see the > package has been updated since then. Testing is at 5.9 testing will > become the next stable, once ready; Debian is currently freezing, Debian > 11 (bullseye) is expected to be released sometime this summer) > >> I figured I should be able to compile 5.9, which I downloaded and compiled >> using the posted instructions on Source Forge. Other than the tweak for >> shared library issue, and a few compiler warnings, the make and make install >> worked fine. I did have to add the libperl-dev package as well. but I >> suspect that is only because running ./configure I accepted all the >> defaults, which includes the Perl support? >> >> But I have a few questions outstanding. >> >> 1) Is there a better way to upgrade to 5.9? Right now I have 5.7.3 and 5.9 >> both, which I don't really need. > While you can of course compile yourself and install on Debian, it is > not recommended, for the reasons described here: > https://wiki.debian.org/DontBreakDebian > > Compiling yourself and make install it will likely cause troubles down > the road, latest when you apt update to a new package version. > > Your options could include (in no particular order) > - Filing a bug in the Debian BTS asking for a "backport". > - Downloading the new Debian-package source and doing a backport yourself > (basically get the debian package sources and try to make a package out > of it;) > - Waiting for bullseye to be released. > > (Backports are described here: https://backports.debian.org/) > > - If you feel experienced enough and ready to fix stuff if broken: > (For a Pi this might be feasible, as you could backup your SD card > before trying; otherwise this'd be not recommended) > - As Debian is currently freezing, cherry-picking net-snmp from the > "testing" distribution might be an alternative. > - you might even give "testing" a spin > >> 2) Since I already had the current official package installed, >> /etc/snmp/snmpd.conf existed, is there anything new or special under 5.9 >> that is different from 5.7.3 in the snmpd.conf of key importance? Ran >> snmpconf -g basic_setup, to generate a newer conf file, seems to work fine, >> I did not setup any OID restrictions. > Before make install-ing anything, you should remove (or even purge, but > backup the config before!) the Debian packages. But after make install, > there is no guarantee that you'll be able to install the packages again > without $fixing, though unlikely if you go for /usr/local or /opt. > >> 3) I had to make a small change to the unit file for snmpd, to match the one >> referenced in the 5.9 sources. This change included changes to the path and >> the command line parameters for snmpd. Can someone please explain why the >> drastic change in the command line parameters used with 5.7.3, but not 5.9? >> >> For example... Original 5.9 unit file I had to change the path... > (systemd unit snipped) > > Yes, in your use case this change is correct. > The path is because of the local rebuild and make install. (According to > the Linux FSH, software not from the distribution should go to > /usr/local or /opt) So the default from net-snmp is sane. > > > Am Wed, Feb 24, 2021 at 08:26:25PM -0800 schrieb Bart Van Assche: >> On 2/24/21 1:59 PM, Dachshund Digital wrote: >>> Type=simple >>> #ExecStart=/usr/sbin/snmpd -f >>> ExecStart=/usr/local/sbin/snmpd -f >> The snmpd path is set at configure time. If you want snmpd to be >> installed into the /usr/sbin folder, please add --prefix=/usr to the >> configure options (the default is --prefix=/usr/local). > Please don't for a local build. This will make going back to the > official Debian packages harder. > >>> And the 5.7.3 unit file was quite different, especially the command line >>> parameters for snmpd... >> Hmm ... I'm not aware of any command-line parameter changes? >> >>> 3) I have done a few basic snmp queries, and so far so good, I think. >>> Anything I am missing here? Interesting that the snmpd.conf location >>> has changed to /usr/local/share/snmp/. >> Please add --prefix=/usr to the configure options to make snmpd read >> snmpd.conf from /usr/share/snmp. > See above. > Beside that, according to the FSH configuration is expeced in /etc… So > the Debian package ships it in /etc/snmpd/snmpd.conf. The /usr hierachy > should be considered to be read-only. (and even be shared between > hosts.) > > Am Wed, Feb 24, 2021 at 09:39:07PM -0800 schrieb Dachshund Digital: >> Bart, >> >> Thanks for the reply. Very informative. >> >> One question... Since I accepted all the defaults... and use the official >> configuration tool? Should it not default to the correct path for the conf >> file? >> >> Also, the 5.9 unit file has 'snmpd -f' as the only parameter. But the debian >> 5.7.3 package has the following... >> >> snmpd -Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I >> -smux,mteTrigger,mteTriggerConf -f -p /run/snmpd.pid >> Maybe the package owner customized? Specification appears to customize >> logging, set UID and GID values (not sure what these address from memory), >> don't fork shell (same as 5.9) and specify the PID file. > Yes, this is the Debian integration part: My guesses are that Debian > creates the user/group Debian-snmp when installing the package, so that > snmp has not to be run as root. and it is not forking, because this is > how you should do it in systemd unit files. > > FWIW, the systemd service file in the Debian package is maintained here: > https://salsa.debian.org/debian/net-snmp/-/blob/master/debian/snmpd.service > _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users