01:06:23 is python39 the default, or is that a downstream change 01:09:03 AmyMalik: python 3.9 is currently the default in ports 01:18:49 yes. 01:18:59 that does mean some ports can't be upgraded, like gajim. 01:27:46 jbo: around? 01:27:56 My laptop is wheezing. I should create a vm on my main hypervisor 01:34:43 is it just me or is everything about ports set up to make being a ports maintainer as annoying as possible 01:35:03 trying to testport my new port, poudriere wants to build 304 packages 01:35:16 including rust, gcc12 *and* llvm 01:35:34 so i have to sit here for like 12 hours while it does all that shit when i could just 'make install' in 30 seconds? 01:35:40 it might be 01:35:59 no wonder there are no fucking ports committers if this is what it's like 01:38:21 oh you want to test that one line change to a Makefile? sorry you have to run your cpu at 100% for 12 hours while testport decides if it's ok 01:39:09 i hope this is just a case of you holding it wrong, because if it isn't, rrrryikes. 01:39:21 -shrug- 01:39:26 [main-sublimemusic] [2024-01-26_01h21m51s] [parallel_build] Queued: 304 Built: 146 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 0 Tobuild: 158 Time: 00:11:46 01:39:34 did i type the command wrong? 01:39:55 i have to look up that command, don't i 01:40:07 [1& 146? 8!] root@ilythia /poudriere/ports/sublimemusic 01:40:07 # poudriere testport -p sublimemusic -j main audio/py-sublime-music 01:40:27 this bad girl? https://man.freebsd.org/cgi/man.cgi?query=poudriere-testport&sektion=8&manpath=freebsd-release-ports 01:40:28 Title: poudriere-testport(8) 01:40:49 i see 01:42:36 fuck testing this on 14.0 and 13.2 as well to be honest 01:42:55 i will just not submit the port if that's a requirement 01:44:11 what CPU do you have 01:44:29 CPU: AMD Ryzen 7 5800X3D 8-Core Processor (3400.08-MHz K8-class CPU) 01:58:10 ah 01:58:23 do you have a 5950x laying around somewhere 02:00:52 won't help with the underlying problem, but might make it a little easier to deal 02:01:44 why would i have an incredibly expensive CPU just lying around not doing anyone 02:02:42 valid, I guess 02:04:46 do you have a copy of what you're working on somewhere 02:08:00 AmyMalik: https://www.le-fay.org/tmp/30d/0001-audio-sublime-music-New-port-GTK3-desktop-client-for.patch 02:11:58 interesting programme, ngl. 02:24:52 I am not a poudriere expert. I'll have to leave this to someone who knows poudriere and/or is with portmgr. Before I go: who asked you to do testport? 02:33:54 AmyMalik: i would always do a testport before submitting a new port, i think this is pretty standard 02:38:02 lw, never tried it but there is a '-b branch' option that 'Fetch binary packages from a binary package repository instead of building them' https://man.freebsd.org/cgi/man.cgi?query=poudriere-bulk&sektion=8&manpath=freebsd-release-ports 02:38:03 Title: poudriere-bulk(8) 07:14:38 hrm, very hard to use the freebsd installer without a down arrow key 07:14:52 vi keys don't work 07:20:10 ctrl+n would be emacs key 07:20:49 that doesn't work eithr 07:21:15 some menus you can pgdown and then up arrow, but dialog doesn't seem to be one of them 07:21:51 how about navigating selection with the tab key? 07:23:07 works most of the places, not the partition editor 07:23:20 have to arrow down to choose the partition, 07:23:33 gotcha *nods* 07:25:22 sadly, bsdinstall(8) doesn't seem to mention about vi bindings: https://man.freebsd.org/cgi/man.cgi?query=bsdinstall 07:25:23 Title: bsdinstall 07:26:51 i tmux-ed from my phone. but god damn. 07:27:00 i suppose something to automate later 08:04:02 Hi, I'm trying to write a service for my script to restart if it exits. I'm using daemon(8) with -r to make it work. However, I'm encountering an issue with stopping the service. As you may have guessed, it gets stuck when stopping the daemon. What am I doing wrong? here is my service: 08:04:03 https://spmzt.net/privatebin/?c48805d331c9a23e#EjDke5WmqMxgiE5qx7mEzPDTNCuZxYgb9ATfUgprEywb 08:04:04 Title: PrivateBin 08:34:48 did you really expire the paste after only a few minutes? 08:49:38 Don't know why it has expired, new link: https://spmzt.net/privatebin/?6009b6596beeea42#58TUmz3rgJbRRZXhGMXjXqcaRziNxDpdvK88qWTh2ieQ 08:49:39 Title: PrivateBin 08:56:10 does it stop properly without daemon -r 09:03:32 no, it does not stop properly 09:05:11 i think you need to tell your bash script to handle the exit signal 09:05:49 i believe the keyword is `trap' 09:08:39 It does not help if I use the pid of script and proname of sh either. the inotify inside the script will continue to run. but the service stop with rc works. 09:11:08 I have tried the trap to handle exit signal. I have used the trap to kill the whole process group and/or shell script itself. Unfortunately, not even that works. 09:12:14 sounds like a problem with the inotify 09:12:55 did you use the trap to kill inotify? 09:15:51 I had tried the 'trap "kill -- -$PPID" TERM', 'trap "kill $$" TERM, and other variations of that, I have tried the '-T' option with shell too. 09:18:38 uh 09:18:57 $PPID ? what 09:20:12 I need my shell to pipe the stdout of inotify to other program. So I used group command '(inotifywait ... | program )&' and then tried to trap 'kill $!'. Same result. 09:21:02 you want to capture the pid of inotify in your script and trap to kill it explictly. not sure you have it in scope like that later on 09:21:11 daemon, PPID of the shell script should be daemon(8) itself. I have checked this before, so i'm sure about that. 09:23:29 ok, what happens when you `service watch stop` 09:24:12 watch may not be the best name as there are at least two utilities named watch already, one of which is /usr/sbin/watch 09:27:05 9:23 < rtprio> ok, what happens when you `service watch stop` 09:27:15 Noted. let me check. Will use logger to see what happens 09:27:57 and you trap from your shell script /root/watch.sh to kill $ppid which is th daemon pid? that's not right 09:28:16 trap everything in watch.sh and log it so you can see what's happening 09:28:33 i'm not familar enough with rc magic functions to know if i 09:28:50 what youre expecting to happen when you `service watc hstop` is actually happening 09:29:09 Has https://docs.freebsd.org/en/articles/rc-scripting/ been mentioned yet? 09:29:10 Title: Practical rc.d scripting in BSD | FreeBSD Documentation Portal 09:30:05 good call 09:31:56 i should go to bed 09:39:48 I was trying to kill the whole process group and the process group id is same as its leader which is daemon(8). So no I know the rc will kill the daemon If i pass its pid (-P in daemon) to it. In this way I was able to tell all processes under shell script process group to kill themselves 09:41:39 rtprio: thank you for your time. 11:01:59 spmzt_: procctl(8) has some reaper stuff that you might find useful. 11:25:35 debdrup: Thanks, will check 16:06:09 hi, i'm on 13.2-RELEASE-p8 ; it's a very standard box, i'm a beginner at bsd too. i have done an upgrade using freebsd-update fetch and freebsd-update install. to be sure i've also rebooted and ran pkg upgrade 16:06:17 but every time i try to run vim i get this: ld-elf.so.1: Shared object "libncurses.so.8" not found, required by "vim" 16:09:13 Dieterbe: hi, what is your 'pkg info vim' output? 16:10:16 hi! uh... pkg: No package(s) matching vim 16:10:18 that's interesting 16:11:03 interesting, maybe try to install it with pkg? 16:11:57 ok, now vim works.. strange, /usr/local/bin/vim definitely existed 16:21:49 thanks for your help spmzt__ 16:57:38 https://docs.freebsd.org/en/books/handbook/cutting-edge/#freebsdupdate-portsrebuild 16:57:39 Title: Chapter 26. Updating and Upgrading FreeBSD | FreeBSD Documentation Portal 17:46:18 debdrup: that's fantastic, thanks 18:46:41 nmz: sorry, I think I lost context for the conversation. 20:15:34 i have a command I which to run as a service. How do I write a service ? 20:15:52 s/which/wish/ 20:22:12 dmr104: https://docs.freebsd.org/en/articles/rc-scripting/ 20:22:13 Title: Practical rc.d scripting in BSD | FreeBSD Documentation Portal 21:11:43 debdrup: you recommended daemon 21:11:55 as a replacement for runit/services 21:12:19 dmr104: daemon(8) 21:15:32 a service != supervision, but a service can be supervised. 21:23:16 Do we have an example of something that already uses daemon(8) that might make a good example of its use? 21:23:29 grep -r daemon /etc/rc.d 21:24:16 Like your nick I don't see anything but other string matches that mare unrelated to daemon(8). :-) 21:24:29 if you install 'redir' 21:24:44 its script that is very small will be /usr/local/etc/rc.d/redir 21:24:51 as an example :) 21:26:00 mysql-server:command="/usr/sbin/daemon" 21:26:04 so that uses daemon 21:26:09 Until this time I have been very happy using "monit" to monitor hostile Internet facing services that sometimes get abused and wedged up and then automatically restart those services if needed. Mostly for use with Apache. Nginx has not needed it. 21:29:37 I normally bodge a quick perl script together and run that in daemon 21:31:32 Reading the docs on daemon(8) it looks like it will take a program which is not intended to be a daemon and detach from the controlling terminal and background to become a daemon process, and then will restart the process if it exits. Which is completely different from what something like "monit" does to check on the health status of a service and automatically take action. Different things. 21:33:02 optioanlly restart it 21:33:12 If I want to write a daemon process then I usually just write it as well so that it is built into the program itself. That's why I haven't ever needed something like daemon(8) myself. 21:33:41 its kinda handy for those one off perl or curl commands you want as well 21:33:44 Most daemon programs also include their own process management, like Apache, Nginx FPM, and so forth. 21:33:47 daemon perl -e 'random crap' 21:34:04 you can control daemon(8) with signals 21:34:24 For "random crap" I will mostly just let it run in a window pane of my tmux terminal session manager which is itself a daemon. 21:34:56 well when you want to shove it in /etc/rc.d/local daemon is there for you :) 21:36:14 I'll just note that when I have wanted that type of thing that I have always in the past used setsid(1) from ports (and util-linux on other systems). 21:36:52 fair dos' 21:36:56 do's 21:37:12 setsid(1) does not restart but does do the daemon setup detaching from the controlling terminal. 21:38:24 On other systems, ahem, systemd systems, there are often problems with Apache and therefore I have taken to just letting Monit start Apache even at boot time. It just works out simpler that way. 21:39:51 It's totally crazy (and I know OT here) but apachectl calls systemctl and systemctl calls apachectl and the loop is broken with an env variable and sometimes, always, quite often anyway, systemd becomes confused about Apache processes. I have spent way too much time debugging systemd as to why. Now I just let Monit deal with it there. And now I am going to stop talking about OT things. :-) 21:40:10 fix it by using nginx :P 21:40:33 Nginx is awesome! And pretty much shrugs off "slowloris" attacks which put Apache into distress. 21:40:53 its still vulernable to that crap? 21:42:15 Yes. It's still a problem. For Apache. Not really a problem for Nginx because it is so light that it is just very difficult to overload a system with it. 21:42:45 not a problem because it uses actual forks and then soft forking / events 21:44:04 I just really enjoy working with Nginx much more than Apache that whenever the topic comes up I always sing the praises of Nginx hoping that over time use of other lessor systems will decline to the point where I won't need to work with those others anymore. 21:44:05 Iirc the most efficient mitigation is ratelimiting TCP handhakes using the firewall 21:45:55 For the lurkers here is a reference: https://blog.qualys.com/vulnerabilities-threat-research/2011/07/07/identifying-slow-http-attack-vulnerabilities-on-web-applications 21:45:57 Title: Identifying Slow HTTP Attack Vulnerabilities on Web Applications | Qualys Security Blog 21:46:03 And also: https://blog.qualys.com/vulnerabilities-threat-research/2011/11/02/how-to-protect-against-slow-http-attacks 21:46:04 Title: How to Protect Against Slow HTTP Attacks | Qualys Security Blog 21:46:41 I must spend some sprint time doing real work for a while. 22:05:52 if i bind the address 0.0.0.0:6601 using socat for example, how do i unbind it ? 22:07:25 kill socat 22:09:32 ah thanks