Author: Jelmer Vernooij <jelmer@debian.org>
Description: Remove dependency on bitbucket.org/kardianos/osext
  osext is not packaged in Debian.

--- a/log/logger.go
+++ b/log/logger.go
@@ -17,12 +17,34 @@ package log
 // based on previous package by: Cong Ding <dinggnu@gmail.com>
 
 import (
-	"github.com/kardianos/osext"
+	"errors"
 	"os"
 	"path"
+	"path/filepath"
+	"runtime"
 	"time"
 )
 
+func executable() (string, error) {
+	switch runtime.GOOS {
+	case "linux":
+	        return os.Readlink("/proc/self/exe")
+	case "netbsd":
+	        return os.Readlink("/proc/curproc/exe")
+	case "openbsd":
+	        return os.Readlink("/proc/curproc/file")
+	}
+	return "", errors.New("ExecPath not implemented for " + runtime.GOOS)
+}
+
+// Executable returns an absolute path that can be used to
+// re-invoke the current program.
+// It may not be valid after the current program exits.
+func Executable() (string, error) {
+	p, err := executable()
+	return filepath.Clean(p), err
+}
+
 // Logger is user-immutable immutable struct which can log to several outputs
 type Logger struct {
 	sinks   []Sink // the sinks this logger will log to
@@ -52,7 +74,7 @@ func New(prefix string, verbose bool, si
 }
 
 func getExecutableName() string {
-	executablePath, err := osext.Executable()
+	executablePath, err := Executable()
 	if err != nil {
 		return "(UNKNOWN)"
 	} else {
