Package Details: linkwarden 2.9.3-2

Git Clone URL: https://aur.archlinux.org/linkwarden.git (read-only, click to copy)
Package Base: linkwarden
Description: Self hosted bookmark manager
Upstream URL: https://github.com/linkwarden/linkwarden
Licenses: AGPL-3.0
Submitter: CountMurphy
Maintainer: CountMurphy
Last Packager: CountMurphy
Votes: 0
Popularity: 0.000000
First Submitted: 2025-01-09 22:01 (UTC)
Last Updated: 2025-01-13 17:56 (UTC)

Latest Comments

CountMurphy commented on 2025-01-13 20:37 (UTC) (edited on 2025-01-13 22:16 (UTC) by CountMurphy)

There might be. The way they are pulling the dependencies for playwright in docker is not compatible with arch. installing it through yarn was the only way I found, but I'm not an expert with yarn, but yeah that is a great point about it stating failure. I will dig into it further, but it should work now as is.

musta_ruhtinas commented on 2025-01-13 20:36 (UTC) (edited on 2025-01-13 20:36 (UTC) by musta_ruhtinas)

I have no experience with playwright, but isn't there a way to limit what it needs to pull, such as a config file, or some cli switches? The error suggested that the install failed, so I did not bother to check whether it was in fact working.

CountMurphy commented on 2025-01-13 19:53 (UTC) (edited on 2025-01-13 19:58 (UTC) by CountMurphy)

Yeah, there are a LOT of playwright dependencies. Its why I stopped adding them after linkwarden was able to function correctly. I have a feeling playwright is able to do much more than linkwarden uses it for, hence all the other deps (one of them is cups, and I am very sure linkwarden isn't using that).

Not opposed to tracking down all the other optional dependencies, but that might have to wait until the weekend when I have more time.

musta_ruhtinas commented on 2025-01-13 19:25 (UTC)

This is the output of playwright

BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
Downloading Chromium 127.0.6533.17 (playwright build v1124) from https://playwright.azureedge.net/builds/chromium/1124/chromium-linux.zip
161.3 MiB [====================] 100% 0.0s
Chromium 127.0.6533.17 (playwright build v1124) downloaded to /var/lib/linkwarden/.cache/ms-playwright/chromium-1124
BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
Downloading FFMPEG playwright build v1009 from https://playwright.azureedge.net/builds/ffmpeg/1009/ffmpeg-linux.zip
2.6 MiB [====================] 100% 0.0s
FFMPEG playwright build v1009 downloaded to /var/lib/linkwarden/.cache/ms-playwright/ffmpeg-1009
BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
Downloading Firefox 127.0 (playwright build v1454) from https://playwright.azureedge.net/builds/firefox/1454/firefox-ubuntu-20.04.zip
86.6 MiB [====================] 100% 0.0s
Firefox 127.0 (playwright build v1454) downloaded to /var/lib/linkwarden/.cache/ms-playwright/firefox-1454
BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
Downloading Webkit 17.4 (playwright build v2035) from https://playwright.azureedge.net/builds/webkit/2035/webkit-ubuntu-20.04.zip
133.2 MiB [====================] 100% 0.0s
Webkit 17.4 (playwright build v2035) downloaded to /var/lib/linkwarden/.cache/ms-playwright/webkit-2035
Playwright Host validation warning: 
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Please install them with the following command:      ║
║                                                      ║
║     sudo yarn playwright install-deps                ║
║                                                      ║
║ Alternatively, use apt:                              ║
║     sudo apt-get install libgtk-3-0                  ║
║                                                      ║
║ <3 Playwright Team                                   ║
╚══════════════════════════════════════════════════════╝
    at validateDependenciesLinux (/usr/share/webapps/linkwarden/node_modules/playwright-core/lib/server/registry/dependencies.js:216:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Registry._validateHostRequirements (/usr/share/webapps/linkwarden/node_modules/playwright-core/lib/server/registry/index.js:575:43)
    at async Registry._validateHostRequirementsForExecutableIfNeeded (/usr/share/webapps/linkwarden/node_modules/playwright-core/lib/server/registry/index.js:673:7)
    at async Registry.validateHostRequirementsForExecutablesIfNeeded (/usr/share/webapps/linkwarden/node_modules/playwright-core/lib/server/registry/index.js:662:43)
    at async t.<anonymous> (/usr/share/webapps/linkwarden/node_modules/playwright-core/lib/cli/program.js:119:7)
Done in 26.42s.

And then:

║ Host system is missing dependencies to run browsers. ║
║ Missing libraries:                                   ║
║     libicudata.so.66                                 ║
║     libicui18n.so.66                                 ║
║     libicuuc.so.66                                   ║
║     libwoff2dec.so.1.0.2                             ║
║     libwebp.so.6                                     ║
║     libharfbuzz-icu.so.0                             ║
║     libhyphen.so.0                                   ║
║     libflite.so.1                                    ║
║     libflite_usenglish.so.1                          ║
║     libflite_cmu_grapheme_lang.so.1                  ║
║     libflite_cmu_grapheme_lex.so.1                   ║
║     libflite_cmu_indic_lang.so.1                     ║
║     libflite_cmu_indic_lex.so.1                      ║
║     libflite_cmulex.so.1                             ║
║     libflite_cmu_time_awb.so.1                       ║
║     libflite_cmu_us_awb.so.1                         ║
║     libflite_cmu_us_kal16.so.1                       ║
║     libflite_cmu_us_kal.so.1                         ║
║     libflite_cmu_us_rms.so.1                         ║
║     libflite_cmu_us_slt.so.1                         ║
║     libpcre.so.3                                     ║
║     libffi.so.7                                      ║
║     libevdev.so.2                                    ║ 

I honestly gave up after that, since there was too much to install, and I'm not even certain there weren't any version mismatches

CountMurphy commented on 2025-01-13 17:48 (UTC) (edited on 2025-01-13 18:10 (UTC) by CountMurphy)

Updated to latest version and made the home directory/shell changes (excellent suggestions).

As for the dependencies, playwright should have everything that it needs to be used by linkwarden. Linkwarden only uses it to create screenshots/pdf copies of your bookmarks. after the install runs, it should have all the deps needed to do these tasks. Was there a breakage due to the other missing libraries? I stopped adding the rest of the deps as it didn't look like they were needed.

musta_ruhtinas commented on 2025-01-11 11:31 (UTC) (edited on 2025-01-11 15:27 (UTC) by musta_ruhtinas)

From a technical (and security) point of view, would it not be better to have the user's home point at /var/lib/linkwarden, and not have an interactive shell? Something along

u linkwarden - "linkwarden daemon user" /var/lib/linkwarden /usr/bin/nologin

Also, please include the dependencies needed to run playwright, otherwise it is pretty much a manual install.

CountMurphy commented on 2025-01-10 20:05 (UTC) (edited on 2025-01-10 20:06 (UTC) by CountMurphy)

Never used that workflow before. Found the issue and will have it patched within the hour. Thanks for pointing this out!

EDIT: Yup, this is what I did. Need to step out for a moment but will have it patched soon.

musta_ruhtinas commented on 2025-01-10 19:08 (UTC) (edited on 2025-01-10 20:08 (UTC) by musta_ruhtinas)

Building in a clean chroot, as per instructions in the wiki (the classic way).

Builds fine if modified:

source=(
    "https://github.com/linkwarden/linkwarden/archive/refs/tags/v$pkgver.tar.gz"
    "app.conf"
    "dbinit.sh"
    "linkwarden.service"
    "linkwarden.sysusers"
    "linkwarden.tmpfiles"
)
sha512sums=('341dbb53c643ff58cd6e398d3f3a22ef07a635f6f89de182a10b174db6aacacf1bb0a6e41b7c29322bbf5e23dfc3cc1bf2aa52e2913516fa582dde0c19132885'
            '89cfd3b0a5640c7f55489af32eb266fc03aa7f1944ceb72ff58a898864342ea928fa9f4b7f3dfec8e9e9c3adcbc77075d85b96e793030cfa9ebe227f07fbfe55'
            'cc19aaf0156fa84fbbfa7dc13712426a7f2285c67552d4c2317b9de2769aefb3af6253d790edb28e026c242c1a8d4d5e2f4e08c385e5eb157eb0a03c25bef5f4'
            '9b987e19043c03a5a1fe2eecbff50f54f205404316359f7c211b589d9cd4e689beca14dd671e1e8966881a1988cdf0affbf2ca25eb1a8ded3f532fb899e9a17f'
            '4ad8d81c4c2912fb0b868754f2bb7ade7061f6a42f3b15e70203568743f3f0083f62b7ef7577b03b107b84870bd8dab2f70a921a3a61f7a9d9c913608f78f0ae'
            'b7ae4c609fc1e4450e4d47d0b99ea7af20c8abbc72677c7cd1f8d34c755f555bb32d64e06ce7649d4ff4deb0f316d6efb2def139d8fea1c9ffe0485c56d04930')

build() {
    cd "${srcdir}/linkwarden-$pkgver"
    yarn install
    yarn build
}

package() {
    mkdir -p "$pkgdir/usr/share/webapps/linkwarden"
    install -Dm 644 "${srcdir}/app.conf" "$pkgdir/etc/linkwarden/app.conf"
    install -Dm 744 "${srcdir}/dbinit.sh" "$pkgdir/usr/share/webapps/linkwarden/dbinit.sh"
    cp -Ra "${srcdir}/linkwarden-$pkgver"/* "$pkgdir/usr/share/webapps/linkwarden/"
    cp -Ra "${srcdir}/linkwarden-$pkgver/.next" "$pkgdir/usr/share/webapps/linkwarden/"
    install -Dm 644 "${srcdir}/linkwarden.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
    install -Dm 644 "${srcdir}/linkwarden.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
    install -Dm 644 "${srcdir}/linkwarden.service" "$pkgdir/usr/lib/systemd/system/linkwarden.service"
}

CountMurphy commented on 2025-01-10 18:52 (UTC) (edited on 2025-01-10 18:59 (UTC) by CountMurphy)

@musta_ruhtinas, not able to reproduce using yay (or a direct makepkg -i after a git clone). What is your build process so I can attempt to reproduce the issue? You are downloading all the files, not just the PKGBUILD correct?

musta_ruhtinas commented on 2025-01-10 18:45 (UTC)

Done in 143.10s.
==> Entering fakeroot environment...
==> Starting package()...
install: cannot stat '../app.conf': No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...
==> ERROR: Build failed