From nobody Fri Sep 6 08:55:16 2024 X-Original-To: questions@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 4X0VRq5D3dz5WPHk for ; Fri, 06 Sep 2024 08:55:19 +0000 (UTC) (envelope-from cryintothebluesky@gmail.com) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X0VRq1jtPz4jFX for ; Fri, 6 Sep 2024 08:55:19 +0000 (UTC) (envelope-from cryintothebluesky@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-374c6187b6eso1048971f8f.0 for ; Fri, 06 Sep 2024 01:55:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725612918; x=1726217718; darn=freebsd.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=DTZGLir3hTrPixJpv9tsZWVj3mTed7w+4lQ9qkOEsDU=; b=JRaE8/xtR2KjlRZ9lkL9ljZtEF61YjCV8W4wHVrfIIJBoL5gdNykf4TyU8WmfpyIJx tXjswtdkzqANDYSWOH9Gnf9Qi/gCod7uqp2GQiOiRFzvztSAcmdMRU0Rx8zw+1JEdynm nB3zSr/iGVExB5nXnQTEVrK0PYoN8fCZhqFnuZKz3F+ojxtxXi79A5mvDE1E4TeC0Ptm Oy7VU/cNHspdta2hb5CMFWcMk7Qko4xFuclwMePzyXWFbgg7h31DOZ0yLm9TJnZ2Bxnv kg8BLsrbdJW3nSOHKiM9HPEvX80Zwzy8DNbYsyAoiBOxaVFtD0giVVZTbriZlzft5lyP MEXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725612918; x=1726217718; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DTZGLir3hTrPixJpv9tsZWVj3mTed7w+4lQ9qkOEsDU=; b=HO0jUySa2s+kJxpHXaX/gNryZqFEBxLOmZtOBlkiGlDA5y6fVQGkvc7Cy3zk+IVFQC xvUuGoIqQIOKINPVXk2GmoNBOFcbWLrc539LR0u01hseK2prRv6wI2FA6Y72NfZrTJW0 N3OzfWtF+X52LvfpI1dBij0y/Hre3dCxtLSx9BY6eJ+dlZ3kjLd/JHTgH++tTK93Gpbm FifQlMSmKy78wk4vYteLkg4etPIPcv728Ip+BYm2HYz64YjIqTBkjq9ASMm7qzmk3BYy i3o6DG1t2YNLNawW5wINhrSmgZKiilJyjtwsPsI4CexqSnnE+0/UZuhVwHLMagy6R+M9 RF3A== X-Gm-Message-State: AOJu0YwbdU7LggqB1U+F+w8FKTNadBcBpUV30k1Gh9nBxb2RVs1VSNK/ FPv1ESwlL/e8WxWb1FN0cSCoZShB/3crhwWocht9TWnRTSBvTN3D X-Google-Smtp-Source: AGHT+IFbYyCyyu5krwPB9eg1HaH3rb6CBC4OrFuv9x4UdTdGD7siQAz0JuVqctmxQBLBeUA8sMPxgQ== X-Received: by 2002:adf:f811:0:b0:374:cea0:7d3d with SMTP id ffacd0b85a97d-3788969ff56mr1184478f8f.53.1725612917181; Fri, 06 Sep 2024 01:55:17 -0700 (PDT) Received: from z600.home.lan (202.85.199.146.dyn.plus.net. [146.199.85.202]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-374c610d437sm14282349f8f.97.2024.09.06.01.55.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 01:55:16 -0700 (PDT) Date: Fri, 6 Sep 2024 09:55:16 +0100 From: Sad Clouds To: "Edward Sanford Sutton, III" Cc: questions@freebsd.org Subject: Re: How to upgrade custom release Message-Id: <20240906095516.568f43f9c00561ff934363eb@gmail.com> In-Reply-To: References: <20240905190801.990f63880ba706a56a065a34@gmail.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4X0VRq1jtPz4jFX On Thu, 5 Sep 2024 13:43:50 -0700 "Edward Sanford Sutton, III" wrote: > 3. Share resulting tgz installer packages that you built. `man > release` to learn to begin such build steps. Cleaning out old files and > merging changes is not part of the toolset as these are used for > new+fresh installations by the installer and no notes are created about > what was installed or where; this is why this would be the least > desirable and trying to create fixes for this scenario is what leads to > pkgbase as an effort. I believe it is planned to have the installer use > pkgbase from the start of a system being installed. A workaround to do > it cleanly would be using boot environments to make clean > partition(s)/dataset(s) to extract them to and copy/edit your > configuration into the new system. Hi, thanks for the suggestions. I think both, NetBSD and FreeBSD had something like pkgbase projects for quite some time, however they are still in the experimental stage and not quite ready for production use. I was looking for something stable and reliable that I could use right now. NetBSD has a concept of "sets", where different components are split into different tarballs and can be installed individually, thus simulating coarse base OS packages. You can extract all sets into / when performing a pristine install, or exclude etc.tar.xz and xetc.tar.xz when performing a later upgrade. The actual upgrade steps on NetBSD are very simple and work identically with the official and custom builds. I'm not that familiar with FreeBSD, but the issues I notice: 1) FreeBSD bundles everything into a single base.txz tarball which makes it harder to upgrade, since extracting it into / will overwrite existing /etc and /var files. 2) FreeBSD etcupdate does not seem to perform post-install fixes with regard to obsolete files and shared libraries. I've not been able to find a tool like NetBSD postinstall(8) to take care of this problem. Copying build tree to various machines and running "make delete-old" is far from ideal. As a comparison, below are 5 simple steps I did recently to upgrade NetBSD VM. No need for update servers or make files. If anyone found a way to do something similar with FreeBSD, then please let me know. 1) Download NetBSD-9.4 binary sets. Also works with local custom built binary sets, as they are simple tarballs. # ftp -a ftp.netbsd.org << 'EOF' cd pub/NetBSD/NetBSD-9.4/amd64/binary/sets/ prompt mget * EOF # ls -1 *.tar.xz base.tar.xz comp.tar.xz debug.tar.xz etc.tar.xz games.tar.xz kern-GENERIC.tar.xz kern-GENERIC_KASLR.tar.xz kern-XEN3_DOM0.tar.xz kern-XEN3_DOMU.tar.xz man.tar.xz misc.tar.xz modules.tar.xz rescue.tar.xz tests.tar.xz text.tar.xz xbase.tar.xz xcomp.tar.xz xdebug.tar.xz xetc.tar.xz xfont.tar.xz xserver.tar.xz 2) Extract new kernel and reboot # tar -C / -xpf kern-GENERIC.tar.xz # reboot 3) Extract required base system packages, excluding etc and xetc # for i in base comp games man misc modules rescue tests text xcomp xfont xserver do tar -C / -xpf ./${i}.tar.xz || break done 4) Update files in /etc and /var # etcupdate -al -s ./etc.tar.xz ./xetc.tar.xz ... postinstall checks passed: bluetooth ddbonpanic defaults dhcpcd dhcpcdrundir envsys fontconfig gid gpio hosts iscsi makedev motd mtree named pam periodic pf pwd_mkdb rc ssh wscons x11 xkb uid varrwho tcpdumpchroot atf catpages manconf ptyfsoldnodes varshm postinstall checks failed: obsolete To fix, run: sh /usr/sbin/postinstall -s ./etc.tar.xz -d / fix obsolete Note that this may overwrite local changes. *** All done 5) Run postinstall to remove obsolete file # sh /usr/sbin/postinstall -s ./etc.tar.xz -d / fix obsolete Note: Creating temporary directory /tmp/_postinstall.9791.0/etc.tgz Note: Extracting files from ./etc.tar.xz Source directory: /tmp/_postinstall.9791.0/etc.tgz (extracted from: ./etc.tar.xz) Target directory: / obsolete fix: Removed obsolete file /usr/share/man/man8/nsec3hash.8 Removed obsolete file /usr/share/man/man8/named-journalprint.8 Removed obsolete file /usr/share/man/man8/named-compilezone.8 Removed obsolete file /usr/share/man/man8/named-checkzone.8 Removed obsolete file /usr/share/man/man8/named-checkconf.8 Removed obsolete file /usr/share/man/man8/dnssec-verify.8 Removed obsolete file /usr/share/man/man8/dnssec-signzone.8 Removed obsolete file /usr/share/man/man8/dnssec-settime.8 Removed obsolete file /usr/share/man/man8/dnssec-revoke.8 Removed obsolete file /usr/share/man/man8/dnssec-keygen.8 Removed obsolete file /usr/share/man/man8/dnssec-keyfromlabel.8 Removed obsolete file /usr/share/man/man8/dnssec-importkey.8 Removed obsolete file /usr/share/man/man8/dnssec-dsfromkey.8 Removed obsolete file /usr/share/man/html8/nsec3hash.html Removed obsolete file /usr/share/man/html8/named-journalprint.html Removed obsolete file /usr/share/man/html8/named-compilezone.html Removed obsolete file /usr/share/man/html8/named-checkzone.html Removed obsolete file /usr/share/man/html8/named-checkconf.html Removed obsolete file /usr/share/man/html8/dnssec-verify.html Removed obsolete file /usr/share/man/html8/dnssec-signzone.html Removed obsolete file /usr/share/man/html8/dnssec-settime.html Removed obsolete file /usr/share/man/html8/dnssec-revoke.html Removed obsolete file /usr/share/man/html8/dnssec-keygen.html Removed obsolete file /usr/share/man/html8/dnssec-keyfromlabel.html Removed obsolete file /usr/share/man/html8/dnssec-importkey.html Removed obsolete file /usr/share/man/html8/dnssec-dsfromkey.html Removed obsolete file /usr/share/doc/reference/ref8/bind9/arm/Bv9ARM.html Removed obsolete file /usr/share/doc/reference/ref8/bind9/arm/Bv9ARM.ch09.html Removed obsolete file /usr/share/doc/reference/ref8/bind9/arm/Bv9ARM.ch08.html Removed obsolete file /usr/share/doc/reference/ref8/bind9/arm/Bv9ARM.ch07.html Removed obsolete file /usr/share/doc/reference/ref8/bind9/arm/Bv9ARM.ch06.html Removed obsolete file /usr/share/doc/reference/ref8/bind9/arm/Bv9ARM.ch05.html Removed obsolete file /usr/share/doc/reference/ref8/bind9/arm/Bv9ARM.ch04.html Removed obsolete file /usr/share/doc/reference/ref8/bind9/arm/Bv9ARM.ch03.html Removed obsolete file /usr/share/doc/reference/ref8/bind9/arm/Bv9ARM.ch02.html Removed obsolete file /usr/share/doc/reference/ref8/bind9/arm/Bv9ARM.ch01.html Removed obsolete file /lib/libcrypto.so.14.0 Removed obsolete link /usr/lib/libcrypto.so.14.0 Removed obsolete file /usr/lib/i386/libcrypto.so.14.0 postinstall fixes passed: obsolete postinstall fixes failed: