pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/security/lastpass-cli



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Wed Aug 16 15:18:24 UTC 2017

Added Files:
        pkgsrc/security/lastpass-cli: DESCR Makefile PLIST distinfo
        pkgsrc/security/lastpass-cli/patches: patch-CMakeLists.txt
            patch-agent.c patch-clipboard.c
            patch-cmake__extras_install__doc.cmake patch-http.c
            patch-password.c patch-process.c patch-upload-queue.c

Log Message:
Import lastpass-cli version 1.2.1 as security/lastpass-cli.

LastPass is a password management service that stores encrypted passwords
in private accounts.  LastPass is standard with a web interface, but also
includes plugins for many web browsers and apps for many smartphones.

This package provides the lpass command, a command line interface to the
LastPass.com API.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/security/lastpass-cli/DESCR \
    pkgsrc/security/lastpass-cli/Makefile pkgsrc/security/lastpass-cli/PLIST \
    pkgsrc/security/lastpass-cli/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/security/lastpass-cli/patches/patch-CMakeLists.txt \
    pkgsrc/security/lastpass-cli/patches/patch-agent.c \
    pkgsrc/security/lastpass-cli/patches/patch-clipboard.c \
    pkgsrc/security/lastpass-cli/patches/patch-cmake__extras_install__doc.cmake \
    pkgsrc/security/lastpass-cli/patches/patch-http.c \
    pkgsrc/security/lastpass-cli/patches/patch-password.c \
    pkgsrc/security/lastpass-cli/patches/patch-process.c \
    pkgsrc/security/lastpass-cli/patches/patch-upload-queue.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/security/lastpass-cli/DESCR
diff -u /dev/null pkgsrc/security/lastpass-cli/DESCR:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/DESCR  Wed Aug 16 15:18:24 2017
@@ -0,0 +1,6 @@
+LastPass is a password management service that stores encrypted passwords
+in private accounts.  LastPass is standard with a web interface, but also
+includes plugins for many web browsers and apps for many smartphones.
+
+This package provides the lpass command, a command line interface to the
+LastPass.com API.
Index: pkgsrc/security/lastpass-cli/Makefile
diff -u /dev/null pkgsrc/security/lastpass-cli/Makefile:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/Makefile       Wed Aug 16 15:18:24 2017
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.1 2017/08/16 15:18:24 jperkin Exp $
+
+DISTNAME=      lastpass-cli-1.2.1
+CATEGORIES=    security
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=lastpass/}
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/lastpass/lastpass-cli/
+COMMENT=       Command line interface to LastPass.com
+LICENSE=       gnu-gpl-v2
+
+DEPENDS+=      asciidoc>=0:../../textproc/asciidoc
+
+USE_CMAKE=     yes
+USE_LANGUAGES= c c++
+USE_TOOLS=     pkg-config
+
+INSTALL_TARGET=        install install-doc
+
+.include "../../security/openssl/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/security/lastpass-cli/PLIST
diff -u /dev/null pkgsrc/security/lastpass-cli/PLIST:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/PLIST  Wed Aug 16 15:18:24 2017
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2017/08/16 15:18:24 jperkin Exp $
+bin/lpass
+man/man1/lpass.1
Index: pkgsrc/security/lastpass-cli/distinfo
diff -u /dev/null pkgsrc/security/lastpass-cli/distinfo:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/distinfo       Wed Aug 16 15:18:24 2017
@@ -0,0 +1,14 @@
+$NetBSD: distinfo,v 1.1 2017/08/16 15:18:24 jperkin Exp $
+
+SHA1 (lastpass-cli-1.2.1.tar.gz) = 78f05426ac14417004735d85554f5641c567234e
+RMD160 (lastpass-cli-1.2.1.tar.gz) = 86752841a6df70856411bbb3b516669583500838
+SHA512 (lastpass-cli-1.2.1.tar.gz) = c7c9f20dbc083873b815834320828a30a1c488571efbfc5aea47c3bd2073819d713810c785855d4c0c208e1b95aa0e5fc550a0b6b5c0f787eca1f54589e18e62
+Size (lastpass-cli-1.2.1.tar.gz) = 108780 bytes
+SHA1 (patch-CMakeLists.txt) = d5498e06f9fed58186caf3b2ed60c2d30ec43caa
+SHA1 (patch-agent.c) = 2e04b136da6116f80d1a1bfa9b831ccba3e3f215
+SHA1 (patch-clipboard.c) = 1c0d7c7cf2f80f21e900257e82736f57b1a8fc0e
+SHA1 (patch-cmake__extras_install__doc.cmake) = a0d80f60501ac283d66402ef036d6934ea644f17
+SHA1 (patch-http.c) = 6027b06014d5f3c290f55a8086a493d30bdf9023
+SHA1 (patch-password.c) = 9d7daba95ebf62b243ccf8696add8afc24c8bb3e
+SHA1 (patch-process.c) = 565a9d8ea4d08194c15e0e7898b1dd273b1b6f2f
+SHA1 (patch-upload-queue.c) = 45279b48d53f6f9683d3e14c58c4f5ec4c5e89ba

Index: pkgsrc/security/lastpass-cli/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/security/lastpass-cli/patches/patch-CMakeLists.txt:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/patches/patch-CMakeLists.txt   Wed Aug 16 15:18:24 2017
@@ -0,0 +1,32 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2017/08/16 15:18:24 jperkin Exp $
+
+Link against libsocket on SunOS.
+Remove non-portable compiler warning flags.
+
+--- CMakeLists.txt.orig        2017-06-28 12:50:49.000000000 +0000
++++ CMakeLists.txt
+@@ -45,10 +45,13 @@ file(GLOB PROJECT_SOURCES *.c)
+ 
+ set(PROJECT_DEFINITIONS "_GNU_SOURCE")
+ 
+-set(PROJECT_FLAGS "-std=gnu99 -pedantic -Wall -Wextra -Wno-language-extension-token")
++set(PROJECT_FLAGS "-std=gnu99 -pedantic -Wall -Wextra")
+ if(APPLE)
+   set(PROJECT_FLAGS "${PROJECT_FLAGS} -Wno-deprecated-declarations")
+ endif()
++if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
++  set(PROJECT_FLAGS "${PROJECT_FLAGS} -D_XOPEN_SOURCE=600 -D__EXTENSIONS__")
++endif (CMAKE_SYSTEM_NAME MATCHES "SunOS")
+ 
+ # Main lpass executable
+ add_executable(${PROJECT_NAME} ${PROJECT_HEADERS} ${PROJECT_SOURCES})
+@@ -62,6 +65,9 @@ target_link_libraries(${PROJECT_NAME} ${
+ if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+   target_link_libraries(${PROJECT_NAME} "-lkvm")
+ endif (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
++if (CMAKE_SYSTEM_NAME MATCHES "SunOS")
++  target_link_libraries(${PROJECT_NAME} "-lsocket")
++endif (CMAKE_SYSTEM_NAME MATCHES "SunOS")
+ 
+ add_custom_command(OUTPUT lpass.1 DEPENDS ${CMAKE_SOURCE_DIR}/lpass.1.txt
+         COMMAND a2x -D ./ --no-xmllint -f manpage ${CMAKE_SOURCE_DIR}/lpass.1.txt)
Index: pkgsrc/security/lastpass-cli/patches/patch-agent.c
diff -u /dev/null pkgsrc/security/lastpass-cli/patches/patch-agent.c:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/patches/patch-agent.c  Wed Aug 16 15:18:24 2017
@@ -0,0 +1,40 @@
+$NetBSD: patch-agent.c,v 1.1 2017/08/16 15:18:24 jperkin Exp $
+
+Use getpeerucred on SunOS.
+
+--- agent.c.orig       2017-06-28 12:50:49.000000000 +0000
++++ agent.c
+@@ -49,6 +49,12 @@
+ #include <sys/mman.h>
+ #include <errno.h>
+ #include <signal.h>
++#ifdef __sun
++#define _STRUCTURED_PROC 1
++#include <ucred.h>
++#include <sys/procfs.h>
++#include <sys/ucred.h>
++#endif
+ #if (defined(__unix__) || defined(unix)) && !defined(USG)
+ #include <sys/param.h>
+ #endif
+@@ -123,6 +129,20 @@ static int agent_socket_get_cred(int fd,
+       socklen_t credlen = sizeof(struct ucred);
+       return getsockopt(fd, SOL_SOCKET, SO_PEERCRED, cred, &credlen);
+ }
++#elif defined(__sun)
++static int agent_socket_get_cred(int fd, struct ucred *cred)
++{
++      ucred_t *uc;
++
++      if (getpeerucred(fd, &uc) < 0)
++              return -1;
++
++      cred->uid = ucred_geteuid(uc);
++      cred->gid = ucred_getegid(uc);
++      cred->pid = ucred_getpid(uc);
++
++      return 0;
++}
+ #elif defined(__APPLE__) && defined(__MACH__) || defined(BSD)
+ static int agent_socket_get_cred(int fd, struct ucred *cred)
+ {
Index: pkgsrc/security/lastpass-cli/patches/patch-clipboard.c
diff -u /dev/null pkgsrc/security/lastpass-cli/patches/patch-clipboard.c:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/patches/patch-clipboard.c      Wed Aug 16 15:18:24 2017
@@ -0,0 +1,30 @@
+$NetBSD: patch-clipboard.c,v 1.1 2017/08/16 15:18:24 jperkin Exp $
+
+Avoid "Missing sentinel in function call" warnings.
+
+--- clipboard.c.orig   2017-06-28 12:50:49.000000000 +0000
++++ clipboard.c
+@@ -64,7 +64,7 @@ void exec_command(char *command) {
+               shell = "/bin/sh";
+       }
+ 
+-      execlp(shell, shell, "-c", command, NULL);
++      execlp(shell, shell, "-c", command, (char *)0);
+ }
+ 
+ void clipboard_open(void)
+@@ -91,10 +91,10 @@ void clipboard_open(void)
+                       exec_command(clipboard_command);
+                       die("Unable to copy contents to clipboard. Please make sure you have `xclip`, `xsel`, `pbcopy`, or `putclip` installed.");
+               } else {
+-                      execlp("xclip", "xclip", "-selection", "clipboard", "-in", NULL);
+-                      execlp("xsel", "xsel", "--clipboard", "--input", NULL);
+-                      execlp("pbcopy", "pbcopy", NULL);
+-                      execlp("putclip", "putclip", "--dos", NULL);
++                      execlp("xclip", "xclip", "-selection", "clipboard", "-in", (char *)0);
++                      execlp("xsel", "xsel", "--clipboard", "--input", (char *)0);
++                      execlp("pbcopy", "pbcopy", (char *)0);
++                      execlp("putclip", "putclip", "--dos", (char *)0);
+                       die("Unable to copy contents to clipboard. Please make sure you have `xclip`, `xsel`, `pbcopy`, or `putclip` installed.");
+               }
+       }
Index: pkgsrc/security/lastpass-cli/patches/patch-cmake__extras_install__doc.cmake
diff -u /dev/null pkgsrc/security/lastpass-cli/patches/patch-cmake__extras_install__doc.cmake:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/patches/patch-cmake__extras_install__doc.cmake Wed Aug 16 15:18:24 2017
@@ -0,0 +1,11 @@
+$NetBSD: patch-cmake__extras_install__doc.cmake,v 1.1 2017/08/16 15:18:24 jperkin Exp $
+
+Remove incompatible -v flag for bsdinstall.
+
+--- cmake_extras/install_doc.cmake.orig        2017-06-28 12:50:49.000000000 +0000
++++ cmake_extras/install_doc.cmake
+@@ -1,2 +1,2 @@
+-execute_process(COMMAND install -v -d $ENV{DESTDIR}${MANDIR}/man1)
+-execute_process(COMMAND install -m 0644 -v ${CMAKE_BINARY_DIR}/lpass.1 $ENV{DESTDIR}${MANDIR}/man1/lpass.1)
++execute_process(COMMAND install -d $ENV{DESTDIR}${MANDIR}/man1)
++execute_process(COMMAND install -m 0644 ${CMAKE_BINARY_DIR}/lpass.1 $ENV{DESTDIR}${MANDIR}/man1/lpass.1)
Index: pkgsrc/security/lastpass-cli/patches/patch-http.c
diff -u /dev/null pkgsrc/security/lastpass-cli/patches/patch-http.c:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/patches/patch-http.c   Wed Aug 16 15:18:24 2017
@@ -0,0 +1,17 @@
+$NetBSD: patch-http.c,v 1.1 2017/08/16 15:18:24 jperkin Exp $
+
+Support sig_t on SunOS.
+
+--- http.c.orig        2017-06-28 12:50:49.000000000 +0000
++++ http.c
+@@ -52,6 +52,10 @@ struct mem_chunk {
+       size_t len;
+ };
+ 
++#ifdef __sun
++typedef void (*sig_t)();
++#endif
++
+ #ifndef TEST_BUILD
+ static bool interrupted = false;
+ static sig_t previous_handler = SIG_DFL;
Index: pkgsrc/security/lastpass-cli/patches/patch-password.c
diff -u /dev/null pkgsrc/security/lastpass-cli/patches/patch-password.c:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/patches/patch-password.c       Wed Aug 16 15:18:24 2017
@@ -0,0 +1,24 @@
+$NetBSD: patch-password.c,v 1.1 2017/08/16 15:18:24 jperkin Exp $
+
+Avoid "Missing sentinel in function call" warnings.
+
+--- password.c.orig    2017-06-28 12:50:49.000000000 +0000
++++ password.c
+@@ -73,7 +73,7 @@ static char *password_prompt_askpass(con
+               close(read_fds[1]);
+               close(write_fds[0]);
+               close(write_fds[1]);
+-              execlp(askpass, "lpass-askpass", prompt, NULL);
++              execlp(askpass, "lpass-askpass", prompt, (char *)0);
+               _exit(76);
+       }
+       close(read_fds[1]);
+@@ -266,7 +266,7 @@ char *password_prompt(const char *prompt
+               close(read_fds[1]);
+               close(write_fds[0]);
+               close(write_fds[1]);
+-              execlp("pinentry", "pinentry", NULL);
++              execlp("pinentry", "pinentry", (char *)0);
+               _exit(76);
+       }
+       close(read_fds[1]);
Index: pkgsrc/security/lastpass-cli/patches/patch-process.c
diff -u /dev/null pkgsrc/security/lastpass-cli/patches/patch-process.c:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/patches/patch-process.c        Wed Aug 16 15:18:24 2017
@@ -0,0 +1,20 @@
+$NetBSD: patch-process.c,v 1.1 2017/08/16 15:18:24 jperkin Exp $
+
+Support pid_to_cmd on SunOS.
+
+--- process.c.orig     2017-06-28 12:50:49.000000000 +0000
++++ process.c
+@@ -83,6 +83,13 @@ static int pid_to_cmd(pid_t pid, char *c
+       xasprintf(&proc, "/proc/%lu/exe", (unsigned long)pid);
+       return readlink(proc, cmd, cmd_size - 1);
+ }
++#elif defined(__sun)
++static int pid_to_cmd(pid_t pid, char *cmd, size_t cmd_size)
++{
++      _cleanup_free_ char *proc;
++      xasprintf(&proc, "/proc/%lu/path/a.out", (unsigned long)pid);
++      return readlink(proc, cmd, cmd_size - 1);
++}
+ #elif defined(__APPLE__) && defined(__MACH__)
+ static int pid_to_cmd(pid_t pid, char *cmd, size_t cmd_size)
+ {
Index: pkgsrc/security/lastpass-cli/patches/patch-upload-queue.c
diff -u /dev/null pkgsrc/security/lastpass-cli/patches/patch-upload-queue.c:1.1
--- /dev/null   Wed Aug 16 15:18:24 2017
+++ pkgsrc/security/lastpass-cli/patches/patch-upload-queue.c   Wed Aug 16 15:18:24 2017
@@ -0,0 +1,40 @@
+$NetBSD: patch-upload-queue.c,v 1.1 2017/08/16 15:18:24 jperkin Exp $
+
+SunOS compatibility.
+
+--- upload-queue.c.orig        2017-06-28 12:50:49.000000000 +0000
++++ upload-queue.c
+@@ -110,8 +110,12 @@ static void upload_queue_cleanup_failure
+ 
+       while ((entry = readdir(dir))) {
+               _cleanup_free_ char *fn = NULL;
+-
++#ifdef __sun
++              stat(entry->d_name, &sbuf);
++              if (sbuf.st_mode != S_IFREG)
++#else
+               if (entry->d_type != DT_REG && entry->d_type != DT_UNKNOWN)
++#endif
+                       continue;
+ 
+               for (p = entry->d_name; *p; ++p) {
+@@ -172,11 +176,19 @@ static char *upload_queue_next_entry(uns
+       char *result, *p;
+       DIR *dir = opendir(base_path);
+       struct dirent *entry;
++#ifdef __sun
++      struct stat s;
++#endif
+ 
+       if (!dir)
+               return NULL;
+       while ((entry = readdir(dir))) {
++#ifdef __sun
++              stat(entry->d_name, &s);
++              if (s.st_mode != S_IFREG)
++#else
+               if (entry->d_type != DT_REG && entry->d_type != DT_UNKNOWN)
++#endif
+                       continue;
+ 
+               for (p = entry->d_name; *p; ++p) {



Home | Main Index | Thread Index | Old Index