From nobody Tue Aug 15 15:53:20 2023 X-Original-To: bugs@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 4RQG5D5hYMz4q3ql for ; Tue, 15 Aug 2023 15:53:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RQG5D3RLDz4Qbw for ; Tue, 15 Aug 2023 15:53:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692114800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sYujCkN5l6lYEtnaLv1La/hc/v9klDnftqIq8e8E7sQ=; b=CH6vE5/dmOwi+qMCDeOX2pKq6TesjtHWlER+5pvniZgaXUajkfSzF3z8m+yIPZDKfIEFv1 pBaR11NhKpVilAxVVtTzIR4OFZNjwGB1uxyyiDG9Cf+GDvKrTeNjE4nv4t/VJBeqws4+EA Qe2XHiYOblJJ89gVRTg5JiPWpNxmo1+e1W33NoGqjhIlBSDbc4X2yXxjLT9BJq6bybtV+/ bFGdAa9g838Nv1Bjp0IiH9W1EyEHHccG9/Y3cpVCkVInUZvHcf2JAO+SBwwPIJO6DQSJSM wnx/3x0XUPIDp0hkJMeaYQOpp1nzfL/k1zKlOWQC/OG8m9KqTm5Td5O9bENjYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692114800; a=rsa-sha256; cv=none; b=qM4XBZdBZqcGcEkV8fiRn2nl8NSWDbK97SDNEgMROX0zw0whTUqZuJE9pZeNnpTr9Us7D7 qdGJbcmflSjq1NU2nb5Z5aGY5UPclgvtXxQAUypdNAOoCjxHsxf4O4GAvoo/PfKqhxoSQI Orn/Oevx6wXNTDuZ5LdcNDf8cwIFNNO6Xr4aiMWTbLqQgxLzCLPr8yk8pxTahVBdQ5qAx/ Z83ilZJE54OXAdE08dJbThXTO/dofO2uoYV1fP0ATJJo5X3tChs0ExpCI2dI/KEHRuDjPz Xx6xHB9Klg/GaCBkCZA55k8FecqwchOah0YG18nyesSnqpFA+rUfBcjMqldssg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RQG5D2W3Jz1tf for ; Tue, 15 Aug 2023 15:53:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 37FFrKMj096970 for ; Tue, 15 Aug 2023 15:53:20 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 37FFrKfA096969 for bugs@FreeBSD.org; Tue, 15 Aug 2023 15:53:20 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 273148] [PATCH] scripted installs are unable to verify checksums for fetched dists Date: Tue, 15 Aug 2023 15:53:20 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: lars@oddbit.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273148 Bug ID: 273148 Summary: [PATCH] scripted installs are unable to verify checksums for fetched dists Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: lars@oddbit.com Created attachment 244122 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D244122&action= =3Dedit Patch to revert erroneous changes in 1f7746d81f53447ac15cc99395bb714d4dd0a4= da. In commit 1f7746d81f53447ac15cc99395bb714d4dd0a4da, a change was introduced that breaks scripted installs. Given an installerconfig file like this: ``` export PARTITIONS=3DDEFAULT export DISTRIBUTIONS=3D"kernel.txz base.txz" export HOSTNAME=3Dfreebsd export BSDINSTALL_DISTSITE=3D"https://download.freebsd.org/releases/amd64/13.2-REL= EASE" export nonInteractive=3D"YES" dhclient $INTERFACES #!/bin/sh sysrc ifconfig_DEFAULT=3DDHCP sysrc sshd_enable=3DYES ``` The installation will always fail with a checksum error. This happens becau= se the remote dists are fetched like this: ``` ( exec 3>&1 export BSDINSTALL_DISTDIR=3D$(`dirname $0`/fetchmissingdists 2>&1 1= >&3) FETCH_RESULT=3D$? exec 3>&- return $FETCH_RESULT ) || error "Could not fetch remote distributions" ``` There is an attempt there to change the value of $BSDINSTALL_DISTDIR to the location of the fetched files, but since this logic was placed in a subshell that change is now a no-op. Additionally, this code attempts to "return" from a subshell, but "return" = is only valid in functions. The attached patch reverts this change so that both "auto" and "script" use= the same logic for fetching remote dists, and scripted installs operate as intended. --=20 You are receiving this mail because: You are the assignee for the bug.=