-
s2rI fixed it temporarily by adding an entry in hosts to pkg0.nyi.freeebsd.org IP for pkg.freebsd.org
-
spork_css_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...
-
kerneldoveso i pkg install squid, no problem. but pkg -r <jail root> install squid and it errors "install: nknown group squid" for /var/squid, /var/squid/cache, etc
-
kerneldovedoes pkg -r have bug or? 14.4
-
spork_css_what about "pkg -j yourjail install squid"
-
spork_css_I don't think just changing the root is going to make it aware of in-jail users.
-
spork_css_see the "pkg" manpage and the "-j" option.
-
kerneldovelemme try
-
kerneldovefuck
-
kerneldovespork_css_ did you not see me say 14.4?
-
kerneldove-j is 15 only
-
spork_css_yeah, I just feel like it's been in there forever. I tested on an old 13.x host, so.... no idea.
-
spork_css_all I know is from my reading of the manpage,
-
spork_css_-r would not work
-
kerneldove
-
kerneldove-j isn't in there
-
yakubinpkg supports -j since forever.
-
spork_css_again, can't comment on that
-
spork_css_WFM
-
spork_css_just type "man pkg" and then "/" and then "-j".
-
spork_css_
-
masonkerneldove: Run "pkg" and see what it offers for options.
-
kerneldovehm from command line pkg shows -j is an option. dunno what's up with man page site then
-
masonMan page on an installed 14.4 system will also show the option.
-
masonkerneldove: Oh, you selected section... 0? It's in section 8.
-
kerneldovewhen 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?
-
kerneldovei just used whatever was default selected
-
masonkerneldove: 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.
-
kerneldoveit must be trying to run the pkg from within the jail, and it's hitting the firewall
-
kerneldovethat's a dumb way of running because not all jails have public network
-
kerneldovethat's why i was using pkg -r
-
kerneldovebut so then pkg -r fails with other reasons, ffs what a cluster
-
masonYeah, everything's a bunch of tradeoffs. :/
-
kerneldovewell how the f have jails not matured to where you can properly install packages in them from the host system?
-
kerneldove20 year old tech that has these basic gaps in lifecycle? embarassing tbh
-
masonkerneldove: Dunno. I chroot in. Works reliably.
-
kerneldovewhat's that look like?
-
masonShut the jail down, chroot in, install packages.
-
masonIt's probably inelegant, but I'll take inelegant if it's boring and incident-free.
-
masonAs I've noted previously, I'm sliding towards ever-simpler lately.
-
kerneldoveya especially with so much sht half baked here
-
masonOh, I wouldn't say that. FreeBSD is very reliable in a number of ways that other systems can't touch.
-
kerneldoveno offense but don't care what you'd say or not. the issue i just ran into proves what i said
-
spork_css_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.
-
spork_css_It's much less work to type "man pkg" than to go to a browser and google it.
-
spork_css_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.
-
spork_css_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.
-
kerneldovespork_css_ cool so how to install pkgs into a jail that doesn't have networking? because -r and -j ain't it
-
kerneldoveshould be able to install pkg into a jail from host system
-
spork_css_no idea, I've never had a need to do it.
-
kerneldoveso every jail you use has inet?
-
masonkerneldove: Setting up NAT for them so they can reach out isn't a terrible idea.
-
spork_css_yes
-
kerneldovelol nice security model bro
-
spork_css_do you want help or do you want to yell at people that aren't getting paid to do this?
-
kerneldoveyell? emotional much?
-
masonIt's a reasonable characterization.
-
spork_css_OK, insult people, how's that?
-
spork_css_(and insulting people because you can't figure something out is kind of... emotional?)
-
kerneldovestop obsessing
-
spork_css_?
-
masonkerneldove: 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.
-
Reinhilde`less` has a poorly-discoverable interface
-
masonReinhilde: If you try --help it's pretty good, but -h could be more helpful.
-
spork_css_decent manpage as well (and thankfully unlike most linux distros, typing "more" doesn't give you an ancient "more")
-
spork_css_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)...
-
spork_css_no BIOS updates, some hints in old forums that maybe gparted can whack it into shape, but it does have an optical drive...
-
spork_css_so, behold this jank: i.imgur.com/sKCfxEv.jpeg
-
masonI have one of those, that needs two plugs to get enough power to burn.
-
spork_css_yeah, honestly kind of shocked that current macos a) recognized it as a burner b) still has code to burn discs
-
kerneldove-c and -j both fail trying to install pkg to a jail that doesn't have inet
-
kerneldoveand -r leaks shit across the jail boundary into the host and installs fail (squid)
-
kerneldovejunk
-
masonkerneldove: Wait, if these don't have Internet access, how are you supplying packages?
-
kerneldovehost has inet, jails don't
-
masonMm. 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.
-
masonLike, set up the config per-jail, so the jail expects packages in a particular directory.
-
masonThat can be a read-only mount from the host.
-
masonThe pkg tools expect networking.
-
masonThat shot past me in the earlier discussion.
-
masonUse 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.
-
masonYou're going to need to treat these as being air-gapped in various ways.
-
masonFrankly 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.
-
mnskerneldove: 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.
-
nesta:o
-
mnskerneldove: for j in /usr/local/jails/containers/*; do printf "\nUpgrading jail: ${j##*/}\n=========================\n"; pkg -r ${j} update && pkg -r ${j} upgrade; done
-
mnsI run that every day
-
mnsno issues.
-
spork_css_depends on what you're installing - in kerneldove's case, he's installing squid, and that needs to add a user.
-
kerneldovemns try installing squid to a jail with pkg -r and tell me if it gives error "install: unknown group squid"?
-
kerneldoveya
-
spork_css_I suspect that fails because it's not chrooted into the jail
-
mnsspork_css_: I install lighttpd, and that needs a user as well, as I recall.
-
mnskerneldove: let me try that and see what happens
-
spork_css_mns: "-r" just sets an alternate root, "-j" and "-c" both chroot into the jail.
-
spork_css_If your jail had the lighty user in there before doing the upgrades, I'd guess that might work? I don't know.
-
spork_css_I don't have a single jail that doesn't at least have internet access via NAT
-
spork_css_anyhow, off to walk a dog, good luck, all
-
masono/
-
mnsspork_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.
-
kerneldovewtf
-
kerneldovedoes jail have internet? using pkg -r from host?
-
kerneldovewhat freebsd version?
-
mnskerneldove: doing it from host: sudo pkg -r /usr/local/jails/containers/lighty install squid
-
mnskerneldove: 14.4
-
kerneldovehm same as me
-
kerneldoveand your extracting squid line wasn't followed by any install: unknown group squid stuff?
-
mnsnope
-
kerneldovehost running zfs?
-
mnsyup
-
kerneldovenot sure if it'd matter but is it a thick jail with its own base?
-
mnskerneldove: I am running a thinjail but I don't think that should matter in this scenario
-
mnshow do you have your jail setup? which directory are you pointing to?
-
kerneldovei'm running the pkg -r /jail/jails/myjail/ install squid during bsdinstall, not after the post-install reboot, not sure if that matters
-
kerneldovejail fs was created with zfs reate -o mountpoint=/jail zroot/jail
-
kerneldoveand ln -s /mnt/jail /jail before that
-
mnswhat's under /jail/jails/myjail, is it usr/, etc/, dev/, etc. ?
-
kerneldoveyep
-
mnsit might be because of bsdinstall, but I can't think of a reason why.
-
mnsI 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.
-
mnskerneldove: when you run your pkg command, did it also say that perl would be installed?
-
kerneldoveyep
-
mnsWhat's the error you get?
-
kerneldovegot a working pastie site i can use?
-
masonbpaste.net works
-
kerneldove
-
mnslet me check mine again
-
mnsnever mind, I got the same messages as you did. I was checking if the user got created inside the jail, which it did.
-
mnsI didn't look at the messages from pkg properly as it prints out a bunch of messages after the install
-
kerneldoveok 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?
-
mnsI 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.
-
kerneldovethat wasn't my point. my point was that there's no way to propertly install pkgs to a jail, from host
-
kerneldove(without the jail having internet, which is an unnecessary security hole)
-
masonkerneldove: Did you see where I mentioned null mounting a repository in from the host?
-
mnskerneldove: paste.debian.net/hidden/1a7155e6
-
mnsUse -c instead of -r
-
kerneldovemns tried -c, doesn't work. fails with transient dns resolution error or smth
-
kerneldovemason no but that's a dirty hack
-
masonkerneldove: You're talking about security, but you've evidently never run airgapped systems.
-
mnskerneldove: 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.
-
kerneldovei'll try again but i know it didn't work for me
-
mnskerneldove: 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.
-
mnsAs you can see in my paste above, no messages. If you do a 'ls -l /jail/jails/myjail/var/' squid should have owner:group of 100:100 (because you're looking at it from the host, which doesn't know about squid user as that is inside the jail)
2 minutes ago