chiark / gitweb /
chiark-utils.git
20 months agoprefork-interp: increase check interval quite a bit
Ian Jackson [Thu, 11 Aug 2022 20:40:15 +0000 (21:40 +0100)]
prefork-interp: increase check interval quite a bit

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: fix namespace (NULL was being strange)
Ian Jackson [Thu, 11 Aug 2022 20:28:13 +0000 (21:28 +0100)]
prefork-interp: fix namespace (NULL was being strange)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: fixes and tests
Ian Jackson [Thu, 11 Aug 2022 20:22:23 +0000 (21:22 +0100)]
prefork-interp: fixes and tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: fixes and tests
Ian Jackson [Thu, 11 Aug 2022 19:49:17 +0000 (20:49 +0100)]
prefork-interp: fixes and tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: fixes and tests
Ian Jackson [Thu, 11 Aug 2022 19:36:31 +0000 (20:36 +0100)]
prefork-interp: fixes and tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: fixes and tests
Ian Jackson [Thu, 11 Aug 2022 19:32:49 +0000 (20:32 +0100)]
prefork-interp: fixes and tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: fixes and tests
Ian Jackson [Thu, 11 Aug 2022 19:06:23 +0000 (20:06 +0100)]
prefork-interp: fixes and tests

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: fix non-script-arg case
Ian Jackson [Thu, 11 Aug 2022 18:23:34 +0000 (19:23 +0100)]
prefork-interp: fix non-script-arg case

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip testing
Ian Jackson [Thu, 11 Aug 2022 18:10:17 +0000 (19:10 +0100)]
prefork-interp: wip testing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip testing
Ian Jackson [Thu, 11 Aug 2022 18:09:35 +0000 (19:09 +0100)]
prefork-interp: wip testing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: enable build
Ian Jackson [Sun, 17 Jul 2022 17:23:11 +0000 (18:23 +0100)]
prefork-interp: enable build

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: gitignore
Ian Jackson [Thu, 11 Aug 2022 17:55:34 +0000 (18:55 +0100)]
prefork-interp: gitignore

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: Add missing symbols
Ian Jackson [Thu, 11 Aug 2022 17:53:55 +0000 (18:53 +0100)]
prefork-interp: Add missing symbols

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: Fix an uninitialised variable
Ian Jackson [Thu, 11 Aug 2022 17:53:44 +0000 (18:53 +0100)]
prefork-interp: Fix an uninitialised variable

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip compile
Ian Jackson [Sun, 17 Jul 2022 19:00:34 +0000 (20:00 +0100)]
prefork-interp: wip compile

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip use stdio
Ian Jackson [Sun, 17 Jul 2022 18:34:22 +0000 (19:34 +0100)]
prefork-interp: wip use stdio

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip compile
Ian Jackson [Sun, 17 Jul 2022 17:31:56 +0000 (18:31 +0100)]
prefork-interp: wip compile

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip compile
Ian Jackson [Sun, 17 Jul 2022 17:27:11 +0000 (18:27 +0100)]
prefork-interp: wip compile

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip compile
Ian Jackson [Sun, 17 Jul 2022 17:23:38 +0000 (18:23 +0100)]
prefork-interp: wip compile

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agocommon.h: Add some more decls (useful for prefork-interp)
Ian Jackson [Sun, 17 Jul 2022 17:23:20 +0000 (18:23 +0100)]
common.h: Add some more decls (useful for prefork-interp)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip
Ian Jackson [Sun, 17 Jul 2022 15:42:26 +0000 (16:42 +0100)]
prefork-interp: wip

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip args
Ian Jackson [Sun, 17 Jul 2022 12:31:28 +0000 (13:31 +0100)]
prefork-interp: wip args

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork: Insist on script (separately) with combined options
Ian Jackson [Sun, 17 Jul 2022 12:20:04 +0000 (13:20 +0100)]
prefork: Insist on script (separately) with combined options

cgi-fcgi-interp always insists on this anyway, but prefork-interp
won't and ought to check this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork: Provide PREFORK_CMDINFOS
Ian Jackson [Sun, 17 Jul 2022 12:17:04 +0000 (13:17 +0100)]
prefork: Provide PREFORK_CMDINFOS

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork: Make socket finding etc. stuff static
Ian Jackson [Sun, 17 Jul 2022 12:14:40 +0000 (13:14 +0100)]
prefork: Make socket finding etc. stuff static

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork: Move garbage handling back cgi-fcgi-interp
Ian Jackson [Sun, 17 Jul 2022 12:12:18 +0000 (13:12 +0100)]
prefork: Move garbage handling back cgi-fcgi-interp

prefork-interp wants to do this differently.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork: Allow script not to be set
Ian Jackson [Sun, 17 Jul 2022 12:04:50 +0000 (13:04 +0100)]
prefork: Allow script not to be set

Do the check in cgi-fcgi-interp.  prefork-interp is going to want this
to be optional.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork: Have process_opts not return script, just set a global
Ian Jackson [Sun, 17 Jul 2022 12:03:46 +0000 (13:03 +0100)]
prefork: Have process_opts not return script, just set a global

This is going to be more convenient.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork: Have process_opts update argv and not take argc
Ian Jackson [Sun, 17 Jul 2022 11:51:47 +0000 (12:51 +0100)]
prefork: Have process_opts update argv and not take argc

This will let us do further option processing after process_opts.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork: Remove a wrong check
Ian Jackson [Sun, 17 Jul 2022 11:44:47 +0000 (12:44 +0100)]
prefork: Remove a wrong check

This is just not true at all.  Perhaps it was to check for malloc
failure?  Anyway, split_argv comes from split_argv and shbang_opts
never sets it to zero.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: define what our invocation looks like
Ian Jackson [Sun, 17 Jul 2022 11:38:00 +0000 (12:38 +0100)]
prefork-interp: define what our invocation looks like

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agocgi-fcgi-interp: Write down the usages
Ian Jackson [Sun, 17 Jul 2022 11:35:52 +0000 (12:35 +0100)]
cgi-fcgi-interp: Write down the usages

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork: Move STAGE2_VAR back to cgi-fcgi-interp
Ian Jackson [Sun, 17 Jul 2022 11:34:22 +0000 (12:34 +0100)]
prefork: Move STAGE2_VAR back to cgi-fcgi-interp

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip
Ian Jackson [Sun, 17 Jul 2022 10:17:45 +0000 (11:17 +0100)]
prefork-interp: wip

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agocgi-fcgi-interp: prefork: Make name variable
Ian Jackson [Fri, 15 Jul 2022 21:29:42 +0000 (22:29 +0100)]
cgi-fcgi-interp: prefork: Make name variable

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip
Ian Jackson [Fri, 15 Jul 2022 21:13:29 +0000 (22:13 +0100)]
prefork-interp: wip

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: temporary symlink for testing
Ian Jackson [Thu, 11 Aug 2022 18:04:49 +0000 (19:04 +0100)]
prefork-interp: temporary symlink for testing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip
Ian Jackson [Tue, 12 Jul 2022 19:07:25 +0000 (20:07 +0100)]
prefork-interp: wip

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip
Ian Jackson [Tue, 12 Jul 2022 19:07:20 +0000 (20:07 +0100)]
prefork-interp: wip

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip
Ian Jackson [Sat, 9 Jul 2022 14:00:07 +0000 (15:00 +0100)]
prefork-interp: wip

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork: split off lock_path etc.
Ian Jackson [Sat, 9 Jul 2022 13:59:43 +0000 (14:59 +0100)]
prefork: split off lock_path etc.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip
Ian Jackson [Sat, 9 Jul 2022 13:19:52 +0000 (14:19 +0100)]
prefork-interp: wip

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoprefork-interp: wip
Ian Jackson [Sat, 9 Jul 2022 11:38:25 +0000 (12:38 +0100)]
prefork-interp: wip

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agocprogs: add FILLZERO
Ian Jackson [Sat, 9 Jul 2022 11:38:19 +0000 (12:38 +0100)]
cprogs: add FILLZERO

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoBreak much of cgi-fcgi-interp.c out into prefork.[ch]
Ian Jackson [Sat, 9 Jul 2022 09:54:59 +0000 (10:54 +0100)]
Break much of cgi-fcgi-interp.c out into prefork.[ch]

We are going to want to reuse most of this for prefork-interp.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agocgi-fcgi-interp: Drop a spurious duplicate comment
Ian Jackson [Sat, 9 Jul 2022 09:08:57 +0000 (10:08 +0100)]
cgi-fcgi-interp: Drop a spurious duplicate comment

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
20 months agoMerge remote-tracking branch 'dgit/dgit/sid'
Ian Jackson [Sun, 21 Aug 2022 20:20:39 +0000 (21:20 +0100)]
Merge remote-tracking branch 'dgit/dgit/sid'

Incorporate NMU

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
21 months agoreally: Fix a preprocessor #endif
Ian Jackson [Thu, 11 Aug 2022 17:55:51 +0000 (18:55 +0100)]
really: Fix a preprocessor #endif

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: Fix "insufficiently dense" message
Ian Jackson [Thu, 20 Aug 2020 10:53:56 +0000 (11:53 +0100)]
expire-iso8601: Fix "insufficiently dense" message

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: provide --rename-only
Ian Jackson [Thu, 20 Aug 2020 10:30:29 +0000 (11:30 +0100)]
expire-iso8601: provide --rename-only

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: tidy docs and exit status
Ian Jackson [Thu, 20 Aug 2020 10:23:07 +0000 (11:23 +0100)]
expire-iso8601: tidy docs and exit status

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: clean up old .rm
Ian Jackson [Thu, 20 Aug 2020 00:20:31 +0000 (01:20 +0100)]
expire-iso8601: clean up old .rm

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: break out do_rm and rename to .rm
Ian Jackson [Thu, 20 Aug 2020 00:20:17 +0000 (01:20 +0100)]
expire-iso8601: break out do_rm and rename to .rm

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: add missing $ to filename regexp
Ian Jackson [Thu, 20 Aug 2020 00:13:21 +0000 (01:13 +0100)]
expire-iso8601: add missing $ to filename regexp

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: report and implement oldest first
Ian Jackson [Thu, 20 Aug 2020 00:06:19 +0000 (01:06 +0100)]
expire-iso8601: report and implement oldest first

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: compensate for insufficient density
Ian Jackson [Wed, 19 Aug 2020 23:59:46 +0000 (00:59 +0100)]
expire-iso8601: compensate for insufficient density

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: break out $use->()
Ian Jackson [Wed, 19 Aug 2020 23:58:33 +0000 (00:58 +0100)]
expire-iso8601: break out $use->()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: Set $|=1 to clarify output order
Ian Jackson [Wed, 19 Aug 2020 23:57:31 +0000 (00:57 +0100)]
expire-iso8601: Set $|=1 to clarify output order

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: include #0 too
Ian Jackson [Wed, 19 Aug 2020 23:43:09 +0000 (00:43 +0100)]
expire-iso8601: include #0 too

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoRevert "expire-iso8601: Use date(1)"
Ian Jackson [Wed, 19 Aug 2020 21:49:11 +0000 (22:49 +0100)]
Revert "expire-iso8601: Use date(1)"

It's not faster.

With DateTime::Format::Strptime, whole program runtime on my
test case:
  real    0m1.371s
  user    0m1.254s
  sys     0m0.117s

With date(1):
  real    0m5.408s
  user    0m1.834s
  sys     0m3.683s

This reverts commit 2d3da03e893d0c59e236224f049215fab8e81e8e.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: Use date(1)
Ian Jackson [Wed, 19 Aug 2020 21:47:56 +0000 (22:47 +0100)]
expire-iso8601: Use date(1)

-davenant:~> time perl -e 'use DateTime::Format::Strptime;'

real    0m1.269s
user    0m1.175s
sys     0m0.093s

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: Fix a dependency
Ian Jackson [Wed, 19 Aug 2020 21:40:53 +0000 (22:40 +0100)]
expire-iso8601: Fix a dependency

Actually this is huge so make it Recommends.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-iso8601: Fix a dependency
Ian Jackson [Wed, 19 Aug 2020 21:39:34 +0000 (22:39 +0100)]
expire-iso8601: Fix a dependency

This is just a perl lib so ask for it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agochangelog: document expire-8601 changes
Ian Jackson [Wed, 19 Aug 2020 21:35:48 +0000 (22:35 +0100)]
changelog: document expire-8601 changes

3 years agoexpire-iso8601: Replace with new implementation
Ian Jackson [Wed, 19 Aug 2020 21:32:58 +0000 (22:32 +0100)]
expire-iso8601: Replace with new implementation

This fixes the design problem and is also much more maintainable and
comprehensible.

Closes: #862897
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-8601: new version fixes
Ian Jackson [Wed, 19 Aug 2020 21:27:05 +0000 (22:27 +0100)]
expire-8601: new version fixes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-8601: new version seems good now
Ian Jackson [Wed, 19 Aug 2020 21:18:30 +0000 (22:18 +0100)]
expire-8601: new version seems good now

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-8601: wip new version, err on other side
Ian Jackson [Wed, 19 Aug 2020 20:59:22 +0000 (21:59 +0100)]
expire-8601: wip new version, err on other side

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-8601: wip new version, sort of works, need adj
Ian Jackson [Wed, 19 Aug 2020 20:55:37 +0000 (21:55 +0100)]
expire-8601: wip new version, sort of works, need adj

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-8601: wip new version
Ian Jackson [Wed, 19 Aug 2020 20:53:50 +0000 (21:53 +0100)]
expire-8601: wip new version

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-8601: wip new version
Ian Jackson [Wed, 19 Aug 2020 20:52:52 +0000 (21:52 +0100)]
expire-8601: wip new version

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-8601: wip new version
Ian Jackson [Wed, 19 Aug 2020 20:48:29 +0000 (21:48 +0100)]
expire-8601: wip new version

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-8601: wip new version
Ian Jackson [Wed, 19 Aug 2020 20:40:21 +0000 (21:40 +0100)]
expire-8601: wip new version

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-8601: wip new version
Ian Jackson [Wed, 19 Aug 2020 20:24:43 +0000 (21:24 +0100)]
expire-8601: wip new version

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agoexpire-8601: wip new version
Ian Jackson [Wed, 19 Aug 2020 20:08:05 +0000 (21:08 +0100)]
expire-8601: wip new version

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
3 years agopackaging: bump debhelper compat to 13
Sean Whitton [Tue, 21 Jul 2020 15:18:14 +0000 (08:18 -0700)]
packaging: bump debhelper compat to 13

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
4 years agochangelog: document changes and finalise 6.1.2 archive/debian/6.1.2 debian/6.1.2
Ian Jackson [Wed, 12 Feb 2020 16:10:26 +0000 (16:10 +0000)]
changelog: document changes and finalise 6.1.2

Ready for upload, which will involve wearing also my other hat.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agogit-cache-proxy: Do not update timestamp due to housekeeping gc
Ian Jackson [Tue, 11 Feb 2020 19:31:07 +0000 (19:31 +0000)]
git-cache-proxy: Do not update timestamp due to housekeeping gc

Otherwise gc will always reset the timestamp and nothing will be
cleaned up.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agochangelog: Start ~citrix3~
Ian Jackson [Tue, 11 Feb 2020 19:12:28 +0000 (19:12 +0000)]
changelog: Start ~citrix3~

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agogit-cache-proxy: Tolerate failure to write gc stamp
Ian Jackson [Tue, 11 Feb 2020 19:11:48 +0000 (19:11 +0000)]
git-cache-proxy: Tolerate failure to write gc stamp

This can happen if the directory no longer exists.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agogit-cache-proxy: Recheck gc timestamp after taking lock
Ian Jackson [Tue, 11 Feb 2020 18:56:04 +0000 (18:56 +0000)]
git-cache-proxy: Recheck gc timestamp after taking lock

Otherwise we can repeatedly gc the same thing.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agogit-cache-proxy: gc: Break out $gccheck
Ian Jackson [Tue, 11 Feb 2020 18:53:26 +0000 (18:53 +0000)]
git-cache-proxy: gc: Break out $gccheck

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agochangelog: Document changes and finalise 6.1.2~citrix2~
Ian Jackson [Tue, 11 Feb 2020 18:34:16 +0000 (18:34 +0000)]
changelog: Document changes and finalise 6.1.2~citrix2~

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agogit-cache-proxy: Use open-coded fork/exec for git gc
Ian Jackson [Tue, 11 Feb 2020 18:32:49 +0000 (18:32 +0000)]
git-cache-proxy: Use open-coded fork/exec for git gc

This allows us to handle ENOENT from chdir specially.  We want to
tolerate this, because it can happen if the previous lockholder
cleaned it all up.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agogit-cache-proxy: Abandon fetch attempt if client disconnects
Ian Jackson [Tue, 11 Feb 2020 18:32:38 +0000 (18:32 +0000)]
git-cache-proxy: Abandon fetch attempt if client disconnects

The git client sends the command and then waits for our response.  We
can tell if it has disconnected, because our stdin (the socket) will
be readable.

This is a good idea because otherwise if we have clients with their
own (formal or informal) timeouts, we can build up a backlog of
queued useless fetch attempts.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agogit-cache-proxy: Move $SIG{ALRM} setting to global
Ian Jackson [Tue, 11 Feb 2020 17:32:25 +0000 (17:32 +0000)]
git-cache-proxy: Move $SIG{ALRM} setting to global

This is actually used in multiple places.  It should be set globally.
No overall functional change with the current code.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agochangelog: Start 6.1.2~citrix2~
Ian Jackson [Tue, 11 Feb 2020 17:32:00 +0000 (17:32 +0000)]
changelog: Start 6.1.2~citrix2~

Use 2~ since there was a 1~ floating about on mariner...

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agoMerge remote-tracking branch 'dgit/dgit/sid' archive/debian/6.1.1 debian/6.1.1
Ian Jackson [Tue, 11 Feb 2020 16:40:16 +0000 (16:40 +0000)]
Merge remote-tracking branch 'dgit/dgit/sid'

Signed-off-by: Ian Jackson <ian.jackson@citrix.com>
4 years agochangelog: Bump version to 6.1.1 and finalise
Ian Jackson [Tue, 11 Feb 2020 16:36:08 +0000 (16:36 +0000)]
changelog: Bump version to 6.1.1 and finalise

I found some 6.1.1~citrix1~ on mariner, so go higher than that.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agochangelog: Document Citrix changes
Ian Jackson [Tue, 11 Feb 2020 16:35:30 +0000 (16:35 +0000)]
changelog: Document Citrix changes

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agoMerge remote-tracking branch 'mariner/master'
Ian Jackson [Tue, 11 Feb 2020 16:17:59 +0000 (16:17 +0000)]
Merge remote-tracking branch 'mariner/master'

Signed-off-by: Ian Jackson <ian.jackson@citrix.com>
4 years agogit-cache-proxy: Document some options in the head comment
Ian Jackson [Tue, 11 Feb 2020 15:52:07 +0000 (15:52 +0000)]
git-cache-proxy: Document some options in the head comment

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agogit-cache-proxy: Periodically run `git gc --quiet'
Ian Jackson [Tue, 11 Feb 2020 15:56:42 +0000 (15:56 +0000)]
git-cache-proxy: Periodically run `git gc --quiet'

git has a feature which is supposed to automatically run git gc.

But if your repository accumulates enough loose objects, then this
occurs:

 $ git gc --auto
 Auto packing the repository in background for optimum performance.
 See "git help gc" for manual housekeeping.
 error: The last gc run reported the following. Please correct the root cause
 and remove gc.log.
 Automatic cleanup will not be performed until the file is removed.

 warning: There are too many unreachable loose objects; run 'git prune' to remove them.

Removing $GIT_DIR/gc.log generally simply causes git gc --auto to
print, again, the message:

 warning: There are too many unreachable loose objects; run 'git prune' to remove them.

Ie, a repository can get into a state where it needs gc so badly that
git will not gc it automatically.  This is, of course, mad.  It seems
to have been a misguided attempt at a safety catch.  Unfortunately
there does not even appear to be a configuration knob to set this `too
many' limit to infinity.

Work around this problem by running `git gc --quiet' (every 10 days,
by default).  This is not ideal because it runs even if we haven't
updated the tree, but we would rather do it out of housekeeping rather
than in the middle of fetch/clone.

`git gc' without --auto does not refuse to prune the objects that need
pruning, and fixes the repository.

We leave the gc.auto config option enabled since I think it is largely
harmless, and disabling it would be extra work.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agogit-cache-proxy: Refactor to prepare for 2nd kind of housekeeping
Ian Jackson [Tue, 11 Feb 2020 15:01:49 +0000 (15:01 +0000)]
git-cache-proxy: Refactor to prepare for 2nd kind of housekeeping

Generalise the housekeeping action code.
Introduce new variables $mode_what, $mode_locknb, and $mode_action.
Move the actual cleanup functionality into the $mode_action value.

No overall functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agochangelog: start ~citrix2
Ian Jackson [Tue, 11 Feb 2020 14:31:32 +0000 (14:31 +0000)]
changelog: start ~citrix2

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agochangelog: finalise 6.0.5~citrix1
Ian Jackson [Fri, 20 Dec 2019 17:50:04 +0000 (17:50 +0000)]
changelog: finalise 6.0.5~citrix1

4 years agofishdescriptor: Use Python "errno" module
Ian Jackson [Fri, 20 Dec 2019 17:49:45 +0000 (17:49 +0000)]
fishdescriptor: Use Python "errno" module

Use Python "errno" module, not "os.errno" (which is not in modern
python3 apparently).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agochangelog: Start 6.0.5~citrix1
Ian Jackson [Fri, 20 Dec 2019 17:39:52 +0000 (17:39 +0000)]
changelog: Start 6.0.5~citrix1

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
4 years agogit-branchmove: rewrite in perl archive/debian/6.1.0 debian/6.1.0
Sean Whitton [Sat, 7 Dec 2019 01:19:31 +0000 (18:19 -0700)]
git-branchmove: rewrite in perl

Closes: #914398, #914399
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
4 years agochangelog: finalise 6.0.5~iwj1
Ian Jackson [Mon, 12 Aug 2019 09:59:24 +0000 (10:59 +0100)]
changelog: finalise 6.0.5~iwj1

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>