-
gh00p
Heya. I'm trying to make thin jail in 14-RELEASE the same way I've made them in previous versions, but after I make the jail the `pkg` command gets SSL error when it tries to bootstrap. Did I forget something?
-
gh00p
The first in the long series of errors is this; 00202166573D0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/statem/statem_clnt.c:1890:Certificate verification failed for /C=US/O=Let's Encrypt/CN=R3
-
gh00p
Sorry, *one* of the first.
-
sfox
fuck
-
rtprio
gh00p: what's /etc/ssl/certs look like, in the jail
-
gh00p
rtprio: almost identical to the host (where pkg works). There's one more file on the host, 'cd8c0d63.1'.
-
gh00p
Copying that file to the jail's certs dir didn't help.
-
gh00p
I get similar errors when I use `fetch` to hit other https sites.
-
gh00p
It happens with any HTTPS target, it seems. I get it with `fetch` too.
termbin.com/bwn0
-
gh00p
Oh, I just said that. I seem to be monopolizing the conversation.
-
rtprio
they are symlinks, you know
-
rtprio
and that termbin looks like they're broken symlinks
-
gh00p
Ah, that's it! The thin jail has it certs in /s/etc/ssl/certs, so '../../..` resolves incorrecly. Why has this never happened before?
-
rtprio
because /s/usr/share/certs/trusted doesn't exist ?
-
rtprio
is the jail name 's'?
-
gh00p
no, `/s/` is the mountpoint of the jail skeleton, from within the jail. Everything outside /s is mounted read-only, /var is a symlink to s/var, /usr/local is a symlink to /s/usr-local, etc.
-
gh00p
And /usr/share/verts/trusted exists, but is not visible as `../../../usr...` from /s/etc/ssl/certs. I need one more `../`.
-
rtprio
check out /usr/src/usr.sbin/certctl/certctl.sh might fix it for you
-
gh00p
Looks promising. I'll need to deal with my readonly filesystem, but maybe rehashing updates the symlinks
-
gh00p
Thanks for the tip.
-
gh00p
I'll update them manually if I have to, but I'd much rather add this to my jail provisioning scripts.
-
gh00p
Solved with certctl! Thanks very much!
-
rtprio
👍
-
antranigv
mornings y'all
-
Hecate
hey antranigv :)
-
ant-y
Hello, all. Upon wake-up from suspend, my laptop was optining the "Display" application. I found a fix: <
forums.freebsd.org/threads/90827/#post-627318>: reset the XF86Display property from the "Keyboard shortcuts" section of Xfce settings. That settings was bound to any keyboard combination, so why was it firing? Nor is it an Xfce default, but FreeBSD-specific. Does anybody have the same symptom when your computer waskes up after suspend
-
ant-y
(zzz(8))?
-
ant-x
^ Reset means restore to default, and in my keys it caused that property to disappear from the settings, so that reset == remove.
-
dwho
Hello everybody , when I have freeBSD 14.0 RELEASE , myvirtualbox run nice but I have upgrade 14.1 RELEASE , virtualbox don't run , I have error Kernel driver not installed (rc=-1908), I check kenel driver and they are loaded, can you help me please ?
-
rtprio
how did you upgrade?
-
dwho
rtprio: freebsd-update -r 14.1-RELEASE upgrade
-
rtprio
you need to update virtualbox too
-
dwho
rtprio: I will try,
-
dwho
rtprio: I upgrade virtualbox but I have the same trouble
-
rtprio
and restarted the system?
-
dwho
rtprio: I have not reboot
-
dwho
I will reboot
-
rtprio
great
-
rtprio
see you soon
-
dwho
rtprio: Thanks
-
dwho
rtprio: I reboot but I have same trouble
-
vkarlsen
dwho: You need to rebuild and reinstall /usr/ports/emulators/virtualbox-ose-kmod
-
rtprio
oh, thanks vkarlsen
-
vkarlsen
dwho: The pkg for it is built for the 14.0 kernel, and won't work with 14.1
-
dwho
vkarlsen: Thank you very much
-
dwho
vkarlsen: I use pkg and I 'm not use ports
-
vkarlsen
dwho: I figured. But you will need virtualbox-ose-kmod to be built for your kernel, so for that you will need to build it from ports. You'll also need to have the kernel source in /usr/src
-
dwho
vkarlsen: thanks
-
vkarlsen
I could give you my pkg if you really get stuck, but you shouldn't install pkgs from strangers, especially not kernel modules
-
dwho
vkarlsen: No thanks , I will make the ports , but it's kind of you
-
» ant-x vouches for vkarlsen
-
Grabunhold_
I'm trying to write an rc script for a python tool I made. This is what I've got so far:
pastebin.com/zGWAcksK
-
Grabunhold_
it starts my code on system startup, I can stop/start in manually, "status" works, but it seems it doesn't properly stop it on system shutdown - at least my "got sigterm, shutting down" doesn't appear in /var/log/messages during shutdown although a manual stop of the service makes that line appear
-
ant-x
Grabunhold_, have you tried implementing your own stop command and log its execution? Or at least log the invocations of your rc.d script together with $1?
-
Grabunhold_
ant-x: not so far
-
Grabunhold_
ant-x: i also thought that maybe the logger was gone already when my script finally got stopped because i'm missing a dependency or something?
-
ant-x
My experience is so low that I log whatever stuff I am trying to use/debug...
-
Grabunhold_
could that be a thing?
-
ant-x
By loggin I mean the simplest thing possible: direct output to a file.,
-
Grabunhold_
ant-x: gimme a sec
-
Grabunhold_
adding debug logging
-
ant-x
Yes -- the stone-age method.
-
Grabunhold_
at least we can still bring out the axe, hehe
-
ant-x
The problem with debug loggin is you had better remove it after use~!
-
Grabunhold_
the first and foremost problem is that every test takes ages because i have to reboot this stupid server that i'm testing on
-
Grabunhold_
and the firmware takes ages
-
Grabunhold_
okay, I added this: if [ "$1" = "stop" ]; then echo "$(date): Received stop command" >> /var/log/debug_stop; fi
-
ant-x
In that case, be very liberal with your debug logging.
-
Grabunhold_
when running "service anlasser stop", I get the proper line in /var/log/debug_stop
-
ant-x
Better and safer to log every command received by your service.
-
Grabunhold_
however, when rebooting I don't
-
Grabunhold_
so it seems that the rc script isn't even invoked with the "stop" argument during shutdown
-
ant-x
Grabunhold_, I got it: you neglected to add the `shutdown' keyword.
-
Grabunhold_
ant-x: huh? check
pastebin.com/zGWAcksK again, line 5
-
Grabunhold_
or is that wrong somehow?
-
ant-x
Ough, so it /is/ there all right.
-
Grabunhold_
i have removed the "python" keyword, i'm not even sure that I need it. is there a list of keywords with explanations somewhere?
-
ant-x
Grabunhold_, see: "Operation of rc.shutdown" in <
man.freebsd.org/cgi/man.cgi?query=rc.shutdown> . Does it mean the actual command is `faststop'?
-
ant-x
For an overview of stanard keywords, see: <
man.freebsd.org/cgi/man.cgi?query=rcorder> .
-
Grabunhold_
hmm, why did i even limit the logging. i have changed the script to simply log all arguments, not only "stop"
-
Grabunhold_
let's see try the reboot again
-
Grabunhold_
should have listened and been more liberal with logging like you said!
-
ant-x
See the note about `faststop' at the end of section 7 here: <
docs.freebsd.org/en/articles/rc-scripting/#rcng-hookup>
-
ant-x
Grabunhold_, At least in debug logging, liberalism is a good thing.
-
Grabunhold_
okay, i got "faststart" during boot but no "stop" or "faststop" during shutdown...
-
ant-x
Try calling `rcorder -k shutdown' and see if it detects your script.
-
Grabunhold_
next reboot, next "faststart", no "stop" or "faststop".
-
Grabunhold_
"rcorder -k shutdown /usr/local/etc/rc.d/*" does indeed list /usr/local/etc/rc.d/anlasser
-
ant-x
Then I am at a loss. Have you tried placing your script in /etc/rc.d instead?
-
Grabunhold_
not so far. might try that next. for the record: manually invoking "service faststop anlasser" works and correctly logs into the debug file
-
ant-x
Does you script really run a deamon process with pid?
-
Grabunhold_
it runs via DAEMON(3)
-
Grabunhold_
so it doesn't fork into the background itself
-
Grabunhold_
but the script does indeed keep running, needs a proper shutdown and that shutdown does work properly when manually invoked via "service anlasser stop" or "/usr/local/etc/rc.d/anlasser stop"
-
ant-x
Are you logging as early as possible, that is before `. /etc/rc.subr` ?
-
Grabunhold_
no, after that. but it does work for all my manual invocations so far... i will move it above that line
-
ant-x
It is best to do it before, lest you miss a case, however improbably, that rc.subr terminates .
-
Grabunhold_
last experiment before i got to got, unfortunately. many thanks for your help and time, it's very much appreciated
-
Grabunhold_
reboot is running...
-
ant-x
Have you added the early undonditional logging?
-
Grabunhold_
yep
-
ant-x
If you solve this mystery, please let me know (using memoserv if I am not online) -- I have a learner's interest in it.
-
Grabunhold_
nope, "faststart" only
-
ant-x
Duh...
-
Grabunhold_
ant-x: i will try to remember that :) will share the source for the python stuff in the coming days, too. it's a bhyve manager
-
ant-x
Sounds like a stupid error, or a problem with DAEMON(3)...
-
ant-x
Thanks.
-
rtprio
i suspect you don't have all the bits in your rc script
-
Grabunhold_
rtprio: and I have no idea what bits that may be
-
jbo-
lw, ping
-
ant-x
Grabunhold_, looking at some other rc.d scripts, I wonder is the DAEMON keyword might help...
-
ant-x
^ I mean REQUIRE: DAEMON
-
Grabunhold_
ant-x: as in line 4 here?
pastebin.com/zGWAcksK
-
ant-x
Yes.
-
Grabunhold_
so i've already done that, or am i misunderstanding what you mean?
-
jauntyd
exit
-
ant-x
Grabunhold_, yes, you have.
-
ant-x
Guys, I accidentally destroyed my /usr/local/etc/rc.d/dbus . Where can I find a copy?
-
Grabunhold_
I'm gonna sleep a whole, cya guys tomorrow! Thanks for all the suggestions and help
-
ant-x
Good night, let the solution come to you in sleep!
-
souji
ant-x: If you are still searching, it is in the ports tree
-
souji
-
ant-x
souji, I was trying to extract the .pkg file...
-
souji
ant-x: is also a way to do it... I guess
-
rwp
ant-x, First locate the package containing that file. "pkg which /usr/local/etc/rc.d/dbus" which is unsurprisingly /usr/local/etc/rc.d/dbus was installed by package dbus-1.14.10_5,1
-
rwp
Then install dbus again: pkg install -f dbus
-
ant-x
souji, Thank you, you saved me. I just curl'ed the plain version of the page.
-
ant-x
rwp, Right, I tried to install it, but it was already installed. I did not try the -f option.
-
souji
nw
-
ant-x
I have read the pkg manual, but did not find a way to extract a .pkg file, only to list its contents.
-
rwp
Since FreeBSD tar uses libarchive it means tar is now even more powerful. Just use tar: tar xvf /var/cache/pkg/dbus-1.14.10_5,1~ec69e040c9.pkg /usr/local/etc/rc.d/dbus
-
ant-x
rwp, even though .pkg is not a tar archive?
-
rwp
Really? What does "xzcat /var/cache/pkg/dbus-1.14.10_5,1~ec69e040c9.pkg | file -" say for you?
-
rwp
Using a version that you have available of course.
-
ant-x
Ouch, I read it was txz, but that was in an unofficial source.
-
rwp
The 'z' used to be needed to indicate that it was a gzip'd tar file. But that is no longer needed when libarchive is used to identify the compression method dynamically.
-
rwp
Meaning that one no longer needs to include z or J or any of the other specific compressions when reading an existing archive.
-
rwp
The t and x are conflicting though. I don't understand that. Maybe they both work together okay but it used to be either t for table of contents or x for extract the file.
-
rwp
And v gives a long listing like ls -l.
-
rwp
so tvf is table of contents, verbosely like ls -l, file listed as following.
-
rwp
There are some crazy syntax things suitable for a trivia contest that I will avoid overwhelming people with and just say, ignore those for now.
-
ant-x
Thank. I am tryng to restore my dbus, and hope it runs now that I have substituded the correct prefix in the dbus.in file for rc.d
-
ant-x
Whew. It works now.
-
ant-x
Now I must to bed. I will continue rc.d experiments tomorrow. I wanted to make a simle script to run at resume event, because handling it via devd is out of the question, beucase it does not support multiple subscriptions, and alway runs the first mathcing rule.
-
rwp
Do you by any chance use Boot Environments or snapshots? You could then reach into a previous snapshot and retrieve it from there.
-
rwp
Good night!
-
ant-x
rwp, no, I am learing the simplest things on the simplest filesystems. Good-night, rwp.
-
rwp
You might look to see if you have a snapshot: ll /.zfs/snapshot/*/usr/local/etc/rc.d/dbus
-
rwp
I would also say if you have any other system then you could copy it from there. But anyway: Good Night!
-
rtprio
Grabunhold_: you did read the handbook section on this, yeah?
-
phryk
Is there an option for `date` to output the date in the short format defined for LC_TIME?
-
rtprio
what is LC_TIME
-
rtprio
phryk: if anything, it would be in `man strftime`
-
phryk
the env var that sets which locale is used for time-specific localization
-
phryk
rtprio: i don't think so. that's for supplying an explicit format string.
-
rtprio
%Ex, maybe?
-
rtprio
hrm
-
phryk
ah, right – `date +%Ex`, thanks.
-
rtprio
well, not certain about that,
-
rtprio
doesn't say short or not short but could be the right thing
-
rwp
Let me advocate for "date +%F" instead as that's more standard.
-
rwp
Not the F that is standard but the 2024-07-22 output format.
-
rwp
The format %Y-%m-%d is more standard and portable.