Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ipfs/kubo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 34672732c31f^
Choose a base ref
...
head repository: ipfs/kubo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 54b6f8c453d1
Choose a head ref
  • 7 commits
  • 8 files changed
  • 2 contributors

Commits on Jan 24, 2016

  1. Test FUSE on travis-ci

    License: MIT
    Signed-off-by: Andres Buritica <andres@thelinuxkid.com>
    thelinuxkid committed Jan 24, 2016
    Copy the full SHA
    3467273 View commit details
  2. Setup offline routing for fuse mount

    License: MIT
    Signed-off-by: Andres Buritica <andres@thelinuxkid.com>
    thelinuxkid committed Jan 24, 2016
    Copy the full SHA
    b891dfd View commit details
  3. Add TEST_NO_IPV6 test flag

    The current Travis Trusty build does not have ipv6 support
    
    License: MIT
    Signed-off-by: Andres Buritica <andres@thelinuxkid.com>
    thelinuxkid committed Jan 24, 2016
    Copy the full SHA
    fcaaf9e View commit details
  4. Add osx fuse support for travis-ci

    License: MIT
    Signed-off-by: Andres Buritica <andres@thelinuxkid.com>
    thelinuxkid committed Jan 24, 2016
    Copy the full SHA
    4a45895 View commit details
  5. Do no exclude ipv6 travis tests is osx

    License: MIT
    Signed-off-by: Andres Buritica <andres@thelinuxkid.com>
    thelinuxkid committed Jan 24, 2016
    Copy the full SHA
    ec19125 View commit details
  6. No error if PrivateKey is already loaded

    License: MIT
    Signed-off-by: Andres Buritica <andres@thelinuxkid.com>
    thelinuxkid committed Jan 24, 2016
    Copy the full SHA
    6ea702c View commit details
  7. .travis: remove 'dist: trusty'

    License: MIT
    Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
    chriscool committed Jan 24, 2016
    Copy the full SHA
    54b6f8c View commit details
Showing with 40 additions and 12 deletions.
  1. +11 −5 .travis.yml
  2. +7 −0 .travis/before_install-linux.sh
  3. +6 −0 .travis/before_install-osx.sh
  4. +5 −2 Makefile
  5. +4 −4 core/core.go
  6. +4 −0 fuse/ipns/mount_unix.go
  7. +2 −0 p2p/net/swarm/dial_test.go
  8. +1 −1 p2p/net/swarm/swarm_listen.go
16 changes: 11 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# dist: trusty # KVM Setup
# dist: trusty

sudo: required

os:
- linux
- osx

go_import_path: github.com/ipfs/go-ipfs

language: go

go:
- 1.5.2

before_install:
- if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]; then . ./.travis/before_install-linux.sh; fi
- if [ ${TRAVIS_OS_NAME:-'linux'} = 'osx' ]; then . ./.travis/before_install-osx.sh; fi

env:
- TEST_NO_FUSE=1 TEST_VERBOSE=1 TEST_SUITE=test_go_expensive
- TEST_NO_FUSE=1 TEST_VERBOSE=1 TEST_SUITE=test_sharness_expensive
- if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]; then TEST_NO_IPV6=1; fi TEST_VERBOSE=1 TEST_SUITE=test_go_expensive
- if [ ${TRAVIS_OS_NAME:-'linux'} = 'linux' ]; then TEST_NO_IPV6=1; fi TEST_VERBOSE=1 TEST_SUITE=test_sharness_expensive

script:
- make $TEST_SUITE

# For docker containers

sudo: required

services:
- docker
7 changes: 7 additions & 0 deletions .travis/before_install-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -ev

sudo apt-get install -qq pkg-config fuse
sudo modprobe fuse
sudo chmod 666 /dev/fuse
sudo chown root:$USER /etc/fuse.conf
6 changes: 6 additions & 0 deletions .travis/before_install-osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -ev

brew update
brew tap caskroom/cask
brew cask install osxfuse
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

ifeq ($(TEST_NO_FUSE),1)
ifeq ($(TEST_NO_FUSE)$(TEST_NO_IPV6), 11)
go_test=go test -tags 'nofuse noipv6'
else ifeq ($(TEST_NO_FUSE),1)
go_test=go test -tags nofuse
else ifeq ($(TEST_NO_IPV6),1)
go_test=go test -tags noipv6
else
go_test=go test
endif
8 changes: 4 additions & 4 deletions core/core.go
Original file line number Diff line number Diff line change
@@ -434,12 +434,12 @@ func (n *IpfsNode) loadID() error {
}

func (n *IpfsNode) LoadPrivateKey() error {
if n.Identity == "" || n.Peerstore == nil {
return errors.New("loaded private key out of order.")
if n.PrivateKey != nil {
return nil
}

if n.PrivateKey != nil {
return errors.New("private key already loaded")
if n.Identity == "" || n.Peerstore == nil {
return errors.New("loaded private key out of order.")
}

cfg, err := n.Repo.Config()
4 changes: 4 additions & 0 deletions fuse/ipns/mount_unix.go
Original file line number Diff line number Diff line change
@@ -17,6 +17,10 @@ func Mount(ipfs *core.IpfsNode, ipnsmp, ipfsmp string) (mount.Mount, error) {

allow_other := cfg.Mounts.FuseAllowOther

if err := ipfs.SetupOfflineRouting(); err != nil {
log.Errorf("failed to setup offline routing: %s", err)
}

fsys, err := NewFileSystem(ipfs, ipfs.PrivateKey, ipfsmp, ipnsmp)
if err != nil {
return nil, err
2 changes: 2 additions & 0 deletions p2p/net/swarm/dial_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build !noipv6

package swarm

import (
2 changes: 1 addition & 1 deletion p2p/net/swarm/swarm_listen.go
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ func (s *Swarm) setupInterfaces(addrs []ma.Multiaddr) error {

for i, e := range errs {
if e != nil {
log.Warning("listen on %s failed: %s", addrs[i], errs[i])
log.Warningf("listen on %s failed: %s", addrs[i], errs[i])
}
}
if succeeded == 0 && len(addrs) > 0 {