Commit graph

527 commits

Author SHA1 Message Date
Joey Hess
14f7a386f0
Make git-annex enable-tor work when using the linux standalone build
Clean the standalone environment before running the su command
to run "sh". Otherwise, PATH leaked through, causing it to run
git-annex.linux/bin/sh, but GIT_ANNEX_DIR was not set,
which caused that script to not work:

[2022-10-26 15:07:02.145466106] (Utility.Process) process [938146] call: pkexec ["sh","-c","cd '/home/joey/tmp/git-annex.linux/r' && '/home/joey/tmp/git-annex.linux/git-annex' 'enable-tor' '1000'"]
/home/joey/tmp/git-annex.linux/bin/sh: 4: exec: /exe/sh: not found

Changed programPath to not use GIT_ANNEX_PROGRAMPATH,
but instead run the scripts at the top of GIT_ANNEX_DIR.
That works both when the standalone environment is set up, and when it's
not.

Sponsored-by: Kevin Mueller on Patreon
2022-10-26 15:45:08 -04:00
Joey Hess
ba7ecbc6a9
avoid flushing keys db queue after each Annex action
The flush was only done Annex.run' to make sure that the queue was flushed
before git-annex exits. But, doing it there means that as soon as one
change gets queued, it gets flushed soon after, which contributes to
excessive writes to the database, slowing git-annex down.
(This does not yet speed git-annex up, but it is a stepping stone to
doing so.)

Database queues do not autoflush when garbage collected, so have to
be flushed explicitly. I don't think it's possible to make them
autoflush (except perhaps if git-annex sqitched to using ResourceT..).
The comment in Database.Keys.closeDb used to be accurate, since the
automatic flushing did mean that all writes reached the database even
when closeDb was not called. But now, closeDb or flushDb needs to be
called before stopping using an Annex state. So, removed that comment.

In Remote.Git, change to using quiesce everywhere that it used to use
stopCoProcesses. This means that uses on onLocal in there are just as
slow as before. I considered only calling closeDb on the local git remotes
when git-annex exits. But, the reason that Remote.Git calls stopCoProcesses
in each onLocal is so as not to leave git processes running that have files
open on the remote repo, when it's on removable media. So, it seemed to make
sense to also closeDb after each one, since sqlite may also keep files
open. Although that has not seemed to cause problems with removable
media so far. It was also just easier to quiesce in each onLocal than
once at the end. This does likely leave performance on the floor, so
could be revisited.

In Annex.Content.saveState, there was no reason to close the db,
flushing it is enough.

The rest of the changes are from auditing for Annex.new, and making
sure that quiesce is called, after any action that might possibly need
it.

After that audit, I'm pretty sure that the change to Annex.run' is
safe. The only concern might be that this does let more changes get
queued for write to the db, and if git-annex is interrupted, those will be
lost. But interrupting git-annex can obviously already prevent it from
writing the most recent change to the db, so it must recover from such
lost data... right?

Sponsored-by: Dartmouth College's Datalad project
2022-10-12 14:12:23 -04:00
Joey Hess
ff0490c7c6
fix build 2022-09-05 13:20:23 -04:00
Joey Hess
a93163d6f7
optimise linker in linux standalone tarballs
Trick the linker into not doing unncessary work searching for optimised
libraries that are not present, by symlinking the directories where
optimised libs would be to the main lib dir.

This reduces the ENOENT of git-annex init by about 1/2. The linker always
finds the files where it looks first time now. I have not looked at what
the wall clock speedup might be, it's probably rather small.

If a x86-64-v5 comes to be, the list will need to be extended. And there
may be other directories used on some machines that I have missed. Not done
for arm64 yet, or any uncommon architectures.

Sponsored-by: Dartmouth College's Datalad project
2022-08-30 15:20:04 -04:00
Joey Hess
a6ff335f0b
fix build 2022-07-25 14:10:30 -04:00
Joey Hess
77048906a4
assume @RPATH libs are present
Previous change caused them to be skipped. Probably when @RPATH is
included in the path, it's a path to a file that actually exists.

Sponsored-by: Dartmouth College's Datalad project
2022-01-03 15:05:15 -04:00
Joey Hess
abeb7dcdde
skip OSX libraries that do not exist in disk due to new cache
Addresses the build problem discussed here:
https://github.com/datalad/git-annex/issues/95

Sponsored-by: Dartmouth College's Datalad project
2022-01-03 13:19:33 -04:00
Joey Hess
5c105a8540
test borg special remote
Sponsored-by: Boyd Stephen Smith Jr. on Patreon
2021-09-03 13:18:07 -04:00
Joey Hess
35bbf4514c
fix build 2021-09-03 12:36:42 -04:00
Joey Hess
e17342b2a0
Run cp -a with --no-preserve=xattr, to avoid problems with copied xattrs
Including them breaking permissions setting on some NFS servers.

Sponsored-by: Dartmouth College's Datalad project
2021-08-27 13:09:34 -04:00
Joey Hess
5990942b6c
don't use changelog version in commit message
changelog may have a new unreleased version open already
2021-08-09 12:31:48 -04:00
Joey Hess
122f166f2a
update for OSX catalina build 2021-07-14 12:22:34 -04:00
Joey Hess
898a677bce
fix build on windows
Sponsored-by: Dartmouth College's Datalad project
2021-07-01 12:52:33 -04:00
Joey Hess
9cb5ed2446
avoid using cp --reflink=auto on windows
Sponsored-by: Dartmouth College's Datalad project
2021-06-28 12:51:40 -04:00
Joey Hess
a942ed4bb9
Windows: Correct the path to the html help file for 64 bit build. 2021-02-24 13:19:42 -04:00
Joey Hess
f36a0c1b13
deal with cabal unpack not preserving execute bit 2021-02-08 14:32:24 -04:00
Joey Hess
1b63132ca3
add searchPathContents
And rename related functions for consistency.
2021-02-02 19:06:15 -04:00
Joey Hess
fe4725d66e
switch to createrepo_c
createrepo used python2 and got removed from debian
2020-12-25 16:32:03 -04:00
Joey Hess
72ec7da41b
OSXMkLibs: skip @loader_path
This may or may not make the OSX build work on a newer version of OSX
than the one that's currently being used for release builds. I have not
been able to find good docs about how exactly to get back from such a
value to the actual path to the library that the linker would use.
2020-12-15 12:47:24 -04:00
Joey Hess
fac5ccb2e2
add USE_SYSTEM_LIBS=1 for osxapp build 2020-12-14 15:34:27 -04:00
Joey Hess
1a1d671dd2
fix build 2020-11-27 13:02:43 -04:00
Joey Hess
21ab496f6b
fix build 2020-11-16 09:56:03 -04:00
Joey Hess
dd52d8ebdc
update after RawFilePath transition 2020-11-09 12:12:25 -04:00
Joey Hess
e505c03bcc
more RawFilePath conversion
nukeFile replaced with removeWhenExistsWith removeLink, which allows
using RawFilePath. Utility.Directory cannot use RawFilePath since setup
does not depend on posix.

This commit was sponsored by Graham Spencer on Patreon.
2020-10-29 10:50:29 -04:00
Joey Hess
d6e94a6b2e
got configure working after Utility.Path ByteString conversion
Had to split out some modules because getWorkingDirectory needs unix,
which is not a build-dep of configure.

This commit was sponsored by Brock Spratlen on Patreon.
2020-10-28 15:01:19 -04:00
Joey Hess
e85be1f4fe
fix build and add build example 2020-10-26 13:45:38 -04:00
Joey Hess
3baef37caf
make windows installer builder include libmagic files when present, but skip otherwise 2020-10-26 13:42:43 -04:00
Joey Hess
a7d11aa3ab
include libmagic in windows installer
This is from https://raw.githubusercontent.com/datalad/datalad-extensions/master/resources/git-annex-magicBundle.patch
which was written by John Thorvald Wodder II.

I have converted line endings from windows, and fixed indentation to use
tabs.
2020-10-26 13:24:37 -04:00
Joey Hess
ae325018eb
fix build failure on i386-ancient
Standalone: tmp/git-annex.linux/usr/lib/i386-linux-gnu/i686: renameFile: inappropriate type (is a directory)
2020-08-10 16:49:09 -04:00
Joey Hess
6cb08876f0
make /usr/lib consolidation more robust
Directory enumeration could happen in either order, and also there could
be some other directories so the two to combine are not adjacent.
2020-08-10 12:20:32 -04:00
Joey Hess
5feaef773d
squelch build warnings on osx 2020-08-07 13:49:56 -04:00
Joey Hess
db45fb7048
osx build fix 2020-08-07 13:30:11 -04:00
Joey Hess
24e5bca2e0
osx build fix 2020-08-07 13:15:36 -04:00
Joey Hess
1c13745112
osx build fix 2020-08-07 12:59:47 -04:00
Joey Hess
93d0abaaa6
osx build fix 2020-08-07 12:39:59 -04:00
Joey Hess
b2eaca27a7
fix osx build 2020-08-07 12:14:02 -04:00
Joey Hess
8bfa7990b5
make symlinks not hardlinks
hardlinks happened to work because it was a hard link to a symlink, but
it would have failed if eg git-annex-shell symlink did not exist,
perhaps because the Makefile was not run to build it. Or something like
that. Also, it seems like it worked by accident and the Makefile used to
ln -s.
2020-08-05 11:58:22 -04:00
Joey Hess
ec4e742066
create missing directory 2020-08-05 11:37:03 -04:00
Joey Hess
bdfe6f7420
fix build in clean tree
removeDirectoryRecursive fails if the directory DNE.
2020-08-03 19:43:21 -04:00
Joey Hess
88e5ebcda7
runshell LD_HWCAP_MASK=0 optimisation 2020-08-03 14:34:15 -04:00
Joey Hess
e62817c00d
move standalone building code out of Makefile and into Build.Standalone
This includes making Build.Standalone run LinuxMkLibs or OSXMkLibs
rather than doing that separately. Which is groundwork for a later
optimisation.

Also it simplified the code some.
2020-08-03 14:15:03 -04:00
Joey Hess
c4ec52b9ae
Slightly sped up the linux standalone bundle
Reduce the number of directories listed in libdirs, which makes the linker
check a lot less dead ends looking for directories.

Eliminated some directories that didn't really contain shared libraries,
or only contained the linker.

That left only 2, one in lib and one in usr/lib, so consolidate those two.

Doing it this way, rather than just consolidating all libs that might exist
into a single directory means that, if there are optimised versions of some
libs, eg in lib/subarch/foo.so, and lib/subarch2/foo.so, they don't get
moved around in a way that would make the linker pick the wrong one.
2020-07-31 14:42:03 -04:00
Joey Hess
7a42a47902
renaming 2020-07-10 14:17:35 -04:00
Joey Hess
4489756e4e
fix build 2020-05-01 19:05:35 -04:00
Joey Hess
f83ead0240
fix cleanup of old rpms 2020-03-30 15:17:25 -04:00
Joey Hess
fcdd6d0c53
sync with archive.org always 2020-03-30 15:13:16 -04:00
Joey Hess
2f76717cfa
automate uploading released tarballs to archive.org 2020-03-04 12:35:20 -04:00
Joey Hess
85fc83eaf4
force move
Move will fail if the file is already on website and was re-downloaded
to generate rpms with, so force makes sure it moves.
2019-12-31 18:09:17 -04:00
Joey Hess
fa55a83206
update for RawFilePath changes 2019-12-31 18:01:53 -04:00
Joey Hess
9b29f0f5a3
more build fix 2019-12-18 14:37:59 -04:00