Commit graph

437 commits

Author SHA1 Message Date
Joey Hess
4c44deb2cd
improve cabal v2 use
cabal exec in v2 puts the built binary in PATH, so can just ask where it
is that way, and symlink it

And cabal exec hothasktags simplifies running that, because it sets up
most of the necessary environment.

The tags and TAGS targets now need cabal v2 to work.
2020-06-18 13:56:03 -04:00
Joey Hess
0f43efa15b
tail the find in dist-newstyle
unfortunately old builds for old versions can linger in there
2020-06-18 11:37:43 -04:00
Joey Hess
572369ced2
clean dist-newstyle 2020-06-17 17:44:38 -04:00
Joey Hess
7de3f8de11
updates for new cabal
The old make fast machinery doesn't work at all with it, but it seems
actually reasonably fast now to just disable optimisation, so made make
dev do that. And it sticks once used, which is handy.

Removed hdevtools hack, which won't work. There are ide integrations
that really solve the problem that hack was working around.

Misc fixes for dist-newstyle location.
2020-06-17 11:35:34 -04:00
Joey Hess
f407df11b4
document tags vs TAGS
ridiculous that these editors use such similar names and different file
formats

(actually, if you force vim to read TAGS, it seems able to parse it, but
I can't find much documentation about that)
2020-05-19 12:59:38 -04:00
Joey Hess
ac347f82cc
ignore and clean the TAGS file 2020-05-19 12:58:25 -04:00
Joey Hess
ca9f7361e8
remove wrapping
Seems unncessary and was a bit weird.
2020-05-19 12:57:57 -04:00
Thomas Koch
a47ba1e612 make TAGS to create emacs etags
I tried the --recursive option of hothasktags but the vi tags file grew
by some orders of magnitude and also the emacs TAGS file contained many
wrong entries.

I deleted trailing whitespace in the Makefile since emacs warns about it
on save.
2020-05-15 21:32:59 +02:00
Joey Hess
3d00a8a1dc
Makefile: Support newer versions of cabal that use the new-build system.
Unfortunately, cabal puts the binary in a very complicated path
and does not provide any good way to get it out, leaving no good choice
except to use find.

It may be possible to use cabal (new-)install --symlink-bindir,
and ask it to symlink to pwd, but with my older version of cabal,
that does not work.

The stack branch will probably also break once it uses a newer cabal,
didn't try to deal with that.
2020-02-20 14:13:21 -04:00
Joey Hess
ee718fb35d
Makefile: Really move the fish completion to the vendor_completions.d directory. 2020-02-04 12:10:09 -04:00
Joey Hess
5c3d06b070
Makefile: Move the fish completion to the vendor_completions.d directory. 2020-01-23 16:42:08 -04:00
Joey Hess
91ec283be6
if hdiutil create never succeeds, fail the build
Build was succeeding despite the dmg never being created.
2019-12-30 13:06:43 -04:00
Joey Hess
28733a3f5a
remove thing I never meant to commit 2019-11-14 16:11:58 -04:00
Joey Hess
842449b086
linuxstandalone: Fix a regression that broke git-remote-https. 2019-11-14 15:08:23 -04:00
Joey Hess
b02bf9f0eb
deal with flakey hdiutil
hdiutil create -format UDBZ -size 640m -srcfolder tmp/build-dmg \
		-volname git-annex -o tmp/git-annex.dmg
hdiutil: create failed - Resource busy

Sometimes it has failed this way for weeks until reboot. Sometimes a single
retry makes it work. Despite many reports of this problem, I have never
found for an explanation for it, other than <shrug> OSX.
2019-10-17 16:28:48 -04:00
Joey Hess
5463f97ca2
OSX: Deal with symbolic link problem that caused git to not be included in the git-annex.dmg
Homebrew now has eg:

datalads-imac:~ joey$ ls -l /Users/joey/homebrew/Cellar/git/2.23.0/libexec/git-core
total 36776
lrwxr-xr-x   1 joey  staff       13 Aug 29 13:38 git -> ../../bin/git
lrwxr-xr-x   1 joey  staff       13 Aug 29 13:38 git-add -> ../../bin/git

So the target of the symlink also needs to be installed now.

Doing it in shell code was too hairy for my dentistry-addled brain, so
reimplemented in haskell. Also using it for building linuxstandalone.
2019-10-17 11:01:41 -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
7f97575941
Makefile: Changed default zsh completion location to zsh default fpath.
Systems such as Debian that have overridden the default fpath will need to
set ZSH_COMPLETIONS_PATH.

I feel that Debian is causing unncessary complexity by making this change,
and have filed a bug report about it.

This also means that when git-annex is installed with PREFIX=/usr/local
it will use /usr/local/share/zsh/site-functions which works with probably
all versions of zsh.
2019-08-16 14:08:56 -04:00
Joey Hess
e03919bd93
simplify
git-annex build-depends on a new enough optparse-applicative that zsh
and fish completions will always be generated
2019-08-16 13:36:26 -04:00
Joey Hess
b532d69498
add missing build dep of install-completions
Since it runs git-annex to generate the completions files.
2019-08-16 11:42:00 -04:00
Joey Hess
83cdc511da
use GHC not ghc 2019-08-16 11:00:28 -04:00
Joey Hess
9273f80301
OSX dmg: Put git-annex's version in the Info.plist file. 2019-06-26 12:10:35 -04:00
Joey Hess
e35f96aea9
Makefile: Added install-completions to install target. 2019-05-08 10:48:38 -04:00
Joey Hess
6491b62614
Makefile: Added install-home target which installs git-annex into the HOME directory 2019-03-18 12:36:03 -04:00
Joey Hess
53e98aeb9c
fix tags generation
The location of the cabal_macros.h file has changed. Also, need to
tell hothasktags about language extensions that are enabled by default
in the cabal file.

This commit was sponsored by Thomas May.
2019-02-12 22:02:11 -04:00
Joey Hess
6ba6c6b539
add BUILDERCOMMONOPTIONS
Needed because stack path needs to be passed the modified stack.yaml to
use as well.
2018-11-21 11:36:38 -04:00
Joey Hess
654981f3f0
actually, skip stack setup
stack build will do setup if necessary, and setup does not accept all
the options that build does
2018-11-21 11:15:16 -04:00
Joey Hess
44ded53d8a
pass BUILDEROPTIONS to stack setup
This is needed so the i386ancient build can pass --stack-yaml
2018-11-21 11:11:36 -04:00
Joey Hess
38d691a10f
removed the old Android app
Running git-annex linux builds in termux seems to work well enough that the
only reason to keep the Android app would be to support Android 4-5, which
the old Android app supported, and which I don't know if the termux method
works on (although I see no reason why it would not).
According to [1], Android 4-5 remains on around 29% of devices, down from
51% one year ago.

[1] https://www.statista.com/statistics/271774/share-of-android-platforms-on-mobile-devices-with-android-os/

This is a rather large commit, but mostly very straightfoward removal of
android ifdefs and patches and associated cruft.

Also, removed support for building with very old ghc < 8.0.1, and with
yesod < 1.4.3, and without concurrent-output, which were only being used
by the cross build.

Some documentation specific to the Android app (screenshots etc) needs
to be updated still.

This commit was sponsored by Brett Eisenberg on Patreon.
2018-10-13 01:41:11 -04:00
Joey Hess
e802323071
deal with the persistent locpath issue
linux standalone: Generate locale files in ~/.cache/git-annex/locales/ so
they're available even when the standalone tarball is installed in a
directory owned by root.

This avoids a full-on reference counting cleanup hell, by letting old
locale caches linger as long as the standalone bundle directory associated
with them is still around. Old ones get cleaned up.

In the case where the directory has a new bundle unpacked over top of it,
the old locale cache is invalidated and rebuilt. Of course, running
programs using that may get confused, but this was already the case, and
unpacking over top of a bundle is probably not a good idea anyhow.

To support that, added a buildid file, which only needs to be unique across
builds of git-annex with different libc versions. sha1sum of git-annex
seems good enough for that.

Removed debian/patches/standalone-no-LOCPATH as it's no longer
necessary.

This commit was supported by the NSF-funded DataLad project.
2018-07-10 12:13:19 -04:00
Joey Hess
a1b55056fc
Make Build/BuildVersion update embedded version number
This way, autobuilders can run it before building, in a tree where
git-annex was already built, and get the current git rev embedded in the
build.

Before, the version number only updated when the setup program was run,
which was up to cabal and not on every build.
2018-06-26 10:36:54 -04:00
Joey Hess
1bed62bda9
android: try harder to force PIE for android 5+
This may work around ghc's -no-pie flag. Untested.
2018-04-16 17:30:21 -04:00
Joey Hess
8f71b316c9
remove chrpath hack
Makefile: Remove chrpath workaround for bug in cabal,  which is no longer
needed.

https://github.com/haskell/cabal/issues/2717 says it uses RUNPATH instead
of RPATH now, but I don't even see that for statically linked libraries;
the bug with that appears to be fixed.

cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library

I left the rpath removal using otool on OSX because those straight up
broke the linker, and I don't know if the OSX autobuilder is updated to
a new enough cabal to not need it.

This commit was sponsored by Ewen McNeill on Patreon.
2018-02-27 12:02:38 -04:00
Joey Hess
66c377bfce
avoid warning with current ghc
Seems that the cabal macros file is no longer needed to build
DistributionUpdate, and it produced a ton of warnings, so stop including
manually.
2018-01-15 12:19:48 -04:00
Joey Hess
79857d7e9f
Removed the testsuite build flag
Test suite is always included.

Building with this flag disabled has actually been broken for some time,
since Command.TestRemote uses tasty. Fewer build flags are better, so good
time to drop it.

This commit was sponsored by Thomas Hochstein on Patreon.
2017-12-20 12:25:03 -04:00
Joey Hess
308cd1383c
fold Build/SysConfig.hs into BuildInfo via include
This avoids warnings from stack about the module not being listed in the
cabal file. So, the generated file is also renamed to Build/SysConfig.

Note that the setup program seems to be cached despite these changes; I
had to cabal clean to get cabal to update it so that Build/SysConfig was
written.

This commit was sponsored by Jochen Bartl on Patreon.
2017-12-14 12:46:57 -04:00
Joey Hess
9dd67e594f
add warning: to make clear this is not an error 2017-12-11 14:28:39 -04:00
Joey Hess
43cbbfe4f7
turn on lambdacase for distributionupdate 2017-11-29 17:39:57 -04:00
Joey Hess
49663ab6a8
Makefile improvement for BUILDER=stack, use stack to run ghc. 2017-11-07 16:56:48 -04:00
Joey Hess
193612c97a
simplify ikiwiki docs build testing and output 2017-11-07 16:36:01 -04:00
Eric Siegerman
5e68b322ec
Build Build/InstallDesktopFile at "make all" time
If you run stack as root (e.g. for "make install"), any files it
creates under ./ will, of course, be owned by root.  That's a
problem for subsequent runs as non-root.

Reduce the likelihood of that happening by building
Build/InstallDesktopFile during "make all", so that it needn't be
built by "make install".
2017-11-07 16:28:05 -04:00
Joey Hess
589184ccc3
/dev/null stderr when generating completions
avoid usage display when too old optparse-applicative
2017-09-14 13:10:45 -04:00
Joey Hess
d2b69c04e3
better way of finding stack built executable 2017-07-12 17:04:51 -04:00
Joey Hess
5cf7216774
zsh and fish completions
optparse-applicative-0.14.0.0 adds support for these, so have the
Makefile install their scripts when built with it.

CmdLine/GitAnnex/Options.hs now uses action "file" in cmdParams,
which affects the bash and zsh completions, letting them complete
filenames for subcommands that use that. This is not needed for
bash, since bash-completion.bash enables -o bashdefault, which
lets it complete filenames too. But it does not seem to break the bash
completions. It is needed for zsh; the zsh completion otherwise
does not complete filenames. The fish completion will always complete
filenames no matter what. Messy.

This commit was sponsored by Denis Dzyubenko on Patreon.
2017-06-09 11:38:20 -04:00
Joey Hess
5bbb17b80c
run stack setup when building with stack
This gets ghc installed if it's not already.

Motivation: Ævar's git test that runs git-annex test using git
can be called with BUILDER=stack, but without stack setup being run
sometime, the stack build will fail.
2017-05-16 18:04:13 -04:00
Joey Hess
f40a16181b
remove git-annex-shell symlink on clean 2017-05-10 15:39:21 -04:00
Joey Hess
3cffb941d1
test needs git-annex-shell symlink 2017-03-18 16:05:22 -04:00
Joey Hess
002513e194
test suite infra for testing mocked ssh remotes
This commit was supported by the NSF-funded DataLad project.
2017-03-17 19:14:41 -04:00
Joey Hess
3690e9b071
fix osxapp deps 2017-02-28 12:46:00 -04:00
Joey Hess
1dcd68a149
fix osxapp target
Broken by recent changes to other targets
2017-02-26 14:54:24 -04:00