Re: spamDB - blacklist mode

2020-03-02 Thread Jason McIntyre
On Tue, Mar 03, 2020 at 04:46:11AM +, s...@skolma.com wrote:
> Boudewijn,
> Thank you for your reply, and clarification.
> 
> The man pages for SPAMD and SPAMDB do not directly state this relationship / 
> behavior, and therefore I had made the assumption that spamd would capture 
> and feed all entries into the spamdb, in all operational modes.
> ..hopefully i have not overlooked vital documentation.
> 

hi.

there's a few parts to spamd, and i think it can be initially confusing
until you work out how it's put together. but there has been effort put
into the spamd(8) page to make it clear what happens by default, and how
that differs in blacklisting mode:

SPAMD(8) System Manager's Manual SPAMD(8)

...
 When spamd is run in default mode, it will greylist
 connections from new hosts.  Depending on its configuration,
 it may choose to blacklist the host or, if the checks
 described below are met, eventually whitelist it.  When
 spamd is run in blacklist-only mode, using the -b flag, it
 will consult a pre-defined set of blacklist addresses to
 decide whether to tarpit the host or not.

...
 When run in default mode, connections receive the pleasantly
 innocuous temporary failure of:

 451 Temporary failure, please try again later.

 This happens in the SMTP dialogue immediately after the DATA
 command is received from the client.  spamd will use the db
 file in /var/db/spamd to track these connections to spamd by
 connecting IP address, HELO/EHLO, envelope-from, and
 envelope-to, or tuple for short.  Hosts which connect but do
 not attempt to deliver mail will not generate a tuple and
 always be ignored.
...
 spamd-setup(8) should be run periodically by cron(8) to
 update the blacklists configured in spamd.conf(5).  Use
 crontab(1) to uncomment the entry in root's crontab.  When
 run in blacklist-only mode, the -b flag should be specified.

...
BLACKLIST-ONLY MODE
 When running in default mode, the pf.conf(5) rules described
 above are sufficient.  However when running in blacklist-
 only mode, a slightly modified pf.conf(5) ruleset is
 required, diverting any addresses found in the  table
 to spamd.  Any other addresses are passed to the real MTA.
...
 /var/db/spamd Greylisting database.

i hope it's clear that /var/db/spamdb is used in default mode, but not in
blacklist-only mode.

jmc



Re: 6.6, X and braswell

2020-03-02 Thread Martin Ziemer
On Mon, Mar 02, 2020 at 09:45:26PM +0100, whistlez...@riseup.net wrote:
> Hi,
> I have the following bug:
> https://marc.info/?t=15636262941&r=1&w=2
> now I'm on 6.5 and it works, but maybe one month ago I tried to install
> 6.6 and I found the bug.
> Anyone know if it was been resolved ?
> Thanks 
> Whistlez
> 
The bug still exists. 

Using a braswell based system as daily driver myself, I disable
inteldrm in the kernel after every update. 
(Works for me as mostly console user, but still no suspend/resume)



Re: spamDB - blacklist mode

2020-03-02 Thread sub
Boudewijn,
Thank you for your reply, and clarification.

The man pages for SPAMD and SPAMDB do not directly state this relationship / 
behavior, and therefore I had made the assumption that spamd would capture and 
feed all entries into the spamdb, in all operational modes.
..hopefully i have not overlooked vital documentation.

in any event, Standard logging continues to capture as required/expected:
Mar  3 00:32:54 myserver spamd[3205]: xx.xx.xx.xx: disconnected after 9 seconds.
Mar  3 00:32:59 myserver spamd[3205]: xx.xx.xx.xx: disconnected after 7 seconds.
Mar  3 00:33:05 myserver spamd[3205]: xx.xx.xx.xx: disconnected after 7 seconds.
Mar  3 00:33:11 myserver spamd[3205]: xx.xx.xx.xx: disconnected after 7 seconds.
Mar  3 00:35:22 myserver spamd[3205]: xx.xx.xx.xx: disconnected after 132 
seconds.

thank you all.
-sub

> Op Thu, 27 Feb 2020 00:19:59 +0100 schreef :
>
>> Questions:
>
>> Does the spamDB play a role at all in pure Black listing mode ?
>
> No, that DB is used for bookkeeping and decision-making. In blacklist-only
>
> mode, there is none of that.
>
>> Does the spamDB only get created/configured when running in Normal/Grey
>
>> mode ?
>
> It should.
>
>> Does is require Manual creation ?
>
> No.
>
>> Issue:
>
>> When Attempting to review SPAMDB entries i get an error:
>
>> spamdb: cannot open /var/db/spamd for reading: No such file or directory
>
> What kind of entries did you expect to find?


Re: upgrade i386 kernel to amd64

2020-03-02 Thread Nick Holland
On 2020-03-02 18:14, Justin Muir wrote:
> Hello all,
> 
> Running GENERIC i386 kernel on on a 64-bit amd machine. Just wondering
> whether an upgrade amd64 is warranted. Any opinions?

yes.
At this point, most OpenBSD development starts on amd64 systems, then
moves to other platforms.  Plus, the AMD64 platform offers some magic
tricks that help improve security, and I do believe generally better
package support.

amd64 systems have been around for over 15 years.  i386 is really
almost a "legacy" platform now.  If you gotta use it, ok...but otherwise,
no.

The only reason I can think of to run i386 code on an amd64 system is if
your i386 system failed and you moved the disk to an amd64 capable
system.  
 
> If so, just upgrade system? Re-compile kernel? Other options?

DO NOT UPGRADE.
No idea what you are even dreaming of by "recompiling the kernel",
that makes the bad idea of an upgrade look good (it isn't).

Reinstall from scratch.  Good time to look at how you used disk and
partition better this time.

Nick.



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Marc Chantreux
> I have no idea what the "much more" refers to.

all the things i can do with vim are very useful while reading a man
page.

* a file is mentionned ? use gf to jump in it
* a command is provided? edit it so it fit your system and run it with
  !!
* want to add something to your notes? ranges to the rescue:
.,'aw >> ~/notes
* and so on ...

actually the more i know vim, the less i use the shell because i never
had to copy/paste anymore.

an example: to understand the tagging functionality,
i wanted to read the man page from my clone of the openbsd repo.

i have a command L defined like this:

command -range L ,!xargs locate

so i typed this on a line

*openbsd*less.1

then i use command :L to get

/home/mc/src/vendor/openbsd/usr.bin/less/less.1

so i typed !!xargs man

and i get the content.

this is the kind of shortcuts i use all the time.

> The main effect is to lose tagging functionality.
> default pager, you cannot use the :t functionality to move to the
> place where a word is defined.

vim has a very good support of file navigation using ctags. however
i don't know what to ctag on and what should be the usage from man.
is this the ability to navigate into the manpages?

> Yikes. I had no idea what either of these are doing and had to
> try them out.  vi(1) contains so much bloat that is never really
> needed and doesn't belong in a text editor at all.

i really consider vim as a multipurpose interactive tui, not an editor.
i understand your concern about bloated softwares but i come from a
world where colleagues are editing java and python code using ms code
(editor based on an html render) to create web applications. so vim
is not that bloated.

also: reading/writing from/to pipes/buffer gave me a lot of power and
spare me the time to find, test and learn new tools to achieve the same.

i have only one multipurpose tui i learned and tuned since the last millenium
that helps me to edit mails (with spelling), code (with quickfix mode
and so on) and some macros i wrote 20 years ago still serves me today.

> > feature in openbsd vi. the linux version
> > 
> > map K yw:E /tmp/vi.keyword.$$p!!xargs man
> 
> You don't say what that is supposed to do.

sorry.

map K yw:E /tmp/vi.keyword.$$p!!xargs man

should be read:

map K # whenever i press K in normal mode
yw# yank the word
:E /tmp/vi.keyword.$$ # edit /tmp/vi.keyword.$$ in a new window
p # put the word you just pasted in the buffer
!!xargs man   # filter the current line with xargs man

as a result: if the cursor is on the r of the word rctrl and i press
K, the manual appears in a new window

> Under Debian Jessie, if i start "vim", then type
>   :map K yw:E /tmp/vi.keyword.$$p!!xargs man   
>   als   
>   K   

>   E132: Function call depth is higher than 'maxfuncdepth'
>   Press ENTER or type command to continue

you can call a map from a map and it seems something like this happens
in your case. vim mappings can avoid recursions: use noremap instead of
map.

however: K is built-in in vim and is much more powerful than my poor
macro:

* it relies on the 'isk' variable so you can set which chars can be a
  part of a command
* it relies on 'kp' so you can choose an alternative to man to open
  the doc (perldoc is useful when editing perl code)
* the cursor don't need to be on the very first char of the command:
  anywhere on the command is fine.

> I also tried the same with OpenBSD vi(1) and it resulted in
> 
>   Usage: e[dit][!] [+cmd] [file].
> 
> So, no idea what you are trying to do.

you have to be on the first letter of the command so instead of

als   
K   

try

als   
b
K   


> In 2014, i already wrote a patch to do that because the question
> came up repeatedly.  But demand wasn't that high after all, so i
> never committed it.  Now, i updated the patch to -current, see
> below.

i'll try to read this code as soon as possible.

> On the one hand, the UNIX phlosophy is to have each tool do one
> thing well, then use pipes to connect tools as needed.
> arguably, you maybe shouldn't need another tool to just revert
> something that the first tool does.
> Why would *not* adding backspace
> formatting require a pipe to another program, rather than not adding
> it in the first place?

can't reply on that: out of my skillset :)

anyway: thank you very much for taking time help me.
regards
marc



Re: upgrade i386 kernel to amd64

2020-03-02 Thread Bryan Irvine
backup your important files, format and re-install.

On Mon, Mar 2, 2020 at 5:16 PM Justin Muir  wrote:

> Hello all,
>
> Running GENERIC i386 kernel on on a 64-bit amd machine. Just wondering
> whether an upgrade amd64 is warranted. Any opinions?
>
> If so, just upgrade system? Re-compile kernel? Other options?
>
>
> tia!
>
> J
>


upgrade i386 kernel to amd64

2020-03-02 Thread Justin Muir
Hello all,

Running GENERIC i386 kernel on on a 64-bit amd machine. Just wondering
whether an upgrade amd64 is warranted. Any opinions?

If so, just upgrade system? Re-compile kernel? Other options?


tia!

J


RE: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread zeurkous
Haai,

"Ingo Schwarze"  wrote:
>[about a flag to make mandoc(1) omit backspace stuff:]
> In 2014, i already wrote a patch to do that because the question
> came up repeatedly. But demand wasn't that high after all, so i
> never committed it. Now, i updated the patch to -current, see
> below.

Medoesn't run -current, so meprolly can't test it, but...

> On the one hand, the UNIX phlosophy is to have each tool do one
> thing well, then use pipes to connect tools as needed. Then again,
> arguably, you maybe shouldn't need another tool to just revert
> something that the first tool does. Why would *not* adding backspace
> formatting require a pipe to another program, rather than not adding
> it in the first place?
>
> Also, the patch that would be required is very small and straightforward.
>
> So, what do people think? Should i test the patch below in more
> depth and commit it? Or do people consider this bloat?

While mecan see much merit in both sides of the argument, me'd say:
can't hurt, will help people, go!

> Yours,
>  Ingo

Baai,

--zeurkous.

-- 
Friggin' Machines!



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Marc Chantreux
dear Ingo,

> Absolutely.  Using web searches for software documentation is an
> awkward and error-prone crutch that should be avoided for many
> reasons.  For OpenBSD documentation, it is never needed.

Actually, the quality of the manpages was one of the reasons i tried
openbsd and one of the reasons i emphasize when i try to sell openbsd.

> If careful scrutiny of an OpenBSD manual page leaves the impression
> that information may be missing from the page, asking on misc@ is
> a good idea and often results in an improvement of the manual page.

reading both man pages and answers on mailing list makes me aware of
other options, features, alternative ways to do things and think about
the problems. this is so much enjoyable than copy pasting from a top
rated stackoverflow answer.

> Only for low-quality software, searching the web may occasionally
> be needed.

so true. thanks

marc



6.6, X and braswell

2020-03-02 Thread whistlez-ml
Hi,
I have the following bug:
https://marc.info/?t=15636262941&r=1&w=2
now I'm on 6.5 and it works, but maybe one month ago I tried to install
6.6 and I found the bug.
Anyone know if it was been resolved ?
Thanks 
Whistlez



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Hiltjo Posthuma
On Mon, Mar 02, 2020 at 06:25:47PM +0100, Ingo Schwarze wrote:
> Hi,
> 
> Marc Chantreux wrote on Mon, Mar 02, 2020 at 11:49:31AM +0100:
> 
> > coming from linux, i'm used to read manpages
> > in a vi buffer so i can do much more than
> > reading the content.
> 
> I have no idea what the "much more" refers to.  The main effect is to
> lose tagging functionality.  That is, compared to man(1) with the
> default pager, you cannot use the :t functionality to move to the
> place where a word is defined.
> 
> > i basically use
> > 
> > :r !man ls
> > or
> > !!sh (when the line content is "man ls")
> 
> Yikes.  I had no idea what either of these are doing and had to
> try them out.  vi(1) contains so much bloat that is never really
> needed and doesn't belong in a text editor at all.
> 
> > under openbsd, it seems man doesn't if stdout
> > is a tty.
> 
> You mean, man(1) doesn't *imply col -b* if stdout is *not* a tty?
> 
> > i digged the man manual a little bit
> > without finding a solution so i worked the
> > things around:
> > 
> > :r !man ls|fmt
> 
> As others said, the normal way to strip backspace formatting is
> 
>$ man ls | col -b
> 
> It is documented in man(1) below the -c option and below EXAMPLES,
> and in mandoc(1) below "ASCII Output":
> 
>   https://man.openbsd.org/man.1#c
>   https://man.openbsd.org/man.1#EXAMPLES
>   https://man.openbsd.org/mandoc.1#ASCII_Output
> 
> You find such stuff as follows:
> 
>$ man -k 'Xr=col(1)'
>   man(1) - display manual pages
>   mandoc(1) - format manual pages
> 
> The advantage of col(1) over fmt(1) is that it is guaranteed to not
> mess up line breaks.
> 
> > now i would like a poor version of keyword
> > feature in openbsd vi. the linux version
> > 
> > map K yw:E /tmp/vi.keyword.$$p!!xargs man
> 
> You don't say what that is supposed to do.
> 
> Under Debian Jessie, if i start "vim", then type
> 
>   :map K yw:E /tmp/vi.keyword.$$p!!xargs man   
>   als   
>   K   
> 
> i get:
> 
>   Error detected while processing function 
> netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore:
>   line   30:
>   E132: Function call depth is higher than 'maxfuncdepth'
>   Press ENTER or type command to continue
> 
> That doesn't seem useful to me.
> 
> I also tried the same with OpenBSD vi(1) and it resulted in
> 
>   Usage: e[dit][!] [+cmd] [file].
> 
> So, no idea what you are trying to do.
> 
> > becomes
> > 
> > map K yw:E /tmp/vi.keyword.$$p!!xargs -IX sh -c 'man X|fmt'
> > 
> > which doesn't work as | separates 2 vi commands.
> > 
> > i really would like to know one or the two of these:
> > 
> > * is there a way to ask man to deliver pure (non-formatted) text ?
> 
> In 2014, i already wrote a patch to do that because the question
> came up repeatedly.  But demand wasn't that high after all, so i
> never committed it.  Now, i updated the patch to -current, see
> below.
> 
> On the one hand, the UNIX phlosophy is to have each tool do one
> thing well, then use pipes to connect tools as needed.  Then again,
> arguably, you maybe shouldn't need another tool to just revert
> something that the first tool does.  Why would *not* adding backspace
> formatting require a pipe to another program, rather than not adding
> it in the first place?
> 
> Also, the patch that would be required is very small and straightforward.
> 
> So, what do people think?  Should i test the patch below in more
> depth and commit it?  Or do people consider this bloat?
> 
> Yours,
>   Ingo
> 
> 
> Index: main.c
> 

simple script to merge faq files in a single html (was Re: Web documentation available offline by default?)

2020-03-02 Thread Vincenzo Nicosia
Please find attached a preliminary rough shell script that does the
job for the faq[0-9]+.html files, keeping track of anchors
appropriately. It is missing pf, ports, and other files, but it's a
starting point.

Disclaimer: this is unofficial stuff and I am not asking for this
script to be supported by OpenBSD or included in the release
workflow. I will probably put the script in my git repo, just in case
somebody wants to use it.

Comments are welcome.

HTH


faq_local.sh
Description: Bourne shell script


Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Ingo Schwarze
Hi Marc,

Marc Chantreux wrote on Mon, Mar 02, 2020 at 07:07:37PM +0100:
> On Mon, Mar 02, 2020 at 12:06:42PM -0500, Raul Miller wrote:

>> Alternatively, have you tried using any web searches on this topic?

> i have to admit i try to avoid the web for many reasons so i try to
> stick to manpages, FAQ, mailing list archives.

Absolutely.  Using web searches for software documentation is an
awkward and error-prone crutch that should be avoided for many
reasons.  For OpenBSD documentation, it is never needed.

If careful scrutiny of an OpenBSD manual page leaves the impression
that information may be missing from the page, asking on misc@ is
a good idea and often results in an improvement of the manual page.

Only for low-quality software, searching the web may occasionally
be needed.

Yours,
  Ingo



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Marc Chantreux
hello,

On Mon, Mar 02, 2020 at 12:06:42PM -0500, Raul Miller wrote:
> Have you looked at:
>   man col
> ?

how can you come to the point to read the manpage of a command
that doesn't seems to be related to your problem (i was searching
something around the man input so i tried troff, mandoc, man, ...).

Reading from David, i thought col was mentionned in the man manpage.
I just read from a recent source of man.1 and realized my openbsd is
just too old. at the line 352:

.Dl $ man -T ascii -O width=65 pledge | col -b

> And, for that matter, have you looked at
>man col | cat -vet | less

well ... my idea was to remove noise. not add more.

> Alternatively, have you tried using any web searches on this topic?

i have to admit i try to avoid the web for many reasons so i try to
stick to manpages, FAQ, mailing list archives.

for the openbsd one, i use

https://marc.info/?l=openbsd-misc

thanks for helping.

marc



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Christian Weisgerber
On 2020-03-02, Marc Chantreux  wrote:

> i felt dumb reading this as i gave a try to the mandoc man. but i just
> double checked:
>
> man mandoc|col -b|grep -w col
>
> gives me nothing.

$ man mandoc|col -b|grep -w col
 to col(1) -b instead.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Ingo Schwarze
Hi,

Marc Chantreux wrote on Mon, Mar 02, 2020 at 11:49:31AM +0100:

> coming from linux, i'm used to read manpages
> in a vi buffer so i can do much more than
> reading the content.

I have no idea what the "much more" refers to.  The main effect is to
lose tagging functionality.  That is, compared to man(1) with the
default pager, you cannot use the :t functionality to move to the
place where a word is defined.

> i basically use
> 
> :r !man ls
> or
> !!sh (when the line content is "man ls")

Yikes.  I had no idea what either of these are doing and had to
try them out.  vi(1) contains so much bloat that is never really
needed and doesn't belong in a text editor at all.

> under openbsd, it seems man doesn't if stdout
> is a tty.

You mean, man(1) doesn't *imply col -b* if stdout is *not* a tty?

> i digged the man manual a little bit
> without finding a solution so i worked the
> things around:
> 
> :r !man ls|fmt

As others said, the normal way to strip backspace formatting is

   $ man ls | col -b

It is documented in man(1) below the -c option and below EXAMPLES,
and in mandoc(1) below "ASCII Output":

  https://man.openbsd.org/man.1#c
  https://man.openbsd.org/man.1#EXAMPLES
  https://man.openbsd.org/mandoc.1#ASCII_Output

You find such stuff as follows:

   $ man -k 'Xr=col(1)'
  man(1) - display manual pages
  mandoc(1) - format manual pages

The advantage of col(1) over fmt(1) is that it is guaranteed to not
mess up line breaks.

> now i would like a poor version of keyword
> feature in openbsd vi. the linux version
> 
> map K yw:E /tmp/vi.keyword.$$p!!xargs man

You don't say what that is supposed to do.

Under Debian Jessie, if i start "vim", then type

  :map K yw:E /tmp/vi.keyword.$$p!!xargs man   
  als   
  K   

i get:

  Error detected while processing function 
netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore..netrw#Explore:
  line   30:
  E132: Function call depth is higher than 'maxfuncdepth'
  Press ENTER or type command to continue

That doesn't seem useful to me.

I also tried the same with OpenBSD vi(1) and it resulted in

  Usage: e[dit][!] [+cmd] [file].

So, no idea what you are trying to do.

> becomes
> 
> map K yw:E /tmp/vi.keyword.$$p!!xargs -IX sh -c 'man X|fmt'
> 
> which doesn't work as | separates 2 vi commands.
> 
> i really would like to know one or the two of these:
> 
> * is there a way to ask man to deliver pure (non-formatted) text ?

In 2014, i already wrote a patch to do that because the question
came up repeatedly.  But demand wasn't that high after all, so i
never committed it.  Now, i updated the patch to -current, see
below.

On the one hand, the UNIX phlosophy is to have each tool do one
thing well, then use pipes to connect tools as needed.  Then again,
arguably, you maybe shouldn't need another tool to just revert
something that the first tool does.  Why would *not* adding backspace
formatting require a pipe to another program, rather than not adding
it in the first place?

Also, the patch that would be required is very small and straightforward.

So, what do people think?  Should i test the patch below in more
depth and commit it?  Or do people consider this bloat?

Yours,
  Ingo


Index: main.c
===
RCS file: /cvs/src/usr.bin/mandoc/main.c,v
retrieving revision 1.247
diff -u -p -r1.247 main.c
--- main.c  24 Feb 2020 21:15:05 -  1.247
+++ main.c  2 Mar 2020 17:06:53 -
@@ -158,6 +158,7 @@ main(int argc, char *argv[])
/* Search options. 

Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Raul Miller
Have you looked at:
  man col
?

(Especially for the -b option...)

And, for that matter, have you looked at
   man col | cat -vet | less
?

Alternatively, have you tried using any web searches on this topic?

Thanks,

-- 
Raul

On Mon, Mar 2, 2020 at 12:01 PM Marc Chantreux
 wrote:
>
> hello,
>
> > Try the mandoc manual page, man is just a front-end to it. Both
> > man/mandoc support -T option and you can specify ascii/utf8 to get the
> > formatted page but it still adds all escape sequences.
>
> indeed, that's why i asked
>
> > The documentation
> > says to pipe the output to col -b to suppress them (I think what you did
> > with the alternative fmt command).
>
> i felt dumb reading this as i gave a try to the mandoc man. but i just
> double checked:
>
> man mandoc|col -b|grep -w col
>
> gives me nothing. can you please tell me what documentation explicitly refers
> to col -b? i can probably learn more from it.
>
> regards
> marc
>



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Marc Chantreux
hello,

> Try the mandoc manual page, man is just a front-end to it. Both
> man/mandoc support -T option and you can specify ascii/utf8 to get the
> formatted page but it still adds all escape sequences.

indeed, that's why i asked

> The documentation
> says to pipe the output to col -b to suppress them (I think what you did
> with the alternative fmt command).

i felt dumb reading this as i gave a try to the mandoc man. but i just
double checked:

man mandoc|col -b|grep -w col

gives me nothing. can you please tell me what documentation explicitly refers
to col -b? i can probably learn more from it.

regards
marc



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Marc Chantreux
> It's the designated tool for the job. That fmt also happens to
> replace sequences character1-backspace-character2 with character2
> is more of a lucky coincidence.

ok then ... good to know. so by extension: by design, there is no
way to use the man command to render the text directly?

regards,
marc



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread David Demelier
On Mon, Mar 02, 2020 at 11:49:31AM +0100, Marc Chantreux wrote:
> hello,
> 
> coming from linux, i'm used to read manpages
> in a vi buffer so i can do much more than
> reading the content. i basically use
> 
> :r !man ls
> or
> !!sh (when the line content is "man ls")
> 
> under openbsd, it seems man doesn't if stdout
> is a tty. i digged the man manual a little bit
> without finding a solution so i worked the
> things around:

Try the mandoc manual page, man is just a front-end to it. Both
man/mandoc support -T option and you can specify ascii/utf8 to get the
formatted page but it still adds all escape sequences. The documentation
says to pipe the output to col -b to suppress them (I think what you did
with the alternative fmt command).

There is an interesting markdown output that seems to work a little bit
better in your case.

Example: :r!man -T markdown ls

But it still not raw.

> :r !man ls|fmt

To be honest, I think the easiest in that case is to simply add an
alias/helper in your shell like viman:

#!/bin/sh
man "$@" | col -b

In vim: :r!viman ls

Tested, it worked like a charm.

HTH,

-- 
David



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Christian Weisgerber
Marc Chantreux:

> > > * is there a way to ask man to deliver pure (non-formatted) text ?
> > Pipe its output through "col -b".
> 
> what is the gain of using col over fmt ?

It's the designated tool for the job.  That fmt also happens to
replace sequences character1-backspace-character2 with character2
is more of a lucky coincidence.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Marc Chantreux
hello,

> > * is there a way to ask man to deliver pure (non-formatted) text ?
> Pipe its output through "col -b".

what is the gain of using col over fmt ?

> > * is there a way to introduce a | in vi macros?

> Yes, by prefixing it with a ^V character.  To enter ^V in vi's input
> mode, press control-V twice.

grmbl ... how could i have missed this one ... thank you!

regards
marc



Re: man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Christian Weisgerber
Marc Chantreux:

> * is there a way to ask man to deliver pure (non-formatted) text ?

Pipe its output through "col -b".

> * is there a way to introduce a | in vi macros?

Yes, by prefixing it with a ^V character.  To enter ^V in vi's input
mode, press control-V twice.

-- 
Christian "naddy" Weisgerber  na...@mips.inka.de



Re: Web documentation available offline by default?

2020-03-02 Thread Ottavio Caruso
On Mon, 2 Mar 2020 at 14:18, Peter N. M. Hansteen  wrote:
>
> On Mon, Mar 02, 2020 at 07:03:25AM -0700, Theo de Raadt wrote:
> > > If you find a way to do that in a way that does not break and require 
> > > manual
> > > labor after each change to the source files, I'm sure your contributing
> > > the code back to the project would be appreciated.
> >
> > I'll say it again, no thanks.
> >
> > Any proposal here requires us to do something.  We don't want to do this.
>
> I was thinking of the probably quite unlikely event that somebody who wants 
> this
> comes up with an actually reproducible way that could be turned into an 
> otherwise
> unremarkable make target.
>
> The mention of a "BSD specialist" certification had me thinking that possibly
> somebody aiming for that status would have been able to think along those 
> lines
> with proper encouragement, if nothing else to automate away an otherwise 
> tedious
> task.

The "BSD specialist" is just an entry-level certification and doesn't
assume that the candidate has the tools and the skills to actually
contribute code to upstream (incidentally, I have submitted bug
reports and small patches to NetBSD and that was it).

For the sake of clarity: I won't propose or submit any changes on this
issue, as this is clearly not welcome. Amen to that and let's move on.


-- 
Ottavio Caruso



Re: Web documentation available offline by default?

2020-03-02 Thread Peter N. M. Hansteen
On Mon, Mar 02, 2020 at 07:03:25AM -0700, Theo de Raadt wrote:
> > If you find a way to do that in a way that does not break and require 
> > manual 
> > labor after each change to the source files, I'm sure your contributing
> > the code back to the project would be appreciated.
> 
> I'll say it again, no thanks.
> 
> Any proposal here requires us to do something.  We don't want to do this.

I was thinking of the probably quite unlikely event that somebody who wants 
this 
comes up with an actually reproducible way that could be turned into an 
otherwise 
unremarkable make target. 

The mention of a "BSD specialist" certification had me thinking that possibly
somebody aiming for that status would have been able to think along those lines
with proper encouragement, if nothing else to automate away an otherwise tedious
task.

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: Web documentation available offline by default?

2020-03-02 Thread Theo de Raadt
Peter N. M. Hansteen  wrote:

> On Sat, Feb 29, 2020 at 03:36:02PM +, Ottavio Caruso wrote:
>  
> > It's also a pity the the faq are not available in a single html or pdf
> > format. This would be handy for those who, like me, are studying for
> > the BSD Specialist certification. Having a single document makes it
> > easier to search for a specific command.
> 
> It is not my intention to be or even sound rude, but this is a matter of
> combining a collection of uniformly formatted html files into one. 
> 
> My first impulse would be to see if there is something available either in 
> the base system or as a package that would either 'just work' for the purpose 
> or
> could be extremely helpful in achieving the feat with a not-too-burdensome
> amount of programming (scripting?).
> 
> If you find a way to do that in a way that does not break and require manual 
> labor after each change to the source files, I'm sure your contributing
> the code back to the project would be appreciated.

I'll say it again, no thanks.

Any proposal here requires us to do something.  We don't want to do this.
We are a multi-faceted operating system project which does not need to
keep adding extra mandates requested by 1 person.

We used to have such a file, btw.  I remember it stopped being updated for
various reasons, probably use of offline tools, and extra steps wasting
the time of the group maintaining the FAQ.  It took years before people
noticed the file had stopped receiving updates.  Which meant noone was
relying on it.  And our reaction was obvious: It was deleted.



Re: Web documentation available offline by default?

2020-03-02 Thread Peter N. M. Hansteen
On Sat, Feb 29, 2020 at 03:36:02PM +, Ottavio Caruso wrote:
 
> It's also a pity the the faq are not available in a single html or pdf
> format. This would be handy for those who, like me, are studying for
> the BSD Specialist certification. Having a single document makes it
> easier to search for a specific command.

It is not my intention to be or even sound rude, but this is a matter of
combining a collection of uniformly formatted html files into one. 

My first impulse would be to see if there is something available either in 
the base system or as a package that would either 'just work' for the purpose or
could be extremely helpful in achieving the feat with a not-too-burdensome
amount of programming (scripting?).

If you find a way to do that in a way that does not break and require manual 
labor after each change to the source files, I'm sure your contributing
the code back to the project would be appreciated.

All the best,
Peter

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: Web documentation available offline by default?

2020-03-02 Thread Theo de Raadt
Vincenzo Nicosia  wrote:

> On Mon, Mar 02, 2020 at 01:30:02AM +0100, Ingo Schwarze wrote:
> 
> [cut]
> 
> > 
> > Besides, the FAQ only applies to -stable and not to -current, so
> > installing it on a -current system would be badly misleading.
> > And we certainly don't want the release(8) process to work differently
> > for -current and -stable: -current is where most of the testing for
> > -stable gets done, so it should better be as similar as possible or
> > we would be in for surprises at release time, or even worse, for
> > surprises after release.
> >
> 
> Indeed. It could probably make sense though to have it as a tar.gz in
> the -stable folder, along with src.tar.gz, sys.tar.gz, ports, and
> xenocara, so that it's readily available through mirrors.

I don't agree, it is a waste of time.



Re: Web documentation available offline by default?

2020-03-02 Thread Vincenzo Nicosia
On Mon, Mar 02, 2020 at 07:41:56AM -0500, Ian Darwin wrote:

[cut]

> 
> How about if the people who want this would, instead of pitying the fact
> that it's not available in the format you want, create a port (with a
> build depends on wkthmltopdf) to generate the files. And keep the port
> updated regularly or it would be deleted.

That's indeed a good suggestion. I will give a try and post updates
here before submiting to ports@

HTH



man to render pure text? (or a pipe in vi macros ?)

2020-03-02 Thread Marc Chantreux
hello,

coming from linux, i'm used to read manpages
in a vi buffer so i can do much more than
reading the content. i basically use

:r !man ls
or
!!sh (when the line content is "man ls")

under openbsd, it seems man doesn't if stdout
is a tty. i digged the man manual a little bit
without finding a solution so i worked the
things around:

:r !man ls|fmt

now i would like a poor version of keyword
feature in openbsd vi. the linux version

map K yw:E /tmp/vi.keyword.$$p!!xargs man

becomes

map K yw:E /tmp/vi.keyword.$$p!!xargs -IX sh -c 'man X|fmt'

which doesn't work as | separates 2 vi commands.

i really would like to know one or the two of these:

* is there a way to ask man to deliver pure (non-formatted) text ?
* is there a way to introduce a | in vi macros?

regards
marc



Re: Server 5 SSD/best practice

2020-03-02 Thread Oliver Marugg

Hi Stuart, hi Nick

Many thanks for your answers adn itnersting point you’ve mentioned 
about the raid levels, it really helped me thinking about the ssd config 
of that existent server.


Greets Oliver

On 21 Feb 2020, at 17:15, Stuart Henderson wrote:


On 2020-02-21, Nick Holland  wrote:

On 2020-02-20 11:22, Oliver Marugg wrote:

Hi

I’ve got a Supermicro 5028D desktop server with 5 identical 
SATA SSDs,
there is no HBA no RAID card in. The purpose of the server is 
intended

as web/smtp and some vmm vms (os plus /home & /var storage).
What are your suggestions or best practices configuring the device
arrangement (eg. sofraid(4), bio(4),bioctl(4) OS 2x on 2x ssd raid1,
data 3xssd raid5 or 1x single ssd for OS and 4x ssd raid5/10 or 
better

ideas)?


You came in a bit late with the question (i.e. after you already had 
the

hardware!).

IMHO there's little use for RAID5 these days. The advantage is "more
storage from a given number of drives". But that can more easily be
fixed by using larger drives which are easier to recover in the
event of failure.

I'm not sure what level of support softraid has for stacked 
disciplines

(it doesn't have direct RAID10 support). The boot loader only supports
RAID 1 and crypto, so you will either want RAID 1 on the boot drives,
or boot from USB stick etc.

I think the only options that really make sense for OpenBSD are
2-drive RAID1 for main OS, and then either 2-drive RAID1 for data, 
plus
a single drive for an extra copy of important things (I hesitate to 
use

the word 'backup' for something in the same machine, but sometimes it
can be helpful to have something that is easier to restore than your
actual backups ;) - though for such a setup I would have gone with
HDD rather than SSD for the 5th drive - or 3 single drives for data.


set it up as you need it...
If you think your description is anything close to specific for 
specific

recommendations, you need to get out more.  Everything you said could
vary in demand by many orders of magnitude, except for the model 
number

the server...a curious thing to be specific about.

E-mail is one of those things that's really hard to get a good backup
of, as it changes minute by minute and is considered fairly 
important,


Dovecot replication (dsync) does a pretty good job of this actually.
I think it's a much better idea than trying to backup mailboxes on an
active system. Either run periodically to alternative storage on the
same machine, or preferably to a different machine (preferably in a
different building).

so I'd consider a three disk RAID1 for the mail store, as a disk 
system

failure invariably means "lost data", even with frequent backups.
Three disk RAID1 gives you a simple disk structure that can tolerate
a disk failure and still provide redundancy.  (some people will tell
you that RAID1 is only two disks.  These people are wrong, but often
include HW RAID controller makers.  Three disk RAID1 examples are in
the man pages).


Since these are SSDs and apart from random hardware failures (which 
aren't
*so* common) the main failure mode is doing too many writes. So with 
three
disk RAID1 the main thing you end up doing with 3 mirrored SSDs is 
wearing

out three drives rather than two with writes at the same rate.

The other risk is data corruption (either on the bus or on storage
either over time - "bit rot" - or firmware bugs etc). softraid doesn't
have anything to help with this (even for detection, let alone 
figuring

out which copy of the data, if any, is correct).


As for the rest...it's a matter of how much space you need and how
much down time you can tolerate, and how you are set up to deal with
that downtime.  And I'm assuming you aren't combining external and
internal services on one box.  I suspect that's a bad assumption.

And even after much careful analysis it's a bit of a guess.
Sometimes you guess wrong.  So keep your design flexible and be
willing and able to say, "Well, this isn't working, let's rebuild
it with the knowledge we now have".  This idea that you have to have
the perfect build the first time out is ... well, just wrong.


yep :)




Re: CUPS sudden refuses to print after previously working fine - SOLVED

2020-03-02 Thread Anthony Campbell
On 02 Mar 2020, Vincenzo Nicosia wrote:
> On Mon, Mar 02, 2020 at 10:50:53AM +, Anthony Campbell wrote:
> 
> [cut]
> 
> > 
> > 
> > Well, I finally "solved" the problem by the simple expedient of just
> > deleting the printer in Cups and reinstalling it from scratch. It
> > then worked perfectly without doing anything else.  Here is the
> > resulting /etc/cups/printers.conf:
> > 
> > # Printer configuration file for CUPS v2.3.1
> > # Written by cupsd on 2020-03-02 09:54
> > # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
> > NextPrinterId 3
> > 
> > PrinterId 2
> > UUID urn:uuid:795e4424-0458-3f6d-413a-1669af7e997e
> > Info Brother HL-5350DN series
> > Location 
> > MakeModel Brother HL-5350DN BR-Script3
> > DeviceURI lpd://brother/BINARY_P1
> 
> It was not just about "turn it off and on again" :) In your previous
> configuration file you had the printer on "socket://" without a port
> specified. Now it's configured as an lpd spooler. So there is an
> important difference there ;)
> 
> (just to reaffirm that re-staring, re-booting, re-configuring,
> re-whatevering do no magic on their own :P).
> 
> HTH
> 

Yes, I'd earlier deleted and reinstalled cups, which I'd assumed
would automatically involve reinstalling the printer, but evidently
not.

The reason for the "socket://" stuff in the previous configuration
file was that this seemed to be necssary in my two laptops (running
-release) so I tried it in the desktop (-current) as well.

After successfully deleting/reinstallin the printer on the desktop
this morning I did the same on the laptops and in both cases the
printer now works perfectly with lpd on those as well.

The only explanation I can think of is that last night I'd
changed the printer's IP address from dhcpd to fixed, as suggested by
someone on another list.

Anthony

-- 
Anthony Campbellhttps://www.acampbell.uk



Re: Web documentation available offline by default?

2020-03-02 Thread Ian Darwin
On Mon, Mar 02, 2020 at 12:28:25PM +0100, Wolfgang Pfeiffer wrote:
> > It's also a pity the the faq are not available in a single html or pdf
> > format. This would be handy for those who, like me, are studying for
> > the BSD Specialist certification. Having a single document makes it
> > easier to search for a specific command.
> 
> Seems to work on Linux at least: to "wget" the pages one needs, and
> then "wkhtmltopdf" them to a pdf file.
> 
> Takes time to get it done nicely with the correct flags for
> wkhtmltopdf - and the wget procedure might not get all pages needed,
> so intervening manually might be an option to get those, too ...
> 
> On OBSD ports there's  textproc/wkhtmltopdf. Didn't test the latter
> tho'.
> 

How about if the people who want this would, instead of pitying the fact
that it's not available in the format you want, create a port (with a
build depends on wkthmltopdf) to generate the files. And keep the port
updated regularly or it would be deleted.



Re: Web documentation available offline by default?

2020-03-02 Thread Wolfgang Pfeiffer

On Sat, Feb 29, 2020 at 03:36:02PM +, Ottavio Caruso wrote:


It's also a pity the the faq are not available in a single html or pdf
format. This would be handy for those who, like me, are studying for
the BSD Specialist certification. Having a single document makes it
easier to search for a specific command.


Seems to work on Linux at least: to "wget" the pages one needs, and
then "wkhtmltopdf" them to a pdf file.

Takes time to get it done nicely with the correct flags for
wkhtmltopdf - and the wget procedure might not get all pages needed,
so intervening manually might be an option to get those, too ...

On OBSD ports there's  textproc/wkhtmltopdf. Didn't test the latter
tho'.

Good luck!
Wolfgang



Re: CUPS sudden refuses to print after previously working fine - SOLVED

2020-03-02 Thread Vincenzo Nicosia
On Mon, Mar 02, 2020 at 10:50:53AM +, Anthony Campbell wrote:

[cut]

> 
> 
> Well, I finally "solved" the problem by the simple expedient of just
> deleting the printer in Cups and reinstalling it from scratch. It
> then worked perfectly without doing anything else.  Here is the
> resulting /etc/cups/printers.conf:
> 
> # Printer configuration file for CUPS v2.3.1
> # Written by cupsd on 2020-03-02 09:54
> # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
> NextPrinterId 3
> 
> PrinterId 2
> UUID urn:uuid:795e4424-0458-3f6d-413a-1669af7e997e
> Info Brother HL-5350DN series
> Location 
> MakeModel Brother HL-5350DN BR-Script3
> DeviceURI lpd://brother/BINARY_P1

It was not just about "turn it off and on again" :) In your previous
configuration file you had the printer on "socket://" without a port
specified. Now it's configured as an lpd spooler. So there is an
important difference there ;)

(just to reaffirm that re-staring, re-booting, re-configuring,
re-whatevering do no magic on their own :P).

HTH



Re: CUPS sudden refuses to print after previously working fine - SOLVED

2020-03-02 Thread Anthony Campbell
On 01 Mar 2020, Anthony Campbell wrote:
> On 28 Feb 2020, Antoine Jacoutot wrote:
> > On Fri, Feb 28, 2020 at 08:28:52AM +, Anthony Campbell wrote:
> > >  I have a networked Brother-HL5350DN printer which has worked fine
> > >  with CUPS for over a year. Two days ago it suddenly refused to
> > >  print on my desktop running -current I reconfigured the printer
> > >  several times without effect.


Well, I finally "solved" the problem by the simple expedient of just
deleting the printer in Cups and reinstalling it from scratch. It
then worked perfectly without doing anything else.  Here is the
resulting /etc/cups/printers.conf:

# Printer configuration file for CUPS v2.3.1
# Written by cupsd on 2020-03-02 09:54
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
NextPrinterId 3

PrinterId 2
UUID urn:uuid:795e4424-0458-3f6d-413a-1669af7e997e
Info Brother HL-5350DN series
Location 
MakeModel Brother HL-5350DN BR-Script3
DeviceURI lpd://brother/BINARY_P1
State Idle
StateTime 1583142812
ConfigTime 1583142501
Type 8433748
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
Attribute marker-colors \#00,#00,#00
Attribute marker-levels -1,-1,54
Attribute marker-names Black Toner Cartridge,Black Toner Cartridge,Drum Unit
Attribute marker-types toner,toner,opc
Attribute marker-change-time 1583142812

~





-- 
--
Anthony Campbellhttps://www.acampbell.uk



Re: Web documentation available offline by default?

2020-03-02 Thread Vincenzo Nicosia
On Mon, Mar 02, 2020 at 01:30:02AM +0100, Ingo Schwarze wrote:

[cut]

> 
> Besides, the FAQ only applies to -stable and not to -current, so
> installing it on a -current system would be badly misleading.
> And we certainly don't want the release(8) process to work differently
> for -current and -stable: -current is where most of the testing for
> -stable gets done, so it should better be as similar as possible or
> we would be in for surprises at release time, or even worse, for
> surprises after release.
>

Indeed. It could probably make sense though to have it as a tar.gz in
the -stable folder, along with src.tar.gz, sys.tar.gz, ports, and
xenocara, so that it's readily available through mirrors.

My2cents