From ff6023cd48d0cae968cb479c36b1cf4a1f58a28b Mon Sep 17 00:00:00 2001 From: Andriy Utkin Date: Thu, 12 Dec 2024 12:26:11 +0000 Subject: [PATCH 1/4] installer: directly create sources.list file for ondrej ppa On Mint Victoria add-apt-repository sets up an entry in a way which doesn't work. # apt update ... Get:12 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease [24.6 kB] Err:12 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 71DAEAAB4AD4CAB6 NO_PUBKEY 4F4EA0AAE5267A6C Reading package lists... Done W: GPG error: https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 71DAEAAB4AD4CAB6 NO_PUBKEY 4F4EA0AAE5267A6C E: The repository 'https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. root@mint-victoria-p:~# echo $? 100 --- installer/v3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/v3.sh b/installer/v3.sh index 5d16dd12..a87c35f7 100644 --- a/installer/v3.sh +++ b/installer/v3.sh @@ -38,7 +38,7 @@ jammy_install() VERSION_CODENAME=jammy # don't say "vera" for Linux Mint at this point : "${SRCLIST_URL:=https://dl.bluecherrydvr.com/sources.list.d/bluecherry-"$VERSION_CODENAME".list}" wget --output-document=/etc/apt/sources.list.d/bluecherry-"$VERSION_CODENAME".list "$SRCLIST_URL" - add-apt-repository ppa:ondrej/php -y + echo "deb [trusted=yes] https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ jammy main" > /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list apt -y update apt -y install php7.4-fpm php7.4-sqlite3 php7.4-curl php7.4-mysql php7.4-gd php-mail php-mail-mime php-mysql php7.4-fpm php7.4-mysql apt -y install bluecherry From 4c7694fc58abbb5a2f89cc54b427c146345f436c Mon Sep 17 00:00:00 2001 From: Andriy Utkin Date: Thu, 12 Dec 2024 13:56:09 +0000 Subject: [PATCH 2/4] Fix setting SIG_IGN handler for SIGCHLD, SIGPIPE Caught thanks to Ubuntu 24.10 giving compilation error: ccache gcc -std=c99 -Wall -g3 -ggdb -O3 -isystem /build/source/stage/include -iquote /build/source/lib -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -I /usr/include/opencv4 -pthread -MMD -DV3_LICENSING -I//build/source/server/lexapi -DBC_VERSION='"3.1.8"' -Wdate-time -D_FORTIFY_SOURCE=3 -c -o signals.o signals.c signals.c: In function 'signals_setup': signals.c:61:25: error: assignment to 'void (*)(int, siginfo_t *, void *)' from incompatible pointer type 'void (*)(int)' [-Wincompatible-pointer-types] 61 | sa.sa_sigaction = SIG_IGN; | ^ make[2]: *** [: signals.o] Error 1 --- server/signals.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/signals.c b/server/signals.c index 64ee60db..7a5ee28e 100644 --- a/server/signals.c +++ b/server/signals.c @@ -58,7 +58,9 @@ void signals_setup() } // these signals are ignored: - sa.sa_sigaction = SIG_IGN; + memset(&sa, 0, sizeof(sa)); + sa.sa_flags = SA_NOCLDWAIT; + sa.sa_handler = SIG_IGN; ret = sigaction(SIGCHLD, &sa, NULL); assert(!ret); ret = sigaction(SIGPIPE, &sa, NULL); From 5b7b1bcecd099ce8a0c60b66865426fd05cc62df Mon Sep 17 00:00:00 2001 From: Andriy Utkin Date: Thu, 12 Dec 2024 14:34:20 +0000 Subject: [PATCH 3/4] installer: add support for 24.10, drop 23.10 --- installer/v3.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/installer/v3.sh b/installer/v3.sh index a87c35f7..c61955f5 100644 --- a/installer/v3.sh +++ b/installer/v3.sh @@ -62,6 +62,7 @@ mantic_install() } # Ubuntu 24.04 +# Ubuntu 24.10 noble_install() { mantic_install @@ -128,10 +129,15 @@ check_distro() } check_distro +if [[ "$ID" == "ubuntu" && "$VERSION_ID" == "23.10" && "$VERSION_CODENAME" == "mantic" ]]; then + echo "This distribution release has reached its End Of Life and is not supported anymore. All users should upgrade." + exit 1 +fi + if [[ "$ID" == "ubuntu" && "$VERSION_ID" == "20.04" && "$VERSION_CODENAME" == "focal" ]]; then focal_install; elif [[ "$ID" == "ubuntu" && "$VERSION_ID" == "22.04" && "$VERSION_CODENAME" == "jammy" ]]; then jammy_install; -elif [[ "$ID" == "ubuntu" && "$VERSION_ID" == "23.10" && "$VERSION_CODENAME" == "mantic" ]]; then mantic_install; elif [[ "$ID" == "ubuntu" && "$VERSION_ID" == "24.04" && "$VERSION_CODENAME" == "noble" ]]; then noble_install; +elif [[ "$ID" == "ubuntu" && "$VERSION_ID" == "24.10" && "$VERSION_CODENAME" == "oracular" ]]; then noble_install; elif [[ "$ID" == "debian" && "$VERSION_ID" == "10" && "$VERSION_CODENAME" == "buster" ]]; then buster_install; elif [[ "$ID" == "debian" && "$VERSION_ID" == "11" && "$VERSION_CODENAME" == "bullseye" ]]; then bullseye_install; elif [[ "$ID" == "debian" && "$VERSION_ID" == "12" && "$VERSION_CODENAME" == "bookworm" ]]; then bookworm_install; @@ -139,5 +145,6 @@ elif [[ "$ID" == "linuxmint" && "$VERSION_ID" == "21.1" && "$VERSION_CODENAME" = elif [[ "$ID" == "linuxmint" && "$VERSION_ID" == "21.2" && "$VERSION_CODENAME" == "victoria" ]]; then jammy_install; # based on Ubuntu 22.04 Jammy elif [[ "$ID" == "linuxmint" && "$VERSION_ID" == "21.3" && "$VERSION_CODENAME" == "virginia" ]]; then jammy_install; # based on Ubuntu 22.04 Jammy else - echo "Currently we only support Ubuntu 20.04 (Focal), Ubuntu 22.04 (Jammy), Ubuntu 23.10 (Mantic), Ubuntu 24.04 (Noble) and Debian 10 (Buster), 11 (Bullseye), 12 (Bookworm), Linux Mint 21.1 (Vera), 21.2 (Victoria), 21.3 (Virginia) for unstable testing" + echo "Currently we only support up to date Ubuntu, Debian and Mint Linux distributions." + exit 1 fi From ef2c5ff1fda116d9a41795e0792aa478bee40233 Mon Sep 17 00:00:00 2001 From: Andriy Utkin Date: Thu, 12 Dec 2024 19:23:10 +0000 Subject: [PATCH 4/4] postinst: Don't use pip on Ubuntu 24.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ++ python3 /tmp/get-pip.py error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install. If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you. Make sure you have pipx installed. See /usr/share/doc/python3.12/README.venv for more information. note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification. ++ return dpkg: error processing package bluecherry (--configure): installed bluecherry package post-installation script subprocess returned error exit status 1 Processing triggers for php8.3-cli (8.3.11-0ubuntu0.24.10.2) ... Processing triggers for php8.3-fpm (8.3.11-0ubuntu0.24.10.2) ... Processing triggers for libc-bin (2.40-1ubuntu3) ... Errors were encountered while processing: bluecherry Error: Sub-process /usr/bin/dpkg returned an error code (1) --- misc/postinstall.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc/postinstall.sh b/misc/postinstall.sh index de52d762..7c12c867 100755 --- a/misc/postinstall.sh +++ b/misc/postinstall.sh @@ -105,6 +105,9 @@ function install_certbot elif [[ "$ID" == ubuntu ]] && [[ "$VERSION_CODENAME" == mantic ]]; then echo 'For Ubuntu 23.10 (mantic) we rely on packaged certbot' return + elif [[ "$ID" == ubuntu ]] && [[ "$VERSION_CODENAME" == oracular ]]; then + echo 'For Ubuntu 24.10 (oracular) we rely on packaged certbot' + return elif [[ "$ID" == debian ]] && [[ "$VERSION_CODENAME" == bookworm ]]; then echo 'For Debian 12 (bookworm) we rely on packaged certbot' return @@ -113,7 +116,7 @@ function install_certbot export PATH=/usr/local/bin:"$PATH" # Ubuntu 23+, Debian 12 make this step fail. Fall back to system package. - install_pip || return + install_pip || return 0 # Install pip3 dependencies pip3 install --user --upgrade setuptools_rust certbot certbot-dns-subdomain-provider