flapdoodle-oss / de.flapdoodle.os

os detection library
Apache License 2.0
4 stars 11 forks source link

Support Manjaro / Arch Linux #23

Open pschyma opened 1 month ago

pschyma commented 1 month ago

I've joined a new project using this library and tests fail with:

2024-09-18T10:57:38.315+02:00  INFO 1303040 --- [    Test worker] d.f.o.c.a.LoggingWrapper$MatcherWrapper  : value Optional[OsReleaseFile{attributes={NAME=Manjaro Linux, PRETTY_NAME=Manjaro Linux, ID=manjaro, ID_LIKE=arch, BUILD_ID=rolling, ANSI_COLOR=32;1;24;144;200, HOME_URL=https://manjaro.org/, DOCUMENTATION_URL=https://wiki.manjaro.org/, SUPPORT_URL=https://forum.manjaro.org/, BUG_REPORT_URL=https://docs.manjaro.org/reporting-bugs/, PRIVACY_POLICY_URL=https://manjaro.org/privacy-policy/, LOGO=manjarolinux}}] matches OsReleaseFileMapEntry{key=NAME, valuePattern=.*Rocky Linux.*}: false
2024-09-18T10:57:38.316+02:00  INFO 1303040 --- [    Test worker] de.flapdoodle.os.Platform                : Platform.detect() -> Platform{operatingSystem=Linux, architecture=X86_64}
2024-09-18T10:57:38.353+02:00  WARN 1303040 --- [    Test worker] d.f.e.m.p.linux.LinuxPackageFinder       : because there is no package for GenericFeatureAwareVersion{5.0.5}:Platform{operatingSystem=Linux, architecture=X86_64} we fall back to GenericFeatureAwareVersion{5.0.5}:Platform{operatingSystem=Linux, architecture=X86_64, version=Ubuntu_20_04}
2024-09-18T10:57:38.380+02:00 ERROR 1303040 --- [      Thread-26] d.f.e.m.s.autoconfigure.EmbeddedMongo    : /home/peter/.embedmongo/fileSets/42198b366a7bbe92dd01a0dd5117fbe1dc7961ed799c01fc4dc0c6c5ab0fa010/mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

It seems like my machine is detected as Ubuntu 20.04.

michaelmosmann commented 1 month ago

@pschyma ubuntu is the fallback.. does mongodb works on your machine? which distribution from https://www.mongodb.com/try/download/community-edition did you use?

pschyma commented 1 month ago

Hi, I'm usually using mongo via docker - when I need it locally.

Arch has no official mongo package on its own, but there is a AUR package that installs the Ubuntu 24.04 version. I've overridden the detected version to Linux|X86_64|Ubuntu|Ubuntu_24_04and the tests worked.

michaelmosmann commented 1 month ago

@pschyma ah.. then i can create a rule for arch / manjaro for that..

michaelmosmann commented 1 month ago

@pschyma will take a little bit .. vacation ahead..

michaelmosmann commented 1 month ago

@pschyma is there any version in /etc/lsb-release? can you post the content of this file (and of /etc/os-release)?

pschyma commented 1 month ago

Yes, at least for Manjaro.

Manjaro (Sway Edition)

/etc/lsb-release

DISTRIB_ID="ManjaroLinux"
DISTRIB_RELEASE="24.0.8"
DISTRIB_CODENAME="Wynsdey"
DISTRIB_DESCRIPTION="Manjaro Linux"

/etc/os-release

NAME="Manjaro Linux"
PRETTY_NAME="Manjaro Linux"
ID=manjaro
ID_LIKE=arch
BUILD_ID=rolling
ANSI_COLOR="32;1;24;144;200"
HOME_URL="https://manjaro.org/"
DOCUMENTATION_URL="https://wiki.manjaro.org/"
SUPPORT_URL="https://forum.manjaro.org/"
BUG_REPORT_URL="https://docs.manjaro.org/reporting-bugs/"
PRIVACY_POLICY_URL="https://manjaro.org/privacy-policy/"
LOGO=manjarolinux

Arch (stable)

/etc/lsb-release

DISTRIB_ID="Arch"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="Arch Linux"

/etc/os-release

NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux
michaelmosmann commented 1 month ago

@pschyma ah.. thanks.. i have an idea how to solve this. One question: so there is no release version somehow?

pschyma commented 1 month ago

No, not on the Arch side.

karfau commented 1 day ago

I think this issue is related/the same question, altough for me the fallback to manjaro didn't work, since the manjaro version didn't match. https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/issues/545