Package Details: silverbullet 0.10.1-1

Git Clone URL: https://aur.archlinux.org/silverbullet.git (read-only, click to copy)
Package Base: silverbullet
Description: Clean Markdown-based writing/note taking application
Upstream URL: https://github.com/silverbulletmd/silverbullet
Keywords: editor markdown note note-taking
Licenses: MIT
Submitter: tarball
Maintainer: tarball
Last Packager: tarball
Votes: 2
Popularity: 0.007512
First Submitted: 2023-06-12 16:01 (UTC)
Last Updated: 2024-11-15 11:47 (UTC)

Dependencies (1)

Required by (0)

Sources (2)

Latest Comments

tarball commented on 2024-09-07 22:42 (UTC)

@unwitting, I see the appeal of being able to manage your notes through both the web interface and a local text editor.

Wouldn't a simpler solution work for you, like the combination of:

# /etc/systemd/system/silverbullet.service.d/mode.conf
[Service]
Umask=007
StateDirectoryMode=0770

, adding yourself to the silverbullet group, and symlinking /var/lib/silverbullet to e.g. ~/doc?

Or even just:

# /etc/systemd/system/silverbullet.service.d/user.conf
[Service]
User=my-user

I can of course add the user service, but I won't be using it and it will bitrot over time. Since most of us have many secrets accessible to our primary UNIX users, along with access to sudo/polkit/etc, it's best to avoid running network daemons under it.

And if you have to switch to a different UNIX user to edit your notes, you might as well switch to silverbullet.

Maybe there's something else I'm missing?

showgood163 commented on 2024-09-07 12:26 (UTC)

Hi, @unwitting,

Thanks for the write up.

I upgrade to 0.9.4 with @tarball's PKGBUILD, and /etc/default/silverbullet is not overwritten by default. So I think my problem is solved.

unwitting commented on 2024-09-07 12:07 (UTC) (edited on 2024-09-07 17:15 (UTC) by unwitting)

@showgood163 To have my own config and custom folder I did:

  • copy /usr/lib/systemd/system/silverbullet.service to /usr/local/lib/systemd/user/silverbullet.service

  • change ExecStart line to

ExecStart=/usr/bin/deno run --allow-all --unstable /usr/lib/silverbullet/silverbullet.js --hostname ${HOST} --port ${PORT} ${SB_FOLDER}
  • change EnvironmentFile line to:
EnvironmentFile=%h/.config/silverbullet/config.env
  • change WantedBy line to:
WantedBy=default.target
  • remove DynamicUser=yes

  • create ~/.config/silverbullet/config.env file with your config

HOST=localhost
PORT=3001
SB_FOLDER=/path/to/your/notes/folder
  • enable and start the service as user
$ systemctl --user enable silverbullet.service
$ systemctl --user start silverbullet.service

@tarball - Can --user unit file in /usr/lib/systemd/user/silverbullet.service be part of the package?

tarball commented on 2024-08-20 07:29 (UTC)

Thanks for the report, it should be fixed now.

showgood163 commented on 2024-08-20 02:01 (UTC)

Hi there!

Is it possible to keep the modified /etc/default/silverbullet by default during installation? The current installation directly replaces the this with the one in the package, and you have to manually redo the configuration after updating the silverbullet.

showgood163 commented on 2023-09-06 14:18 (UTC)

Thanks for your testing.

Yes, I got 0 errors caused by build() in all pikaur -S runs.

I've updated my response to reflect the RAM limitation in that github issue.

tarball commented on 2023-09-06 10:35 (UTC)

I ran a few more tests on a 512 MB VM, and on a more beefy system with memory limited through cgroups:

$ systemd-run --user --scope --property MemoryMax=256M makepkg -srifc

There were no problems with memory limits down to 90 MBs (below that it starts crashing with out of memory errors — but no test failures because it doesn't even get to running tests).

It might be worth mentioning in that github issue that you're doing this on a resource-constrained system anyway.

showgood163 commented on 2023-09-06 06:43 (UTC) (edited on 2023-09-06 14:18 (UTC) by showgood163)

First, skipping check() does help. Thank you for the solution.

Second, is your machine memory limited? My VM has 1GB ram, in which about 600MB is avaliable for package installation. I got different test errors in different runs.

The full logs is updated in https://github.com/silverbulletmd/silverbullet/issues/514 ,

tarball commented on 2023-09-05 16:07 (UTC)

I thought the recent deno update might have broken it, but then I tried rebuilding the package both on my main system, and on a freshly created VM: both work fine.

You have already created a github issue:

https://github.com/silverbulletmd/silverbullet/issues/514

taking it to developers and disabling check() for the time being is probably your best bet. I don't know much about the project's internals.

showgood163 commented on 2023-09-05 15:36 (UTC)

Hi there!

I tried to install this AUR and failed to build the package. The following log shows that 1 of 37 tests failed. Could you help me fix this problem?

 ERRORS

Run a plugos endpoint server => ./plugos/hooks/endpoint.test.ts:10:6
error: TypeError: error sending request for url (http://localhost:3123/_/test/?name=Pete): error trying to connect: tcp connect error: Connection refused (os error 111)
  const res = await fetch(`http://localhost:${port}/_/test/?name=Pete`);
              ^
    at async mainFetch (ext:deno_fetch/26_fetch.js:277:12)
    at async fetch (ext:deno_fetch/26_fetch.js:501:7)
    at async file:///tmp/makepkg/silverbullet/src/silverbullet-0.3.11/plugos/hooks/endpoint.test.ts:32:15

 FAILURES

Run a plugos endpoint server => ./plugos/hooks/endpoint.test.ts:10:6

FAILED | 36 passed | 1 failed (16s)

error: Test failed
==> ERROR: A failure occurred in check().
    Aborting...