update-notifier: tweak update-notifier for ecne release

This commit is contained in:
Luis Guzmán 2024-08-04 23:53:27 +00:00
parent eb213e21dc
commit c947c3a355
3 changed files with 30 additions and 30 deletions

View file

@ -1,6 +1,6 @@
diff -ru source.bak/data/backend_helper.py source/data/backend_helper.py diff -ru a/data/backend_helper.py b/data/backend_helper.py
--- source.bak/data/backend_helper.py 2023-04-30 21:20:07.986410268 -0400 --- a/data/backend_helper.py 2023-04-30 21:20:07.986410268 -0400
+++ source/data/backend_helper.py 2023-04-30 21:35:59.442841302 -0400 +++ b/data/backend_helper.py 2023-04-30 21:35:59.442841302 -0400
@@ -58,35 +58,14 @@ @@ -58,35 +58,14 @@
return _install_all_updates_synaptic() return _install_all_updates_synaptic()
@ -43,9 +43,9 @@ diff -ru source.bak/data/backend_helper.py source/data/backend_helper.py
# start packagemanager # start packagemanager
diff -ru source.orig/data/backend_helper.py source/data/backend_helper.py diff -ru a/data/backend_helper.py b/data/backend_helper.py
--- source.orig/data/backend_helper.py 2023-05-01 10:18:12.941023681 -0400 --- a/data/backend_helper.py 2023-05-01 10:18:12.941023681 -0400
+++ source/data/backend_helper.py 2023-05-01 10:27:12.724396819 -0400 +++ b/data/backend_helper.py 2023-05-01 10:27:12.724396819 -0400
@@ -53,9 +53,10 @@ @@ -53,9 +53,10 @@
def install_all_updates(): def install_all_updates():
""" install all updates either with synaptic or aptdaemon """ """ install all updates either with synaptic or aptdaemon """
@ -59,9 +59,9 @@ diff -ru source.orig/data/backend_helper.py source/data/backend_helper.py
def check_updates(): def check_updates():
diff -ru source.orig/data/backend_helper.py source/data/backend_helper.py diff -ru a/data/backend_helper.py b/data/backend_helper.py
--- source.orig/data/backend_helper.py 2023-05-04 20:33:23.000867005 -0400 --- a/data/backend_helper.py 2023-05-04 20:33:23.000867005 -0400
+++ source/data/backend_helper.py 2023-05-04 20:37:57.616904543 -0400 +++ b/data/backend_helper.py 2023-05-04 20:37:57.616904543 -0400
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
import os import os
import subprocess import subprocess

View file

@ -1,6 +1,6 @@
diff -ru source.orig/src/update-notifier.c source/src/update-notifier.c diff -ru a/src/update-notifier.c b/src/update-notifier.c
--- source.orig/src/update-notifier.c 2023-05-01 12:24:36.171054235 -0400 --- a/src/update-notifier.c 2023-05-01 12:24:36.171054235 -0400
+++ source/src/update-notifier.c 2023-05-01 13:54:27.833304128 -0400 +++ b/src/update-notifier.c 2023-05-01 13:54:27.833304128 -0400
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
gboolean update_timer_finished(gpointer data); gboolean update_timer_finished(gpointer data);
@ -10,7 +10,7 @@ diff -ru source.orig/src/update-notifier.c source/src/update-notifier.c
// the timeout (in sec) when a further activity from dpkg/apt // the timeout (in sec) when a further activity from dpkg/apt
// causes the applet to "ungray" // causes the applet to "ungray"
@@ -388,10 +388,9 @@ @@ -398,10 +398,9 @@ monitor_init(UpgradeNotifier *un)
// monitor these dirs // monitor these dirs
static const char *monitor_dirs[] = { static const char *monitor_dirs[] = {
@ -20,20 +20,20 @@ diff -ru source.orig/src/update-notifier.c source/src/update-notifier.c
+ "/var/cache/apt/archives/", + "/var/cache/apt/archives/",
HOOKS_DIR, HOOKS_DIR,
- CRASHREPORT_DIR, - CRASHREPORT_DIR,
DPKG_INFO_DIR,
NULL}; NULL};
for(i=0;monitor_dirs[i] != NULL;i++) { for(i=0;monitor_dirs[i] != NULL;i++) {
if (getenv("UPSTART_SESSION") && monitor_dirs[i] == CRASHREPORT_DIR) { @@ -422,7 +421,6 @@ monitor_init(UpgradeNotifier *un)
@@ -411,7 +410,6 @@
"/var/lib/dpkg/status", "/var/lib/dpkg/status",
"/var/lib/update-notifier/dpkg-run-stamp", "/var/lib/update-notifier/dpkg-run-stamp",
"/var/lib/apt/periodic/update-success-stamp", "/var/lib/apt/periodic/update-success-stamp",
- LIVEPATCH_FILE, - LIVEPATCH_FILE,
REBOOT_FILE,
NULL}; NULL};
for(i=0;monitor_files[i] != NULL;i++) { for(i=0;monitor_files[i] != NULL;i++) {
GError *error = NULL; diff -ru a/src/update.c b/src/update.c
diff -ru source.orig/src/update.c source/src/update.c --- a/src/update.c 2023-05-01 14:30:39.889778059 -0400
--- source.orig/src/update.c 2023-05-01 14:30:39.889778059 -0400 +++ b/src/update.c 2023-05-01 18:05:21.754318730 -0400
+++ source/src/update.c 2023-05-01 18:05:21.754318730 -0400
@@ -702,7 +702,8 @@ @@ -702,7 +702,8 @@
// show the notification with some delay. otherwise on a login // show the notification with some delay. otherwise on a login
@ -44,9 +44,9 @@ diff -ru source.orig/src/update.c source/src/update.c
return TRUE; return TRUE;
} }
diff -ru source.orig/src/update.c source/src/update.c diff -ru a/src/update.c b/src/update.c
--- source.orig/src/update.c 2023-05-01 14:30:39.889778059 -0400 --- a/src/update.c 2023-05-01 14:30:39.889778059 -0400
+++ source/src/update.c 2023-05-01 20:45:14.717390627 -0400 +++ b/src/update.c 2023-05-01 20:45:14.717390627 -0400
@@ -251,7 +251,7 @@ @@ -251,7 +251,7 @@
GTK_STOCK_DIALOG_INFO, 48,0,NULL); GTK_STOCK_DIALOG_INFO, 48,0,NULL);
notify_notification_set_icon_from_pixbuf (n, pix); notify_notification_set_icon_from_pixbuf (n, pix);

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2012-2023 Ruben Rodriguez <ruben@trisquel.info> # Copyright (C) 2012-2023 Ruben Rodriguez <ruben@trisquel.info>
# Copyright (C) 2023 Luis Guzmán <ark@switnet.org> # Copyright (C) 2024 Luis Guzmán <ark@switnet.org>
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# #
VERSION=13 VERSION=14
COMPONENT=main COMPONENT=main
. ./config . ./config
@ -28,7 +28,7 @@ sed '/update-manager/s/--no-update/--no-update", "--no-check-screen/' -i data/ba
# Actually install all upgrades in "Install all upgrades" menu entry # 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 sed '/client.upgrade_system/s/safe_mode=True/safe_mode=False/' -i data/backend_helper.py
# Check updates with update-notifier instead of aptdaemon # Check updates with update-notifier instead of aptdaemon
patch --no-backup-if-mismatch -p1 < $DATA/check_updates_with_update_manager.patch patch_p1 $DATA/check_updates_with_update_manager.patch
# Shorter check times for apt task ending # Shorter check times for apt task ending
sed '/TIMEOUT_APT_RUN/s/600/60/g' -i src/update-notifier.c 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' # Set the right path for 'check-new-release-gtk' and 'trisquel-release-upgrader'
@ -38,7 +38,7 @@ grep -rl lib/ubuntu-release-upgrader | xargs -r sed -i 's|lib/ubuntu-release-upg
#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 #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
# Reduce the timeout to refresh the status of the tray icon # Reduce the timeout to refresh the status of the tray icon
patch --no-backup-if-mismatch -p1 < $DATA/improve_responsiveness.patch patch_p1 $DATA/improve_responsiveness.patch
#Use custom apt-check to fix motd update notification by striping esm stuff. #Use custom apt-check to fix motd update notification by striping esm stuff.
cp $DATA/apt_check.py data/apt_check.py cp $DATA/apt_check.py data/apt_check.py
@ -127,7 +127,7 @@ EOF
# Removal daemons from ubuntu-advantage # Removal daemons from ubuntu-advantage
truncate -s 0 data/ubuntu-advantage-notification.desktop.in truncate -s 0 data/ubuntu-advantage-notification.desktop.in
sed -i '/ubuntu-advantage-notification/d' debian/update-notifier.install sed -i '/ubuntu-advantage-notification/d' debian/update-notifier.install
sed -i '/ubuntu-advantage-notification.desktop.in.h/,+2d' po/*.po po/*.pot sed -i '/ubuntu-advantage-notification.desktop.in.h/,+2d' po/*.po
# Remove ubuntu-advantage services # Remove ubuntu-advantage services
cat << EOF >> debian/postrm cat << EOF >> debian/postrm
@ -138,9 +138,9 @@ rm -rf /etc/xdg/autostart/ubuntu-advantage-notification.desktop
#DEBHELPER# #DEBHELPER#
EOF EOF
# Force removal of old services on previous version. ## Force removal of old services on previous version. #Not needed for ecne maybe keep around if necessary later.
sed -i '/Description: Daemon/i Breaks: update-notifier-common (<= 3.192.54.6+11.0trisquel8)' debian/control #sed -i '/Description: Daemon/i Breaks: update-notifier-common (<= 3.192.54.6+11.0trisquel8)' debian/control
sed -i '/Suggests: policykit-1/i Breaks: update-notifier-common (<= 3.192.54.6+11.0trisquel8)' debian/control #sed -i '/Suggests: policykit-1/i Breaks: update-notifier-common (<= 3.192.54.6+11.0trisquel8)' debian/control
# Improve gtk dependency # Improve gtk dependency
sed '/Package: update-notifier$/,/^$/s/policykit-1/policykit-1, python3-aptdaemon.gtk3widgets/' -i debian/control sed '/Package: update-notifier$/,/^$/s/policykit-1/policykit-1, python3-aptdaemon.gtk3widgets/' -i debian/control