Git Mailing List Archive mirror
 help / color / mirror / Atom feed
* Which macOS versions does Git support?
@ 2023-05-19  7:00 M Hickford
  2023-05-19  9:09 ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: M Hickford @ 2023-05-19  7:00 UTC (permalink / raw)
  To: Git Mailing List

Hi. Does anyone know which macOS versions are supported by Git?

Motivation: I spotted that git-credential-osxkeychain.c uses a
deprecated API. SecKeychainAddInternetPassword was deprecated in
2014's macOS 10.10 [1].  Replacement SecItemAdd was introduced in
2009's macOS 10.6 [2].

Further motivation: If I understand the documentation correctly, the
new SecItemAdd API has better support for storing attributes alongside
secrets, which might be handy for storing Git credential's new
password_expiry_utc attribute (d208bfd, credential: new attribute
password_expiry_utc, 2023-02-18).

[0] https://github.com/git/git/blob/master/contrib/credential/osxkeychain/git-credential-osxkeychain.c
[1] https://developer.apple.com/documentation/security/1393322-seckeychainaddinternetpassword?language=objc
[2] https://developer.apple.com/documentation/security/1401659-secitemadd?language=objc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Which macOS versions does Git support?
  2023-05-19  7:00 Which macOS versions does Git support? M Hickford
@ 2023-05-19  9:09 ` Jeff King
  2023-05-19 17:49   ` Jeff Hostetler
  2023-05-20  0:37   ` Carlo Marcelo Arenas Belón
  0 siblings, 2 replies; 6+ messages in thread
From: Jeff King @ 2023-05-19  9:09 UTC (permalink / raw)
  To: M Hickford; +Cc: Taylor Blau, Git Mailing List

On Fri, May 19, 2023 at 08:00:00AM +0100, M Hickford wrote:

> Hi. Does anyone know which macOS versions are supported by Git?

I don't think we have any formal decision here (or for any other
platform; it is usually a cost/benefit for individual features we may
want to depend on).

> Motivation: I spotted that git-credential-osxkeychain.c uses a
> deprecated API. SecKeychainAddInternetPassword was deprecated in
> 2014's macOS 10.10 [1].  Replacement SecItemAdd was introduced in
> 2009's macOS 10.6 [2].

+cc Taylor, who I know was looking into this recently.

I'd guess that anything older than 2009 is probably not worth worrying
about.

> Further motivation: If I understand the documentation correctly, the
> new SecItemAdd API has better support for storing attributes alongside
> secrets, which might be handy for storing Git credential's new
> password_expiry_utc attribute (d208bfd, credential: new attribute
> password_expiry_utc, 2023-02-18).

Yeah, that would be a nice bonus (in addition to avoiding a deprecated
interface).

-Peff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Which macOS versions does Git support?
  2023-05-19  9:09 ` Jeff King
@ 2023-05-19 17:49   ` Jeff Hostetler
  2023-05-20  0:37   ` Carlo Marcelo Arenas Belón
  1 sibling, 0 replies; 6+ messages in thread
From: Jeff Hostetler @ 2023-05-19 17:49 UTC (permalink / raw)
  To: Jeff King, M Hickford; +Cc: Taylor Blau, Git Mailing List



On 5/19/23 5:09 AM, Jeff King wrote:
> On Fri, May 19, 2023 at 08:00:00AM +0100, M Hickford wrote:
> 
>> Hi. Does anyone know which macOS versions are supported by Git?
> 
> I don't think we have any formal decision here (or for any other
> platform; it is usually a cost/benefit for individual features we may
> want to depend on).
> 
>> Motivation: I spotted that git-credential-osxkeychain.c uses a
>> deprecated API. SecKeychainAddInternetPassword was deprecated in
>> 2014's macOS 10.10 [1].  Replacement SecItemAdd was introduced in
>> 2009's macOS 10.6 [2].
> 
> +cc Taylor, who I know was looking into this recently.
> 
> I'd guess that anything older than 2009 is probably not worth worrying
> about.
> 
>> Further motivation: If I understand the documentation correctly, the
>> new SecItemAdd API has better support for storing attributes alongside
>> secrets, which might be handy for storing Git credential's new
>> password_expiry_utc attribute (d208bfd, credential: new attribute
>> password_expiry_utc, 2023-02-18).
> 
> Yeah, that would be a nice bonus (in addition to avoiding a deprecated
> interface).
> 
> -Peff

I had similar issues last year with older versions of the compiler
tools and/or an API that I was using in FSMonitor.

https://lore.kernel.org/git/xmqqsfhtphpl.fsf@gitster.g/T/
https://lore.kernel.org/git/pull.1375.git.1665085395.gitgitgadget@gmail.com/

IIRC my API usage needs 10.6 or newer.

Jeff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Which macOS versions does Git support?
  2023-05-19  9:09 ` Jeff King
  2023-05-19 17:49   ` Jeff Hostetler
@ 2023-05-20  0:37   ` Carlo Marcelo Arenas Belón
  2023-05-20  7:36     ` M Hickford
  1 sibling, 1 reply; 6+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2023-05-20  0:37 UTC (permalink / raw)
  To: Jeff King; +Cc: M Hickford, Taylor Blau, Git Mailing List

On Fri, May 19, 2023 at 05:09:17AM -0400, Jeff King wrote:
> 
> I'd guess that anything older than 2009 is probably not worth worrying
> about.

FWIW Mac OS X 10.5 (Leopard) was last updated in 2009 and also happens to
be the last one that can run in PowerPC, so sadly there is a non zero
number of users for it (MacPorts uses a minimum of 10.4 for that reason)

Carlo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Which macOS versions does Git support?
  2023-05-20  0:37   ` Carlo Marcelo Arenas Belón
@ 2023-05-20  7:36     ` M Hickford
  2023-05-22 19:24       ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: M Hickford @ 2023-05-20  7:36 UTC (permalink / raw)
  To: Carlo Marcelo Arenas Belón
  Cc: Jeff King, M Hickford, Taylor Blau, Git Mailing List

On Sat, 20 May 2023 at 01:37, Carlo Marcelo Arenas Belón
<carenas@gmail.com> wrote:
>
> On Fri, May 19, 2023 at 05:09:17AM -0400, Jeff King wrote:
> >
> > I'd guess that anything older than 2009 is probably not worth worrying
> > about.

Thanks Jeff, Jeff and Carlo for your replies.

>
> FWIW Mac OS X 10.5 (Leopard) was last updated in 2009 and also happens to
> be the last one that can run in PowerPC, so sadly there is a non zero
> number of users for it (MacPorts uses a minimum of 10.4 for that reason)

Interesting! https://ports.macports.org/port/git/details/ It looks
like the most recent build is from 2021
https://ports.macports.org/port/git/builds/?builder_name__name=10.5_ppc_legacy
.   https://ports.macports.org/port/git/stats/?days=365&days_ago=0
shows 10 total PowerPC downloads in the past year between versions
10.4, 10.5 and 10.6

>
> Carlo

I don't have the equipment or expertise to develop on macOS, so I'll
leave the API migration as a potential future #leftoverbits

Reading the keychain docs more carefully, the new API only supports a
fixed set of attribute keys such as 'kSecAttrComment', so discount my
original "further motivation"
https://developer.apple.com/documentation/security/keychain_services/keychain_items/item_attribute_keys_and_values?language=objc

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Which macOS versions does Git support?
  2023-05-20  7:36     ` M Hickford
@ 2023-05-22 19:24       ` Jeff King
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff King @ 2023-05-22 19:24 UTC (permalink / raw)
  To: M Hickford; +Cc: Carlo Marcelo Arenas Belón, Taylor Blau, Git Mailing List

On Sat, May 20, 2023 at 08:36:58AM +0100, M Hickford wrote:

> > FWIW Mac OS X 10.5 (Leopard) was last updated in 2009 and also happens to
> > be the last one that can run in PowerPC, so sadly there is a non zero
> > number of users for it (MacPorts uses a minimum of 10.4 for that reason)
> 
> Interesting! https://ports.macports.org/port/git/details/ It looks
> like the most recent build is from 2021
> https://ports.macports.org/port/git/builds/?builder_name__name=10.5_ppc_legacy
> .   https://ports.macports.org/port/git/stats/?days=365&days_ago=0
> shows 10 total PowerPC downloads in the past year between versions
> 10.4, 10.5 and 10.6

One nice thing here is that the credential helpers are pretty
independent from the rest of Git. If new versions of the helper drop
support for the old API, people on ancient systems can still use the old
helper. We'd just have to make a decision about how much to help them:

  1. (least help) Tell them to dig it out of git.git history, build, and
     stuff the resulting binary somewhere.

  2. (most help) Support both, selected by an #ifdef and a Makefile
     knob, and maybe even turn the knob automatically based on "uname
     -r".

  3. (middle ground) Rewrite with the new API, but leave the old helper
     as contrib/osxkeychain-old or something. Still easy-ish to build,
     but carries less maintenance burden.

> I don't have the equipment or expertise to develop on macOS, so I'll
> leave the API migration as a potential future #leftoverbits

I'd probably do (3), but as I also lack equipment or expertise, I'm not
planning on working on it myself (and I'd let whoever does decide to do
that work have the final say on approach).

> Reading the keychain docs more carefully, the new API only supports a
> fixed set of attribute keys such as 'kSecAttrComment', so discount my
> original "further motivation"

Bummer. Thanks for looking into this, though.

-Peff

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-22 19:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-19  7:00 Which macOS versions does Git support? M Hickford
2023-05-19  9:09 ` Jeff King
2023-05-19 17:49   ` Jeff Hostetler
2023-05-20  0:37   ` Carlo Marcelo Arenas Belón
2023-05-20  7:36     ` M Hickford
2023-05-22 19:24       ` Jeff King

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).