diff options
author | cs <cs@FreeBSD.org> | 2014-09-04 04:09:52 +0800 |
---|---|---|
committer | cs <cs@FreeBSD.org> | 2014-09-04 04:09:52 +0800 |
commit | b7c4375e61b65cd61af885a44faf8f86e7dc0b6a (patch) | |
tree | 03cb9ea310ca9c624033f32417cdc06bc8ec41c4 | |
parent | 0b23dc70208177c32e64cb436fef3c43e7f12690 (diff) | |
download | freebsd-ports-gnome-b7c4375e61b65cd61af885a44faf8f86e7dc0b6a.tar.gz freebsd-ports-gnome-b7c4375e61b65cd61af885a44faf8f86e7dc0b6a.tar.zst freebsd-ports-gnome-b7c4375e61b65cd61af885a44faf8f86e7dc0b6a.zip |
Update to 20140824
-rw-r--r-- | security/pond/Makefile | 49 | ||||
-rw-r--r-- | security/pond/distinfo | 12 | ||||
-rw-r--r-- | security/pond/files/main_freebsd.go | 73 | ||||
-rw-r--r-- | security/pond/files/patch-client-cli-input.go | 15 | ||||
-rw-r--r-- | security/pond/files/patch-client-cli.go | 33 | ||||
-rw-r--r-- | security/pond/files/sys_freebsd.go | 138 |
6 files changed, 30 insertions, 290 deletions
diff --git a/security/pond/Makefile b/security/pond/Makefile index 005a639d7f56..8affa27714b0 100644 --- a/security/pond/Makefile +++ b/security/pond/Makefile @@ -1,20 +1,19 @@ # $FreeBSD$ PORTNAME= pond -PORTVERSION= 20140120 -PORTREVISION= 1 +PORTVERSION= 20140824 CATEGORIES= security MASTER_SITES= http://c-s.li/ports/ -DISTFILES= pond-20140120.tar.gz \ - go-gtk-20131128.tar.gz \ - ed25519-20131225.tar.gz +DISTFILES= pond-20140824.tar.gz \ + go-gtk-20140629.tar.gz \ + ed25519-20140215.tar.gz MAINTAINER= cs@FreeBSD.org COMMENT= Forward secure, asynchronous messenger LICENSE= BSD3CLAUSE -BUILD_DEPENDS= ${LOCALBASE}/${GO_LIBDIR}/code.google.com/p/go.crypto/bcrypt.a:${PORTSDIR}/security/go.crypto \ +BUILD_DEPENDS= ${LOCALBASE}/${GO_LIBDIR}/code.google.com/p/go.crypto/bcrypt.a>=20140828:${PORTSDIR}/security/go.crypto \ ${LOCALBASE}/${GO_LIBDIR}/code.google.com/p/goprotobuf/proto.a:${PORTSDIR}/devel/goprotobuf \ ${LOCALBASE}/${GO_LIBDIR}/code.google.com/p/go.net/dict.a:${PORTSDIR}/net/go.net RUN_DEPENDS= tor:${PORTSDIR}/security/tor @@ -22,39 +21,39 @@ LIB_DEPENDS= libgtkspell.so:${PORTSDIR}/textproc/gtkspell \ libtspi.so:${PORTSDIR}/security/trousers IGNORE= Experimental. Know what you do! -PLIST_FILES= bin/server bin/client +PLIST_FILES= bin/pond-server bin/pond USE_GNOME= gtk30 GO_PKGNAME= github.com/agl/pond -GO_TARGET= ${GO_PKGNAME}/server \ - ${GO_PKGNAME}/client +GO_TARGET= ${GO_PKGNAME}/pond-server \ + ${GO_PKGNAME}/pond post-extract: @${MKDIR} ${GO_WRKSRC:H} - @${CP} files/sys_freebsd.go ${WRKSRC}/client/system/sys_freebsd.go - @${CP} files/main_freebsd.go ${WRKSRC}/client/main_freebsd.go @${LN} -sf ${WRKSRC} ${GO_WRKSRC} - @${LN} -sf ${WRKDIR}/go-gtk-20131128 ${GO_WRKDIR_SRC}/github.com/agl/go-gtk - @${LN} -sf ${WRKDIR}/ed25519-20131225 ${GO_WRKDIR_SRC}/github.com/agl/ed25519 + @${LN} -sf ${WRKSRC}/client ${WRKSRC}/pond + @${LN} -sf ${WRKSRC}/server ${WRKSRC}/pond-server + @${LN} -sf ${WRKDIR}/go-gtk-20140629 ${GO_WRKDIR_SRC}/github.com/agl/go-gtk + @${LN} -sf ${WRKDIR}/ed25519-20140215 ${GO_WRKDIR_SRC}/github.com/agl/ed25519 post-patch: @${REINPLACE_CMD} -e 's|\<gdk|\<gtk-3.0\/gdk|g' \ - ${WRKDIR}/go-gtk-20131128/gdk/gdk.go \ - ${WRKDIR}/go-gtk-20131128/gdk/gdk_linux.go \ - ${WRKDIR}/go-gtk-20131128/gdk/gdk_windows.go \ - ${WRKDIR}/go-gtk-20131128/gtk/gtk.go + ${WRKDIR}/go-gtk-20140629/gdk/gdk.go \ + ${WRKDIR}/go-gtk-20140629/gdk/gdk_linux.go \ + ${WRKDIR}/go-gtk-20140629/gdk/gdk_windows.go \ + ${WRKDIR}/go-gtk-20140629/gtk/gtk.go @${REINPLACE_CMD} -e 's|\<pango|\<pango-1.0\/pango|g' \ - ${WRKDIR}/go-gtk-20131128/pango/pango.go + ${WRKDIR}/go-gtk-20140629/pango/pango.go @${REINPLACE_CMD} -e 's|\<gtk|\<gtk-3.0\/gtk|g' \ - ${WRKDIR}/go-gtk-20131128/gtk/gtk.go \ - ${WRKDIR}/go-gtk-20131128/gtkspell/gtkspell_fedora.go \ - ${WRKDIR}/go-gtk-20131128/gtkspell/gtkspell_ubuntu.go + ${WRKDIR}/go-gtk-20140629/gtk/gtk.go \ + ${WRKDIR}/go-gtk-20140629/gtkspell/gtkspell_fedora.go \ + ${WRKDIR}/go-gtk-20140629/gtkspell/gtkspell_ubuntu.go @${REINPLACE_CMD} -e 's|\<glib|\<glib-2.0\/glib|g' \ - ${WRKDIR}/go-gtk-20131128/glib/glib.go + ${WRKDIR}/go-gtk-20140629/glib/glib.go @${REINPLACE_CMD} -e 's|\<gdk-pixbuf|\<gdk-pixbuf-2.0\/gdk-pixbuf|g' \ - ${WRKDIR}/go-gtk-20131128/gdkpixbuf/gdkpixbuf.go + ${WRKDIR}/go-gtk-20140629/gdkpixbuf/gdkpixbuf.go @${REINPLACE_CMD} -e 's|\<gtkspell|\<gtkspell-2.0\/gtkspell|g' \ - ${WRKDIR}/go-gtk-20131128/gtkspell/gtkspell_fedora.go \ - ${WRKDIR}/go-gtk-20131128/gtkspell/gtkspell_ubuntu.go + ${WRKDIR}/go-gtk-20140629/gtkspell/gtkspell_fedora.go \ + ${WRKDIR}/go-gtk-20140629/gtkspell/gtkspell_ubuntu.go do-build: @(cd ${GO_WRKSRC}; ${SETENV} ${GO_ENV} ${GO_CMD} install -tags nogui -v ${GO_TARGET}) diff --git a/security/pond/distinfo b/security/pond/distinfo index 2639d17533b2..6b476594b588 100644 --- a/security/pond/distinfo +++ b/security/pond/distinfo @@ -1,6 +1,6 @@ -SHA256 (pond-20140120.tar.gz) = 22e3a69535b76d548cfec62bb18e5b33a5920fc53dbb02b1ca010741c58129ec -SIZE (pond-20140120.tar.gz) = 1049433 -SHA256 (ed25519-20131225.tar.gz) = 6cd982fc6d93fd47b650e8922ab66fa64f40d395ddb5879497dbd8aa0c3c8c6d -SIZE (ed25519-20131225.tar.gz) = 105671 -SHA256 (go-gtk-20131128.tar.gz) = 505452cfb7972a49e6960ad26a48c743d02598113b44e1fe0d5b9ee2a20719a4 -SIZE (go-gtk-20131128.tar.gz) = 206393 +SHA256 (pond-20140824.tar.gz) = a75a442ba36ed2baee23768cef2412355d6d96b7cdf08e3c65bb991e4147a02c +SIZE (pond-20140824.tar.gz) = 1056699 +SHA256 (go-gtk-20140629.tar.gz) = 9ae95725a7ea0d7b0397447f36dc7f274ce17be67a7e28104bd6e08aa67143ed +SIZE (go-gtk-20140629.tar.gz) = 206490 +SHA256 (ed25519-20140215.tar.gz) = e65f38ba055a8ce92764486a2b5b2a390793ed61c5c5b00f4e56ce88a9c03f9c +SIZE (ed25519-20140215.tar.gz) = 105713 diff --git a/security/pond/files/main_freebsd.go b/security/pond/files/main_freebsd.go deleted file mode 100644 index 7f59fb589b5d..000000000000 --- a/security/pond/files/main_freebsd.go +++ /dev/null @@ -1,73 +0,0 @@ -package main - -import ( - "crypto/rand" - "encoding/binary" - "flag" - "fmt" - "os" - "path/filepath" - "runtime" - - "code.google.com/p/go.crypto/scrypt" -) - -func main() { - stateFile := flag.String("state-file", "", "File in which to save persistent state") - pandaScrypt := flag.Bool("panda-scrypt", false, "Run in subprocess mode to process passphrase") - cliFlag := flag.Bool("cli", false, "If true, the CLI will be used, even if the GUI is available") - devFlag := flag.Bool("dev", false, "Is this a development environment?") - flag.Parse() - - if *pandaScrypt { - var numBytes uint32 - if err := binary.Read(os.Stdin, binary.LittleEndian, &numBytes); err != nil { - panic(err) - } - if numBytes > 1024*1024 { - panic("passphrase too large") - } - passphrase := make([]byte, int(numBytes)) - if _, err := os.Stdin.Read(passphrase); err != nil { - panic(err) - } - data, err := scrypt.Key(passphrase, nil, 1<<17, 16, 4, 32*3) - if err != nil { - panic(err) - } - os.Stdout.Write(data) - os.Exit(0) - } - - dev := os.Getenv("POND") == "dev" || *devFlag - runtime.GOMAXPROCS(4) - - if len(*stateFile) == 0 && dev { - *stateFile = "state" - } - - if len(*stateFile) == 0 { - home := os.Getenv("HOME") - if len(home) == 0 { - fmt.Fprintf(os.Stderr, "$HOME not set. Please either export $HOME or use --state-file to set the location of the state file explicitly.\n") - os.Exit(1) - } - configDir := filepath.Join(home, ".config") - os.Mkdir(configDir, 0700) - *stateFile = filepath.Join(configDir, "pond") - } - - if !haveGUI || *cliFlag || len(os.Getenv("PONDCLI")) > 0 { - client := NewCLIClient(*stateFile, rand.Reader, false /* testing */, true /* autoFetch */) - client.disableV2Ratchet = true - client.dev = dev - client.Start() - } else { - ui := NewGTKUI() - client := NewGUIClient(*stateFile, ui, rand.Reader, false /* testing */, true /* autoFetch */) - client.disableV2Ratchet = true - client.dev = dev - client.Start() - ui.Run() - } -} diff --git a/security/pond/files/patch-client-cli-input.go b/security/pond/files/patch-client-cli-input.go deleted file mode 100644 index be88da44ea24..000000000000 --- a/security/pond/files/patch-client-cli-input.go +++ /dev/null @@ -1,15 +0,0 @@ ---- client/cli-input.go.orig 2014-01-20 16:38:38.000000000 +0000 -+++ client/cli-input.go 2014-01-24 23:58:07.000000000 +0000 -@@ -350,12 +350,6 @@ - i.commands.Insert(command.name) - } - -- autoCompleteCallback := func(line string, pos int, key rune) (string, int, bool) { -- return i.AutoComplete(line, pos, key) -- } -- -- i.term.AutoCompleteCallback = autoCompleteCallback -- - var ackChan chan struct{} - - for { diff --git a/security/pond/files/patch-client-cli.go b/security/pond/files/patch-client-cli.go deleted file mode 100644 index e36208f95d69..000000000000 --- a/security/pond/files/patch-client-cli.go +++ /dev/null @@ -1,33 +0,0 @@ ---- client/cli.go.orig 2014-01-20 16:38:38.000000000 +0000 -+++ client/cli.go 2014-01-24 23:57:44.000000000 +0000 -@@ -105,12 +105,6 @@ - } - - func (c *cliClient) Start() { -- oldState, err := terminal.MakeRaw(0) -- if err != nil { -- panic(err.Error()) -- } -- defer terminal.Restore(0, oldState) -- - signal.Notify(make(chan os.Signal), os.Interrupt) - - wrapper, interruptChan := NewTerminalWrapper(os.Stdin) -@@ -119,9 +113,6 @@ - c.termWrapper = wrapper - - c.term = terminal.NewTerminal(wrapper, "> ") -- if width, height, err := terminal.GetSize(0); err == nil { -- c.term.SetSize(width, height) -- } - - c.loadUI() - -@@ -1883,7 +1874,6 @@ - }, - cliIdsAssigned: make(map[cliId]bool), - } -- c.ui = c - - c.newMeetingPlace = func() panda.MeetingPlace { - return &panda.HTTPMeetingPlace{ diff --git a/security/pond/files/sys_freebsd.go b/security/pond/files/sys_freebsd.go deleted file mode 100644 index d8a1efb0aa7d..000000000000 --- a/security/pond/files/sys_freebsd.go +++ /dev/null @@ -1,138 +0,0 @@ -package system - -import ( - "bufio" - "bytes" - "errors" - "io" - "io/ioutil" - "os" - "strings" - "sync" - "syscall" -) - -func processLines(filename string, f func(line string) error) error { - contents, err := ioutil.ReadFile(filename) - if err != nil { - return err - } - - file := bufio.NewReader(bytes.NewBuffer(contents)) - for { - line, isPrefix, err := file.ReadLine() - if err == io.EOF { - break - } - if err != nil { - return err - } - if isPrefix { - return errors.New("file contains a line that it too long to process") - } - if err = f(string(line)); err != nil { - return err - } - } - - return nil -} - -// IsSafe checks to see whether the current OS appears to be safe. Specifically -// it checks that any swap is encrypted. -func IsSafe() error { - lineNo := 0 - err := processLines("/proc/swaps", func(line string) error { - lineNo++ - if lineNo == 1 { - // First line is just headings. - return nil - } - fields := strings.Fields(line) - if len(fields) < 1 { - return nil - } - device := fields[0] - if strings.Contains(device, "/mapper/") || strings.Contains(device, "/dm-") { - // We don't have permissions to introspect the mapper - // device, so we have to assume that it's encrypted. - return nil - } - - return errors.New("swapping is active on " + device + " which doesn't appear to be encrypted") - }) - - if err != nil { - return errors.New("system: while checking /proc/swaps: " + err.Error()) - } - return nil -} - -var ( - safeTempDir string - safeTempDirErr error - safeTempDirOnce sync.Once -) - -func findSafeTempDir() { - var candidates []string - - err := processLines("/proc/mounts", func(line string) error { - fields := strings.Fields(line) - if len(fields) < 1 { - return nil - } - path := fields[1] - filesystem := fields[2] - if filesystem == "tmpfs" && - syscall.Access(path, 7 /* rwx ok */) == nil { - candidates = append(candidates, path) - } - - return nil - }) - - if err == nil && len(candidates) == 0 { - err = errors.New("no writable tmpfs directories found") - } - - if err != nil { - safeTempDirErr = errors.New("system: while checking /proc/mounts: " + err.Error()) - return - } - - suggested := os.TempDir() - preferred := []string{suggested} - var otherOptions []string - if dir := os.Getenv("XDG_RUNTIME_DIR"); len(dir) > 0 { - otherOptions = append(otherOptions, dir) - } - otherOptions = append(otherOptions, "/tmp", "/var/tmp") - for _, d := range otherOptions { - if suggested != d { - preferred = append(preferred, d) - } - } - - for _, d := range preferred { - for _, candidate := range candidates { - if candidate == d { - safeTempDir = candidate - return - } - } - } - - safeTempDir = candidates[0] -} - -// SafeTempDir returns the path of a writable directory which is mounted with -// tmpfs. As long as the swap is encrypted, then it should be safe to write -// there. -func SafeTempDir() (string, error) { - safeTempDirOnce.Do(findSafeTempDir) - if safeTempDirErr != nil { - return "", safeTempDirErr - } - return safeTempDir, nil -} |