From nobody Sun Jul 09 00:18:02 2023 X-Original-To: dev-commits-src-main@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 4Qz75M3yztz4mDmW for ; Sun, 9 Jul 2023 00:18:15 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qz75M2FYkz4J3Z for ; Sun, 9 Jul 2023 00:18:15 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-3fc0aecf107so4106905e9.2 for ; Sat, 08 Jul 2023 17:18:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688861893; x=1691453893; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DNr6UYmpeozju2aV5dEP1Cd/L8HwhjJU/A/u1YO3yOM=; b=Ui+3T/e2tJ4+mxVCvGJ5vKbcl932l3NWzHGcpVIg5ONBzN7674Ckms5aWnHqLpIspY KUFxupWBVJj1BEePlpsDuMZ64jZMpb39YmAGHabz0ML7wMKr7iDb+elnB/zE8pvjOyVX WUpeUbCb7rP3f/zrM+x0yQZFr1yEpNrBJ0qwpOQExNwwMK+poUihZwwdGzdZ2CrBDj7N /+QknsSpmjnyP4efM3gV6IAV/qrGnC5reoB9Q9Qb1KvqldjAEP8nDUO4W0rW8W13SbJI q0Dt64BPclmd09w7F7Tm07nYVX5U+VQJ0EnfE+Y917p1hYfzeuZH2sgxDBChGAYAq9+8 YiWg== X-Gm-Message-State: ABy/qLbsG9cylxEP3pRtI3BWbnrxuPLIdeD/Svu1b84GgemSo/TPyqkj uW3GF12nduQUO79aOMqlK+oXww== X-Google-Smtp-Source: APBJJlGB77Jqk5dWc+2OF15A94q7bQFnczjdfFA+fq1G5x31o+AUJe3OWAOCO7hcJCGOYjB6KRDnJg== X-Received: by 2002:a7b:c3d5:0:b0:3f6:91c:4e86 with SMTP id t21-20020a7bc3d5000000b003f6091c4e86mr6534043wmj.3.1688861893422; Sat, 08 Jul 2023 17:18:13 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id t22-20020a7bc3d6000000b003fc02218d6csm4020124wmj.25.2023.07.08.17.18.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Jul 2023 17:18:12 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: e64780fbc394 - main - xinstall: do not use copy_file_range(2) when BOOTSTRAPPING From: Jessica Clarke In-Reply-To: <202307082348.368Nm3TN074666@gitrepo.freebsd.org> Date: Sun, 9 Jul 2023 01:18:02 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <471FD215-B307-4116-9E92-4D84D6FB2B66@freebsd.org> References: <202307082348.368Nm3TN074666@gitrepo.freebsd.org> To: Martin Matuska X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4Qz75M2FYkz4J3Z X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 9 Jul 2023, at 00:48, Martin Matuska wrote: >=20 > The branch main has been updated by mm: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3De64780fbc394b10581e50a850cc06c1c= 12a8e4f9 >=20 > commit e64780fbc394b10581e50a850cc06c1c12a8e4f9 > Author: Martin Matuska > AuthorDate: 2023-07-08 23:24:38 +0000 > Commit: Martin Matuska > CommitDate: 2023-07-08 23:25:23 +0000 >=20 > xinstall: do not use copy_file_range(2) when BOOTSTRAPPING >=20 > Reported by: arichardson > --- > usr.bin/xinstall/Makefile | 5 +++++ > usr.bin/xinstall/xinstall.c | 4 ++++ > 2 files changed, 9 insertions(+) >=20 > diff --git a/usr.bin/xinstall/Makefile b/usr.bin/xinstall/Makefile > index 9969ef104e98..3b49cb39d27a 100644 > --- a/usr.bin/xinstall/Makefile > +++ b/usr.bin/xinstall/Makefile > @@ -17,6 +17,11 @@ CFLAGS+=3D -I${SRCTOP}/lib/libnetbsd > LIBADD=3D md > CFLAGS+=3D -DWITH_MD5 -DWITH_RIPEMD160 >=20 > +.ifdef BOOTSTRAPPING > +# For the bootstrap we disable copy_file_range() > +CFLAGS+=3D -DBOOTSTRAP_XINSTALL If the bootstrap xinstall is allowed to use copy_file_range on FreeBSD (i.e. it=E2=80=99s guaranteed to exist) this is overly restrictive and = should be: .if defined(BOOTSTRAPPING) && ${.MAKE.OS} !=3D "FreeBSD" > +.endif > + > HAS_TESTS=3D > SUBDIR.${MK_TESTS}+=3D tests >=20 > diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c > index 8dace862ef1e..6c269bbb5d91 100644 > --- a/usr.bin/xinstall/xinstall.c > +++ b/usr.bin/xinstall/xinstall.c > @@ -1300,7 +1300,9 @@ copy(int from_fd, const char *from_name, int = to_fd, const char *to_name, > static size_t bufsize; > int nr, nw; > int serrno; > +#ifndef BOOTSTRAP_XINSTALL > ssize_t ret; > +#endif > char *p; > int done_copy; > DIGEST_CTX ctx; > @@ -1311,6 +1313,7 @@ copy(int from_fd, const char *from_name, int = to_fd, const char *to_name, > if (lseek(to_fd, (off_t)0, SEEK_SET) =3D=3D (off_t)-1) > err(EX_OSERR, "lseek: %s", to_name); >=20 > +#ifndef BOOTSTRAP_XINSTALL > /* Try copy_file_range() if no digest is requested */ > if (digesttype =3D=3D DIGEST_NONE) { > ret =3D 1; > @@ -1331,6 +1334,7 @@ copy(int from_fd, const char *from_name, int = to_fd, const char *to_name, > /* Fall back */ > } >=20 > +#endif This looks to be in the wrong place wrt whitespace? Jess > digest_init(&ctx); >=20 > done_copy =3D 0;