From nobody Fri Aug 8 22:12:30 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bzJDk5j6xz64Dgc; Fri, 08 Aug 2025 22:12:38 +0000 (UTC) (envelope-from vermaden@interia.pl) Received: from smtpo49.interia.pl (smtpo49.interia.pl [217.74.67.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4bzJDj3DHSz3trJ; Fri, 08 Aug 2025 22:12:37 +0000 (UTC) (envelope-from vermaden@interia.pl) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=interia.pl header.s=biztos header.b=QiMc8e5R; spf=pass (mx1.freebsd.org: domain of vermaden@interia.pl designates 217.74.67.49 as permitted sender) smtp.mailfrom=vermaden@interia.pl; dmarc=pass (policy=quarantine) header.from=interia.pl Date: Sat, 09 Aug 2025 00:12:30 +0200 From: vermaden Subject: Re: PKGBASE Removes FreeBSD Base System Feature To: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= , "sthaug@nethelp.no" Cc: "freebsd-current@freebsd.org" , "freebsd-stable@freebsd.org" , "freebsd-pkgbase@FreeBSD.org" X-Mailer: interia.pl/pf09 In-Reply-To: References: <20250808.091053.1322595805169591390.sthaug@nethelp.no> <86h5yi43kp.fsf@ltc.des.dev> X-Originating-IP: 45.148.42.1 Message-Id: List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl; s=biztos; t=1754691154; bh=xlW2yRbc9UtiUsiuW3/hStJlFRQ5JJJBuDIGmptTtGk=; h=Date:From:Subject:To:Message-Id:MIME-Version:Content-Type; b=QiMc8e5RMScXFdNXmaCWIuFFPCGSCIpmfRogthQr/RC+Pr+O34HBISgN2tKn12jMr 5cTstCesZyLIleqAOWDk+JHHpJW3NdziykazajtdIYfFFiqaDjgZF/93r204wmpaHT jYUfH1Yak06bemuGyS57MTRW1FbNJmX6U277CE1I= X-Spamd-Result: default: False [-4.60 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; DWL_DNSWL_LOW(-1.00)[interia.pl:dkim]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[interia.pl,quarantine]; R_SPF_ALLOW(-0.20)[+ip4:217.74.64.0/22]; RWL_MAILSPIKE_VERYGOOD(-0.20)[217.74.67.49:from]; R_DKIM_ALLOW(-0.20)[interia.pl:s=biztos]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; FREEMAIL_FROM(0.00)[interia.pl]; SUSPICIOUS_AUTH_ORIGIN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[interia.pl]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[interia.pl:+]; HAS_XOIP(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org,freebsd-pkgbase@freebsd.org,freebsd-stable@freebsd.org]; ASN(0.00)[asn:16138, ipnet:217.74.64.0/22, country:PL]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4bzJDj3DHSz3trJ X-Spamd-Bar: ---- After that PKGBASE deletion I was not able to stop that 'now empty' Jail. Solution was to 'fill' it with content from ANY Jail to allow stop scripts = to function. # rsync-delete.sh /jail/fbsdjail /jail/bsdinstalljail The 'rsync-delete.sh' script is here: - https://github.com/vermaden/scripts/blob/master/rsync-delete.sh After that I was able to stop it with 'typical' commands. Hope that helps. Regards, vermaden Temat: Re: PKGBASE Removes FreeBSD Base System Feature Data: 2025-08-08 17:03 Nadawca: "vermaden" <vermaden@interia.pl> Adresat: "Dag-Erling Sm=C3=B8rgrav" <des@FreeBSD.org>; "sthaug@nethelp.n= o" <sthaug@nethelp.no>;=20 DW: "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>; "freebs= d-stable@freebsd.org" <freebsd-stable@freebsd.org>; freebsd-pkgbase@Free= BSD.org;=20 >=20 > > Current 'vital' thing does NOTHING to protect FreeBSD Base System. >=20 > I literally just wiped one of my Jails because of this 'vital' protection. >=20 > That 'vital' thing is useless in current state after issuing this command: >=20 > # pkg delete -af >=20 > Log below. >=20 > Unbootable and unusable FreeBSD left after the command that only removed packages without PKGBASE and with PKGBASE you are left with dust. >=20 > Even /rescue is gone. >=20 > root@bsdinstalljail:/ # pkg info > FreeBSD-acct-14.1p1 System Accounting Utilities > FreeBSD-acct-man-14.1 System Accounting Utilities (Manual Pages) > FreeBSD-acpi-14.1 ACPI Utilities > (...) > FreeBSD-zfs-dev-14.1p1 ZFS Libraries and Utilities (Development Files) > FreeBSD-zfs-man-14.1 ZFS Libraries and Utilities (Manual Pages) > FreeBSD-zoneinfo-14.1p7 zoneinfo package > beadm-1.3.5_1 Solaris-like utility to manage Boot Environments on ZFS > pkg-2.2.1 Package manager >=20 > root@bsdinstalljail:/ # pkg delete -af > Checking integrity... done (0 conflicting) > Deinstallation has been requested for the following 271 packages (of 0 packages in the universe): >=20 > Installed packages to be REMOVED: > FreeBSD-acct: 14.1p1 > FreeBSD-acct-man: 14.1 > FreeBSD-acpi: 14.1 > (...) > [bsdinstalljail.lab.org] [268/271] Deleting files for FreeBSD-zfs-man-14.1: 100% > [bsdinstalljail.lab.org] [269/271] Deinstalling FreeBSD-zoneinfo-14.1p7... > [bsdinstalljail.lab.org] [269/271] Deleting files for FreeBSD-zoneinfo-14.1p7: 100% > [bsdinstalljail.lab.org] [270/271] Deinstalling beadm-1.3.5_1... > [bsdinstalljail.lab.org] [270/271] Deleting files for beadm-1.3.5_1: 100% > [bsdinstalljail.lab.org] [271/271] Deinstalling pkg-2.2.1... > [bsdinstalljail.lab.org] [271/271] Deleting files for pkg-2.2.1: 100% > pkg: Cannot runscript POST-DEINSTALL:No such file or directory > You may need to manually remove /usr/local/etc/pkg.conf if it is no longer needed. >=20 > root@bsdinstalljail:/ # ls > /bin/sh: ls: not found >=20 > root@bsdinstalljail:/ # vi > /bin/sh: vi: not found >=20 > root@bsdinstalljail:/ # pkg > /bin/sh: pkg: not found >=20 > root@bsdinstalljail:/ # pkg-static > /bin/sh: pkg-static: not found >=20 > root@bsdinstalljail:/ # reboot > /bin/sh: reboot: not found >=20 > root@bsdinstalljail:/ # goodbye > /bin/sh: goodbye: not found >=20 > root@bsdinstalljail:/ # /rescue/ls /rescue > /bin/sh: /rescue/ls: not found >=20 > root@bsdinstalljail:/ # /rescue/ls.pkgsave /rescue > rescue: ls.pkgsave not compiled in > usage: rescue ..., where is one of: > cat chflags chio chmod cp date dd df echo ed red expr getfacl hostname kenv > kill ln link ls mkdir mv pkill pgrep ps pwd realpath rm unlink rmdir setfacl > sh -sh sleep stty sync test [ csh -csh tcsh -tcsh camcontrol clri devfs dmesg > dump rdump dumpfs dumpon fsck fsck_ffs fsck_4.2bsd fsck_ufs fsck_msdosfs fsdb > fsirand gbde geom glabel gpart ifconfig init kldconfig kldload kldstat > kldunload ldconfig md5 mdconfig mdmfs mknod mount mount_cd9660 mount_msdosfs > mount_nfs mount_nullfs mount_udf mount_unionfs newfs newfs_msdos nos-tun > reboot fastboot halt fasthalt restore rrestore rcorder route savecore shutdown > poweroff swapon sysctl tunefs umount ccdconfig ping ping6 rtsol ipf routed > rtquery bectl zfs zpool bsdlabel disklabel fdisk dhclient head mt sed tail tee > gzip gunzip gzcat zcat bzip2 bunzip2 bzcat less more xz unxz lzma unlzma xzcat > lzcat zstd unzstd zstdcat zstdmt fetch tar nc vi ex id groups whoami iscsictl > zdb chroot chown chgrp iscsid rescue >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 > Temat: Re: PKGBASE Removes FreeBSD Base System Feature > Data: 2025-08-08 10:31 > Nadawca: "Dag-Erling Sm=C3=B8rgrav" <des@FreeBSD.org> > Adresat: sthaug@nethelp.no;=20 > DW: freebsd-current@freebsd.org; freebsd-stable@freebsd.org;=20 >=20 >>=20 >>> sthaug@nethelp.no writes: >>> - It's important to have a clean separation between the base system >>> (whether that is installed using the package system or not) and the >>> rest. An easy way to list "these are the base system packages" is >>> absolutely needed. >>=20 >> You can easily create an alias for this: >>=20 >> pkg query -e '%o =3D base' %n >>=20 >> If you want something closer to `pkg info`, try: >>=20 >> pkg query -e '%o =3D base' '%n-%v %c' | column -tl 2 >>=20 >>> - Maybe there should be an extra step if you try to delete packages >>> from the base system? >>=20 >> There already is: >>=20 >> % sudo pkg delete FreeBSD-clibs >> Checking integrity... done (0 conflicting) >> The following package(s) are locked or vital and may not be > removed: >> =20 >> FreeBSD-clibs >> =20 >> 1 packages requested for removal: 1 locked, 0 missing >>=20 >> The only matter that remains to be settled is which packages should be >> marked vital: >>=20 >> % pkg query -e '%V =3D 1' %n >> FreeBSD-clibs >> FreeBSD-runtime >>=20 >> DES >> --=20 >> Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org >>=20 >>=20 >>=20 >=20 >=20