#!/bin/sh # # Copyright (C) 2012-2023 Ruben Rodriguez # Copyright (C) 2024 Luis Guzmán # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # VERSION=14 COMPONENT=main . ./config # Don't show the connection check screen when listing available updates sed '/update-manager/s/--no-update/--no-update", "--no-check-screen/' -i data/backend_helper.py # Actually install all upgrades in "Install all upgrades" menu entry sed '/client.upgrade_system/s/safe_mode=True/safe_mode=False/' -i data/backend_helper.py # Shorter check times for apt task ending sed '/TIMEOUT_APT_RUN/s/600/60/g' -i src/update-notifier.c # Set the right path for 'check-new-release-gtk' and 'trisquel-release-upgrader' grep -rl check-new-release-gtk | xargs -r sed -i '/check-new-release-gtk/s|ubuntu|trisquel|' grep -rl lib/ubuntu-release-upgrader | xargs -r sed -i 's|lib/ubuntu-release-upgrader|lib/trisquel-release-upgrader|' # Use update-manager to checks for dist-upgrades. #FIXME: sed '/RELEASE_UPGRADE_CHECKER/s|/usr/lib/ubuntu-release-upgrader/check-new-release-gtk|sleep 5; nice ionice -c3 /usr/lib/update-notifier/backend_helper.py reminder_check|' -i src/update-notifier.h #Use custom apt-check to fix motd update notification by striping esm stuff. cp $DATA/apt_check.py data/apt_check.py sed -i '/test_motd.py/d' debian/rules sed -i '/test_package-data-downloader.py/d' debian/rules rm debian/update-notifier-hp-firmware.conf sed '/hp-firmware/d' -i debian/update-notifier.install sed -i "/ubuntu-drivers-common/d" debian/control echo "exit 0" > data/list-oem-metapackages # Prevent automated connections sed '/Update-Package-Lists/s/1/0/' -i debian/10periodic # Allow to run under KDE sed '/NotShowIn=KDE/d' -i data/update-notifier.desktop.in apply_patch_changes # Custom icons cp $DATA/icons/* ./pixmaps/scalable rm ./pixmaps/{16x16,22x22,24x24,48x48}/ -rf echo "SUBDIRS = scalable" > pixmaps/Makefile.am sed '/pixmaps\/..x..\/Makefile/d' -i configure.ac sed '/usr\/share\/icons\/hicolor\/..x../d' -i debian/update-notifier.install # Disable livepatch sed '/livepatch/d' -i debian/update-notifier.install # Removal daemons from ubuntu-advantage truncate -s 0 data/ubuntu-advantage-notification.desktop.in sed -i '/ubuntu-advantage-notification/d' debian/update-notifier.install sed -i '/ubuntu-advantage-notification.desktop.in.h/,+2d' po/*.po # Remove ubuntu-advantage services cat << EOF >> debian/postrm # Remove previosly installed ubuntu-advantage-notification rm -rf /usr/lib/update-notifier/ubuntu-advantage-notification && \ rm -rf /etc/xdg/autostart/ubuntu-advantage-notification.desktop #DEBHELPER# EOF # Improve gtk dependency sed '/Package: update-notifier$/,/^$/s/policykit-1/policykit-1, python3-aptdaemon.gtk3widgets/' -i debian/control changelog "Disabled hp-firmware handling and ubuntu-drivers" package