01:46:34 serious question: how high can keycodes go? 01:46:54 i suppose only 127? 02:28:47 AmyMalik, per keyboard(4), yes. Specifically, "The number of the key is transmitted as an 8 bit char with bit 7 as 0 when a key is pressed, and the number with bit 7 as 1 when released." 08:03:55 karolyi: Understandable! FWIW I've been running it since November, zero issues. 11:17:05 is there a OOM killer similar to Linux, on Linux you can do alt + prntscrn + f to invoke OOM killer to kill the biggest process 11:17:21 this can be used to kill screenlocks to unlock a device, something being discussed here at FOSDEM 11:17:32 but the exploit doesnt seem possible on FreeBSD :) 11:17:49 on Linux you need to ensure you set the priority to 0 to stop OOMkiller killing the process full stop 11:17:54 or disable OOM killer 11:33:02 polarian: are you sure it's printscreen and not sysrq? Anyway FreeBSD doesn't adhere to such an "over-commit model" like Linux does, and on Linux you need something lower than 0 (-5000 or something) for oom_score_adj or am I mistaken here? 11:36:32 :) 11:42:50 :) 14:52:30 Barnerd: that sounds promising. here's to hoping that others won't find any problems on their NICs and I can safely change over to it. 17:35:18 Hello, all. I am planning to upgrade my FreeBSD to v.15. Last time I upgraded it to 14.3, my modifications to etc files were overwritten. How can I avoid it this time? 17:38:33 ^ For example, the upgrade revertd my global xinitrc . 17:56:27 when running `top`, the SWAP column always shows 0B for everything 17:56:42 even though the server is using 1 GB of swap 18:12:47 ant-x, To know this we would need to know what process was followed to do the upgrade. For example was this a new pkgbase upgrade? Was this a freebsd-update upgrade? Let's start there. 18:27:03 It was the freebase-update process for packages, as described in the Handbook. 18:30:01 rwp, at the end, I had to do `pkg upgrade -f', because some dependencies remained broken. Perhaps, this command rewrote my etc files? 18:30:11 That's strange then. I haven't done any upgrades to 15 yet but 12 to 13, 13 to 14, all preserved my changes in /etc okay. 18:31:24 "pkg upgrade -f" is a standard pkg upgrade after doing a major base upgrade. Sometimes even requiring pkg-static in order to run. Before pkgbase none of those would touch /etc because pkgs go into /usr/local so the only files modified were in /usr/local and the bookkeeping in /var/db/pkg/ 18:32:17 Before pkgbase we really had to separate and independent systems. One was freebsd-update which handled the base system. pkg handled the /usr/local binary compiled ports tree. The two did not overlap. 18:32:40 Now with pkgbase I haven't used it yet and so can't talk from experience. But now that's no longer true. And I don't know anything about pkgbase yet. 18:33:08 Nor to I. I will be upgrading 14->15 the old way. 18:33:43 Now perhaps I'll try to do a minor upgrade within v. 14 on another machine is see when/how the etc files will be overwitten (or perhaps they won't). 18:34:09 The old way, and what you used for 14.3R, would have been freebsd-update and it would have used etcupdate as the lower level tool to merge changes into /etc. 18:34:40 Mabe at at a lower level, because I did not see it with my eye, nor was prompted about any mering. 18:34:43 * merging. 18:34:47 That's always worked for me. Therefore I haven't needed to really know how it works at the "need to debug" level. 18:35:26 Perhaps, Xinitrc is special? Do you use a custom Xinitrc? 18:36:12 My custom file is in ~/.xinitrc 18:36:17 well, for config files there is stuff to ensure that changes persist, but normal files (like /usr/local/etc/X11/xinit/xinitrc) will be fixed to be the way they should be when reinstalled or upgraded by pkg 18:37:23 Since /usr/local/etc/X11/xinit/xinitrc is in /usr/local we know it is handled by pkg (or ports) and freebsd-update won't touch it or know about it. 18:37:48 Ah, mine was global: for me and father. 18:38:17 And /etc/whatever will be handled by freebsd-update and pkg won't know about it. 18:38:38 OK. Will `pkg upgrade -f' rewrite it without any merging? 18:38:53 well, there is no xinitrc in /etc, so I assumed "the upgrade revertd my global xinitrc" meant /usr/local/etc/X11/xinit/xinitrc 18:39:10 Yes. 18:39:21 That's the global one (that is, not user-specific). 18:39:32 I thought that meant that you had created your own file in /etc. No? Well that detail changes things. 18:39:56 I am sorry for being unclear. I meant /usr/local/etc/X11/xinit/xinitrc . 18:39:58 yes, as it isn't a config file, pkg will override it 18:40:40 Hmmm. Then I have to know before hand which files to backup before pkg upgrade? 18:41:03 And what files not to modify. That file is not meant to be modified. 18:41:42 rwp, look at that file: it is surelu meant to be modified (by Xorg, at least). It start a clock and several Xterm instances -- a very specific decision for the user! 18:42:52 What project/architect thinks xinitrc is not meant to be modified? 18:43:12 Me! For one. I am going to spend a few moments reading the documentation... 18:43:28 Thanks. 18:50:04 startx(1) just says it is the system-wide xinitrc , used if there is no ~/.xinitrc for the user. 18:50:44 It also says "Sites that want to create a common startup environment could simply create a default .xinitrc that references a site-wide startup file: "#!/bin/sh\n. /usr/local/etc/X11/xinit/site.xinitrc" 18:51:03 And also "Another approach is to write a script that starts xinit with a specific shell script. ..." 18:52:13 That's in the xinit page, yes. Or I could do it via $XINITRC. 18:52:21 Just for clarification, you are logging into the text console and then starting X with "startx"? As opposed to installing an xdm (X Display Manager) such as lightdm or slim? 18:52:57 Right, XINITRC, and that seems to be the expected way to configure user environments to use a customized xinitrc file. 18:52:58 Yes, I am start it with startx, because I got confused by authenticaiton, seats, &c. 18:54:00 rwp, it requires of the administartor to give all users an .xinitrc that references a site-wide file that /is not/ /usr/local/etc/X11/xinit/xinitrc . 18:54:48 It requires the sysadmin to set XINITRC in the global environment pointing to a locally created and customized xinitrc file. 18:55:02 OK, now I know some workarounds, but still am not sure why the system-wide xinitrc is considered untouchable. 18:55:40 Global environment? Not from the .profile script? 18:56:33 It's only because "pkg which /usr/local/etc/X11/xinit/xinitrc" identifies that file as owned by package xinit. What's more typical is that a port will install a xinitrc.sample file instead and leave merges up to the local sysadmin. But this package does not seem to be doing it that way. 18:56:51 You could submit a problem report and see what the discussion brings about with regards to that port and the handling of that file. 18:57:53 Thanks. 18:57:57 I'll note that the handling of xinit, .xinitrc, startx and such is at least 40 years old and so this is where no one wants to touch it because people will have learned to expect a certain behavior from it and won't want to break it. Even if it isn't nicely done when looking at it with fresh eyes. 18:58:48 All correct, especially if this behavior is not specific to FreeBSD's Xorg packages. 18:59:28 So... I would create a new local custom xinitrc startup file something like /usr/local/etc/X11/xinit/local-xinitrc or something. Then I would set XINITRC file in the global login environment pointing to it. 18:59:52 I would do that in /etc/profile.d/local-xinitrc.sh or something. That would seem to be the most clear to my thinking. 19:01:00 It is also possible to use /etc/login.conf to set global environment customization. But then it would need to be merged with every upgrade. So I would use a /etc/profile.d/localsomething.sh instead. Even though that only works for sh derived shells and not for csh derived shells. Because that's probably all you care about. 19:02:06 Being completely shell agnostic and operating before the choice of shell and across all of them is why some people would prefer /etc/login.conf which would work with any shell. Does login.conf have an .d/*.conf include mechanism? Looking... 19:03:33 Not really. The user can have a $HOME/.login.conf file. But then the user would just set the variable in their .profile or other file directly. 19:06:44 Like I mentioned most of this process flow is at least 40 years old. It's been a hodgepodge of exactly what you see for as long as I can remember. It's not FreeBSD specific. It was exactly like this on HP-UX when I was using it in the 1990s for example. This is all inherited from X Windows directly. 19:07:56 And no one wants to change it now because it would assuredly break someone egregiously. Instead it is better to just work within the system presented. 19:08:45 I don't know why the xinit package doesn't do like other pkgs though and install a .sample file owning it completely and copying it to the base file name only if the base file name does not exist. And then leaving merges to the local admin after that. 19:08:55 I mean it isn't like that file is changing any after decades. 19:09:37 Because if it did that then what you did would have been the totally expected behavior and things would have worked just like other configuration files from other pkg ports packages. 19:43:40 anyone with some connections to a ports committer, can you ask to push this? It's crazy the patch is done and the maintainer has to wait so long on a security-related update. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291543 20:14:52 The man-page for sh does not mention /etc/profile.d . I guess it is invoked from /etc/profile . Many thanks for the detailed explanation, rwp. 20:20:57 /etc/profile:19: for _file in "${_dir}"/profile "${_dir}"/profile.d/*.sh ; do 20:21:00 No need to guess 20:22:05 vkarlsen, guessing because I have no FreeBSD machine at hand. I can read (and even a little write) sh :-) 20:23:38 But I am still very clumsly in the terminal in general. For example, withought the help of a mouse and selection and a clipboard, I have trouble performing even the basic tasks. 20:26:35 ant-x: You'll get there soon :) A quick look at my /etc/profile tells me that it loads /etc/profile.d/*.sh, /usr/local/etc/profile and /usr/local/etc/profile.d/*.sh 20:27:24 The journey of 10,000 miles begins with the first step. 20:28:15 On some Linux macines at work, I have created a redistributable system with very flexible initialisation: in per-user dimension, per-endpoint dimension, global, &c. 20:28:32 rwp, Learning the Chinese language is difficulnt only in the first ten years :-)\ 20:29:13 Right! Memorizing the first million characters are the hardest. :-) 20:29:22 As far as I know the /etc/profile.d/*.sh /usr/local/etc/profile.d/*.sh is not documented directly. It's only documented in the implementation in /etc/profile which does it. It's a text file and so simply reading the comments there documents the implementation of it. 20:30:11 That's actually a strength of shell scripts in that everything is easily viewed just by looking at them. Getting in the habit of looking at them is what makes working with the system easier. The man pages and Handbook can only go so far. 20:31:13 But anyway... /etc/profile.d/*.sh is a typical thing on other operating systems too. I know Debian's at least also implements it. Debian only implements /etc/profile.d and not /usr/local/etc/profile.d as the entire ports thing in /usr/local is rather a FreeBSD specific convention. 20:36:34 sh documents the sh-specific logic of sourciong /etc/profile . What's inside that file, is another matter. 20:38:16 Right! And so we need to browse that file and see what's in it in order to know what it does. That's always been OS specific, but mostly very similar across systems. Differences usually include local variations in PATH and umask and similar things. 20:39:11 Because it is sh-derived syntax specific and not for csh and not for other shells though there has always been pressure to use something /under/ that layer such as the /etc/login.conf which could be shell agnostic. But... Personally I find that process clunky and tedious. 20:40:06 A programming language has more flexibility. 20:40:23 That is, an shell script vs a simple .conf file. 20:40:54 Yes! Which is something I like. Which is something some people are opposite and do not like. It splits people. 20:41:16 systemd vs init V ? 20:41:53 Exactly! The systemd people hate programming and like the declarative .service files where you are limited in what you can do. 20:43:14 And honestly I read a lot of dislike here of FreeBSD's /etc/rc.conf file which is designed to be declarative too. 20:43:39 rwp, but is not as complicated as systemd. 20:44:38 In my not so humble opinion it is not. Because I can use "less" to browse the scripts on the system on the fly and verify what it is doing. It's all shell. Making it easier for me to understand. 20:45:26 But I read and write shell fluently. The people who don't like it usually don't know the shell and are faced with the syntax of it which makes it a foreign language. 20:45:55 /etc/rc is exemplary of trying to do the job with the wrong tool, I think. But it's one of the better implementations thereof. 20:48:07 Originally /etc/rc was just a simple script. You edited it and hacked it to start whatever needed to be started. It was pretty much a human edit'able script only. 20:48:30 https://mewburn.net/luke/papers/rc.d.pdf 20:49:23 Luke Mewburn wrote what is the current paradigm of it and honestly it is a brilliant bit of work. 20:52:46 One of the things I like about it is that I can pretty much automate processing of /etc/rc.conf and provision a new system or copy a configuration for one system to another trivially. 20:52:51 On other operating systems such as Devuan (non-systemd) the /etc/default/* directory of files needs to be configured. On Debian (systemd) it is a long list of /etc/systemd/system/*.service files. 20:52:58 So the simplicity of FreeBSD needing only rc.conf customizations is really nice! 20:52:58 `zfs jail` seems to be broken. It should be removed. 20:53:47 Oh? Please say more. How is it broken? (I have not needed to use it myself and am not familiar with it.) 20:56:26 one can't set mountpoints from within the jail, the zfs utilities complain that the zoned parameter is set (which is like... I'm pretty sure it should be so that you can do that?) - at least the sense works for mount -t zfs, but that means all my datasets have to be legacy mounted, which isn't exactly sustainable 20:58:03 maybe i'm misunderstanding how it's meant to work 21:01:20 I am reading "man zfs-jail" and it is confusing to me how it is supposed to be used. But it looks like it is tagging the dataset as to be managed from within the jail container. And then also requires security.jail.param.allow.mount.zfs=1 security.jail.param.allow.mount.=1 security.jail.param.enforce_statfs=2 also set to enable this. 21:02:41 Seems like an attempt to make a jail appear as more of a full virtual machine system able to manage child datasets below the associated one. Not something I have done. I have no experience trying to do it. 21:20:35 Yeah, I did all that, trouble is if I try to manage anything how one'd expect it just doesn't seem to work. I'd love to stick a dtrace in that. 22:12:19 * CrtxReavr watches his python script alternate between 100% CPU and a swread state. 22:14:04 I think it's going to run out of swap before it completes. 22:15:17 swap_pager: out of swap space 22:15:17 swp_pager_getswapspace(17): failed 22:15:17 pid 61002 (python3.11), jid 0, uid 1001, was killed: failed to reclaim memory 22:15:17 pid 20774 (named), jid 0, uid 53, was killed: failed to reclaim memory 22:15:31 Yep. . . and it took out named. 22:34:48 That's the number one thing I hate about memory overcommit. Other unrelated processes are sometimes killed in the collateral damage. 22:47:09 as in https://ariadne.space/2025/12/16/vmovercommitmemory-is-always-the-right.html ? 22:47:26 does FreeBSD have the same setting somewhere? 23:14:33 Upgrading PHP is a pain. A regular pkg upgrade wants to uninstall my existing PHP packages and not upgrade them/ 23:14:44 What should I be doing instead? 23:15:20 Surely it uninstalls the old ones and installs the new ones? 23:15:26 nope 23:15:31 just unistalls the old ones 23:16:04 Are you going up a major version? 23:16:08 yes 23:16:23 8.1 to 8.2 23:16:56 That is a pain, partly because the pkgs don't map directly from 8.1 to 8.2 23:16:56 the package name changes pkg doesn't have any idea that phpX-* has anything to do with phpY-* 23:19:01 It's a chore to have to take an inventory of all the php ports, pecl ports, and the php apps themselves. Even then I still manage to forget something. There must be some way to do this that's not so painful so I don't keep putting off the major version upgrades :) 23:19:06 that does seem silly... have not hit that before, probably because any php+mods installed are deps of another package so gets handled automatically 23:20:14 why are you using php? required by a pkg or a custom app installed outside of pkg? 23:21:03 you should follow the UPDATING entry for 20240529 and use pkg set --change-name just phpX instead of pyX 23:21:16 PHP shop, lots of PHP apps both from ports and custom built ones 23:21:52 Roundcube mail, davical, phpmyadmin, etc... 23:23:22 I would post console output to show what it's doing, but privatebin is PHP :) 23:24:18 hm, as the default php version in ports is higher, do you build your own pkg repo? how about putting your custom apps in an overlay, so that you don't manually install any pkgs with a phpX prefix 23:25:10 Yes, I build my own repo: http://pkg.ent.morante.net/poudriere/build.html?mastername=135amd64-deluxe-saturn&build=2026-02-01_01h31m16s 23:31:39 lots of ways to solve... handholding the pkg upgrade and being careful is least effort :D 23:37:56 yeah, pkg -qo, then doing a diff afterwards :) 23:38:11 Fun... www/privatebin didn't get rebuilt to use the new default php version 23:38:22 it still wants to pull in 8.1 as deps 23:39:27 Can I force poudriere to re-build a specific package? 23:47:52 putting each web app into its own jail can help too, with security and managing deps 23:48:46 have a dedicated jail for a reverse proxy/https termination like nginx 23:48:56 firewall rules between all jails/host system/lan 23:49:29 I do the per-jail thing with my newer servers. It's more stuff to update, but yes, it results in less stress/breakage.