git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, "Mike Hommey" <mh@glandium.org>,
	"brian m . carlson" <sandals@crustytoothpaste.net>,
	"Carlo Marcelo Arenas Belón" <carenas@gmail.com>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Glen Choo" <chooglen@google.com>,
	"Eric DeCosta" <edecosta@mathworks.com>
Subject: Re: [PATCH v2] Makefile: use sha1collisiondetection by default on OSX and Darwin
Date: Fri, 16 Dec 2022 06:17:16 +0900	[thread overview]
Message-ID: <xmqqlen8s6xv.fsf@gitster.g> (raw)
In-Reply-To: <patch-v2-1.1-3de7cdbd260-20221215T084129Z-avarab@gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Thu, 15 Dec 2022 09:43:05 +0100")

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Let's also use sha1collisiondetection on OSX, to do so we'll need to
> split up the "APPLE_COMMON_CRYPTO" flag into that flag and a new
> "APPLE_COMMON_CRYPTO_SHA1".

That's well reasoned

This leaves these in Makefile:

        # Define NO_APPLE_COMMON_CRYPTO if you are building on Darwin/Mac OS X
        # and do not want to use Apple's CommonCrypto library.  This allows you
        # to provide your own OpenSSL library, for example from MacPorts.

        ifndef NO_APPLE_COMMON_CRYPTO
                NO_OPENSSL = YesPlease
                APPLE_COMMON_CRYPTO = YesPlease
                COMPAT_CFLAGS += -DAPPLE_COMMON_CRYPTO
        endif

Because we only mention what it does to use NO_APPLE_COMMON_CRYPTO
here, without promising anything about what happens otherwise, we
can do this change without breaking any promises ;-)

However there is this bit:

        ifdef APPLE_COMMON_CRYPTO
                LIB_4_CRYPTO += -framework Security -framework CoreFoundation
        endif

So, if one says 

    make NO_APPLE_COMMON_CRYPTO=NoThanks APPLE_COMMON_CRYPTO_SHA1=YesPlease

presumably the end result will fail to link?  I _think_ that falls
into "if it hurts, don't do that", and 

 (1) automatically disabling the latter when the former is set would
     be more confusing than helpful.

 (2) explicitly detecting the situation and issue an error message
     from the Makefile might appear nicer, but if the linker does
     the failing with a messaage fine, that would be sufficient.

so in the end, the posted patch as-is should be fine, I think.

      reply	other threads:[~2022-12-15 21:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 23:01 [PATCH] Makefile: use sha1collisiondetection by default on OSX and Darwin Ævar Arnfjörð Bjarmason
2022-10-20 23:26 ` Junio C Hamano
2022-10-20 23:52   ` Ævar Arnfjörð Bjarmason
2022-12-15  8:43 ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2022-12-15 21:17   ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqlen8s6xv.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=carenas@gmail.com \
    --cc=chooglen@google.com \
    --cc=edecosta@mathworks.com \
    --cc=git@vger.kernel.org \
    --cc=mh@glandium.org \
    --cc=sandals@crustytoothpaste.net \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).