Changes

Jump to navigation Jump to search
Line 574: Line 574:     
  [ok]
 
  [ok]
 +
 +
====Bug 7060====
 +
 +
Bug 7060 - Post-upgrades not fired after restore from console
 +
 +
e-smith-base for SME8
 +
About line 131 of  /usr/lib/perl5/site_perl/esmith/console/perform_restore.pm
 +
Add the one line given in the original error report.
 +
Create a patch, check it builds, and commit it to CVS
 +
 +
A patch to fire the post-upgrade event just after the restore process:
 +
 +
--- /usr/lib/perl5/site_perl/esmith/console/perform_restore.pm.ori 2012-07-31 16:55:40.000000000 +0200
 +
+++ /usr/lib/perl5/site_perl/esmith/console/perform_restore.pm 2012-07-31 16:56:15.000000000 +0200
 +
@@ -129,6 +129,7 @@
 +
    system("/etc/init.d/haldaemon", "stop");
 +
    system("/etc/init.d/messagebus", "stop");
 +
    rmdir("/mnt/bootstrap-console-backup");
 +
+    system("/sbin/e-smith/signal-event", "post-upgrade")
 +
}
 +
 
 +
#use esmith::console;
 +
 +
----------------------------------------------------------------------
 +
 +
[xxx@xxxx work]$ pwd
 +
/home/xyz/work
 +
 +
[xyz@bui work]$ cvs -z3 -d:pserver:anonymous@smeserver.cvs.sourceforge.net:/cvsroot/smeserver checkout -P e-smith-base
 +
 +
[xyz@buildxxx work]$ cd e-smith-base/sme8/
 +
[xyz@buildxxx sme8]$ cvs update -dPA
 +
 +
[xyz@buildxxx sme8]$ make clean
 +
[xyz@buildxxx sme8]$ make prep
 +
 +
[xyz@buildxxx sme8]$ cp -R e-smith-base-5.2.0 e-smith-base-5.2.0.old
 +
 +
[xyz@buildxxx root]$ ll usr/lib/perl5/site_perl/esmith/console/
 +
total 104
 +
-rw-r--r-- 1 xyz xyz  1761 Jan 27  2007 backup_running.pm
 +
-rw-r--r-- 1 xyz xyz 65997 Feb  6 08:08 configure.pm
 +
-rw-r--r-- 1 xyz xyz
 +
 +
#use esmith::console;
 +
6682 Feb  6 08:08 perform_backup.pm
 +
-rw-r--r-- 1 xyz xyz  4133 Feb  6 08:08 perform_restore.pm
 +
-rw-r--r-- 1 xyz xyz  1037 Mar 27  2008 quitConsole.pm
 +
-rw-r--r-- 1 xyz xyz  862 Mar 27  2008 save_config.pm
 +
-rw-r--r-- 1 xyz xyz  4867 Aug 21  2008 system_password.pm
 +
 +
[xyz@buildxxx root]$ nano usr/lib/perl5/site_perl/esmith/console/perform_restore.pm
 +
 +
* Original
 +
 +
    system("/etc/init.d/haldaemon", "stop");
 +
    system("/etc/init.d/messagebus", "stop");
 +
    rmdir("/mnt/bootstrap-console-backup");  <<<----line 131
 +
}
 +
 +
# use esmith::console;
 +
 +
* Modified
 +
 +
    system("/etc/init.d/haldaemon", "stop");
 +
    system("/etc/init.d/messagebus", "stop");
 +
    rmdir("/mnt/bootstrap-console-backup");
 +
    system("/sbin/e-smith/signal-event", "post-upgrade") <<<line 132
 +
}
 +
 +
#use esmith::console;
 +
 +
[xyz@buildxxx sme8]$ diff -urN e-smith-base-5.2.0.old e-smith-base-5.2.0 > e-smith-base-5.2.0-fire_post-upgrade_after_restore_process.patch
 +
 +
[xyz@buildxxx sme8]$ cat e-smith-base-5.2.0-fire_post-upgrade_after_restore_process.patch
 +
diff -urN e-smith-base-5.2.0.old/root/usr/lib/perl5/site_perl/esmith/console/perform_restore.pm e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/perform_restore.pm
 +
--- e-smith-base-5.2.0.old/root/usr/lib/perl5/site_perl/esmith/console/perform_restore.pm 2013-02-06 08:11:54.926469195 +1100
 +
+++ e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/console/perform_restore.pm 2013-02-06 08:35:24.527637260 +1100
 +
@@ -129,6 +129,7 @@
 +
    system("/etc/init.d/haldaemon", "stop");
 +
    system("/etc/init.d/messagebus", "stop");
 +
    rmdir("/mnt/bootstrap-console-backup");
 +
+    system("/sbin/e-smith/signal-event", "post-upgrade")
 +
}
 +
 +
#use esmith::console;
 +
 +
[xyz@buildxxx sme8]$ nano e-smith-base.spec
 +
 +
[xyz@buildxxx sme8]$ cvs diff e-smith-base.spec
 +
Index: e-smith-base.spec
 +
===================================================================
 +
RCS file: /cvsroot/smeserver/rpms/e-smith-base/sme8/e-smith-base.spec,v
 +
retrieving revision 1.142
 +
diff -r1.142 e-smith-base.spec
 +
7c7
 +
< %define release 70
 +
---
 +
> %define release 71
 +
66a67
 +
> Patch55: e-smith-base-5.2.0-fire_post-upgrade_after_restore_process.patch
 +
113a115,117
 +
> * Wed Feb 6 2013 John Crisp <jcrisp@safeandsoundit.co.uk> 5.2.0-71.sme
 +
> - Post-upgrades not fired after restore from console [SME: 7060]
 +
>
 +
1602a1607
 +
> %patch55 -p1
 +
 +
[xyz@buildxxx sme8]$ make mockbuild           
 +
 +
[xyz@buildxxx sme8]$ ll e-smith-base-5_2_0-71_el5_sme
 +
total 852
 +
-rw-rw-r-- 1 xyz xyz 124407 Feb  6 09:01 build.log
 +
-rw-rw-r-- 1 xyz mock  287857 Feb  6 09:01 e-smith-base-5.2.0-71.el5.sme.src.rpm
 +
-rw-rw-r-- 1 xyz mock  366908 Feb  6 09:01 e-smith-base-5.2.0-71.el5.sme.x86_64.rpm
 +
-rw-rw-r-- 1 xyz mock  52836 Feb  6 09:01 e-smith-base-debuginfo-5.2.0-71.el5.sme.x86_64.rpm
 +
-rw-rw-r-- 1 xyz xyz  25819 Feb  6 09:01 root.log
 +
-rw-rw-r-- 1 xyz xyz  1384 Feb  6 09:01 state.log
 +
 +
Now we commit modifications
 +
 +
[xyz@buildxxx sme8]$ cvs update
 +
? e-smith-base-5.2.0
 +
? e-smith-base-5.2.0-71.el5.sme.src.rpm
 +
? e-smith-base-5.2.0-fire_post-upgrade_after_restore_process.patch
 +
? e-smith-base-5_2_0-71_el5_sme
 +
cvs update: Updating .
 +
M e-smith-base.spec
 +
 +
[xyz@buildxxx sme8]$ cvs commit -m 'Bug 7060 - Post-upgrades not fired after restore from console'
 +
cvs commit: Examining .
 +
? e-smith-base-5_2_0-71_el5_sme
 +
? e-smith-base-5.2.0-fire_post-upgrade_after_restore_process.patch
 +
? e-smith-base-5.2.0-71.el5.sme.src.rpm
 +
? e-smith-base-5.2.0
 +
cvs [server aborted]: "commit" requires write access to the repository
 +
 +
Next: you need a source forge account + write access in CVS for project smeserver (base &/or contribs)
    
===PORTING FROM SME8 TO SME9 - CAUTION===
 
===PORTING FROM SME8 TO SME9 - CAUTION===

Navigation menu