From nobody Sat Sep 7 13:44:19 2024 X-Original-To: freebsd-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 4X1Dpx6J4qz5VNV8 for ; Sat, 07 Sep 2024 13:44:25 +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 4X1Dpw3RsDz42cm; Sat, 7 Sep 2024 13:44:24 +0000 (UTC) (envelope-from cryintothebluesky@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b="nev/Xve9"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of cryintothebluesky@gmail.com designates 2a00:1450:4864:20::42a as permitted sender) smtp.mailfrom=cryintothebluesky@gmail.com Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-371941bbfb0so1828093f8f.0; Sat, 07 Sep 2024 06:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725716661; x=1726321461; 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=00c1V80jeyYF+VAObK05tS1bDjttTS5J1rm2z4ygkrs=; b=nev/Xve9VDv7q4C54cSwX+eHsvvlBIUa2j6kd+M3XPHCZl/Jb8fKn7eOKf4OotfUIA t7R1pUivc4Ns2S0N8OAF3HkHaYlrrviqZWfj82Vc8nbM4qftuGiFyqM1522oRe9lT2/+ uz39jNKsv1Hlb7cqhA7683WDltoccZhzLg7wbHKMtwQOFrS5ExEUPxHewPwfX80ScTos FcluHntJZKfy+Ojmxazlz1PZLD9Y4gQ3B/SOsjOpeOompYTkabzRtIgTbnBPxw6LJ6M/ G66fDXC/5UshUSt0ukUaiymmVw/LLrBw0bL4gEWNKWbqpSFQTh+RwV1gpo3QWEi2Bz/V cV+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725716661; x=1726321461; 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=00c1V80jeyYF+VAObK05tS1bDjttTS5J1rm2z4ygkrs=; b=PwrmMbXGDXD4WQ4NZ8e4g5S9/qW72H7njX+eERFnigh0jpjBbGMdEhoY9EIK9vqzUe mYpp3copRkkST+eVhHfgtx2ABXCNdoJpYvh1UM9A2fKWMMjBNiX7e5pDbASkN6ArCIfB oxjwXySyhR9AWq5Mc69imQNXzPFjW6RV8c441lte33UTYST2PJ/XaAbh838Gny12TQb/ Oj/t+pFPFgHu6OW4fK6bq5MFw8esWxOm7qEZiLDuR/6CxSqcLnMUxYaKtuci0+UlDv3e Nbk2bCakr8nCOlMaVC++xg6vcw0g+z6eltqOkjPXrliz3vDsafy5/Q9gV42lsTQK20Yp Fsew== X-Gm-Message-State: AOJu0YyPIXCRfFkbG5nOnBV9OhZsl9ED6CgwfYf4yxc5tJlhhsrR/9EE fcM5c2nyQYUbc1HOD8oUJiZCdZNbXI4XWly1QKg2lp9ekaA9Qmmmo0dEJw== X-Google-Smtp-Source: AGHT+IGCu+4bs/QhF87D7UNJqjCYf3qDDqp6rWvvnzhiSamuZMeTPG1IXiWUrR6Qzta0Adp1eBGZaw== X-Received: by 2002:adf:fa81:0:b0:374:c640:8596 with SMTP id ffacd0b85a97d-3789269e5admr1363162f8f.32.1725716661120; Sat, 07 Sep 2024 06:44:21 -0700 (PDT) Received: from z600.home.lan (41.129.159.143.dyn.plus.net. [143.159.129.41]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895675b8bsm1461340f8f.54.2024.09.07.06.44.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Sep 2024 06:44:20 -0700 (PDT) Date: Sat, 7 Sep 2024 14:44:19 +0100 From: Sad Clouds To: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= Cc: freebsd-questions@FreeBSD.org Subject: Re: How to upgrade custom release Message-Id: <20240907144419.e434d92dcced719f5da9b191@gmail.com> In-Reply-To: <20240907093640.7609a9739e757c658357451b@gmail.com> References: <20240905190801.990f63880ba706a56a065a34@gmail.com> <86o7501u8o.fsf@ltc.des.dev> <20240907093640.7609a9739e757c658357451b@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-Spamd-Result: default: False [-3.40 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.90)[-0.898]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::42a:from] X-Rspamd-Queue-Id: 4X1Dpw3RsDz42cm OK, I managed to create a set of scripts to perform the updates the way I'm used to, i.e. extract base and kernel archives and then update etc files. Simple and unobtrusive. This seems to work for standalone jails, so will try it on real hardware soon with UFS snapshots as described in the previous email. # Build or download FreeBSD release archives cd FreeBSD-14.1-arm64-aarch64 && ls -1 base.txz kernel.txz lib32.txz # Root mount point at which update should happen UPDATE_ROOT="/jails/test_update" # Paths that need to be removed and then updated with new binaries UPDATE_PATHS=" bin boot lib libexec rescue sbin usr/sbin usr/bin usr/include usr/lib usr/lib32 usr/libdata usr/libexec usr/share usr/tests " # Remove paths with old binaries for i in ${UPDATE_PATHS:?} do chflags -R 0 ${UPDATE_ROOT:?}/${i:?} rm -rf ${UPDATE_ROOT:?}/${i:?} done # Extract new updates from base.txz for i in ${UPDATE_PATHS:?} do tar -C ${UPDATE_ROOT:?} --clear-nochange-fflags -xpf base.txz ./${i:?} done # Extract kernel updates (not required for jails) tar -C ${UPDATE_ROOT:?} --clear-nochange-fflags -xpf kernel.txz # View previous etc changes prior to update etcupdate diff -D ${UPDATE_ROOT:?} -d ${UPDATE_ROOT:?}/var/db/etcupdate # Update etc files # 1) Extract etcupdate current tree from the base archive tar -xpf base.txz ./var/db/etcupdate/current # 2) Create etcupdate.tar.bz2 archive tar -C ./var/db/etcupdate/current -jcf etcupdate.tar.bz2 ./ && rm -rf ./var # 3) Run etcupdate merging new changes in etcupdate.tar.bz2 into /etc etcupdate -D ${UPDATE_ROOT:?} -d ${UPDATE_ROOT:?}/var/db/etcupdate -F -t etcupdate.tar.bz2