From 5aefecefb0fadcc50f269f977a0b0cdb20cfffdf Mon Sep 17 00:00:00 2001 From: c0dev0id Date: Wed, 3 Jan 2024 15:09:47 +0100 Subject: [PATCH] add browserpass-native --- security/browserpass-native/Makefile | 37 ++++++++++++++++++++ security/browserpass-native/distinfo | 46 +++++++++++++++++++++++++ security/browserpass-native/modules.inc | 14 ++++++++ security/browserpass-native/pkg/DESCR | 3 ++ security/browserpass-native/pkg/PLIST | 14 ++++++++ security/browserpass-native/pkg/README | 40 +++++++++++++++++++++ 6 files changed, 154 insertions(+) create mode 100644 security/browserpass-native/Makefile create mode 100644 security/browserpass-native/distinfo create mode 100644 security/browserpass-native/modules.inc create mode 100644 security/browserpass-native/pkg/DESCR create mode 100644 security/browserpass-native/pkg/PLIST create mode 100644 security/browserpass-native/pkg/README diff --git a/security/browserpass-native/Makefile b/security/browserpass-native/Makefile new file mode 100644 index 0000000..d6e5e6c --- /dev/null +++ b/security/browserpass-native/Makefile @@ -0,0 +1,37 @@ +COMMENT = companion app for the chromium browserpass extension + +MODGO_MODNAME = github.com/browserpass/browserpass-native +MODGO_VERSION = v0.0.0-20231004071550-ed246ee62824 + +APP_ID = com.github.browserpass.native + +DISTNAME = browserpass-native-${MODGO_VERSION} +PKGNAME = browserpass-native-20231004071550 + +CATEGORIES = security + +# ISC License +PERMIT_PACKAGE = yes + +# uses pledge() +MODULES = lang/go + +SUBST_VARS += APP_ID + +do-install: + sed -i "s|%%replace%%|${TRUEPREFIX}/share/browserpass/browserpass|g" \ + ${WRKSRC}/browser-files/{firefox,chromium}-host.json + ${INSTALL_DATA_DIR} ${PREFIX}/share/browserpass/{hosts,policies}/{chromium,firefox} + ${INSTALL} ${WRKDIR}/go/bin/browserpass-native ${PREFIX}/share/browserpass/browserpass + ${INSTALL_DATA} ${WRKSRC}/LICENSE ${PREFIX}/share/browserpass + ${INSTALL_DATA} ${WRKSRC}/README.md ${PREFIX}/share/browserpass + ${INSTALL_DATA} ${WRKSRC}/browser-files/chromium-host.json \ + ${PREFIX}/share/browserpass/hosts/chromium/${APP_ID}.json + ${INSTALL_DATA} ${WRKSRC}/browser-files/chromium-policy.json \ + ${PREFIX}/share/browserpass/policies/chromium/${APP_ID}.json + ${INSTALL_DATA} ${WRKSRC}/browser-files/firefox-host.json \ + ${PREFIX}/share/browserpass/hosts/firefox/${APP_ID}.json + +.include "modules.inc" + +.include diff --git a/security/browserpass-native/distinfo b/security/browserpass-native/distinfo new file mode 100644 index 0000000..360d654 --- /dev/null +++ b/security/browserpass-native/distinfo @@ -0,0 +1,46 @@ +SHA256 (browserpass-native-v0.0.0-20231004071550-ed246ee62824.zip) = XIehrPpfv9bA7OL/CH0H7zw6r7Qvti9Ibs+3RRZBYYw= +SHA256 (go_modules/github.com/davecgh/go-spew/@v/v1.1.0.mod) = vLKTkyUSN7eaF7bBm/KRNPQ+j0OMMZiYj81GGhzfBcw= +SHA256 (go_modules/github.com/davecgh/go-spew/@v/v1.1.1.mod) = vLKTkyUSN7eaF7bBm/KRNPQ+j0OMMZiYj81GGhzfBcw= +SHA256 (go_modules/github.com/davecgh/go-spew/@v/v1.1.1.zip) = a0SoQ5UfNxtwEMdU7MPKvv6BXVztHFuUCfstaX6KiQ0= +SHA256 (go_modules/github.com/mattn/go-zglob/@v/v0.0.4.mod) = wRhbNd/8vntJVXBw49nXi5bGVclJr6k1FLg/z1C4jHM= +SHA256 (go_modules/github.com/mattn/go-zglob/@v/v0.0.4.zip) = KbEH083UUi1qf4kzWI/V0MoMpH5JoW2l1O7APpjP/VA= +SHA256 (go_modules/github.com/pmezard/go-difflib/@v/v1.0.0.mod) = dLLnZushU3eGTVh7rfV+lVIfaS0qeGCzx3WQk/nJvsI= +SHA256 (go_modules/github.com/pmezard/go-difflib/@v/v1.0.0.zip) = 3gTOzBpLjVPkNXBRAmeUvLxU8uaiYM+sUIzmnV1kV6A= +SHA256 (go_modules/github.com/rifflock/lfshook/@v/v0.0.0-20180920164130-b9218ef580f5.mod) = HJWM2VriA97XYkUNLpu1hn7Tt3xSRgEETQCW3njVsWs= +SHA256 (go_modules/github.com/rifflock/lfshook/@v/v0.0.0-20180920164130-b9218ef580f5.zip) = qHzc1tTw0HjGxw0rK0yv0Xr2j70JdaCLdbeIhILohMw= +SHA256 (go_modules/github.com/sirupsen/logrus/@v/v1.9.3.mod) = AeghItVH0SKBUaYj/mysxNepyzGKD2aM4Iu2tn/bKLE= +SHA256 (go_modules/github.com/sirupsen/logrus/@v/v1.9.3.zip) = RQH05rhYv92ZdnH83S9kejF4sptrTRNEyqfAdRcSHdA= +SHA256 (go_modules/github.com/stretchr/objx/@v/v0.1.0.mod) = E1A1TVLSKHpiM27MDVYjLUxHaZr5u6ScZ8K0glTamPE= +SHA256 (go_modules/github.com/stretchr/objx/@v/v0.1.0.zip) = H6ENq0BO1/yO0qAz+HhBh9XfNRPO04Qc455G03hQ6x0= +SHA256 (go_modules/github.com/stretchr/testify/@v/v1.7.0.mod) = //gWjZjmoHFWxFShtuklUJ8xd+lsFVUW1/lrQHnMo78= +SHA256 (go_modules/github.com/stretchr/testify/@v/v1.7.0.zip) = WkbM6+/1EN8+L204Qu550/aNDnsVVM1u6TOQ1otsazQ= +SHA256 (go_modules/golang.org/x/sys/@v/v0.0.0-20220715151400-c0bba94af5f8.mod) = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ= +SHA256 (go_modules/golang.org/x/sys/@v/v0.12.0.mod) = 8DMzMJb+GY8xUd7tk/LeunTlC7/nc5E0BFvDt85KUCQ= +SHA256 (go_modules/golang.org/x/sys/@v/v0.12.0.zip) = iSJdnmYDwJD/2TKGt8oSSEn63+QyDDsYpr3MxKwIZyw= +SHA256 (go_modules/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.mod) = XDBuDWM81moRtA4uX7vG2kIRDbfXLqPBUkzrRe5Awz8= +SHA256 (go_modules/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.zip) = ThgX+WTKNOVFuBr9oDJaXonPWN4uQT2CB8Cv3dD9wVw= +SHA256 (go_modules/gopkg.in/yaml.v3/@v/v3.0.0-20200313102051-9f266ea9e77c.mod) = IVeYYKIDBvz0OxvSNNH7oxlJnHdhG3HAX5vzupDauTk= +SHA256 (go_modules/gopkg.in/yaml.v3/@v/v3.0.0-20200313102051-9f266ea9e77c.zip) = rPGcy0/KmDsjSjnvAy+vmrcOdZaAZzuz3/B353/uIP4= +SIZE (browserpass-native-v0.0.0-20231004071550-ed246ee62824.zip) = 36660 +SIZE (go_modules/github.com/davecgh/go-spew/@v/v1.1.0.mod) = 34 +SIZE (go_modules/github.com/davecgh/go-spew/@v/v1.1.1.mod) = 34 +SIZE (go_modules/github.com/davecgh/go-spew/@v/v1.1.1.zip) = 60320 +SIZE (go_modules/github.com/mattn/go-zglob/@v/v0.0.4.mod) = 42 +SIZE (go_modules/github.com/mattn/go-zglob/@v/v0.0.4.zip) = 12914 +SIZE (go_modules/github.com/pmezard/go-difflib/@v/v1.0.0.mod) = 37 +SIZE (go_modules/github.com/pmezard/go-difflib/@v/v1.0.0.zip) = 12433 +SIZE (go_modules/github.com/rifflock/lfshook/@v/v0.0.0-20180920164130-b9218ef580f5.mod) = 35 +SIZE (go_modules/github.com/rifflock/lfshook/@v/v0.0.0-20180920164130-b9218ef580f5.zip) = 4775 +SIZE (go_modules/github.com/sirupsen/logrus/@v/v1.9.3.mod) = 192 +SIZE (go_modules/github.com/sirupsen/logrus/@v/v1.9.3.zip) = 69937 +SIZE (go_modules/github.com/stretchr/objx/@v/v0.1.0.mod) = 32 +SIZE (go_modules/github.com/stretchr/objx/@v/v0.1.0.zip) = 34637 +SIZE (go_modules/github.com/stretchr/testify/@v/v1.7.0.mod) = 216 +SIZE (go_modules/github.com/stretchr/testify/@v/v1.7.0.zip) = 105564 +SIZE (go_modules/golang.org/x/sys/@v/v0.0.0-20220715151400-c0bba94af5f8.mod) = 33 +SIZE (go_modules/golang.org/x/sys/@v/v0.12.0.mod) = 33 +SIZE (go_modules/golang.org/x/sys/@v/v0.12.0.zip) = 1908262 +SIZE (go_modules/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.mod) = 25 +SIZE (go_modules/gopkg.in/check.v1/@v/v0.0.0-20161208181325-20d25e280405.zip) = 39844 +SIZE (go_modules/gopkg.in/yaml.v3/@v/v3.0.0-20200313102051-9f266ea9e77c.mod) = 95 +SIZE (go_modules/gopkg.in/yaml.v3/@v/v3.0.0-20200313102051-9f266ea9e77c.zip) = 101467 diff --git a/security/browserpass-native/modules.inc b/security/browserpass-native/modules.inc new file mode 100644 index 0000000..79f8423 --- /dev/null +++ b/security/browserpass-native/modules.inc @@ -0,0 +1,14 @@ +MODGO_MODULES = \ + github.com/davecgh/go-spew v1.1.1 \ + github.com/mattn/go-zglob v0.0.4 \ + github.com/pmezard/go-difflib v1.0.0 \ + github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 \ + github.com/sirupsen/logrus v1.9.3 \ + github.com/stretchr/objx v0.1.0 \ + github.com/stretchr/testify v1.7.0 \ + golang.org/x/sys v0.12.0 \ + gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 \ + gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c +MODGO_MODFILES = \ + github.com/davecgh/go-spew v1.1.0 \ + golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 diff --git a/security/browserpass-native/pkg/DESCR b/security/browserpass-native/pkg/DESCR new file mode 100644 index 0000000..2abebe4 --- /dev/null +++ b/security/browserpass-native/pkg/DESCR @@ -0,0 +1,3 @@ +This is a host application for browserpass browser extension providing +it access to your password store. The communication is handled through +Native Messaging API. diff --git a/security/browserpass-native/pkg/PLIST b/security/browserpass-native/pkg/PLIST new file mode 100644 index 0000000..9d4b793 --- /dev/null +++ b/security/browserpass-native/pkg/PLIST @@ -0,0 +1,14 @@ +share/browserpass/ +share/browserpass/LICENSE +share/browserpass/README.md +@bin share/browserpass/browserpass +share/browserpass/hosts/ +share/browserpass/hosts/chromium/ +share/browserpass/hosts/chromium/${APP_ID}.json +share/browserpass/hosts/firefox/ +share/browserpass/hosts/firefox/${APP_ID}.json +share/browserpass/policies/ +share/browserpass/policies/chromium/ +share/browserpass/policies/chromium/${APP_ID}.json +share/browserpass/policies/firefox/ +share/doc/pkg-readmes/${PKGSTEM} diff --git a/security/browserpass-native/pkg/README b/security/browserpass-native/pkg/README new file mode 100644 index 0000000..544e71e --- /dev/null +++ b/security/browserpass-native/pkg/README @@ -0,0 +1,40 @@ ++------------------------------------------------------------------------------- +| Running ${PKGSTEM} on OpenBSD ++------------------------------------------------------------------------------- + +Step 1: Install the browser extension from one of the following sources: + +Chrome Web Store: +https://chrome.google.com/webstore/detail/browserpass-ce/naepdomgkenhinolocfifgehidddafch + +Firefox AddOns: +https://addons.mozilla.org/en-US/firefox/addon/browserpass-ce + +Or manually from github: +https://github.com/browserpass/browserpass-extension/releases + +Step 2: Register the native messaging host to allow the extension to talk to + the browserapp companion app: + +For chromium based browsers, adjust the DIR variabable and run: + +DIR=chromium # ungoogled-chromium chromium iridium +mkdir -p ${SYSCONFDIR}/$DIR/native-messaging-hosts/ +ln -sf ${TRUEPREFIX}/share/browserpass/hosts/chromium/${APP_ID}.json \ + ${SYSCONFDIR}/$DIR/native-messaging-hosts/${APP_ID}.json + +For firefox based browsers, adjust the DIR variable and run: + +DIR=firefox +mkdir -p ${SYSCONFDIR}/$DIR/native-messaging-hosts/ +ln -sf ${TRUEPREFIX}/share/browserpass/hosts/firefox/${APP_ID}.json \ + ${SYSCONFDIR}/$DIR/native-messaging-hosts/${APP_ID}.json + +Step 3: Allow unveil to access the browserpass application and its + directory: + +Add the following entries to /etc/$DIR/unveil.main: + +${TRUEPREFIX}/share/browserpass/browserpass rx +${TRUEPREFIX}/share/browserpass r +