1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 09:59:13 +08:00

4600 Commits

Author SHA1 Message Date
41b7f6d327 Merge pull request #1391 from ipfs/fix-fuse-err
fix fuse mount error in linux
2015-06-18 02:05:15 -07:00
bc85a6384b fix fuse mount error in linux
There has been a regression such that ./t0030-mount.sh fails on

  'ipfs mount' fails when there is no mount dir

The issue was a change in how fuse errors are reported to the client
process. We have introduced an optimistic categorization that hides
the obscure fusermount error and replaces it with something a bit
more helpful.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-06-18 01:52:57 -07:00
rht
18f5fcea28 golint util/, thirdparty/
and exchange/bitswap/testutils.go

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
rht
2e9ec3deb8 Remove github.com/whyrusleeping/go-logging Godeps
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
rht
9ceca9896c Decimate go-logging & replace with logrus backend
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
rht
84f974ef8b Add panic as loglevel in log config
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
rht
4b086eff5a Remove Notice{,f} logging interface
And substitute the lines using Notice{,f} with Info{,f}

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
rht
78b6cc5f2d Replace Critical{,f} with Error{,f}
Except when there is an explicit os.Exit(1) after the Critical line,
then replace with Fatal{,f}.
golang's log and logrus already call os.Exit(1) by default with Fatal.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
rht
6bc9086b4c Decimate prefixlog
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
b46712bdcb Merge pull request #1379 from dylanPowers/use-trickle-dag
Wired up the trickle dag flag for the add command
2015-06-17 10:36:24 -07:00
c73d0e0b56 Merge pull request #1346 from ipfs/tk/ls-trailing-tabs
core/commands/ls: Remove trailing tabs
2015-06-16 16:42:13 -07:00
600e1523e4 Wired up the trickle dag flag for the add command
License: MIT
Signed-off-by: Dylan Powers <dylan.kyle.powers@gmail.com>
2015-06-16 15:40:26 -07:00
fa23022bcd version bump to 0.3.5 2015-06-15 15:35:04 -07:00
125717e9d6 Merge pull request #1377 from lgierth/remove-bootstrapd-and-routingd
cmd: remove dead ipfs_routingd and ipfs_bootstrapd
2015-06-15 13:31:49 -07:00
8d05fa47e8 cmd: remove dead ipfs_routingd and ipfs_bootstrapd
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2015-06-15 22:18:00 +02:00
7d434daecf Merge pull request #1372 from Luzifer/gobuilder
Added nofuse tag for windows builds
2015-06-14 15:30:29 -07:00
a7adb9b2d3 Added nofuse tag for windows builds
This configuration is supported since GoBuilder 1.16.0 so now we should be able to build windows binaries in GoBuilder

License: MIT
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2015-06-14 16:21:12 +02:00
8c26eff1ca Merge pull request #1371 from ipfs/use-sharness-test-seq
ipfs-test-lib: use test_seq from sharness
2015-06-14 04:58:22 -07:00
408a818b4a ipfs-test-lib: use test_seq from sharness
As Sharness now includes test_seq we can remove
our implementation.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-14 11:21:32 +02:00
8b81793c7d Merge pull request #1370 from ipfs/update-sharness
Update sharness
2015-06-13 15:59:33 -07:00
0befe2bf88 install-sharness.sh: update sharness
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-13 22:40:34 +02:00
ac9f441f1f sharness/Makefile: force sharness version check
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-13 22:39:37 +02:00
3101df56fa install-sharness.sh: implement updates
We want to be able to update Sharness to benefit from
new features.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-13 22:36:47 +02:00
3e6905e8ba core/commands/unixfs: Rename 'ipfs unixfs' to 'ipfs file'
To be less confusing to newcomers (the IPFS filesystem isn't
Unix-specific anyway, and it isn't even very POSIX-specific [1,2,3]).
I'm a bit uncertain about having one name for users and another for
devs, but the consensus seems to be that mainaining two names is worth
the trouble [4].  We also kicked around:

* 'files' (plural),
* 'filesystem' (too long), and
* 'fs' (redundant after 'ipfs', even though IPFS isn't just about
  filesystems)

on IRC [5 through 6].  I wish there was a more evocative term.  I'm
never sure where "file" lands on the scale between "filesysytem",
"everything is a file", "a single chunk of data with an associated
inode".  But we can't think of anything better.

[1]: https://github.com/ipfs/go-ipfs/pull/1348#issuecomment-110529070
[2]: https://github.com/ipfs/go-ipfs/pull/1348#issuecomment-110529921
[3]: https://github.com/ipfs/go-ipfs/pull/1136/files#r29377283
  In my response to this (no longer visibile on GitHub):

  On Wed, Apr 29, 2015 at 01:30:04PM -0700, Juan Batiz-Benet wrote:
  > > +package fsnode
  >
  > i think this package should be called `unixfs` as that's the
  > abstraction that this is calling to.

  Will do, although I don't see what's especially Unix-y about these
  file nodes.

[4]: https://github.com/ipfs/go-ipfs/pull/1348#issuecomment-110529811
[5]: https://botbot.me/freenode/ipfs/2015-06-09/?msg=41428456&page=5
[6]: https://botbot.me/freenode/ipfs/2015-06-09/?msg=41430703&page=5

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-13 13:07:13 -07:00
663f37cb99 core/commands/unixfs/ls: Don't recurse into chunked files
Folks operating at the Unix-filesystem level shouldn't care about that
level of Merkle-DAG detail.  Before this commit we had:

  $ ipfs unixfs ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox
  /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox:
  ... several lines of empty-string names ...

And with this commit we have:

  $ ipfs unixfs ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox
  /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox

I also reworked the argument-prefixing (object.Argument) in the output
marshaller to avoid redundancies like:

  $ ipfs unixfs ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox
  /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox:
  /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox

As a side-effect of this rework, we no longer have the trailing blank
line that we used to have after the final directory listing.

The new ErrImplementation is like Python's NotImplementedError, and is
mostly a way to guard against external changes that would need
associated updates in this code.  For example, once we see something
that's neither a file nor a directory, we'll have to update the switch
statement to handle those objects.

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-13 13:06:34 -07:00
434871ba18 core/commands/unixfs: Add 'ipfs unixfs ls ...'
This is similar to 'ipfs ls ...', but it:

* Lists file sizes that match the content size:

    $ ipfs --encoding=json unixfs ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4
    {
      "Objects": [
        {
          "Argument": "/ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4",
          "Links": [
            {
              "Name": "busybox",
              "Hash": "QmPbjmmci73roXf9VijpyQGgRJZthiQfnEetaMRGoGYV5a",
              "Size": 1947624,
              "Type": 2
            }
          ]
        }
      ]
    }
    $ ipfs cat /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4/busybox | wc -c
    1947624

  'ipfs ls ...', on the other hand, is using the Merkle-descendant
  size, which also includes fanout links and the typing information
  unixfs objects store in their Data:

    $ ipfs --encoding=json ls /ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4
    {
      "Objects": [
        {
          "Hash": "/ipfs/QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4",
          "Links": [
            {
              "Name": "busybox",
              "Hash": "QmPbjmmci73roXf9VijpyQGgRJZthiQfnEetaMRGoGYV5a",
              "Size": 1948128,
              "Type": 2
            }
          ]
        }
      ]
    }

* Has a simpler text output corresponding to POSIX ls [1]:

    $ ipfs unixfs ls /ipfs/QmV2FrBtvue5ve7vxbAzKz3mTdWq8wfMNPwYd8d9KHksCF/gentoo/stage3/amd64/2015-04-02
    bin
    dev
    etc
    proc
    run
    sys
    $ ipfs ls /ipfs/QmV2FrBtvue5ve7vxbAzKz3mTdWq8wfMNPwYd8d9KHksCF/gentoo/stage3/amd64/2015-04-02
    QmSRCHG21Sbqm3EJG9aEBo4vS7Fqu86pAjqf99MyCdNxZ4 1948183 bin/
    QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn 4       dev/
    QmUz1Z5jnQEjwr78fiMk5babwjJBDmhN5sx5HvPiTGGGjM 1207    etc/
    QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn 4       proc/
    QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn 4       run/
    QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn 4       sys/

  The minimal output allows us to start off with POSIX compliance and
  then add options (which may or may not be POSIX compatible) to
  adjust the output format as we get a better feel for what we need
  ([2] through [3]).

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html
[2]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41724727&page=5
[3]: https://botbot.me/freenode/ipfs/2015-06-12/?msg=41725146&page=5

License: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-13 12:44:26 -07:00
848502de1b Merge pull request #1367 from ipfs/wantmanager-cleanup
select with context when sending on channels
2015-06-12 15:14:09 -07:00
b12cc09f64 select with context when sending on channels
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-12 11:32:06 -07:00
41785f3b59 Merge pull request #1356 from ipfs/fix/bitswap-leak
prevent wantmanager from leaking goroutines (and memory)
2015-06-11 20:39:08 -07:00
952dc9c60f go-ipfs version 0.3.5
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
v0.3.5
2015-06-11 20:32:30 -07:00
e014a66bf5 comments from CR
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-11 16:43:21 -07:00
c5b40b3b02 prevent wantmanager from leaking goroutines (and memory)
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-11 09:38:09 -07:00
15135e10df core/commands/ls: Remove trailing tabs
Since 607468a9 (beautify 'ipfs ls' and 'ipfs object links', #833)
we've had these.  That pull request was about text/tabwriter [1] and
elastic tabstops [2], but we don't need a column separator at the end
of each line.

[1]: https://golang.org/pkg/text/tabwriter/
[2]: http://nickgravgaard.com/elastic-tabstops/index.html

Licence: MIT
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-06-09 06:23:44 -07:00
feba3e1da5 Merge pull request #1334 from ipfs/patch/patch
'key' objects dont marshal to json well
2015-06-08 13:36:11 -07:00
c214210354 add some basic testing for object patch 2015-06-08 10:19:26 -07:00
b4f55d337a 'key' objects dont marshal to json well 2015-06-08 10:19:26 -07:00
217fe2687c Merge pull request #1287 from ipfs/feat/httpApiTcpPort0
httpGw: make /tcp/0 work
2015-06-08 03:46:35 -07:00
4b337bb7e8 daemon: addressed CR comments 2015-06-08 11:08:10 +02:00
07b3415cdb http endpoints: dont print before listen
also splits api, gw and fuse bring up into helper functions
2015-06-08 10:56:05 +02:00
aad700bd6d Merge pull request #1342 from ipfs/observe-addr-twice
Better symmetric NAT avoidance.
2015-06-07 18:14:52 -07:00
500bb51759 p2p/net/identify: clump addr observers into groups
Different mutliaddrs is not enough. Nodes may share transports.
NAT port mappings will likely only work on the base IP/TCP port
pair. We go one step further, and require different root (IP)
addrs. Just in case some NATs group by IP. In practice, this is
what we want: use addresses only if hosts that are on different
parts of the network have seen this address.
2015-06-07 17:00:56 -07:00
96ed20bffe p2p/protocol/identify: dont double count observers
If the same peer observed the same address twice, it would be
double counted as different observations. This change adds a map
to make sure we're counting each observer once.

This is easily extended to require more than two observations,
but i have not yet encountered NATs for whom this is relevant.
2015-06-07 16:48:02 -07:00
39716077b4 Merge pull request #1341 from ipfs/use-go-sleep
Use github.com/chriscool/go-sleep
2015-06-07 03:58:53 -07:00
14a3315dc7 sharness/test-lib: use go-sleep to sleep
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-07 10:29:08 +02:00
fd449af227 test/Makefile: build go-sleep
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-07 10:28:13 +02:00
268894c85f Merge pull request #1340 from harlantwood/patch-1
fix typo
2015-06-06 21:31:15 -07:00
553960d413 Merge pull request #1339 from ipfs/update-cheggaaa-pb
Godeps: update cheggaaa/pb to the latest version
2015-06-06 16:35:49 -07:00
d4e0ad97df Vendor github.com/chriscool/go-sleep
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-06 23:07:21 +02:00
e82e5cd87e fix typo 2015-06-06 13:42:54 -07:00
24de361001 Godeps: update cheggaaa/pb to the latest version
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-06-05 23:48:17 +02:00