git-annex/doc
Joey Hess 1558e03014
Refuse to upgrade direct mode repositories when git is older than 2.22
That git fixed a memory leak that could cause an OOM during the upgrade.

Most git-annex builds have a new enough git already.
OSX git was upgraded with brew.

Linux i386ancient build's git was too old. Upgrading it to a fixed
git didn't work (due to the newer git not working with the old ssh,
https://bugs.chromium.org/p/git/issues/detail?id=7 )

Choices to deal with that were:

* Somehow make direct mode upgrade work with the old git, avoiding its
  OOM problem. One way would be to switch the repo to indirect mode
  first, and so upgrade to a repo with locked files. Not good when
  the filesystem does not support symlinks.
* backport the OOM fix from git 2.22
  (And do what about the version number so git-annex knows it's fixed?)
* backport openssh (and possibly more stuff)
* move the i386ancient build to at least Debian stretch (still backporting git)
  But this will make it no longer work with some of the ancient kernels it
  targets.

Of those, backporting the OOM fix seemed the best approach. Put "oomfix"
in the git version number to indicate it.

I have not automated building the git backport, so here's the patch I
used:

diff -ur orig/git-2.1.4/convert.c git-2.1.4/convert.c
--- orig/git-2.1.4/convert.c	2014-12-18 18:42:18.000000000 +0000
+++ git-2.1.4/convert.c	2019-08-29 20:05:04.371872338 +0100
@@ -404,7 +404,7 @@
 	if (start_async(&async))
 		return 0;	/* error was already reported */

-	if (strbuf_read(&nbuf, async.out, len) < 0) {
+	if (strbuf_read(&nbuf, async.out, 0) < 0) {
 		error("read from external filter %s failed", cmd);
 		ret = 0;
 	}
diff -ur orig/git-2.1.4/GIT-VERSION-GEN git-2.1.4/GIT-VERSION-GEN
--- orig/git-2.1.4/GIT-VERSION-GEN	2014-12-18 18:42:18.000000000 +0000
+++ git-2.1.4/GIT-VERSION-GEN	2019-08-29 20:06:39.132743228 +0100
@@ -1,7 +1,7 @@
 #!/bin/sh

 GVF=GIT-VERSION-FILE
-DEF_VER=v2.1.4
+DEF_VER=v2.1.4.oomfix

 LF='
 '
diff -ur orig/git-2.1.4/configure git-2.1.4/configure
--- orig/git-2.1.4/configure	2014-12-18 18:42:19.000000000 +0000
+++ git-2.1.4/configure	2019-08-29 20:27:45.896380015 +0100
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='git'
 PACKAGE_TARNAME='git'
-PACKAGE_VERSION='2.1.4'
-PACKAGE_STRING='git 2.1.4'
+PACKAGE_VERSION='2.1.4.oomfix'
+PACKAGE_STRING='git 2.1.4.oomfix'
 PACKAGE_BUGREPORT='git@vger.kernel.org'
 PACKAGE_URL=''

diff -ur orig/git-2.1.4/version git-2.1.4/version
--- orig/git-2.1.4/version	2014-12-18 18:42:19.000000000 +0000
+++ git-2.1.4/version	2019-08-29 20:06:17.572545210 +0100
@@ -1 +1 @@
-2.1.4
+2.1.4.oomfix
2019-08-29 15:24:41 -04:00
..
Android Added a comment: Android - gitlab repo 2019-05-08 11:35:04 +00:00
android
assistant
automatic_conflict_resolution
backends
bare_repositories
bugs Refuse to upgrade direct mode repositories when git is older than 2.22 2019-08-29 15:24:41 -04:00
coding_style
contribute
copies
design planning 2019-08-26 12:29:43 -04:00
devblog devblog 2019-08-28 15:18:41 -04:00
direct_mode
download
encryption
footer
forum comment 2019-08-29 12:06:46 -04:00
future_proofing
git-annex-add response 2019-01-22 17:11:21 -04:00
git-annex-addurl Added a comment: Re: Inconsistent idiom 2019-03-28 03:59:04 +00:00
git-annex-adjust
git-annex-checkpresentkey
git-annex-config
git-annex-copy
git-annex-direct
git-annex-drop
git-annex-enableremote
git-annex-find Added a comment: Find (and other operations) over multiple repos 2019-02-25 14:33:27 +00:00
git-annex-importfeed
git-annex-lookupkey comment 2019-04-03 13:01:07 -04:00
git-annex-metadata Added a comment 2019-05-03 15:50:43 +00:00
git-annex-move
git-annex-preferred-content
git-annex-reinject
git-annex-rmurl
git-annex-setpresentkey
git-annex-sync
git-annex-test
git-annex-unannex
git-annex-undo
git-annex-uninit
git-annex-unlock
git-annex-unused
git-annex-whereis
how_it_works
install added a hyperlink to conda installation page 2019-08-20 02:45:43 +00:00
internals added a hyperlink from key internals page to git-annex-examinekey 2019-04-24 17:18:33 +00:00
license
links Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
metadata
news add news item for git-annex 7.20190819 2019-08-19 12:27:15 -04:00
not
polls
preferred_content
profiling new comment (and rename for consistency) 2019-01-14 18:01:02 -04:00
required_content
scalability
security rename annex.security.allowed-http-addresses 2019-05-30 12:43:40 -04:00
special_remotes Added a comment: workaround not working any more 2019-08-21 11:34:23 +00:00
stickers
sync Merge branch 'master' of ssh://git-annex.branchable.com 2019-07-19 14:49:37 -04:00
templates
testimonials
thanks update 2019-08-22 21:04:19 -04:00
tips Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
todo v7 bug review and cleanup 2019-08-28 12:20:30 -04:00
trust
tuning
upgrades
use_case
users add kyle 2019-02-08 17:22:43 +00:00
videos
walkthrough Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
Android.mdwn adb import 2019-04-09 17:52:41 -04:00
assistant.mdwn
automatic_conflict_resolution.mdwn
backends.mdwn Add BLAKE2BP512 and BLAKE2BP512E backends 2019-07-05 15:30:03 -04:00
bare_repositories.mdwn
bugs.mdwn
builds.mdwn remove 2019-05-03 11:06:35 -04:00
chunking.mdwn
coding_style.mdwn
comments.mdwn
contact.mdwn
contribute.mdwn
copies.mdwn
design.mdwn
devblog.mdwn
direct_mode.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
distributed_version_control.mdwn
download.mdwn fix git:// url for repo 2019-08-25 19:12:58 +00:00
encryption.mdwn
favicon.ico
forum.mdwn
future_proofing.mdwn
git-annex-add.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
git-annex-addunused.mdwn
git-annex-addurl.mdwn rename annex.security.allowed-http-addresses 2019-05-30 12:43:40 -04:00
git-annex-adjust.mdwn git-annex merge branch 2019-08-09 13:21:15 -04:00
git-annex-assistant.mdwn
git-annex-benchmark.mdwn
git-annex-calckey.mdwn shorten some too-long descriptions 2019-01-16 14:16:32 -04:00
git-annex-checkpresentkey.mdwn
git-annex-config.mdwn
git-annex-contentlocation.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
git-annex-copy.mdwn annex.jobs=cpus etc 2019-05-10 13:27:08 -04:00
git-annex-dead.mdwn added renameremote command 2019-04-15 13:49:03 -04:00
git-annex-describe.mdwn
git-annex-diffdriver.mdwn
git-annex-direct.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
git-annex-drop.mdwn improve git-annex-drop man page required content docs 2019-06-26 12:22:59 -04:00
git-annex-dropkey.mdwn
git-annex-dropunused.mdwn
git-annex-edit.mdwn
git-annex-enable-tor.mdwn
git-annex-enableremote.mdwn
git-annex-examinekey.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
git-annex-expire.mdwn
git-annex-export.mdwn honor preferred content when importing 2019-05-21 14:38:06 -04:00
git-annex-find.mdwn
git-annex-findref.mdwn
git-annex-fix.mdwn
git-annex-forget.mdwn
git-annex-fromkey.mdwn fromkey --json 2019-02-05 14:03:29 -04:00
git-annex-fsck.mdwn annex.jobs=cpus etc 2019-05-10 13:27:08 -04:00
git-annex-fuzztest.mdwn
git-annex-get.mdwn annex.jobs=cpus etc 2019-05-10 13:27:08 -04:00
git-annex-group.mdwn
git-annex-groupwanted.mdwn
git-annex-import.mdwn git-annex merge branch 2019-08-09 13:21:15 -04:00
git-annex-importfeed.mdwn rename annex.security.allowed-http-addresses 2019-05-30 12:43:40 -04:00
git-annex-indirect.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
git-annex-info.mdwn improve wording 2019-03-28 13:25:14 -04:00
git-annex-init.mdwn
git-annex-initremote.mdwn split out section on common configuration parameters 2019-04-16 13:09:12 -04:00
git-annex-inprogress.mdwn
git-annex-list.mdwn
git-annex-lock.mdwn
git-annex-log.mdwn
git-annex-lookupkey.mdwn
git-annex-map.mdwn
git-annex-matchexpression.mdwn Added mimeencoding= term to annex.largefiles expressions. 2019-04-30 12:17:22 -04:00
git-annex-matching-options.mdwn
git-annex-merge.mdwn git-annex merge branch 2019-08-09 13:21:15 -04:00
git-annex-metadata.mdwn response; cleanup 2019-05-03 11:37:41 -04:00
git-annex-migrate.mdwn
git-annex-mirror.mdwn annex.jobs=cpus etc 2019-05-10 13:27:08 -04:00
git-annex-move.mdwn annex.jobs=cpus etc 2019-05-10 13:27:08 -04:00
git-annex-multicast.mdwn
git-annex-numcopies.mdwn
git-annex-p2p.mdwn
git-annex-post-receive.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
git-annex-pre-commit.mdwn
git-annex-preferred-content.mdwn clarify 2019-07-19 13:24:50 -04:00
git-annex-proxy.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
git-annex-readpresentkey.mdwn
git-annex-registerurl.mdwn
git-annex-reinit.mdwn
git-annex-reinject.mdwn
git-annex-rekey.mdwn
git-annex-remotedaemon.mdwn
git-annex-renameremote.mdwn forgot to add man page 2019-04-16 12:25:49 -04:00
git-annex-repair.mdwn
git-annex-required.mdwn
git-annex-resolvemerge.mdwn
git-annex-rmurl.mdwn
git-annex-schedule.mdwn
git-annex-semitrust.mdwn
git-annex-setkey.mdwn
git-annex-setpresentkey.mdwn
git-annex-shell.mdwn
git-annex-smudge.mdwn
git-annex-status.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
git-annex-sync.mdwn annex.jobs=cpus etc 2019-05-10 13:27:08 -04:00
git-annex-test.mdwn
git-annex-testremote.mdwn testremote: Support testing readonly remotes with the --test-readonly option 2019-01-17 12:44:52 -04:00
git-annex-transferkey.mdwn
git-annex-transferkeys.mdwn
git-annex-trust.mdwn
git-annex-unannex.mdwn
git-annex-undo.mdwn
git-annex-ungroup.mdwn
git-annex-uninit.mdwn
git-annex-unlock.mdwn
git-annex-untrust.mdwn
git-annex-unused.mdwn doc clarification 2019-04-09 11:38:11 -04:00
git-annex-upgrade.mdwn
git-annex-vadd.mdwn
git-annex-vcycle.mdwn
git-annex-version.mdwn
git-annex-vfilter.mdwn
git-annex-vicfg.mdwn
git-annex-view.mdwn
git-annex-vpop.mdwn
git-annex-wanted.mdwn
git-annex-watch.mdwn
git-annex-webapp.mdwn
git-annex-whereis.mdwn
git-annex.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
git-remote-tor-annex.mdwn
git-union-merge.mdwn
how_it_works.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
index.mdwn
install.mdwn
internals.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
license.mdwn update 2019-02-08 15:26:15 -04:00
location_tracking.mdwn
logo-old-bw.svg
logo-old.png
logo-old.svg
logo-old_small.png
logo.mdwn
logo.svg
logo_16x16.png
logo_32x32.png
logo_small.png
meta.mdwn
metadata.mdwn
news.mdwn
not.mdwn
polls.mdwn
preferred_content.mdwn
privacy.mdwn
profiling.mdwn rename page 2019-01-14 15:57:04 -04:00
publicrepos.mdwn
related_software.mdwn
repomap.png
required_content.mdwn
scalability.mdwn
security.mdwn link to contact 2019-07-31 16:37:21 -04:00
shortcuts.mdwn
sidebar.mdwn
sitemap.mdwn
special_remotes.mdwn documentation for git-lfs special remote 2019-08-04 13:15:47 -04:00
stickers.mdwn
submodules.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
summary.mdwn
sync.mdwn
testimonials.mdwn
thanks.mdwn
tips.mdwn
todo.mdwn don't list subpages of todos 2019-04-15 13:01:53 -04:00
transferring_data.mdwn
trust.mdwn
tuning.mdwn
upgrades.mdwn Automatically convert direct mode repositories to v7 with adjusted unlocked branches 2019-08-26 15:05:25 -04:00
users.mdwn
videos.mdwn
Void.mdwn
walkthrough.mdwn
workflow.mdwn