Commit graph

702 commits

Author SHA1 Message Date
Joey Hess
f316b7f105
Revert "Removed the vendored git-lfs and the GitLfs build flag"
This reverts commit efda811404.

Turns out that datalad is building git-annex against debian bullseye.
https://github.com/datalad/git-annex/issues/149
2023-01-04 17:33:29 -04:00
Joey Hess
efda811404
Removed the vendored git-lfs and the GitLfs build flag
AFAICS all git-annex builds are using the git-lfs library not the vendored
copy.

Debian stable does have a too old haskell-git-lfs package to be able to
build git-annex from source, but there is not currently a backport of a
recent git-annex to Debian stable. And if they update the backport at some
point, they should be able to backport the library too.

Sponsored-by: Svenne Krap on Patreon
2022-12-26 12:49:53 -04:00
Joey Hess
80e1bf5f40
revert change to use aws 0.23 in stack.yaml files
broke the build
2022-11-09 13:53:24 -04:00
Joey Hess
e100993935
complete support for S3 signature=anonymous
aws-0.23 has been released.

When built with an older aws, initremote will error out when run
with signature=anonymous. And when a remote has been initialized with
that by a version of git-annex that does support it, older versions will
fail when the remote is accessed, with a useful error message.

Sponsored-by: Dartmouth College's DANDI project
2022-11-04 16:20:28 -04:00
Joey Hess
78440ca37d
move assistant and webapp build-depends into main build-depends
For some reason, cabal 3.4.1.0 builds w/o the assistant and webapp,
even when the flag is explicitly turned on. Moving the build-depends from
inside the if flag section to the main build-depends somehow fixes this.

Since the webapp build deps are thus always available, there is no reason
not to build the webapp when building the assistant. So, got rid of the
webapp build flag. Kept the assistant build flag for now, since building
without it does at least still speed up the build.

Sponsored-by: Brock Spratlen on Patreon
2022-08-29 15:23:49 -04:00
Joey Hess
a460aa8b70
Removed the NetworkBSD build flag
Debian stable and the i386ancient build both have a new enough network
to not need this flag any longer.

Sponsored-by: Svenne Krap on Patreon
2022-03-22 11:52:52 -04:00
Joey Hess
982eb7ed0d
remove vendored http-client-restricted
Removed vendored copy of http-client-restricted, and removed the
HttpClientRestricted build flag that avoided that dependency.

http-client-restricted is in Debian stable, and the i386ancient build also
uses it, so I think this vendored copy is no longer needed.

Sponsored-by: Noam Kremen on Patreon
2022-03-22 11:50:06 -04:00
Joey Hess
c0185f0848
bump i386ancient deps to allow using http-client-restricted and git-lfs
This should let i386ancient limp along for a few years more, beyond the
removal of those vendored deps from git-annex.

Also networkbsd is set now, so probably the last thing to unset that
flag is gone, and the flag could be removed soon.

Sponsored-by: Jarkko Kniivilä on Patreon
2022-03-22 11:36:48 -04:00
Joey Hess
8bbd683f31
relax enough i386ancient deps to allow new tasty
The new ansi-terminal was needed for test concurrency, and the new
concurrent-output fixes several bugs. And it turns out this is all
that's needed to use the new tasty.

Sponsored-by: Kevin Mueller on Patreon
2022-03-22 10:59:22 -04:00
Joey Hess
a33f1a0815
re-relax tasty dependency version for i386ancient build
Dependency issues were looking difficult to support tasty-1.2 with that
build. Not using `after` only affects rerunning and limiting tests,
since tasty's concurrency is not used, so this build will just not
support that.

We are probably nearing end of life on this build; it also doesn't
support git-lfs or http-client-restricted. The 2.6.32 kernel it supports
is at this point 13 years old, and stopped being supported by linux LTS
developers 10 years ago. It was supported by RHEL 6.10 through November
2020. At this point, no new hardware should be shipping with this
kernel, but that probably does not stop certian embedded vendors from
shipping it. And there is certainly some hardware still using it. But
the returns from supporting it are diminishing, and the quality of the
build for it is also diminishing.

Sponsored-by: Nicholas Golder-Manning on Patreon
2022-03-22 10:31:10 -04:00
Joey Hess
6971ee8c41
bump ansi-terminal for tastyversion bump 2022-03-22 10:18:17 -04:00
Joey Hess
8f6b52b770
update tasty version to new minimum 2022-03-21 16:08:36 -04:00
Joey Hess
d9fbbb2346
remove osx stack.yaml
The OSX autobuilder is now using github CI, and can use a current
version of ghc, rather than the old one.

Sponsored-by: Dartmouth College's Datalad project
2021-10-18 13:15:47 -04:00
Joey Hess
51e14ca16c
pin aws to revision 0
revision 1 seems to have introduced a build failure

Sponsored-by: Dartmouth College's Datalad project
2021-10-18 11:57:02 -04:00
Joey Hess
487f7f979e
bump filepath-bytestring dep 2020-11-11 11:49:19 -04:00
Joey Hess
f3070d2d7d
Windows build changed to one done by the datalad-extensions project using Github actions
This is a cleaner build than on Jenkins because the whole environment setup
is handled by the CI config, at least up to the point of "get a random bag
of Windows bytes".

Also, the Jenkins autobuilder has been intermittently failing for a long
time, not due to any problem with git-annex but just a failure to clean up
directories.

Also, this build runs the test suite, and it is (mostly) passing. Test
suite always failed in the jenkins environment.

Also, this build includes libmagic.

Here is the build workflow used by github actions:
https://github.com/datalad/datalad-extensions/blob/master/.github/workflows/build-git-annex-windows.yaml
The libmagic build has its own workflow:
https://github.com/datalad/file-windows/blob/master/.github/workflows/build.yml

(Also cleaned up some windows build cruft I don't use anymore.)

There is no build-version file to link to. I've opened a todo requesting
one: https://github.com/datalad/datalad-extensions/issues/55
2020-10-26 13:17:23 -04:00
Joey Hess
0736383e98
Fix bug that prevented linux standalone bundle from working on a fresh install
Bug was introduced in version 8.20201007, lost a necessary mkdir.

This commit was sponsored by Noam Kremen on Patreon.
2020-10-23 12:19:40 -04:00
Joey Hess
db7fb5b8cf
avoid depending on cmp
If it was not available, the caches would get deleted unncessarily.
This should be just as fast as using it.
2020-10-06 11:27:05 -04:00
Joey Hess
d479a885de
move cache cleanup back to before cache creation
It was moved to avoid a race, but that's now avoided in another way.
I prefer having it here, because this way if it somehow fails and
deletes the locpath that is going to be used, at least it will get
re-created.
2020-10-06 08:46:35 -04:00
Joey Hess
224623e72e
fix another race
Use a different tmp directory so the cache cleanup won't delete the
locpath directory while it's being populated.

This does change the hash used for the locpath directory, but it already
changed in f0ec725234
2020-10-06 08:44:05 -04:00
Joey Hess
d74d978968
fully atomic LOCPATH populating
This fixes a race between two runshells from two different
bundles. One could have run the cache cleanup code, seen the
LOCPATH the other one was in the process of populating, which didn't
have a base or a buildid file written yet, and so the cache cleanup code
would delete it out from under the other process.

Also, doing it fully atomically simplifies where the races between two
runshell processes from the same bundle. Now that needs to be
dealt with to only the mv that puts it in place.

Note that, if the same bundle has 2 runshells run first thing, they will
both generate locales, which is unncessary work, but that should be a
very unusual circumstance and after the LOCPATH is set up, it won't
happen again anyway.
2020-10-05 14:17:46 -04:00
Joey Hess
12a248f823
move cache cleanup to avoid a race
This should fix doc/bugs/standalone_runshell_can_race_and_fail_to_remove___96____126____47__.cache__47__git-annex__47__locales__47____96___dirs
where 2 runshells were running and the second one tried to clean up
LOCPATH while the first one was still populating it.

By moving the cleanup until after LOCPATH is populated, we guarantee
it's populated, so don't need to worry about such a race with another
process populating our same LOCPATH.
2020-10-05 14:07:27 -04:00
Joey Hess
f0ec725234
include buildid in LOCPATH
This avoids the possibility that the bundle could be updated in place,
leading to LOCPATH existing but containing locales for the old version,
which needed to be tested for with code that was not race-free.

LOCPATH/buildid is still written and checked when cleaning up stale caches.
That is not actually necessary, except old versions of the standalone
bundle expect to see it, and this prevents them cleaning up the locale
cache of a new version. And still checking it prevents the new version
cleaning up the locale cache of the old version while the old version is
still in use.

Added explicit tests before creating LOCPATH and the base and buildid files.

The buildid file no longer needs to be updated every time, because it's
stable for the given LOCPATH directory.

And the base file actually did not need to be updated every time,
because the LOCPATH is derived from base, so if the bundle is moved
elsewhere, a different LOCPATH will be used.

Transitioning to this will mean that two git-annex builds that otherwise
have the same buildid -- the same git-annex md5sum -- will use different
LOCPATH values, but that's handled fine by the cache cleanup code, so at
most it will mean one extra generation of the locale files.
2020-10-05 14:04:49 -04:00
Joey Hess
5863d14fd2
runshell: fix some mess left in a race
This seems to be the best way to deal with the race; if the first and
second runshell are running very close together, the first will generate
the locale directory, and a second test -d would still leave a race
window.
2020-10-05 13:42:43 -04:00
Joey Hess
e0ca1236ee
runshell: Update files atomically when preparing to run git-annex
This does not make it entirely idempotent, but it's a start.
2020-10-05 13:38:34 -04:00
Joey Hess
b91d97c3d2
small runshell optimisation
avoid some test -d for locale variables that are not set
2020-10-05 13:37:00 -04:00
Joey Hess
cd9a60bc7d
runshell: Fix a edge case where rm errors were sent to stdout, which could confuse things parsing git-annex output. 2020-10-05 12:44:40 -04:00
Joey Hess
6ea511beb4
Removed the S3 and WebDAV build flags
So these special remotes are always supported.

IIRC these build flags were added because the dep chains were a bit too
long, or perhaps because the libraries were not available in Debian stable,
or something like that. That was long ago, those reasons no longer apply,
and users get confused when builtin special remotes are not available, so
it seems best to remove the build flags now.

If this does cause a problem it can be reverted of course..

This commit was sponsored by Jochen Bartl on Patreon.
2020-09-08 12:42:59 -04:00
Joey Hess
05dbc449f1
move stack file used by i386ancient autobuilder 2020-08-28 15:16:10 -04:00
Joey Hess
6fb7ecde35
need lts-13.11 after all
the newer one fails at the end of build with an unavailable libc symbol.
2020-08-28 14:07:31 -04:00
Joey Hess
7cefa377d6
further changes to get back to last working build state on OSX
Seems 13.11 was not being used for a while, but 14.27 works.

For some reason, stack was getting confused when I set the magicmime
flag on the command line, but setting it in stack.yaml didn't confuse
it. Ugh.
2020-08-28 13:59:00 -04:00
Joey Hess
d81abda6de
fix build 2020-08-28 13:01:56 -04:00
Joey Hess
bbe78206f8
add stack.yaml for OSX autobuilder
Unfortunately, the autobuilder is using an old version of OSX, and
cannot use ghc newer than the one in lts-13.11. Newer ghc versions use a
libc symbol that is not available.

Since the main stack.yaml has been updated to a newer lts, and just
substituting in lts-13.11 no longer works due to other dependency
issues, it's simplest to use a separate one for the OSX build.

Hopefully this is temporary, and the autobuilder gets updated.
2020-08-28 12:53:51 -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
00c5f04f20
Deal with unusual IFS settings in the shell scripts for linux standalone and OSX app.
Thanks, Yaroslav Halchenko
2020-07-24 14:46:50 -04:00
Joey Hess
79187a6eaf
Revert "Unset IFS in shell scripts in the linux standalone build and OSX app."
This reverts commit 24125e8dc4.

yoh has a better patch I see
2020-07-24 14:33:13 -04:00
Joey Hess
24125e8dc4
Unset IFS in shell scripts in the linux standalone build and OSX app. 2020-07-24 14:31:11 -04:00
Joey Hess
df168e3513
avoid running test on windows
It's failed for a long time in the autobuilder environment, and
currently it seems to be hanging.
2020-07-02 13:40:00 -04:00
Joey Hess
b54bf31eb7
Revert "remove .stack-work"
This reverts commit e930237f61.

Unbelievably, that worked, somehow the preprocessed file had gotten
cached from the wrong version. Windows has found a new way to amaze me in
its horribleness.
2020-07-02 11:29:24 -04:00
Joey Hess
e930237f61
remove .stack-work
build is failing on commit d409f92318
but the error message quotes a version of Utility/Process/Transcript.hs
before a fix yesterday. All I can think is stack may have cached the old
version, perhaps after cpp?
2020-07-02 11:16:05 -04:00
Joey Hess
88f721549d
Linux standalone: Use md5sum to shorten paths in .cache/git-annex/locales
md5sum is part of busybox, so is probably available unless it were compiled
out. If md5sum (or cut for that matter) is not available, it will
still use the whole path to $base, otherwise hash it.

Of course it's possible for md5sum to be available sometimes and not others
on the same system; in such an event the locales would be built twice for
the same bundle. The cleanup code will delete both sets once that
version of the bundle is upgraded.
2020-03-04 13:04:56 -04:00
Joey Hess
5c3636037b
Display a warning when concurrency is enabled but ssh connection caching is not enabled or won't work due to a crippled filesystem
A warning message is unsatisfying. But erroring out is too hard a failure,
especially since it may well work fine if the user has enabled passwordless
ssh.

I did think about falling back to one ssh connection at a time in this
case, but it would have needed a rework of every ssh call, which
seems far overboard for such a niche problem. There's no single place where
git-annex runs ssh, so no one place that it could block a concurrent call
on a semaphore. And, even if it did fall back to one ssh connection at a
time, it seems to me that doing so without warning the user about the
problem just invites bug reports like "git-annex is ignoring my -J2 and
only doing one download at a time". So a warning is needed, and I suppose
is good enough.
2020-01-23 12:35:46 -04:00
Joey Hess
8ea269ef75
fix GIT_EXEC_PATH to point to bundle/git-core
This makes it be the same as in the linux runshell.

It may be that bundle/ used to have all the necessary binaries in it,
but that seems unlikely. I think that the breakage fixed by my previous
commit masked this other breakage, and anything git execs from git-core
(as opposed to being buitin) has never worked in the OSX dmg.
2019-11-14 19:20:28 -04:00
Joey Hess
8966ba2cff
git-annex-standalone.rpm: Fix the git-annex-shell symlink 2019-10-08 14:43:28 -04:00
Joey Hess
4508198507
building a standalone rpm from the standalone tarball
This allows the rpm to be built anywhere the necessary build deps are
available (including on debian) and the resulting package will work on as
broad a range of rpm distributions as the libc/kernel supports.

The DistributionUpdate changes to use the new script have not yet been
tested.
2019-09-13 11:53:17 -04:00
Joey Hess
ff85adba76
remove bundled rsync from windows build
rsync is only needed for rsync special remotes and git-annex-shell from
Debian oldstable. Since the library situation on windows for rsync required
a particular 32 bit build of git for it to work, and may also somehow need
git-annex to be 32 bit build, it's better to not include it.

This commit was sponsored by Jake Vosloo on Patreon.
2019-07-22 09:37:42 -04:00
Joey Hess
663b0353c9
remove cygwin stuff from this script
cygwin in not needed to build git-annex on windows AFAIK
2019-07-22 09:28:00 -04:00
Joey Hess
9709beba77
try to build deps before buildversion 2019-07-21 17:12:39 -04:00
Joey Hess
a33324256d
no need to upgrade stack as windows autobuild host is updated to newest 2019-07-21 17:09:37 -04:00