Commit graph

459 commits

Author SHA1 Message Date
Joey Hess
3ecbde6376
fix OSX build 2017-02-13 12:41:28 -04:00
Joey Hess
9eb10caa27
Some optimisations to string splitting code.
Turns out that Data.List.Utils.split is slow and makes a lot of
allocations. Here's a much simpler single character splitter that behaves
the same (even in wacky corner cases) while running in half the time and
75% the allocations.

As well as being an optimisation, this helps move toward eliminating use of
missingh.

(Data.List.Split.splitOn is nearly as slow as Data.List.Utils.split and
allocates even more.)

I have not benchmarked the effect on git-annex, but would not be surprised
to see some parsing of eg, large streams from git commands run twice as
fast, and possibly in less memory.

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
2017-01-31 19:06:22 -04:00
Joey Hess
e8a9b3cb7e
fix build 2016-12-28 14:31:43 -04:00
Joey Hess
8484c0c197
Always use filesystem encoding for all file and handle reads and writes.
This is a big scary change. I have convinced myself it should be safe. I
hope!
2016-12-24 14:46:31 -04:00
Joey Hess
ce2828a12f
finish fixing android build after tor merge 2016-12-12 13:27:39 -04:00
Joey Hess
f4b7caaa61
fix some more 2016-12-10 12:29:29 -04:00
Joey Hess
a88b5e7786
better fix 2016-12-10 12:13:41 -04:00
Joey Hess
dd715b5993
improve hask to work with TH for Free monads 2016-12-10 11:55:56 -04:00
Joey Hess
070fb9e624
Added git-remote-tor-annex, which allows git pull and push to the tor hidden service.
Almost working, but there's a bug in the relaying.

Also, made tor hidden service setup pick a random port, to make it harder
to port scan.

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
2016-11-21 17:27:38 -04:00
Joey Hess
d2b49090b8
remove debug print 2016-11-15 21:52:10 -04:00
Joey Hess
d48f4caaef
Linux standalone: Avoid using hard links in the tarball so it can be untarred on eg, afs which does not support them. 2016-11-10 15:12:30 -04:00
Joey Hess
5485a8fe62
remove localedir file, fix build 2016-10-05 11:29:14 -04:00
Joey Hess
aacd9b190d
Linux standalone: Include locale files in the bundle, and generate locale definition files for the locales in use when starting runshell.
Currently only done for utf-8 locales because the charset can easily be
told for those. Other locales don't include the charset in their name.

The locale definition is generated under git-annex.linux/locales.
So, this only works if the user can write there.

If locale generation fails for any reason, it's silently skipped.

The git-annex-standalone.deb installs the bundle under /usr, so this locale
generation won't work for non-root users.
2016-10-04 16:37:43 -04:00
Joey Hess
c079811226
Linux standalone: Add back the LOCPATH=/dev/null hack to avoid the system locale-archive being read.
Version mismatches between the system locale-archive and the glibc in the
bundle have been observed to cause git crashes.

Unfortunately, this causes locales to not be used in the linux standalone
bundle, as was the case until version 6.20160419.

glibc hardcodes the path to /usr/lib/locale/locale-archive and does not
let an environment variable cause a different locale-archive file to be used.

The only other option to include locales in the bundle would be to include
exploded locale definition directories in the bundle for a number of
locales, generated by localedef. But these take at least 300 kb per locale,
and there are a great many locales; it would be hundreds of megabytes to
include them all.

(Hmm, we could include localdef in the bundle, and check LANG in runshell
and compile the locale directories on the fly. This would need
/usr/share/i18n/ and /usr/lib/locale-archive to be included in the bundle.
It's.. doable.)

I know this is going to once again cause users of the bundle to complain
that eg, ls doesn't show their unicode filenames right. Better than strange
crashes though.
2016-10-04 12:53:09 -04:00
Joey Hess
49b3ef88f7
Android: Fix disabling use of cp --reflink=auto, curl, sha224, and sha384.
This was originally done in a7ef05a9, but got lost in some change to the
Makefile. Use CROSS_COMPILE=Android to tell configure that it's configuring
for android instead of passing it a parameter.
2016-09-05 14:11:35 -04:00
Jim Paris
e2a55fdbae Don't escape leading dots in code blocks in manpage
The code block in git-annex-smudge(1) was misformatted.  Code blocks
start with tabs, so replace "\s" with " ".  Tested to not affect
anything except git-annex-smudge.1.
2016-08-16 11:51:16 -04:00
Joey Hess
43d9d757ee
fix build with old ghc 2016-06-13 15:25:05 -04:00
Joey Hess
c8dd196234
fix man page building 2016-06-02 16:54:58 -04:00
Yaroslav Halchenko
64e844e1fe
minor typo fixes throughout
problematic
flexibility
2016-06-02 11:22:18 -04:00
Joey Hess
f4489cc415
Remove Makefile from cabal tarball; man page building is now handled by a small haskell program.
This actually runs faster than building the man pages from the makefile
did. But the main purpose is to let Setup.hs import Build.Mans and so not
need the makefile.
2016-05-31 13:58:13 -04:00
Joey Hess
f79875ef3b
Updated cabal file explictly lists source files.
The tarball on hackage will include only the files needed for cabal install;
it is NOT the full git-annex source tree. While it's totally obnoxious that
cabal files need every file listed out when basic wildcard support could
avoid hundreds of lines, and have to be maintained when files are added,
this does get the tarball size back down to 1 mb.

This also stops stack from complaining that it found modules not listed in
the cabal file.

debian/changelog, debian/NEWS, debian/copyright: Converted to symlinks
to CHANGELOG, NEWS, and COPYRIGHT, which used to symlink to these instead.
This avoids needing to include debian/ in the hackage tarball.

Setup.hs: Build man pages at install time using make and mdwn2man.
If it fails, which it probably will on windows, just skip installing
them.
2016-05-24 01:28:07 -04:00
Joey Hess
b22409db38
avoid warnings about not exported System.Directory.isSymbolicLink 2016-04-28 15:18:11 -04:00
Joey Hess
5fe450514b
Fix build with directory-1.2.6.2.
It started exporting a isSymbolicLink which supports windows. But,
git-annex does no use symlinks on windows yet and this conflicts with the
function by the same name from unix-compat, so hide it.
2016-04-28 13:18:44 -04:00
Joey Hess
71e5bebc45
remove warning 2016-04-27 15:17:02 -04:00
Joey Hess
665d7ac6e0
fix build with old ghc that lacks MIN_VERSION_GLASGOW_HASKELL macro 2016-04-27 14:32:05 -04:00
Joey Hess
f6c6963ed4
only filter out mdwn2man warning, not other warnings 2016-04-20 14:29:54 -04:00
Joey Hess
f947781fa0
Avoid setting LOCPATH in linux standalone builds now that ghc has been fixed to not hang when it cannot find locale files. 2016-04-20 12:40:11 -04:00
Joey Hess
7a77985f37
hack to get escaped quotes right on git-annex-shell man page 2016-04-04 17:11:35 -04:00
Joey Hess
8bed51ae95
use clamav to check builds for viruses before adding them
Had to workaround various problems in clamscan. Increased its max filesize
a lot, because it's too small to check git-annex. Manual unpacking seemed
to be needed for dmg and tar.gz.
2016-03-07 15:54:27 -04:00
Joey Hess
ab5f7b05f5
Fix OSX dmg to include libraries needed by bundled gpg, lost in last release. 2016-03-07 12:55:01 -04:00
Joey Hess
ae0a10618b
fix build more 2016-02-23 12:48:18 -04:00
Joey Hess
d04af5fb68
fix build error 2016-02-23 12:30:11 -04:00
Joey Hess
63e6f08e0b
avoid trying to include gpg in bundle on Windows 2016-02-23 11:33:07 -04:00
Joey Hess
398d93d4d2
Linux and OSX standalone builds put the bundled gpg last in PATH, so any system gpg will be preferred over it. 2016-02-19 16:19:19 -04:00
Joey Hess
05e7cdce71
fix warning with ghc 7.10 2016-01-26 19:12:33 -04:00
Joey Hess
737e45156e
remove 163 lines of code without changing anything except imports 2016-01-20 16:36:33 -04:00
Joey Hess
6a5e241a74
throw exception if library copy fails 2016-01-14 17:56:21 -04:00
Joey Hess
9240c02fd1
fix build of DistributionUpdate 2016-01-14 15:55:37 -04:00
Joey Hess
927e1a067e
fix import warnings 2016-01-14 10:30:54 -04:00
Joey Hess
4ca9fa4d39
fix build warning with AMP ghc 2015-12-28 13:16:46 -04:00
Joey Hess
11ceee93b4
fix build warning 2015-12-28 12:41:36 -04:00
Joey Hess
e5323f4414
got logic backwards.. 2015-11-03 10:51:21 -04:00
Joey Hess
0717ad4440
Avoid installing desktop file and program file if cabal install git-annex is run as root, since that is not a systemwide install, but to /root, and so generating a systemwide desktop file is not right. 2015-11-03 10:38:08 -04:00
Joey Hess
933fef6ae0 Merge branch 'winprocfix' 2015-10-04 15:46:25 -04:00
Joey Hess
1c98029bb0 add i386-ancient build 2015-09-23 13:36:45 -04:00
Joey Hess
5aa5e92da7 git for windows includes curl, so avoid bundling it 2015-09-11 14:01:42 -04:00
Joey Hess
1355a241ea now fully working even when git is not in path
The vbs launchers now are passed the path where git-annex was installed to,
so they will work when it's not in path.
2015-09-11 13:18:21 -04:00
Joey Hess
c7a6296ef3 get git-annex working even if user doesn't add git to path
This is pretty complicated, but I have both "git-annex" and "git annex"
working both in the git bash shell even with git not added to path.
And, when git's added to path, both work from MS-DOS prompt window too.

I think that the webapp startup does still need git in path, so
instructions will keep saying to do that. But, users often disregard them,
and hopefully this will reduce support traffic.

Also, switched the wget from the cygwin one to the msys2 one, avoiding the
complication of needing to bundle any cygwin dlls.
2015-09-11 12:44:27 -04:00
Joey Hess
6158036e23 Switched to using git for Windows, rather than msysgit.
Using msysgit with git-annex is no longer supported.

At the same time, I'm updating the rsync.exe in my downloads repository
with the one from msys2.

Note that rsync is currently still being ldded and installed in Git/cmd/
like the other cygwin programs. The ldd fails and this failure is ignored.
It would be better to special case it to go in Git/usr/bin/, so that the
user can't run rsync in a dos prompt window, which doesn't work, as it needs
additional libs. However, as far as git-annex running rsync running ssh,
it works ok in this location.

Removed the ssh.cmd and ssh-keygen.cmd; these are not needed with git for
windows. Keeping them would let ssh be run manually from a dos prompt
window, but that's not really a goal.
2015-09-10 19:16:30 -04:00
Joey Hess
330f671a21 remove bup from bundledprograms
It never belonged there.
2015-09-10 12:37:05 -04:00
Joey Hess
19dbe2a611 webapp: Fix support for entering password when setting up a ssh remote. 2015-09-03 11:03:08 -07:00
Joey Hess
4ea33b09c9 update for ghc 7.10 2015-09-01 15:02:37 -07:00
Joey Hess
86e638567a Fix Windows build to work with ghc 7.10
It was failing at link time, some problem with terminatePID.
Re-implemented that to not use a C wrapper function, which cleared up the
problem. Removed old EvilLinker hack with must have been related to the
same problem.

Note that I have not tested this with older ghc's. In
f11f7520b5 I mention having tried this
approach before, and getting segfaults.. So, who knows. It seems to work
fine with ghc 7.10 at least.
2015-09-01 14:51:14 -07:00
Joey Hess
1de67fa46e remove unused import 2015-08-24 14:26:41 -07:00
Joey Hess
485465107a Makefile: Pass LDFLAGS, CFLAGS, and CPPFLAGS through ghc and on to ld, cc, and cpp.
As a result of the Makefile changes, the Debian package is built
with various hardening options. Although their benefit to a largely
haskell program is unknown.
2015-08-19 13:53:57 -04:00
Joey Hess
6204dcbd7b fix formatting of git-annex(1) synopsis 2015-07-09 11:22:37 -04:00
Joey Hess
eb33569f9d remove Params constructor from Utility.SafeCommand
This removes a bit of complexity, and should make things faster
(avoids tokenizing Params string), and probably involve less garbage
collection.

In a few places, it was useful to use Params to avoid needing a list,
but that is easily avoided.

Problems noticed while doing this conversion:

	* Some uses of Params "oneword" which was entirely unnecessary
	  overhead.
	* A few places that built up a list of parameters with ++
	  and then used Params to split it!

Test suite passes.
2015-06-01 13:52:23 -04:00
Joey Hess
799dc8d329 avoid unused variable 2015-05-27 17:02:23 -04:00
Joey Hess
38c8b757d8 munge NAME section of man pages to make lintian happy 2015-05-22 16:06:21 -04:00
Joey Hess
6168537c34 require RELEAEE_BUILD to be 1, not any value 2015-05-11 09:44:01 -04:00
Joey Hess
5c7cdbae46 more {-# OPTIONS_GHC -fno-warn-tabs #-} ... Forcing people who have what is merely a difference of opinion to you to do this is a bit of an asshole move. Just saying. 2015-05-10 16:38:49 -04:00
Joey Hess
d32da9f9b6 add a wrapper for ssh-keygen 2015-05-08 14:55:57 -04:00
Joey Hess
38e2b95751 use a batch file to run msysgit's ssh, instead of copying
copying failed because dlls are not in path.

This batch file is based on the one msysgit uses to start gitk
2015-05-08 14:26:37 -04:00
Joey Hess
ce285ea6fa Windows: Remove cygwin ssh, the newer version of which has stopped honoring the setting of HOME. Instead, copy msysgit's ssh into PATH. 2015-05-07 15:53:03 -04:00
Joey Hess
a15e1158c6 use BuildVersion in debian, which fixes windows build 2015-04-21 16:42:54 -04:00
Joey Hess
dc6949b509 filter out non-cygwin libs 2015-04-21 16:39:44 -04:00
Joey Hess
cd4fb498a7 use cygwin ldd to find dlls to include, instead of manually listing 2015-04-21 14:36:40 -04:00
Joey Hess
2cb8fc5fee another fix 2015-04-20 16:09:24 -04:00
Joey Hess
cd2541f729 fix 2015-04-20 16:08:12 -04:00
Joey Hess
b79a3332ae typo 2015-04-20 16:04:09 -04:00
Joey Hess
e651b29e90 reuse Build.Version to generate version 2015-04-20 15:56:28 -04:00
Joey Hess
463bdd9e22 fix whatis section (hack) 2015-04-20 15:54:24 -04:00
Joey Hess
10afac3fba another lib 2015-04-20 13:03:46 -04:00
Joey Hess
ed10722fae another lib 2015-04-20 12:20:42 -04:00
Joey Hess
9f4647e091 updated lib version 2015-04-20 12:09:55 -04:00
Joey Hess
7c17ad05d2 more libs 2015-04-20 12:01:26 -04:00
Joey Hess
0bc67213cc more libs 2015-04-20 11:47:58 -04:00
Joey Hess
b1cb603b6b more libs 2015-04-20 11:25:40 -04:00
Joey Hess
c1859130c2 prune old lib 2015-04-20 11:12:59 -04:00
Joey Hess
2665be44d5 update some windows libraries for newer version of cygwin 2015-04-20 11:08:32 -04:00
Joey Hess
5871f7abd2 put in workaround for strange version of git on the autobuilder 2015-04-14 14:44:19 -04:00
Joey Hess
4b6dec6a12 Windows: Renamed start menu file to avoid loop in some versions of Windows where the menu file is treated as a git-annex program. 2015-04-13 14:24:07 -04:00
Joey Hess
667e16f1b9 use signingKey 2015-04-06 18:56:38 -04:00
Joey Hess
b857253ae9 reorder params 2015-04-06 18:38:34 -04:00
Joey Hess
00b07d7155 Better fix for standalone tarball git-annex sync linker shim bug, that works for "git annex sync" as well as "git-annex sync". 2015-03-27 16:06:50 -04:00
Joey Hess
bc1c18a951 move build man pages to man/ from top dir 2015-03-23 15:43:45 -04:00
Joey Hess
5c2ad84d28 switch to pattern target to build mans 2015-03-23 12:24:20 -04:00
Joey Hess
900c50a305 fix let_do parser 2015-02-22 19:39:20 -04:00
Joey Hess
b2abf78dc5 add another lambdaparams hack, sigh 2015-02-22 19:24:47 -04:00
Joey Hess
1a1e2e8049 comment typo 2015-02-22 17:38:52 -04:00
Joey Hess
a4a18a67a5 a new hack for another ghc invalid haskell syntax in -ddump-splices .. 2015-02-22 17:35:51 -04:00
Joey Hess
0f4a0762b6 more nested instances hacks 2015-02-22 17:09:54 -04:00
Joey Hess
367cde30da accept longer prefix in case expression fixup
Eg, "Right r_a36iJ ->"
2015-02-22 16:17:32 -04:00
Joey Hess
530db25158 Database.Persist.TH.++ is Data.Text.append 2015-02-22 16:05:11 -04:00
Joey Hess
a419a56c45 EvilSplicer hacks for persistent 2015-02-22 15:43:59 -04:00
Joey Hess
21cab904a9 remove now duplicate import 2015-02-19 18:45:07 -04:00
Joey Hess
88fbb13ee3 Linux standalone: Improved process names of linker shimmed programs. 2015-02-16 19:36:26 -04:00
Joey Hess
02cdc2f0b7 typo 2015-01-29 13:51:30 -04:00
Joey Hess
5fe41d3ef5 windows: include html help file that msysgit tries to open for git annex --help
Pointing to the website is easier than trying to format the man page to
html on windows.

Closes https://github.com/datalad/datalad/issues/39
2015-01-29 13:43:52 -04:00
Joey Hess
f61d891f2e weirdly doubled slashes 2015-01-29 13:34:14 -04:00