git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] Makefile: NO_OPENSSL=1 should no longer imply BLK_SHA1=1

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 27, 2017, 23:39 UTC
Message-ID
<20171227233912.GB181628@aiede.mtv.corp.google.com>
In-Reply-To
<20171227230038.14386-2-avarab@gmail.com>
Hi,
Ævar Arnfjörð Bjarmason wrote:
> Stop supplying BLK_SHA1=YesPlease when NO_OPENSSL=UnfortunatelyYes is
> supplied. This has been done ever since [1], when switching to DC_SHA1
> by default in [2] this should have been changed as well.
I had trouble parsing this, I think for a few reasons:
 1. Too much 'this', so I end up not being able to keep track of what
    has been done ever since (1) and (2)
 2. The ',' should be a ';'
 3. Can the commit names go inline in the message instead of being
    footnotes?  That way, my eye doesn't have to chase so far to
    find what kind of dates you are talking about.
 4. Why should switching to DC_SHA1 by default have resulted in
    simply dropping the NO_OPENSSL => BLK_SHA1 behavior?  At first
    glance it would be more intuitive to change it to
    NO_OPENSSL => DC_SHA1 instead.
Putting those all together, I end up with
 Use the collision detecting SHA-1 implementation by default even
 when NO_OPENSSL is set.
 Setting NO_OPENSSL=UnfortunatelyYes has implied BLK_SHA1=1 ever since
 the former was introduced in dd53c7ab29 (Support for NO_OPENSSL,
 2005-07-29).  That implication should have been removed when the
 default SHA-1 implementation changed from OpenSSL to DC_SHA1 in
 e6b07da278 (Makefile: make DC_SHA1 the default, 2017-03-17).  Finish
 what that commit started by removing the BLK_SHA1 fallback setting so
 the default DC_SHA1 implementation can be used.

What happens if I set both OPENSSL_SHA1 and NO_OPENSSL? Should this block set

	OPENSSL_SHA1 =
so that the latter wins, or should we detect it as an error?
[...]
Show 27 quoted lines
> --- a/Makefile
> +++ b/Makefile
> @@ -23,7 +23,6 @@ all::
>  # it at all).
>  #
>  # Define NO_OPENSSL environment variable if you do not have OpenSSL.
> -# This also implies BLK_SHA1.
>  #
>  # Define USE_LIBPCRE if you have and want to use libpcre. Various
>  # commands such as log and grep offer runtime options to use
> @@ -1260,7 +1259,6 @@ ifndef NO_OPENSSL
>  	endif
>  else
>  	BASIC_CFLAGS += -DNO_OPENSSL
> -	BLK_SHA1 = 1
>  	OPENSSL_LIBSSL =
>  endif
>  ifdef NO_OPENSSL
> diff --git a/configure.ac b/configure.ac
> index 2f55237e65..7f8415140f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -241,7 +241,6 @@ AC_MSG_NOTICE([CHECKS for site configuration])
>  # a bundled SHA1 routine optimized for PowerPC.
>  #
>  # Define NO_OPENSSL environment variable if you do not have OpenSSL.
> -# This also implies BLK_SHA1.
With or without some of those commit message tweaks
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks, Jonathan

Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 7 of 15 in “When DC_SHA1 was made the default we missed a spot”
  1. 0/2 When DC_SHA1 was made the default we missed a spotÆvar Arnfjörð Bjarmason, Dec 27, 2017
  2. 2/2 Windows: stop supplying BLK_SHA1=YesPlease by defaultÆvar Arnfjörð Bjarmason, Dec 27, 2017
  3. Jonathan NiederDec 27, 2017
  4. Ævar Arnfjörð BjarmasonDec 28, 2017
  5. Johannes SchindelinJan 4, 2018
  6. 1/2 Makefile: NO_OPENSSL=1 should no longer imply BLK_SHA1=1Ævar Arnfjörð Bjarmason, Dec 27, 2017
  7. Jonathan NiederDec 27, 2017
  8. 0/2 When DC_SHA1 was made the default we missed a spotÆvar Arnfjörð Bjarmason, Dec 28, 2017
  9. 1/2 Makefile: NO_OPENSSL=1 should no longer imply BLK_SHA1=1Ævar Arnfjörð Bjarmason, Dec 28, 2017
  10. Jonathan NiederDec 28, 2017
  11. 2/2 Windows: stop supplying BLK_SHA1=YesPlease by defaultÆvar Arnfjörð Bjarmason, Dec 28, 2017
  12. Jonathan NiederDec 28, 2017
  13. Johannes SchindelinJan 4, 2018
  14. Ævar Arnfjörð BjarmasonJan 4, 2018
  15. Junio C HamanoJan 5, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.