From f60f5d292b2223d4a63f8261e1b5bd2aacf38ab6 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz Date: Sat, 13 Jan 2024 16:50:50 +0100 Subject: [PATCH 1/6] chore: fix `clean_apps` for installations without all backends (#230) If one of all the possible backends is not installed, `clean_apps` inside `build.sh` crashes. Signed-off-by: Patrick Gehrsitz --- bin/build.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/bin/build.sh b/bin/build.sh index 6c03f292..e8f93228 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -3,7 +3,9 @@ #### crowsnest - A webcam Service for multiple Cams and Stream Services. #### #### Written by Stephan Wendel aka KwadFan -#### Copyright 2021 - till today +#### Copyright 2021 - 2024 +#### Co-authored by Patrick Gehrsitz aka mryel00 +#### Copyright 2024 - till today #### https://github.com/mainsail-crew/crowsnest #### #### This File is distributed under GPLv3 @@ -107,10 +109,10 @@ get_avail_mem() { delete_apps() { for path in "${ALL_PATHS[@]}"; do if [[ ! -d "${path}" ]]; then - printf "'%s' does not exist! Delete skipped ...\n" "${path}" + printf "'%s' does not exist! Delete ... [SKIPPED]\n" "${path}" fi if [[ -d "${path}" ]]; then - printf "Deleting '%s' ... \n" "${path}" + printf "Deleting '%s' ... [DONE]\n" "${path}" rm -rf "${path}" fi done @@ -136,7 +138,7 @@ clone_cstreamer() { [[ "$(is_pi5)" = "1" ]] || [[ "$(is_ubuntu_arm)" = "1" ]]; } && [[ "${CROWSNEST_UNATTENDED}" = "0" ]]; then - printf "WARN: Cloning camera-streamer skipped! Device is not supported!" + printf "Device is not supported! Cloning camera-streamer ... [SKIPPED]\n" return fi if [[ -d "${BASE_CN_BIN_PATH}"/"${CSTREAMER_PATH}" ]]; then @@ -166,10 +168,14 @@ clone_apps() { ### Run 'make clean' in cloned folders clean_apps() { for app in "${ALL_PATHS[@]}"; do - printf "\nRunning 'make clean' in %s ... \n" "${app}" - pushd "${app}" &> /dev/null || exit 1 - make clean - popd &> /dev/null || exit 1 + if [[ ! -d "${app}" ]]; then + printf "'%s' does not exist! Clean ... [SKIPPED]\n" "${app}" + else + printf "\nRunning 'make clean' in %s ... \n" "${app}" + pushd "${app}" &> /dev/null || exit 1 + make clean + popd &> /dev/null || exit 1 + fi done printf "\nRunning 'make clean' ... [DONE]\n" } From 1fbedddb652019c31720d9e6f79ede1cc2cba2e2 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz Date: Sat, 13 Jan 2024 18:13:16 +0100 Subject: [PATCH 2/6] chore: remove `buildclean` from `make update` (#231) `make update` reclones the repositories, so we don't need to clean them before building. Signed-off-by: Patrick Gehrsitz --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 03500e59..ca26bda4 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,6 @@ help: ## Shows this help update: ## Update crowsnest (fetches and pulls repository changes) @git fetch && git pull @bash -c 'bin/build.sh --reclone' - ${MAKE} buildclean ${MAKE} build report: ## Generate report.txt From 4d3e65a7ee8ebf036bf48071a138a039cf697886 Mon Sep 17 00:00:00 2001 From: Stephan Wendel <43513802+KwadFan@users.noreply.github.com> Date: Sat, 13 Jan 2024 18:13:35 +0100 Subject: [PATCH 3/6] feat: add dual picam detection (#229) Signed-off-by: Stephan Wendel --- libs/hwhandler.sh | 2 +- libs/logging.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/hwhandler.sh b/libs/hwhandler.sh index 2e1fd075..ceb5bd72 100755 --- a/libs/hwhandler.sh +++ b/libs/hwhandler.sh @@ -65,7 +65,7 @@ detect_libcamera() { [[ -x "$(command -v libcamera-hello)" ]]; then avail="$(libcamera-hello --list-cameras | sed '/^\[.*\].*/d' | awk 'NR==1 {print $1}')" if [[ "${avail}" = "Available" ]]; then - echo "1" + get_libcamera_path | wc -l else echo "0" fi diff --git a/libs/logging.sh b/libs/logging.sh index 167ee392..f23be28b 100755 --- a/libs/logging.sh +++ b/libs/logging.sh @@ -88,7 +88,7 @@ function print_cfg { } function print_cams { - local total v4l + local device total v4l v4l="$(find /dev/v4l/by-id/ -iname "*index0" 2> /dev/null | wc -l)" libcamera="$(detect_libcamera)" legacy="$(detect_legacy)" @@ -100,7 +100,9 @@ function print_cams { log_msg "INFO: Found ${total} total available Device(s)" fi if [[ "${libcamera}" -ne 0 ]]; then - log_msg "Detected 'libcamera' device -> $(get_libcamera_path)" + for device in $(get_libcamera_path); do + log_msg "Detected 'libcamera' device -> ${device}" + done fi if [[ "${legacy}" -ne 0 ]]; then raspicam="$(v4l2-ctl --list-devices | grep -A1 -e 'mmal' | \ From ae42a5b62c9f60b73480c85ce1508993f0d5e979 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Tue, 16 Jan 2024 20:14:30 +0100 Subject: [PATCH 4/6] chore: update issue bot to add github discussions (#234) Signed-off-by: Stefan Dej --- .github/label-actions.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/label-actions.yml b/.github/label-actions.yml index 20f85fd4..47540368 100644 --- a/.github/label-actions.yml +++ b/.github/label-actions.yml @@ -1,6 +1,6 @@ # Configuration for Label Actions - https://github.com/dessant/label-actions -not on Github: +not an Issue: issues: comment: | Ahoi! @@ -9,10 +9,12 @@ not on Github: Many helpful people will not see your message here and you are unlikely to get a useful response. - We use github to handle bugreports, feature requests and - planning new releases. + We use the Github Issue-Tracker only for development related + topics, like feature requests, bug reports etc. To get help, + please join our Discord-Server or ask in Github Discussions: - Please use our Discord-Server for help: [discord.gg/mainsail](https://discord.gg/mainsail) + - [discord.gg/mainsail](https://discord.gg/mainsail) + - [GitHub Discussions](https://github.com/orgs/mainsail-crew/discussions) This ticket will be automatically closed. From 0c43487092789f333137d4a4cc11cfea30c94026 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz Date: Tue, 16 Jan 2024 22:13:25 +0100 Subject: [PATCH 5/6] chore: add warning for libcamera on pi5 (#235) We currently don't support libcamera devices on the Raspberry Pi 5. This will add a warning before the libcamera device logging. Signed-off-by: Patrick Gehrsitz --- libs/logging.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/logging.sh b/libs/logging.sh index f23be28b..aef72e09 100755 --- a/libs/logging.sh +++ b/libs/logging.sh @@ -100,6 +100,11 @@ function print_cams { log_msg "INFO: Found ${total} total available Device(s)" fi if [[ "${libcamera}" -ne 0 ]]; then + if [[ "$(is_pi5)" = "1" ]]; then + log_msg "================================================================" + log_msg " WARN: 'libcamera' devices are currently not supported on Pi 5! " + log_msg "================================================================" + fi for device in $(get_libcamera_path); do log_msg "Detected 'libcamera' device -> ${device}" done From 65fc96a20ee5c3280c518dcae0983905bc9dbc24 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz Date: Tue, 16 Jan 2024 22:53:28 +0100 Subject: [PATCH 6/6] docs: fix buster hint link (#236) Signed-off-by: Patrick Gehrsitz --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a280f44f..8f4bff3d 100644 --- a/README.md +++ b/README.md @@ -64,10 +64,10 @@ Not available: :heavy_minus_sign: | Operating System | X86 Architecture | ARM Architecture | | :-------------------------------: | :----------------: | :-----------------------------------------: | -| Raspberry Pi OS (buster) | :heavy_minus_sign: | :x: ([Hint](#hint)) | +| Raspberry Pi OS (buster) | :heavy_minus_sign: | :x: ([Hint](#hint-buster)) | | Raspberry Pi OS (bullseye) | :heavy_minus_sign: | :heavy_check_mark: | | Raspberry Pi OS (bookworm) | :heavy_minus_sign: | :heavy_check_mark: ([Hint](#hint-bookworm)) | -| MainsailOS (<0.7.1) | :heavy_minus_sign: | :x: ([Hint](#hint)) | +| MainsailOS (<0.7.1) | :heavy_minus_sign: | :x: ([Hint](#hint-buster)) | | MainsailOS (>1.0.0) | :heavy_minus_sign: | :heavy_check_mark: (rpi) | | Armbian | :question: | :heavy_check_mark: | | DietPi | :question: | :heavy_check_mark: (rpi) |