chiark / gitweb /
chiark-utils.git
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>
4 years agochangelog: Document rc.local change
Ian Jackson [Mon, 12 Aug 2019 09:59:08 +0000 (10:59 +0100)]
changelog: Document rc.local change

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoreally: Default config: Writeability of rc.local suffices, too
Ian Jackson [Mon, 12 Aug 2019 09:53:27 +0000 (10:53 +0100)]
really: Default config: Writeability of rc.local suffices, too

This makes it work on systems not using sysvinit and which therefore
don't have /etc/inittab.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoreally: Support REALLY_CHECK_FILE_2 for checking multiple files
Ian Jackson [Mon, 12 Aug 2019 09:52:28 +0000 (10:52 +0100)]
really: Support REALLY_CHECK_FILE_2 for checking multiple files

Only works if REALLY_CHECK_FILE is defined too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoreally: Invert logic in REALLY_CHECK_FILE checkroot
Ian Jackson [Mon, 12 Aug 2019 09:51:00 +0000 (10:51 +0100)]
really: Invert logic in REALLY_CHECK_FILE checkroot

This will make it possible to check for a 2nd file.

No functional change.

Reviewed-by: Clare Boothby <clareb@chiark.greenend.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agochangelog: start 6.0.5
Ian Jackson [Mon, 12 Aug 2019 09:54:27 +0000 (10:54 +0100)]
changelog: start 6.0.5

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: finalise 6.0.4 archive/debian/6.0.4 debian/6.0.4
Ian Jackson [Fri, 12 Apr 2019 10:48:12 +0000 (11:48 +0100)]
changelog: finalise 6.0.4

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: Document bug number for bugfix in 6.0.4~citrix1.
Ian Jackson [Thu, 11 Apr 2019 17:07:42 +0000 (18:07 +0100)]
changelog: Document bug number for bugfix in 6.0.4~citrix1.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agosync-accounts: Fix perl syntax error. Closes:#865985.
Mark Wooding [Thu, 11 Apr 2019 17:05:40 +0000 (18:05 +0100)]
sync-accounts: Fix perl syntax error.  Closes:#865985.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: document fishdescriptor errno fix
Ian Jackson [Mon, 8 Apr 2019 16:04:20 +0000 (17:04 +0100)]
changelog: document fishdescriptor errno fix

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agofishdescriptor: cast __errno_location correctly
Ian Jackson [Mon, 8 Apr 2019 15:46:04 +0000 (16:46 +0100)]
fishdescriptor: cast __errno_location correctly

The return value from __errno_location() is an int*.  My syntax had
erroneously specified that it returned an int.  Nothing spotted this
bug because the expression is evaluated by gdb whose C interpreter is
very strange.  In particular, gdb lets you dereference an int, even on
a platform where ints are 32-bit and pointers are 64-bit.

If you are on a 32-bit platform, this does not matter.  Likewise if
you are on a 64-bit platform and the address of errno happens, by
luck, to be within the 32-bit addressable part of the space.

If you are mildly lucky the result of this is an error like this:
  gdb.MemoryError: Cannot access memory at address 0x2f24ef10
buried in stack traces from fishdescriptor.

If you are unlucky, fishdescriptor will successfully access some wrong
location.  This means it does not actually save and restore errno,
since it saves and restores somewhere else instead.  So fishdescriptor
will corrupt the errno value of the thread that it happens to
be (ab)using, overwriting it with the errno from fishdescriptor's own
calls, possibly causing the target program to become confused about
the error(s) from system call(s) it is making.

If you are very unlucky, fishdescriptor will successfully access some
wrong location which is actively in use by something outside the
target process (eg, direct IO, shared memory0.  fishdescriptor will
save the value (a single int) and then restore it a bit later.  This
might in principle cause any kind of arbitrary lossage.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agochangelog: finalise 6.0.3 archive/debian/6.0.3 debian/6.0.3
Ian Jackson [Tue, 20 Nov 2018 18:25:59 +0000 (18:25 +0000)]
changelog: finalise 6.0.3

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
5 years agochangelog: make 6.0.3~citrix1 entry
Ian Jackson [Mon, 19 Nov 2018 16:11:59 +0000 (16:11 +0000)]
changelog: make 6.0.3~citrix1 entry

gbp dch, and edited details, version and trailer line

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agofishdescriptor: When looking for run_dir, look in target root
Ian Jackson [Tue, 20 Nov 2018 11:31:22 +0000 (11:31 +0000)]
fishdescriptor: When looking for run_dir, look in target root

This is correct, since we are operating in our environment but we are
going to use the path in the target's root.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agofishdescriptor: Calculate target_root earlier and pass to _sock_dir
Ian Jackson [Tue, 20 Nov 2018 11:30:33 +0000 (11:30 +0000)]
fishdescriptor: Calculate target_root earlier and pass to _sock_dir

No functional change.

We are going to use this in a moment.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agofishdescriptor: Cope if donor is in a chroot without /proc
Ian Jackson [Mon, 19 Nov 2018 16:08:57 +0000 (16:08 +0000)]
fishdescriptor: Cope if donor is in a chroot without /proc

`our_sockname' contains something like
  /proc/DONOR/root/run/user/UID/fishdescriptor/SOCKET

When I tested this I did it in a chroot where /proc was mounted.  In
such a chroot /proc/DONOR/root -> /.  So this works.

But if there is no /proc, it does not work.

Instead, we can can and should assume that the path in the donor is
relative to its own root.  Ie, we can just use `sockname'.

CC: George Dunlap <george.dunlap@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agogit-branchmove: Avoid transporting tags about
Ian Jackson [Thu, 8 Nov 2018 15:42:24 +0000 (15:42 +0000)]
git-branchmove: Avoid transporting tags about

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
5 years agochangelog: Prep for Rebuild with arch:all packages included in the upload. archive/debian/6.0.2 debian/6.0.2
Ian Jackson [Mon, 11 Jun 2018 13:35:22 +0000 (14:35 +0100)]
changelog: Prep for Rebuild with arch:all packages included in the upload.

5 years agochangelog: finalise 6.0.1 archive/debian/6.0.1 debian/6.0.1
Ian Jackson [Mon, 11 Jun 2018 13:31:51 +0000 (14:31 +0100)]
changelog: finalise 6.0.1

5 years agochangelog: discuss fishdescriptor bugs
Ian Jackson [Thu, 7 Jun 2018 16:59:11 +0000 (17:59 +0100)]
changelog: discuss fishdescriptor bugs

5 years agofishdescriptor: Actually tidy up actual2intended when closing
Ian Jackson [Thu, 7 Jun 2018 16:43:42 +0000 (17:43 +0100)]
fishdescriptor: Actually tidy up actual2intended when closing

Otherwise we will probably try to move the new-defunct open-file
somewhere when we try to make the descriptor refer to the intended
open-file.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
5 years agofishdescriptor: Work if child is not running as root, but we are
Ian Jackson [Thu, 7 Jun 2018 16:33:34 +0000 (17:33 +0100)]
fishdescriptor: Work if child is not running as root, but we are

We make a socket, normally in /var/run/user for the victim process,
which is therefore accessible only to the victim uid (and to root).
If we are running as root, the socket will typically not be writeable
by the user, and this will fail.  We need to chmod it.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
5 years agofishdescriptor: Fix a tuple bug in fd permutation
Ian Jackson [Fri, 11 May 2018 15:59:05 +0000 (16:59 +0100)]
fishdescriptor: Fix a tuple bug in fd permutation

The fd permutation algorithm would fail in nontrivial cases because it
tries to update individual members of the tupes in the fdmap.  That is
not permitted in Python.  Make the tuples into lists.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
5 years agofishdescriptor: Fix a typo
Ian Jackson [Fri, 11 May 2018 15:55:19 +0000 (16:55 +0100)]
fishdescriptor: Fix a typo

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
5 years agostart 6.0.1~
Ian Jackson [Fri, 11 May 2018 15:54:24 +0000 (16:54 +0100)]
start 6.0.1~

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
6 years agofinalise 6.0.0 archive/debian/6.0.0 debian/6.0.0
Ian Jackson [Fri, 20 Apr 2018 15:56:20 +0000 (16:56 +0100)]
finalise 6.0.0

Bumping version to 6 because of fishdescriptor

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
6 years agoMerge remote-tracking branch 'mariner/fishdescriptor'
Ian Jackson [Fri, 20 Apr 2018 15:55:14 +0000 (16:55 +0100)]
Merge remote-tracking branch 'mariner/fishdescriptor'

6 years agofishdescriptor: Re-finalise changelog
Ian Jackson [Fri, 20 Apr 2018 15:47:04 +0000 (16:47 +0100)]
fishdescriptor: Re-finalise changelog

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: Provide copyright notices and licence statements
Ian Jackson [Fri, 20 Apr 2018 15:46:45 +0000 (16:46 +0100)]
fishdescriptor: Provide copyright notices and licence statements

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: Minor control file improvement
Ian Jackson [Fri, 20 Apr 2018 15:43:05 +0000 (16:43 +0100)]
fishdescriptor: Minor control file improvement

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: Fix typo in help message
Ian Jackson [Fri, 20 Apr 2018 15:42:31 +0000 (16:42 +0100)]
fishdescriptor: Fix typo in help message

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoxbatmon-simple: Minor improvements to the .txt doc.
Ian Jackson [Sun, 18 Feb 2018 22:05:01 +0000 (22:05 +0000)]
xbatmon-simple: Minor improvements to the .txt doc.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
6 years agofishdescriptor: build system (nugatory)
Ian Jackson [Tue, 24 Oct 2017 18:17:56 +0000 (19:17 +0100)]
fishdescriptor: build system (nugatory)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoRevert "fishdescriptor: for revert: attempt at setuptools"
Ian Jackson [Tue, 24 Oct 2017 17:52:20 +0000 (18:52 +0100)]
Revert "fishdescriptor: for revert: attempt at setuptools"

This reverts commit 15b1fbea6eaf22d148764b352f2d86b5fc7efb1c.

6 years agofishdescriptor: for revert: attempt at setuptools
Ian Jackson [Tue, 24 Oct 2017 17:52:18 +0000 (18:52 +0100)]
fishdescriptor: for revert: attempt at setuptools

This is too hard.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: mention in changelog
Ian Jackson [Tue, 24 Oct 2017 16:57:50 +0000 (17:57 +0100)]
fishdescriptor: mention in changelog

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: fix error handling
Ian Jackson [Tue, 24 Oct 2017 16:56:39 +0000 (17:56 +0100)]
fishdescriptor: fix error handling

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: sort out debugging output
Ian Jackson [Tue, 24 Oct 2017 16:44:11 +0000 (17:44 +0100)]
fishdescriptor: sort out debugging output

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: bugfixes
Ian Jackson [Tue, 24 Oct 2017 16:23:32 +0000 (17:23 +0100)]
fishdescriptor: bugfixes

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: bugfixes
Ian Jackson [Tue, 24 Oct 2017 16:22:15 +0000 (17:22 +0100)]
fishdescriptor: bugfixes

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: hideous errno workaround
Ian Jackson [Tue, 24 Oct 2017 16:19:27 +0000 (17:19 +0100)]
fishdescriptor: hideous errno workaround

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoRevert "fishdescriptor: try parse_eval_via_print"
Ian Jackson [Tue, 24 Oct 2017 16:00:50 +0000 (17:00 +0100)]
Revert "fishdescriptor: try parse_eval_via_print"

This reverts commit 33545a21597767a50443a717b015fc9e3c8dd553.

6 years agofishdescriptor: try parse_eval_via_print
Ian Jackson [Tue, 24 Oct 2017 16:00:44 +0000 (17:00 +0100)]
fishdescriptor: try parse_eval_via_print

Actually this works for reading errno but not for setting it.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: wip utility, bugfixes
Ian Jackson [Tue, 24 Oct 2017 15:38:40 +0000 (16:38 +0100)]
fishdescriptor: wip utility, bugfixes

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: wip utility, bugfixes
Ian Jackson [Tue, 24 Oct 2017 15:28:48 +0000 (16:28 +0100)]
fishdescriptor: wip utility, bugfixes

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: wip utility
Ian Jackson [Tue, 24 Oct 2017 15:14:41 +0000 (16:14 +0100)]
fishdescriptor: wip utility

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: wip utility, before rename various variables
Ian Jackson [Tue, 24 Oct 2017 14:22:58 +0000 (15:22 +0100)]
fishdescriptor: wip utility, before rename various variables

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: wip utility
Ian Jackson [Mon, 23 Oct 2017 16:38:56 +0000 (17:38 +0100)]
fishdescriptor: wip utility

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: Make Donor.pid a public member
Ian Jackson [Mon, 23 Oct 2017 16:38:42 +0000 (17:38 +0100)]
fishdescriptor: Make Donor.pid a public member

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: before redo option parsing
Ian Jackson [Thu, 19 Oct 2017 18:59:50 +0000 (19:59 +0100)]
fishdescriptor: before redo option parsing

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: use lookup_type for the field list
Ian Jackson [Thu, 19 Oct 2017 00:52:56 +0000 (01:52 +0100)]
fishdescriptor: use lookup_type for the field list

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agofishdescriptor: bugfix
Ian Jackson [Thu, 19 Oct 2017 00:34:38 +0000 (01:34 +0100)]
fishdescriptor: bugfix

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agofishdescriptor: bugfixes, seems to get fds now!
Ian Jackson [Thu, 19 Oct 2017 00:32:56 +0000 (01:32 +0100)]
fishdescriptor: bugfixes, seems to get fds now!

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agofishdescriptor: bugfixes
Ian Jackson [Thu, 19 Oct 2017 00:23:18 +0000 (01:23 +0100)]
fishdescriptor: bugfixes

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agofishdescriptor: bugfixes
Ian Jackson [Wed, 18 Oct 2017 23:49:38 +0000 (00:49 +0100)]
fishdescriptor: bugfixes

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
6 years agofishdescriptor: debugging
Ian Jackson [Wed, 18 Oct 2017 17:25:57 +0000 (18:25 +0100)]
fishdescriptor: debugging

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: debugging
Ian Jackson [Wed, 18 Oct 2017 15:58:55 +0000 (16:58 +0100)]
fishdescriptor: debugging

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: new approach
Ian Jackson [Wed, 18 Oct 2017 15:49:45 +0000 (16:49 +0100)]
fishdescriptor: new approach

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: wip reconsider approach
Ian Jackson [Wed, 18 Oct 2017 14:18:36 +0000 (15:18 +0100)]
fishdescriptor: wip reconsider approach

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: wip, before reconsider approach
Ian Jackson [Wed, 18 Oct 2017 09:58:36 +0000 (10:58 +0100)]
fishdescriptor: wip, before reconsider approach

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: wip (found)
Ian Jackson [Tue, 17 Oct 2017 17:11:29 +0000 (18:11 +0100)]
fishdescriptor: wip (found)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: reorg python libraries again
Ian Jackson [Fri, 13 Oct 2017 15:44:05 +0000 (16:44 +0100)]
fishdescriptor: reorg python libraries again

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: WIP fishing module, before move to own module
Ian Jackson [Fri, 13 Oct 2017 15:09:54 +0000 (16:09 +0100)]
fishdescriptor: WIP fishing module, before move to own module

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: Allow "preloaded"
Ian Jackson [Fri, 6 Oct 2017 18:12:30 +0000 (19:12 +0100)]
fishdescriptor: Allow "preloaded"

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: Use os or dl for RTLD_now
Ian Jackson [Fri, 6 Oct 2017 18:11:13 +0000 (19:11 +0100)]
fishdescriptor: Use os or dl for RTLD_now

Suggestion by Colin Watson.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agoRevert "fishdescriptor: Utility for RTLD_NOW"
Ian Jackson [Fri, 6 Oct 2017 18:05:15 +0000 (19:05 +0100)]
Revert "fishdescriptor: Utility for RTLD_NOW"

This reverts commit 22677ae542431ce09a8de83fecc3a22163a8d490.

6 years agofishdescriptor: Utility for RTLD_NOW
Ian Jackson [Fri, 6 Oct 2017 18:04:03 +0000 (19:04 +0100)]
fishdescriptor: Utility for RTLD_NOW

Actually we don't want to do this.  It is better to use the python dl
or os modules, so we will do that in a moment.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: work on python code
Ian Jackson [Fri, 6 Oct 2017 18:03:25 +0000 (19:03 +0100)]
fishdescriptor: work on python code

Still very incomplete

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: .so can be loaded
Ian Jackson [Thu, 5 Oct 2017 17:06:23 +0000 (18:06 +0100)]
fishdescriptor: .so can be loaded

(gdb) print (void*)dlopen("/u/iwj/things/chiark-utils.git/fishdescriptor/libfishdescriptor-donate.so.1.0",2)
$5 = (void *) 0x8f0d408
(gdb) print (void*)dlsym($5, "fishdescriptor_donate")
$6 = (void *) 0xf6953620 <fishdescriptor_donate>
(gdb) print (( int (*)(const char *, const int *) )$6)("/dev/enoent", (int[2]){0,-1})
$7 = 2
(gdb) print strerror(2)
$8 = 0xf74697e8 "No such file or directory"
(gdb)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: donate: some bugfixes
Ian Jackson [Thu, 5 Oct 2017 16:21:11 +0000 (17:21 +0100)]
fishdescriptor: donate: some bugfixes

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: More work, before trying to compile it
Ian Jackson [Thu, 5 Oct 2017 16:10:00 +0000 (17:10 +0100)]
fishdescriptor: More work, before trying to compile it

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: reorganise to my taste
Ian Jackson [Thu, 5 Oct 2017 15:25:41 +0000 (16:25 +0100)]
fishdescriptor: reorganise to my taste

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: Upgrade licence of code from libxl
Ian Jackson [Wed, 4 Oct 2017 13:48:13 +0000 (14:48 +0100)]
fishdescriptor: Upgrade licence of code from libxl

See LGPL-2.1 s3.  This is necessary to preserve the copyright and
licence status of chiark-utils as a whole.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agofishdescriptor: Copy fd passing C sender code from libxl
Ian Jackson [Wed, 4 Oct 2017 13:38:56 +0000 (14:38 +0100)]
fishdescriptor: Copy fd passing C sender code from libxl

Copy int libxl__sendmsg_fds from libxl so we can clone and hack it.

Source was:
 xen.git#38ab259f559be5457f6866ba24185e013f27defb
 tools/libxl/libxl_utils.c

libxl is LGPL2.1-only.  We will upgrade this licence to be compatible
with the rest of chiark utils (GPL3+) in a moment.  This is permitted
by LGPL-2.1 section 3.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agochangelog: start ~iwj again
Ian Jackson [Mon, 8 May 2017 16:26:49 +0000 (17:26 +0100)]
changelog: start ~iwj again

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
6 years agochangelog: finalise 5.0.3~citrix2
Ian Jackson [Mon, 8 May 2017 16:22:04 +0000 (17:22 +0100)]
changelog: finalise 5.0.3~citrix2

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
6 years agogit-cache-proxy: Radically increase several timeouts.
Ian Jackson [Mon, 8 May 2017 16:21:12 +0000 (17:21 +0100)]
git-cache-proxy: Radically increase several timeouts.

Experience in the Xen Project Massachusetts test lab shows that these
are too low.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>