-
skered
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.
-
polyex
any solutions scoobybejesus?
-
rwp
Good luck skered! Thinking happy thoughts for you. :-)
-
scoobybejesus
well, the only thing that comes to mind is to not move it to a temp dir which seems like a constraint
-
polyex
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
-
polyex
maybe i can find a cp switch that doesn't copy soft link source files but copies the soft links instead?
-
rwp
polyex, I am thinking that it doesn't make sense for it to have expanded that much. Something is wrong.
-
polyex
ya
-
rwp
Use rsync instead of cp. It's better for a number of reasons of opinion such as being restartable.
-
polyex
build the freebsd source, then install world/kernel, and then cp DESTDIR and see it's double sized now
-
polyex
hm
-
rwp
"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.
-
polyex
duh how'd i miss that
-
polyex
-RL
-
polyex
i can try that
-
polyex
but i wonder if i can use -s
-
polyex
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
-
rwp
If the copy doubled in size then I think you have made two copies somehow.
-
polyex
ok cp -RL still ends up basically double
-
rwp
Hints for exploration tools: I like "ncdu" for exploring (in a terminal) disk usage.
-
rwp
Since there is double the space it does not seem like a subtle difference. Will probably be able to see the problem pretty quickly.
-
rwp
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.
-
polyex
ok tried cp -Rs and that wasn't a solution
-
polyex
i wonder how i can actually just duplicate the dir instead of dealing with these symlink issues
-
rwp
Do you know the problem is actually symlinks? Does not seem plausible to me.
-
polyex
well -R right?
-
rwp
cp -R does not copy the target of symlinks but would copy the symlink so would not be doubling the disk space.
-
polyex
ohhh i misunderstood. well wtf then
-
rwp
Adding -L would force cp to copy through symlinks and would copy the destination too. Not what you want.
-
polyex
ya
-
rwp
And how many symlinks are in the directory anyway? Look and see. Hint: find . -type l -ls
-
polyex
looks like quite a few
-
polyex
i should check for hard links
-
polyex
find man page -type doesn't have an option for hard link
-
rwp
Files that are hard linked are just normal files, with a link count greater than 2.
-
rwp
find . -type f ! -links 1 -ls
-
rwp
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.
-
polyex
bunch of those too
-
polyex
tried cp -a and it doubles the size too
-
rwp
What command are you using to look at the size? "du -sh"?
-
rwp
What file systems are the source and destination? Is one compressed and the other not?
-
polyex
ya
-
polyex
zfs
-
polyex
no
-
polyex
rsync -av source dest ended up 3.2GB too lol
-
RhodiumToad
don't use cp to copy file trees
-
polyex
why not? what should i use?
-
rwp
RhodiumToad, Tag! You are it. I am relocating. :-) [I always use rsync. Swiss army knife for copying. Restartable!]
-
RhodiumToad
tar or cpio or pax
-
polyex
why not rsync?
-
RhodiumToad
rsync's not in base.
-
RhodiumToad
by all means use it if you prefer
-
RhodiumToad
but tar and friends know what to do with hardlinks
-
RhodiumToad
(which cp does not)
-
polyex
does rsync know?
-
polyex
man page has matches for hard so it must
-
polyex
is my freebsd build dir doubling in size when i duplicate it because of the soft or hard links?
-
polyex
rsync -aH source dest ended up with same 1.7GB!!!!!!!!!!
-
RhodiumToad
there are plenty of hard links in the tree, but /rescue is especially notable since it has 145 hardlinks to the same 14MB file
-
polyex
looool
-
babz
wut
-
polyex
ok with rsync -aH i can run mkisoimages.sh and it ends with same size !!!
-
» RhodiumToad remembers the days when /rescue fit on a floppy
-
polyex
wow
-
polyex
maybe it still would without all of those 14MB files lol
-
RhodiumToad
no, the 14MB file (there is only one) is the whole point of /rescue
-
RhodiumToad
it's one file that provides /rescue/sh, /rescue/ls, /rescue/cp, and so on
-
polyex
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?
-
RhodiumToad
all static linked into one file so as to only have one copy of libc
-
polyex
oh
-
RhodiumToad
did you look at the release/Makefile stuff and put in all the relevant parts?
-
polyex
ah no i missed that. the section for disc1?
-
RhodiumToad
it's the /etc/rc.local which runs bsdinstall
-
RhodiumToad
you'll notice that the makefile copies that into the image
-
RhodiumToad
(normally /etc/rc.local does not exist in an installed system)
-
polyex
why do we have to do manual stuff just to recreate the official distro isos?
-
RhodiumToad
you don't, that's what the makefile is for!
-
polyex
so i'm just not using it right?
-
RhodiumToad
you're doing your own customizations, yes?
-
polyex
ya
-
RhodiumToad
the makefiles do everything to create the official distro isos
-
polyex
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
-
polyex
how do i use them?
-
RhodiumToad
if you want to do your own thing, it's up to you to decide what stuff to do and what not to do
-
polyex
i just want to take the official distro iso and go from there, not do a bunch of my own manual stuff
-
polyex
all i copy in is /etc/installerconfig and custom.txz to freebsd-dist
-
skered
12.4 to 13.2 was fine. \o/
-
RhodiumToad
oh ok then, did you try make -C release disc1 ?
-
RhodiumToad
(after buildworld)
-
polyex
after the install world/kernel?
-
polyex
so before install?
-
RhodiumToad
no, that target will do its own installworld/installkernel
-
RhodiumToad
specifically it'll make base.txz and kernel.txz
-
polyex
going to try it clean
-
RhodiumToad
anyway, make disc1 should create a disc1/ dir somewhere (I guess in the obj tree) and populate it ready for mkisoimages.sh
-
RhodiumToad
but won't actually make the iso
-
polyex
ohhh interesting
-
polyex
sounds perfect
-
polyex
can't wait to try!!
-
RhodiumToad
make disc1.iso will do make disc1 and then run mkisoimages
-
polyex
ty
-
polyex
k trying now
-
polyex
sudo make -C release disc1? or sudo not needed?
-
polyex
ya seems to need it
-
polyex
i wonder if i can pass a path for it to put the disc1 dir at
-
RhodiumToad
not afaik
-
polyex
so it ran but where is disc1/ ? lol
-
RhodiumToad
did you look for it?
-
polyex
ya in the freebsd-src dir i ran a find command for it
-
polyex
oh looks like it's in /usr/obj?
-
» RhodiumToad points up
-
RhodiumToad
"... somewhere (I guess in the obj tree) ..."
-
polyex
should i delete disc1 each time before i make it just like i did for the install world/kernel DESTDIR?
-
RhodiumToad
probably
-
polyex
ty!
-
polyex
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
-
RhodiumToad
you're in the wrong dir
-
polyex
i'm in the release dir
-
RhodiumToad
then just make disc1
-
RhodiumToad
the -C release is assuming you're in /usr/src
-
polyex
but i didn't make it the first time
-
polyex
oh it is wtf
-
polyex
ahhh -C here is just like tar's -C, like a rebase
-
polyex
ty!
-
polyex
hm weird
-
polyex
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
-
polyex
stop error code 1 yadda yadda
-
polyex
but the first time i ran it, it ran like normal
-
polyex
is it safe to delete /usr/obj/* and try building from src again?
-
RhodiumToad
yes
-
polyex
ok gonna rebuild then try the new make command again
-
polyex
when we run make we wanna do that from the dir with the Makefiles... in it right?
-
thedaemon
yes
-
polyex
ty!
-
thedaemon
it looks for a Makefile
-
polyex
from current dir down, or up?
-
RhodiumToad
make looks for Makefile in the current dir only
-
RhodiumToad
note that -C changes dir before looking for Makefile
-
thedaemon
make tries to
-
thedaemon
open ‘makefile’ then ‘Makefile’ in order to find the specifications.
-
thedaemon
only where you run it.
-
thedaemon
man make
-
RhodiumToad
yeah but by convention you never use "makefile", only "Makefile"
-
polyex
ok i have a clean new built /usr. i search for Makefile and it floods me lol
-
polyex
well it's not in /usr/obj
-
polyex
in /usr/src now. no disc1/ fwiw
-
polyex
from there i ran sudo make -C release disc1, failed
-
polyex
build is required first
-
_xor
BSD make supports makefile by default?
-
_xor
I mean I know it uses Makefile, but doesn't it complain if it's makefile?
-
RhodiumToad
why would it complain?
-
RhodiumToad
polyex: did you do buildworld/buildkernel first?
-
polyex
yep just ran it
-
polyex
there's a bunch of stuff in /usr/src
-
RhodiumToad
what's in /usr/obj ?
-
polyex
oh hey btw should i delete BOTH /usr/src and /usr/obj when i want to do a clean build world/kernel?
-
polyex
sec
-
_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).
-
RhodiumToad
you should never touch anything in /usr/src
-
polyex
oh wow ok
-
RhodiumToad
_xor: it looks for makefile first and then Makefile
-
_xor
I just tested it really quick by renaming Makefile -> makefile, and it worked fine. Then Makefile -> mAkEfIlE, and it failed.
-
polyex
any way to find out if i've borked usr/src?
-
_xor
Wasn't sure if it was a case sensitivity issue I was missing.
-
RhodiumToad
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
-
_xor
polyex: How did you get /usr/src in the first place? Tarball or git?
-
polyex
RhodiumToad in /usr/obj/usr/home/polyex/temp/freebsd-src/amd64.amd64/ there's a whole bunch of stuff
-
RhodiumToad
oh, if you're building from a src tree located somewhere else, then forget /usr/src
-
polyex
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
-
_xor
Heh, git status on /usr/src. See you tomorrow! :D
-
RhodiumToad
any time I say "/usr/src" you should take that to mean "your src dir"
-
polyex
ya i have the latest freebsd-src repo source in my home dir
-
polyex
should i rm -rf /usr/src just so i can be sure it's not conflicting?
-
RhodiumToad
sure
-
polyex
says device busy
-
polyex
even as sudo
-
_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.
-
_xor
chflags
-
_xor
Oh wait, device busy?
-
polyex
ya
-
polyex
heh
-
polyex
it's empty
-
polyex
i guess a flag?
-
RhodiumToad
are you sure it wasn't a nullmount?
-
polyex
no, how can i find out?
-
RhodiumToad
or if you're using zfs, is it a dataset?
-
RhodiumToad
mount
-
polyex
zfs
-
polyex
ya looks like a default zfs point
-
RhodiumToad
if it's a zfs dataset, then the error is it complaining that you can't delete a mountpoint
-
polyex
ok i'll just leave it empty
-
polyex
so /usr/src is gone, i still have my /usr/obj from the build i just did right?
-
_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.
-
_xor
Just FYI. So then you can roll it back when you want to reset it to a known state.
-
polyex
ok i got it
-
polyex
deleted source, now running make -C release disc1 from the freebsd-src git repo in my home dir
-
polyex
it's running
-
colectora
Hello everyone.
-
polyex
o/
-
colectora
Just created a jail to install "The Lounge" to use as a client to connect here.
-
colectora
having trouble creating a port redirects with bastille on FreeBSD-BETA5
-
meena
colectora: what kind of trouble?
-
meena
(I'm running it myself but with an artisanally handcrafted jail)
-
_xor
Did the 15+1 length limit for netgraph node names get fixed recently or something? (or is it a per-node-type thing?)
-
_xor
Oooh, it got increased. Yay!
-
_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.
-
polyex
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
-
bradd
polyex: maybe see the '-f' option
-
polyex
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
-
polyex
how can i fix that?
-
meena
_xor: how much?
-
_xor
16 to 32
-
_xor
`#define NG_NODESIZ 32 /* max node name len (including null) */` @ sys/netgraph/ng_message.h:50
-
easye
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?
-
titou
hey
-
titou
i wonder if it's possible to get ghostscript10 to be used with the latex environment provided by FreeBSD packages?
-
titou
unfortunately it forces ghostscript9..
-
meena
titou: afaiu, there's an upgrade in progress, but it's a bit tricky
-
titou
oh :(
-
titou
in fact if I force the installatin of ghostscript10 latex wont work right?
-
meena
-
VimDiesel
Title: 273771 – print/ghostscript: update port to 10.02.0
-
meena
-
VimDiesel
Title: 272541 – print/ghostscript10: DEFAULT_VERSION=ghostscript=10 cannot be used
-
titou
good following what's written into the last link I can force deinstalling ghostscript9 and install gh10
-
titou
and tex will still work !
-
titou
i'll try
-
polyex
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
-
polyex
i'm using csh fwiw but like portable solutions
-
titou
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..
-
polyex
anyone reply before i got disconnected?
-
titou
no
-
easye
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.
-
polyex
ok got it
-
polyex
there any way to see the label of an .iso file?
-
megaTherion
Can't I nowadays zfs send -R a pool from an FreeBSD machine to Linux?
-
megaTherion
I thought so due to OpenZFS (same upstream)
-
meena
megaTherion: my guess would be: possibly. worth a try
-
megaTherion
meena: yup, thanks
-
Demosthenex
megaTherion: great album
-
titou
I'm using synth to compile packages and share them between different machines. Unfortunately a packages need rust. Thus synth tries to compile rust...
-
titou
each time i'm trying to compile it my machine crashs and reboot
-
titou
it seems that it uses too much memory
-
titou
(I double checked for memory bug and it seems my RAM is ok)
-
grawity
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
-
V_PauAmma_V
Sounds like a job for bsdinstall, maybe?
-
nimaje
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)
-
titou
nimaje: I have 16 Go of RAM and 8 Go of swap. Rust options are not updated (i use the default ones)
-
titou
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..)
-
babz
compiling rustc extremely ressource intensive
-
babz
I would advise compiling on on a single core to avoid OOM
-
babz
but you should expect >24h build time
-
titou
this is what i tried
-
titou
o m g..
-
babz
I had it hand my build machine, which has 96GiB ram
-
titou
I just want to compile clamav.. i don't care about rust
-
nimaje
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
dmesgd.nycbug.org/index.cgi?do=view&id=6459)
-
titou
hm thanks
-
nimaje
hm, is "Use tmpfs for /usr/local" enabled for you? and "Use tmpfs for work area"?
-
titou
I just found an issue about it on synth github page, I'm trying with this option disabled!
-
titou
thanks :)
-
nimaje
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
-
titou
well i'll see if the problem came from the "tmpfs" usage or not..
-
megaTherion
with zfs send, are file attributes (ACLs, xattr...) always copied also without -R? (I guess so)
-
scoobybejesus
should be byte for byte identical, iirc
-
polyex
there any way to see the label of an .iso file?
-
babz
file can do that
-
polyex
ty!!!
-
babz
-
VimDiesel
Title: fq/doc/formats.md at master · wader/fq · GitHub
-
polyex
:(
-
polyex
so in my script if i have $SUDO_USER what's the easiest way to get the user's $HOME (path)?
-
meena
babz: that sounds like a really cool tool
-
babz
and it's also a really nice framework to develop a custom binary parser
-
meena
i wouldn't wanna do that in any language other Rust. well, okay, maybe erlang / elixir.
-
polyex
man i wanna learn rust but the ppl in charge seem mentally ill
-
rsjw
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?
-
rsjw
phrasing my question another way, does anyone else get ONLY single events and no double events?
-
babz
just checked, I have
-
babz
!system=ACPI subsystem=Lid type=\_SB_.LID_ notify=0x00
-
babz
!system=ACPI subsystem=Lid type=\_SB_.LID_ notify=0x00
-
babz
!system=ACPI subsystem=Suspend type=\ notify=0x03
-
babz
... # suspend
-
babz
!system=ACPI subsystem=Lid type=\_SB_.LID_ notify=0x01
-
babz
... # resume
-
babz
thx, VimDiesel
-
deragoth
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
-
deragoth
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
-
deragoth
have it in RAIDZ2
-
Demosthenex
deragoth: so boot to raidz ;]
-
Demosthenex
then you get zfs snapshots on your OS too
-
Demosthenex
boot environments (bectl)
-
Demosthenex
high availability (mirrored) OS drives is poorly implemented in linux, but freebsd does it in the installer out of the box
-
Demosthenex
i use a pair of mirrored ssds (mirrored zpool), and then 4 drives in a zraid for my data pool
-
Demosthenex
i previously tried to have linux boot from a usb stick when needed... the frequent failure of those usb sticks made me reconsider
-
deragoth
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
-
RhodiumToad
the /boot partition on freebsd does contain the kernel
-
rsjw
thanks babz. looks like you only have a duplicate event on close
-
RhodiumToad
deragoth: what exactly did you try?
-
Demosthenex
deragoth: my server won't boot without 'hw.mfi.mrsas_enable=1' in my /boot/loader.conf
-
Demosthenex
i have a server with fancy sas adapter
-
deragoth
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
-
deragoth
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.
-
RhodiumToad
does the installer see all the disks?
-
deragoth
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).
-
deragoth
Yes, the installer sees all of them. Once you have any OS booted and you have the driver all disks are visible
-
deragoth
they are not, only from the BIOS and the boot priority, which is enough for all the troubles :D
-
RhodiumToad
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
-
deragoth
Demosthenex: checking your option now
-
deragoth
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.
-
RhodiumToad
the installer isn't really capable of handling all the more weird combinations
-
Demosthenex
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
-
RhodiumToad
(and I personally have little experience with the installer because I prefer to do stuff manually)
-
deragoth
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
-
deragoth
configs of the drives, assuming I'm fine with the default installer options?
-
deragoth
Demosthenex: checking this too now
-
RhodiumToad
just put /boot on the flash drive, on a small UFS file system. swap and zroot should be on the sas drives
-
RhodiumToad
you'll likely also need an ESP on the flash drive
-
RhodiumToad
don't create a freebsd-boot partition unless you have some reason to use legacy boot
-
deragoth
RhodiumToad: mmmmmmm OK. So I should just use freebsd UFS for the flash, not the freebsd-boot and make a mount point /boot? ESP?
-
RhodiumToad
ESP = EFI service partition
-
RhodiumToad
i.e. partition type "efi"
-
deragoth
ok, got that. Will try
-
RhodiumToad
basically, the ESP gets a copy of loader.efi (as /efi/boot/bootx64.efi or something configured via an efi boot manager)
-
RhodiumToad
then loader can read the kernel and modules from the /boot partition
-
deragoth
Demosthenex: checking the SAS card currently will see if that option is needed in this case
-
deragoth
RhodiumToad: working on your suggestion
-
_xor
Hmm, this is interesting
-
» _xor has been reading about ipfw + netgraph
-
polyex
?
-
_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.
-
_xor
Well, either the host IP or just 127.0.0.1 or something.
-
_xor
That would preclude the need for bridging, dhcp, etc.
-
_xor
Oh, still need to handle jail-initiated outbound traffic :/
-
_xor
Guess I could use ng_nat for that, but hmm...
-
polyex
if jails share same ip with host, does that mean any traffic going to host also passes to jails to snoop on too?
-
polyex
like in a dumb network hub
-
_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.
-
polyex
ahh
-
_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.
-
_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).
-
_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.
-
_xor
I think you can do it with ng_ksocket.
-
_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.
-
_xor
Ok, I'm sold on ipfw + netgraph. I can pretty much do everything I want using those two.
-
polyex
better than pf?
-
_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.
-
polyex
what does netgraph do basically?
-
_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_*).
-
_xor
It's a bit of a beast and not super well-documented, but it's really powerful.
-
polyex
what kinda stuff can you do with it?
-
_xor
Pretty much anything. It's basically a system to handle network frames/packets/whatever however you want.
-
_xor
-
VimDiesel
Title: Using Netgraph for FreeBSD’s Bhyve Networking | Klara Inc
-
polyex
ty
-
_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)...
-
_xor
-
polyex
so in my script if i have $SUDO_USER what's the easiest way to get the user's $HOME (path)?
-
FUZxxl
polyex: getent passwd $SUDO_USER | cut -d, -f6
-
FUZxxl
polyex: getent passwd $SUDO_USER | cut -d: -f6
-
FUZxxl
sorry the latter
-
polyex
that seems pretty indirect, damn
-
polyex
ty tho
-
polyex
can 1 service reload or restart another service? what would that look like, especially wrt privileges?
-
meena
polyex: you're gonna have to write a service definition to reload / restart depending services. rc can't do it on its own
-
rwp
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.
-
rwp
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.
-
» meena usually uses Puppet for scenarios where she needs to draw complex relationships between services
-
» rwp wrote my own shell script based infrastructure back when the only example was cfengine, and I didn't like cfengine
-
» CrtxReavr feels like cut(1) should have a way to select fields from the right.
-
» CrtxReavr feels dirty using rev(1) twice to get around it.
-
polyex
back, i miss anything?
-
RhodiumToad
no
-
polyex
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?
-
polyex
just run the command `service x restart` but it needs to sudo too?
-
meena
CrtxReavr: yeah, i do that too. wonder how hard it would be to implement in cut
-
meena
polyex: can you show us what you mean in code?
-
polyex
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
-
meena
I don't like that idea
-
polyex
why not?
-
meena
your application server and the load balancer / TLS terminator are separated for a reason. so what is the reason you want to couple them?
-
polyex
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
-
polyex
so it sometimes needs to restart or reload other services
-
meena
nginx has rich scripting facilities. you could send it a special (authenticated) request that it then reacts to, appropriately
-
polyex
ya but that's not my point
-
meena
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
-
polyex
so restarting services is something only a human should do?
-
polyex
1 service can't ever restart another service or it's bad form?
-
meena
that's not what I'm saying
-
meena
what im saying is: breaking boundaries between well established layers of service abstraction needs to be well justified.
-
polyex
ok, got it, so assuming that, how can a service be coded to restart another service? is there api available or?
-
meena
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.
-
polyex
so a service can trigger the restart of another service, but you don't really have that? that's contradictory no?
-
meena
I think it comes back to the XY thing rwp mentioned earlier
-
polyex
he made an assumption that this is related to automated installs but it's not. it's a separate questino
-
polyex
question
-
meena
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?
-
polyex
it was just an example and i find your insistence that i prove my need for the feature abusive
-
polyex
i just want to know if, and how, services and restart others
-
meena
they don't.
-
meena
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?
-
meena
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
-
babz
services dont restart each other, you have to ensure they are started/stopped in the proper oreder
-
babz
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
-
polyex
babz what if 1 service mediates the update of the config of another service (or several)?
-
polyex
at runtime
-
meena
then we're taking about a configuration manager, like Puppet, Chef, Salt or even something as sad and impoverished as Ansible
-
meena
or a workload manager, something like Kubernetes or Nomad
-
polyex
ya
-
polyex
a cm agent let's say
-
meena
those usually run as root, as such they have super powers
-
polyex
seems dangerous
-
meena
of course it is. it's a configuration management system
-
polyex
how do they do the actual restart? do they just invoke the command `system x restart`?
-
meena
In essence, yes
-
polyex
man that's wild. so if someone hacks arbitrary injection they send a 'rm -rf /' kinda command in and it runs it
-
meena
-
VimDiesel
Title: puppet/lib/puppet/provider/service/bsd.rb at main · puppetlabs/puppet · GitHub
-
meena
-
VimDiesel
Title: puppet/lib/puppet/provider/service/freebsd.rb at main · puppetlabs/puppet · GitHub
-
meena
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
-
meena
that was the other part of DevOps, not just cool tools, but also useful practices
-
polyex
can bhyve run vms off of pxe boot/bootp instead of a local install image?
-
meena
-
VimDiesel
Title: Bhyve unattended installation with CBSD: PXE and cloud-init - YouTube
-
polyex
wooooooo
-
meena
it's in Russian or an other eastern Slavic language i don't actually understand
-
meena
but apparently the auto-translated subtitles are good enough
-
meena
why are the Russian subtitles in English? or is this just a NewPipe bug?
-
polyex
what's newpipe?
-
meena
it's an android app for accessing YouTube and other video services
-
meena
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.
-
mason
I like NewPipe.