[Home]

Summary:ASTERISK-07878: [Patch] Add rollback Option to makefile
Reporter:Tristan Mahe (tristan_mahe)Labels:
Date Opened:2006-10-05 05:16:37Date Closed:2007-10-31 11:39:03
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) MAKEROLLBACK.patch
( 1) makerollback-r73633.patch
( 2) MAKEROLLBACK-trunk-r44464.patch
Description:Add options to makefile:

make rollback: copy all binaries ( modules + asterisk ) in a backup dir.
make rollback-install : restore backuped binaries.


I needed this so that I never have to recompile asterisk in case of a wrong patch.
I just have to restore old binaries and production restarts !
Comments:By: Serge Vecher (serge-v) 2006-10-05 08:54:03

nice feature, but it needs to be against trunk, since this is a new feature. Thanks!

By: Tristan Mahe (tristan_mahe) 2006-10-05 09:34:05

added new patch for trunk r44464 since it's a new feature...

the MAKEROLLBACK patch is for branch 1.2 rev. 44459 for those who wants to use it in a production environnement...

By: jmls (jmls) 2006-11-01 13:08:32.000-0600

cool patch. Can we get it in ?

By: Jason Parker (jparker) 2006-11-20 14:59:55.000-0600

In theory this is a good idea, but it's lacking some stuff I think.

First, things like header files don't get stored.  If you go and install 1.2 over trunk, then rollback-install in trunk, you would have the wrong header files installed.

The same goes for modules.  It should probably clean out the modules dir on the rollback, otherwise, you may end up restoring modules that no longer exist.  (example; you backup in revision 48000, then backup again in revision 50000, and somewhere between those, chan_sip.so is removed/renamed/whatever, and you end up with a nasty conflict)

By: Tristan Mahe (tristan_mahe) 2007-02-07 12:05:29.000-0600

good point, I'll make some change to this patch to backup and restore everything as clean as possible, as soon as possible ;)

By: Jason Parker (jparker) 2007-05-17 15:31:30

Any luck with getting an updated patch?

By: Tristan Mahe (tristan_mahe) 2007-05-21 05:48:18

Sorry was really busy, I'll provide one asap.

By: Tristan Mahe (tristan_mahe) 2007-07-06 04:54:48

quick patch for trunk r73633.

Changes:
- backup headers.
- clean out modules and headers on restore.

Thanks Qwell for pointing this out.

By: Jason Parker (jparker) 2007-10-31 11:39:02

We discussed this on IRC, and came to the conclusion that this functionality would be best achieved by just keeping copies of the source around if you plan on rolling back to it.  All of the people who spoke up agreed that this is exactly what they do on their systems, and that it provides more functionality than we could hope to include here.

Because of this, I'm going to close this report.

We most definitely appreciate it when people post new functionality, and I'd like to apologize for erroneously requesting that you update this patch.  It just sometimes doesn't work out like we might expect.

Note: I'm still giving you karma for this :)