-
domlaut
rtyler: he might be asleep (4am)
-
» rtyler emails some coffee
-
mason
rtyler: Oh, interesting. Surprising it's not six.
-
mason
There's tradition to be observed. Multiples of six are canoniacl.
-
mason
canonical too
-
al1r4d
any checklist for hardened freebsd? I want harden my freebsd but still usable for daily. I'm student
-
mason
-
VimDiesel`
Title: CategorySecurity - FreeBSD Wiki
-
al1r4d
Thank you, mason
-
mason
The handbook will have stuff too. Looking.
-
mason
-
VimDiesel`
Title: Chapter 15. Security | FreeBSD Documentation Portal
-
mason
The handbook is generally going to be useful:
docs.freebsd.org/en/books/handbook
-
VimDiesel`
Title: FreeBSD Handbook | FreeBSD Documentation Portal
-
al1r4d
:)) thank you very much
-
mason
Sure! Enjoy.
-
al1r4d
mason: did you hardened your freebsd?
-
mason
al1r4d: Out of the box defaults, and I make sure to install devcpu-data.
-
mason
I choose a couple security options during install usually, and I use full-disk encryption as well, I guess, so not all completely vanilla, but close.
-
ngortheone
al1r4d: also check out
hardenedbsd.org - a downstream FreeBSD project paranoidally focused on security
-
VimDiesel`
Title: HardenedBSD
-
gman999
al1r4d: start with what you're hardening *against* and what you're trying to protect
-
gman999
it depends mostly on context...
-
gman999
a server in a colo.
-
gman999
laptop at home or traveling across the globe.
-
gman999
dont approach security like a checklist
-
gman999
start wiht threat modeling
-
gman999
and al1r4d aint here!
-
ngortheone
oh well
-
gman999
checklist approaches to security are a problem..
-
VeryGeneric
oh rip
-
VeryGeneric
forgot i turned off join/leave messages lol
-
VeryGeneric
gman999: absolutely
-
gman999
and turn into non-technical ppl promoting them as cure-alls
-
gman999
i mean what i do with a tor relay is very different from my laptop
-
gman999
but preaching to the choir prob..
-
gman999
and i just watched gnn@ at asiabsdon in 2019 who made some related points.
-
ngortheone
gma999: all true
-
ngortheone
gman999*
-
gman999
so i did a workshop years ago around privacy tech stuff.. "please stop teaching tools"
-
gman999
it was the ugly example of checklists and workshops
-
ngortheone
checklists are good to find out where defaults lack. FBSD notably has not the best defaults when it comes to security
-
gman999
ie, stop telling targeted communities what to use without knowing their thread model
-
gman999
well... again it depends
-
gman999
i mean random_ip_id...
-
ngortheone
yeah, some low-hanging fruit that is a no-brainer really to enable
-
gman999
maybe doesnt play nice wiht nfs but necessary in other contexts
-
gman999
there is usually a reason that knob wasn't turned
-
gman999
i mean, syslogd not listening is low-hanging IMHO
-
ngortheone
legacy/stuborness/laziness/dogma
-
gman999
hard to say.... specifics matter i think
-
ngortheone
all the good reasons not to update defaults - some shit app somewhere will break!! omg
-
gman999
so so true
-
gman999
trains will stop running. my fridge will attack the cat.
-
gman999
yes.
-
VeryGeneric
ngortheone: god forbid we have to check up on the stuff we skimped on in the beginning
-
mason
Are there checklists? I figured pointing the fellow to the handbook would give him stuff to think about.
-
gman999
idk.. someone dumped some ^ including from handbook
-
gman999
right?
-
mason
carets?
-
ngortheone
a bit opinionated article, but has some good points on defaults
-
ngortheone
-
VimDiesel`
Title: FreeBSD - a lesson in poor defaults
-
mason
Oh, the hardenedbsd thing? I don't know what they offer up.
-
gman999
so again.. it depends.
-
gman999
i hear the various linux arguments on 'normal defaults' then mitigation..
-
gman999
and i sort of laugh..
-
gman999
totally diff approach on some level
-
gman999
"running out of X limits? make it unlimited!"
-
ngortheone
an author is openbsd funboi obviosly, so take it all with a grain of salt, but there are good points on some defaults.
-
ngortheone
X is really a one big snooping device. if you run a browser that runs javascript from random websites - X is not a good thing.
-
gman999
+1 ngortheone
-
gman999
intersting from that url ^.. blacklistd/blocklistd (now) isn't ported to openbsd.
-
ngortheone
wayland is much better in that respect - to gman999 's point - security for the modern desktop where 99% of the code we run on our desktops comes from internet written by js monkeys
-
gman999
i haven't tinkered with wayland at all yet
-
ngortheone
so how to harden in that case? a) run wayland b) if you can'd do a - run browser in a jail with a separate X server
-
ngortheone
sway runs great on my box since 2018
-
ngortheone
if you like i3 - it is a painless switch for the most part
-
gman999
well, give me jails over any of the standard virtualization options.. by far.
-
gman999
but the sandbox/jail/qubes approach is often done poorly and worse
-
gman999
IMHO
-
gman999
i ran jails in prod for a long time but dont now
-
gman999
and im a fan of how small and clean they can be.
-
gman999
but thrwoing more code at problems isn't a solution in itslef.. and often a danger
-
ngortheone
yes, the whole UNIX approach start falling apart when you try to jail GUI apps. Lots of ductape is required to make it work. This is where people who konw things remember that there was Plan9 with much better ideas...
-
gman999
:)
-
gman999
so this is funny from that url ^
-
gman999
I don't know anything about IPFilter, nor do I know anyone that uses it, so we'll pretend it doesn't exist.
-
gman999
it's been *that* long?
-
ngortheone
FBSD has 3 firewalls IPFilter being the least popular option, but it is still aroun
-
gman999
yup.. i remember when that whole riot happened at a usenix?
-
gman999
darren reed was the ipf dev?
-
gman999
idr...
-
gman999
and pf was born in response
-
ngortheone
I run IPFW and I am happy with my life
-
ngortheone
not looking at other firewalls
-
gman999
there are advantages of running pf or ipfw in contexts..
-
gman999
i dont run ipfw anywhere any more
-
gman999
barely ever did
-
gman999
i went ipf to pf mostly
-
ngortheone
lots of people are happy with pf too
-
ngortheone
there must be something to it
-
gman999
idk anymore.. i used to care to compare, now dont have the time or drive to
-
ngortheone
yup, both options work for the majority of typical usecases. Just use whatever your fingers remember to type and save time for better things
-
ngortheone
kde plasma wayland session is being worked on by some desktop folks, so that is coming... all who use KDE will get wayland for free at some point
-
ngortheone
i.e. kde wayland works on linux already, but not yet on FreeBSD
-
gman999
kde! too heavy!
-
ngortheone
well, then try sway
-
gman999
oh, i'm happy with xfce or cwm
-
ngortheone
it is the leanest WM on wayland, maybe except labwc - an openbox inspired wm
-
ngortheone
-
VimDiesel`
Title: GitHub - labwc/labwc: A Wayland window-stacking compositor
-
ngortheone
then wayland is not coming your way soon :P
-
Grabunhold
is there a distinct name to the FreeBSD init system? context: if I want to have folders for multiple init systems to hold example scripts, like "systemd", "openrc", what name should I choose for the FreeBSD init system?
-
rtyler
Grabunhold: it's just rc as far as I am aware, perhaps just "bsd-rc" or something like that would be sufficient.
-
Grabunhold
rtyler: okay, thanks!
-
angry_vincent
of course, there are no systemd. and with some effort it maybe possible to use OpenRC
-
rtprio
Grabunhold: multiple init systems sounds like a bad headache
-
rtprio
just use the one with the system or use a different system
-
Grabunhold
rtyler: angry_vincent: i've written a FreeBSD init script for a package (not owned by me) that already supports systemd, openrc (and solaris SMF for that matter). i just want to upstream my script.
-
Grabunhold
and the way to do that is to create a folder to place the script under, because that's what the other systems have
-
Grabunhold
and that folder needs a name :)
-
Grabunhold
no need for any init system wars
-
meena
ngortheone: "French words are hard to spell" — 28% of English vocabulary is French
-
meena
imagine what poudriere would be pronounced today, if it had been imported 1000 years ago
-
yuripv
"pudry"?
-
V_PauAmma_V
There was a discussion about this a few years ago, that IIRC ended with "poo dryer" and "powdery air" camps.
-
yuripv
lol
-
yuripv
i like the former
-
parv
I would go with: highfalutin jailed port maker
-
parv
or hfjpm, "hypm"
-
parv
"f" is silent
-
dch
do we have anybody using gitea on FreeBSD here? I have Questions
-
dch
poodryer FTW
-
dch
probably yak poo
-
meka
If I'm right lattera is using it
-
dch
cool
-
dch
I need a hand to work out what the startup message for forgejo should be, and how to migrate across
-
antranigv
dch we do
-
antranigv
dch So is Forgejo basically the same as Gitea?
-
dch
exactly the same only still FLOSS not FLOSS--
-
dch
-
VimDiesel`
Title: Codeberg Forks Gitea to Forgejo | Adamsdesk
-
dch
gitea surreptitiously registered a trademark, transferred the assets, and became a company
-
antranigv
Isn't that a good thing? that means it's becoming... self-sustained?
-
Grabunhold
-
VimDiesel`
Title: Add bsd-rc init script to distrib by avollmerhaus · Pull Request #2056 · ergochat/ergo · GitHub
-
dch
antranigv: the key bit was "surreptitious" if this had been discussed up front, maybe
-
dch
its a FLOSS rug-pull
-
dch
Grabunhold: ooh yeah hella port when will it land?
-
dch
ooh its already there
-
Grabunhold
dch: there already is a port, it's just missing the init script
-
dch
Grabunhold: will you PR the rc.d file too? I'll install it ASAP :D
-
Grabunhold
i'm not the port maintainer, but i was hoping they might pick up on the upstream init script. if not, i might try and add it to the port as well
-
dch
you can just fwd the PR to yuri I am sure he will grab it willingly
-
dch
Grabunhold: we just need gamja or kiwi web front ends in ports
-
Grabunhold
i'm in the process of migrating my linux + ngircd based small private irc server to FreeBSD + Jail + Ergo. not all done but close, so far it's been a fun project and i'm very satisfied with the results so far :)
-
Grabunhold
web front end might be in the books later on, i still need to port quassel and my bot and quote db over (and write ansible for all that config)
-
Grabunhold
i'm also porting the virtual machines that run on said server from linux + libvirt/kvm to FreeBSD + bhyve
-
Grabunhold
(eh, quassel as in quassel the irc client)
-
Grabunhold
(and since we're talking server, i'm talking about just the quassel core. fortunately there already is a ready-made pkg just for the core without all the gui deps of the frontend!)
-
Grabunhold
dch: thanks, i'll drop yuri⊙Fo an email :)
-
Lovis_IX
hello folks. Thenhandbook is inbelivable… I just read the security page. Whaou… May be read a handbook page every day could make the kenel panic away :-)
-
yuripv
sadly, fixing panics is a bit more involved that that :(
-
yuripv
than too
-
Lovis_IX
yuripv: sure, I was just joking :-)
-
domlaut
can DNS just, like, work?
-
» domlaut sighs
-
domlaut
for whatever reason OVH is refusing to add a nameserver saying it's not configured for the domain, `dig domain @nameserver` responds as expected
-
Grabunhold
DigitalOcean lets me add a zone to their nameserver thingy no matter if it's actually the NS server for that zone or not
-
domlaut
well, yeah, for a start I'd like OVH not to do any validations
-
domlaut
it takes 5+ minutes and then 5 more to roll back if it fails
-
domlaut
it's very annoying.
-
domlaut
on a positive note, massive shoutout to nsd(8) that is just absolutely fantastic to work with
-
Lovis_IX
domlaut: OVH IS annoying.
-
domlaut
I don't have a better EU-based alternative :(
-
Grabunhold
i stopped using OVH when i needed their recovery remote KVM thing and had to try and recover a bootloader problem with my physical keyboard in german, the ovh KVM thing set to french layout and the bootloader and BIOS of the remote system using a US layout. that, plus a very hefty delay. in the end, i gave up.
-
domlaut
yeah, server-wise I'm with Hetzner
-
Grabunhold
next to useless, and they have the nerve to charge hefty prices for that thing
-
domlaut
have been since 2018, rock frickin' solid.
-
jauntyd
servermania is ok, although they charge you for two months if you cancel within the first month
-
yuripv
Lovis_IX: but one can hope, right
-
Grabunhold
i've been lucky with the KVM incident though, a few month after i moved because of that they had their big datacenter fire
-
domlaut
but then for domains I figured maybe have that somewhere else, just so it's not all with one provider. and OVH generally has cheaper domains (and does tax correctly for businesses)
-
domlaut
maybe using OVH's API can skip NS validation... hm. I'll write an email to support either way to check if it can be disabled, cause otherwise I'm happy with them for domain hosting
-
domlaut
and getting audit emails re: changes - I really like that
-
domlaut
something Cloudflare and Google Domains don't do, AFAIK
-
Lovis_IX
domlaut: there is scaleway (based on France), or hetxner (based on Germany, which I use). For DNS only there is Gandi, BookMyName and sure there is may other.
-
domlaut
Lovis_IX: I use Hetzner as well - just not for domains. I thought Scaleway was OVH too, just a subbrand
-
domlaut
Gandi looks like a cool service, but they're *always* the most expensive one
-
domlaut
difficult to justify for non-profit work which is currently where I'm at
-
domlaut
I do know they fund a bunch of OSS so I do use Gandi when I'm working with corp funding :-)
-
Lovis_IX
domlaut: no scaleway is not a subbrand of OVH, but a subbrand of online which have Free dans free mobile as other subbrand.
-
domlaut
ah, right, online
-
domlaut
ok that's something to investigate then
-
domlaut
thanks!
-
Lovis_IX
domlaut: you're welcome.
-
antranigv
anyone here has knowledge about testing? I'm trying to write a tests, but no idea if my methodology is correct :D
-
meka
antranigv, the best I found is
youtube.com/watch?v=RYtwx7Jj8aE
-
VimDiesel`
Title: Automated firewall testing - YouTube
-
» bsdbandit loves freebsd and unix
-
moonshine
any relation to the hamburgler
-
CrtxReavr
antranigv, I think it depends on what you're testing.
-
CrtxReavr
I've worked for NAS development & testing engineers and saw a lot of their methodologies.
-
CrtxReavr
I've also had a job where I wrote automated tests for a suite of RESTful APIs.
-
CrtxReavr
Testing those was essentially CRUD routines.
-
CmdLnKid
pretty sure this is a quick question ... TIA but /etc/etcupdate.conf are these values boolean ? e.g. FREEBSD_ID=1 or FREEBSD_ID=TRUE, FREEBSD_ID=YES, FREEBSD_ID=ON ?
-
CmdLnKid
there seems to be no example conf that i have seen in a search or something with a good description of what each var should be set to
-
CmdLnKid
not that ive seen anyway unless someone could point me to it
-
domlaut[m]
so I had to add two lines to /etc/rc.conf re: ipv6, then executed /etc/rc.d/netif restart vtnet0 to apply. this causes dhclient to exit with "My address (<ipaddress>) was deleted, dhclient exiting" and lose ipv4 connectivity. what's the proper way to do this?
-
CrtxReavr
domlaut[m], when restarting netif, I generally do it like this: service netif restart && service routing restart &
-
CrtxReavr
Well. .. if I'm shelled in and not local.
-
CrtxReavr
Host will lose its routes, so generally routing needs to be re-run as well.
-
CrtxReavr
The && will normally make sure both commands are run, even if your connection in drops.
-
CmdLnKid
command before && executes normally return(0) then second command will execute
-
CmdLnKid
; ensures every command runs
-
CmdLnKid
as long as they are typed correctly ;)
-
ngortheone
-
ngortheone
good article by kp about ATF and kyua, explains in lay terms how to get started with testing
-
drobban
why isnt firefox just working after installing it?
-
ngortheone
meka: sorry, didn't get the context about french words, sorry. What was it about?
-
xtile
At one point you had to manually enable hald and dbus to get firefox working
-
drobban
check.
-
ngortheone
firefox works nicely without dbus or anything else on my box, just install and run
-
ngortheone
run it from the console and see if it complains on something
-
drobban
getting some sort of could not determine network status bs...
-
drobban
well. I continue using chromium then
-
drobban
ngortheone: yea, it complains....
-
» ngortheone never encountered that error
-
meka
ngortheone, french words?
-
ngortheone
meka: oops, sorry, it was meena, not you. Need to wipe my glasses and get a cup of coffee
-
meka
hehehe, no worries :o)
-
domlaut
CrtxReavr: heh, that keeps dhclient alive, but it looses the route :-)
-
domlaut
I'll have to comb through the docs for this one I reckon
-
domlaut
although service routing restart did fix my ipv6 connectivity so that's great
-
CrtxReavr
script something to re-add the default v4 route?
-
CrtxReavr
CmdLnKid, you can always script it if you don't trust your typing.,
-
domlaut
just a && /etc/rc.d/dhclient restart vtnet0 at the end will do
-
domlaut
for the time being
-
CrtxReavr
Which shoudl be the same as typing 'service dhclient restart vtnet0'
-
domlaut
that or more likely I just disable DHCP given it's a server
-
domlaut
if my public IP changes I have bigger issues than having to KVM
-
CrtxReavr
I remember when they added that service script and I griped about. . . "What are we, a linux distro now?"
-
domlaut
:-)
-
CrtxReavr
Though. . . it was written by Doug Barton, whom I knew and really trusted his work. . . eventually embraced it.
-
CrtxReavr
dougb@ actaully coached me a lot when I started getting heavy into shell scripting.
-
meena
ngortheone: re
vez.mrsk.me/freebsd-defaults.html that sentence is from that article
-
VimDiesel`
Title: FreeBSD - a lesson in poor defaults
-
ngortheone
meena: well, I personally find french words both hard read/write and say, so don't disagree in principle, but it is completely irrelevant to the article, so I think the author overstepped the boundary a bit
-
meena
how do other BSDs, that auto-encrypt swap, deal with crashdumps?
-
paulf
not to mention that english spelling is so logical and coherent by comparison
-
gman999
there are some valid points in the piece IMHO
-
gman999
but some is not..
-
gman999
there are dev decisions made that are thought out that the author clearly isnt weighing or even aware of.
-
gman999
more importantly...
-
gman999
the bsds are a small island in a very big sea.
-
gman999
the last thing we should be doing is focus on negative nasty critiques of other bsd projects
-
meena
basically, a lot of it is: a promise of stable supportedness needs to make some terrible tradeoffs and how dare they choose these ones
-
vishwin
the very resistant to change is something i've been discouraged by, even as a committer
-
gman999
oh, i woudn't argue against that vishwin at all
-
gman999
and it applies to all of us
-
meena
yeah, it's all a dance
-
vishwin
"engineering" (quotes required because legal term) is literally tradeoff management
-
gman999
but the pissing game between projects means we all lose
-
gman999
ha.. +1 vishwin
-
vishwin
and security is risk management
-
gman999
yes... mitigation only.
-
gman999
same with privacy technologies... etc.
-
xtile
I think the author means well: I used to know him.
-
gman999
maybe.
-
xtile
He actually got me into sending patches to all BSDs
-
gman999
but it came off very wrong.
-
CmdLnKid
crtxreavr, np im posix compliant advandced scripter... haws gained me much.
-
gman999
that's cool..... there are some ppl i dearly respect and know persoanlly in bsd land who do things that i'm not fond of
-
gman999
to put it lightly
-
CmdLnKid
hasnt
-
» xtile nods
-
gman999
the very ironic part with each bsd...
-
gman999
if you have to port something, pkg, driver..
-
gman999
and you have nothing to start with.. .
-
gman999
where do you go?
-
gman999
if another bsd has it.. you start there
-
gman999
we need to focus on the common denominators not to be hippies
-
gman999
but because we dont have a f'g choice
-
rtprio
what are you talking about?
-
rtprio
there's nothign ironic about that
-
gman999
rtprio... article in backlog.
-
CrtxReavr
I wish the BSDs would join forces. . . would only benefit the users.
-
CrtxReavr
Net has too many people trying to keep archaic hardware alive that really has no practical use, and use and Open has too much. . . too much Theo.
-
gman999
well, i dont think it's about "join forces"
-
gman999
that horse left the barn a long time ago.
-
xtile
I use different BSDs for different purposes: it'd be a loss if there were fewer.
-
xtile
And my own experiences with Theo were very pleasant as he helped me prepare a patch.
-
xtile
I hear it's different for others, but that's my anecdote.
-
gman999
+1 xtile
-
rtprio
man, reading -misc ensured i never wanted to deal with him
-
mappx
what changed my mind about Theo was attending one of his talks. His expertise, energy and passion really came out hearing him speak live (as opposed to what one may encounter on the mailing lists). I would encourage everyone to hear him give a talk, see how he interacts with the audience, responds to questions, etc before passing judgement. Just my two cents
-
CrtxReavr
I hear that. . .
-
CrtxReavr
. . . but. . . the BSD community, with the exception of one week a year, is a collection of online communities.
-
paulf
and of the BSDs, FreeBSD is small and all the rest put together are minuscule
-
CrtxReavr
That's the environment Theo needs to primarily operate in.
-
mappx
That's a fair comment
-
CrtxReavr
I mean. . . Linux Torvalds is on record, having said he never would have started hacking a kernel, if BSD wasn't under legal attack by Sun & Bell Labs.
-
CrtxReavr
And to everyone's surprise, David won that fight.
-
xtile
Who's David? I could do with learning some more of this history.
-
CrtxReavr
I deal primarily in linux, professionally, 'cause these days where I work, I don't have a choice.
-
mappx
I have heard very good things about peoples' interactions with Linus Torvalds
-
CrtxReavr
But you'll never convince me that FreeBSD is the more mature, more stable, better documented code base.
-
CrtxReavr
er - isn't the more mature. . .
-
CrtxReavr
Linux just has the FOSS momentum behind it.
-
CrtxReavr
And yet. . . three major BSD platfroms continue to exist.
-
CrtxReavr
I think they could take a bigger chunk together, than apart.
-
mappx
There are definitely some "community and interpersonal issues" but we all seem to manage. You can't tell me that Linux doesn't have those too ;)
-
paulf
systemd!!!
-
CrtxReavr
Oh, I know they do.
-
paulf
had to say it
-
CrtxReavr
Before I discovered FreeBSD, I spent my time "learning to appreciate it more."
-
xtile
CrtxReavr: not four? ;)
-
CrtxReavr
xtile, were you thinking Dragonfly?
-
xtile
Admittedly I've only use dfly once
-
xtile
but yeah
-
CrtxReavr
(If you say macOS, I'll cut you.)
-
paulf
dragonfly another personality rift based distro
-
CrtxReavr
Yeah, they're out there.. .. I've toyed with it a bit in the early days.
-
xtile
I'm in a bad situation where I have Nvidia video card, so I only can use FreeBSD functionally on my desktop
-
xtile
but FreeBSD's probably the best for desktop usage anyway, right now
-
CrtxReavr
But I also saw the other side of Dillon's temper trantrums that lead to it.
-
gman999
there are personalities everywhere.
-
gman999
that's part of life.
-
moonshine
> that's the environment theo needs to primarily operate in
-
moonshine
no.
-
moonshine
openbsd has certain opinions and that's fine and ideal.
-
rtprio
i wish that freebsd and openbsd pf's didn't diverge as much
-
Lovis_IX
well, I read the backlog article and I don't know wantt to think? Is it true? Is it just a troll? Can't make my own oppinion, I too new in FreBSD
-
mason
Lovis_IX: Pay no heed. All the systems out there to choose from have really nice things about them and are worth using.
-
mason
And it's only through trying them in depth that you'll develop opinions that might sway you one way or another in the end.
-
Demosthenex
having used openbsd before ages ago, my recent experience moving to freebsd has been much more positive. i feel like it's better integrated, documented, and a better general purpose server
-
Lovis_IX
mason: thanks, I did not have much time to test all *BSD. So I will continue to ply=ay with my FreeBSD and lean how to use it.
-
mason
Lovis_IX: You'll get the most out of any of them the more expert you become with any of them.
-
Demosthenex
i'm moving all my stuff of linux to freebsd atm
-
Demosthenex
loving it
-
Lovis_IX
mason: I don't want to be an expert. I'am old, I'm disabled, I did not work for real. All I want it to have fun.
-
mason
Lovis_IX: It's fun being an expert.
-
Lovis_IX
mason: sure… As the president of Exodus Privacy I have a lot of fun and expertise. :-)
-
Demosthenex
so just a cheap plug... but i have my laptop today running freebsd on an x230. i use stumpwm as a unix workstation with virtualbox for ubuntu/windoze.
-
xtile
I think FreeBSD's good for casual fun too
-
xtile
both in terms of games and in terms of programming
-
mason
StumpWM! \o/
-
xtile
I appreciate that FreeBSD comes with cc by default, among other things.
-
Demosthenex
i just bought a t480. i booted usb to do a fast install to my t480, then booted usb to remove all the zfs filesystems. i did a zfs send/recv from my old laptop to the new, and after updating the bootfs flag, i rebooted and MY WHOLE SYSTEM MOVED HARDWARE
-
Demosthenex
the t480 has the same OS, same packages, my same data, even the same snapshots from zfs-autosnap
-
xtile
neat
-
Demosthenex
later today i'm going to shutdown my old laptop to single user mode, take a last snapshot, and do an incremental send to the new laptop. only changes will be copied, and it'll be current
-
Demosthenex
hell, even virtualbox worked... out of the box ;]
-
rtprio
i should get a new thinkpad, this x1 isn't holding up quite as well as i had hoped
-
domlaut[m]
supervisord, daemontools, something else?
-
domlaut[m]
(I need automatic restarting when whatever rc.d started with name_enable dies)
-
rtprio
domlaut[m]: daemon(8) can do it
-
domlaut[m]
and then <name>_user goes into the rc script instead of using daemon(8)'s -u, right?
-
domlaut[m]
then the question is what do I do about all the packaged stuff that I want to run and restart itself, but don't use daemon(8) in their rc scripts
-
Demosthenex
mason: i'm stumpy!
-
domlaut[m]
I'm thinking if it'd be better to have something working alongside rc to deal with restarts, given that no other package that I have set up to start itself on boot with <name>_enable does auto-restarting
-
domlaut[m]
aight, didn't find anything over at langille's, but I did find sysutils/fsc which seems like something I'm looking for
-
dvl
domlaut[m]: daemon(8)
-
dvl
I've moved to that from daemontools.
-
dvl
I also prefer it over superivisord now.
-
domlaut[m]
dvl: ok, but the way I understand daemon(8) is that has to be the command in a rc file
-
domlaut[m]
command=/usr/sbin/daemon
-
dvl
domlaut[m]: Why might that be an issue?
-
domlaut[m]
and then command_args to run the thing you want, -r -P yadda yadda
-
domlaut[m]
that doesn't help me with haproxy, for example, that packages it's own /usr/local/etc/rc.d/haproxy
-
dvl
There seems to be a requirement I have not read yet
-
domlaut[m]
ah, sorry, I'm on Matrix so I don't see when you joined. it might also be dropping messages? :-)
-
mason
That's what Matrix does.
-
domlaut[m]
anyway, it (maybe) wouldn't be a problem for just my own stuff, but I also want to restart anything else that might happen to fail for whatever reason. my understanding is rc files aren't supposed to take care of restarts, so nobody writes them in that way
-
dvl
I think you're trying to find a way to restart existing applications automatically if they stop
-
domlaut[m]
but then if no other rc script takes care of restarting itself, maybe I want my rc scripts to behave the same/follow the same convention, in which case I need a tool that knows how to pick up rc conf, monitor what's enabled, and restart what I want
-
domlaut[m]
which seems like fsc is
-
domlaut[m]
mason: stop gap until I set up ZNC or whatever superseded it, if anything. been a while since I was active on IRC!
-
xtile
I just log in when I'm awake and /quit when I'm not
-
xtile
IRC is transient
-
domlaut[m]
My laptop goes to sleep when I'm away so that's a bit too transient :-)
-
domlaut[m]
Otherwise I agree. Missing messages is half the fun :-)
-
domlaut[m]
And then Matrix compensates by dropping some of my own! :-)))
-
Lovis_IX
it's a kind of jeopardy. Give domlaut[m] an answer but you don't know the question :-)
-
meena
domlaut[m]: re daemon vs rc: ngortheone and i are trying to work something out:
freebsd/meetings #9
-
VimDiesel`
Title: supervision: new group by ngortheone · Pull Request #9 · freebsd/meetings · GitHub
-
xtile
heh
-
ghoti
How do I determine what PCI device to share with a bhyve instance to make a physical USB device available to the VM?
-
mason
ghoti: I don't think you can share individual devices. I think you need to share the controller.
-
mason
That said, I could be confused.
-
mason
ghoti: When last I'd looked at that, I'd decided to just get a separate USB controller for a guest.
-
mason
But then I ended up not doing any of it.
-
ghoti
mason: I'm basically asking "what do I share"
-
mason
ghoti: You're talking about sharing a specific USB device, and I believe the answer is, at least with Bhyve, "you can't".
-
ghoti
yes, I know that, but I have no other USB devices in this machine at the moment.
-
mason
Oh! Then you should find your usb controller in pciconf -lv output
-
ghoti
I'm trying to make a sonoff zigbee dongle (umodem0) available to HAOS.
-
mason
ghoti: You're not using USB for a keyboard even?
-
ghoti
Hmm, I guess I am, though "ideally" I won't have to. :) If a bhyve instance has access to the controller, does that make the controller inaccessible to the host?
-
mason
yes
-
ghoti
Dang.
-
ghoti
I do seem to have multiple devices though.. ehci0 and ehci1 Perhapsone is available.
-
mason
ghoti: So, I decided that getting a dedicated USB card would be reasonably cheap and effective. I never went through with it but it was my plan so I could get something boring going in a VM to do videoconferencing in a FreeBSD workstation.
-
ghoti
okay, I have usbus0 and ehci0 and usbus1 on ehci1, now to track down where my devices connect..
-
ngortheone
domlaut[m]: lots of good improvements coming to daemon, we are setting up a working group, we'd love to hear about usecases/problems related to process supervision
-
ghoti
whee, the sonoff device is the only thing connected to ehci1 it seems.
-
mason
ghoti: usbconfig
-
meena
I would have used deviceinfo -p or what it was
-
domlaut[m]
ngortheone: restarting functionality-wise I'd need a restart-always or restart-on-fail (going by child exit code), and for the daemon invocation/monitoring to happen outside of the service's rc script (use case: rc script provided by vendor). I'm not sure the latter is (maybe even should be?) in scope of daemon(8)
-
domlaut[m]
And, of course, for it to know about jails :-P
-
domlaut[m]
But my use case is basically docker-compose, but with jails. Maybe more of a job for a jail manager, but it's all rc scripts anyway
-
ngortheone
domlaut[m]: please either create bugzilla bug for deamon(8) or send a pull request to the meetings repository for the working group. All of your asks are in the scope of what I'm planning for deamon
-
ngortheone
just to capture the ask so it is not lost
-
domlaut[m]
ngortheone: got it. I'll try my best to do that by sunday if that's okay with you
-
debdrup
Ooo, more stuff for daemon(8)?
-
ngortheone
debdrup: yes, I have big plans for it
-
ngortheone
domlaut[m]: totally
-
debdrup
ngortheone: something you wanna share with the class? :P
-
ngortheone
so far I've been doing general code clean up, a batch of changes hopefully landing today-tomorrow
freebsd/freebsd-src #684
-
VimDiesel`
Title: daemon: state management refactoring by ngortheone · Pull Request #684 · freebsd/freebsd-src · GitHub
-
ngortheone
if kevans is going to be kind enough to me :)
-
ngortheone
after this change lands next batch of cleanup is going to be focused on switching daemon to kqueue as a source of all events, and removing signal handlers as a result
-
ngortheone
once that is done I will start fixing bugs/feature requests that were sitting in bugzilla for years
-
ngortheone
-
VimDiesel`
Title: meetings/2023-03-01.md at supervision · ngortheone/meetings · GitHub
-
ngortheone
there are at least 4 of them there
-
ngortheone
(there is a list of bugs in the meeting notes)
-
debdrup
Oooo
-
ngortheone
this is where I add functionality that domlaut[m] is asking for too - this is quite reasonable to expect daemon to restart failed apps on conditions or at least capturing the failure event and log it
-
ngortheone
then, the next phase begins - convincing ports to switch from legacy daemon mode to supervised mode
-
ngortheone
use --long-options instead of short for readability
-
ngortheone
legacy mode in daemon == is when it does not fork a process to supervise, but instead execve's itself, so there is no supervision happening. Lots of ports use daemon in that mode unfortunately
-
xtile
long options are unpleasant
-
ngortheone
and then there are long-term plans: add config file support to daemon (motivation here is that there are a lot of features that can be added, we don't have enough flags for all of them, and at certain point it becomes easier t o use config file
-
ngortheone
xtile: it is a matter of taste, don't use them if you don't like them. From practical viewpoint long options reduce cognitive load when you are working with scripts.
-
ngortheone
i.e. it is easier to understand what "--close-fds" mean vs "-f"
-
xtile
long options actually behave differently from unix options: there's an important functionality difference. for example: gnuprog foo --bar baz sees --bar as an option rather than a regular argument
-
ngortheone
fewer tripts to the man page to understand what is going on
-
xtile
whereas, sanely: unixprog foo -b baz will see -b as a regular argument
-
ngortheone
longopts in freebsd have compatibility mode with short opts, where functionality does not change
-
xtile
interesting
-
ngortheone
long options were merged to deamon a while ago, you can try it yourself if you run current
-
ngortheone
but yes, there are always subtleties when it comes to mixing positional arguments and --flags
-
ngortheone
in the end of the day what matters is user's experience. if you encounter confusing behavior - please report it
-
» xtile nods.
-
ngortheone
xtile: man 3 getopt_long
-
ngortheone
A leading ‘+’ indicates that processing should be halted at the first
-
ngortheone
non-option argument, matching the default behavior of getopt(3). The
-
ngortheone
default behavior without ‘+’ is to permute non-option arguments to the
-
ngortheone
end of argv.
-
ngortheone
debdrup: is the class satisfied? :P
-
xtile
useful
-
debdrup
ngortheone: yes, except that now I have to wait for all of that to land :P
-
ngortheone
me too
-
xtile
I do think that default behavior is dangerous though: means script writers have to use -- (end of options) when building robust scripts
-
xtile
but, useful to know
-
xtile
use it more often*
-
domlaut[m]
very ambitious and exciting. I just discovered that my apps, being written in Elixir and Erlang, ship with a binary that has a daemon mode (<app> daemon instead of <app> start) that can also handle restarting via heartbeats
-
domlaut[m]
...so I can wait for new functionality of daemon(8) for everything else and not deal with fsc et al :-)
-
domlaut[m]
but now I hit a snag where I can't use command, but start_cmd/stop_cmd/restart_cmd instead, so I lost rc.subr's chroot functionality (<name>_chroot)
-
domlaut[m]
(and _chdir, and some others that only work with command=)
-
domlaut[m]
guess I can chroot myself or define a workdir variable and use start_cmd="${workdir}/bin/<app> daemon" instead
-
ngortheone
elixir and erlang/otp in general has fenomenlly good internal mechanisms to supervise running proceeses
-
ngortheone
I wish more people in the industry used erlang
-
ngortheone
erlang/otp does most of what people use kubernetes today for, but 10x better and it was written in the 80s :D
-
ngortheone
you probably don't need daemon or other external supervisors if you use OTP the right way
-
ngortheone
unless your erlang VM crashes
-
domlaut[m]
Supervisor crashes the app by default after 5 unsuccessful restarts
-
ngortheone
sounds like you need to fix the app :P
-
domlaut[m]
That's true
-
ngortheone
but yes, in those cases daemon can help. Even today it can unconditionally restart the process if it exits
-
ngortheone
see -r or -R <seconds> flags
-
domlaut[m]
Yeah, I'd like it as a final failsafe and ideally a warn/log to syslog
-
ngortheone
the log to syslog on crash is not possible today, but this is somethings that I want to add
-
domlaut[m]
like if we get to the point that daemon has to restart it, instead of it being handled by OTP
-
domlaut[m]
and I think I saw the log to syslog (and kqueue) in fsc
-
domlaut[m]
but you've already mentioned you're working on implementing kqueue :-)
-
domlaut[m]
I'll jot down that wish as well
-
ngortheone
yeah, our deamon implementation is in quite a rudimentary state. Lot's of features missing if you compare it to the competition
-
ngortheone
if you need a solution *today* I recommend looking at s6-supervise (from
-
ngortheone
from s6 package
-
ngortheone
-
VimDiesel`
Title: s6: the s6-supervise program
-
ngortheone
it can be a bit of a pain to setup (requires reading docs attentively) but it works very well
-
ngortheone
here you can find examples on how to setup a service directory for s6
-
ngortheone
-
VimDiesel`
Title: s6/examples/syslogd at master · skarnet/s6 · GitHub
-
last1
can I install a package without dependencies ?
-
ngortheone
man 8 pkg-add (--accept-missing)