00:01:30 I fixed it temporarily by adding an entry in hosts to pkg0.nyi.freeebsd.org IP for pkg.freebsd.org 00:50:44 Just wanted to check, it's not possible to ktrace from a host to a jail with jexec, right? Especially if the jail is a much older release... 01:47:33 so i pkg install squid, no problem. but pkg -r install squid and it errors "install: nknown group squid" for /var/squid, /var/squid/cache, etc 01:47:45 does pkg -r have bug or? 14.4 01:54:00 what about "pkg -j yourjail install squid" 01:54:14 I don't think just changing the root is going to make it aware of in-jail users. 01:54:50 see the "pkg" manpage and the "-j" option. 01:56:10 lemme try 02:03:42 fuck 02:03:47 spork_css_ did you not see me say 14.4? 02:03:52 -j is 15 only 02:05:24 yeah, I just feel like it's been in there forever. I tested on an old 13.x host, so.... no idea. 02:05:36 all I know is from my reading of the manpage, 02:05:40 -r would not work 02:05:46 https://man.freebsd.org/cgi/man.cgi?query=pkg&apropos=0&sektion=0&manpath=FreeBSD+14.4-RELEASE&format=html 02:05:49 -j isn't in there 02:06:20 pkg supports -j since forever. 02:06:21 again, can't comment on that 02:06:26 WFM 02:06:51 just type "man pkg" and then "/" and then "-j". 02:11:01 https://man.freebsd.org/cgi/man.cgi?query=pkg&apropos=0&sektion=8&manpath=FreeBSD+14.4-RELEASE+and+Ports&format=html 02:11:13 kerneldove: Run "pkg" and see what it offers for options. 02:12:34 hm from command line pkg shows -j is an option. dunno what's up with man page site then 02:12:57 Man page on an installed 14.4 system will also show the option. 02:13:41 kerneldove: Oh, you selected section... 0? It's in section 8. 02:14:26 when i run sudo pkg install cowsay, works. when i run sudo pkg -j myjail install cowsay, it gives permission denied and fails with error updating repositories. why? 02:14:33 i just used whatever was default selected 02:15:12 kerneldove: I tend to chroot in instead, as jails can have some funny limitations. I've never dug in. I just pivot to something fairly simple that works. 02:17:04 it must be trying to run the pkg from within the jail, and it's hitting the firewall 02:17:22 that's a dumb way of running because not all jails have public network 02:17:27 that's why i was using pkg -r 02:17:40 but so then pkg -r fails with other reasons, ffs what a cluster 02:17:55 Yeah, everything's a bunch of tradeoffs. :/ 02:18:24 well how the f have jails not matured to where you can properly install packages in them from the host system? 02:18:37 20 year old tech that has these basic gaps in lifecycle? embarassing tbh 02:18:55 kerneldove: Dunno. I chroot in. Works reliably. 02:19:06 what's that look like? 02:19:18 Shut the jail down, chroot in, install packages. 02:19:47 It's probably inelegant, but I'll take inelegant if it's boring and incident-free. 02:20:28 As I've noted previously, I'm sliding towards ever-simpler lately. 02:24:20 ya especially with so much sht half baked here 02:24:55 Oh, I wouldn't say that. FreeBSD is very reliable in a number of ways that other systems can't touch. 02:25:28 no offense but don't care what you'd say or not. the issue i just ran into proves what i said 02:26:21 OK, well for starters, if you want the manpage for the system you're currently on, you run "man" on that system and you will have the correct manpage. 02:27:26 It's much less work to type "man pkg" than to go to a browser and google it. 02:27:55 and many commands will just spit out a bunch of options if run with no options. This isn't poor OS design, this is just how unix is. 02:29:02 maybe the "-c" option will work for your setup, not sure. But trying to use a system (pkg) that relies on the internet to fetch packages on something without internet is a choice and an edge case, IMO. 02:29:20 spork_css_ cool so how to install pkgs into a jail that doesn't have networking? because -r and -j ain't it 02:29:40 should be able to install pkg into a jail from host system 02:29:40 no idea, I've never had a need to do it. 02:29:51 so every jail you use has inet? 02:29:53 kerneldove: Setting up NAT for them so they can reach out isn't a terrible idea. 02:29:56 yes 02:30:04 lol nice security model bro 02:30:23 do you want help or do you want to yell at people that aren't getting paid to do this? 02:30:34 yell? emotional much? 02:30:47 It's a reasonable characterization. 02:30:56 OK, insult people, how's that? 02:32:54 (and insulting people because you can't figure something out is kind of... emotional?) 02:33:34 stop obsessing 02:33:51 ? 02:34:45 kerneldove: It sounds like a reasonable time to take a break. You're not making yourself happier. Maybe write up a bug with details of the failures you see with pkg -j and/or pkg -r when you come back, so something productive comes out of it. 02:35:53 `less` has a poorly-discoverable interface 02:39:45 Reinhilde: If you try --help it's pretty good, but -h could be more helpful. 02:45:35 decent manpage as well (and thankfully unlike most linux distros, typing "more" doesn't give you an ancient "more") 02:49:15 sad state of affairs here, one of my old junker PCs just freezes midway through the BIOS device iteration when a bootable USB key is in there that it doesn't like (which includes all FreeBSD memstick images)... 02:49:51 no BIOS updates, some hints in old forums that maybe gparted can whack it into shape, but it does have an optical drive... 02:50:04 so, behold this jank: https://i.imgur.com/sKCfxEv.jpeg 02:52:07 I have one of those, that needs two plugs to get enough power to burn. 02:52:45 yeah, honestly kind of shocked that current macos a) recognized it as a burner b) still has code to burn discs 03:04:30 -c and -j both fail trying to install pkg to a jail that doesn't have inet 03:05:02 and -r leaks shit across the jail boundary into the host and installs fail (squid) 03:05:05 junk 03:05:54 kerneldove: Wait, if these don't have Internet access, how are you supplying packages? 03:06:21 host has inet, jails don't 03:07:41 Mm. All the tools assume you have internet access. I'd probably set up an on-disk repository, maybe one that you nullmount in, and set up your repo config as needed to accomodate that. 03:08:04 Like, set up the config per-jail, so the jail expects packages in a particular directory. 03:08:14 That can be a read-only mount from the host. 03:08:38 The pkg tools expect networking. 03:08:51 That shot past me in the earlier discussion. 03:10:53 Use pkg fetch on the host to get the things. I haven't done this particular variation, so I'm not sure what pkg wants on the repo side. 03:11:17 You're going to need to treat these as being air-gapped in various ways. 03:12:24 Frankly I'd set up NAT so they can reach out. There's not a ton you can do on a system with no networking nowadays, so it's unusual to have something with no network. 03:12:50 kerneldove: how have you setup your jails? I have jails but do not have pkg setup inside of the jails. I use 'pkg -r' every day on a 14.4R system everyday, no issues. 03:14:01 :o 03:14:16 kerneldove: for j in /usr/local/jails/containers/*; do printf "\nUpgrading jail: ${j##*/}\n=========================\n"; pkg -r ${j} update && pkg -r ${j} upgrade; done 03:14:24 I run that every day 03:14:26 no issues. 03:15:40 depends on what you're installing - in kerneldove's case, he's installing squid, and that needs to add a user. 03:15:57 mns try installing squid to a jail with pkg -r and tell me if it gives error "install: unknown group squid"? 03:16:03 ya 03:16:05 I suspect that fails because it's not chrooted into the jail 03:16:28 spork_css_: I install lighttpd, and that needs a user as well, as I recall. 03:16:48 kerneldove: let me try that and see what happens 03:17:20 mns: "-r" just sets an alternate root, "-j" and "-c" both chroot into the jail. 03:17:49 If your jail had the lighty user in there before doing the upgrades, I'd guess that might work? I don't know. 03:18:20 I don't have a single jail that doesn't at least have internet access via NAT 03:19:01 anyhow, off to walk a dog, good luck, all 03:19:05 o/ 03:19:37 spork_css_, kerneldove: I was able to install squid using the command that kerneldove provided, no issue. It went ahead and created the squid user inside my jail. 03:19:52 wtf 03:20:03 does jail have internet? using pkg -r from host? 03:20:55 what freebsd version? 03:20:56 kerneldove: doing it from host: sudo pkg -r /usr/local/jails/containers/lighty install squid 03:21:02 kerneldove: 14.4 03:21:07 hm same as me 03:21:27 and your extracting squid line wasn't followed by any install: unknown group squid stuff? 03:21:38 nope 03:21:42 host running zfs? 03:22:24 yup 03:22:28 not sure if it'd matter but is it a thick jail with its own base? 03:22:50 kerneldove: I am running a thinjail but I don't think that should matter in this scenario 03:23:16 how do you have your jail setup? which directory are you pointing to? 03:23:48 i'm running the pkg -r /jail/jails/myjail/ install squid during bsdinstall, not after the post-install reboot, not sure if that matters 03:24:37 jail fs was created with zfs reate -o mountpoint=/jail zroot/jail 03:25:08 and ln -s /mnt/jail /jail before that 03:25:26 what's under /jail/jails/myjail, is it usr/, etc/, dev/, etc. ? 03:25:34 yep 03:26:19 it might be because of bsdinstall, but I can't think of a reason why. 03:27:32 I have networking in the jail, but I do not have pkg setup inside the jail. Everything in terms of package management gets done from the host. 03:27:50 kerneldove: when you run your pkg command, did it also say that perl would be installed? 03:28:12 yep 03:29:42 What's the error you get? 03:31:14 got a working pastie site i can use? 03:31:57 bpaste.net works 03:32:23 https://paste.debian.net/hidden/adb30944 03:33:35 let me check mine again 03:35:19 never mind, I got the same messages as you did. I was checking if the user got created inside the jail, which it did. 03:35:51 I didn't look at the messages from pkg properly as it prints out a bunch of messages after the install 03:35:55 ok now we're getting somewhere. so don't you think freebsd should have a way to install pkgs into a jail without the jail itself needing to do the networking? 03:41:17 I don't think its' the networking in this case. The package got installed, just that the post-install setup doesn't get done properly. /var/squid and the other directories get created, but when the ownership is supposed to be given, the post-install script is using the host's /etc/passwd instead of the one rooted at /jail/jails/myjail. I think a bug report would be good to fix it. 03:42:00 that wasn't my point. my point was that there's no way to propertly install pkgs to a jail, from host 03:43:16 (without the jail having internet, which is an unnecessary security hole) 03:43:45 kerneldove: Did you see where I mentioned null mounting a repository in from the host? 03:47:54 kerneldove: https://paste.debian.net/hidden/1a7155e6 03:48:18 Use -c instead of -r 03:49:32 mns tried -c, doesn't work. fails with transient dns resolution error or smth 03:50:00 mason no but that's a dirty hack 03:50:58 kerneldove: You're talking about security, but you've evidently never run airgapped systems. 03:51:02 kerneldove: look at my output, I got no such errors, the directories all have the right permissions and ownership, the user gets created, all inside the jail, but done from the host. 03:52:03 i'll try again but i know it didn't work for me 03:52:09 kerneldove: I deleted the previous install of the package in the jail, removed both squid and perl, and then did a fresh install from the host.