Re: Bridging OpenVPN and LAN

2021-09-08 Thread Stuart Longland
On Sun, 5 Sep 2021 16:52:58 +0300
kasak  wrote:

> You should add ip pool for bridge in server config.
> 
> like this:
> 
> server-bridge 10.70.0.1 255.225.255.0 10.70.0.100 10.70.0.110

You should *only* do this if you have configured your DHCP server to
_not_ hand out IP addresses in that range.

The DHCP server can't actually tell what a "VPN client" is and what a
local Ethernet client is, so it should work.  Likely, it's a lack of a
`server-bridge` statement (*without* IP address ranges given) that is
likely confusing matters.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Minimum RAM for Chrome

2021-08-07 Thread Stuart Longland
On Fri, 6 Aug 2021 14:19:04 +
tetrahe...@danwin1210.me wrote:

> Am I running into system memory limits ("minimum 8GB RAM to surf the
> web"? what is the world coming to?) or is another issue likely the
> cause?

I wouldn't rule that possibility out… I manage with Firefox on Linux
with a 2GB netbook, but only just: some websites just eat RAM like it's
going out of fashion.  Playing videos definitely makes the problem
worse.  Comparatively "simple" websites work okay but anything that's
real-time: all bets are off!

I haven't tried OpenBSD on the same machine, but I suspect the problem
isn't limited to browser or OS.  Your mileage will definitely depend on
the sort of website you frequently like to visit.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: auto-boot

2021-07-23 Thread Stuart Longland
On Tue, 02 Feb 2021 17:51:35 +0100
Bastien Durel  wrote:

> PS: is 1kΩ enough ? I don't know if it's actually "high value"

Well, "high value" is a relative term.  In this case we're dealing with
CMOS inputs which are quite high in impedance.

1kΩ might be "high" if we were talking TTL.  I'd be aiming for at least
10kΩ, maybe 100kΩ.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: how to use OpenBSD firewall (pf) to protect Ooma Telo VOIP phone system

2021-07-05 Thread Stuart Longland
On Mon, 5 Jul 2021 17:50:27 -0700
Jonathan Thornburg  wrote:

> > Better yet, if you can, maybe consider setting up Asterisk or similar
> > directly on the OpenBSD router, then configure your ATA to talk to
> > that.  The Asterisk installation can then "sanitise" the traffic going
> > to your ATA, and is in your control for updates.  This is the approach
> > I've taken with my network here (with Internode NodePhone VoIP as VSP
> > and a handful of IP phones and one ATA).  By doing this, I better
> > shield the IP phones/ATA from the outside traffic since the border
> > router is transcoding the audio passed to these devices.  
> 
> One problem is that the Ooma VOIP box (ATA) is a "black box" appliance
> with no (documented) user-visible configuration interface.  So it has to
> "think" it's talking to whatever network infrastructure Ooma uses.

Ahh fun… yeah, you might be stuck with their crummy device talking to
their service then unless you can somehow "jailbreak" it, which is
really getting beyond the scope of what was originally intended.

Not familiar with these devices, clearly this is an ATA with some
"secret sauce" of unknown quality.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: how to use OpenBSD firewall (pf) to protect Ooma Telo VOIP phone system

2021-07-05 Thread Stuart Longland
On Mon, 5 Jul 2021 10:58:52 -0700
Jonathan Thornburg  wrote:

>  +--+
>   (internet) | $ISP DSL |
>  | modem/router |
>  +--+
> |
> |
>+--++---+
>| OpenBSD  || Omma Telo |.. analog
>| firewall || VOIP box  |   telephones
>+--++---+
>  |  |
>   ++ |  |
>   | Wifi   |-+  +-- wired client
>   | access |(or network switch for
>   | point  | multiple wired clients)
>   ++
> 
> This design would allow pf to protect the Ooma box as well as the
> local computers.
> 
> The problem is that (as is pretty standard for VOIP systems) the Ooma
> Telo carries voice traffic on UDP packets, and the UDP port numbers
> can span a wide (dynamically-chosen) range, rather like ftp.  The
> Ooma documentation says it needs the following ports:
> https://support.ooma.com/home/advanced-connections-and-service-ports/
>   outgoing UDP/TCP 53, 1194, 1294
>   outgoing TCP 80, 110, 443
>   outgoing UDP 67, 123, 3480
>   incoming UDP 1 to 3
> 
> So, there are the usual problems of NAT with dynamically-chosen ports.

One thing the OpenBSD host cannot know, is what specific port in that
1:3 range, is being used at any particular time.  I note they
don't ask you to expose port 5060/udp, so presumably the device is
_not_ receiving SIP traffic directly from incoming callers, but rather
tunnels it via some sort of STUN-type arrangement or VPN (port 1194
smells like OpenVPN).

What also we don't know, is whether the RTP traffic (the 1:3/udp
range) is going to come from a single subnet, or from global addresses.
 If you can find this information out, then it's possible to just
expose yourself to your VSP (voice service provider) and be closed to
everybody else.

Finally, you don't mention if the service is operating on IPv4, IPv6 or
dual-stack, but the concepts are the same regardless.

You _could_ NAT the traffic seen by the ISP router, but I'm not
convinced much is gained by doing this, particularly for the Omma Telco
ATA.  VoIP protocols are notoriously bad at traversing NAT, so the fewer
layers you can put between you and your VSP, the better.  Packet filtering
will stop a lot of nasties, NAT behind the border router (ISP-supplied
in your case) is just "security" through obscurity.

I would do the following:

1. Set aside a private subnet address (RFC-1918 for IPv4, RFC-4193 for
   IPv6) that your ATA will "live" on.  Separate VLAN or physical Ethernet
   segment.
2. Configure your ATA and your OpenBSD router so they can ping each-other.
3. On your ISP-supplied border router, configure a static route to your
   ATA's subnet *via* your OpenBSD router.  Update its NAT rules to forward
   traffic to the ATA's new IP address.
4. Configure `pf` to pass through just the port ranges specified in the
   directions required.  Do *NOT* apply NAT in either direction: let the
   ISP-supplied router handle that.

Better yet, if you can, maybe consider setting up Asterisk or similar
directly on the OpenBSD router, then configure your ATA to talk to
that.  The Asterisk installation can then "sanitise" the traffic going
to your ATA, and is in your control for updates.  This is the approach
I've taken with my network here (with Internode NodePhone VoIP as VSP
and a handful of IP phones and one ATA).  By doing this, I better
shield the IP phones/ATA from the outside traffic since the border
router is transcoding the audio passed to these devices.

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: amd and 2GB limit

2021-07-03 Thread Stuart Longland
On Sat, 3 Jul 2021 01:28:17 -0300
Gustavo Rios  wrote:

> Is there this limit yet in amd ?

… on AMD64?
… on RAM?
… on disk?
Maximum or minimum?

I've got an AMD64 machine here that's got more than 2GB of both RAM and
disk… so no if there's a maximum limit, it's a lot bigger than that.
Limiting RAM or disk to 2GB in 2021 would be ludicrous, so I'm a bit
confused by your question.

Please be less vague.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: C style in OpenBSD

2021-07-02 Thread Stuart Longland
On Fri, 2 Jul 2021 15:09:42 +0959
Reuben ua Bríġ  wrote:

> > Some languages do not have ternaries.  
> 
> in C:
> ternary EXPRESSION:   A ? B : C
> ternary STATEMENT:if (A) B; else C;
> 
> i will define some macros to highlight the similarity:
> 
> […snip…]
> 
>   #define exif(e) e ?
>   #define exel :
> 
>   search.argmode =
>   exif (strcmp(progname, BINM_MAN) == 0)
>   ARG_NAME exel
>   exif (strcmp(progname, BINM_APROPOS) == 0)
>   ARG_EXPR exel
>   exif (strcmp(progname, BINM_WHATIS) == 0)
>   ARG_WORD exel
>   exif (strncmp(progname, "help", 4) == 0)
>   ARG_NAME exel
>   ARG_FILE;

Good grief… a bad coding style gets worse.  Yes, it's our favourite,
the C Pre-processor macro!

> > It actually isn't… you can add braces to the if-else, and put
> > for/while/switch/if statements inside those braces to do more complex
> > logic if the need arises.  Only mathematical expressions can be used
> > in ternaries.  
> 
> because they are EXPRESSIONS, not STATEMENTS.

var = expression; // ← statement

As I said before, if you think it's such a great idea, take a software
patent out on the idea.

In the mean time, you're proposing an idea that:
1. fixes nothing as nothing was broken
2. makes code readability and maintainability worse

The horse is dead… and has been flogged so hard every bone in its limp
body has been turned to powder.  When do you stop?  You trying to make
a horse smoothie one whip crack at a time?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: while do done

2021-07-02 Thread Stuart Longland
On Fri, 2 Jul 2021 14:16:20 +1000
Reuben ua Bríġ  wrote:

> > while true; do
> > # Do something
> > sleep 10
> > done  
> 
> you CAN interrupt
> 
>   while do sleep 0; done
> 
> there is no need for exit, and it doesnt fix
> 
>   while do done

Your bug report was vague and I wasn't convinced `while do done` was legal 
syntax.

> or
> 
>   while :; do :; done
> 
> if your shell needs something to not do.

If you're silly enough to type that into your console, why must we stop you?

Are you also silly enough to set `/usr/local/bin/bash` as your shell
for `root` and put `:(){ :|:& };:` in your .bashrc?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: while do done

2021-07-01 Thread Stuart Longland
On Mon, 28 Jun 2021 22:20:15 +1000
Reuben ua Bríġ  wrote:

> you cant interrupt sh in
> 
>   while do done
> 
> not that it matters.
> 

vk4msl-bne$ cat test.sh 

 
#!/bin/sh

oninterrupt() {
echo "I was interrupted!"
exit 0
}

trap oninterrupt INT
while true; do
# Do something
sleep 10
done
vk4msl-bne$ sh test.sh   
^CI was interrupted!
vk4msl-bne$ uname -a
OpenBSD vk4msl-bne.dmz.longlandclan.id.au 6.9 GENERIC#0 amd64


-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: C style in OpenBSD

2021-07-01 Thread Stuart Longland
On Thu, 1 Jul 2021 19:09:28 +1000
Reuben ua Bríġ  wrote:

> > Date: Thu,  1 Jul 2021 13:51:21 +1000
> > From: Stuart Longland   
> 
> > Even someone who didn't know "C",  
> 
> ... seriously?

Yes seriously, there are people who write software computers, and do
not know C.

> > If you didn't know what a ternary was  
> 
> ... seriously?

If you've never needed to use one, why would you know about them?

Ternaries can look different in different languages too.  In Python,
they're expressed as:

(true expression) if (condition) else (false expression)

Some languages do not have ternaries.

> > search.argmode = (
> > (strcmp(progname, BINM_MAN) == 0)
> > ? ARG_NAME
> > : (
> > (strcmp(progname, BINM_APROPOS) == 0) == 0)
> > ? ARG_EXPR
> > : (  
> 
> ... do you write:
> 
> if
> else
>   if
>   else
>   if
>   else
>   .
>.

`if` and `else` are more easily spotted by the eye than `:` and `?`.
If I wanted to write in meaningless symbols I'd use BrainFuck.

> no?  then why do you write ? : in this style?  it is the SAME logic,
> but the conditional is on the expression, not the statement.

It actually isn't… you can add braces to the if-else, and put
for/while/switch/if statements inside those braces to do more complex
logic if the need arises.  Only mathematical expressions can be used
in ternaries.

So the if/else is infinitely more extensible than a ternary, whilst
_also_ being more readable because the eye will spot words like `if`
and `else` easier than single characters.

> my ? : indentation style is based on that usually used for else if

Go patent it then.  I hear they'll patent anything these days.

> > Now, it should be immediately apparent why nesting this many ternaries
> > is a bad idea.  
> 
> Now,
>   it
>   should
>   be
>   immediately
>   apparent
>   why
> 
> excessive indentation is a bad idea.

Right, I do not disagree there.  I tend to use tabs for indentation and
limit my line length to ~80 characters for that reason: if I'm having
to use too deep-er indentation in a function, this is a hint to me that
maybe the function is getting too complex and should be split up or
re-factored to make it less complex.

Some argue that with wide-screen monitors 80 characters is rooted in
the past, and they have a point, but being able to fit two files
side-by-side on the same 1920×1080 monitor with a readable font size is
a big plus in my book.

> > Yeah, it kinda sucks there's no way to do a `switch` with strings,  
> 
> that is what my code does!

… badly.

> > I prefer to use brackets more than is strictly necessary.  
> 
>   STYLE(9)
> 
>   Don't use parentheses unless they're required for precedence,
>   the statement is confusing without them, or the compiler
>   generates a warning without them.

"the statement is confusing without them" -- a subjective observation.
If you do C and nothing but C for a living, with one compiler on one
platform, then maybe, you know the operator precedence off-by-heart.

Most languages follow very similar precedence rules, so often things
just work anyway.

Occasionally, someone will slip an edge case in that you weren't
expecting, using brackets makes it abundantly clear, even to the
compiler/interpreter, what your intent is, a buggy compiler that
ignores operator precedence is not an issue so long as it processes
bracketed expressions properly, anyone with primary-school level maths
will understand what bits are to be computed first (even if they have
to look up what a particular operator does to its operands).

> > I do hope the coding styles you're showcasing to us aren't what
> > they're teaching at ANU.  
> 
> I AM NOT A COMPUTING STUDENT, TEACHER, STAFFER, etc.

Then stop acting like a first year CS student.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: C style in OpenBSD

2021-07-01 Thread Stuart Longland
On Tue, 29 Jun 2021 15:17:58 +0959
Reuben ua Bríġ  wrote:

> i found the following:
> 
> if (strcmp(progname, BINM_MAN) == 0)
> search.argmode = ARG_NAME;
> else if (strcmp(progname, BINM_APROPOS) == 0)
> search.argmode = ARG_EXPR;
> else if (strcmp(progname, BINM_WHATIS) == 0)
> search.argmode = ARG_WORD;
> else if (strncmp(progname, "help", 4) == 0)
> search.argmode = ARG_NAME;
> else
> search.argmode = ARG_FILE;
> 
> much more readable as:
> 
> search.argmode =
> strcmp(progname, BINM_MAN) == 0 ?   ARG_NAME :
> strcmp(progname, BINM_APROPOS) == 0 ?   ARG_EXPR :
> strcmp(progname, BINM_WHATIS) == 0 ?ARG_WORD :
> strncmp(progname, "help", 4) == 0 ? ARG_NAME :
> ARG_FILE;

I disagree.

The former uses universally understood `if` statements, with clear
formatting of the condition expression and the true/false branches.
Some might quibble about a lack of braces, but the indentation make
things clear enough.

Even someone who didn't know "C", would be able to more-or-less
understand what is being done.  It's almost pseudo-code like.  About
the only trickiness is understanding `strcmp`/`strncmp`.

The latter uses undelimited nested ternaries, with no clear demarcation
between the ternary expression and its true/false branches.  If you
didn't know what a ternary was, you'd be totally snookered
understanding that blob of code.

Maybe it looks "prettier", but if I wanted to write "pretty" C code,
I'd enter the IOCCC.

If I absolutely *had* to use ternaries (and you'd pretty much have to
do it at gun-point, threatening some innocent bystander):

search.argmode = (
(strcmp(progname, BINM_MAN) == 0)
? ARG_NAME
: (
(strcmp(progname, BINM_APROPOS) == 0) == 0)
? ARG_EXPR
: (
(strcmp(progname, BINM_WHATIS) == 0)
? ARG_WORD
: (
(strncmp(progname, "help", 4) == 0)
? ARG_NAME
: ARG_FILE
)
)
)
);

Now, it should be immediately apparent why nesting this many ternaries
is a bad idea.  The above is a marginal improvement, you can clearly see
a ternary is involved and what bits are what, but it's blindingly
obvious why I wouldn't nest that many ternaries and why `if`/`else` or
`switch` is a better solution.

Yeah, it kinda sucks there's no way to do a `switch` with strings, but
the `if`/`else` solution isn't a bad one, and on some rare occasions
(I've personally observed this on MSP430 with gcc), using `if`/`else`
generates tighter code than `switch` does.

You might argue about "operator precedence", and most languages follow
the same rules, but there's enough subtle differences between them, and
I bounce between 4 of them in my day job, that I prefer to use brackets
more than is strictly necessary.

Neither of the "ternary" examples here would qualify for OpenBSD coding
standards.

I do hope the coding styles you're showcasing to us aren't what they're
teaching at ANU.  I've heard of "Canberra bubble" referring to the
reality distortion field that the politicians down there live in, but I
didn't think it extended to the local uni there!
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: An OpenBSD Consumer Gateway Launch

2021-06-14 Thread Stuart Longland
On Fri, 11 Jun 2021 16:15:50 +
fern.tje...@aiyja.com wrote:

> Disclaimer: This e-mail communication and any attachments to it, are 
> confidential and privileged to Etheria Services and Etheria Group, within the 
> European Union, and this includes its sister companies, and to the correct 
> recipients of this email, which are directly applicable to GDPR regulations, 
> and only confidential use of that designated recipient(s) named above in this 
> email may receive the contents herein. If you are not the intended recipient 
> of this message, you are hereby notified that any review, dissemination, 
> distribution or copying of this message is strictly prohibited and may be 
> unlawful and can result in heavy fines relative to your company's income. 
> Please notify the sender immediately and destroy all copies of this message 
> along with all attachments. We give no rights to any reader of this email, to 
> sell or forward our employee or company details on, to any third party, 
> without specific written request

Stupid question, but _why_ are we sending this to a public mailing list
if it's confidential?  I can guarantee the email _will_ be seen by
people _not_ listed as "correct recipients" because it can be seen by
theoretically **anyone**.

Secondly, isn't it a bit late to tell me _now_ that your email is
confidential _after_ I have read the body in full?  I don't know how
people read emails in the European Union, but here in Australia, I
start at the top and read to the bottom, not bottom to top (maybe that
explains the business world's like for top-posting).

That is how I was taught to read when I was learning to read in primary
school back in the early 90s, and how I continue to read English text
today: I know the law is an ass best ridden backwards, but I didn't
think "backwards" is how I was meant to read legal documents too!

Thirdly, how I am I meant to "destroy" the copies, assuming I am not a
"correct recipient" (which, by the way, is not defined).  If this means
destruction of the physical storage devices, do I get compensated by
Etheria Group for the 5× 2TB HDDs and 4× 2TB SSDs, any of which "may"
be "storing" in part or in full, the very email they want "destroyed"?

And what comes of all the _other_ data I have sharing those storage
volumes that your footer so forcefully asserts should be cast to the
bit bucket?  It's a nice gesture publicly thanking the OpenBSD authors
for their hard efforts, but legal fashion be damned, I strongly object
to the demands made in your email's footer.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Advice on serial port communication

2021-05-25 Thread Stuart Longland
On Tue, 25 May 2021 08:29:52 -0700
Joseph Olatt  wrote:

[Accidentally dropped CC… re-sending]

> Any advice on how I cat get to the U-Boot (which is what I presume you
> mean by the "TI boot-loader") prompt?

Nope, by "TI boot-loader", I mean "TI boot-loader", which is burned
into a ROM that exists on the die of the SoC.  It has no prompt: it
just reads some GPIO pins, initialises the appropriate interface based
on the pins it sees pulled high/low then goes hunting for a boot sector.

U-Boot is the boot-loader it is failing to load in this case.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Backup OBSD router at 6.7, anyway to upgrade it to 6.9???

2021-05-24 Thread Stuart Longland
On Mon, 17 May 2021 20:26:25 -0400
"Jay Hart"  wrote:

> Its still at 6.7, it there anyway I can update it to 6.9 without
> doing a full re-install, or has the only train left the station?

I updated my Loongson netbook from OpenBSD 6.6 on the week-end to 6.9… the 
process I followed:

1. download bsd.rd for OpenBSD 6.7 from ftp.openbsd.org
2. boot it, do an "Upgrade"
3. once booted into OpenBSD 6.7, do `sysupgrade` to get to 6.8
4. once booted into OpenBSD 6.8, do `sysupgrade` to get to 6.9

Note that in my case, I had some fiddling inside PMON2000 to switch the
image from /bsd to /bsd.rd and back again at each step as the
installer/`sysupgrade` does not do this for you.  On AMD64, this should not
be a problem. you should be able to a `sysupgrade`

Worst case scenario might be temporarily changing /etc/installurl to
ftp.openbsd.org to obtain the necessary files.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Advice on serial port communication

2021-05-24 Thread Stuart Longland
On Tue, 25 May 2021 09:38:21 +1000
Stuart Longland  wrote:

> Maybe it can't find the boot-loader?

To clarify… (yes, half asleep this morning)… TI boot-loader cannot find
the OS boot-loader… not that it can't find itself.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Advice on serial port communication

2021-05-24 Thread Stuart Longland
On Mon, 24 May 2021 07:54:38 -0700
Joseph Olatt  wrote:

> Any advice on what those "C"s mean. The serial cable I'm using is:
> 

Something in the back of my mind suggests this might be the TI
bootloader complaining, about something.  Maybe it can't find the
boot-loader?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Packages/libraries in disarray after sysupgrade

2021-05-14 Thread Stuart Longland
On Thu, 13 May 2021 22:47:11 +
tetrahe...@danwin1210.me wrote:

> I am assuming I need to be installing new packages with `pkg_add -U` to 
> update the dependencies as needed. However, the manpage suggests this is 
> not desirable.

Maybe try `pkg_add -u` (lowercase 'u' not uppercase) first… it may be that
you need to update the packages you have installed now before you can
install any new ones.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: home printer

2021-02-11 Thread Stuart Longland
On 11/2/21 10:12 pm, Stuart Longland wrote:
> These are real-world devices, with real-world tolerances, and real-world
> imperfections.  If someone wants to track you, they will, stenography or
> not.

s/stenography/steganography/… time for the email client dictionary to
learn a new word methinks, and maybe better I check a suggested
correction before applying it.  (Thankfully auto-carrot isn't enabled.)
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: home printer

2021-02-11 Thread Stuart Longland
On 11/2/21 2:52 am, ropers wrote:
> Printer steganography is the kind of chain most people will only
> notice once they move and start exercising their rights.  If you're
> only free because you don't dissent, you're not free.

The thing is… the printer is an electro-*mechanical* device.

There's backlash, there's timing glitches.  Even *without* deliberate
"steganography" (are Stegosauruses involved?), your print-out will have
unique flaws in it, that will "fingerprint" your printer as having made it.

Maybe because the carriage belt has some backlash (or position sensing
is a bit off), the printer "staircases" (a problem that can exist in
dot-matrix or inkjet printers).

Maybe a hammer or jet is dead leading to a dead "pixel" at regular
intervals.

Maybe the imaging drum on your laser has an imperfection that means it
attracts proportionately more or less toner at a certain spot than other
areas of the drum.

Maybe the MCU controlling the laser is a bit jittery and so doesn't
quite hit the target right every time.

These are real-world devices, with real-world tolerances, and real-world
imperfections.  If someone wants to track you, they will, stenography or
not.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: home printer

2021-02-10 Thread Stuart Longland
On 10/2/21 7:49 pm, Greg Thomas wrote:
> Does anyone have examples of  steganography in monochrome laser
> printers?
    ^

https://duckduckgo.com/?t=ffsb=steganography+in+monochrome+laser+printers=web

Second hit is https://en.wikipedia.org/wiki/Machine_Identification_Code
which doesn't say specifically that mono printers _do_ implement such
stenography, but doesn't rule it out either and hypothesises a few
methods by which it could be done.

Colour printers doing this is a no-brainer, because authorities want to
be able to trace the source of counterfeit documents such as bank notes,
etc.

Not all "protected" documents need colour to be counterfeited though,
and so I think we can safely assume that mono printers also do the same
thing.

Question is, are you printing sensitive material that often that using
such a printer poses an unacceptable risk?

You can lose sleep over the fact that most computer print-outs are
traceable, you can set out to design an "untraceable" printer, or you
can accept that there are many pieces of paper flying around the planet,
too many for law enforcement to sit and scrutinise each and every one.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: home printer

2021-02-09 Thread Stuart Longland
On 9/2/21 6:43 am, ropers wrote:
> * Printer steganography -- which I've positively confirmed is indeed there,
>   and which I neither asked for, nor was at any time told anything about by
>   Xerox, especially not pre-purchase.

I think this is situation normal for any printer made this decade.
Don't like it?  You have three choices:

1. Find a way to coax an ancient parallel port printer to work with your
modern Unix workstation.
2. Make your own printer.
3. Don't print.

(1) could be achieved two ways:

(1a) using either a standard LPT-to- adaptor.  (e.g.
LPT-to-USB, there are also LPT print servers that present an lpd interface)
(1b) with off-the-shelf modules to interface to the Centronics interface
on the printer (which is 5V TTL IIRC) to one of the myriad of 5V-TTL
compatible microcontroller dev boards out there and doing some hacking
of the print spooler in OpenBSD along with some firmware development.

(2) has been done various ways (e.g. HomoFaciens on YouTube did a
junk-box printer using a pen, scrap motors, hand-made optical encoders
and an Arduino dev board)… admittedly resolution and print speed are
both poor in such systems unless you're very mechanically and
electronically skilled.  You may also have to forgo conveniences such as
an automatic sheet feeder or out-of-pigment notifications.

Many people are doing (3) now, having decided they don't use a printer
often enough to justify the cost of maintaining one.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: auto-boot

2021-01-27 Thread Stuart Longland

On 26/1/21 3:04 am, Mihai Popescu wrote:

That short with a metallic wire was just for quick check. It is not
recommended for prolonged usage! It will block any communication on the
RS232 cable.


Probably not very healthy for the RS-232 driver either.  High-valued 
resistor is probably a safer bet.

--
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: auto-boot

2021-01-26 Thread Stuart Longland
On 25/1/21 11:40 pm, Bastien Durel wrote:
> Hello,
> 
> Short-circuit pins 3-5 using my DB9 cable as Mihai Popescu said[1]
> worked.
> Alas, this setup prevent to plug-in the cable on the other side ^^
> 
> But this confirm there is an hardware problem.
> 
> So if I understand well, I have to buy 2 of these[2], add a short-
> circuit between pins in one side, and connet them with an ethernet
> cable ?

That's a possibility… another no-solder option as I say is you grab a
suitable serial extension lead, chop it in half, and use screw terminal
blocks to bridge the right connections make the appropriate cross-overs.

Done that many times at work for an ad-hoc serial cable for wiring up
various RS-485 serial interfaces (Moxa U-Port 1150s, Advantec industrial
serial interfaces and el cheapo Jaycar no-name USB dongles) to Modbus
and proprietary serial meter networks.

A bonus with this approach is that you can easily change it if needed.
A downside is it's less robust as the wires usually aren't designed for
those kinds of stresses, so you may find some zip tied stress relief is
needed.  No good for a "professional" permanent install, but fine for
private use or for a quick lash-up for testing purposes.

There'll be some buzzing out of wires with a multimeter to figure out
which wire is which, but for DE9 cables it usually isn't a big issue.
It's not like you're trying to terminate a Ultra-160 SCSI cable.

If you go the DE9→RJ-45 route, make sure you use a straight-through CAT5
cable, or you'll have much head scratching when stuff doesn't work.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: firefox+web.skype.com+microphone (on OpenBSD)?

2021-01-23 Thread Stuart Longland
On 23/1/21 5:37 am, Gregory Edigarov wrote:
> So it is just a matter of curiosity. What skype is missing on OpenBSD?

Users?  My guess is they think the user base for Skype on OpenBSD is
almost zero, so they don't see it being a platform worth supporting.

Part of the reason being that Skype never has worked properly on
OpenBSD, so users of Skype thus use Linux, Windows and MacOS X instead.
 An inescapable echo chamber of their own making due to the proprietary
nature of their service.

Part also could be that they need to be compatible with "embedded" Skype
clients that people purchased years ago, and thus are stuck with the
CODECs and protocols those devices support.  With no support for these
CODECs in the browsers, they either have to embed proprietary browser
extensions or transcode server-side.

I'll note that I haven't used Skype in almost 10 years now.  It was a
proprietary native desktop application then, there was none of this
"web-based" stuff.  That said, I've witnessed it fail to work properly
for family members on Android many times.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: auto-boot

2021-01-22 Thread Stuart Longland
On 21/1/21 7:48 am, Diana Eichert wrote:
> This is not as hard as you think.  Get a couple (it is good to have
> extras and they are pretty cheap) RJ45-DB9 adapter, the pins
> will not be inserted in DB9 connector, therefore you can perform some
> wire surgery.  Break open the RJ45 side, cut the cables from RJ45
> connector.

Another option is to get a DE9 serial cable and chop it in half.

The big challenge is getting hold of such a beast.  These days if you
walk into a computer shop and mutter things about serial ports, they
think you're talking about a place that sailors go for breakfast.

-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



[OT] SIM cards and "progress" [was Re: 4G mini PCI-e modem support?]

2021-01-19 Thread Stuart Longland

On 12/1/21 6:39 pm, Stuart Henderson wrote:

This combo works fine in the middle miniPCIe slot of the APU. You'll need a
full size SIM card for the SIM card slot.

That's a mini SIM! Full-sized is like a credit card, the early Motorola
GSM phones used them, they slid into the end of the phone.


That's what I used to think too… remember using a phone like that 
(Motorola MicroTAC… micro compared to other phones of its era, nothing 
micro about it today).


I seem to recall the Ericsson A1018S I was using around the turn of the 
century referred to the smaller (almost full SD-card-sized) SIM cards as 
U-SIMs.


Then I had lone of a iSquareMobility Kite for a few months (which is a 
nice bit of kit BTW), and initially thought my SIM card (what I 
understand was a U-SIM, in the older parlance) would fit.  *WRONG*.


Apparently, that is now what they call a "full-size" SIM today.  U-SIMs 
are now a little bigger than a MicroSD card… and now they've got this 
silly nano-SIM format which needs to sit in a tray that's *bigger* than 
the "full-size" SIM it replaced!


Yes, this is "progress".  Anyway, I digress, this discussion has bugger 
all to do with OpenBSD, where at least sanity prevails which is why we 
can enjoy a sub-1GB ISO image download each new release.

--
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: misc panics

2020-12-27 Thread Stuart Longland

On 28/12/20 3:56 am, Bastien Durel wrote:
After that I got a (maybe) endless loop of panics inducing panics (I did 
not got the output, it was cycling fast), and after that the /bsd file 
was left empty :



OpenBSD/amd64 BOOT 3.52

boot> NOTE: random seed is being reused.
booting hd0a:/bsd: read header
 failed(0). will try /bsd

…

How can I figure out the cause of all these problems ?


Seems awfully strange for `/bsd` to become zero-length out-of-the-blue. 
 Got a `memtest86` disk handy?


I'd be checking:
- RAM
- disks
- CPU

I think from the `dmesg` the storage device is a SSD?  Could it be it 
has failed early?  Some do that, and they give practically no warning 
when they do.

--
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Enhancing Privacy in 2020 attached screenshot

2020-12-22 Thread Stuart Longland
On 22/12/20 10:18 am, pipus wrote:
> First rule Dunning-Kruger club is to … [ snip telegraphic diarrhoea ]
> 
> Interesting 28 public and private emails protecting Stuart  … [ snip 
> telegraphic diarrhoea ]

Seriously, grow up.  It is said that empty vessels make the most sound,
and you've made more than enough noise.

> Australia is nearing a totalitarian state, … [ snip more telegraphic 
> diarrhoea ]

… and?  Unless you live here, that's our problem to deal with and not
yours.  I look around at other places that are world-wide accepted as
totalitarian states, and this one really doesn't seem that totalitarian
in comparison.

In any case, such discussions are irrelevant here.  There's a file,
/dev/null, that you might want to send this diatribe to.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: RISC-V and OpenBSD

2020-12-15 Thread Stuart Longland
On 10/12/20 4:33 am, Mihai Popescu wrote:
> Just wanted to see if RISC-V architecture is attractive for OpenBSD
> development. It's open and it is from Berkeley.

I hear it's only truly open if you're part of their exclusive "club".
Otherwise it's as much "you take what you're given" as any other
architecture.

If you're willing to do a port, I doubt any here could stop you.  RISC-V
hardware needs to become available though before such a port will become
any practical use.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Multiple USB NICs

2020-10-21 Thread Stuart Longland
On 22/10/20 1:08 pm, Lee Nelson wrote:
> The same sort of thing happened to me with me PCI cards, but it was
> another edge case.  I had two identical 2-port NIC's representing
> em0-em3. The card with em0 and em1 died and brought the syste down with
> a kernel panic.  Upon rebooting the card that had been em2 and em3 was
> now em0 and em1.  The server could have still functioned on half the
> ports but now the configuration was wrong for the surviving ports so the
> server was unreachable.

Yeah, the thing that's in PCI's favour is that it all gets power at the
same time, whereas in USB, the bus gets powered up one hub at a time as
each downstream hub is detected in the tree and powered up.

Also the PCI bus is synchronised to a common clock, whereas USB is
entirely asynchronous.  Thus it's a lot easier to enforce some sort of
order in PCI than USB.

> And Theo's hint was spot on.  I'm experimenting with arm64 on an RPI 4.
> Stability is not one of my expectations.  This is the normally standby
> half of the fw pair of my home network.  Even if it bursts into flames,
> it will still be a learning experience.
Yes well, it was in the back of my mind that this might be some sort of
interface-challenged device.  PCIe devices _can_ be connected to a
Raspberry Pi 4, but it's a rather hap-hazard process that's not
recommended unless you _really_ like re-working high-speed data links on
printed circuit boards.

Closest you get on a 'Pi is maybe some of the SPI Ethernet ICs that you
might be able to hook to the GPIO header, but then you'd have to hack
the OpenBSD kernel to support it, and it won't support gigabit speeds.

A standard x86 machine and a multi-port network card is looking pretty
good at this point.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Multiple USB NICs

2020-10-21 Thread Stuart Longland
On 21/10/20 10:53 pm, pipus wrote:
> but Theo your butt is magical :(

Perhaps you can worship it off list then. ;-)
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Multiple USB NICs

2020-10-20 Thread Stuart Longland
On 21/10/20 9:55 am, Lee Nelson wrote:
>> Alternatively use a single nic with vlans, and break out to separate
>> ports on a managed switch.
>>
> Yes, that could work too, but this is one side of a pfsync/carp
> redundant firewall setup, so I want to keep it as simple as possible.

Silly question, what hardware are the USB NICs plugging into?

USB trades off determinism for hot-pluggability, and it seems a
firewall, you absolutely do want an interface to appear in a specific
location.  I'd be looking at something that plugs into the system
peripheral bus somehow (PCIe, PCI, ISA, … etc).
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: dmesg for 6.8-release on Pine A64+ 1GB (Arm64)

2020-10-19 Thread Stuart Longland
On 19/10/20 2:20 am, pipus wrote:
> maybe no need to ruin the 6.8 release with a mention of linux,"other 
> unfinished broken operating systems" might be better as a reference point? :)

A "finished" OS is one that's no longer being maintained, sitting on old
media quietly bit-rotting away to uselessness.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: USB to 3.5mm jack audio adapter

2020-09-09 Thread Stuart Longland
On 9/9/20 11:49 pm, Paul de Weerd wrote:
> I mean, I have a USB audio device that
> has a 3.5mm jack, but that's output only (TRS, so no microphone).

Does that adaptor also have a separate microphone input?

You can buy adaptors that split the microphone and earpiece contacts out
to separate 3.5mm jacks which would allow you to then connect your
single 4-pole jack headset to a conventional USB audio dongle.

Some gaming headsets are supplied with such an adaptor.  e.g. one Asus
gaming headset I have is natively 4-pole 3.5mm for plugging into Apple
devices, and a 4-pole 3.5mm to 2×3-pole 3.5mm adaptor cable for
conventional sound cards.

You can also buy the connectors and make such an adaptor yourself if
you're handy with a soldering iron and want to avoid Russian Roulette
with adaptors of questionable quality/utility or a long wait.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Microsoft's war on plain text email in open source

2020-08-29 Thread Stuart Longland
On 27/8/20 2:12 pm, andrew fabbro wrote:
>> “It is a fairly specific workflow that is a challenge for some newer
>> developers to engage with. As an example, my partner submitted a patch
>> to OpenBSD a few weeks ago, and he had to set up an entirely new mail
>> client which didn’t mangle his email message to HTML-ise or do other
>> things to it, so he could even make that one patch. That’s a barrier to
>> entry that’s pretty high for somebody who may want to be a first-time
>> contributor.”"
>>
> If someone struggles to send a plain-text email, what are the odds their
> OpenBSD patch is going to be accepted...

It's not like tools don't exist for doing exactly that built into the
version control system… *cough* `git send-email` *cough*.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Microsoft's war on plain text email in open source

2020-08-29 Thread Stuart Longland
On 27/8/20 7:27 am, Peter Nicolai Mathias Hansteen wrote:
> Sort of related, I dust off an exchange/outlook rant of mine from a little 
> while back (most of it still applies, unfortunately): 
> https://bsdly.blogspot.com/2011/02/problem-isnt-email-its-microsoft.html 
> <https://bsdly.blogspot.com/2011/02/problem-isnt-email-its-microsoft.html>


> The first revelation came when I heard a co-worker praise newer Microsoft 
> Office releases "because 2007 and newer has discussions". I was forced to 
> imagine how life must have been like without threading as we've tended to 
> call it on the USENET and mailing lists since, well, the late 1980s.


I literally laughed out loud at that.  So they've had threading for only
13 years now?  Geez… so it's not just Microsloth's UIs that are "flat".
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Plaintext vs HTML in email [was Re: Microsoft's war on plain text email in open source]

2020-08-29 Thread Stuart Longland
On 27/8/20 6:17 am, Daniel Ouellet wrote:
> On 8/26/20 3:08 PM, Chris Bennett wrote:
>> On Wed, Aug 26, 2020 at 12:28:00PM -0500, Mike Hammett wrote:
>>> Text-only was great in 1985. 
>>>
>>>
>>
>> And it's still pretty badass in 2020.
>> I really love the way company networks are brought down by a little
>> helpful Javascript in an HTML email.
> 
> I truly HATE HTML emails.
> 
> Anyone that needs HTML emails really have nothing interesting to say as
> it add absolutely NOTHING to the conversation and is useless.
> 
> I would gladly live in 1985 for ever if that mean I don't have to deal
> with the bulky crap of HTML emails.

I think there are use cases where HTML is valid, but it's also overkill.
 Yes, sometimes it is useful to have some limited formatting, tables and
inline images have their benefits.

That's about where it ends.  I'm the only one in my workplace that uses
plain-text email.  I think it more professional to send an email that is
safely viewable everywhere, rather than to send emails that require
unsafe options to be turned on (I don't care if said options are
normally turned on by default).

That said, I've struck numerous companies that seriously need the IT
security clue-by-four to come a-visiting.

https://stuartl.longlandclan.id.au/blog/2020/08/05/html-email-ought-to-be-considered-harmful/

That's my take on the situation… when you consider the amount that has
been "bolted on" to HTML over the past 28 years, then you consider that
many people use a fully-fledged web browser to access their email (via a
web-based client), the security implications of that are scary.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

Help fund COVID-19 research:
https://stuartl.longlandclan.id.au/blog/2020/04/20/who-covid19/



Re: how to mount phone?

2020-07-15 Thread Stuart Longland
On 15/7/20 1:11 am, Peter Nicolai Mathias Hansteen wrote:
> I believe I have at some point managed to mount a phone as storage, but not 
> recently.

I think the issue is that for it to expose the block device to the USB
host, it must first unmount it from the device (otherwise hilarity
ensues as the two OS kernels stomp on one another writing to it).  If an
application on the phone has a file on that block device open, it can't
unmount it.

Rather than battle that, they've gone the "file sharing" route, using
Media Transfer Protocol.  Kinda sucky compared to NFS or CIFS (or better
yet, rsync/ssh, scp or sftp), but it's what we have to work with.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

Help fund COVID-19 research:
https://stuartl.longlandclan.id.au/blog/2020/04/20/who-covid19/



Re: strlcpy version speed tests?

2020-07-04 Thread Stuart Longland
On 1/7/20 10:05 pm, Luke Small wrote:
> Are you clinging to traditions for some purpose?

Are you posting random pieces of code and asking for critique on them
for no apparent reason for some purpose?

To be clear, this was the sum and total of your first message in this
thread (excluding attachment for brevity):

> I made a couple different versions if anybody is interested!
> -Luke
Why?  Why strlcpy?  Why not strcpy?  Or memcpy?  Why not the whole libc?
 Zero context.  The email headers and the C source code attachment are
99% of the whole email.

None of those headers start with 'References:' or 'In-Reply-To:', it was
a completely detached email with no link to any existing discussion,
either declared explicitly or implied by its content.

Your single line message seemed like it was asking: "Am I allowed to
bench-test this?"  As if we have the power to stop you.  Go ahead,
bench-test away!

As to why the stock OpenBSD implementation is written a particular way?
 Well, likely a big part of it is wanting the code to behave the same
way in multiple scenarios, e.g. gcc vs clang, AMD64 vs ARM64 vs i386 vs
mips64 vs sparc vs … you get the picture.

Assembly is the "fastest" option, but requires one "implementation" for
each processor architecture, and receives no benefit from improvements
in optimising compilers.

C means it's written *once* and ideally will perform identically for all
systems, whilst also being easier to understand and maintain.  If a
problem is found on AMD64 for example, it's merely testing a fix already
committed there on other architectures to ensure they don't break.
Versus fixing it about 6 or 7 times, each time figuring out how to
express the same "fix" in _that_ processor's assembly dialect.

I think it naïve to assume that an implementation written to run faster
on one processor architecture and compiled with one compiler will
universally run faster on all other processor+compiler combinations.

Anyway, I've spent more words on this than I care to.  So if you don't
mind, I'll be instructing my email client to ignore this thread from
here on in.

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: strlcpy version speed tests?

2020-06-30 Thread Stuart Longland
On 1/7/20 11:18 am, Luke Small wrote:
> I made a couple different versions if anybody is interested!

You don't need our permission…
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: OpenBSD Qemu

2020-05-24 Thread Stuart Longland
On 25/5/20 8:34 am, abed wrote:
> Sorry what kind of details you guess we need?
> 
> Host OS: FreeBSD 12.1
> 
> VMM: Qemu 5.0.0 (compiled from source)
> 
> Guest OS: OpenBSD 6.7
> 
> qemu-system-x86_64 -m 2048 \ -cdrom cd67.iso \ -drive
> if=virtio,file=disk.qcow2,format=qcow2 \ -enable-kvm \ -netdev
> user,id=mynet0,hostfwd=tcp:127.0.0.1:7922-:22 \ -device
> virtio-net,netdev=mynet0 \ -smp 2

Maybe direct a virtual serial port to a telnet port in QEMU, use
`telnet` within `script` to log everything seen there and tell OpenBSD
to use serial console on aforementioned serial port?

That might give us a `dmesg` dump to work with at least.  If it really
is interaction with the video console that causes it, maybe pressing
some keys on said console will trigger it with the log messages going to
the virtual serial port?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: OpenBSD insecurity rumors from isopenbsdsecu.re

2020-05-11 Thread Stuart Longland
On 11/5/20 5:00 am, i...@aulix.com wrote:
> Btw, does not it look like a PR competition of Linux from USA vs OpenBSD from 
> Canada/London?

Actually, I think you'll find both OSes have significant contributions
from all around the world.

Linux (which is a kernel, not an OS) originated from Finland.

BSD came from the US (University of California), but most of today's
implementations have been very significantly changed since then.

In any case, I don't think it's helpful to characterise an OS by its
country of origin.  Even less so, when it's an open-source OS with
contributions that are sourced globally.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

Help fund COVID-19 research:
https://stuartl.longlandclan.id.au/blog/2020/04/20/who-covid19/



Re: socket I/O on openbsd

2020-04-21 Thread Stuart Longland
On 22/4/20 11:48 am, Gustavo Rios wrote:
> Dear gentleman,
> 
> i have the an ANSI C code that do the following:
> 
> 0. open a socket
> 1. write data to the socket
> 2. close the writing end of the socket
> 3. read data from the socket
> 4. close the read end of the socket
> 
> The the step number 4 returns an error, why ?
> 
> Here it is (Only the relevant part of the code )
> 
> if (!r) r = apx_connect(s, );
> if (!r) r = pmp_set(, 1ul, );
> if (!r) r = pmpsend(s, );
> if (!r) r = apx_shutdown(s, shut_wr);
> if (!r) r = pmprecv(, s, );
> if (!r) r = apx_shutdown(s, shut_rd);
> 

Dumb question this way…

> vk4msl-gap$ man apx_connect
> man: No entry for apx_connect in the manual.
> vk4msl-gap$ man apx_shutdown
> man: No entry for apx_shutdown in the manual.

what's `apx_connect` and `apx_shutdown`?  There's some library here you
are not telling us about.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: strncasecmp

2020-04-11 Thread Stuart Longland
On 12/4/20 11:39 am, zeurk...@volny.cz wrote:
> "Stuart Longland"  wrote:
>> On 11/4/20 2:30 am, zeurk...@volny.cz wrote:
>>> https://doomwiki.org/wiki/Absurd texture name in error message
> 
> No, what I wrote is:
> 
>> 'https://doomwiki.org/wiki/Absurd texture name in error message'
> 
> World of difference. To a UNIX guy.

Ohh, I did see the quotes, that's what made me try the URI with spaces
after seeing the 404 page.

> Seems like some people eat everything the WWW n00bs emit, right up to
> and including a turd.
> 
> What's next? All list messages in quoted-unreadable? C'mon.

doomwiki should not be using such characters in their URIs.  I'm not
blaming you for their presence by the way.  Had they done the right
thing in the first place, the quotes would never have been needed. :-)
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: strncasecmp

2020-04-11 Thread Stuart Longland
On 11/4/20 2:30 am, zeurk...@volny.cz wrote:
> https://doomwiki.org/wiki/Absurd texture name in error message

https://doomwiki.org/wiki/Absurd%20texture%20name%20in%20error%20message

Seems some people don't understand URIs…
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Ports: how to install dependencies from binaries?

2020-04-07 Thread Stuart Longland
On 8/4/20 1:29 pm, Daniel Jakots wrote:
> https://man.openbsd.org/bsd.port.mk#FETCH_PACKAGES but it doesn't work
> very reliably, sadly.

Many thanks Daniel and Raf, must've missed seeing that.  I'll give it a
shot and see how we go.  Even if it works 30% of the time, it should
speed things up a bit.

-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Ports: how to install dependencies from binaries?

2020-04-07 Thread Stuart Longland
Hi all,

Silly question… how do you install the dependencies of a port from
binaries automatically?

Situation is this: I'm wanting to add OPUS support to Asterisk as I have
an ATA that supports this CODEC, it'd nice to be able to transcode this
to other formats.  I have a work-in-progress patch to the 'asterisk'
port for doing this (modelled on what's being done for 'asterisk-speex')
that I'll share once I've done some testing on both versions.

I have two VMs running, one with OpenBSD 6.6 (which I am running on my
router) and one with OpenBSD current (snapshot made on Monday).

`make install-all` in the `asterisk` port seems to want to drag in the
kitchen sink.  The only thing I really want to compile is Asterisk
itself (with my patch).

Is there a command that installs the ports' build dependencies via
`pkg_add` or do I need to extract the dependencies by other means and
manually install them?

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: npppd pptp hangs

2020-03-23 Thread Stuart Longland
On 23/3/20 10:26 pm, Marko Cupać wrote:
> Anything I can do to avoid future hangs?

Whilst probably not the answer you're looking for: moving away from PPTP
would be a good start.

The MSCHAPv2 authentication used in PPTP is vulnerable to dictionary
attacks and the RC4 cipher used in MPPE (the security layer of PPTP) is
laughably weak in today's security context.  Whilst MSCHAPv2 can be
replaced with EAP-TLS, there's no fix for MPPE.

IPSec (which is built into OpenBSD) or OpenVPN (in ports) would be
vastly superior options.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: experience setting up a low memory machine

2020-03-11 Thread Stuart Longland
On 15/2/20 6:43 pm, Dumitru Moldovan wrote:
> Not really, about 21 years ago I was learning to get XFree86 working,
> to break free from the console on a desktop with 24MB of RAM.

It's all relative… I can recall years ago experimenting with operating
systems on old machines (even by that day's standards)… trying to get
Slackware Linux running in 4MB RAM.

Today, I'm trying to cram stuff into 32kB of RAM and thinking how 4MB
and a MMU would be luxury!  (Even RetroBSD needs 128kB.)

I'm sure someone on here will tell me how they used to flip switches on
a front panel to fill the whopping 128 bytes of RAM on their 8080 with
machine code whilst dreaming of a punched tape loader and a few more
DRAM chips.

I would suggest any "modern" multi-tasking general purpose OS such as
OpenBSD, Linux, etc, you're looking at a minimum of 256MB RAM.  In the
future, probably consider doubling that… and again.

I have an old PII 300MHz laptop with 160MB RAM, and while it boots Linux
just fine (I had it running Gentoo doing AX.25 packet radio stuff),
firing up a web browser (Firefox) to check the weather is unusably slow.

I could throw OpenBSD on it, but not sure that would really make much
difference: kernel re-linking is going to be painful on that machine.

Sometimes it's better to realise when something has past its prime.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Catastrophic

2020-02-28 Thread Stuart Longland
On 28/2/20 11:32 pm, Justin Noor wrote:
> Thanks for offering to help and sorry for the delay - I got dragged into a
> work emergency. I finally managed to SCP my dmesg to a remote machine.

Heh, no problems, these things happen.

> As a refresher I have a 6.6 current machine that crashes when X is running,
> and almost instantly when Firefox is running - it runs fine without X. The
> machine becomes totally frozen - I have to perform a forced shutdown to
> exit this state. The issue appears to be graphics related and is
> inconsistent - sometimes it crashes immediately, other times it does not.

Sometimes it might be the way a particular graphics toolkit "tickles"
the video hardware too.  For instance FVWM uses libxcb for drawing
graphics which means you're likely to be just working with 2D primitives.

Then Firefox with its GTK+ back-end fires off a few RENDER extension
requests to the X server and whoopsie!  Down she goes!

> There are indeed some "unknown product" messages related to my PCI graphics
> card in my dmesg, but I haven't been able to decipher them yet. Those
> usually mean the device is not supported, but it is, and I'm sure I have
> the correct driver (amdgpu0). Previously I had no issues for months, which
> is why I suspected hardware failure. Admittedly I've been lucky with
> graphics cards over the years, and don't know much about PCI.

No issues for months running a previous version of OpenBSD or the same
you're running now?

One suggestion I made too was to maybe try setting up a serial console
link… turns out the motherboard makers know how to tease:

> com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> com0: probed fifo depth: 0 bytes

That says there is a RS-232 port somewhere… so I had a look at the handbook:
https://dlcdnets.asus.com/pub/ASUS/mb/SocketAM4/ROG_STRIX_B450-I_GAMING/E14337_ROG_STRIX_B450-I_GAMING_UM_PRINT.pdf

They didn't wire it up to a pin header, which is annoying.

On the video front, I did see this:
> initializing kernel modesetting (POLARIS11 0x1002:0x67EF 0x1002:0x0B04
> 0xE5).
> amdgpu_irq_add_domain: stub
> amdgpu_device_resize_fb_bar: stub
> amdgpu: [powerplay] Failed to retrieve minimum clocks.
> amdgpu0: 1360x768, 32bpp
> wsdisplay0 at amdgpu0 mux 1: console (std, vt100 emulation), using wskbd0
> wskbd1: connecting to wsdisplay0
> wsdisplay0: screen 1-5 added (std, vt100 emulation)

The "stub" messages make me wonder if we're hitting some
not-yet-implemented features.  That "failed to retrieve minimum clocks"
has been seen on Linux as well, and there it was related to PCI prefetch
register programming.

The machine you've got isn't much different to what I have at work
actually: Rysen 7 1700 (so previous generation), and a RX550 video card
(POLARIS12, maybe slightly newer?)… the machine is fitted with a RS-232
serial port so I might try a little experiment with a USB stick and see
if I can install OpenBSD 6.6 to USB storage and try to reproduce the crash.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: What TERM fixes Emacs?

2020-02-27 Thread Stuart Longland
On 26/2/20 9:46 pm, Marc Espie wrote:
> (these days, new OS versions will all use the same termcap source, so you're
> probably safe on anything released over the past 5 years)

Just thinking… a suitable work-around for such OSes would be to set the
following in ~/.ssh/config:

Host my.old.host
 SetEnv TERM=vt220

Note I haven't tested this to see if it works, just read `man
ssh_config`.  Obviously this doesn't help with other use cases like
`telnet`.  For those, one could do `TERM=vt100 telnet foo.example.com 1234`.

If newer OSes already understand TERM=pccon, perhaps in the medium term
it might be worth reviewing this default setting.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: What TERM fixes Emacs?

2020-02-27 Thread Stuart Longland
On 25/2/20 5:09 pm, Maurice McCarthy wrote:
> On 25/02/2020, Emilia  wrote:
>> It is impossible to use Emacs on OpenBSD Terminal (no X).
>>
> 
> OpenBSD does not do non-X versions of ported software so even if you
> dont use X as such it still needs to be in the base install.
> 
> HTH
> (I've had my backside reamed over this more than once!)
> 

I find OpenBSD without X installed works well enough.  If you're
sticking to largely base applications and GUI-less ports, you can get
away without X installed.

Not sure if it's possible for the selected package sets to install a
"virtual" package in the pkg_* tools' database that the packages can
depend on; so pkg_add squawks if you try to install a GUI application
without the relevant base package.

That said, there's only so much free time someone can devote to testing
such a set-up, so the current arrangement of "sure, omit X but
dependencies on it are your problem" is workable.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: suggestions for USB printer (maybe even with scanner)?

2020-02-18 Thread Stuart Longland
On 6/2/20 7:26 am, Adam Thompson wrote:
> I don't know what you need in a printer, and I don't know what you mean
> by cheap, so... YMMV.
> 
> However, I've found Brother **LASER** printers to be very good, and most
> of them support PCL6 and/or PS3.
> For example, the HL-L2370DW can only connect via USB, and supports PCL6,
> and currently sells for ~C$150-160.

Somewhat related, does this hold true for their Ethernet-connected
printers as well?

We have an Epson WF-7510 which is due for replacement and while I can
set up OpenBSD on a small box to act as a print server, having something
I can point OpenBSD's lpd or cups at over a network is helpful too.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Awaiting a diff [was: Re: File systems...] Probably not gonna happen anyway

2020-02-12 Thread Stuart Longland
On 13/2/20 5:17 am, jeanfrancois wrote:
> Good evening,
> 
> Very good videos are available from one of the developer of EXT2/3/4
> recommended to see.
> 
> https://www.youtube.com/watch?v=2mYDFr5T4tY
> 
> OpenBSD's FFS code looks awesome.

It's mature, and not worth chucking out anytime soon as it'll be much
more stable than any effort to port ${FANCYFS} will be.

About the only big complaint I've heard about it is that there's no
journaling which slows down boot times after an unclean shut-down
(particularly for larger volumes).  This does concern me, but not
greatly at this point.

It's on my rather large back-log to look at, some time in the future
unless someone beats me to it.  (Contrary to others' research, pet
Python projects is not my sole software development experience.)

As it happens there's two ways I can scratch my itch (management of
OpenBSD disk partitions):

1. get OpenBSD to run on a FS that the tools I have¹ understand
   (side-benefit: OpenBSD gains support for a journalled FS)
2. get the tools I have to understand OpenBSD disklabels + ffs
   (side-benefit: people would be able to re-arrange² partitions)

As this thread already struck a few raw nerves last time, I would
suggest if there's any interest, we can collectively discuss it off-list.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

¹. Mainly what I miss is a tool for re-arranging partitions.  gparted
has served me well for this purpose.
². Primarily the goal here being that a user can "move" partitions
around to re-organise free space.  Right now one can "grow" a partition,
but shuffling the partitions around is not easily possible without
daring unsupported and dangerous acts using `dd`, `disklabel` and `growfs`.



Re: Catastrophic

2020-02-09 Thread Stuart Longland
On 27/1/20 11:59 pm, Justin Noor wrote:
> I am unable to send any log files or anything. I had to send this
> email from a different machine. I can take pictures of log files and
> transfer the information, but I'm not sure where to start.

A `dmesg` before the crash would at least tell us whether there's
problematic hardware/drivers in use.  Even though it's not taken at the
moment of the crash doesn't mean it's worthless.

Has the machine got a serial port?  Maybe you could hook that up to a
logging terminal emulator on another computer via a null-modem cable?
(It may need to be a PCI(e)-connected serial port rather than USB, not
many OSes support serial console over USB due to the complexities of USB
itself.)

Maybe you could configure syslogd(8) to send its logs via UDP to a
syslog on another computer?  It might not catch the very last log
messages, but maybe might capture enough?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: SSIZE_MAX

2020-01-16 Thread Stuart Longland
On 16/1/20 7:35 pm, cho...@jtan.com wrote:
> I would guess this is part of the reason why ssize_t was invented
> - so that half of the numeric range could be wasted in order for a
> function to be able to return -1, and/or ridiculous notions of
> symmetry.

Actually it is used with fseek… in particular the case where
whence=SEEK_CUR.  It allows you to go backwards relative to the current
file position.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Awaiting a diff [was: Re: File systems...]

2020-01-08 Thread Stuart Longland
On 9/1/20 12:20 pm, Theo de Raadt wrote:
>> and the answer now becomes you are hardly qualified for such kind of
>> work.
> I suspect you are also unqualified.
> 

You don't become qualified by writing words on a mailing list… and while
I acknowledge a lack of experience in the area, I do understand the
risks involved and I am willing to give it a try.  ffs is not going
anywhere any time soon.

Contrary to recently-expressed opinion, I have done kernel-level and
bare-metal coding before.  OpenBSD isn't the only OS kernel in existence.

Those interested in helping out: contact me off list, there is little to
be gained by discussing it here.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Awaiting a diff [was: Re: File systems...]

2020-01-08 Thread Stuart Longland
On 9/1/20 12:56 am, Ian Darwin wrote:
>> - If we could clean-room implement a BSD-licensed
>> EXT3/EXT4/BTRFS/XFS/JFS/whatever, following style(8), would there be
>> interest in supporting that in OpenBSD?
> 
> And which "we" are you referring to here? Did you mean yourself,
> or are you hoping that "somebody" will do it?

I'm hoping it will be more than one person assisting in this, and yes, I
include myself in that group.

Can't commit to doing anything right away, but it'll be slotted
somewhere in the back-log.

>…

>> ZFS and BTRFS are much newer, and more complicated with software RAID
>> functionality built in.  I think these would be harder to implement from
>> scratch.
> 
> Persuade the owners to release under an ISC license. Then send a diff.
> 

Yeah, I think there's been discussions about changing the license (to
GPL for Linux kernel use) and those came to a dead end.  I don't see the
copyright holders being receptive to ISC either.

-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



File systems [was Re: OpenBSD's extremely poor network/disk performance?]

2020-01-08 Thread Stuart Longland
On 8/1/20 1:25 am, Karel Gardas wrote:
> And yes, ffs performance sucks, but nor me nor you provide any diff to
> change that so we can just shut up and use what's available.

Okay, question is if not ffs, then what?

- Other BSDs have ZFS… is it viable to port that to OpenBSD?  (Maybe
it's been done before?  I didn't check.)
- FreeBSD has UFS2, DragonFlyBSD has HAMMER…  Could we borrow their code?
- If we could clean-room implement a BSD-licensed
EXT3/EXT4/BTRFS/XFS/JFS/whatever, following style(8), would there be
interest in supporting that in OpenBSD?
- Or do we implement yet another file system?  (Seems like too much work
for not much gain IMO.)

There's merit in the third option, OpenBSD already supports EXT2 (which
is also 90's vintage like ffs) as there are some platforms (e.g.
loongson) that require it.  I run BTRFS on a lot of my Linux machines,
and aside from some features that are still experimental (quotas being
one such issue), it seems to do the job.  I've also been a big XFS user
in the past.

Performance seems good and XFS in particular has seen widespread
production use, particularly in high-performance computing arenas.  (SGI
didn't exactly do things small!)

EXT4 is also very widespread and stable, and seems to offer decent
performance.

ZFS and BTRFS are much newer, and more complicated with software RAID
functionality built in.  I think these would be harder to implement from
scratch.

DIY file systems doesn't seem like a good plan for success… it'll be a
lot of work, won't be compatible with anything else, and could be as bad
if not worse than what we have now, whilst also being untested.  ffs is
at least mature and stable!

Are any of the "modern" file systems (from a design perspective,
licensing is a different matter) suitable for use as OpenBSD's root fs?
 What would be needed?

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: perl popularity inside openbsd community? (Re: Suggestion: Replace Perl ...)

2020-01-03 Thread Stuart Longland
On 3/1/20 8:31 pm, Marc Chantreux wrote:
>> Any modern mailreader can easily tag messages as thread, so it's trivial to
>> avoid a given thread, as long as people don't fuck around with the
>> In-Reply-To info.
> 
> i have to admit this isn't an argument: if most of the people don't read
> it, we should have the ability to save bandwidth by setting up a temp
> list or adding a + alias. i add this in my todolist.

No rush… + suffix sounds a cleaner solution than hash tags. (looking at
you groups.io!)
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: perl popularity inside openbsd community? (Re: Suggestion: Replace Perl ...)

2020-01-02 Thread Stuart Longland
On 2/1/20 9:43 pm, Marc Chantreux wrote:
> arf ... i just tried to explain were this "linenoise" bullshit came from
> just in the answer i gave to frank

Yes well, my point is if you want to make a piece of code
incomprehensible, I don't think there is a language that will stop you.

I had a colleague who used to argue "that code was hard to write, it
should be hard to read too!" -- completely forgetting the poor sod that
had to come behind him and maintain his code.

It's a choice of the writer to write code that's hard to understand.
Perl is a very expressive language, and can be used to write very clean
and maintainable code.

I think the "there's no right way" mantra helps: it allows you the
latitude to choose the style that makes the most sense for the problem
being solved.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: perl popularity inside openbsd community? (Re: Suggestion: Replace Perl ...)

2020-01-02 Thread Stuart Longland
On 2/1/20 8:48 pm, Marc Espie wrote:
>> I've seen some pretty ugly Python code too.
> Not to beat a dead horse, but most of the python configury stuff,
> including scons, is pretty shitty.   Lots of really bad pseudo-OO stuf
> (hey let's use that cool feature just because we can)

Yeah, you won't get any disagreement from me on that front.

I prefer make (usually I use the GNU dialect, but that's just borne out
of what I normally have to support), and maybe CMake for more complex stuff.

scons, waf, and others… seem to cause more problems than they solve.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: perl popularity inside openbsd community? (Re: Suggestion: Replace Perl ...)

2020-01-02 Thread Stuart Longland
On 3/1/20 8:50 am, Marc Chantreux wrote:
>> Like this thread, or worse?
> * long doesn't mean endless
> * sharing points of view is never sterile (yours is inspired by other
>   ones, right?)

I would say it's been highly educational.

Granted, this did not get off to a good start with the "let's replace
Perl with Lua" debate, but it has piqued my interest in what the Raku
team are up to.

It's pointed out style(9) which I'm having a read of now.  Having gotten
familiar with the Linux kernel coding style and the coding style used in
OpenThread, it's helpful sometimes to look at how others do it, as
sometimes you can learn something that ultimately makes your life easier.

There's a valid point about whether this is the appropriate forum for
this.  Question is, if not here, then where?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: perl popularity inside openbsd community? (Re: Suggestion: Replace Perl ...)

2020-01-02 Thread Stuart Longland
On 2/1/20 12:30 am, Marc Chantreux wrote:
> * the python community was unfair comparing the langages (using ugly
>   perl code and nice python counterparts). instead of taking time to
>   explain all the biases, perl community repetedly asserted that the
>   authors of those article were incompetents and gone away.

Heh, I've heard Perl described as executable line noise, and for sure,
it will let you write code like that.

But so does C.  There's even a contest for doing exactly that.

I've seen some pretty ugly Python code too.

If you set out to write ugly code, you will get ugly code, doesn't
matter what the language is.  If you set out to write a thing of beauty,
it can be that thing of beauty.

It's more a factor of the programmer involved and their skill, rather
than any fault of the language in most cases.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: perl popularity inside openbsd community? (Re: Suggestion: Replace Perl ...)

2020-01-02 Thread Stuart Longland
On 1/1/20 9:08 pm, Marc Espie wrote:
> On Tue, Dec 31, 2019 at 10:36:15PM +0100, Anders Andersson wrote:
>> Of course its age is showing in some areas but in my experience, those
>> things are actually still worked on, and have been fixed without major
>> incompatibilities (python3 anyone?).
> The only thing that's really missing in perl is proper thread support.
> Don't know if that's going to happen.

To be fair, Python and NodeJS are pretty terrible at threading too.
Python has the Global Interpreter Lock.  NodeJS has worker threads, but
they're pretty limited in what they can do IIRC compared to the main thread.

Depending on what you're doing, this can matter a lot, or very little.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

2019-12-31 Thread Stuart Longland
On 1/1/20 6:06 am, Christer Solskogen wrote:
> On Tue, Dec 31, 2019 at 5:50 PM Marc Espie  wrote:
> 
>> We did retire vax, and we no longer have any platform without dynamic
>> libraries.
>>
>>
> OT but: out of sheer curiosity, why didn't VAX support dynamic libraries?
> 

Did vax have an MMU?  That'd make dynamic libraries tricky I'd imagine.

-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

2019-12-31 Thread Stuart Longland
On 1/1/20 3:13 am, danieljb...@icloud.com wrote:
> I'm curious to know if there are any languages other than C and perl in
> use in OpenBSD base.

/bin/sh?

*ducks*

-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

2019-12-31 Thread Stuart Longland
On 31/12/19 10:57 pm, Daniel Boyd wrote:
> As one of the few remaining people out there who considers perl to be their 
> favorite language—starting to wonder if it’s just me and Larry Wall at this 
> point—I’d like to say that perl should stay in base on its merits, all the 
> perl-based system tools notwithstanding.

I coded a lot in Perl before moving onto PHP and other languages… the
only time I've done lots with Java was when I was at university.

Perl was definitely my first taste of coding for a Unix-like operating
system, having previously been solely exposed to variants of BASIC prior
(QBASIC, CA Realizer BASIC, VisualBASIC).  (Sorry Dijkstra, some of us
*do* move beyond that language.)

C++ and Haskell were other languages I learned at university.  C did
feature in my lectures, but I don't consider two slides describing the
syntax of "if", "for", and various variable data types as being
"instruction".  Had I not learned C++ or dabbled with C prior to uni,
I'd be stuffed in the subjects that needed C knowledge.

Python I had dabbled with, but only started using recently because of my
current workplace.  They needed a metering product, and the choices of
language offered to me were Python and PHP; being a cron-based service
doing lots of serial port I/O, I chose Python.  These days I do lots in
that language.

I'd have chosen Perl5 at the time if it were on the table, there is
nothing wrong with it, it is stable and mature.  Just that it is no
longer "trendy".

That said, choosing a language because of its popularity is totally the
wrong approach.  It's a question of whether it is suitable for the job.
 Notably, are there libraries of sufficient quality that you can utilise
to get the job you're after done quickly.

Python has pypi.  Perl has had CPAN for ages.

Perl 6 will be a major change though, more disruptive than the Python2→3
mess was.  So we may be in for some "fun" in the near future.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Suggestion: Replace Perl with Lua in the OpenBSD Base System

2019-12-31 Thread Stuart Longland
On 31/12/19 3:54 pm, Marc Espie wrote:
> Contrary to what some people might think, the tools in question won't be
> easier to understand and manage if written in another language.

I'm of the opinion that "if it ain't broken, don't fix it".  What is
"broken" about Perl that we're trying to fix with a replacement (whether
it be Lua, Python, NodeJS, Ruby, PHP, TCL, alb, BASIC … or something else)?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Advices on AD implementation with OpenBSD

2019-12-26 Thread Stuart Longland
On 27/12/19 5:26 am, Fabio Martins wrote:
> I am drawing a scenario to replace the Windows 2003 Server with OpenBSD,
> acting as AD/DC and firewall. There is a need to share folders and
> printers, restrict access to folders based on logins, and no GPO are
> needed at all.
> 
> Is it possible with the current samba+winbind?

It's a pretty recent of samba in current OpenBSD (4.9.17 in OpenBSD
6.6)… not sure the instructions for setting up a Samba AD DC differ much
whether it be Linux or BSD as the underlying OS.

It's been some time since I did an AD DC with Samba 4 on Ubuntu 14.04,
but I don't recall too much that was Linux-specific.  Possibly PAM
integration, and that's only relevant if AD users are going to be
logging in to the box.

I'd probably commandeer a couple of test victims and set up a dummy
network to trial the concept first before rolling it out.

If need be, do that with a Linux-based AD DC since there are guides for
doing exactly that, then try on OpenBSD, hopefully having done it once
on a "reference" OS it shouldn't be hard to remove the Linux-isms from
the process.

That said, I seem to recall that ActiveDirectory required that you keep
file/print servers separate from domain controllers.  Even on Windows I
hear it's recommended to keep the functions separate.  Maybe vmm can be
pressed into service to run the DC with the host doing file/print server
duties?  (Maybe vmm is performant enough I/O wise to be a functional
file/print server?)

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Re-organising partitions without re-installation

2019-12-25 Thread Stuart Longland
On 25/12/19 10:30 pm, Sriram Narayanan wrote:
> On Wed, 25 Dec 2019 at 7:41 PM, Stuart Longland 
> wrote:
> 
>> Both VMs should probably be re-built from scratch as a matter of sanity,
>> but I can do that at leisure now, what I have, works.
> 
> 
> What hypervisor are you using? Does it support an API to create VM from ISO
> images and to launch VMs from templates?

I'm using OpenNebula atop Linux KVM with a Ceph storage back-end.
https://hackaday.io/project/10529-solar-powered-cloud-computing

It does have templates, but only one of the VMs concerned are actually
being managed by OpenNebula (my own; sjl-router).

The other (corerouter) is actually a bare KVM virtual machine managed
outside OpenNebula as the plan was to set up corosync to auto-migrate it
and the VM that runs the OpenNebula front-end between the two compute
nodes.  Since it is the route by which the OpenNebula VM reaches the
host nodes, it can't be managed by OpenNebula.

So templates are not a solution.

…
> This would help you to cut over when needed, cut back in case of issues,
> and have the ability to recover thanks to your automation.

It would, and if I were managing dozens of them all with a largely
identical pattern, I'd definitely look into it.

My VMs tend to be pets, not cattle¹.  They're all highly specialised to
the task they're performing and none of them are really alike, so
templating really doesn't work in that context.

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

1.
http://cloudscaling.com/blog/cloud-computing/the-history-of-pets-vs-cattle/
 (In truth, my hosts are also pet-like, because I only have a small
number of them.)



Re: Re-organising partitions without re-installation

2019-12-25 Thread Stuart Longland
On 24/12/19 9:16 pm, Dumitru Moldovan wrote:
> Maybe it would be worth mentioning in the FAQ?  I could only find it
> here: https://www.openbsd.org/faq/upgrade63.html, but then it was not
> mentioned for newer releases.
> 
> Another remedy is to follow the `Files to remove` section in the FAQ,
> e.g. for 6.6: https://www.openbsd.org/faq/upgrade66.html#RmFiles.  The
> FAQ article for the 6.3 upgrade suggests sysclean does that too.  This
> seems to be a byproduct of the design, meaning it doesn't specifically
> remove those files, but it should remove them, as long as all installed
> packages are updated and no longer need them.  But this is just my
> reading of the sysclean man page.

Yeah I had done that… actually for another router VM I had to do a very
brutal equivalent of it when it ran out of disk space mid-update in the
installer… I basically blew away /usr/* (minus directories that are on
different partitions like 'local') figuring it'd re-instate the files
when it unpacked the newer file sets.

This lead to some missing files in /usr/share/relink but I was able to
re-instate those from another 6.6 VM that did update cleanly
(ironically, the very one that prompted this discussion).

So far, both have now run `syspatch`, and I've got kernel re-linking
working on both now.  We shall see.

Both VMs should probably be re-built from scratch as a matter of sanity,
but I can do that at leisure now, what I have, works.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Re-organising partitions without re-installation

2019-12-23 Thread Stuart Longland
On 24/12/19 12:51 pm, Edgar Pettijohn wrote:
> 
> On Dec 23, 2019 4:42 PM, rgci...@disroot.org wrote:
>>
>> December 24, 2019 4:42 AM, "Dumitru Moldovan"  wrote:
>> one thing that is useful is sysclean(8)
>>
>> my process now after a doas sysupgrade is
>> 1) doas sysclean; and review the output
>> 2) vise /etc/sysclean.ignore; so that sysclean ignores special files i 
>> created
> 
> Just wanted to emphasize step 2 above or else you will delete stuff you 
> shouldn't.

Yes, I just installed it, and ran it through `tee` so I could review the
delete list before I passed it to `rm` (and manually edit it).  There
were a few configuration directories in `/etc` for non-base stuff (e.g.
`collectd`'s password file, `vpnc`, etc) that I had to prune out and add
to /etc/sysclean.ignore.

That put a dint in the used space:
> sjl-router# df -h
> Filesystem SizeUsed   Avail Capacity  Mounted on
> /dev/sd0a  129M   77.8M   44.6M64%/
> /dev/sd0k  472M   28.0K448M 0%/home
> /dev/sd0d  198M   50.0K188M 0%/tmp
> /dev/sd0f  2.3G1.2G   1022M55%/usr
> /dev/sd0h  2.1G324M1.6G16%/usr/local
> /dev/sd0j  1.3G2.0K1.2G 0%/usr/obj
> /dev/sd0i  1.0G2.0K974M 0%/usr/src
> /dev/sd0e  209M   73.2M125M37%/var

I can understand the update tool being conservative about what it
deletes, who knows what is linked to those .so files without scanning
each and every ELF binary?  (hello Gentoo revdep-rebuild!)  Keeping them
there is definitely the KISS approach.

I'm just re-running `syspatch` to see if I can get the remainder of the
patches in.  If this fails, I might see if I can dig up some docs on how
this disklabel and ffs stuff works and see if I can teach `gparted`
about it.  Something tells me it's not the complicated mess that LVM2
is, and it handles that just fine.

Many thanks all.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Re-organising partitions without re-installation

2019-12-23 Thread Stuart Longland
On 24/12/19 8:42 am, rgci...@disroot.org wrote:
>> My understanding is that this is by design. In an update, some libs are
>> overwritten (if they keep the same file name), but others are left on
>> disk (theoretically unused) when lib versions are incremented. I can
>> see a few ways in which this eases updates for people following
>> -current, such as the OpenBSD devs, so it's a small price to pay.
> one thing that is useful is sysclean(8)
> 
> my process now after a doas sysupgrade is
> 1) doas sysclean; and review the output
> 2) vise /etc/sysclean.ignore; so that sysclean ignores special files i created
> 3) doas sysclean | xargs doas rm -rf
> 
> yorosiku ~

Where do you get `sysclean` from?  I don't seem to have it:
> sjl-router# man sysclean  
>   
> man: No entry for sysclean in the manual.
> sjl-router# which sysclean
> which: sysclean: Command not found.

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Raspberry Pi question

2019-12-23 Thread Stuart Longland
On 24/12/19 6:17 am, Strahil Nikolov wrote:
> В неделя, 22 декември 2019 г., 20:15:20 ч. Гринуич+2, Stuart Longland 
>  написа: 
> On 23/12/19 4:03 am, Strahil Nikolov wrote:
>>> did anyone try to install openBSD on Raspberry Pi 4B ?
>>> I know it's not supported , but maybe it does work :)
>> Or maybe not as it's a very different SoC.
> 
>> Core might be an ARM, but it'll have its peripherals in different places
>> to that of the Pi 3 and an OS kernel won't be smart enough to figure
>> that out without being told.
> 
> thanks for the reply.
> 
> So far I have been using only x86_64 and everything was "ready to go",and I 
> have never thought about that.

Yep, common issue when someone that's used to IBM PC compatibles starts
playing with RISC platforms.  Particularly when they start playing with
ARM, MIPS, SuperH or Motorola 68k, because those CPUs were widely used
in many otherwise incompatible hardware designs.

Anyone who had played around with the Apple II and Commodore 64, would
have noted that almost no non-trivial programs worked on both platforms
unmodified even though both machines sported the MOS6502 CPU as brains.
 (C64 had the VIC-II graphics IC but the Apple II bit-banged its video
output for example.)

Basically nearly all x86 computers you see are built around the standard
defined by IBM when they released their first PC, so the CPU boots up in
"real mode" where it pretends to be an overclocked Intel 8086; there's a
"BIOS" in non-volatile storage that provides a consistent environment
for an OS (these days just used by the boot-loader) and contains
routines for communicating with the peripherals needed.

The closest x86 comes to breaking away from that was the Apple MacBook
which uses UEFI firmware out-of-the-box and only included BIOS
compatibility by way of Apple Bootcamp.

> Any ideas if  Pi 4B will be supported, or I should stick with Linux.

Well, I won't speak for the person/team doing the Raspberry Pi port…

It's difficult to say though because Broadcom (who make the SoC in the
Raspberry Pi) do not publish much in the way of datasheets unless you've
signed an NDA with them, and they won't even enter into an NDA with you
unless you're going to be buying their parts in the 10s of thousands.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Raspberry Pi question

2019-12-22 Thread Stuart Longland
On 23/12/19 4:03 am, Strahil Nikolov wrote:
> did anyone try to install openBSD on Raspberry Pi 4B ?
> I know it's not supported , but maybe it does work :)

Or maybe not as it's a very different SoC.

Core might be an ARM, but it'll have its peripherals in different places
to that of the Pi 3 and an OS kernel won't be smart enough to figure
that out without being told.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re-organising partitions without re-installation

2019-12-21 Thread Stuart Longland
Hi all,

So, a few years ago now, I deployed a router VM with OpenBSD 6.1 AMD64.
 Later that got updated to 6.2, then 6.3, 6.4…

Yesterday I updated it to 6.5, then 6.6… now I'm trying to run syspatch:

> sjl-router# syspatch  
>  
> Get/Verify syspatch66-010_libcaut... 100% 
> || 20185 
> KB00:16 
> Installing patch 010_libcauth
> No space left on sd0a, aborting
> sjl-router# df -h  
> Filesystem SizeUsed   Avail Capacity  Mounted on
> /dev/sd0a  129M   98.0M   24.4M80%/
> /dev/sd0k  472M   28.0K448M 0%/home
> /dev/sd0d  198M   76.0K188M 0%/tmp
> /dev/sd0f  2.3G1.3G911M60%/usr
> /dev/sd0h  2.1G551M1.4G27%/usr/local
> /dev/sd0j  1.3G2.0K1.2G 0%/usr/obj
> /dev/sd0i  1.0G2.0K974M 0%/usr/src
> /dev/sd0e  209M119M   79.1M60%/var
> sjl-router# uname -a
> OpenBSD sjl-router.redhatters.home 6.6 GENERIC#353 amd64

8GB seemed like a reasonable amount for something that would just be
routing.  And looking at that `df` output, it would appear that there's
about 2.5GB locked away, in partitions that the original automatic
layout dictated I should have, but then didn't utilise.

I'm thankful I had the foresight of overruling its decision to allocate
space to /usr/X11R6… as this machine does not have X installed. (Why
would a router need that anyway?)

> sjl-router# disklabel sd0
> # /dev/rsd0c:
> type: SCSI
> disk: SCSI disk
> label: Block Device
> duid: d7b965d8cdeaeef2
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 1044
> total sectors: 16777216
> boundstart: 64
> boundend: 16771860
> drivedata: 0 
> 
> 16 partitions:
> #size   offset  fstype [fsize bsize   cpg]
>   a:   268416   64  4.2BSD   2048 16384  2097 # /
>   b:   373010   268480swap# none
>   c: 167772160  unused
>   d:   413056   641504  4.2BSD   2048 16384  3227 # /tmp
>   e:   435744  1054560  4.2BSD   2048 16384  3390 # /var
>   f:  5006848  1490304  4.2BSD   2048 16384 12958 # /usr
>   h:  4403456  6497152  4.2BSD   2048 16384 12958 # /usr/local
>   i:  2138976 10900608  4.2BSD   2048 16384 12958 # /usr/src
>   j:  2746048 13039584  4.2BSD   2048 16384 12958 # /usr/obj
>   k:   986208 15785632  4.2BSD   2048 16384  7674 # /home

Question is, how do I re-organise this space?  There is sufficient space
there.  /usr/obj and /usr/src are pretty much unused.  /usr/local could
be made smaller too as could /home.

OpenBSD has growfs(8).  I note it is called growfs and not resizefs nor
shrinkfs.  The steps I believe I'd need to perform are:

- shrink /home to 200MB
- re-locate /home to the end
- blow away /usr/src and /usr/obj
- shrink /usr/local to 1GB
- re-locate /usr/local to just before /home
- re-locate /usr to just before /usr/local
- re-locate /var to just before /usr
- re-locate /tmp to to just before /var
- now grow / to fill the available space

In days gone by, there was PartitionMagic for doing this.  Under Linux
today, there's gparted.

OpenBSD complicates things because it ignores the native disklabel
format of the host platform (i.e. MS-DOS disklabel / GUID partition
table) in favour of its own BSD slice system.  So such a tool has to not
only understand ffs, but it also must understand the BSD disklabel
embedded in the partition allocated to OpenBSD.

Re-installing is something I did under the following conditions:
- Before the existence of the aforementioned partition management tools
- When I *really* screwed up

I'm not after a GUI tool to do this (although some sort of visualisation
is helpful in my experience, I can also use a spreadsheet to work out
the numbers), but I really don't think "reinstall" should be the default
answer to all this as that is really a measure of last resort.

Is there such a tool for manipulating partitions in this manner?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: OpenBSD Errata: December 11th, 2019 (ldso)

2019-12-14 Thread Stuart Longland
On 15/12/19 9:04 am, Antoine Jacoutot wrote:
> On Sun, Dec 15, 2019 at 08:43:02AM +1000, Stuart Longland wrote:
>> On 14/12/19 7:49 pm, Frank Beuth wrote:
>>> OpenBSD doesn't have unit tests (or if they are, they're not in the main
>>> source tree). How does the project ensure that such wonderfully quick
>>> fixes don't introduce new bugs?
>>
>> I think what helps too is the KISS approach taken in the design of the
>> software… I think a concept that the Linux community is sadly losing
>> sight of.
>>
>> Simple code is much easier to patch, review and maintain.
> 
> Which should not be an excuse for a lacking test suite...

Well, off you go then. :-)  Get those butterflies¹ flapping.

The other nice thing about OpenBSD is the source code is right there, so
writing unit tests around that should be comparatively trivial.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

1. https://www.xkcd.com/378/



Re: OpenBSD Errata: December 11th, 2019 (ldso)

2019-12-14 Thread Stuart Longland
On 14/12/19 7:49 pm, Frank Beuth wrote:
> OpenBSD doesn't have unit tests (or if they are, they're not in the main
> source tree). How does the project ensure that such wonderfully quick
> fixes don't introduce new bugs?

I think what helps too is the KISS approach taken in the design of the
software… I think a concept that the Linux community is sadly losing
sight of.

Simple code is much easier to patch, review and maintain.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Openssh over a mobile network

2019-12-01 Thread Stuart Longland
On 1/12/19 11:43 pm, putridsou...@gmail.com wrote:
> I am not able to ssh into my home computer connected to
> router,  the client device (termux on android) is on a
> mobile network. Is there something I am supposed to 
> know?. Because I can ssh into my computer easily when
> when both devices are on the same router network. 

- Are you using the right address on your device?  If you have a DNS
hostname configured, check its A and/or  record points to the
correct IP address.  (This must be a publicly routable IPv4/IPv6 address
*NOT* be a RFC-1918 private IPv4 address or RFC-4193 ULA IPv6 address.)
- Is your OpenSSH server behind a router?  Is that configured correctly?
- Is your ISP (for the phone or your home computer) perhaps blocking
ports?  Try editing /etc/ssh/sshd_config and change the port to
something high, maybe 22222?

-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Skype alternatives for OpenBSD

2019-11-06 Thread Stuart Longland
On 7/11/19 4:23 am, Jan Stary wrote:
> On Nov 03 11:55:21, secli...@boxdan.com wrote:
>> Not sure about the original poster but I would be interested in any
>> end-to-end encrypted video/audio/chat programs that are available.
> 
> On this general purpose operating system,
> the following is in a base install:
> 
> aucat ... | ssh user@host 'aucat ...'
> video ... | ssh user@host 'video ...'
Latency and video-audio synchronisation might be a bit of a crap-shoot
with such a set-up.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Skype alternatives for OpenBSD

2019-11-04 Thread Stuart Longland
On 5/11/19 2:19 pm, Frank Beuth wrote:
> On Sun, Nov 03, 2019 at 11:12:48AM +, Andrew Luke Nesbit wrote:
>> On 03/11/2019 10:55, Frank Beuth wrote:
>>> Not sure about the original poster but I would be interested in
>>> any end-to-end encrypted video/audio/chat programs that are
>>> available.
>>
>> Have a look at Tox.  It might work out for you on a technical level.
> 
> Are Tox and/or Matrix available on OpenBSD? I only see a FreeBSD version
> of Tox,

http://openports.se/search.php?stype=description=Tox

> while 'matrix' is a fairly generic name so hard to say.

Searching "matrix instant messenger" took me to their site, and a short
amount of browsing took me to https://matrix.org/clients

None of those showed up in the OpenPorts listings, but you might be able
to compile at least one of them.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: OpenBSD and solid state disks

2019-11-03 Thread Stuart Longland
On 4/11/19 8:13 am, Raymond, David wrote:
> Thanks for the insight on SSDs -- sounds like there is not much of an
> issue with modern drives.

Well, you're at the mercy of the SSD firmware to "do the right thing"
and move the data around to ensure even wear levelling.  Most do.

The fact that you see SSDs on the consumer market that have 3 and 5 year
warranties on them (the 2TB Samsung in my laptop at home had a 10 year
warranty), suggests the manufacturers are either highly confident their
product will last (or at least confident their disclaimers will let them
off the hook).

In the last few years I've had a couple of SD cards wear out, and one
Intel 240GB SSD fail prematurely (it had a 3 year warranty, was about 12
months old at the time).

I had some fun initially claiming the warranty of the Intel as they
wanted a report from their Windows-only tool (hopefully their
engineering team have seen fit to produce a stand-alone bootable
version).  I was able to provide reports from `smartctl` on Linux.

After I pointed out that I didn't have Windows on this machine (and that
if I did, it would have gone up in smoke with the SSD failing), they
accepted this and replaced the faulty drive without further issues.

Like any storage technology, SSDs are not infallible.  Back up the data
you wish to keep regularly, and test your back-ups.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Skype alternatives for OpenBSD

2019-11-03 Thread Stuart Longland
On 3/11/19 11:27 pm, Jonathan Drews wrote:
> The woman offering the class uses Skype so I am probably going to have to use 
> Windows. I have a laptop with Windows 10 but I hardly ever use it. Windows is 
> a big step down in performance when compared to OpenBSD.
>  I thought Skype used a protocol that allowed other clients to connect to it 
> then I read the Wikipedia page on Skype. The technology is owned by Microsoft.

Yeah, Skype uses its own proprietary protocol.  Not sure if there's ever
been an effort to reverse engineer it.

Skype was a start-up company originally, which was then bought by eBay,
then later sold to Microsoft.  There was clients for Linux, MacOS X and
Windows years ago, not sure what their status is today.  I haven't
touched Skype myself since 2012, last time I did was on MacOS X 10.6.

I hear there's a WebRTC version.  If the browsers available for OpenBSD
are capable of this too, that might be your best bet, otherwise you're
more-or-less snookered: you'll have to run Skype either in a VM,
alternate OS on the same computer (dual-boot), or install it on a
separate computer.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Skype alternatives for OpenBSD

2019-11-03 Thread Stuart Longland
On 3/11/19 7:35 am, Jonathan Drews wrote:
> Is there an alternative to Skype that runs on OpenBSD? I looked in 
> http://openports.se/
> and didn't see anything. I want to take online classes nad need a video
> conferencingsoftware

Do you need any video conferencing software (i.e. the group running the
online class is willing to switch to whatever you can get working?), or
do you specifically need Skype?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



FVWM2 and alternatives [was Re: When will be created a great desktop experience for OpenBSD?]

2019-10-30 Thread Stuart Longland
On 29/10/19 7:43 pm, Walter Alejandro Iglesias wrote:
> Another long term fvwm2 user here.
> 
> I move my hands off the keyboard (to reach arrows, Pg*, Home, End, keys
> or the mouse) only when I'm forced to.  That's why the first feature I
> test in a window manager is its switch focus behavior from keyboard.  I
> usually bind this function to the popular Alt-Tab.
> 
> I tested and used lots of window managers for X, the only one that let
> me do what I want is fvwm2, this is why I've got stuck with it (13
> years ago and still counting) even when I don't agree with the insanity
> that means to have to learn a whole programming language to configure a
> window manager.

This seems to be a recurring theme.

I was a long-time KDE user, until about version 4… V3 was usable on the
PII 300MHz laptop I was using for uni studies at the time (yes, in
2006-2008 I was poor).

Notably, I was using its multi-key key binding features so that common
operations could be performed using combinations of keys hit in
sequence.  I was able to move windows around, switch applications,
launch applications, etc, without having to resort to using the
"joystick mouse" that the laptop featured, and could do it one-handed
whilst on the move back when the battery was working.

KDE4 broke that… coupled with bloated memory requirements which soon
filled the 160MB of RAM (which was all the SD-RAM my laptop could take),
soon had me on the move.  FVWM2 was the only one that could pull off
such flexibility -- and in the end, could do it far better.

Biggest gripe today is the removal of `FVWMTaskBar`, which so far I've
gotten `fbpanel` to largely replace (and in some ways, its systray
integration is better), but I'm not completely happy with this: with
current FVWM it seems to have problems positioning itself at the
top-border of the screen, and on the Raspberry Pi 3, I've seen it chew
significant CPU cycles, and configuring it is a pain.

I'm experimenting with Fluxbox at the moment on the Pi, not sure if it
has the keyboard handling functionality that FVWM2 does yet.

Others have raised concerns about the license of FVWM2 (GPLv2), which is
I understand a contributing factor as to why it's not in base.

So I guess this is the question… what features of FVWM2 are we aiming
for and what would an "ideal" window manager for OpenBSD look like?

- Flexible input binding handling: FVWM2 supports combination of
keyboard and mouse bindings, including gestures -- it'd be worth trying
to mimic as much of this functionality as possible.
- Scripting: FVWM2 has its own scripting language, do we use that
approach, or maybe embed another, if so what?  Perl5 perhaps (since
that's in base)?
- Presumably this would be BSD licensed?  Or maybe MIT?
- Do we care what it "looks" like?  (I have FVWM2 to more-or-less look
like MWM.)
- What UI library is preferred here?  Not a fan of GTK+ myself, I'm more
familiar with Qt.  FVWM2 uses libxcb.

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Will future programmers probably warn people not to use high-level programming languages just as most programmers today warn people not to use assembler?

2019-10-30 Thread Stuart Longland
On 30/10/19 3:17 am, Nathan Hartman wrote:
> On Tue, Oct 29, 2019 at 7:41 AM Clark Block  wrote:
> 
>> Just as most programmers today warn people not to use assembler, probably
>> future programmers will warn people not to use high-level programming
>> languages.
> 
> In the future, computers will program programmers.

"Man must be master" is the phrase that comes to mind.

Electronic computers exist to do the low-level dull data drudgery under
the guidance of their human operators, not the other way around.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Companies using openbsd

2019-10-28 Thread Stuart Longland
On 21/10/19 8:35 am, Aaron Mason wrote:
> Our RT server has 512mb RAM and it's all it has ever needed.

How do you implement a 512 millibit bank of RAM given that even a RS
flip flop implemented with discrete components will give you one bit of
memory?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Do OpenBSD developers approve Isotop?

2019-10-13 Thread Stuart Longland

On 14/10/19 11:31 am, Clark Block wrote:

Do OpenBSD developers approve Isotop?

If not, why OpenBSD developers don't approve Isotop?


Is there an English translation for those of us who don't speak French?
--
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: BACK TO BASICS

2019-10-13 Thread Stuart Longland
On 12/10/19 7:55 am, Theo de Raadt wrote:
> Deep down, I'm actually so saddened to see the original, and still
> performing, PDP-11 has become so divided first splitting into three
> incompatible DEC productlines, and then further diluted efforts with
> Intel and MIPS, and then all the other companies...

It goes back further than that… Babbage engines, Turing machines,
Collossus, ENIAC, the Von Neumann computer…

… they weren't exactly "compatible".
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Postscript printer recommendations

2019-09-08 Thread Stuart Longland
On 14/7/19 4:09 pm, Jonathan Drews wrote:
> "Unlike PCL, PostScript is device independent. This means that the
> PostScript language creates all of the print data and does not rely
> on the printer for print data. This allow the output to be
> consistent when printed on more than one type of printer or print
> device. Specifically, the graphic objects will be consistent and in
> some cases of higher quality than PCL."

This could be re-written:

"Unlike PCL, PostScript is device independent.   that the print quality
is at the mercy of the PostScript interpreter implemented inside the
printer.  If they have done a good job, graphic objects will be
consistent and in some cases of higher quality than PCL, but can equally
be terrible if the firmware developer has done a shoddy job."

Really it's just moving the problem.  If the PostScript interpreter in
the printer does a poor job of generating the raster image to be
printed, it's going to look crap no matter what.

That does mean that PCL printers do have an up-side in that you can at
least control the PostScript→PCL end of the equation, and if the PCL is
well documented, it is theoretically possible to get good quality output.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: SCM

2019-07-22 Thread Stuart Longland
On 23/7/19 6:25 am, Nathan Hartman wrote:
> I always assumed that the OpenBSD devs have audited the heck out of
> CVS for security issues and are sticking to it for that reason.
> 
> KISS is a very valid reason though.

Security as a by-product of the KISS principle perhaps?

When I see the security track record of OpenBSD, it's hard to argue
there's no point in their KISS approach.  Especially when you consider
the house of horrors that Linux is slowly morphing into.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: SCM

2019-07-22 Thread Stuart Longland
On 23/7/19 1:48 am, Ingo Schwarze wrote:
>> Mercurial
> Not free software either (same viral license), never used it
> personally, and never heard any developer propose it.

I believe Mozilla use it heavily.  I tried it and frankly, I prefer git.

There's also bazaar (used by Canonical), which is aptly named.

git does have some nice features for instance being able to 'bisect'
change sets when you strike a bug, and 'rebase' for migrating a
patch-set to another branch; but given how OpenBSD development appears
to operate, some of these features probably don't bring much to justify
the distraction of switching.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: UEFI Issue

2019-07-19 Thread Stuart Longland
On 19/7/19 8:19 pm, Otto Moerbeek wrote:
> On Fri, Jul 19, 2019 at 08:13:09PM +1000, Stuart Longland wrote:
> 
>> On 19/7/19 6:21 pm, Otto Moerbeek wrote:
>>> Or save yourself the trouble and go for legacy mode.
>>>
>>> -Otto
>>>
>>
>> … except if legacy mode is broken on the machine in question, in which
>> case you're stuffed.
> 
> I' not guessing. Legacy mode works fine on the X1 6th gen. I'm telling
> this from experience (I use one).

Fair enough. :-)  I dare say the problem will bite us in the near future
though as more manufacturers question the need for the CSM in boot firmware.

(That said, part of me misses the BIOS… the B stood for *BASIC*,
something UEFI most definitely is not!)
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: UEFI Issue

2019-07-19 Thread Stuart Longland
On 19/7/19 6:21 pm, Otto Moerbeek wrote:
> Or save yourself the trouble and go for legacy mode.
> 
>   -Otto
> 

… except if legacy mode is broken on the machine in question, in which
case you're stuffed.

I had a baptism of fire with a UEFI-only motherboard (Supermicro
A2SDi-16C-HLN4F) earlier this week.

I had an existing install of Gentoo Linux that I wanted to run on it,
but it was partitioned and set up for a BIOS-based boot set-up, not
UEFI.  I ended up PXE-booting Ubuntu (for which there was a
UEFI-compatible PXE image), doing a back-up to a USB drive, installing
Ubuntu, then having gotten the machine booting, imaging Gentoo back across.

Pretty sure it refused to look at a CD with El Torito boot sectors on it
(so there goes install65.iso and cd65.iso), and it flatly refused to
load pxelinux.0 as shipped by Ubuntu/Debian.

Not sure if OpenBSD's boot-loader is UEFI-compatible, but if not, you'll
strike the very same issues.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: OT: hardware war with manufacturers (espionage claims)

2019-07-05 Thread Stuart Longland
On 2/7/19 5:43 pm, John Long wrote:
>> What do you think and do when using OpenBSD on this kind of hardware?
> Lemote boxes are kinda neat but they're not the fastest in the world.
> It beats the hell out of the alternatives if you can live with the
> limitations.

Gentoo was donated two Lemote Fulong 2Es back when I used to maintain
their MIPS port.  Compared to the other machines we supported at the
time (aging SGI boxes and Cobalt Qube), they were a breath of fresh air.

Fast enough to actually do useful things on, even play Quake II (with 3D
acceleration … for about 10 seconds until X crapped itself).

The Loongson netbook was a backward step in terms of graphics hardware
though, and a lot of software has problems with MIPS regardless of ABI
(I've tried o32, n32 and n64).

Shame, because it is a nice enough platform.

As for espionage… unless you're going to sit there with sand you've
mined yourself, refine it, and make your own semiconductors, there's
always going to be an element of risk in terms of espionage from your
supply chain.

Basically your best bet: don't rely on a single vendor.  It's harder for
them to hide their espionage then as one vendor won't know how to hide
another vendor's dirty deeds.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Installing OpenBSD on Supermicro A2SDi-4C-HLN4F

2019-06-16 Thread Stuart Longland
On 16/6/19 1:23 pm, ms wrote:
>>> Now a day backdors are already on the silicon level (inside chips). They
>>> are declared as debugging interfaces..
>> Must have happened around the time when school dropouts went to business.
> 
> What do you want to say? Do you have experience in chip design?

Do you design and make your own x86 chips?  Do you inspect the dies of
all off-the-shelf chips you buy?
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: When will be created a great desktop experience for OpenBSD?

2019-05-18 Thread Stuart Longland
On 14/5/19 6:07 pm, ULF wrote:
> On a mac, on a recent gnome, on a kde, etc. it's easier for a user to keep
> track of multiple jobs without thinking about the OS, but rather thinking
> about contents. It's a matter of fact that computers are mostly used to do
> things that have nothing to do with programming and sysadmin, and also
> developers here must, while programming/administering the machine, maybe
> write a letter to the insurance, browse 20+ pages while looking at a
> calendar (maybe shared) during a phone call, opening the accounting program
> for taxes and so on...
> 
> In 2019, doing all of the above with fvwm, twm, (whatever-tiny)wm not only
> feels awkward, but also time consuming and less flexible. The argument that
> one just has to type "command &" is not as valid as just clicking an icon
> when one of your hands is busy holding the phone or a document.
> 
> And, btw, let's say it: fvwm looks like 70s/80s, it's full of charm for
> retrocomputing but it's pretty ugly to see in 2019. And many people prefer
> just right clicking on a picture to change background rather than finding
> which config file they gotta change and then change it.

I find FVWM 2.6.5 does reasonably well for my needs.  Yes, I'm
multitasking between a web browser, a terminal session, an email client,
sometimes dozens of text editor (gVim) windows, office suites and
various specialist tools.

My day job involves software development mostly in C, JavaScript and
Python (occasionally C++, PHP, Java, CSS/HTML), and my productivity is
right up there with others that use full-blown desktops (Unity) and IDEs
(Webstorm).

Granted, I've taken the time to actually tune it to my work flow, and no
the journey for doing that is not what I'd call "novice friendly" (note
I didn't say "user friendly", because users come in all levels of
experience).

Prior to that I was running KDE.  Notably KDE up to the early 4.0
series, because I found after that point, the desktop ran too slow on
the hardware I had available to use: trying to coax a Pentium II 300MHz
laptop upgraded to its maximum specs (160MB RAM, 160GB HDD) to run the
software I needed for university studies circa 2008 was bad enough, I
didn't need to bog the machine down with a bloated desktop to boot!

Thus, out of necessity, I went from KDE back to FVWM (which ironically
is where I started, as it was the standard desktop for Red Hat Linux 4.0
circa 1996) and adapted it to more-or-less behave the way I needed it to
work.  I've even made it work on touch-screens (Raspberry Pi 7").
Eye-candy be damned, I want to *use* my computer!

Really, user friendliness is about being able to adapt the machine to
the user in whatever situation they may find themselves in, whether it
be being stuck with old hardware for financial reasons that you must
make work; having a temporary or permanent inability to use certain body
parts for data entry purposes; or sensory issues preventing the use of
(or needing special configuration of) specific output devices.

KDE 3 was good for that, and was reasonably configurable, but a lack of
flexibility in v4 and a move to a more bloated core made it untenable.
Gnome has been rigid in its capabilities from the start (used it on
several occasions, including v1.0 with Enlightenment), although I hear
it's good with accessibility.  awesome wasn't so "awesome" after a month
or two's use.  XFCE hasn't really grown on me either.

There was an attempt to make a user-friendly desktop out of FVWM:
fvwm-crystal.  If anything, the more important thing is providing an
easy way for users to select some sane defaults, then provide tools for
customisation -- including the "get out of my way and let me DIY" option.

It really is a horses for courses market, and I don't think we'll get
away from that.  It's the reason why the commercial desk-top market is
largely a two-horse race (Apple/Microsoft) and why the open-source
movement is awash with different operating system distributions and
window managers.

I did try OpenBSD as a desktop -- on a Lemote Yeeloong, and while it
didn't work out for my needs, I did find it refreshing compared to what
I was used to on Linux.  I'd use it more if it weren't for my need to
run things like Docker at work.  (Not sure if the old Linux binary
support could be re-instated to run that… but I understand there were
good reasons for culling it, maintenance being one.)

I do not think we should just be "doing ${something}" because everyone
else does -- I think there is a real point to OpenBSD's KISS approach to
system design and would prefer that continues. :-)
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: pppoe ipv6 default route

2019-04-11 Thread Stuart Longland
On 7/4/19 8:01 pm, Jérémi Dupin wrote:
> Hello,
> 
> I configured my dsl modem (D-Link 320b) as a bridge and my OpenBSD router 
> talk to my isp with
> pppoe.
> 
> My hostname.pppoe0 look like the manual :
> 
> inet 0.0.0.0 255.255.255.255 NONE \
>   pppoedev em0 authproto pap \
>   authname 'testcaller' authkey 'donttell' up
> dest 0.0.0.1
> inet6 eui64
> !/sbin/route add default -ifp pppoe0 0.0.0.1
> !/sbin/route add -inet6 default -ifp pppoe0 fe80::%pppoe0
> 
> This work fine but every few days (when the line disconnect), the default 
> ipv6 route go away (the
> ipv4 route stay).

Do you perhaps need to run DHCPv6 on the link?  I have the following:
> vk4msl-gap# cat /etc/ppp/options  
>
> #   $OpenBSD: options,v 1.2 2014/07/10 11:18:23 jasper Exp $
> lock
> auth
> usehostname
> vk4msl-gap# cat /etc/hostname.pppoe0  
>
> inet 0.0.0.0 255.255.255.255 NONE \
> pppoedev em1 authproto chap \
> authname u...@example.com \
> authkey password up
> dest 0.0.0.1
> inet6 eui64
> !sleep 5
> !/sbin/route add default -ifp pppoe0 0.0.0.1
> !/sbin/route add -inet6 default -ifp pppoe0 fe80::%pppoe0
> !sleep 5
> !/sbin/pfctl -f /etc/pf.conf
> !/usr/local/sbin/restart-dhcp6c
> !sleep 5
> !/sbin/pfctl -f /etc/pf.conf

So I basically let the link come up, re-apply the firewalling rules so
IPv4 traffic passes at least… then I run a script which re-starts
dhcp6c, wait a bit more for that to finish, then re-apply my firewall rules.

The `restart-dhcp6c` script is simple enough:
> vk4msl-gap# cat /usr/local/sbin/restart-dhcp6c
>
> #!/bin/sh
> 
> pid=$( pgrep dhcp6c )
> if [ -n "${pid}" ] ; then
> kill -TERM ${pid}
> fi
> sleep 2
> /usr/local/sbin/dhcp6c -D -c /etc/dhcp6c.conf pppoe0

Possibly not the cleanest solution, but it works for me on Internode
here in Brisbane.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



Re: Any experiences with recent single-socket Dell machines (i.e. R230/R330/R340)

2019-02-02 Thread Stuart Longland
On 2/2/19 8:06 pm, Rachel Roch wrote:
> I'm looking for a decent machine with enterprisey features (i.e. hotswap PSU 
> + drives, high-efficiency power,and high quality ipmi/ilo). I'm not chained 
> to Dell if anyone better ideas, but have had good experience with Dell.
> 
> I've contemplated Supermicro machines, but quite frankly what I've read 
> online about the quality of their iLO leaves a lot to be desired (combined 
> with the fact my 'friendly local reseller' tells me their iLO still requires 
> Java).

Not sure what you mean by iLO… Google tells me that's the International
Labour Organisation.  Probably not what you meant.

I've found some of the Dell systems which feature iDRAC, the ability to
log into the host from the iDRAC interface via a virtual console is
considered an "enterprise" feature that you had to pay additional money
for (even though the hardware was present).

Supermicro's management interface worked pretty well for my needs… I've
been able to interact with the host and do things like mount ISO images
from my laptop which then appear to the host as a USB CD-ROM drive.
Apparently it can do this over SMB too, I've never tested.

Both the Dell iDRAC and Supermicro's management interface seem to use
Java Web Start to implement the virtual console.  That's about the only
place I've seen it used on either.

One day I might have a fiddle and see if Java can be "done away with",
but since it's rare to need such a feature and it works fine with
IcedTea JVM (which is open source), I put up with it.
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.



  1   2   >