From b436762026c8a93291a261a9e6d33e84f25e06f7 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sun, 25 Jan 2026 23:20:08 -0300 Subject: [PATCH] chore: remove deprecated libreoffice script and add repair utility --- scripts/utils/fix-collabora-repo.sh | 29 +++++++++ scripts/utils/install-libreoffice-online.sh | 65 --------------------- 2 files changed, 29 insertions(+), 65 deletions(-) create mode 100755 scripts/utils/fix-collabora-repo.sh delete mode 100644 scripts/utils/install-libreoffice-online.sh diff --git a/scripts/utils/fix-collabora-repo.sh b/scripts/utils/fix-collabora-repo.sh new file mode 100755 index 000000000..e1a3c92a3 --- /dev/null +++ b/scripts/utils/fix-collabora-repo.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# fix-collabora-repo.sh +# Removes broken Collabora Online repositories that may cause apt update failures +# + +if [ "$EUID" -ne 0 ]; then + echo "Please run as root" + exit 1 +fi + +echo "Removing Collabora repository configurations..." + +# Remove specific lists if they exist +rm -f /etc/apt/sources.list.d/collabora.list +rm -f /etc/apt/sources.list.d/collaboraoffice.list + +# Remove entries from other files +grep -r "collaboraoffice" /etc/apt/sources.list.d/ | cut -d: -f1 | sort | uniq | while read -r file; do + echo "Cleaning $file..." + sed -i '/collaboraoffice/d' "$file" +done + +sed -i '/collaboraoffice/d' /etc/apt/sources.list + +echo "Updating apt cache..." +apt-get update + +echo "Done." diff --git a/scripts/utils/install-libreoffice-online.sh b/scripts/utils/install-libreoffice-online.sh deleted file mode 100644 index 30b953db7..000000000 --- a/scripts/utils/install-libreoffice-online.sh +++ /dev/null @@ -1,65 +0,0 @@ -sudo apt install -y cloud-guest-utils e2fsprogs - -apt install -y make g++ build-essential -apt install -y openjdk-17-jdk ant -apt install -y sudo systemd wget zip procps ccache -apt install -y automake bison flex git gperf graphviz junit4 libtool m4 nasm -apt install -y libcairo2-dev libjpeg-dev libegl1-mesa-dev libfontconfig1-dev \ - libgl1-mesa-dev libgif-dev libgtk-3-dev librsvg2-dev libpango1.0-dev -apt install -y libcap-dev libcap2-bin libkrb5-dev libpcap0.8-dev openssl libssl-dev -apt install -y libxcb-dev libx11-xcb-dev libxkbcommon-x11-dev libxtst-dev \ - libxrender-dev libxslt1-dev libxt-dev xsltproc -apt install -y libcunit1-dev libcppunit-dev libpam0g-dev libcups2-dev libzstd-dev uuid-runtime -apt install -y python3-dev python3-lxml python3-pip python3-polib -apt install -y nodejs npm -apt install -y libpoco-dev libpococrypto80 -apt install -y libreoffice-dev - - -mkdir -p /opt/lo && cd /opt/lo -wget https://github.com/CollaboraOnline/online/releases/download/for-code-assets/core-co-24.04-assets.tar.gz -tar xf core-co-24.04-assets.tar.gz && rm core-co-24.04-assets.tar.gz - -useradd cool -G sudo -mkdir -p /opt/cool && chown cool:cool /opt/cool -cd /opt/cool -sudo -Hu cool git clone https://github.com/CollaboraOnline/online.git -cd online && sudo -Hu cool ./autogen.sh - -export CPPFLAGS=-I/opt/lo/include -export LDFLAGS=-L/opt/lo/instdir/program -./configure --with-lokit-path=/opt/lo --with-lo-path=/opt/lo/instdir --with-poco-includes=/usr/local/include --with-poco-libs=/usr/local/lib - -sudo -Hu cool make -j$(nproc) - -make install -mkdir -p /etc/coolwsd /usr/local/var/cache/coolwsd - -chown cool:cool /usr/local/var/cache/coolwsd -admin_pwd=$(openssl rand -hex 6) - -cat < /lib/systemd/system/coolwsd.service -[Unit] -Description=Collabora Online WebSocket Daemon -After=network.target - -[Service] -ExecStart=/opt/cool/online/coolwsd --o:sys_template_path=/opt/cool/online/systemplate \ ---o:lo_template_path=/opt/lo/instdir --o:child_root_path=/opt/cool/online/jails \ ---o:admin_console.username=admin --o:admin_console.password=$DOC_EDITOR_ADMIN_PWD \ ---o:ssl.enable=false -User=cool - -[Install] -WantedBy=multi-user.target -EOT - -systemctl daemon-reload -systemctl enable coolwsd.service -systemctl start coolwsd.service -" - -echo "Installation complete!" -echo "Admin password: $admin_pwd" -echo "Access at: https://localhost:9980" -