From nobody Wed Jul 20 18:12:57 2022 X-Original-To: dev-commits-src-all@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 4Lp3j13D5Wz4Wb80 for ; Wed, 20 Jul 2022 18:13:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) (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 4Lp3j05kxCz3F79 for ; Wed, 20 Jul 2022 18:13:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe33.google.com with SMTP id n66so2083937vsc.9 for ; Wed, 20 Jul 2022 11:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gcvg00OnHX15oCCqtAuo6SYiYWBtWqY/flZ6X8vibjw=; b=sk2hnM78YuGRDmJlc9OJ5z3dCFSTRfIL8bZ1Gj+UKBL8aJPnk3uL7l/B7dyZVuYePR 01NXhoQxbfjOWLi5HU95wA5Vuuv/hjo75LwPUWtLo59CjAmbkK+NVC23K7oWS5JQ43mW +/RCZtTZ0QZ3G7Y4P2UOfTL/Iji04qwCnE1WOTZzHQuMx/iOm2EZPZ2ipsX4wXStMjfn xgSiyb9jgxz+H8qufaZJXUJwLvfbDjXfy50wlR7oKebA5lW7oBzLy8tv2WAY/1L9kLck MpvvofVDduSFY1yylODxa8ULQudIqohUz3SNXhK6J6kSywg8BjZyeTw2lfrv+OPsBnC0 l2jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gcvg00OnHX15oCCqtAuo6SYiYWBtWqY/flZ6X8vibjw=; b=TXE8wDwwli9RdrcFPq7x2o+ofX+cLqQ0W3+aU263dr1mVa+wpKTGXDL50LwYgLcMSQ UN8gEHoJxl0ra/GOrb3HIOg2BH5hooKJtK4eF1p74kqgXryCLGoKzY7onip6TpVnEJ73 PxurAI6mVO0xRWXmRbY+zdSx/fw3KMgT0P2MlYb/hzcA0VHcd27HbwtwNOBGPgTMHSXj 4uK99rq9Xhc5yPAgjsOx1tB6xQ08XiNSMdcpsg/7o6A6Df0iekjJQWz3XTjxwmyGET/L 2Bs6B5ye198I7EbbckVMta+UGYbI6L3Bz8GKFvkcO+W6esaA18MipU2lcncBRPDbLRA7 H7Ng== X-Gm-Message-State: AJIora8UKDBT1EwY8vhY+z8YcmEnrMiN6U4HMGAnTxM0Q8IVYrXxN6vr +G4z6f7rrkn01SiOelsIQTCkjqSJma/z3HqXV4bAPQ== X-Google-Smtp-Source: AGRyM1sPA4vVs2pU78vrITxxtkGyO5rmdgsFUjomje1VYC2Cxs9u2RDTMY7UbDb7V+IDq5xvtYIJ/qXJYT72ooG7E/I= X-Received: by 2002:a67:ab02:0:b0:356:51a5:993e with SMTP id u2-20020a67ab02000000b0035651a5993emr14259652vse.12.1658340787901; Wed, 20 Jul 2022 11:13:07 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202207081750.268Ho5kZ066824@gitrepo.freebsd.org> <244CD526-C7D0-4D42-9DAB-6EA690DFD3A7@me.com> In-Reply-To: From: Warner Losh Date: Wed, 20 Jul 2022 12:12:57 -0600 Message-ID: Subject: Re: git: 84bf2bbbecc3 - main - stand: constrain zlib/gzip CFLAGS better To: Toomas Soome Cc: Dmitry Chagin , Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000946b2505e4408d02" X-Rspamd-Queue-Id: 4Lp3j05kxCz3F79 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=sk2hnM78; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::e33) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_TO(0.00)[me.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e33:from]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; DMARC_NA(0.00)[bsdimp.com]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] X-ThisMailContainsUnwantedMimeParts: N --000000000000946b2505e4408d02 Content-Type: text/plain; charset="UTF-8" On Wed, Jul 20, 2022 at 12:06 PM Warner Losh wrote: > > > On Wed, Jul 20, 2022 at 11:44 AM Toomas Soome wrote: > >> >> >> > On 20. Jul 2022, at 20:24, Dmitry Chagin wrote: >> > >> > On Fri, Jul 08, 2022 at 05:50:05PM +0000, Warner Losh wrote: >> >> The branch main has been updated by imp: >> >> >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=84bf2bbbecc369cea6095bed7a738674b27f8d13 >> >> >> >> commit 84bf2bbbecc369cea6095bed7a738674b27f8d13 >> >> Author: Warner Losh >> >> AuthorDate: 2022-07-08 16:29:25 +0000 >> >> Commit: Warner Losh >> >> CommitDate: 2022-07-08 17:47:37 +0000 >> >> >> >> stand: constrain zlib/gzip CFLAGS better >> >> >> >> Define ZLIB_CFLAGS and use it only for the sources that are in ZLIB >> or >> >> that include it. >> >> >> >> Sponsored by: Netflix >> >> --- >> >> stand/libsa/Makefile | 13 +++++++------ >> >> 1 file changed, 7 insertions(+), 6 deletions(-) >> >> >> >> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile >> >> index b5d800c26295..09637bd5e9d4 100644 >> >> --- a/stand/libsa/Makefile >> >> +++ b/stand/libsa/Makefile >> >> @@ -96,9 +96,11 @@ SRCS+=${i} >> >> >> >> # decompression functionality from zlib >> >> .PATH: ${SRCTOP}/sys/contrib/zlib >> >> -CFLAGS+=-DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib >> >> -SRCS+= adler32.c crc32.c >> >> -SRCS+= infback.c inffast.c inflate.c inftrees.c zutil.c >> >> +ZLIB_CFLAGS=-DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib >> >> +.for i in adler32.c crc32.c infback.c inffast.c inflate.c inftrees.c >> zutil.c >> >> +CFLAGS.${i}+=${ZLIB_CFLAGS} >> >> +SRCS+= ${i} >> >> +.endfor >> >> >> >> # lz4 decompression functionality >> >> .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 >> >> @@ -168,9 +170,8 @@ SRCS+= time.c >> >> .PATH: ${SRCTOP}/sys/ufs/ffs >> >> SRCS+=ffs_subr.c ffs_tables.c >> >> >> >> -CFLAGS.dosfs.c+= -I${LDRSRC} >> >> -CFLAGS.tftp.c+= -I${LDRSRC} >> >> -CFLAGS.ufs.c+= -I${LDRSRC} >> > ^^^^^^^^^^^^ is this correct? at least it breaks builds with >> > WITHOUT_LOADER_ZFS and WITHOUT_BOOT probably, see PR/260083 >> > >> > >> >> No, it is not correct. >> > > My change is correct, theoretically. However, there's a layering violation > that means they are needed so it was premature. > > I'll fix a bandaide and do it better when I return from vacation. > Doh! I don't have the right keys loaded in my ssh-agent, so I can't push the change because the port forwarding on my router is broken and I can't remotely login :( If someone could commit the change I suggested in https://reviews.freebsd.org/D35860 that would be great! Warner > Warner > > >> rgds, >> toomas >> >> >> > >> > >> >> +CFLAGS.gzipfs.c+= ${ZLIB_CFLAGS} >> >> +CFLAGS.pkgfs.c+= ${ZLIB_CFLAGS} >> >> CFLAGS.bzipfs.c+= -I${SRCTOP}/contrib/bzip2 -DBZ_NO_STDIO >> -DBZ_NO_COMPRESS >> >> >> >> # explicit_bzero and calculate_crc32c >> >> --000000000000946b2505e4408d02 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jul 20, 2022 at 12:06 PM Warn= er Losh <imp@bsdimp.com> wrote:=


On Wed, Jul 20, 2022 at 11:44 AM Toomas Soome <tsoome@me.com> wrot= e:


> On 20. Jul 2022, at 20:24, Dmitry Chagin <dchagin@heemeyer.club>= wrote:
>
> On Fri, Jul 08, 2022 at 05:50:05PM +0000, Warner Losh wrote:
>> The branch main has been updated by imp:
>>
>> URL: http= s://cgit.FreeBSD.org/src/commit/?id=3D84bf2bbbecc369cea6095bed7a738674b27f8= d13
>>
>> commit 84bf2bbbecc369cea6095bed7a738674b27f8d13
>> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
>> AuthorDate: 2022-07-08 16:29:25 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
>> CommitDate: 2022-07-08 17:47:37 +0000
>>
>>=C2=A0 =C2=A0 stand: constrain zlib/gzip CFLAGS better
>>
>>=C2=A0 =C2=A0 Define ZLIB_CFLAGS and use it only for the sources th= at are in ZLIB or
>>=C2=A0 =C2=A0 that include it.
>>
>>=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0Netflix
>> ---
>> stand/libsa/Makefile | 13 +++++++------
>> 1 file changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile
>> index b5d800c26295..09637bd5e9d4 100644
>> --- a/stand/libsa/Makefile
>> +++ b/stand/libsa/Makefile
>> @@ -96,9 +96,11 @@ SRCS+=3D${i}
>>
>> # decompression functionality from zlib
>> .PATH: ${SRCTOP}/sys/contrib/zlib
>> -CFLAGS+=3D-DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib
>> -SRCS+=3D=C2=A0 =C2=A0 =C2=A0 adler32.c crc32.c
>> -SRCS+=3D=C2=A0 =C2=A0 =C2=A0 infback.c inffast.c inflate.c inftre= es.c zutil.c
>> +ZLIB_CFLAGS=3D-DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib
>> +.for i in adler32.c crc32.c infback.c inffast.c inflate.c inftree= s.c zutil.c
>> +CFLAGS.${i}+=3D${ZLIB_CFLAGS}
>> +SRCS+=3D=C2=A0 =C2=A0 =C2=A0 ${i}
>> +.endfor
>>
>> # lz4 decompression functionality
>> .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4
>> @@ -168,9 +170,8 @@ SRCS+=3D=C2=A0 =C2=A0time.c
>> .PATH: ${SRCTOP}/sys/ufs/ffs
>> SRCS+=3Dffs_subr.c ffs_tables.c
>>
>> -CFLAGS.dosfs.c+=3D -I${LDRSRC}
>> -CFLAGS.tftp.c+=3D -I${LDRSRC}
>> -CFLAGS.ufs.c+=3D -I${LDRSRC}
> ^^^^^^^^^^^^ is this correct? at least it breaks builds with
> WITHOUT_LOADER_ZFS and WITHOUT_BOOT probably, see PR/260083
>
>

No, it is not correct.

My change is cor= rect, theoretically. However, there's a layering violation that means t= hey are needed so it was premature.

I'll fix a= bandaide=C2=A0and do it better when I return from vacation.

Doh! I don't have the right keys lo= aded in my ssh-agent, so I can't push the change because the port forwa= rding on my router is broken and I can't remotely login :(
If someone could commit the change I suggested in=C2=A0https://reviews.freebsd.org/D35860<= /a> that would be great!

--000000000000946b2505e4408d02--