00:02:16 Ok I'm taking a i386 12.4 to 13.2... send bits to /dev/null for the UNIX gods. This machine is 120 miles away. 00:02:33 any solutions scoobybejesus? 00:03:08 Good luck skered! Thinking happy thoughts for you. :-) 00:03:27 well, the only thing that comes to mind is to not move it to a temp dir which seems like a constraint 00:05:06 this is what doesn't make sense. if the build dir has soft links ok, but the iso produced from it is 1.7GB. so why when i copy that dir, even including its softlinks, is not only the temp dir twice the size, but the iso produced from it is too 00:05:47 maybe i can find a cp switch that doesn't copy soft link source files but copies the soft links instead? 00:05:54 polyex, I am thinking that it doesn't make sense for it to have expanded that much. Something is wrong. 00:06:04 ya 00:06:38 Use rsync instead of cp. It's better for a number of reasons of opinion such as being restartable. 00:06:49 build the freebsd source, then install world/kernel, and then cp DESTDIR and see it's double sized now 00:06:58 hm 00:08:35 "man cp" for -R says "This option also causes symbolic links to be copied, rather than indirected through" so should not be copying targets of symlinks. 00:08:58 duh how'd i miss that 00:11:15 -RL 00:11:22 i can try that 00:11:31 but i wonder if i can use -s 00:11:54 so i basically just create a symbolic copy to the build dir, copy my changes in over the symlinks, and not need as large of tmp dirs 00:12:11 If the copy doubled in size then I think you have made two copies somehow. 00:13:56 ok cp -RL still ends up basically double 00:14:07 Hints for exploration tools: I like "ncdu" for exploring (in a terminal) disk usage. 00:14:36 Since there is double the space it does not seem like a subtle difference. Will probably be able to see the problem pretty quickly. 00:15:29 And if not then I would use "rsync -n --delete -av src/ dst/ 2>&1 | less" and see what rsync says is needed to converge the two directories. CAUTION: ENSURE THE -n OPTION IS THERE. 00:17:12 ok tried cp -Rs and that wasn't a solution 00:17:34 i wonder how i can actually just duplicate the dir instead of dealing with these symlink issues 00:18:30 Do you know the problem is actually symlinks? Does not seem plausible to me. 00:18:46 well -R right? 00:19:12 cp -R does not copy the target of symlinks but would copy the symlink so would not be doubling the disk space. 00:19:32 ohhh i misunderstood. well wtf then 00:20:47 Adding -L would force cp to copy through symlinks and would copy the destination too. Not what you want. 00:21:10 ya 00:21:29 And how many symlinks are in the directory anyway? Look and see. Hint: find . -type l -ls 00:23:18 looks like quite a few 00:23:51 i should check for hard links 00:24:48 find man page -type doesn't have an option for hard link 00:26:54 Files that are hard linked are just normal files, with a link count greater than 2. 00:27:26 find . -type f ! -links 1 -ls 00:28:13 Did I say greater than 2? I meant 2 or greater. But normal files have a link count of 1. So let's skip those. "! -links 1" files not link count 1. 00:28:41 bunch of those too 00:31:36 tried cp -a and it doubles the size too 00:34:19 What command are you using to look at the size? "du -sh"? 00:35:01 What file systems are the source and destination? Is one compressed and the other not? 00:35:11 ya 00:35:16 zfs 00:35:16 no 00:37:04 rsync -av source dest ended up 3.2GB too lol 00:37:12 don't use cp to copy file trees 00:37:33 why not? what should i use? 00:37:57 RhodiumToad, Tag! You are it. I am relocating. :-) [I always use rsync. Swiss army knife for copying. Restartable!] 00:38:30 tar or cpio or pax 00:38:39 why not rsync? 00:38:47 rsync's not in base. 00:38:55 by all means use it if you prefer 00:39:13 but tar and friends know what to do with hardlinks 00:39:22 (which cp does not) 00:39:43 does rsync know? 00:41:23 man page has matches for hard so it must 00:41:46 is my freebsd build dir doubling in size when i duplicate it because of the soft or hard links? 00:46:18 rsync -aH source dest ended up with same 1.7GB!!!!!!!!!! 00:47:39 there are plenty of hard links in the tree, but /rescue is especially notable since it has 145 hardlinks to the same 14MB file 00:47:52 looool 00:48:00 wut 00:49:23 ok with rsync -aH i can run mkisoimages.sh and it ends with same size !!! 00:49:50 * RhodiumToad remembers the days when /rescue fit on a floppy 00:50:20 wow 00:50:30 maybe it still would without all of those 14MB files lol 00:50:47 no, the 14MB file (there is only one) is the whole point of /rescue 00:51:05 it's one file that provides /rescue/sh, /rescue/ls, /rescue/cp, and so on 00:51:15 ok so i built and installed world/kernel, then mkisoimages.sh to make an iso, then booted iso, but it doesn't automatically start bsdinstall like the official distro isos do. why not? 00:51:23 all static linked into one file so as to only have one copy of libc 00:51:34 oh 00:51:51 did you look at the release/Makefile stuff and put in all the relevant parts? 00:52:29 ah no i missed that. the section for disc1? 00:52:34 it's the /etc/rc.local which runs bsdinstall 00:52:55 you'll notice that the makefile copies that into the image 00:53:20 (normally /etc/rc.local does not exist in an installed system) 00:53:32 why do we have to do manual stuff just to recreate the official distro isos? 00:53:43 you don't, that's what the makefile is for! 00:53:52 so i'm just not using it right? 00:54:22 you're doing your own customizations, yes? 00:54:27 ya 00:54:54 the makefiles do everything to create the official distro isos 00:55:06 i clone source, make build it, make install it, and at that point i want to have the same data that the official distro iso has 00:55:15 how do i use them? 00:55:17 if you want to do your own thing, it's up to you to decide what stuff to do and what not to do 00:55:43 i just want to take the official distro iso and go from there, not do a bunch of my own manual stuff 00:55:55 all i copy in is /etc/installerconfig and custom.txz to freebsd-dist 00:57:53 12.4 to 13.2 was fine. \o/ 00:58:01 oh ok then, did you try make -C release disc1 ? 00:58:27 (after buildworld) 00:58:29 after the install world/kernel? 00:58:36 so before install? 00:58:42 no, that target will do its own installworld/installkernel 00:58:57 specifically it'll make base.txz and kernel.txz 01:01:41 going to try it clean 01:02:12 anyway, make disc1 should create a disc1/ dir somewhere (I guess in the obj tree) and populate it ready for mkisoimages.sh 01:02:19 but won't actually make the iso 01:02:28 ohhh interesting 01:02:34 sounds perfect 01:02:51 can't wait to try!! 01:02:53 make disc1.iso will do make disc1 and then run mkisoimages 01:03:26 ty 01:27:04 k trying now 01:27:27 sudo make -C release disc1? or sudo not needed? 01:31:59 ya seems to need it 01:32:13 i wonder if i can pass a path for it to put the disc1 dir at 01:35:46 not afaik 01:38:35 so it ran but where is disc1/ ? lol 01:39:06 did you look for it? 01:39:20 ya in the freebsd-src dir i ran a find command for it 01:40:52 oh looks like it's in /usr/obj? 01:41:09 * RhodiumToad points up 01:41:30 "... somewhere (I guess in the obj tree) ..." 01:43:39 should i delete disc1 each time before i make it just like i did for the install world/kernel DESTDIR? 01:47:09 probably 01:57:21 ty! 02:46:52 so im trying out the full loop and i deleted disc1. then i try sudo make -C release disc1 again and i get an error, make: chdir release: no such file dir 02:59:56 you're in the wrong dir 03:00:05 i'm in the release dir 03:00:12 then just make disc1 03:00:23 the -C release is assuming you're in /usr/src 03:00:25 but i didn't make it the first time 03:00:29 oh it is wtf 03:02:12 ahhh -C here is just like tar's -C, like a rebase 03:02:20 ty! 03:09:19 hm weird 03:10:04 so i did a make build, then from /usr/src ran sudo make -C release disc1 and i get some errors. makefile.inc1 line 105 a build is required first you may have the wrong makeobjdirprefix set 03:10:12 stop error code 1 yadda yadda 03:10:30 but the first time i ran it, it ran like normal 03:25:03 is it safe to delete /usr/obj/* and try building from src again? 03:26:52 yes 03:28:13 ok gonna rebuild then try the new make command again 03:29:49 when we run make we wanna do that from the dir with the Makefiles... in it right? 03:30:54 yes 03:31:01 ty! 03:31:10 it looks for a Makefile 03:31:58 from current dir down, or up? 03:32:31 make looks for Makefile in the current dir only 03:32:55 note that -C changes dir before looking for Makefile 03:32:58 make tries to 03:32:58 open ‘makefile’ then ‘Makefile’ in order to find the specifications. 03:33:09 only where you run it. 03:33:16 man make 03:33:31 yeah but by convention you never use "makefile", only "Makefile" 03:55:18 ok i have a clean new built /usr. i search for Makefile and it floods me lol 03:56:29 well it's not in /usr/obj 03:57:06 in /usr/src now. no disc1/ fwiw 03:58:02 from there i ran sudo make -C release disc1, failed 03:58:07 build is required first 03:58:29 <_xor> BSD make supports makefile by default? 03:58:51 <_xor> I mean I know it uses Makefile, but doesn't it complain if it's makefile? 04:00:09 why would it complain? 04:00:36 polyex: did you do buildworld/buildkernel first? 04:00:42 yep just ran it 04:00:52 there's a bunch of stuff in /usr/src 04:01:04 what's in /usr/obj ? 04:01:29 oh hey btw should i delete BOTH /usr/src and /usr/obj when i want to do a clean build world/kernel? 04:01:31 sec 04:01:43 <_xor> Was confused if BSD make looks for makefile if it doesn't find Makefile (thought I remember having to change a port for that in post-extract a long while back). 04:01:47 you should never touch anything in /usr/src 04:01:54 oh wow ok 04:02:00 _xor: it looks for makefile first and then Makefile 04:02:05 <_xor> I just tested it really quick by renaming Makefile -> makefile, and it worked fine. Then Makefile -> mAkEfIlE, and it failed. 04:02:12 any way to find out if i've borked usr/src? 04:02:15 <_xor> Wasn't sure if it was a case sensitivity issue I was missing. 04:02:48 polyex: where did you get it from? if it's a git clone, then git status will tell you about changes and git restore will fix them 04:02:56 <_xor> polyex: How did you get /usr/src in the first place? Tarball or git? 04:02:58 RhodiumToad in /usr/obj/usr/home/polyex/temp/freebsd-src/amd64.amd64/ there's a whole bunch of stuff 04:03:20 oh, if you're building from a src tree located somewhere else, then forget /usr/src 04:03:31 well i think i got it 2 ways. 1 was from a tar extraction into /usr/src, then later i started git cloning the repo into my home dir 04:03:37 <_xor> Heh, git status on /usr/src. See you tomorrow! :D 04:03:49 any time I say "/usr/src" you should take that to mean "your src dir" 04:04:00 ya i have the latest freebsd-src repo source in my home dir 04:04:13 should i rm -rf /usr/src just so i can be sure it's not conflicting? 04:04:17 sure 04:04:49 says device busy 04:04:51 even as sudo 04:05:10 <_xor> I have a NFS export I mount from my server that contains a snapshot of various points of the source tree. I mount that as read-only on the various systems where I need it. 04:05:14 <_xor> chflags 04:05:22 <_xor> Oh wait, device busy? 04:05:25 ya 04:05:26 heh 04:05:49 it's empty 04:05:57 i guess a flag? 04:06:10 are you sure it wasn't a nullmount? 04:06:18 no, how can i find out? 04:06:18 or if you're using zfs, is it a dataset? 04:06:21 mount 04:06:23 zfs 04:06:51 ya looks like a default zfs point 04:06:54 if it's a zfs dataset, then the error is it complaining that you can't delete a mountpoint 04:07:02 ok i'll just leave it empty 04:07:22 so /usr/src is gone, i still have my /usr/obj from the build i just did right? 04:07:29 <_xor> If you're using zfs datasets for that, you can take advantage of snapshots too if you're not using (or wanting to) use git. 04:07:49 <_xor> Just FYI. So then you can roll it back when you want to reset it to a known state. 04:09:53 ok i got it 04:10:11 deleted source, now running make -C release disc1 from the freebsd-src git repo in my home dir 04:10:18 it's running 04:33:30 Hello everyone. 04:34:11 o/ 04:35:02 Just created a jail to install "The Lounge" to use as a client to connect here. 04:36:38 having trouble creating a port redirects with bastille on FreeBSD-BETA5 05:06:02 colectora: what kind of trouble? 05:16:03 (I'm running it myself but with an artisanally handcrafted jail) 06:22:54 <_xor> Did the 15+1 length limit for netgraph node names get fixed recently or something? (or is it a per-node-type thing?) 06:25:02 <_xor> Oooh, it got increased. Yay! 06:31:31 <_xor> colectora: Error message? I'm running The Lounge too, currently (though will probably switch to Matrix + IRC bridge when I get around to it). I have it in a jail, but not using Bastille. 07:26:45 im trying to call make from a little shell script. how can i pass the dir with the makefile to make? i use -C already but that's to set the working dir 07:28:12 polyex: maybe see the '-f' option 07:49:47 bradd well i tried that, i set it to the makefile, and -C to the release dir path, but it errors that it can't find sys/sys/param.h but that's 1 dir level up, not off of the release dir 07:49:54 how can i fix that? 07:50:14 _xor: how much? 07:51:21 <_xor> 16 to 32 07:52:01 <_xor> `#define NG_NODESIZ 32 /* max node name len (including null) */` @ sys/netgraph/ng_message.h:50 07:59:29 Mornin' all. Trying to upgrade ports from perl5.32 to perl5.34 but there is no /usr/ports/lang/perl5.32 directory present which prevents the `portmaster -o OLD NEW` invocation documented in /usr/ports/UPDATING from working. What do I do? Note perl5.34 as the default in /etc/make.conf, install perl5.34, and chase down broken packages? 08:08:09 hey 08:08:32 i wonder if it's possible to get ghostscript10 to be used with the latex environment provided by FreeBSD packages? 08:08:39 unfortunately it forces ghostscript9.. 08:10:01 titou: afaiu, there's an upgrade in progress, but it's a bit tricky 08:10:40 oh :( 08:10:54 in fact if I force the installatin of ghostscript10 latex wont work right? 08:11:51 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273771 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273864 08:11:55 Title: 273771 – print/ghostscript: update port to 10.02.0 08:12:44 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272541 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273589 08:12:47 Title: 272541 – print/ghostscript10: DEFAULT_VERSION=ghostscript=10 cannot be used 08:17:19 good following what's written into the last link I can force deinstalling ghostscript9 and install gh10 08:17:24 and tex will still work ! 08:17:26 i'll try 08:19:17 i made a script to call the script that makes a freebsd installer. like `sh mkisoimages.sh -b 'label' installer.iso .` but how can i replace label with a $VAR? doing that but keeping the ' ' is hard 08:20:20 i'm using csh fwiw but like portable solutions 08:22:05 unfortunately I don't know how to force the installation of ghostscript10 since even if I removed ghotscript9 it still want to remove texlive packages because it depends on gh9.. 08:30:31 anyone reply before i got disconnected? 08:33:05 no 08:48:53 RE: my question about upgrading to perl5.34: portupgrade seems to work in the absence of a `lang/perl5.32` directory unlike portmaster, so I ended up going that route. 09:04:18 ok got it 09:04:26 there any way to see the label of an .iso file? 13:28:20 Can't I nowadays zfs send -R a pool from an FreeBSD machine to Linux? 13:28:28 I thought so due to OpenZFS (same upstream) 13:39:27 megaTherion: my guess would be: possibly. worth a try 13:48:26 meena: yup, thanks 14:09:13 megaTherion: great album 15:11:02 I'm using synth to compile packages and share them between different machines. Unfortunately a packages need rust. Thus synth tries to compile rust... 15:11:16 each time i'm trying to compile it my machine crashs and reboot 15:11:22 it seems that it uses too much memory 15:11:47 (I double checked for memory bug and it seems my RAM is ok) 15:17:32 what's the process to install freebsd into a separate disk from within a running freebsd system? is there a debootstrap equivalent or do I just newfs/untar 15:20:29 Sounds like a job for bsdinstall, maybe? 15:22:55 titou: how much ram (and swap) do you have? do you use non-default options for rust or dependencies of rust? maybe synth has some way to use already build packages from another repo and you could use rust from the official repos; if not, rust has a PORT_LLVM option so that it doesn't build its own llvm (as rust has some additional patches for llvm, but they shouldn't be that importent now) 15:23:58 nimaje: I have 16 Go of RAM and 8 Go of swap. Rust options are not updated (i use the default ones) 15:24:33 synth has an option which let it to download the FreeBSD binary packages which is enabled on my config. Unfortunately i never seen it downloading these packages (and for rust it tries to compile it..) 15:28:00 compiling rustc extremely ressource intensive 15:28:18 I would advise compiling on on a single core to avoid OOM 15:28:28 but you should expect >24h build time 15:28:30 this is what i tried 15:28:36 o m g.. 15:29:08 I had it hand my build machine, which has 96GiB ram 15:29:24 I just want to compile clamav.. i don't care about rust 15:33:54 hm, rust builds fine for me with 16GB RAM and 2GB swap, I only close my webbrowser and I even allow poudriere to build two ports in parallel with 3 jobs each and it takes <1h, but probaly ccache plays a role in that on a intel core i5-4690 (cpu from 2014) (full dmesg if you are interested https://dmesgd.nycbug.org/index.cgi?do=view&id=6459) 15:35:52 hm thanks 15:38:47 hm, is "Use tmpfs for /usr/local" enabled for you? and "Use tmpfs for work area"? 15:39:30 I just found an issue about it on synth github page, I'm trying with this option disabled! 15:39:33 thanks :) 15:43:13 ah, wait no I upgraded my RAM some time ago because of electron and now have 32GB RAM, but before that with 16GB RAM rust build fine as I described and I don't expect it to ballon its resource requirements that much in the meantime 15:44:25 well i'll see if the problem came from the "tmpfs" usage or not.. 16:06:05 with zfs send, are file attributes (ACLs, xattr...) always copied also without -R? (I guess so) 16:10:34 should be byte for byte identical, iirc 16:21:33 there any way to see the label of an .iso file? 16:32:31 file can do that 16:33:34 ty!!! 16:34:05 sadly it's not (yet?) implemented in https://github.com/wader/fq/blob/master/doc/formats.md 16:34:06 Title: fq/doc/formats.md at master · wader/fq · GitHub 16:36:18 :( 17:14:50 so in my script if i have $SUDO_USER what's the easiest way to get the user's $HOME (path)? 17:17:28 babz: that sounds like a really cool tool 17:18:22 and it's also a really nice framework to develop a custom binary parser 17:25:06 i wouldn't wanna do that in any language other Rust. well, okay, maybe erlang / elixir. 17:26:19 man i wanna learn rust but the ppl in charge seem mentally ill 17:26:48 does anyone else get duplicate lid open or lid close events when opening or closing the lid while viewing /var/run/devd.seqpacket.pipe? (cat /var/run/devd.seqpacket.pipe) it's not supposed to be doing that, right? 17:31:37 phrasing my question another way, does anyone else get ONLY single events and no double events? 17:36:00 just checked, I have 17:36:00 !system=ACPI subsystem=Lid type=\_SB_.LID_ notify=0x00 17:36:00 !system=ACPI subsystem=Lid type=\_SB_.LID_ notify=0x00 17:36:00 !system=ACPI subsystem=Suspend type=\ notify=0x03 17:36:00 ... # suspend 17:36:01 !system=ACPI subsystem=Lid type=\_SB_.LID_ notify=0x01 17:36:04 ... # resume 17:36:15 thx, VimDiesel 18:02:32 Hey all, a question from a BSD newbie, got some Linux XP, though. I've read Chapter 15 from the handbook about the boot process, but still not able to figure it out and wasn't able to find any info from the Net. I've a "server" with SAS drives on an LSI (I think) controller, which is not visible in the boot order (BIOS/UEFI). I've a flash card 18:02:33 reader connected and want to put the equivalent of Linux's /boot partition there in order to be able to load the kernel and boot the system. However, the /boot partition of BSD is the stage1 boot apparently that is not holding the kernel in it. Any suggestions how this should be configured? I prefer to have the root system on the drives in order to 18:02:33 have it in RAIDZ2 18:06:43 deragoth: so boot to raidz ;] 18:06:55 then you get zfs snapshots on your OS too 18:07:00 boot environments (bectl) 18:08:22 high availability (mirrored) OS drives is poorly implemented in linux, but freebsd does it in the installer out of the box 18:08:48 i use a pair of mirrored ssds (mirrored zpool), and then 4 drives in a zraid for my data pool 18:10:15 i previously tried to have linux boot from a usb stick when needed... the frequent failure of those usb sticks made me reconsider 18:11:09 I'm trying to achieve exactly this, but unfortunately the SAS drives are not visible in BIOS/UEFI and cannot be provided for boot, thus the need to move the "boot" partition to the flash drive and initiate the boot from there 18:13:30 the /boot partition on freebsd does contain the kernel 18:13:43 thanks babz. looks like you only have a duplicate event on close 18:19:25 deragoth: what exactly did you try? 18:24:08 deragoth: my server won't boot without 'hw.mfi.mrsas_enable=1' in my /boot/loader.conf 18:24:18 i have a server with fancy sas adapter 18:27:54 rhodium: initially i've tried to add all drivers, including the flash card in the RAIDZ2, but this limits the root space on 4gigs (the size of the card) that is not fine. This was done with Auto Guided root ZFS 18:28:39 I've tried manually to partition the drives, but with manual partitioning during the install, i'm missing the ZFS, only UFS and I don't want UFS. 18:29:08 does the installer see all the disks? 18:29:18 so wasn't able to exactly partition manually. Moreover, I've not been able to find info why am I not able to manually create ZFS during install (from the installer). 18:29:44 Yes, the installer sees all of them. Once you have any OS booted and you have the driver all disks are visible 18:30:14 they are not, only from the BIOS and the boot priority, which is enough for all the troubles :D 18:30:45 so setting up a separate /boot seems the way to do, but I'm not sure whether the installer can be easily convinced to do it 18:30:55 Demosthenex: checking your option now 18:31:47 RhodiumToad: yep, I'm struggling with doing so, thus coming here. I was thinking that I'm not doing something correctly, as it cannot be so complicated. 18:32:45 the installer isn't really capable of handling all the more weird combinations 18:32:46 deragoth: just check your /var/log/bsdinstall.log, there was a bug in 13.0 where zfs mirroring with EFI didn't write the second disk boot sector 18:33:12 (and I personally have little experience with the installer because I prefer to do stuff manually) 18:35:35 RhodiumToad: i don't mind doing that manually, but with my little to no XP with FreeBSD I'm totally not aware what to do. I can google the commands, but the architecture is not clear for me. Is it enough just to put the /boot on the flash card and leave the zroot on the SAS drives? Should I put swap on the flash too, or not? What should be the ZFS 18:35:35 configs of the drives, assuming I'm fine with the default installer options? 18:35:55 Demosthenex: checking this too now 18:37:50 just put /boot on the flash drive, on a small UFS file system. swap and zroot should be on the sas drives 18:38:16 you'll likely also need an ESP on the flash drive 18:38:36 don't create a freebsd-boot partition unless you have some reason to use legacy boot 18:39:49 RhodiumToad: mmmmmmm OK. So I should just use freebsd UFS for the flash, not the freebsd-boot and make a mount point /boot? ESP? 18:40:13 ESP = EFI service partition 18:40:21 i.e. partition type "efi" 18:41:00 ok, got that. Will try 18:41:51 basically, the ESP gets a copy of loader.efi (as /efi/boot/bootx64.efi or something configured via an efi boot manager) 18:42:18 then loader can read the kernel and modules from the /boot partition 18:44:10 Demosthenex: checking the SAS card currently will see if that option is needed in this case 18:44:43 RhodiumToad: working on your suggestion 19:35:56 <_xor> Hmm, this is interesting 19:36:02 * _xor has been reading about ipfw + netgraph 19:36:02 ? 19:38:02 <_xor> I figured I could do this, but thought it would take more time to figure it out than it actually did. I *think* I can assign a jail the same IP as the host and just forward specific ports on the host to ports bound within the jail. 19:38:21 <_xor> Well, either the host IP or just 127.0.0.1 or something. 19:38:51 <_xor> That would preclude the need for bridging, dhcp, etc. 19:40:43 <_xor> Oh, still need to handle jail-initiated outbound traffic :/ 19:41:13 <_xor> Guess I could use ng_nat for that, but hmm... 19:41:21 if jails share same ip with host, does that mean any traffic going to host also passes to jails to snoop on too? 19:41:27 like in a dumb network hub 19:43:27 <_xor> No, it would be port-specific. If a process within a jail is listening on 8080, then ipfw would be configured to forward 8080 on a host address to 8080 within the jail. 19:43:52 ahh 19:43:59 <_xor> I also just realized that stateless outbound traffic from the jail shouldn't be an issue either since it'll just see it as a regular network interface. 19:45:59 <_xor> Also, you can do all kinds of crazy filtering if you want with netgraph + ipfw (or pf) via ng_tag, which lets you view/modify mbuf tags (e.g. VLAN tags, MAC labels, firewall tags/cookies, etc). 19:47:44 <_xor> What I'd love to be able to do is transparently forward host IP:PORT to 127.0.0.1:PORT within the jail. 19:51:08 <_xor> I think you can do it with ng_ksocket. 19:57:19 <_xor> Oh wow, this might actually work out. I think you can just create a ng_ksocket node for the host (ng_ether) and an ng_ksocket node for the jail (ng_eiface) and then connect their two hooks together. 20:00:07 <_xor> Ok, I'm sold on ipfw + netgraph. I can pretty much do everything I want using those two. 20:01:05 better than pf? 20:02:29 <_xor> Not sure if there's a better necessarily, but ipfw seems to have netgraph-specific features (e.g. ngtee) that pf doesn't seem to have currently. 20:02:46 what does netgraph do basically? 20:03:53 <_xor> Networking subsystem that structures everything as graphs in a node with edges between the nodes (hooks), where there are a bunch of different node types (man ng_*). 20:05:33 <_xor> It's a bit of a beast and not super well-documented, but it's really powerful. 20:06:21 what kinda stuff can you do with it? 20:07:57 <_xor> Pretty much anything. It's basically a system to handle network frames/packets/whatever however you want. 20:08:01 <_xor> https://klarasystems.com/articles/using-netgraph-for-freebsds-bhyve-networking/ 20:08:03 Title: Using Netgraph for FreeBSD’s Bhyve Networking | Klara Inc 20:08:34 ty 20:08:54 <_xor> That's not a bad article with a practical use-case (bhyve). There's also this PDF which is outdated, but still has lots of useful info (just need to check the man pages / source for what has changed since then)... 20:09:10 <_xor> http://www.netbsd.org/gallery/presentations/ast/2012_AsiaBSDCon/Tutorial_NETGRAPH.pdf 20:17:37 so in my script if i have $SUDO_USER what's the easiest way to get the user's $HOME (path)? 20:29:40 polyex: getent passwd $SUDO_USER | cut -d, -f6 20:29:53 polyex: getent passwd $SUDO_USER | cut -d: -f6 20:29:55 sorry the latter 20:30:52 that seems pretty indirect, damn 20:31:06 ty tho 21:30:16 can 1 service reload or restart another service? what would that look like, especially wrt privileges? 21:37:54 polyex: you're gonna have to write a service definition to reload / restart depending services. rc can't do it on its own 21:46:20 polyex, Perhaps you could say a little more detail about this XY Problem? I know you are trying to automate installation. Sure. And I have done that for me. 21:46:26 But it sometimes seems that you are fighting hard against specific problems that I have never run across myself in all of these years of doing system install and provisioning myself. You can probably see why I might be wondering why I have not run into those problems. 21:51:51 * meena usually uses Puppet for scenarios where she needs to draw complex relationships between services 21:56:04 * rwp wrote my own shell script based infrastructure back when the only example was cfengine, and I didn't like cfengine 22:16:53 * CrtxReavr feels like cut(1) should have a way to select fields from the right. 22:17:12 * CrtxReavr feels dirty using rev(1) twice to get around it. 22:23:55 back, i miss anything? 22:24:22 no 22:24:40 i was just curious if i could make a program into a regular rc service, and when it runs sometimes it restarts another service, but how? 22:24:57 just run the command `service x restart` but it needs to sudo too? 22:36:07 CrtxReavr: yeah, i do that too. wonder how hard it would be to implement in cut 22:36:48 polyex: can you show us what you mean in code? 22:37:35 no i dont have any cuz i dont even know if it's possible. but just think if my app server wanted to be able to restart or reload nginx 22:39:02 I don't like that idea 22:39:23 why not? 22:39:53 your application server and the load balancer / TLS terminator are separated for a reason. so what is the reason you want to couple them? 22:40:43 well let's say the app that's running gives an endpoint for me to POST config updates, then the app integrates that config change into the server 22:40:51 so it sometimes needs to restart or reload other services 22:42:27 nginx has rich scripting facilities. you could send it a special (authenticated) request that it then reacts to, appropriately 22:43:20 ya but that's not my point 22:49:31 then what is your point? I can't read minds. I'm just an Ops person (of sorts) and when we hear things that break thru classic layers our gut reaction is: No 22:50:27 so restarting services is something only a human should do? 22:50:36 1 service can't ever restart another service or it's bad form? 22:50:53 that's not what I'm saying 22:51:52 what im saying is: breaking boundaries between well established layers of service abstraction needs to be well justified. 22:52:20 ok, got it, so assuming that, how can a service be coded to restart another service? is there api available or? 22:54:22 a service daemon can trigger the restart of services or service chains, but we don't really have that. so you could fall back on configuration management. but you shouldn't give a service power over another. 22:55:01 so a service can trigger the restart of another service, but you don't really have that? that's contradictory no? 22:55:16 I think it comes back to the XY thing rwp mentioned earlier 22:55:50 he made an assumption that this is related to automated installs but it's not. it's a separate questino 22:55:52 question 22:58:23 what problem, and i mean concrete problem are you trying to solve and why do you think it should be solved by having your application server restart the load balancer / TLS terminator, if which it is hopefully separated by jails? 22:58:58 it was just an example and i find your insistence that i prove my need for the feature abusive 22:59:05 i just want to know if, and how, services and restart others 23:05:31 they don't. 23:06:46 the whole point of separating services is so that they are separate. if they need that tight a coupling, then why are you separating them to begin with? 23:07:54 rc is a very simple tool, and it's not really good at anything you're asking about. You can use daemon, but daemon only handles one service, not service chains 23:08:02 services dont restart each other, you have to ensure they are started/stopped in the proper oreder 23:08:02 for boot shutdown, this handled by /etc/rc, which mostly relies on rcorder to parse the comments in {/etc,/usr/local/etc}/rc.d/* to build and flatten a dependency tree 23:08:32 babz what if 1 service mediates the update of the config of another service (or several)? 23:08:49 at runtime 23:10:46 then we're taking about a configuration manager, like Puppet, Chef, Salt or even something as sad and impoverished as Ansible 23:11:12 or a workload manager, something like Kubernetes or Nomad 23:11:44 ya 23:11:59 a cm agent let's say 23:12:28 those usually run as root, as such they have super powers 23:12:44 seems dangerous 23:13:10 of course it is. it's a configuration management system 23:13:12 how do they do the actual restart? do they just invoke the command `system x restart`? 23:13:40 In essence, yes 23:14:22 man that's wild. so if someone hacks arbitrary injection they send a 'rm -rf /' kinda command in and it runs it 23:15:17 https://github.com/puppetlabs/puppet/blob/main/lib/puppet/provider/service/bsd.rb 23:15:18 Title: puppet/lib/puppet/provider/service/bsd.rb at main · puppetlabs/puppet · GitHub 23:16:14 some specialisation https://github.com/puppetlabs/puppet/blob/main/lib/puppet/provider/service/freebsd.rb but not much 23:16:15 Title: puppet/lib/puppet/provider/service/freebsd.rb at main · puppetlabs/puppet · GitHub 23:18:45 polyex: yes, that's why people like to review and CI test config management code before letting it loose on tens, hundreds or thousands of servers 23:19:27 that was the other part of DevOps, not just cool tools, but also useful practices 23:20:57 can bhyve run vms off of pxe boot/bootp instead of a local install image? 23:26:16 https://youtube.com/watch?v=QK9eSxrs3eg 23:26:17 Title: Bhyve unattended installation with CBSD: PXE and cloud-init - YouTube 23:27:00 wooooooo 23:27:03 it's in Russian or an other eastern Slavic language i don't actually understand 23:27:27 but apparently the auto-translated subtitles are good enough 23:30:37 why are the Russian subtitles in English? or is this just a NewPipe bug? 23:30:48 what's newpipe? 23:31:22 it's an android app for accessing YouTube and other video services 23:32:47 and it does so without showing me ads, cuz I'm not a huge fan of ads, or surveillance capitalism, or Google. but, i repeat myself. 23:35:20 I like NewPipe.