Re: NSH 1.2.1 service release / maintenance release
Thanks Stefan for your help (all your help ) and the committing of the patch :) Much obliged, Tom Smyth On Wed, 19 Jun 2024 at 16:15, Stefan Sperling wrote: > > On Fri, Jun 14, 2024 at 06:32:39PM +0100, Tom Smyth wrote: > > Folks > > NSH1.2.1 has been released with a number of important fixes can this > > be pushed into > > stable and current > > Done, thank you! -- Kindest regards, Tom Smyth.
Re: NSH 1.2.1 service release / maintenance release
Hi folks, sorry I probably didnt specify but I tested reasonably extensively on amd64 platform and it seems ok... no other platform tested, Thanks Tom Smyth On Fri, 14 Jun 2024 at 18:32, Tom Smyth wrote: > > Folks > NSH1.2.1 has been released with a number of important fixes can this > be pushed into > stable and current > > > Release notes are as follows, > fix motd permissions in integration scripts > disable interactive mode if -c or -i options are used > fix a divide-by zero crash when reading commands from stdin > start less(1) pager in restricted mode for the manual command > include stdio.h explicitly in utf8.c to fix build on -current > build process improved substantially with the 'make obj' build step is > now entirely optional > improve nsh.8 accuracy and general syntax > fix file locking error when loading of config examples is stopped with Ctrl-C > release process improved and documented by stsp > > > My sincere thanks to stsp@ stuarth@ Chris Cappuccio and KurtM@ who > have helped me with this... > > Feedback welcome, and sorry to the ports builders and users for the > delay in releasing this > mae culpa > > Thanks folks > > > Kindest regards, > Tom Smyth. -- Kindest regards, Tom Smyth.
NSH 1.2.1 service release / maintenance release
Folks NSH1.2.1 has been released with a number of important fixes can this be pushed into stable and current Release notes are as follows, fix motd permissions in integration scripts disable interactive mode if -c or -i options are used fix a divide-by zero crash when reading commands from stdin start less(1) pager in restricted mode for the manual command include stdio.h explicitly in utf8.c to fix build on -current build process improved substantially with the 'make obj' build step is now entirely optional improve nsh.8 accuracy and general syntax fix file locking error when loading of config examples is stopped with Ctrl-C release process improved and documented by stsp My sincere thanks to stsp@ stuarth@ Chris Cappuccio and KurtM@ who have helped me with this... Feedback welcome, and sorry to the ports builders and users for the delay in releasing this mae culpa Thanks folks Kindest regards, Tom Smyth. Index: Makefile === RCS file: /cvs/ports/shells/nsh/Makefile,v diff -u -p -r1.50 Makefile --- Makefile 20 May 2024 20:36:17 - 1.50 +++ Makefile 14 Jun 2024 16:02:37 - @@ -2,7 +2,7 @@ COMMENT = network switch style shell CATEGORIES = shells net HOMEPAGE = https://www.nmedia.net/nsh/ -V = 1.2 +V = 1.2.1 DISTNAME = nsh-${V} SITES = https://github.com/yellowman/nsh/releases/download/v${V}/ REVISION = 0 Index: distinfo === RCS file: /cvs/ports/shells/nsh/distinfo,v diff -u -p -r1.18 distinfo --- distinfo 29 Sep 2023 12:17:08 - 1.18 +++ distinfo 14 Jun 2024 16:02:37 - @@ -1,2 +1,2 @@ -SHA256 (nsh-1.2.tar.gz) = XFfUOMhVUCyn+5PhCoXafNIhXxi/GCPXYw2AskzoR/4= -SIZE (nsh-1.2.tar.gz) = 218922 +SHA256 (nsh-1.2.1.tar.gz) = ViNefMTQyIxZnSDUcQsrZ3OooFVu70sX6/9BtrJgGjU= +SIZE (nsh-1.2.1.tar.gz) = 226937
Re: nsh: fix build with upcoming stdio changes
Confirmed that that is fixed cheers Stefan On Sat, 25 May 2024 at 21:46, Stefan Sperling wrote: > On Sat, May 25, 2024 at 06:57:51PM +0100, Tom Smyth wrote: > > Hi Stefan, > > > > make obj is still needed > > > > Stop in bgpnsh > > *** Error 2 in /home/tom/nsh1.4.1/nsh (:48 'all': @for > entry > > in bgpnsh nshdoas; do set -e; if test -d /home/tom/nsh1.4.1/nsh...) > > > > make obj first > > then > > make > > gets around it ... > > Indeed, I overlooked obj dirs in subdirectories. > Thanks, this has now been fixed in the nsh github repo, as of > commit 957f3c72fb1d7839c038dd8126a59e390661ae15 > -- Kindest regards, Tom Smyth.
Re: nsh: fix build with upcoming stdio changes
Hi Stefan, make obj is still needed Stop in bgpnsh *** Error 2 in /home/tom/nsh1.4.1/nsh (:48 'all': @for entry in bgpnsh nshdoas; do set -e; if test -d /home/tom/nsh1.4.1/nsh...) make obj first then make gets around it ... On Sat, 25 May 2024 at 17:37, Tom Smyth wrote: > Thanks Theo for the Patch, much appreciated, > > @Stefan Sperling > make obj still needed for nshdoas build ill take a look and see if I can > fixt that > > > On Mon, 20 May 2024 at 21:31, Stefan Sperling wrote: > >> On Mon, May 20, 2024 at 08:33:17PM +0200, Theo Buehler wrote: >> > extern.h depends on stdio.h because of FILENAME_MAX. wchar.h will stop >> > pulling in stdio.h, hence break the build in utf8.c which will no longer >> > pull in stdio.h. The diff below fixes the build. >> > >> > Longer term it would be preferable to make extern.h self-standing so it >> > doesn't depend on other headers being pulled in. >> >> ok stsp@, thank you! >> >> I have already committed your diff to the nsh upstream repository. >> >> > Also, these obj hacks in the port are really annoying (this breaks >> > generating patches as it is owned by _pbuild:_pbuild and has perms 770). >> >> I've also committed a tweak such that nsh will compile even if 'make obj' >> is not used. See commit b0b69440cc3f1f8127d3b6f341eb0e61116f7918 ; feel >> free to pull this into the port if it is urgent. Otherwise the tweak >> will be pulled in with the next upstream release. >> > > > -- > Kindest regards, > Tom Smyth. > -- Kindest regards, Tom Smyth.
Re: nsh: fix build with upcoming stdio changes
Thanks Theo for the Patch, much appreciated, @Stefan Sperling make obj still needed for nshdoas build ill take a look and see if I can fixt that On Mon, 20 May 2024 at 21:31, Stefan Sperling wrote: > On Mon, May 20, 2024 at 08:33:17PM +0200, Theo Buehler wrote: > > extern.h depends on stdio.h because of FILENAME_MAX. wchar.h will stop > > pulling in stdio.h, hence break the build in utf8.c which will no longer > > pull in stdio.h. The diff below fixes the build. > > > > Longer term it would be preferable to make extern.h self-standing so it > > doesn't depend on other headers being pulled in. > > ok stsp@, thank you! > > I have already committed your diff to the nsh upstream repository. > > > Also, these obj hacks in the port are really annoying (this breaks > > generating patches as it is owned by _pbuild:_pbuild and has perms 770). > > I've also committed a tweak such that nsh will compile even if 'make obj' > is not used. See commit b0b69440cc3f1f8127d3b6f341eb0e61116f7918 ; feel > free to pull this into the port if it is urgent. Otherwise the tweak > will be pulled in with the next upstream release. > -- Kindest regards, Tom Smyth.
Re: sparc64 bulk build report
Folks Sorry for not picking this up sooner I will fix nsh by the end of January ... sorry for the delay in getting back to you on this Tom Smyth On Wed, 20 Dec 2023 at 09:30, wrote: > Bulk build on sparc64-0a.ports.openbsd.org > > Started : Sun Dec 17 01:48:55 MST 2023 > Finished: Wed Dec 20 02:23:35 MST 2023 > Duration: 3 Days 0 hours 35 minutes > > Built using OpenBSD 7.4-current (GENERIC.MP) #1963: Fri Dec 15 16:52:31 > MST 2023 > > Built 8470 packages > > Number of packages built each day: > Dec 17: 7222 > Dec 18: 1235 > Dec 19: 4 > Dec 20: 9 > > > > Critical path missing pkgs: > http://build-failures.rhaalovely.net/sparc64/2023-12-17/summary.log > > Build failures: 41 > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/audio/libsmackerdec.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/audio/ncmpc.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/audio/xmms2.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/databases/ruby-amalgalite,ruby31.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/devel/arm-none-eabi/gdb.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/devel/avr/gcc.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/devel/jdk/1.8.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/devel/mtxclient.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/devel/py-debugpy,python3.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/devel/py-thrift,python3.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/devel/vim-command-t.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/devel/xsd.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/devel/yder.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/emulators/libretro-pcsx-rearmed.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/games/cataclysm-dda,no_x11.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/games/choria.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/games/emptyclip.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/games/ezquake.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/games/fheroes2.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/games/gnukem.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/games/scid.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/games/widelands.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/graphics/spirv-tools.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/graphics/tesseract/tesseract.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/lang/rust.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/mail/rspamd,hyperscan.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/math/flintlib.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/math/gunits.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/math/openfst.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/net/iperf3.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/shells/nsh.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/sysutils/borgmatic.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/sysutils/flashrom.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/sysutils/libvirt.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/sysutils/pftop.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/sysutils/u-boot-asahi.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/textproc/libmarisa,,-main.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/textproc/rapidjson.log > > http://build-failures.rhaalovely.net/sparc64/2023-12-17/textproc/redland-bindings,-main.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/wayland/wlroots.log > http://build-failures.rhaalovely.net/sparc64/2023-12-17/x11/polybar.log > > -- Kindest regards, Tom Smyth.
Re: update: nsh 1.2
Ok, Tom ... builds fine on 7.3 & 7.4 Current ... Im updating the changelog and will circulate on list... once completed, but it is an exciting release (im well chuffed with the Work that Chris, Stefan, (and somtimes me ) put in ) Thanks, Tom Smyth On Fri, 29 Sept 2023 at 12:22, Stefan Sperling wrote: > > Update NSH to version 1.2. > > This release ships about 6 months worth of fixes and enhancements. > I hope there will be smaller releases on a more regular schedule in > the future, timed less close to ports-lock. > > The main benefit of this upgrade is that nsh will now work fine as > a login shell, making it worth being listed in /etc/shells. > The 'enable' command will now re-exec to the root user, with authentication > via /etc/doas.conf or the root password. There is no more need for wrapper > scripts involving doas or sudo starting nsh as root. > Thanks to claudio@ for suggesting this design change. > > New features: > > the "enable" command switches to the root user via doas.conf or root password > add bgpnsh(8), a minimal version of nsh for use as a BGP looking-glass shell > add umb(4) support > allow nsh commands to be piped to standard input from another process > allow empty configuration files to be filled with data from /etc/examples > add "show pf" commands to display pf firewall status > add "show crontab", "crontab edit", "crontab install" commands > add "show environment", "setenv", "unsetenv", and 'saveenv' commands > > ok? > > --- > diff ee7c68ff49b85bd3287aafeb87a37caf249dc14d > 1a6361e5c0dfbb57d2717a0b887bb9f794c0d721 > commit - ee7c68ff49b85bd3287aafeb87a37caf249dc14d > commit + 1a6361e5c0dfbb57d2717a0b887bb9f794c0d721 > blob - 0aaceefc96346a2389b06c8bfd669198766ad537 > blob + a04db8534b2234268a982f7b2a262d54834a9188 > --- shells/nsh/Makefile > +++ shells/nsh/Makefile > @@ -1,42 +1,47 @@ > COMMENT = network switch style shell > > - > -GH_ACCOUNT = yellowman > -GH_PROJECT = nsh > -GH_TAGNAME = v1.1 > CATEGORIES = shells net > HOMEPAGE = https://www.nmedia.net/nsh/ > +V =1.2 > +DISTNAME = nsh-${V} > +SITES = > https://github.com/yellowman/nsh/releases/download/v${V}/ > > MAINTAINER = Tom Smyth > > # BSD > PERMIT_PACKAGE = Yes > > +# uses pledge() > WANTLIB += c curses edit sqlite3 > > FLAVORS = static > FLAVOR ?= > > -MAKE_FLAGS = CC="${CC}" \ > - CPPFLAGS="-I${LOCALBASE}/include" \ > +CPPFLAGS = -I${LOCALBASE}/include \ > + -DNSH_REXEC_PATH=${LOCALBASE}/bin/nsh > + > +MAKE_ENV = CC="${CC}" \ > + CPPFLAGS="${CPPFLAGS}" \ > LDFLAGS="-L${LOCALBASE}/lib" > LIB_DEPENDS = databases/sqlite3 > > +FAKE_FLAGS = PREFIX=${TRUEPREFIX} > + > .if ${FLAVOR:Mstatic} > -MAKE_FLAGS += LDADD="-ledit -ltermcap -lsqlite3 -lm -lpthread -static" > +MAKE_FLAGS += LDFLAGS="-L${LOCALBASE}/lib -ledit -ltermcap -lsqlite3 -lm > -lpthread -static" > .endif > > NO_TEST= Yes > > -do-install: > - ${INSTALL_PROGRAM} ${WRKDIST}/nsh ${PREFIX}/bin > - ${INSTALL_MAN} ${WRKDIST}/nsh.8 ${PREFIX}/man/man8/ > +post-configure: > + ${MAKE} -C ${WRKDIST} obj > + > +post-install: > .for i in save-ro.sh save-rw.sh > ${INSTALL_SCRIPT} ${WRKDIST}/${i} ${PREFIX}/bin > .endfor > ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nsh > - sed -i s,/usr/local,${LOCALBASE},g ${WRKDIST}/MANUAL > -.for i in MANUAL README TODO COPYRIGHT > +.for i in README.md COPYRIGHT > ${INSTALL_DATA} ${WRKDIST}/${i} ${PREFIX}/share/doc/nsh/ > .endfor > > blob - 2492a4efdcc68c8b34cb856649bd213dd17527ae > blob + 66553f4bfd591f6ca681c2ffd6208f44ff935571 > --- shells/nsh/distinfo > +++ shells/nsh/distinfo > @@ -1,2 +1,2 @@ > -SHA256 (nsh-1.1.tar.gz) = v0sHzQ2zEoAzbsaZVeVuhp2R0R37cZvNy/RvJ0Df2Pc= > -SIZE (nsh-1.1.tar.gz) = 185700 > +SHA256 (nsh-1.2.tar.gz) = XFfUOMhVUCyn+5PhCoXafNIhXxi/GCPXYw2AskzoR/4= > +SIZE (nsh-1.2.tar.gz) = 218922 > blob - 247187103b8ceb212dd73ae979309741337c333e > blob + e0707c1e344d5c8f62297f52c1e9d651fd5ec15e > --- shells/nsh/pkg/PLIST > +++ shells/nsh/pkg/PLIST > @@ -1,3 +1,4 @@ > +@shell bin/bgpnsh > @shell bin/nsh > bin/save-ro.sh > bin/save-rw.sh > @@ -8,9 +9,11 @@ bin/save-rw.sh > @mode > @owner > @group > +@mode 04555 > +@bin libexec/nshdoas > +@mode > +@man man/man8/bgpnsh.8 > @man man/man8/nsh.8 > share/doc/nsh/ > share/doc/nsh/COPYRIGHT > -share/doc/nsh/MANUAL > -share/doc/nsh/README > -share/doc/nsh/TODO > +share/doc/nsh/README.md > -- Kindest regards, Tom Smyth.
Re: nsh1.1 update diff attached
Hi Stuart, just ot let you know that iui enhancement (no space after tab completion ssue) you pointed out has been resolved by Stsp in the latest commit in nsh... thanks again for your feedback and suggestion... and I have to say the double tab completion now feels much nicer, thanks again for the feeback much obliged Tom Smyth On Wed, 15 Mar 2023 at 23:01, Tom Smyth wrote: > > Thanks Stuart > Ihave created an issue for this .. It makes sense... it will be > implemented shortly ... > > https://github.com/yellowman/nsh/issues/64 > > On Wed, 15 Mar 2023 at 22:54, Stuart Henderson wrote: > > > > ps, most of the usual cisco-like CLIs will automatically insert a space > > after tab-completion finds a unique command, so e.g. you can do 'shrun" > > without typing an extra space; might be a useful addition for people > > coming from other systems. > > > > > -- > Kindest regards, > Tom Smyth. -- Kindest regards, Tom Smyth.
Re: nsh1.1 update diff attached
Thanks Stuart Ihave created an issue for this .. It makes sense... it will be implemented shortly ... https://github.com/yellowman/nsh/issues/64 On Wed, 15 Mar 2023 at 22:54, Stuart Henderson wrote: > > ps, most of the usual cisco-like CLIs will automatically insert a space > after tab-completion finds a unique command, so e.g. you can do 'shrun" > without typing an extra space; might be a useful addition for people > coming from other systems. > -- Kindest regards, Tom Smyth.
Re: nsh1.1 update diff attached
Folks, Please find attached diff which updates the nsh port to the latest release of nsh 1.1 on github I would like to give a big thanks to Chris Cappuccio, Stefan Sperling, my colleagues, Justin Donoghue, Alan McGrath & Scott Mc Donnell from my Alma Mater DCU who worked on this as part of their university work placement. a big shout out to Ingo@ who patiently guided me on mandoc and manual page writing. and last but not least Stuart and Kurt Mosiejczuk for all their time, expertise and work and patience to get me started on ports. It was a pleasure to help document some of the output of the above people's effort and indeed the wider OpenBSD Community for their contributions to the OpenBSD network stack over the years... the attached CVS diff updates the port with the upstream release v1.1 Changes since last time Chris and Stefan have made a number of improvements to nsh since the last update 1) dhcpleased support 2) slaacd support 3) resolvd support 4) ndp control support 5) improved arp control on interfaces 6) improved bridge/ veb feature support such as protected ports etc... 7) improved diagnostics commands show arp show ndp show bridge show interface status 8) improved integration scripts 9) improved reduced default configuration on new sysctls (to omit default settings on OpenBSD sysctls) 10) improved arp control on interfaces (arp on, static arp, ) 11) improved usability and alignment with other industry CLIs with the keyword "exit" used to exit interface configuration modes 12) nsh.8 manual page updated to include the new features, improved cross referencing feedback ,comments, ideas, testers contributors welcome... Thanks again, Tom Smyth On Mon, 13 Mar 2023 at 12:34, Stuart Henderson wrote: > > On 2023/03/13 12:12, Tom Smyth wrote: > > Hi Stuart > > ill have a look at this... and see what can be done on GH > > This or similar to tag the current state of the tree as v1.1 > > git tag -a v1.1 -m "Release version v1.1" > git push origin v1.1 > > Or if e.g. there was another commit upstream and you want to tag the > older commit as v1.1: > > git tag -a v1.1 5d9dbeb4e -m "Release version v1.1" > (and push) > > Then for the port you can remove DISTNAME and set GH_TAGNAME = v1.1 > instead. > > > with Stefan and Chris > > > > Thanks > > > > On Mon 13 Mar 2023, 11:09 Stuart Henderson, wrote: > > > > > On 2023/03/13 00:44, Tom Smyth wrote: > > > > Folks, > > > > please find attached, update for nsh to nsh1.1-20230312 > > > > I would like to give a big thanks to Chris Cappuccio, Stefan Sperling, > > > > Justin Donoghue and Kurt Mosiejczuk for all their time, expertise and > > > > work to help. > > > > > > Updating to newer code makes sense. Would it be worth tagging it > > > upstream so we don't need to use GH_COMMIT and the date in DISTNAME? > > > > > > > the attached CVS diff updates the port with the upstream release, > > > > Changes since last time > > > > Chris and Stefan have made a number of improvements to nsh since the > > > last update > > > > > > > > 1) dhcpleased support > > > > 2) slaacd support > > > > 3) resolvd support > > > > 4) ndp control support > > > > 5) improved arp control on interfaces > > > > 6) improved bridge/ veb feature support > > > > 7) improved diagnostics commands > > > > show arp > > > > show ndp > > > > show bridge > > > > show interface status > > > > 8) improved integration scripts > > > > 9) improved reduced default configuration on new sysctls (to omit > > > > default settings on OpenBSD sysctls) > > > > 10) improved arp control on interfaces (arp on, static arp, ) > > > > 11) improved usability and alignment with other industry CLIs with the > > > > keyword "exit" used to exit interface configuration modes > > > > > > > > > > > > 12) nsh.8 manual page updated to include the new features, improved > > > > cross referencing > > > > etc. > > > > > > > > further updates to nsh.8 possible but I wanted make sure at least > > > > this diff makes the cut before ports freeze ... > > > > > > > > a big shout out to Justin who helped identify where we could improve > > > > the show commands / diagnostic commands based on his use of other > > > > networking platforms. > > > > > > > > -- > > > > Kindest regards, > > > > Tom Smyth. > > > > > >
Re: nsh1.1 update diff attached
Hi Stuart ill have a look at this... and see what can be done on GH with Stefan and Chris Thanks On Mon 13 Mar 2023, 11:09 Stuart Henderson, wrote: > On 2023/03/13 00:44, Tom Smyth wrote: > > Folks, > > please find attached, update for nsh to nsh1.1-20230312 > > I would like to give a big thanks to Chris Cappuccio, Stefan Sperling, > > Justin Donoghue and Kurt Mosiejczuk for all their time, expertise and > > work to help. > > Updating to newer code makes sense. Would it be worth tagging it > upstream so we don't need to use GH_COMMIT and the date in DISTNAME? > > > the attached CVS diff updates the port with the upstream release, > > Changes since last time > > Chris and Stefan have made a number of improvements to nsh since the > last update > > > > 1) dhcpleased support > > 2) slaacd support > > 3) resolvd support > > 4) ndp control support > > 5) improved arp control on interfaces > > 6) improved bridge/ veb feature support > > 7) improved diagnostics commands > > show arp > > show ndp > > show bridge > > show interface status > > 8) improved integration scripts > > 9) improved reduced default configuration on new sysctls (to omit > > default settings on OpenBSD sysctls) > > 10) improved arp control on interfaces (arp on, static arp, ) > > 11) improved usability and alignment with other industry CLIs with the > > keyword "exit" used to exit interface configuration modes > > > > > > 12) nsh.8 manual page updated to include the new features, improved > > cross referencing > > etc. > > > > further updates to nsh.8 possible but I wanted make sure at least > > this diff makes the cut before ports freeze ... > > > > a big shout out to Justin who helped identify where we could improve > > the show commands / diagnostic commands based on his use of other > > networking platforms. > > > > -- > > Kindest regards, > > Tom Smyth. > > >
nsh1.1 update diff attached
Folks, please find attached, update for nsh to nsh1.1-20230312 I would like to give a big thanks to Chris Cappuccio, Stefan Sperling, Justin Donoghue and Kurt Mosiejczuk for all their time, expertise and work to help. the attached CVS diff updates the port with the upstream release, Changes since last time Chris and Stefan have made a number of improvements to nsh since the last update 1) dhcpleased support 2) slaacd support 3) resolvd support 4) ndp control support 5) improved arp control on interfaces 6) improved bridge/ veb feature support 7) improved diagnostics commands show arp show ndp show bridge show interface status 8) improved integration scripts 9) improved reduced default configuration on new sysctls (to omit default settings on OpenBSD sysctls) 10) improved arp control on interfaces (arp on, static arp, ) 11) improved usability and alignment with other industry CLIs with the keyword "exit" used to exit interface configuration modes 12) nsh.8 manual page updated to include the new features, improved cross referencing etc. further updates to nsh.8 possible but I wanted make sure at least this diff makes the cut before ports freeze ... a big shout out to Justin who helped identify where we could improve the show commands / diagnostic commands based on his use of other networking platforms. -- Kindest regards, Tom Smyth. nsh-1.1.20230312 Description: Binary data
Re: Folks are there any tips to improve page load times on smokeping running on OpenBSD
I think I understand better. Now .. but is there still a security benefit from having the different services in their own jails ? (even if the jail cells come with their own metaphorical swimming pool and armoury ) or is it that the jails don’t offer enough compared with the additional workload of managing multiple copies of libraries/binaries in the system... ? On Thu, 9 Mar 2023 at 12:29, Stuart Henderson wrote: > > On 2023/03/08 10:10, Glen Gunsalus wrote: > > > > On 3/7/23 15:33, Stuart Henderson wrote: > > > On 2023-03-07, Glen Gunsalus wrote: > > > > To get this running cp'd perl (/usr/bin/perl) and relevant perl libs > > > > (/usr/lib/[libs.so|libm.so|libperl.so] /usr/libexec/ld.so) to > > > > /var/www/usr/[bin|lib|libexec] > > > > > > You shouldn't need that bit (and it is safer not to) - smokeping_fcgi > > > does not chroot. > > > > > > > > Hmm, I did this on the basis of a post by you (5/11/20) in response to Tom > > (5/10/20) which I interpreted as needing several files moved into www > > "jail." > > No that was me saying "this software is not really meant to work with > chroot and if you're copying enough into the chroot that it works, > you're providing a lot of extra tools to someone who is able to execute > code within the jail" > > > quote-- > > bgplg is designed to run in a jail, it is a small C program and even > > then it needs specially compiled versions of the external dependencies > > (ping, bgpctl etc). > > > > Smokeping isn't - if you want to run the graph generating part of > > smokeping (i.e. the cgi/fcgi script) inside a chroot jail, a whole lot > > more is needed - a copy of perl and various modules, rrdtool, > > rrdtool's library dependencies, fonts, and I think there were config > > files for some of the libraries. I did this in the past but it's a > > real mess and easy to break at update time, and the amount of things > > copied in means that the chroot ends up more as "luxury camping" than > > "jail" > > end quote--- > > > > I had been running smokeping and mrtg with apache for a number of years, > > but when OpenBSD abandoned apache I looked at nginx for transition then > > httpd came along and looked both more attractive and likely to be more long > > lived under OpenBSD. > > > > It was Tom's post that got me started down the httpd path. I have been > > running with httpd since that time. > > I can't remember the details, but think I initially tried w/o the cp'd > > files, but was not successful so began incrementally moving goodies into > > /var/www until it worked. > > I will try rm'ing or mv'ing those in /var/www and see how it goes. > > > > Thanks for your help. > > > > Regards, Glen > -- Kindest regards, Tom Smyth.
Re: Folks are there any tips to improve page load times on smokeping running on OpenBSD
Morning Glen, Stuart all, yep ... Stuarts comments re chroot glamping vs chroot jails made me gigle all right... the way I think I have it working is that smokeping and rrdcached are running outside the jail with symbolic links to sockets inside the httpd chroot jail /var/www/... and httpd picks up those sockets and plays with them inside the jail... relevant output from my ps -aux list USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND _smokepi 98525 9.7 1.3 98040 111580 ?? S 6:31AM1:03.00 /usr/bin/perl /usr/local/bin/smokeping_cgi /etc/smokeping/config _rrdcach 67082 0.0 0.1 9272 7952 ?? S 6:31AM0:03.21 /usr/local/bin/rrdcached -b /var/db/smokeping -B -m 770 -l unix:/var/www/run/rrd _smokepi 25394 0.0 0.1 43244 10536 ?? I 6:31AM0:00.03 /usr/bin/perl /usr/local/bin/smokeping _smokepi 57899 0.0 0.3 43752 21276 ?? S 6:31AM0:01.31 perl: /usr/local/bin/smokeping [FPing] (perl) _smokepi 74710 0.4 0.3 43244 21480 ?? S 6:31AM0:03.49 perl: /usr/local/bin/smokeping [DNS] (perl) _smokepi 76253 0.2 0.0 2892 2916 ?? Sp 6:47AM0:00.15 /usr/local/sbin/fping -C 61 -q -B1 -r1 -b64 -t125 -i10 -p1 10.20.127.2 10.139.25... when I get around to it ... I would like rrdcached and smokeping in another / separate glamping site / luxury chroot jail to the cgi binary... Comments thoughts welcome ... On Wed, 8 Mar 2023 at 19:26, Glen Gunsalus wrote: > > > On 3/7/23 15:33, Stuart Henderson wrote: > > On 2023-03-07, Glen Gunsalus wrote: > >> To get this running cp'd perl (/usr/bin/perl) and relevant perl libs > >> (/usr/lib/[libs.so|libm.so|libperl.so] /usr/libexec/ld.so) to > >> /var/www/usr/[bin|lib|libexec] > > > > You shouldn't need that bit (and it is safer not to) - smokeping_fcgi > > does not chroot. > > > > > Hmm, I did this on the basis of a post by you (5/11/20) in response to Tom > (5/10/20) which I interpreted as needing several files moved into www "jail." > > quote-- > bgplg is designed to run in a jail, it is a small C program and even > then it needs specially compiled versions of the external dependencies > (ping, bgpctl etc). > > Smokeping isn't - if you want to run the graph generating part of > smokeping (i.e. the cgi/fcgi script) inside a chroot jail, a whole lot > more is needed - a copy of perl and various modules, rrdtool, > rrdtool's library dependencies, fonts, and I think there were config > files for some of the libraries. I did this in the past but it's a > real mess and easy to break at update time, and the amount of things > copied in means that the chroot ends up more as "luxury camping" than > "jail" > end quote--- > > I had been running smokeping and mrtg with apache for a number of years, but > when OpenBSD abandoned apache I looked at nginx for transition then httpd > came along and looked both more attractive and likely to be more long lived > under OpenBSD. > > It was Tom's post that got me started down the httpd path. I have been > running with httpd since that time. > I can't remember the details, but think I initially tried w/o the cp'd files, > but was not successful so began incrementally moving goodies into /var/www > until it worked. > I will try rm'ing or mv'ing those in /var/www and see how it goes. > > Thanks for your help. > > Regards, Glen > -- Kindest regards, Tom Smyth.
Re: Folks are there any tips to improve page load times on smokeping running on OpenBSD
Folks, Just to say keeping rrdcached for smokeping, and just using the smokeping.sock server "default" { listen on * port 80 location "/smokeping/smokeping.fcgi*" { fastcgi { socket "/run/smokeping.sock" } } } is way faster ... for the user interface... ... Ill let you know if there are any negative impact on the graphs ... Thanks Tom Smyth On Wed, 8 Mar 2023 at 15:21, Tom Smyth wrote: > > Hello > I found that RRDCached helps with the gaps in the graphs... (write > i/o burst smoothing) (which is the main reason I went with rrdcached > > but it did not help so much on the user interface / web rendering front ... > (perhaps I could try (if it is even possible) to try the following > > write rrds using smokeping --> rrdcached-->rrdfile > and separately read > rrdfile --> smokeping_fcgi --> httpd > or does rrdcahced need to exclusively manage I/O ( read and write) > with the rrd files. ? > Ill investgate this a bit more ... (comments and ideas welcome .. > > On Wed, 8 Mar 2023 at 14:16, Stuart Henderson wrote: > > > > On 2023/03/07 14:38, Tom Smyth wrote: > > > the config below seems to get rrdcached working with httpd in OpenBSD. > > > ... > > > > Thanks, I've added this to the pkg-readme. > > > > > the loading of the smokeping detailed graphs still takes a while ... but > > > I > > > will do further dianostics... > > > > Do check to make sure that using rrdcached does actually improve things > > for your setup, you might find that it doesn't. > > > > > -- > Kindest regards, > Tom Smyth. -- Kindest regards, Tom Smyth.
Re: Folks are there any tips to improve page load times on smokeping running on OpenBSD
Hello I found that RRDCached helps with the gaps in the graphs... (write i/o burst smoothing) (which is the main reason I went with rrdcached but it did not help so much on the user interface / web rendering front ... (perhaps I could try (if it is even possible) to try the following write rrds using smokeping --> rrdcached-->rrdfile and separately read rrdfile --> smokeping_fcgi --> httpd or does rrdcahced need to exclusively manage I/O ( read and write) with the rrd files. ? Ill investgate this a bit more ... (comments and ideas welcome .. On Wed, 8 Mar 2023 at 14:16, Stuart Henderson wrote: > > On 2023/03/07 14:38, Tom Smyth wrote: > > the config below seems to get rrdcached working with httpd in OpenBSD. ... > > Thanks, I've added this to the pkg-readme. > > > the loading of the smokeping detailed graphs still takes a while ... but I > > will do further dianostics... > > Do check to make sure that using rrdcached does actually improve things > for your setup, you might find that it doesn't. > -- Kindest regards, Tom Smyth.
Re: Folks are there any tips to improve page load times on smokeping running on OpenBSD
ce"7d "Last 14 Days Performance"14d "Last 28 Days Performance"28d "Last 100 Days Performance" 100d #+ hierarchies #++ owner #title = Host Owner #++ location #title = Location *** Probes *** #+basefork #forks = 8 #offset = 50% #step = 90 #timeout = 1 + FPing blazemode = true binary = /usr/local/sbin/fping packetsize = 64 hostinterval = 0.001 timeout = 0.125 offset = random + DNS binary = /usr/bin/dig # mandatory forks = 5 offset = 50% step = 30 timeout = 15 # The following variables can be overridden in each target section lookup = bbc.co.uk pings = 30 server = [redacted] + TCPPing binary = /usr/local/sbin/hping forks = 5 offset = 50% step = 300 timeout =10 #*** Slaves *** #secrets=/etc/smokeping/smokeping_secrets #+boomer #display_name=boomer #color=ff #+slave2 #display_name=another #color=00ff00 *** Targets *** probe = FPing menu = Top title = Wireless Connect Network Latency Grapher remark = SmokePing of Wireless Connect Ltd. \ This Tool Shows the latency of the \ Wireless Connectnetwork. alerts = Sustained_5%_loss,Sudden_10%_Loss,Sporadic_Loss,Latency_Over_50ms,Offline_at_startup #########config-sniped# smoke1# rcctl ls started cron dhcpleased httpd ntpd pflogd resolvd rrdcached smokeping smokeping_fcgi smtpd sshd syslogd On Tue, 7 Mar 2023 at 14:38, Tom Smyth wrote: > > Hi Stuart,... > Im running 2 cores as Im a miser with my VMS in terms of CPU allocation > ... ( I dont like spending time on the bare metal spliting cherries ) (more > context switches than work being done) ... > > Got my system upgraded... thanks ... and fixed my old /usr/sbin/dig > (old..nolonger working) to /usr/bin/dig > the initial load seems to be quicker ... and opening a page seems to put > more load on rrdcached... process alright > the config below seems to get rrdcached working with httpd in OpenBSD. ... > > the loading of the smokeping detailed graphs still takes a while ... but I > will do further dianostics... > > > > This is my setup > > #httpd.conf### > server "default" { > listen on * port 80 > location "/smokeping/smokeping.fcgi*" { > fastcgi { > socket "/run/smokeping.sock" > param RRDCACHED_ADDRESS "unix:/var/www/run/rrd/rrdcached.sock" > } > root "/" > } > ### > > top output below when loading a web page > > > load averages: 2.09, 1.82, 1.07 smoke1 > 14:36:27 > 42 processes: 40 idle, 2 on processor up 0 days > 00:11:09 > CPU0 states: 53.2% user, 0.0% nice, 6.8% sys, 0.2% spin, 2.2% intr, 37.6% > idle > CPU1 states: 33.1% user, 0.0% nice, 10.6% sys, 1.4% spin, 0.0% intr, 54.9% > idle > Memory: Real: 208M/1758M act/tot Free: 6160M Cache: 882M Swap: 0K/0K > > PID USERNAME PRI NICE SIZE RES STATE WAIT TIMECPU COMMAND > 57245 _rrdcach 20 41M 36M onproc/0 kqread3:13 30.62% rrdcached > 99560 _smokepi 20 74M 88M sleep/1 netio 1:01 10.55% perl > 73953 _smokepi 20 2632K 2660K sleep/0 kqread0:00 0.20% fping > 77717 _smokepi 100 42M 20M sleep/0 nanoslp 0:02 0.00% perl > 1 root 100 644K 628K idle wait 0:01 0.00% init > 67291 _smokepi -60 42M 20M idle piperd0:01 0.00% perl > 72553 root 30 948K 924K idle ttyin 0:00 0.00% ksh > 84133 _pflogd40 776K 1620K sleep/0 bpf 0:00 0.00% pflogd > 74456 _smtpq 20 1656K 3484K idle kqread0:00 0.00% smtpd > 58541 _ntp 2 -20 1408K 3320K sleep/1 kqread0:00 0.00% ntpd > 22630 root 20 1204K 4160K idle kqread0:00 0.00% sshd > 20724 www20 1908K 3944K sleep/1 kqread0:00 0.00% httpd > 27618 www20 2256K 4276K idle kqread0:00 0.00% httpd > 81375 _syslogd 20 1228K 1524K idle kqread0:00 0.00% syslogd > 77400 _smokepi 180 42M 10M idle sigsusp 0:00 0.00% perl > 39827 root 280 1224K 2512K onproc/1 - 0:00 0.00% top > 79586 _smtpd 20 1936K 4828K idle kqread0:00 0.00% smtpd > 18799 fireman20 1396K 3340K sleep/0 kqread0:00 0.00% sshd > 20179 www20 1320K 3324K idle kqread0:00 0.00% httpd > 45288 root 180 944K 916K idle sigsusp 0:00 0.00% ksh > 51902 root 20 760K 2548K idle netio 0:00 0.00% syslogd > 37356 www20 1332K 3180K idle kqread0:00 0.00% httpd > 82428 root
Re: Folks are there any tips to improve page load times on smokeping running on OpenBSD
Hi Stuart,... Im running 2 cores as Im a miser with my VMS in terms of CPU allocation ... ( I dont like spending time on the bare metal spliting cherries ) (more context switches than work being done) ... Got my system upgraded... thanks ... and fixed my old /usr/sbin/dig (old..nolonger working) to /usr/bin/dig the initial load seems to be quicker ... and opening a page seems to put more load on rrdcached... process alright the config below seems to get rrdcached working with httpd in OpenBSD. ... the loading of the smokeping detailed graphs still takes a while ... but I will do further dianostics... This is my setup #httpd.conf### server "default" { listen on * port 80 location "/smokeping/smokeping.fcgi*" { fastcgi { socket "/run/smokeping.sock" param RRDCACHED_ADDRESS "unix:/var/www/run/rrd/rrdcached.sock" } root "/" } ### top output below when loading a web page load averages: 2.09, 1.82, 1.07 smoke1 14:36:27 42 processes: 40 idle, 2 on processor up 0 days 00:11:09 CPU0 states: 53.2% user, 0.0% nice, 6.8% sys, 0.2% spin, 2.2% intr, 37.6% idle CPU1 states: 33.1% user, 0.0% nice, 10.6% sys, 1.4% spin, 0.0% intr, 54.9% idle Memory: Real: 208M/1758M act/tot Free: 6160M Cache: 882M Swap: 0K/0K PID USERNAME PRI NICE SIZE RES STATE WAIT TIMECPU COMMAND 57245 _rrdcach 20 41M 36M onproc/0 kqread3:13 30.62% rrdcached 99560 _smokepi 20 74M 88M sleep/1 netio 1:01 10.55% perl 73953 _smokepi 20 2632K 2660K sleep/0 kqread0:00 0.20% fping 77717 _smokepi 100 42M 20M sleep/0 nanoslp 0:02 0.00% perl 1 root 100 644K 628K idle wait 0:01 0.00% init 67291 _smokepi -60 42M 20M idle piperd0:01 0.00% perl 72553 root 30 948K 924K idle ttyin 0:00 0.00% ksh 84133 _pflogd40 776K 1620K sleep/0 bpf 0:00 0.00% pflogd 74456 _smtpq 20 1656K 3484K idle kqread0:00 0.00% smtpd 58541 _ntp 2 -20 1408K 3320K sleep/1 kqread0:00 0.00% ntpd 22630 root 20 1204K 4160K idle kqread0:00 0.00% sshd 20724 www20 1908K 3944K sleep/1 kqread0:00 0.00% httpd 27618 www20 2256K 4276K idle kqread0:00 0.00% httpd 81375 _syslogd 20 1228K 1524K idle kqread0:00 0.00% syslogd 77400 _smokepi 180 42M 10M idle sigsusp 0:00 0.00% perl 39827 root 280 1224K 2512K onproc/1 - 0:00 0.00% top 79586 _smtpd 20 1936K 4828K idle kqread0:00 0.00% smtpd 18799 fireman20 1396K 3340K sleep/0 kqread0:00 0.00% sshd 20179 www20 1320K 3324K idle kqread0:00 0.00% httpd 45288 root 180 944K 916K idle sigsusp 0:00 0.00% ksh 51902 root 20 760K 2548K idle netio 0:00 0.00% syslogd 37356 www20 1332K 3180K idle kqread0:00 0.00% httpd 82428 root 20 1472K 2284K idle kqread0:00 0.00% httpd 62829 _ntp 20 908K 2772K idle kqread0:00 0.00% ntpd 89278 root 20 872K 1524K idle kqread0:00 0.00% cron 16265 _smtpd 20 1652K 3472K idle kqread0:00 0.00% smtpd 46732 _smtpd 20 1456K 3304K idle kqread0:00 0.00% smtpd 3405 root 2 -20 1264K 1956K idle kqread0:00 0.00% ntpd 30532 root 20 1716K 2164K idle kqread0:00 0.00% smtpd On Tue, 7 Mar 2023 at 08:36, Stuart Henderson wrote: > On 2023/03/07 07:10, Tom Smyth wrote: > > I m running smokeping fcgi and rrdcached ontop of OpenbSD, to smokeping > > about 150 devces > > the page load times can take 30 seconds to 1 minute, > > is there any way to speed this up. > > > > im running 7.2 OpenBSD on amd64 vm on top of an SSD array > > > > any tips tricks welccome ... > > One quick thing to try is updating to -current, I made some changes to > the rrdtool port which may possibly help a little. > > Check that smokeping is actually using rrdcached (watch top while > opening a page) - the pkg-readme only gives instructions for passing the > required fastcgi variable through for nginx, I don't know how to do that > for httpd (or whether it's actually possible). > > Other than that, rrdtool/rrdcached is just slow on OpenBSD. If it's > anything like mine you'll see high cpu spin % in top while it's busy. > You can try changing the number of cores in the VM - if you've given it > lots of cores try *reducing* it a bit. To pick a number out of the air > I'd suggest probably 4-6. (mine is bare metal and I can't drop the > number short of kernel hac
Re: Smokeping pkg_add -u from 7.2 to 7.3 fails because /usr/sbin/dig is crashing
Folks issue was I was using /usr/sbin/dig rather than /usr/bin/dig correcting the config in smokeping ... resolved the issue (thanks Peter Hessler) cheers, Tom Smyth On Tue, 7 Mar 2023 at 12:49, Tom Smyth wrote: > Folks, > During the pkg_add -u in current (from 7.2 stable to 7.3 current) > > the update of smokeping package > Mar 7 12:21:41 smoke1 pkg_add: Added smokeping-2.8.2p1->2.8.2p2 > > ERROR: output of '/usr/sbin/dig localhost' does not match (?^i:query > time:\s+([0-9.]+)\smsec.*) > at (eval 48) line 1. > > this appears to be because dig making a bad syscall and crashing > > just a heads up ... > > > > > -- > Kindest regards, > Tom Smyth. > -- Kindest regards, Tom Smyth.
Smokeping pkg_add -u from 7.2 to 7.3 fails because /usr/sbin/dig is crashing
Folks, During the pkg_add -u in current (from 7.2 stable to 7.3 current) the update of smokeping package Mar 7 12:21:41 smoke1 pkg_add: Added smokeping-2.8.2p1->2.8.2p2 ERROR: output of '/usr/sbin/dig localhost' does not match (?^i:query time:\s+([0-9.]+)\smsec.*) at (eval 48) line 1. this appears to be because dig making a bad syscall and crashing just a heads up ... -- Kindest regards, Tom Smyth.
Folks are there any tips to improve page load times on smokeping running on OpenBSD
#config-sniped######### smoke1# rcctl ls started cron dhcpleased httpd ntpd pflogd resolvd rrdcached smokeping smokeping_fcgi smtpd sshd syslogd -- Kindest regards, Tom Smyth.
Re: What do you do for spell check on files ?
Hello Stuart, Cool I had not thought of github editor as i was using openbsd / mg to edit the files ... thanks again for the corrections and improvements (and everything else you do for us ) ... Thanks again... On Fri, 23 Sept 2022 at 15:39, Stuart Henderson wrote: > On 2022/09/23 15:19, Tom Smyth wrote: > > Hi folks, > > > > some diffs proposed to nsh.8 manual (thanks StuartH & Omar) for them, > > It higlighted a (fairly big gap) in my manual writing ... and I > appreciate > > the improvements requested. > > > > what do people use for spell checking (apart from your own brain manually > > checking) .. > > what do you do I typically use mg to edit the man page.. any > suggestions > > on what other porters do to improve quality of the manual pages it would > be > > wll appreciated > > > > > > > > -- > > Kindest regards, > > Tom Smyth. > > I was just reading through in the github editor and tweaking as I went. > You'll find some more if you run it through codespell (it's not a full > spell-checker but concentrates on common misspellings). > > -- Kindest regards, Tom Smyth.
What do you do for spell check on files ?
Hi folks, some diffs proposed to nsh.8 manual (thanks StuartH & Omar) for them, It higlighted a (fairly big gap) in my manual writing ... and I appreciate the improvements requested. what do people use for spell checking (apart from your own brain manually checking) .. what do you do I typically use mg to edit the man page.. any suggestions on what other porters do to improve quality of the manual pages it would be wll appreciated -- Kindest regards, Tom Smyth.
Re: Update nsh to 1.0.20220919 Bug Fixes and improved manual Pages.
Apologies all.. apparently someone was very excited and forgot to attach the diff ... not mentioning any names but you can guess who did that :) Thanks again to my colleagues Alan McGrath, Scott Mc Donnell for their work on this and Chris for Reviewing and improving them. Thanks again, Tom Smyth On Wed, 21 Sept 2022 at 18:04, Tom Smyth wrote: > Hello, > The following port update includes the following enhancements > 1) nsh.8 manpage > 2) a number of important bugfixes with bridge commands (strtonum) > 3) more complete net.inet and net.inet6 sysctl support > 4) update to the latest github commit available upstream, > > Contributors, Alan McGrath, Scott Mc Donnell, Tom Smyth and Chris > Cappuccio, > > Thanks to all the folks who worked over the the past few months to improve > nsh... > > Thanks again, > > Tom Smyth > -- Kindest regards, Tom Smyth. nsh-1.0.20220919 Description: Binary data
Update nsh to 1.0.20220919 Bug Fixes and improved manual Pages.
Hello, The following port update includes the following enhancements 1) nsh.8 manpage 2) a number of important bugfixes with bridge commands (strtonum) 3) more complete net.inet and net.inet6 sysctl support 4) update to the latest github commit available upstream, Contributors, Alan McGrath, Scott Mc Donnell, Tom Smyth and Chris Cappuccio, Thanks to all the folks who worked over the the past few months to improve nsh... Thanks again, Tom Smyth
Re: READMEs files for ports
Antoine Merci ... I dont know How I missed that Thanks for pointing me in the direction . On Thu, 5 May 2022 at 09:24, Antoine Jacoutot wrote: > > On Thu, May 05, 2022 at 02:02:40AM +0100, Tom Smyth wrote: > > Hello Marc, Folks > > > > regarding the READMEs in ports there is a wide variance in the writing > > style, sections, verbosity of the READMEs, > > There's a barebone one: > ports/infrastructure/templates/README.template > > > > > > as far as I can tell there does not seem to be a Template README ( I > > could be wrong > > but I have searched ports briefly )and the READMEs across a sampling > > of ports shows > > a wide variety of approaches > > > > Do we want to standardise the Readmes with a template > > perhaps with the following headings and advice about what the content > > of each headings should be ? > > > > > > 1) minimal / basic install > > - get users started on the port useful for newer users and students > > trying out a specific ports > > 2) known Issues perhaps OpenBSD specific > > - alert users to issues / features that dont work in the port > > > > 3) Performance Optimisation > > > > 4) security hardening / attack surface reduction steps > > 4a) sample additional BasicPF config required to allow the port to function > > 4b) doas configuration > > 4c) logging configuration > > 4c) chroot jail guidance ... (if not already supported) even if it > > may be chroot glamping rather than a chroot jail... > > > > do we want the READMEs in mdoc(7) or just txt > > > > 5) Example configs > > (for testing the port and for giving user configuration ideas ?) > > > > > > Hope this helps > > > > > > > > > > On Sun, 1 May 2022 at 20:44, Marc Espie wrote: > > > > > > You guys got to remember those are mostly written by developers. > > > > > > There's a bit of a chicken problem: when you've been playing with > > > software for a while, it's difficult to figure out what might be a problem > > > for newcomers. > > > > > > That said READMEs files should reflect stuff that's a good idea to do if > > > you're using that package PREFERABLY IN A VERY TERSE MANNER. > > > > > > If you are using packages YOU CAN HELP. > > > > > > Yeah. > > > > > > What do you think is hard to figure out and could use a mention in a > > > pkg-readme ? > > > > > > Bear in mind that we're mostly talking OpenBSD specific related stuff. > > > > > > But personally, I don't mind a quickstart on "unfriendly" opensource > > > that's hard to get to work without looking at their docs. > > > > > > THIS IS AN OPPORTUNITY PEOPLE!!! > > > > > > You are using OpenBSD and you thing it's difficult to contribute ? > > > > > > Maybe you can share your experiences about making things work and what was > > > hard to figure out ? > > > > > > (Side note: pkg land is very tricky to automate. Some of what you're > > > going to > > > say I'm probably already aware of, but nevertheless this might give an > > > idea > > > about priorities on what to work on first) > > > > > > > > > -- > > Kindest regards, > > Tom Smyth. > > > > -- > Antoine -- Kindest regards, Tom Smyth.
Re: READMEs files for ports
Hello Marc, Folks regarding the READMEs in ports there is a wide variance in the writing style, sections, verbosity of the READMEs, as far as I can tell there does not seem to be a Template README ( I could be wrong but I have searched ports briefly )and the READMEs across a sampling of ports shows a wide variety of approaches Do we want to standardise the Readmes with a template perhaps with the following headings and advice about what the content of each headings should be ? 1) minimal / basic install - get users started on the port useful for newer users and students trying out a specific ports 2) known Issues perhaps OpenBSD specific - alert users to issues / features that dont work in the port 3) Performance Optimisation 4) security hardening / attack surface reduction steps 4a) sample additional BasicPF config required to allow the port to function 4b) doas configuration 4c) logging configuration 4c) chroot jail guidance ... (if not already supported) even if it may be chroot glamping rather than a chroot jail... do we want the READMEs in mdoc(7) or just txt 5) Example configs (for testing the port and for giving user configuration ideas ?) Hope this helps On Sun, 1 May 2022 at 20:44, Marc Espie wrote: > > You guys got to remember those are mostly written by developers. > > There's a bit of a chicken problem: when you've been playing with > software for a while, it's difficult to figure out what might be a problem > for newcomers. > > That said READMEs files should reflect stuff that's a good idea to do if > you're using that package PREFERABLY IN A VERY TERSE MANNER. > > If you are using packages YOU CAN HELP. > > Yeah. > > What do you think is hard to figure out and could use a mention in a > pkg-readme ? > > Bear in mind that we're mostly talking OpenBSD specific related stuff. > > But personally, I don't mind a quickstart on "unfriendly" opensource > that's hard to get to work without looking at their docs. > > THIS IS AN OPPORTUNITY PEOPLE!!! > > You are using OpenBSD and you thing it's difficult to contribute ? > > Maybe you can share your experiences about making things work and what was > hard to figure out ? > > (Side note: pkg land is very tricky to automate. Some of what you're going to > say I'm probably already aware of, but nevertheless this might give an idea > about priorities on what to work on first) > -- Kindest regards, Tom Smyth.
Re: nsh manual rewrite in mandoc draft feedback requested style ideas etc
Hello folks, Attached is the latest iteration of the proposed manual for nsh it is not complete yet, but I have tried to take on board Ingo@ very helpful feedback, it has been run through mandoc -Tlint It needs a number of more passes im sure, some additional changes made since last time, removed Appendix A through Appendix E titles and references... as I have not come across Appendices in manual pages (if i recall correctly ) .. I have added more tags to make content more searchable... I do have an issue with presenting " ? " as an argument to commands in the options /arguments for commands as a hack im puting .Op Cm \ ? | other |Command Options the escaped space is to centre the ? in the option Square brackets which I think is more readable bgp [ ? | enable | disable | edit] [options] vs without the escaped space bgp [? | enable | disable | edit] [options] Any other adivice / feedback welcome, as im still updating and improving it ... (it will need a few more passes for certain On Tue, 26 Apr 2022 at 14:28, Tom Smyth wrote: > > Hello Ingo, > Thanks for all your feedback, It s very much appreciated. > Re mandoc(1) vs mdoc(7) thanks for the clarification for me, I will > try to use mdoc(7) when referring to the manpage language > > Your formatting advice was very helpful > > I have tried to fully implement your feedback as best I can with a couple of > exceptions. > .Ss section overuse for trivial commands have been removed but I propose > to retain .Ss for commands with a large subset of commands / sub menu > of commands > > is this appropiate use of the .Ss sections ? > > regarding Sorting ...I agree it needs to be improved, > Im caught between 3 conflicting methods > 1) I think certain commands should be presented in the manual sooner > rather than later > (eg enable, show , ip , ip6 and interface ) > 2) anything else alphabetically > 3) match the ordering of commands in the nsh program ... (some of the > commands probably should be re-ordered Ill discuss > this with Chris, > > I think a hybrid between 1 and 2 options is probably best ... > (aphabetical by default and then present important basic commands > first (as an exception)) > > I will look at the tg macro again (i missed this completely but I > plan to incorporate your advice below shortly > > .Tg rtable > .It Oo Ic no Oc Ic rtable Oo Ar table-id Oc Op name > > In such cases, the .Tg macro is useful to make ":t rtable" work in man(1). > > > Re Upstream Inclusion of the manual I have been discussing with Chris > and once I get a final draft (with current features documented) it > will be checked by Chris and included in the nsh source. > > Attached is the updated version > any other feedback / adivce would be appreciated > > Thanks again > > Tom > > > > > On Mon, 25 Apr 2022 at 21:59, Ingo Schwarze wrote: > > > > Hi Tom, > > > > Tom Smyth wrote on Mon, Apr 25, 2022 at 11:08:26AM +0100: > > > > > I have been translating the txt of MANUAL of nsh port to mandoc > > > > In fact, you have started translating it to mdoc(7) - which is a markup > > language - rather than to mandoc(1) - which is a parsing and formatting > > program for multiple markup languages including mdoc(7). > > > > > there is quite alot of features and syntax to document > > > > Wow, indeed. What a beast! > > > > > so I figured that before I complete the first redraft (that is fit for > > > human consumption) I would get feedback on what I have done so far. > > > > > > do you like the bullets are they too much > > > > My impression is that bullet lists are indeed overused. > > > > > what I should do more of? > > > what i should do less of? > > > > I suggest making sure that features are described completely and > > consisely and not only demonstrated by examples. You certainly > > do not need to add more examples. Wording, grammar, and punctuation > > might profit from some polishing throughout. Some text feels rather > > wordy and repetitive for a manual page but somewhat vague at the > > same time. > > > > In a manual page, the DESCRIPTION needs particular attention because > > it's the first part readers look at. Choosing a good order and > > weeding out repetions is particularly important in that section. > > > > > any advice comments would be appreciated > > > > OK, let's have a stab at it: > > > > > .\" NSH is BSD licensed > > > > Instead of this line, insert the complete text of the license that > > applies to the manual page file, including a "Copy
Re: Is there a way to display the block of another man page inside a man page
Hello Ingo, thanks for your time on this your comments and advice were very helpful just one follow up the :t functionality in man did not seem to work unless I had the .Tg telnet line added Thanks for the tip on the writing side... ( I must of gone to the school were I learnend why say something in 10 words when you can say the exact same thing in 100 words... Im taking the lessons learned from the telnet command and applying it else where in the man page thanks here is what I ended up with for the telnet command in nsh .Tg telnet .Ic telnet .Op Ar options .Op Ar host .Op port .Pp Open a .Xr telnet 1 session to the given TCP .Ar port on the remote server .Ar host , specified by name or IP address. If the port is not specified the IANA assigned port 23 for telnet will be used. The .Ar options are documented in the .Xr telnet 1 manual page. Thanks again Ingo Tom Smyth On Mon, 2 May 2022 at 02:36, Ingo Schwarze wrote: > > Hi Tom, > > Tom Smyth wrote on Mon, May 02, 2022 at 01:46:50AM +0100: > > > while documenting nsh and its features, > > I wanted to display the command switches of telnet command inside the > > manual page for nsh, > > Don't. > > This is not a technical problem: "how can i technically do this" > is the wrong question to ask. > > This is a problem of manual page design and content organisation. > Having a large amount of identical text in two manual pages is a > bad idea because readers will wonder whether the text is indeed > identical or whether there are subtle differences. They will likely > waste time by starting to compare the two pages to track down the > differences. > > Besides, displaying lots of content from one page in another is > bad documentation design because it detracts from the topic of > the other page. Instead, explain in the other page which content > of the first page also applies here, as precisely as possible. > > > I would like to display , the contents of the > > telnet , name synopsis and description sections from the telnet > > manpage in the nsh man page without copying the contents of the man > > page. (so that the command line switches / arguments are up to date > > for a given OpenBSD version > > > > for now i have done telnet client documentation in nsh as follows > > .Tg telnet > > Most likely, .Tg is not needed right in front of .Ic with the same > argument. Does :t telnet not work without it? > > > .Ic telnet > > .Op -a > > That should be ".Op Fl a"; the same applies below. > > > .Op -b host-alias > > .Op -l user-name > > .Ar host-name > > Just ".Ar host" is enough; it may not even be a name. > > > .Op Ar port > > .Pp > > Open a telnet client session to the remote host host-name. > > Better: > > Open a > .Xr telnet 1 > session to the remote server > .Ar host , > which can be specified by name or IP address. > > > Where host-name can be a name or IP address of the remote host. > > port is the TCP port on the remote host which you wish to connect and port > > can be within the range 0-65535. > > The > > .Ic -a > > switch will attempt an automatic login if the setup permits it. > > The > > .Ic -b host-alias > > will bind the source IP telnet client session to a specific ip address alias > > rather than the primary ip address on a given interface. > > See > > the > > > .Xr telnet 1 > > man page for a comprehensive list of telnet command options. > > Yes, that is how to do it. > Nits: s/man/manual/; s/command/command line/ > > I think i would trim this down even more. > The -a and -l options are unimportant because nobody should use > telnet(1) with authentication. The -b option is unimportant because > the automatically selected source address is almost always just fine. > > So just > > .Ic telnet > .Op Ar options > .Op Ar host Op port > .Pp > Open a > .Xr telnet 1 > session to the given TCP > .Ar port > on the remote server > .Ar host , > specified by name or IP address. > The > .Ar options > are documented in the > .Xr telnet 1 > manual page. > > seems better to me: precise and concise. > > > .Bd -literal -offset indent > > nsh(p)/!man telnet > > .Ed > > This example is probably superfluous at this point. > Escaping to a shell (i guess that is what "!" means) > ought to be documented in a different part of this manual page, > and apart from that, the example is trivial. > > > any thoughts / advice welcome > > Hope this helps, > Ingo -- Kindest regards, Tom Smyth.
Is there a way to display the block of another man page inside a man page
Hello, while documenting nsh and its features, I wanted to display the command switches of telnet command inside the manual page for nsh, I would like to display , the contents of the telnet , name synopsis and description sections from the telnet manpage in the nsh man page without copying the contents of the man page. (so that the command line switches / arguments are up to date for a given OpenBSD version for now i have done telnet client documentation in nsh as follows .Tg telnet .Ic telnet .Op -a .Op -b host-alias .Op -l user-name .Ar host-name .Op Ar port .Pp Open a telnet client session to the remote host host-name. Where host-name can be a name or IP address of the remote host. port is the TCP port on the remote host which you wish to connect and port can be within the range 0-65535. The .Ic -a switch will attempt an automatic login if the setup permits it. The .Ic -b host-alias will bind the source IP telnet client session to a specific ip address alias rather than the primary ip address on a given interface. See .Xr telnet 1 man page for a comprehensive list of telnet command options. .Bd -literal -offset indent nsh(p)/!man telnet .Ed any thoughts / advice welcome -- Kindest regards, Tom Smyth.
Re: nsh manual rewrite in mandoc draft feedback requested style ideas etc
Hello Ingo, Thanks for all your feedback, It s very much appreciated. Re mandoc(1) vs mdoc(7) thanks for the clarification for me, I will try to use mdoc(7) when referring to the manpage language Your formatting advice was very helpful I have tried to fully implement your feedback as best I can with a couple of exceptions. .Ss section overuse for trivial commands have been removed but I propose to retain .Ss for commands with a large subset of commands / sub menu of commands is this appropiate use of the .Ss sections ? regarding Sorting ...I agree it needs to be improved, Im caught between 3 conflicting methods 1) I think certain commands should be presented in the manual sooner rather than later (eg enable, show , ip , ip6 and interface ) 2) anything else alphabetically 3) match the ordering of commands in the nsh program ... (some of the commands probably should be re-ordered Ill discuss this with Chris, I think a hybrid between 1 and 2 options is probably best ... (aphabetical by default and then present important basic commands first (as an exception)) I will look at the tg macro again (i missed this completely but I plan to incorporate your advice below shortly .Tg rtable .It Oo Ic no Oc Ic rtable Oo Ar table-id Oc Op name In such cases, the .Tg macro is useful to make ":t rtable" work in man(1). Re Upstream Inclusion of the manual I have been discussing with Chris and once I get a final draft (with current features documented) it will be checked by Chris and included in the nsh source. Attached is the updated version any other feedback / adivce would be appreciated Thanks again Tom On Mon, 25 Apr 2022 at 21:59, Ingo Schwarze wrote: > > Hi Tom, > > Tom Smyth wrote on Mon, Apr 25, 2022 at 11:08:26AM +0100: > > > I have been translating the txt of MANUAL of nsh port to mandoc > > In fact, you have started translating it to mdoc(7) - which is a markup > language - rather than to mandoc(1) - which is a parsing and formatting > program for multiple markup languages including mdoc(7). > > > there is quite alot of features and syntax to document > > Wow, indeed. What a beast! > > > so I figured that before I complete the first redraft (that is fit for > > human consumption) I would get feedback on what I have done so far. > > > > do you like the bullets are they too much > > My impression is that bullet lists are indeed overused. > > > what I should do more of? > > what i should do less of? > > I suggest making sure that features are described completely and > consisely and not only demonstrated by examples. You certainly > do not need to add more examples. Wording, grammar, and punctuation > might profit from some polishing throughout. Some text feels rather > wordy and repetitive for a manual page but somewhat vague at the > same time. > > In a manual page, the DESCRIPTION needs particular attention because > it's the first part readers look at. Choosing a good order and > weeding out repetions is particularly important in that section. > > > any advice comments would be appreciated > > OK, let's have a stab at it: > > > .\" NSH is BSD licensed > > Instead of this line, insert the complete text of the license that > applies to the manual page file, including a "Copyright" line. > Look in /usr/share/man/man8/ for examples. > > > .Nd Network configuration shell > > Use lower case instead of sentence case in the .Nd line. > > > .Bk -words ... .Ek > > No need for that, just delete both the .Bk and the .Ek line. > > > .Op Fl i Ar rcfile > > .Op Fl c Ar rcfile > > Use different placeholder names for different option arguments. > Make them as descriptive as possible. > > > for other daemons into one place, providing an alternative > > to /etc/netstart and parts of /etc/rc. > > Make that > > an alternative to > .Xr netstart 8 > and parts of > .Xr rc 8 . > > > .sp > > Never use .sp in manual pages. Use .Pp instead. > > > .Nm > > encapsulates the following daemons and services: > > Very subtle markup bug here: outside literal context, you almost never > want to start a line in roff(7) code with a space character. > In roff(7), a leading space character means "break the output line > and indent the next line by a space character - look at the output: > > nsh > encapsulates the following daemons and services: > > That's very ugly and a bit confusing. Search your file for lines > starting with spaces, there are several more examples. > > > pf, ospfd, ospf6d, bgpd, ripd, ldpd, relayd, ipsecctl, iked, rtadvd, > > dvmrpd, sasyncd, dhcpd, snmpd, sshd, ntpd, ifstated, tftp-proxy, > > ftp-proxy, tftpd,
nsh manual rewrite in mandoc draft feedback requested style ideas etc
Hello folks, I have been translating the txt of MANUAL of nsh port to mandoc there is quite alot of features and syntax to document so I figured that before I complete the first redraft(that is fit for human consumption) I would get feedback on what I have done so far. do you like the bullets are they too much what I should do more of? what i should do less of? any advice comments would be appreciated before we push the diff into ports / upstream nsh Thanks Tom Smyth. nsh.8 Description: Unix manual page
Re: new stuff in pkg_add
Hi Marc, is there anything we can do to test it as a port maintainer ? and a user (apart from regular update of snapshot and pkg_add -u and pkg_add -u -D snap ? Thanks On Fri, 15 Apr 2022 at 20:59, Marc Espie wrote: > > I've been working on some caching mechanism building quirks at the end > of a dpb run, and storing all the update-info for all built packages > in a locate(8) file. > > The results are more drastic than I expected. I'm still fine-tuning stuff, > because caching means a possibility of getting out-of-synch, and pkg_add > should still recover properly, but expect *very* significant speed-ups in > frequent pkg_add -u somewhere post 7.1. > -- Kindest regards, Tom Smyth.
Re: NSH diff update to 1.0.20210509
Hello, following feedback from Kurtm here is my 2nd attempt it includes Makefile and distinfo changes that should have been included as part of my previous mail 1) updates NSH inline with the latest commits made by Chris, 2) Chris reviewed and committed arp sysctls commands from Tom 3) Chris added wg (wireguard) support to nsh 4) Chris added improved bridge interface management cli syntax can this be updated in current and stable, Complies clean on amd64 and arp sysctls work as expected thanks to Kurtm and Soleene for their help On Sun, 20 Feb 2022 at 18:10, Tom Smyth wrote: > Hello, > the following diff updates the makefile to pull down latest commit > (20210509) from upstream and provides the following enhancements and > updates, > > 1) updates NSH inline with the latest commits made by Chris, > 2) Chris reviewed and committed arp sysctls commands from Tom > 3) Chris added wg (wireguard) support to nsh > 4) Chris added improved bridge interface management cli syntax > > can this be updated in current and stable, > > Complies clean on amd64 and arp sysctls work as expected > > Thanks to Chris for his work adding in features and helping me to > contribute. > Thanks to Kurtm for getting me started on the ports framework > > any feedback welcome > > > > > -- > Kindest regards, > Tom Smyth. > -- Kindest regards, Tom Smyth. ? Updating Index: Makefile === RCS file: /cvs/ports/shells/nsh/Makefile,v retrieving revision 1.42 diff -u -p -u -r1.42 Makefile --- Makefile 28 Apr 2021 20:14:36 - 1.42 +++ Makefile 21 Feb 2022 18:04:06 - @@ -2,11 +2,11 @@ COMMENT = network switch style shell -DISTNAME = nsh-1.0.20210416 +DISTNAME = nsh-1.0.20210509 GH_ACCOUNT = yellowman GH_PROJECT = nsh -GH_COMMIT = 5a237b068794446a016e5a394a802922b9c668cf +GH_COMMIT = a18420dac8fa3aea55b9b9e9388ac07438816274 CATEGORIES = shells net HOMEPAGE = https://www.nmedia.net/nsh/ Index: distinfo === RCS file: /cvs/ports/shells/nsh/distinfo,v retrieving revision 1.14 diff -u -p -u -r1.14 distinfo --- distinfo 28 Apr 2021 20:14:36 - 1.14 +++ distinfo 21 Feb 2022 18:04:06 - @@ -1,2 +1,2 @@ -SHA256 (nsh-1.0.20210416-5a237b06.tar.gz) = 4LlJND5E4TIYX8h41MQOITVuDznuS0bKQGToKHvhnls= -SIZE (nsh-1.0.20210416-5a237b06.tar.gz) = 130285 +SHA256 (nsh-1.0.20210509-a18420da.tar.gz) = jdfJDqDpHxSWd0/2AsdiuLCakAgaQlRFrZGymUyUbUE= +SIZE (nsh-1.0.20210509-a18420da.tar.gz) = 134598
NSH diff update to 1.0.20210509
Hello, the following diff updates the makefile to pull down latest commit (20210509) from upstream and provides the following enhancements and updates, 1) updates NSH inline with the latest commits made by Chris, 2) Chris reviewed and committed arp sysctls commands from Tom 3) Chris added wg (wireguard) support to nsh 4) Chris added improved bridge interface management cli syntax can this be updated in current and stable, Complies clean on amd64 and arp sysctls work as expected Thanks to Chris for his work adding in features and helping me to contribute. Thanks to Kurtm for getting me started on the ports framework any feedback welcome -- Kindest regards, Tom Smyth. Index: Makefile === RCS file: /cvs/ports/shells/nsh/Makefile,v retrieving revision 1.42 diff -u -p -u -r1.42 Makefile --- Makefile 28 Apr 2021 20:14:36 - 1.42 +++ Makefile 20 Feb 2022 17:45:38 - @@ -2,11 +2,12 @@ COMMENT = network switch style shell -DISTNAME = nsh-1.0.20210416 +DISTNAME = nsh-1.0.20210509 GH_ACCOUNT = yellowman GH_PROJECT = nsh -GH_COMMIT = 5a237b068794446a016e5a394a802922b9c668cf +GH_COMMIT = a18420dac8fa3aea55b9b9e9388ac07438816274 + CATEGORIES = shells net HOMEPAGE = https://www.nmedia.net/nsh/
Re: shells/nsh Request update of port to reflect latest git commit
Thanks Stuart, Appreciate your help on this... On Wed, 28 Apr 2021 at 21:24, Stuart Henderson wrote: > > On 2021/04/28 20:54, Tom Smyth wrote: > > Hello, > > > > Now that the 6.9 release packages on the mirrors are populated , is it > > possible for someone to commit the latest diff ? Or is it a case of wait > > for all architecture builds to complete before the changes to nsh can be > > committed? > > thanks for the reminder - committed to -current. I've put it on my list of > things to push to -stable. > -- Kindest regards, Tom Smyth.
Re: shells/nsh Request update of port to reflect latest git commit
Hello, Now that the 6.9 release packages on the mirrors are populated , is it possible for someone to commit the latest diff ? Or is it a case of wait for all architecture builds to complete before the changes to nsh can be committed? Thanks for your time On Friday, 16 April 2021, Tom Smyth wrote: > Hi Stuart, Chris, all, > > I'm happy help out on the port and do testing & I really like the > software, > answer questions on list (ports and misc ) regarding nsh and try to > implement & test fixes... > > and track improvements in the network stack in base (as my > understanding of nsh code improves ) > > that said any of my (humble) contributions need supervision and > careful review, > > I want to see nsh more widely deployed in openBSD community and I > would like to use it as a tool > to help cisco heads use OpenBSD, > > > Thanks again, > > Tom Smyth > > > > > > > > > > > > > On Fri, 16 Apr 2021 at 20:56, Stuart Henderson > wrote: > > > > This fixes build but the other part of the problem is the lack of > > maintainer, if it is reenabled I would *really* like someone who is > > willing to look at fixing it next time it needs syncing up with -current > > to take MAINTAINER please. > > > > Doesn't require catching problems as they happen (though that would be > > nice!) but at least someone that we can mail about breakages when we run > > into them in ports builds. > > > > It doesn't break all that frequently (not usually more than 1 or 2 times > > in a year, and often less than that) but it is inevitable. > > > > > > > > On 2021/04/16 02:20, Tom Smyth wrote: > > > Hello, all, > > > > > > Chris has incorporated and improved the diffs and merged them upstream, > > > > > > below is a diff for pulling the latest commit from git > > > > > > it is compiling cleanly on amd64 6.9 current (20210414 ) without > > > errors or warnings > > > > > > all the patch files in the current port can be removed also as they > > > have been included or improved upon upstream > > > > > > Thanks Chris, Kurt and everyone who helped. > > > > > > > > > > > > -- > > > Kindest regards, > > > Tom Smyth. > > > > > Index: Makefile > > > === > > > RCS file: /cvs/ports/shells/nsh/Makefile,v > > > retrieving revision 1.41 > > > diff -u -p -r1.41 Makefile > > > --- Makefile 22 Mar 2021 17:23:22 - 1.41 > > > +++ Makefile 16 Apr 2021 00:59:39 - > > > @@ -1,16 +1,15 @@ > > > # $OpenBSD: Makefile,v 1.41 2021/03/22 17:23:22 sthen Exp $ > > > > > > -BROKEN = needs adapting to changes in base\n > > > -BROKEN +=(again); this port is closely tied to interfaces in the > base OS and really\n > > > -BROKEN +=needs an active maintainer! > > > > > > COMMENT =network switch style shell > > > > > > -DISTNAME = nsh-1.0.20201006 > > > +DISTNAME = nsh-1.0.20210415 > > > +#REVISION = 0 > > > > > > GH_ACCOUNT = yellowman > > > GH_PROJECT = nsh > > > -GH_COMMIT = 4b92f9124641caddcce238293919b1ec45b5a20d > > > +GH_COMMIT = 8573767444bed331376e6d8edc9bd93bc091789d > > > + > > > > > > CATEGORIES = shells net > > > HOMEPAGE = http://www.nmedia.net/nsh/ > > > Index: distinfo > > > =========== > > > RCS file: /cvs/ports/shells/nsh/distinfo,v > > > retrieving revision 1.13 > > > diff -u -p -r1.13 distinfo > > > --- distinfo 4 Feb 2021 22:13:09 - 1.13 > > > +++ distinfo 16 Apr 2021 00:59:39 - > > > @@ -1,2 +1,2 @@ > > > -SHA256 (nsh-1.0.20201006-4b92f912.tar.gz) = > 4iz3xcEdK8E4I9sG51JPASuviji2O9ooO+6AI1rqQIs= > > > -SIZE (nsh-1.0.20201006-4b92f912.tar.gz) = 130053 > > > +SHA256 (nsh-1.0.20210415-85737674.tar.gz) = > vcNGznniC4rWLD6ULyBbGKJUvUEsNg1ylenjZBvmX4A= > > > +SIZE (nsh-1.0.20210415-85737674.tar.gz) = 130190 > > > > > > > > -- > Kindest regards, > Tom Smyth. > -- Kindest regards, Tom Smyth.
Re: shells/nsh update of port to reflect git commit 20210416
Hi I have amended the subject of the email to clarify that it is a diff to update the port, On Sat, 17 Apr 2021 at 01:52, Tom Smyth wrote: > > hello, > > Reuqest import of the attached diff 20210416 > > Compiled on AMD64 > No errors no warnings > > Changes: > 1) pulls in latest code from github (with all fixes discussed in the > past 2 months > 2) Chris has added in support for llprio on interfaces > 3) (all previous fixes by naddy@ , tom smyth and Chris have been included > 4) added Tom Smyth as MAINTAINER for nsh port > > > No Patches necessary for the software to build. please remove any > patches that might linger > > > Thanks to Chris, Kurtm@ and Stuart for their help and feedback. > > Thanks again, > > Tom Smyth > > > > > > > On Fri, 16 Apr 2021 at 21:38, Tom Smyth wrote: > > > > Hi Stuart, Chris, all, > > > > I'm happy help out on the port and do testing & I really like the > > software, > > answer questions on list (ports and misc ) regarding nsh and try to > > implement & test fixes... > > > > and track improvements in the network stack in base (as my > > understanding of nsh code improves ) > > > > that said any of my (humble) contributions need supervision and > > careful review, > > > > I want to see nsh more widely deployed in openBSD community and I > > would like to use it as a tool > > to help cisco heads use OpenBSD, > > > > > > Thanks again, > > > > Tom Smyth > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, 16 Apr 2021 at 20:56, Stuart Henderson wrote: > > > > > > This fixes build but the other part of the problem is the lack of > > > maintainer, if it is reenabled I would *really* like someone who is > > > willing to look at fixing it next time it needs syncing up with -current > > > to take MAINTAINER please. > > > > > > Doesn't require catching problems as they happen (though that would be > > > nice!) but at least someone that we can mail about breakages when we run > > > into them in ports builds. > > > > > > It doesn't break all that frequently (not usually more than 1 or 2 times > > > in a year, and often less than that) but it is inevitable. > > > > > > > > > > > > On 2021/04/16 02:20, Tom Smyth wrote: > > > > Hello, all, > > > > > > > > Chris has incorporated and improved the diffs and merged them upstream, > > > > > > > > below is a diff for pulling the latest commit from git > > > > > > > > it is compiling cleanly on amd64 6.9 current (20210414 ) without > > > > errors or warnings > > > > > > > > all the patch files in the current port can be removed also as they > > > > have been included or improved upon upstream > > > > > > > > Thanks Chris, Kurt and everyone who helped. > > > > > > > > > > > > > > > > -- > > > > Kindest regards, > > > > Tom Smyth. > > > > > > > Index: Makefile > > > > === > > > > RCS file: /cvs/ports/shells/nsh/Makefile,v > > > > retrieving revision 1.41 > > > > diff -u -p -r1.41 Makefile > > > > --- Makefile 22 Mar 2021 17:23:22 - 1.41 > > > > +++ Makefile 16 Apr 2021 00:59:39 - > > > > @@ -1,16 +1,15 @@ > > > > # $OpenBSD: Makefile,v 1.41 2021/03/22 17:23:22 sthen Exp $ > > > > > > > > -BROKEN = needs adapting to changes in base\n > > > > -BROKEN +=(again); this port is closely tied to interfaces in the > > > > base OS and really\n > > > > -BROKEN +=needs an active maintainer! > > > > > > > > COMMENT =network switch style shell > > > > > > > > -DISTNAME = nsh-1.0.20201006 > > > > +DISTNAME = nsh-1.0.20210415 > > > > +#REVISION = 0 > > > > > > > > GH_ACCOUNT = yellowman > > > > GH_PROJECT = nsh > > > > -GH_COMMIT = 4b92f9124641caddcce238293919b1ec45b5a20d > > > > +GH_COMMIT = 8573767444bed331376e6d8edc9bd93bc091789d > > > > + > > > > > > > > CATEGORIES = shells net > > > > HOMEPAGE = http://www.nmedia.net/nsh/ > > > > Index: distinfo > > > > === > > > > RCS file: /cvs/ports/shells/nsh/distinfo,v > > > > retrieving revision 1.13 > > > > diff -u -p -r1.13 distinfo > > > > --- distinfo 4 Feb 2021 22:13:09 - 1.13 > > > > +++ distinfo 16 Apr 2021 00:59:39 - > > > > @@ -1,2 +1,2 @@ > > > > -SHA256 (nsh-1.0.20201006-4b92f912.tar.gz) = > > > > 4iz3xcEdK8E4I9sG51JPASuviji2O9ooO+6AI1rqQIs= > > > > -SIZE (nsh-1.0.20201006-4b92f912.tar.gz) = 130053 > > > > +SHA256 (nsh-1.0.20210415-85737674.tar.gz) = > > > > vcNGznniC4rWLD6ULyBbGKJUvUEsNg1ylenjZBvmX4A= > > > > +SIZE (nsh-1.0.20210415-85737674.tar.gz) = 130190 > > > > > > > > > > > > > -- > > Kindest regards, > > Tom Smyth. > > > > -- > Kindest regards, > Tom Smyth. -- Kindest regards, Tom Smyth.
shells/nsh Request update of port to reflect git commit 20210416
hello, Reuqest import of the attached diff 20210416 Compiled on AMD64 No errors no warnings Changes: 1) pulls in latest code from github (with all fixes discussed in the past 2 months 2) Chris has added in support for llprio on interfaces 3) (all previous fixes by naddy@ , tom smyth and Chris have been included 4) added Tom Smyth as MAINTAINER for nsh port No Patches necessary for the software to build. please remove any patches that might linger Thanks to Chris, Kurtm@ and Stuart for their help and feedback. Thanks again, Tom Smyth On Fri, 16 Apr 2021 at 21:38, Tom Smyth wrote: > > Hi Stuart, Chris, all, > > I'm happy help out on the port and do testing & I really like the software, > answer questions on list (ports and misc ) regarding nsh and try to > implement & test fixes... > > and track improvements in the network stack in base (as my > understanding of nsh code improves ) > > that said any of my (humble) contributions need supervision and > careful review, > > I want to see nsh more widely deployed in openBSD community and I > would like to use it as a tool > to help cisco heads use OpenBSD, > > > Thanks again, > > Tom Smyth > > > > > > > > > > > > > On Fri, 16 Apr 2021 at 20:56, Stuart Henderson wrote: > > > > This fixes build but the other part of the problem is the lack of > > maintainer, if it is reenabled I would *really* like someone who is > > willing to look at fixing it next time it needs syncing up with -current > > to take MAINTAINER please. > > > > Doesn't require catching problems as they happen (though that would be > > nice!) but at least someone that we can mail about breakages when we run > > into them in ports builds. > > > > It doesn't break all that frequently (not usually more than 1 or 2 times > > in a year, and often less than that) but it is inevitable. > > > > > > > > On 2021/04/16 02:20, Tom Smyth wrote: > > > Hello, all, > > > > > > Chris has incorporated and improved the diffs and merged them upstream, > > > > > > below is a diff for pulling the latest commit from git > > > > > > it is compiling cleanly on amd64 6.9 current (20210414 ) without > > > errors or warnings > > > > > > all the patch files in the current port can be removed also as they > > > have been included or improved upon upstream > > > > > > Thanks Chris, Kurt and everyone who helped. > > > > > > > > > > > > -- > > > Kindest regards, > > > Tom Smyth. > > > > > Index: Makefile > > > === > > > RCS file: /cvs/ports/shells/nsh/Makefile,v > > > retrieving revision 1.41 > > > diff -u -p -r1.41 Makefile > > > --- Makefile 22 Mar 2021 17:23:22 - 1.41 > > > +++ Makefile 16 Apr 2021 00:59:39 - > > > @@ -1,16 +1,15 @@ > > > # $OpenBSD: Makefile,v 1.41 2021/03/22 17:23:22 sthen Exp $ > > > > > > -BROKEN = needs adapting to changes in base\n > > > -BROKEN +=(again); this port is closely tied to interfaces in the > > > base OS and really\n > > > -BROKEN +=needs an active maintainer! > > > > > > COMMENT =network switch style shell > > > > > > -DISTNAME = nsh-1.0.20201006 > > > +DISTNAME = nsh-1.0.20210415 > > > +#REVISION = 0 > > > > > > GH_ACCOUNT = yellowman > > > GH_PROJECT = nsh > > > -GH_COMMIT = 4b92f9124641caddcce238293919b1ec45b5a20d > > > +GH_COMMIT = 8573767444bed331376e6d8edc9bd93bc091789d > > > + > > > > > > CATEGORIES = shells net > > > HOMEPAGE = http://www.nmedia.net/nsh/ > > > Index: distinfo > > > =============== > > > RCS file: /cvs/ports/shells/nsh/distinfo,v > > > retrieving revision 1.13 > > > diff -u -p -r1.13 distinfo > > > --- distinfo 4 Feb 2021 22:13:09 - 1.13 > > > +++ distinfo 16 Apr 2021 00:59:39 - > > > @@ -1,2 +1,2 @@ > > > -SHA256 (nsh-1.0.20201006-4b92f912.tar.gz) = > > > 4iz3xcEdK8E4I9sG51JPASuviji2O9ooO+6AI1rqQIs= > > > -SIZE (nsh-1.0.20201006-4b92f912.tar.gz) = 130053 > > > +SHA256 (nsh-1.0.20210415-85737674.tar.gz) = > > > vcNGznniC4rWLD6ULyBbGKJUvUEsNg1ylenjZBvmX4A= > > > +SIZE (nsh-1.0.20210415-85737674.tar.gz) = 130190 > > > > > > > > -- > Kindest r
Re: shells/nsh Request update of port to reflect latest git commit
Hi Stuart, Chris, all, I'm happy help out on the port and do testing & I really like the software, answer questions on list (ports and misc ) regarding nsh and try to implement & test fixes... and track improvements in the network stack in base (as my understanding of nsh code improves ) that said any of my (humble) contributions need supervision and careful review, I want to see nsh more widely deployed in openBSD community and I would like to use it as a tool to help cisco heads use OpenBSD, Thanks again, Tom Smyth On Fri, 16 Apr 2021 at 20:56, Stuart Henderson wrote: > > This fixes build but the other part of the problem is the lack of > maintainer, if it is reenabled I would *really* like someone who is > willing to look at fixing it next time it needs syncing up with -current > to take MAINTAINER please. > > Doesn't require catching problems as they happen (though that would be > nice!) but at least someone that we can mail about breakages when we run > into them in ports builds. > > It doesn't break all that frequently (not usually more than 1 or 2 times > in a year, and often less than that) but it is inevitable. > > > > On 2021/04/16 02:20, Tom Smyth wrote: > > Hello, all, > > > > Chris has incorporated and improved the diffs and merged them upstream, > > > > below is a diff for pulling the latest commit from git > > > > it is compiling cleanly on amd64 6.9 current (20210414 ) without > > errors or warnings > > > > all the patch files in the current port can be removed also as they > > have been included or improved upon upstream > > > > Thanks Chris, Kurt and everyone who helped. > > > > > > > > -- > > Kindest regards, > > Tom Smyth. > > > Index: Makefile > > === > > RCS file: /cvs/ports/shells/nsh/Makefile,v > > retrieving revision 1.41 > > diff -u -p -r1.41 Makefile > > --- Makefile 22 Mar 2021 17:23:22 - 1.41 > > +++ Makefile 16 Apr 2021 00:59:39 - > > @@ -1,16 +1,15 @@ > > # $OpenBSD: Makefile,v 1.41 2021/03/22 17:23:22 sthen Exp $ > > > > -BROKEN = needs adapting to changes in base\n > > -BROKEN +=(again); this port is closely tied to interfaces in the base > > OS and really\n > > -BROKEN +=needs an active maintainer! > > > > COMMENT =network switch style shell > > > > -DISTNAME = nsh-1.0.20201006 > > +DISTNAME = nsh-1.0.20210415 > > +#REVISION = 0 > > > > GH_ACCOUNT = yellowman > > GH_PROJECT = nsh > > -GH_COMMIT = 4b92f9124641caddcce238293919b1ec45b5a20d > > +GH_COMMIT = 8573767444bed331376e6d8edc9bd93bc091789d > > + > > > > CATEGORIES = shells net > > HOMEPAGE = http://www.nmedia.net/nsh/ > > Index: distinfo > > === > > RCS file: /cvs/ports/shells/nsh/distinfo,v > > retrieving revision 1.13 > > diff -u -p -r1.13 distinfo > > --- distinfo 4 Feb 2021 22:13:09 - 1.13 > > +++ distinfo 16 Apr 2021 00:59:39 - > > @@ -1,2 +1,2 @@ > > -SHA256 (nsh-1.0.20201006-4b92f912.tar.gz) = > > 4iz3xcEdK8E4I9sG51JPASuviji2O9ooO+6AI1rqQIs= > > -SIZE (nsh-1.0.20201006-4b92f912.tar.gz) = 130053 > > +SHA256 (nsh-1.0.20210415-85737674.tar.gz) = > > vcNGznniC4rWLD6ULyBbGKJUvUEsNg1ylenjZBvmX4A= > > +SIZE (nsh-1.0.20210415-85737674.tar.gz) = 130190 > > > -- Kindest regards, Tom Smyth.
shells/nsh Request update of port to reflect latest git commit
Hello, all, Chris has incorporated and improved the diffs and merged them upstream, below is a diff for pulling the latest commit from git it is compiling cleanly on amd64 6.9 current (20210414 ) without errors or warnings all the patch files in the current port can be removed also as they have been included or improved upon upstream Thanks Chris, Kurt and everyone who helped. -- Kindest regards, Tom Smyth. Index: Makefile === RCS file: /cvs/ports/shells/nsh/Makefile,v retrieving revision 1.41 diff -u -p -r1.41 Makefile --- Makefile 22 Mar 2021 17:23:22 - 1.41 +++ Makefile 16 Apr 2021 00:59:39 - @@ -1,16 +1,15 @@ # $OpenBSD: Makefile,v 1.41 2021/03/22 17:23:22 sthen Exp $ -BROKEN = needs adapting to changes in base\n -BROKEN += (again); this port is closely tied to interfaces in the base OS and really\n -BROKEN += needs an active maintainer! COMMENT = network switch style shell -DISTNAME = nsh-1.0.20201006 +DISTNAME = nsh-1.0.20210415 +#REVISION = 0 GH_ACCOUNT = yellowman GH_PROJECT = nsh -GH_COMMIT = 4b92f9124641caddcce238293919b1ec45b5a20d +GH_COMMIT = 8573767444bed331376e6d8edc9bd93bc091789d + CATEGORIES = shells net HOMEPAGE = http://www.nmedia.net/nsh/ Index: distinfo === RCS file: /cvs/ports/shells/nsh/distinfo,v retrieving revision 1.13 diff -u -p -r1.13 distinfo --- distinfo 4 Feb 2021 22:13:09 - 1.13 +++ distinfo 16 Apr 2021 00:59:39 - @@ -1,2 +1,2 @@ -SHA256 (nsh-1.0.20201006-4b92f912.tar.gz) = 4iz3xcEdK8E4I9sG51JPASuviji2O9ooO+6AI1rqQIs= -SIZE (nsh-1.0.20201006-4b92f912.tar.gz) = 130053 +SHA256 (nsh-1.0.20210415-85737674.tar.gz) = vcNGznniC4rWLD6ULyBbGKJUvUEsNg1ylenjZBvmX4A= +SIZE (nsh-1.0.20210415-85737674.tar.gz) = 130190
Re: Fwd: ports/shells/nsh-10.0.20201006p0-RC
Thanks Chris, and thanks for the "variations" I can see where you were taking a scalpel out where I had used the sledge hammer :) Appreciate you accepting and improving the patches All the best Tom Smyth On Wed, 14 Apr 2021 at 21:08, Chris Cappuccio wrote: > > I've got all of your changes (or variations thereof) in the github repository, > except for the version number change since it isn't quite time to bump yet. > > Time to work on the known issues and expand compatibilty with the many > features > added in the last 3 or 4 years :) > > Tom Smyth [tom.sm...@wirelessconnect.eu] wrote: > > Hello, > > > > Please find attached patch for nsh > > > > feedback welcome as my C is rusty, > > > > I hope this helps, > > > > details of proposed patch outlined below > > > > > > Architectures Compiled on: > > AMD64 > > > > Compile errors / warnings > > 1) warning about an unused variable do not want to delete code just yet > > 2) errors about '\0' Null pointers cleared > > 3) fixed compatibility with OpenBSD Current and tried to maintain backward > > compatibility with release (using #ifdef (March 11 commit in base > > for IFXF_INET6_NOPRIVACY depreciated and replaced with IFXF_AUTOCONF6TEMP > > 4) fixed warning about self assigned variable with (void)ch; > > > > Tested: > > Manually tested on 6.9 beta current April 11 amd64 > > > > BUGS Resolved: > > show version fixed as there was a sysctl incompatibility that > > was throwing an error when "show version" command was run > > > > Known Issues: > > sysctl commands / functions need to be updated in line with changes in base > > new interfaces to be added > > arptimeout command is not working > > > > Enhancements: > > increased the verbosity of the version displayed when running NSH > > so it is easier for the user to see the version and patch level. > > > > > > My sincere thanks to Chris Cappuccio for authoring and opensourcing NSH. > > -- Kindest regards, Tom Smyth.
Fwd: ports/shells/nsh-10.0.20201006p0-RC
Hello, Please find attached patch for nsh feedback welcome as my C is rusty, I hope this helps, details of proposed patch outlined below Architectures Compiled on: AMD64 Compile errors / warnings 1) warning about an unused variable do not want to delete code just yet 2) errors about '\0' Null pointers cleared 3) fixed compatibility with OpenBSD Current and tried to maintain backward compatibility with release (using #ifdef (March 11 commit in base for IFXF_INET6_NOPRIVACY depreciated and replaced with IFXF_AUTOCONF6TEMP 4) fixed warning about self assigned variable with (void)ch; Tested: Manually tested on 6.9 beta current April 11 amd64 BUGS Resolved: show version fixed as there was a sysctl incompatibility that was throwing an error when "show version" command was run Known Issues: sysctl commands / functions need to be updated in line with changes in base new interfaces to be added arptimeout command is not working Enhancements: increased the verbosity of the version displayed when running NSH so it is easier for the user to see the version and patch level. My sincere thanks to Chris Cappuccio for authoring and opensourcing NSH. nsh-1.0.2020106p0-RC Description: Binary data
NSH updating command options to reflect changes in base
Hello all, what is the policy for command line argument modifications, for NSH with florian@ change to base the interface config command autoconfprivacy should probably change to autoconfv6temp or should old "autoconfprivacy" be still supported for existing configs and autoconfv6temp encouraged by making it only available when an engineer enters ? in the interface config menu ? any advice / directions welcome Thanks Tom Smyth On Thu, 1 Apr 2021 at 01:41, Tom Smyth wrote: > > Hello > below is a diff for commands.c > to clear some of the compiler warnings, > > --- commands.c Tue Oct 6 01:59:33 2020 > +++ /home/tom/commands.c Thu Apr 1 01:00:16 2021 > @@ -451,7 +451,7 @@ flushcmd(int argc, char **argv) > static int > flush_line(char *line) > { > - char *argv[] = { PKILL, "-9", "-t", line, '\0' }; > + char *argv[] = { PKILL, "-9", "-t", line, NULL }; > cmdargs(PKILL, argv); > return (1); > } > @@ -1673,7 +1673,7 @@ flush_pf(char *arg) > } > > { > - char *argv[] = { x->cmd, x->arg, '\0' }; > + char *argv[] = { x->cmd, x->arg, NULL }; > cmdargs(x->cmd, argv); > } > > @@ -1720,7 +1720,7 @@ cmdrc(char rcname[FILENAME_MAX]) > if (line[0] == ' ' && line[1] == '!' && savec && savec->modh == 2) > continue; > if (line[0] == ' ') > - strlcpy(saveline, line, sizeof(line)); > + strlcpy(saveline, line, sizeof(saveline)); > makeargv(); > if (margv[0] == 0) > continue; > @@ -1876,7 +1876,7 @@ iprompt(void) > int > wr_startup(void) > { > - char *argv[] = { SAVESCRIPT, NSHRC_TEMP, '\0' }; > + char *argv[] = { SAVESCRIPT, NSHRC_TEMP, NULL }; > > if (wr_conf(NSHRC_TEMP)) > printf("%% Saving configuration\n"); > @@ -2072,7 +2072,7 @@ pr_kernel(int argc, char **argv) > void > pf_stats(void) > { > - char *argv[] = { PFCTL, "-sinfo", '\0' }; > + char *argv[] = { PFCTL, "-sinfo", NULL }; > > printf("%% pf statistics:\n"); > > @@ -2085,7 +2085,7 @@ pr_prot1(int argc, char **argv) > { > struct prot1 *x; > struct prot *prot; > - char *args[NOPTFILL] = { NULL, NULL, NULL, NULL, NULL, NULL, '\0' }; > + char *args[NOPTFILL] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; > char **fillargs; > char prefix[64]; > > @@ -2150,7 +2150,7 @@ step_optreq(char **xargs, char **args, int argc, char > /* copy xargs to args, replace OPT/REQ args with argv past skip */ > for (i = 0; i < NOPTFILL - 2; i++) { > if (xargs[i] == NULL) { > - args[i] = '\0'; > + args[i] = NULL; > if (i > 1) > /* > * all **args passed must have at least two arguments > @@ -2169,7 +2169,7 @@ step_optreq(char **xargs, char **args, int argc, char > printf("%% Missing required argument\n"); > return NULL; > } else { > - args[i] = '\0'; > + args[i] = NULL; > break; > } > } else { -- Kindest regards, Tom Smyth.
nsh commands.c diff to clear some compiler warnings
Hello below is a diff for commands.c to clear some of the compiler warnings, --- commands.c Tue Oct 6 01:59:33 2020 +++ /home/tom/commands.c Thu Apr 1 01:00:16 2021 @@ -451,7 +451,7 @@ flushcmd(int argc, char **argv) static int flush_line(char *line) { - char *argv[] = { PKILL, "-9", "-t", line, '\0' }; + char *argv[] = { PKILL, "-9", "-t", line, NULL }; cmdargs(PKILL, argv); return (1); } @@ -1673,7 +1673,7 @@ flush_pf(char *arg) } { - char *argv[] = { x->cmd, x->arg, '\0' }; + char *argv[] = { x->cmd, x->arg, NULL }; cmdargs(x->cmd, argv); } @@ -1720,7 +1720,7 @@ cmdrc(char rcname[FILENAME_MAX]) if (line[0] == ' ' && line[1] == '!' && savec && savec->modh == 2) continue; if (line[0] == ' ') - strlcpy(saveline, line, sizeof(line)); + strlcpy(saveline, line, sizeof(saveline)); makeargv(); if (margv[0] == 0) continue; @@ -1876,7 +1876,7 @@ iprompt(void) int wr_startup(void) { - char *argv[] = { SAVESCRIPT, NSHRC_TEMP, '\0' }; + char *argv[] = { SAVESCRIPT, NSHRC_TEMP, NULL }; if (wr_conf(NSHRC_TEMP)) printf("%% Saving configuration\n"); @@ -2072,7 +2072,7 @@ pr_kernel(int argc, char **argv) void pf_stats(void) { - char *argv[] = { PFCTL, "-sinfo", '\0' }; + char *argv[] = { PFCTL, "-sinfo", NULL }; printf("%% pf statistics:\n"); @@ -2085,7 +2085,7 @@ pr_prot1(int argc, char **argv) { struct prot1 *x; struct prot *prot; - char *args[NOPTFILL] = { NULL, NULL, NULL, NULL, NULL, NULL, '\0' }; + char *args[NOPTFILL] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; char **fillargs; char prefix[64]; @@ -2150,7 +2150,7 @@ step_optreq(char **xargs, char **args, int argc, char /* copy xargs to args, replace OPT/REQ args with argv past skip */ for (i = 0; i < NOPTFILL - 2; i++) { if (xargs[i] == NULL) { - args[i] = '\0'; + args[i] = NULL; if (i > 1) /* * all **args passed must have at least two arguments @@ -2169,7 +2169,7 @@ step_optreq(char **xargs, char **args, int argc, char printf("%% Missing required argument\n"); return NULL; } else { - args[i] = '\0'; + args[i] = NULL; break; } } else { --- commands.c Tue Oct 6 01:59:33 2020 +++ /home/tom/commands.c Thu Apr 1 01:00:16 2021 @@ -451,7 +451,7 @@ flushcmd(int argc, char **argv) static int flush_line(char *line) { - char *argv[] = { PKILL, "-9", "-t", line, '\0' }; + char *argv[] = { PKILL, "-9", "-t", line, NULL }; cmdargs(PKILL, argv); return (1); } @@ -1673,7 +1673,7 @@ flush_pf(char *arg) } { - char *argv[] = { x->cmd, x->arg, '\0' }; + char *argv[] = { x->cmd, x->arg, NULL }; cmdargs(x->cmd, argv); } @@ -1720,7 +1720,7 @@ cmdrc(char rcname[FILENAME_MAX]) if (line[0] == ' ' && line[1] == '!' && savec && savec->modh == 2) continue; if (line[0] == ' ') - strlcpy(saveline, line, sizeof(line)); + strlcpy(saveline, line, sizeof(saveline)); makeargv(); if (margv[0] == 0) continue; @@ -1876,7 +1876,7 @@ iprompt(void) int wr_startup(void) { - char *argv[] = { SAVESCRIPT, NSHRC_TEMP, '\0' }; + char *argv[] = { SAVESCRIPT, NSHRC_TEMP, NULL }; if (wr_conf(NSHRC_TEMP)) printf("%% Saving configuration\n"); @@ -2072,7 +2072,7 @@ pr_kernel(int argc, char **argv) void pf_stats(void) { - char *argv[] = { PFCTL, "-sinfo", '\0' }; + char *argv[] = { PFCTL, "-sinfo", NULL }; printf("%% pf statistics:\n"); @@ -2085,7 +2085,7 @@ pr_prot1(int argc, char **argv) { struct prot1 *x; struct prot *prot; - char *args[NOPTFILL] = { NULL, NULL, NULL, NULL, NULL, NULL, '\0' }; + char *args[NOPTFILL] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; char **fillargs; char prefix[64]; @@ -2150,7 +2150,7 @@ step_optreq(char **xargs, char **args, int argc, char /* copy xargs to args, replace OPT/REQ args with argv past skip */ for (i = 0; i < NOPTFILL - 2; i++) { if (xargs[i] == NULL) { - args[i] = '\0'; + args[i] = NULL; if (i > 1) /* * all **args passed must have at least two arguments @@ -2169,7 +2169,7 @@ step_optreq(char **xargs, char **args, int argc, char printf("%% Missing required argument\n"); return NULL; } else { -args[i] = '\0'; +args[i] = NULL; break; } } else {
Re: shells/nsh
On Mon, 29 Mar 2021 at 02:18, Chris Cappuccio wrote: > Marc Espie [es...@nerim.net] wrote: > > I've looked a bit at this code. > > > > I'm on the fence between marking it as BROKEN and give Chris a chance to > > fix the code, or downright removing it. > > > > Specifically, it's currently broken thanks to recent changes to if.h, > > but the code warns all over the place. There seems to be a misconception > > that '\0' would be a NULL pointer (it's not, it's a character constant). > > > > Well it was to mark the end of arguments in constructed argument lists, > but maybe just NULL would be fine. > in commands.c changing line 454 and swapping '\0' to a NULL got rid of the complier warning for me changing 1676and swapping '\0' to a NULL got rid of the complier warning for me Thanks Tom Smyth
Re: shells/nsh
Hi All, as a humble nsh user, I would like to have a go at trying to help with this port, we used it in the past and when we reported bugs Chris had resolved them, I would humbly ask that it not be removed, and Im willing to (try) to see if I can work through nsh bugs the idea of nsh is brilliant ... PS im interested in trying to help out with fastnetmon port also Thanks Tom Smyth On Thu, 25 Mar 2021 at 09:12, Marc Espie wrote: > I've looked a bit at this code. > > I'm on the fence between marking it as BROKEN and give Chris a chance to > fix the code, or downright removing it. > > Specifically, it's currently broken thanks to recent changes to if.h, > but the code warns all over the place. There seems to be a misconception > that '\0' would be a NULL pointer (it's not, it's a character constant). > > Looking a bit deeper, clang finds at least one actual bug and some > seriously confused code (strlcpy with size from the src instead of the > dest, > which is kind-of okay in this case because it is the same size, but still). > > I don't know who actually uses nsh, but I wouldn't recommend it in its > present state... After all, you're running code as root, it should at > least > keep the warnings down... and it's not like we moved to clang two days > ago. > > > -- > Marc > > -- Kindest regards, Tom Smyth.
Re: fastnetmon on OpenBSDamd64 tends to stop and output in insecurity mails
Hi Antoine, Ill give that a try I'm just trying to work out what it does (pardon my ignorance)... Thanks, Tom Smyth On Wed, 17 Feb 2021 at 17:57, Antoine Jacoutot wrote: > > On Wed, Feb 17, 2021 at 04:37:00PM +0000, Tom Smyth wrote: > > Hello, > > > > I have noticed fastnetmon on OpenBSDamd64 can stop after a couple of > > weeks Im trying to get more info, > > but there doesnt seem to be anyhting in /var/log/daemon or /var/log/messages > > > > in an earlier release I had modified /etc/rc.d/fastnetmon (because of > > a directory that was not being created at start up (which has been > > since corrected by Stuart@ (thanks) but I think the mg created > > backup fastnetmon~ may have caused me issues then > > > > I noticed the following in insecurity > > that Services that should be running but aren't: > > /usr/sbin/rcctl: ${cached_svc_is_special_fastnetmon~}: bad substitution > > /usr/sbin/rcctl: set: cached_svc_is_special_fastnetmon~: is not an > > identifier > > /usr/sbin/rcctl: ${cached_svc_is_base_fastnetmon~}: bad substitution > > /usr/sbin/rcctl: set: cached_svc_is_base_fastnetmon~: is not an identifier > > /usr/sbin/rcctl: ${cached_svc_is_meta_fastnetmon~}: bad substitution > > /usr/sbin/rcctl: set: cached_svc_is_meta_fastnetmon~: is not an identifier > > > > im presuming this is because /etc/rc.d/fastnetmon~ backup file was > > in /etc/rc.d/fastnemon > > > > as anyone come across this issue before ? > > > > does anyone have an idea why the fastnetmon would suddenly stop > > working (the machine had plenty of ram, (perhaps newsyslog) ? > > anyway I have deleted /etc/rc.d/fastnetmon~ and we will take it from there > > > > Im running release + syspatch and have done a pkg_add -u > > Hi Tom. > > This doesn't really belong to ports but could you try this: > > > Index: rcctl.sh > === > RCS file: /cvs/src/usr.sbin/rcctl/rcctl.sh,v > retrieving revision 1.108 > diff -u -p -r1.108 rcctl.sh > --- rcctl.sh31 Mar 2020 08:03:44 - 1.108 > +++ rcctl.sh17 Feb 2021 17:56:19 - > @@ -54,7 +54,7 @@ ls_rcscripts() > > cd /etc/rc.d && set -- * > for _s; do > - [[ ${_s} = *.* ]] && continue > + [[ ${_s} == +([[:alnum:]_]) ]] || continue > [ ! -d "${_s}" ] && echo "${_s}" > done > } > > -- Kindest regards, Tom Smyth.
fastnetmon on OpenBSDamd64 tends to stop and output in insecurity mails
v 5 function 0 "Qumranet Virtio SCSI" rev 0x00 vioscsi0 at virtio0: qsize 128 scsibus2 at vioscsi0: 255 targets sd0 at scsibus2 targ 0 lun 0: sd0: 32768MB, 512 bytes/sector, 67108864 sectors, thin virtio0: msix shared virtio1 at pci0 dev 18 function 0 "Qumranet Virtio Network" rev 0x00 vio0 at virtio1: address ba:7f:a5:2a:a7:99 virtio1: msix shared virtio2 at pci0 dev 19 function 0 "Qumranet Virtio Network" rev 0x00 vio1 at virtio2: address ce:a4:14:79:b6:de virtio2: msix shared ppb0 at pci0 dev 30 function 0 "Red Hat Qemu PCI-PCI" rev 0x00 pci1 at ppb0 bus 1 ppb1 at pci0 dev 31 function 0 "Red Hat Qemu PCI-PCI" rev 0x00 pci2 at ppb1 bus 2 isa0 at pcib0 isadma0 at isa0 fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard, using wsdisplay0 pms0 at pckbc0 (aux slot) wsmouse0 at pms0 mux 0 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 addr 1 uhidev0 at uhub0 port 1 configuration 1 interface 0 "QEMU QEMU USB Tablet" rev 2.00/0.00 addr 2 uhidev0: iclass 3/0 ums0 at uhidev0: 3 buttons, Z dir wsmouse1 at ums0 mux 0 vscsi0 at root scsibus3 at vscsi0: 256 targets softraid0 at root scsibus4 at softraid0: 256 targets root on sd0a (506c166d884037c5.a) swap on sd0b dump on sd0b fd0 at fdc0 drive 1: density unknown -- Kindest regards, Tom Smyth.
smokeping as an fcgi with httpd
Hello the following diff is for the smokeping readme to assist users in getting smokeping as an fcgi with httpd while trying to maintain the chroot jail for the smokeping webpage... if any one has comments on the approach i have taken or if it can be done more securely. my approach was to try to run the smokeping web front end in a similar fashion to bgplg comments / corrections welcome diff /usr/local/share/doc/pkg-readmes/smokeping /usr/local/share/doc/pkg-readmes/smokeping-tom 24a25,26 > > 45a48,89 > > Smokeping as an fcgi with OpenBSD's httpd > == > The following is an example configuration of httpd.conf so > that it will run smokping fcgi > > server "your.ip.address." { > listen on * port 80 > location "/smokeping/smokeping.fcgi*" { > fastcgi socket "/run/smokeping.sock" > root "/" > } > > } > > # the following creates the directory for smokeping datafiles > mkdir /var/db/smokeping > chown _smokeping /var/db/smokeping > > the following copies the /etc/smokeping/config so that the config > is available in the chrootjail > > mkdir -p /var/www/etc/smokeping > cp /etc/smokeping/config /var/www/etc/smokeping > rm /etc/smokeping/config > ln -s /var/www/etc/smokeping /etc/smokeping/config > cp /usr/local/bin/smokeping_cgi /var/www/cgi-bin/ > chmod 0555 /var/www/cgi-bin/smokeping_cgi > > > #edit smokeping.fcgi to call the fcgi in cgi-bin > echo #!/bin/sh >/var/www/htdocs/smokeping/smokeping.fcgi > echo exec /cgi-bin/smokeping_cgi /etc/smokeping/config > >>/var/www/htdocs/smokeping/smokeping.fcgi > > rcctl enable smokeping > rcctl enable smokeping_fcgi > rcctl enable httpd > > rcctl start smokeping > rcctl start smokeping_fcgi > rcctl start httpd > -- Kindest regards, Tom Smyth.
Re: fastnetmon on OpenBSD 6.6 amd64 /var/run/fastnemon missing after reboot
just to clarify Stuarts diff worked, and Jerimies Diff with Jaspers addition worked fine also. sorry I was trigger happy with the send earlier. On Sun, 10 May 2020 at 15:04, Tom Smyth wrote: > > Hello all, > > Tried manually with > > install -d -m 0750 -o ${daemon_user} -g ${daemon_user} /var/run/fastnetmon > > I was wondering about the world writable pid file .. I was wondering > why it was needed... > > appreciate all your time and help > > thanks again > Tom Smyth > > On Sun, 10 May 2020 at 14:48, Klemens Nanni wrote: > > > > On Sun, May 10, 2020 at 03:42:02PM +0200, Jasper Lievisse Adriaanse wrote: > > > Using 0750 sounds sane to me, OK with me with that bit updated. > > Same here, OK kn. > > > > -- > Kindest regards, > Tom Smyth. -- Kindest regards, Tom Smyth.
Re: fastnetmon on OpenBSD 6.6 amd64 /var/run/fastnemon missing after reboot
Hello all, Tried manually with install -d -m 0750 -o ${daemon_user} -g ${daemon_user} /var/run/fastnetmon I was wondering about the world writable pid file .. I was wondering why it was needed... appreciate all your time and help thanks again Tom Smyth On Sun, 10 May 2020 at 14:48, Klemens Nanni wrote: > > On Sun, May 10, 2020 at 03:42:02PM +0200, Jasper Lievisse Adriaanse wrote: > > Using 0750 sounds sane to me, OK with me with that bit updated. > Same here, OK kn. -- Kindest regards, Tom Smyth.
Re: fastnetmon on OpenBSD 6.6 amd64 /var/run/fastnemon missing after reboot
Hello Stuart, Jasper, all, Tried that (manually) by adding the diff to my /etc/rc.d/fasnetmon on my install (and I learned something new about OpenBSD rcctl in the process ) Thanks Stuart, Jasper and all appreciate your time and help On Sun, 10 May 2020 at 14:09, Stuart Henderson wrote: > > On 2020/05/10 12:58, Tom Smyth wrote: > > Hello, porters > > > > I was working on fastnetmon on production system > > rcctl starts stops and restarts fastnetmon just fine > > but I noticed when I rebooted the box > > that if I reboot the box fastnetmon wont restart due to a missing > > .var/run/fastnetmon directory. > > > > when I re-create the directory > > mkdir /var/run/fastnemon > > chown _fastnetmon /var/run/fastnetmon > > > > rcctl starts, stops and restarts fastnetmon just fine once that > > directory is re-created and the permissions set... > > > > -- > > Kindest regards, > > Tom Smyth. > > > > +cc ${MAINTAINER} > > The rc script should be changed to do that (and drop the PLIST entry). > > Index: Makefile > === > RCS file: /cvs/ports/net/fastnetmon/Makefile,v > retrieving revision 1.8 > diff -u -p -r1.8 Makefile > --- Makefile26 Apr 2020 20:18:58 - 1.8 > +++ Makefile10 May 2020 13:08:14 - > @@ -5,7 +5,7 @@ COMMENT = DDoS detector with multiple p > GH_ACCOUNT = pavel-odintsov > GH_PROJECT = fastnetmon > GH_TAGNAME = v1.1.4 > -REVISION = 0 > +REVISION = 1 > > HOMEPAGE = https://fastnetmon.com/guides/ > > Index: pkg/PLIST > === > RCS file: /cvs/ports/net/fastnetmon/pkg/PLIST,v > retrieving revision 1.2 > diff -u -p -r1.2 PLIST > --- pkg/PLIST 4 Sep 2018 12:46:17 - 1.2 > +++ pkg/PLIST 10 May 2020 13:08:14 - > @@ -28,6 +28,5 @@ share/examples/fastnetmon/reformat_code_ > share/examples/fastnetmon/reset_redis_stats > @owner _fastnetmon > @group _fastnetmon > -@sample /var/run/fastnetmon/ > @sample /var/log/fastnetmon/ > @sample /var/log/fastnetmon_attacks/ > Index: pkg/fastnetmon.rc > === > RCS file: /cvs/ports/net/fastnetmon/pkg/fastnetmon.rc,v > retrieving revision 1.2 > diff -u -p -r1.2 fastnetmon.rc > --- pkg/fastnetmon.rc 11 Jul 2018 15:24:56 - 1.2 > +++ pkg/fastnetmon.rc 10 May 2020 13:08:14 - > @@ -7,4 +7,8 @@ daemon_user="_fastnetmon" > > . /etc/rc.d/rc.subr > > +rc_pre() { > + install -d -o ${daemon_user} /var/run/fastnetmon > +} > + > rc_cmd $1 > > -- Kindest regards, Tom Smyth.
fastnetmon on OpenBSD 6.6 amd64 /var/run/fastnemon missing after reboot
Hello, porters I was working on fastnetmon on production system rcctl starts stops and restarts fastnetmon just fine but I noticed when I rebooted the box that if I reboot the box fastnetmon wont restart due to a missing .var/run/fastnetmon directory. when I re-create the directory mkdir /var/run/fastnemon chown _fastnetmon /var/run/fastnetmon rcctl starts, stops and restarts fastnetmon just fine once that directory is re-created and the permissions set... -- Kindest regards, Tom Smyth.