FaserF / hassio-addons

My personal Homeassistant Add-Ons. For more details have a look at the sub-folders.
54 stars 20 forks source link

[Bug]: Cannot install wiki.js #324

Open arkansas-coder opened 1 month ago

arkansas-coder commented 1 month ago

The problem

I can't install wiki.js. It give a Failed to install error. I think that the problem is that ARCH='x64', and I am running on a RPi4, which I believe requires ARCH='aarch64'.

What version of Home Assistant Core has the issue?

2024.9.3

What version of the addon has the issue?

?

What type of installation are you running?

Home Assistant Core

Add-On causing the issue

Wiki.JS

Log information

The command '/bin/bash -o pipefail -c ARCH= && alpineArch="$(apk --print-arch)" && case "${alpineArch##*-}" in x86_64) ARCH='x64' CHECKSUM="b3f80fe7d0f1af6fe25ffedc7237ca519965d08fc800eab29cf45cd5b90cdb26" ;; *) echo "Unsupported architecture"; exit 1 ;; esac && if [ -n "${CHECKSUM}" ]; then set -eu; curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz"; echo "$CHECKSUM node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" | sha256sum -c - || exit 1; tar -xJf "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner; ln -s /usr/local/bin/node /usr/local/bin/nodejs; else echo "Building from source"; apk add --no-cache --virtual .build-deps-full binutils-gold g++ gcc gnupg libgcc linux-headers make python3; export GNUPGHOME="$(mktemp -d)"; for key in 4ED778F539E3634C779C87C6D7062848A1AB005C 141F07595B7B3FFE74309A937405533BE57C7D57 74F12602B6F1C4E913FAA37AD3A89613643B6201 DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 61FC681DFB92A079F1685E77973F295594EC4689 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C 108F52B48DB57BB0CC439B2997B01419BD92F80A; do gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; done; curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz"; curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc"; gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc; gpgconf --kill all; rm -rf "$GNUPGHOME"; grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - || exit 1; tar -xf "node-v$NODE_VERSION.tar.xz"; cd "node-v$NODE_VERSION"; ./configure; make -j$(getconf _NPROCESSORS_ONLN) V=; make install; apk del .build-deps-full; cd ..; rm -Rf "node-v$NODE_VERSION"; rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; fi' returned a non-zero code: 1

Additional information

No response

FaserF commented 1 month ago

Unfortunatly I am unable to reproduce the issue, but my arch is amd64 . From the sys requirements I cannot see if aarrch64 should work with the latest release

https://docs.requarks.io/install/requirements

But it looks like that nodejs-musl does not support aarch64, which brings up the issue. Therefore I have now dropped support for those architectures in my addon with V2.0.0 https://unofficial-builds.nodejs.org/download/release/v22.9.0/ Maybe we will find a way, since nodejs does support aarch64 but nodejs musl unfortunatly not

arkansas-coder commented 1 month ago

Thanks for getting back to me. I don't know a lot about the ins and outs of Home Assistant add-ons and integrations, but from what I understand, it uses Docker images for most of this work. wiki.js has a Docker aarch64 image based on Alpine, which uses musl. According to wiki.js' documentation, nodejs is automatically included with its Docker image. I've used the Docker wiki.js previously with postgresql on RPi4 without problems, but I would like to integrate it into HA. I've looked at your code, and I can follow some of it, but other parts are beyond my knowledge. It looks like you're building a Docker image from scratch. If this is so, can you take an already built image and modify it as necessary? If there is anything I can do to help, let me know. Thanks for allo your work.

arkansas-coder commented 1 month ago

Thanks for getting back to me. I don't know a lot about the ins and outs of Home Assistant add-ons and integrations, but from what I understand, it uses Docker images for most of this work. Wiki.js has a Docker aarch64 image based on Alpine, which uses musl. According to wiki.js' documentation, nodejs is automatically included with its Docker image. I've used Docker wiki.js previously with postgresql on RPi4 without problems, but I would like to integrate it into HA.

On Sun, Sep 29, 2024 at 11:49 AM Fabian Seitz @.***> wrote:

Unfortunatly I am unable to reproduce the issue, but my arch is amd64 . From the sys requirements I cannot see if aarrch64 should work with the latest release

https://docs.requarks.io/install/requirements

But it looks like that nodejs-musl does not support aarch64, which brings up the issue. Therefore I have now dropped support for those architectures in my addon with V2.0.0 https://unofficial-builds.nodejs.org/download/release/v22.9.0/ Maybe we will find a way, since nodejs does support aarch64 but nodejs musl unfortunatly not

— Reply to this email directly, view it on GitHub https://github.com/FaserF/hassio-addons/issues/324#issuecomment-2381423763, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLWK6IMZMNAQJORK52C2WLZZAVQNAVCNFSM6AAAAABO3IIAPSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBRGQZDGNZWGM . You are receiving this because you authored the thread.Message ID: @.***>