Commit graph

543 commits

Author SHA1 Message Date
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
Joey Hess
7d82b6911b
build fixes 2019-12-18 14:36:19 -04:00
Joey Hess
a94d804f63
get any old rpms
to prevent makerepo from falling over on broken symlinks
2019-12-18 14:33:29 -04:00
Joey Hess
6b2e471330
only delete old rpms for arches that have a new rpm 2019-12-18 14:32:13 -04:00
Joey Hess
c9a3336235
remove old rpms
Don't want a mass of old versions of git-annex in rpm form cluttering up
my server.

Also, makerepo falls over when confronted with a dangling symlink.
2019-12-18 14:27:47 -04:00
Joey Hess
c4e34cf55d
fix build 2019-12-18 14:22:55 -04:00
Joey Hess
85c5e51c53
fix build after Utility.Url changes 2019-11-14 22:25:06 -04:00
Joey Hess
b321526473
OSX link libs into git-core directory
So that binaries in that directory can find the library next to them,
where they get modified to look.

This is a hack; it would be better for OSXMkLibs to build a list of what
libraries are needed where.

Unsure if this is needed due to a recent reversion, or is an older
problem, so updated changelog accordingly.
2019-11-14 18:31:58 -04:00
Joey Hess
5cc8cfe57b
oops I the filename 2019-11-14 16:34:13 -04:00
Joey Hess
f037ad92ec
OSX git-annex.app: Fix a regression that broke git-remote-https, git-remote-http, and git-shell
Putting the binaries in bundle/git-core/bin didn't work on OSX,
linker can't find the libraries next to those binaries where it expects to.
So instead put the binaries in the progDir.
2019-11-14 16:15:42 -04:00
Joey Hess
842449b086
linuxstandalone: Fix a regression that broke git-remote-https. 2019-11-14 15:08:23 -04:00
Joey Hess
96418dcd11
copy the content linked to
symlinks are hard (at least in current mental state and with the test
system being remote)
2019-10-17 12:41:02 -04:00
Joey Hess
9dff416a34
make symlink relative and install link target 2019-10-17 12:21:23 -04:00
Joey Hess
d0d416b215
bugfix
Fix symlink detection

Also, make idempotent; cp may fail if the destination file exists in
some cases.
2019-10-17 11:55:51 -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
10fa8a8bee
reorg 2019-09-13 12:00:16 -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
53fd746705
avoid some build warnings on windows 2019-09-12 14:11:19 -04:00
Joey Hess
fef3cd055d
Removed support for git versions older than 2.1
debian oldoldstable has 2.1, and that's what i386ancient uses. It would be
better to require git 2.2, which is needed to use adjusted branches, but
can't do that w/o losing support for some old linux kernels or a
complicated git backport.
2019-09-11 16:14:43 -04:00
Joey Hess
868942e19b
fix unused module import warnings when building on windows 2019-08-08 12:18:53 -04:00
Joey Hess
30ca02928c
Windows installer: Always install to 64 bit program files directory, since it needs 64 bit git now
I saw the installer not defaulting to any installation directory,
and I had to manually enter C:\Program Files\Git

Maybe it was choosing gitInstallDir32, and that was empty? Or the
conditional somehow failed. Simplifying so it will hopefully work again.
2019-08-07 14:05:03 -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
21ff5e1e5a
CoW probing
Improved probing when CoW copies can be made between files on the same
drive. Now supports CoW between BTRFS subvolumes. And, falls back to rsync
instead of using cp when CoW won't work, eg copies between repos on the
same EXT4 filesystem.

Rather than trying cp --reflink=always for each file copied to a remote,
it's tried once and if it fails it falls back to using rsync thereafter
for the lifetime of the Remote object. That avoids overhead of calling cp
which while small, will add up over a large number of files.

This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
2019-07-17 14:19:08 -04:00
Joey Hess
0dc26cd6f1
remove android cross build leftover
Android cross builds are no longer done; I missed removing this
before.

This commit was sponsored by Brock Spratlen on Patreon.
2019-07-17 13:31:37 -04:00
Joey Hess
572a340fc5
fix build 2019-03-18 16:38:22 -04:00
Joey Hess
258e8f8f29
Removed bundled gpg from the Linux standalone build and OSX dmg
Because gpg now always wants to use gpg-agent, and shipping such a daemon
in those is not a good idea.
2019-03-18 16:31:07 -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
40ecf58d4b
update licenses from GPL to AGPL
This does not change the overall license of the git-annex program, which
was already AGPL due to a number of sources files being AGPL already.

Legally speaking, I'm adding a new license under which these files are
now available; I already released their current contents under the GPL
license. Now they're dual licensed GPL and AGPL. However, I intend
for all my future changes to these files to only be released under the
AGPL license, and I won't be tracking the dual licensing status, so I'm
simply changing the license statement to say it's AGPL.

(In some cases, others wrote parts of the code of a file and released it
under the GPL; but in all cases I have contributed a significant portion
of the code in each file and it's that code that is getting the AGPL
license; the GPL license of other contributors allows combining with
AGPL code.)
2019-03-13 15:48:14 -04:00
Joey Hess
fbe7db74af
remove unused import 2019-01-22 20:14:08 -04:00
Joey Hess
c62d2ce5c5
avoid strictness problem 2019-01-22 19:37:49 -04:00
Joey Hess
5d58c54a8b
avoid writing to Build/Version when it already contains the same version
This will hopefully avoid ghc unncessarily rebuilding everything that
depends on it due to the file's timestamp changing.
2019-01-22 16:54:17 -04:00
Joey Hess
112bb82fc2
Windows: If 64 bit git is installed, use it when installing git-annex.
However, rsync still won't work with 64 bit git and
this is still not the documented way to install it.

So, if both 64 and 32 are installed, go with 32.

And if neither git can be found, default to 32.
2019-01-21 15:51:48 -04:00
Joey Hess
cbdb6671d6
remove old android app autobuild 2018-10-13 12:13:13 -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
0240775f32
adding arm64 build, and improved termux installation process
* Added arm64 Linux standalone build. (No autobuilder yet.)
* Improved termux installation process.

Added git-annex-install.sh script to avoid user needing to type as much in
termux. The scope of this script is limited; runshell handles the rest.

Runshell runs termux-fix-shebang on the shell scripts. The problem is
the bundled bin/sh script, deleting that script also works, but then the
others probably use the system Android /bin/sh, which could be old or
broken or not posix or whatever. Using termux sh to run the scripts is
better.

This commit was sponsored by Eric Drechsel on Patreon.
2018-10-11 13:32:00 -04:00
Joey Hess
c565340adc
stop using external hash programs, since cryptonite is faster
In 2013, I wrote "Cryptohash benchmarks 90 to 101% faster than external
hashers". Re-benchmarking today, I found cryptonite's sha256 consistently
outperformed coreutils by 10% for large files. Tested 10 mb, 100 mb, 1 gb
files with both sha256 and sha512. And for smaller files, the external
process startup time swamps the hash time.

Perhaps cryptonite has improved. Or it could just do better on my
current CPU Intel(R) Pentium(R) CPU 4410Y @ 1.50GHz). Anyway, even if cryptonite
is slower in some situations, seems likely it would only be marginally slower;
it's got the same class of highly optimised C code under the hood as coreutils.
The main difference between the two sha256 implementations seems to be
how much of the inner loop they unroll..

This commit was sponsored by Henrik Riomar on Patreon.
2018-08-28 18:10:58 -04:00
Joey Hess
f6b449eb3e
type signature 2018-08-04 14:21:30 -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
7ecbb6bc20
stop using git commit date as version
This turns out to have been prolimatic because building from a git tag
would make a git-annex that claimed a different version than the tag's
version.

The git rev is still included in the version, and people who want
to know the exact tree that was built can just use that, so there's no
real benefit to automatically advancing the date part of the version.
2018-06-26 10:11:28 -04:00
Joey Hess
87b329e451
remove code to update version in cabal file
I have not used this when making releases for a long time.
2018-06-26 10:04:42 -04:00
Joey Hess
74890e1457
set 6.20180626 as urgent upgrade
This causes the webapp to tell the user's it's an urgent upgrade, which
this security fix is.
2018-06-25 21:52:02 -04:00
Joey Hess
3f0d875b55
Include uname in standalone builds. 2018-06-16 10:02:05 -04:00
Joey Hess
a73d60785c
fix build 2018-04-27 12:59:09 -04:00
Joey Hess
c0c66e35b2
remove unused import 2018-04-22 13:42:04 -04:00
Joey Hess
9b8075e79f
fix build 2018-04-09 20:22:46 -04:00
Joey Hess
b47c23bb5c
fix build 2018-04-09 20:15:52 -04:00
Joey Hess
c34152777b
Use http-conduit for url downloads by default, annex.web-options enables curl
* For url downloads, git-annex now defaults to using a http library,
  rather than wget or curl. But, if annex.web-options is set, it will
  use curl. To use the .netrc file, run:
    git config annex.web-options --netrc
* git-annex no longer uses wget (and wget is no longer shipped with
  git-annex builds).

Note that curl is always run in silent mode, since the new API for
download has a MeterUpdate and doesn't make way for curl progress
output. It might be worth writing a parser for curl's progress output
to update the meter when using it, but I didn't bother with this edge
case for now.

This commit was supported by the NSF-funded DataLad project.
2018-04-06 17:36:20 -04:00
Joey Hess
5574e25c54
OSX app: Work around libz/libPng/ImageIO.framework version skew
By not bundling libz, assuming OSX includes a suitable libz.1.dylib.

This commit was supported by the NSF-funded DataLad project.
2018-03-22 11:53:10 -04:00
Joey Hess
3fa8245df6
fix build some more 2018-01-15 12:18:00 -04:00
Joey Hess
ec5d89e72b
fix build 2018-01-15 12:17:09 -04:00
Joey Hess
2b28f6130a
fix windows build 2018-01-10 13:23:10 -04:00
Joey Hess
25703e1413
finally really add back custom-setup stanza
Fourth or fifth try at this and finally found a way to make it work.

Absurd amount of busy-work forced on me by change in cabal's behavior.
Split up Utility modules that need posix stuff out of ones used by
Setup. Various other hacks around inability for Setup to use anything
that ifdefs a use of unix.

Probably lost a full day of my life to this.
This is how build systems make their users hate them. Just saying.
2017-12-31 16:36:39 -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
a59d1a0ee6
remove unused import 2017-11-21 12:46:20 -04:00
Joey Hess
1b6cbb63e9
still can't express custom-setup deps
They need unix on non-windows, for Utility.Env, which Build.Configure uses,
but cabal can't express that in a custom-setup stanza.

To avoid this problem, Utility.Env would need to be moved into
unix-compat..
2017-11-14 14:59:51 -04:00
Joey Hess
061f5ddd43
avoid Utility.Directory which needs Win32 on windows
custom-setup can't depend on Win32 due to cabal limitations
2017-11-14 14:53:36 -04:00
Joey Hess
50c0fb7336
unify stack build and stack install
For some reason, when stack install is run separately, it seems to be
installing a previous build from a different temp dir. WTF?
2017-10-26 10:10:02 -04:00
Joey Hess
96734ba350
allow building w/o rsync installed
rsync is needed to run, but may not be on the build machine; that's ok
2017-10-25 17:24:03 -04:00
Joey Hess
54e596894f
Windows: Remove wget from bundle; it needs libraries that are not included, and git for windows includes curl which git-annex will use instead.
wget was broken even in the previous old release of the windows bundle,
this is not new breakage. msys-idn-11.dll and probably more would be needed
to use it. git for windows includes msys-idn2-0.dll instead.
2017-10-25 13:51:31 -04:00
Joey Hess
edcce072a6
ln from stack install location to nsis location 2017-10-25 00:14:53 -04:00
Joey Hess
7224a58e5d
ding dong, the witch is dead
Which old witch? The EvilLinker witch!

This commit was sponsored by Thom May on Patreon.
2017-10-24 13:24:42 -04:00
Joey Hess
59a0308f5f
update windows build scripts to use stack
Not tested yet.

The EvilLinker workaround is removed. That got fixed in ghc 8.0.1,
(per https://ghc.haskell.org/trac/ghc/ticket/8596)
which will finally be used by the windows autobuilder now.

I have not deleted the EvilLinker yet (or closed its bugs).

This commit was sponsored by John Peloquin on Patreon.
2017-10-17 13:00:29 -04:00
Joey Hess
3bd3885dbb
fix OSX build 2017-06-09 14:57:11 -04:00
Joey Hess
a1730cd6af
adeiu, MissingH
Removed dependency on MissingH, instead depending on the split
library.

After laying groundwork for this since 2015, it
was mostly straightforward. Added Utility.Tuple and
Utility.Split. Eyeballed System.Path.WildMatch while implementing
the same thing.

Since MissingH's progress meter display was being used, I re-implemented
my own. Bonus: Now progress is displayed for transfers of files of
unknown size.

This commit was sponsored by Shane-o on Patreon.
2017-05-16 01:03:52 -04:00
Joey Hess
11d3219985
Linux standalone builds put the bundled ssh last in PATH, so any system ssh will be preferred over it.
This commit was sponsored by Denis Dzyubenko on Patreon.
2017-03-02 17:40:40 -04:00
Joey Hess
627dc6036e
remove unused import 2017-02-28 14:08:56 -04:00
Joey Hess
27eca014be
fix up Read instance incompatability caused by recent commit
9c4650358c changed the Read instance for
Key.

I've checked all uses of that instance (by removing it and seeing what
breaks), and they're all limited to the webapp, except one.
That is GitAnnexDistribution's Read instance.

So, 9c4650358c would have broken upgrades
of git-annex from downloads.kitenet.net. Once the .info files there got
updated for a new release, old releases would have failed to parse them
and never upgraded.

To fix this, I found a way to make the .info files that contain
GitAnnexDistribution values be readable by the old version of git-annex.

This commit was sponsored by Ewen McNeill.
2017-02-24 18:59:12 -04:00
Joey Hess
4a397b5313
Run wget with -nv instead of -q, so it will display HTTP errors.
This adds one extra line of output when a download is successful,
after the progress bar. I don't much like that, but wget does not provide a
way to show HTTP errors without it.
2017-02-20 15:25:02 -04:00
Joey Hess
113b10cdc9
simpler more generic processTranscript'
This allows using functions that generate CreateProcess and passing the
result to processTranscript', which is more flexible, and also simpler
than the old interface.

This commit was sponsored by Riku Voipio.
2017-02-15 16:02:10 -04:00
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