[fedup-dracut] Add some patches for some things that should be in rawhide ASAP
Will Woods
wwoods at fedoraproject.org
Tue Feb 3 12:47:01 UTC 2015
commit e021312097a431f7d956be3666c9fcaa31658223
Author: Will Woods <wwoods at redhat.com>
Date: Tue Feb 3 13:46:26 2015 +0100
Add some patches for some things that should be in rawhide ASAP
...-the-entire-system-journal-to-upgrade.log.patch | 42 ++++++++++++++++++++
...ve-journal.sh-add-boot-ID-to-log-remove-m.patch | 31 ++++++++++++++
0004-Disable-consoleblank-during-upgrade.patch | 32 +++++++++++++++
fedup-dracut.spec | 9 ++++-
4 files changed, 113 insertions(+), 1 deletions(-)
---
diff --git a/0001-Don-t-write-the-entire-system-journal-to-upgrade.log.patch b/0001-Don-t-write-the-entire-system-journal-to-upgrade.log.patch
new file mode 100644
index 0000000..bcb1667
--- /dev/null
+++ b/0001-Don-t-write-the-entire-system-journal-to-upgrade.log.patch
@@ -0,0 +1,42 @@
+From cde5f2d8b71460bb74ac59f38e4f223ab9c67f59 Mon Sep 17 00:00:00 2001
+From: Will Woods <wwoods at redhat.com>
+Date: Mon, 10 Nov 2014 12:06:06 -0500
+Subject: [PATCH 1/4] Don't write the entire system journal to upgrade.log
+
+Prior to fedup 0.9.x, the upgrade process kept its journal in-memory
+only, with a different machine-id, so if we wanted a text version of the
+upgrade log you could just dump the entire journal to a file.
+
+With fedup 0.9.x the upgrade logs go to your system's on-disk journal,
+which means dumping the entire journal dumps your entire system log for
+as far back as that goes. Whoops.
+
+This just adds '-b' to the journalctl call so we only get logs for the
+current boot.
+
+(Bonus cleanup: make certain that our shell does the right thing with
+the backup logfile name by doing "${logfile}.old")
+
+Resolves: rhbz#1161366
+---
+ 85system-upgrade-fedora/save-journal.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/85system-upgrade-fedora/save-journal.sh b/85system-upgrade-fedora/save-journal.sh
+index 7c61e69..89eab1f 100644
+--- a/85system-upgrade-fedora/save-journal.sh
++++ b/85system-upgrade-fedora/save-journal.sh
+@@ -6,7 +6,7 @@ echo "writing logs to disk and rebooting"
+ logfile=/sysroot/var/log/upgrade.log
+
+ # back up old logfile, if present
+-[ -e $logfile ] && rm -rf $logfile.old && mv $logfile $logfile.old
++[ -e $logfile ] && rm -rf ${logfile}.old && mv $logfile ${logfile}.old
+
+-# write out the logfile
+-journalctl -a -m > $logfile
++# write out the logfile. bam!
++journalctl -b -a -m > $logfile
+--
+2.1.0
+
diff --git a/0003-save-journal.sh-add-boot-ID-to-log-remove-m.patch b/0003-save-journal.sh-add-boot-ID-to-log-remove-m.patch
new file mode 100644
index 0000000..dcbb1eb
--- /dev/null
+++ b/0003-save-journal.sh-add-boot-ID-to-log-remove-m.patch
@@ -0,0 +1,31 @@
+From 660157b2d08a5c9d95b8ea1e6eaddb2603ef0983 Mon Sep 17 00:00:00 2001
+From: Will Woods <wwoods at redhat.com>
+Date: Wed, 10 Dec 2014 17:42:34 -0500
+Subject: [PATCH 3/4] save-journal.sh: add boot ID to log, remove -m
+
+Saving the boot ID gives you a way to pull the upgrade log data directly
+from the journal, if you want to search / filter / get more data / etc.
+
+Also, remove the '-m' from the journalctl invocation, since we don't
+really want to pull remote data here.
+---
+ 85system-upgrade-fedora/save-journal.sh | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/85system-upgrade-fedora/save-journal.sh b/85system-upgrade-fedora/save-journal.sh
+index 89eab1f..15f4bc3 100644
+--- a/85system-upgrade-fedora/save-journal.sh
++++ b/85system-upgrade-fedora/save-journal.sh
+@@ -8,5 +8,7 @@ logfile=/sysroot/var/log/upgrade.log
+ # back up old logfile, if present
+ [ -e $logfile ] && rm -rf ${logfile}.old && mv $logfile ${logfile}.old
+
+-# write out the logfile. bam!
+-journalctl -b -a -m > $logfile
++# write out the logfile
++bootid=$(</proc/sys/kernel/random/boot_id); bootid=${bootid//-/}
++echo "-- Boot ID: $bootid --" > $logfile
++journalctl -b -a >> $logfile
+--
+2.1.0
+
diff --git a/0004-Disable-consoleblank-during-upgrade.patch b/0004-Disable-consoleblank-during-upgrade.patch
new file mode 100644
index 0000000..f9c7d4a
--- /dev/null
+++ b/0004-Disable-consoleblank-during-upgrade.patch
@@ -0,0 +1,32 @@
+From d21dd8a3f1f5fb7d0d732eec1b448b3780dcac39 Mon Sep 17 00:00:00 2001
+From: Will Woods <wwoods at redhat.com>
+Date: Thu, 18 Dec 2014 15:29:40 -0500
+Subject: [PATCH 4/4] Disable consoleblank during upgrade
+
+Blanking the console causes some weird corruption - probably due to some
+crufty VT-layer nonsense that nobody wants to touch - so let's.. not.
+Besides, we should keep the progress visible so people don't freak out
+and think it's crashed.
+
+Resolves: rhbz#1173135
+---
+ 90system-upgrade/upgrade.sh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/90system-upgrade/upgrade.sh b/90system-upgrade/upgrade.sh
+index 159b20c..79aad93 100755
+--- a/90system-upgrade/upgrade.sh
++++ b/90system-upgrade/upgrade.sh
+@@ -14,6 +14,9 @@ source_conf /etc/conf.d
+ getarg 'rd.upgrade.break=upgrade' 'rd.break=upgrade' && \
+ emergency_shell -n upgrade "Break before upgrade"
+
++# equivalent to "setterm -blank 0"
++[ -c /dev/tty1 ] && echo -ne '\033[9;0]' > /dev/tty1
++
+ setstate() {
+ export UPGRADE_STATE="$*"
+ echo "$UPGRADE_STATE" > $NEWROOT/var/tmp/system-upgrade.state
+--
+2.1.0
+
diff --git a/fedup-dracut.spec b/fedup-dracut.spec
index 36caa62..ed9f01a 100644
--- a/fedup-dracut.spec
+++ b/fedup-dracut.spec
@@ -3,12 +3,15 @@
Name: fedup-dracut
Version: 0.9.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: The Fedora Upgrade tool initramfs environment
License: GPLv2+
URL: https://github.com/wgwoods/fedup-dracut
Source0: https://github.com/downloads/wgwoods/fedup-dracut/%{name}-%{version}.tar.xz
+Patch1: 0001-Don-t-write-the-entire-system-journal-to-upgrade.log.patch
+Patch2: 0003-save-journal.sh-add-boot-ID-to-log-remove-m.patch
+Patch3: 0004-Disable-consoleblank-during-upgrade.patch
Summary: initramfs environment for system upgrades
BuildRequires: rpm-devel >= 4.10.0
@@ -58,6 +61,10 @@ make install DESTDIR=$RPM_BUILD_ROOT \
%changelog
+* Tue Feb 03 2015 Will Woods <wwoods at redhat.com> 0.9.0-2
+- Don't write the entire system journal to upgrade.log (#1161366)
+- Try to disable console blanking during upgrade (#1173135)
+
* Tue Oct 21 2014 Will Woods <wwoods at redhat.com> 0.9.0-1
- Use rpm's selinux plugin if available (#1146580)
- Fix racy LUKS unlock failure (#1044484)
More information about the scm-commits
mailing list