add browserpass-native

This commit is contained in:
c0dev0id 2024-01-03 15:09:47 +01:00
parent 0f4d94a619
commit 5aefecefb0
6 changed files with 154 additions and 0 deletions

View File

@ -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 <bsd.port.mk>

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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}

View File

@ -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