Koozali.org: home of the SME Server

How to update completely and properly a SME?

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: How to update completely and properly a SME?
« Reply #30 on: March 11, 2017, 06:27:23 PM »
ROTFL :-)

Offline TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: How to update completely and properly a SME?
« Reply #31 on: March 12, 2017, 08:58:41 AM »
https://wiki.contribs.org/Boaty_mcboatface

I see no problems with this :-)

Quote
(I'm sure I'll get chastised for this...)

Tell em to get !@#$%^, humour, its what makes the world a civilised place (most of the time) :-)

--
qui scribit bis legit

Offline janet

  • ****
  • 4,812
  • +0/-0
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: How to update completely and properly a SME?
« Reply #33 on: March 18, 2017, 04:40:06 PM »
Wiki page updated:
https://wiki.contribs.org/Update_contribs

New Feature Request created:
https://bugs.contribs.org/show_bug.cgi?id=10158

New version of 'yumcheck.sh' added to bugzilla; installation instructions included on the wiki page.

The new version of the script:
* corrects an error in the "includepkgs" syntax used (separates packages with commas instead of spaces)**
* corrects the logic used to build the list of 'includepkgs' for each repository ***

** when 'includepkgs' used spaces instead of commas, the command would work from the command line but fail from inside the script for some updates

*** The original version of 'yumcheck.sh' would add the packages for each 3rd party repo to the existing list of packages from previously processed repositories.  This version makes sure that includepkgs only includes the packages installed from the current repository.

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: How to update completely and properly a SME?
« Reply #34 on: March 26, 2017, 06:57:42 PM »
https://wiki.contribs.org/Update_contribs

https://bugs.contribs.org/show_bug.cgi?id=10158

yumcheck.sh updated (again).  The bug attachment and the installation instructions on the wiki have been updated.

New features:
* command line arguments starting with "@" will be stripped out and used to match the list of repositories with installed packages.  Only matching repos will be passed to yum.
* a warning is printed before exit if there are packages that were originally installed using 'yum localinstall'

Examples:
yumcheck.sh @sogo
Only look for updates to rpms with a repo name starting with "sogo".

yumcheck.sh @sogo update -q -y
Silently update all rpms originally installed from a repo whose name starts with "sogo"

yumcheck.sh @/
List all packages installed using 'yum localinstall'

guest22

Re: How to update completely and properly a SME?
« Reply #35 on: April 07, 2017, 05:21:14 AM »
Now that the CentOS 6.9 updates are available it would make a good 'stress test' on the script!

Please give it a try and report your results please? https://wiki.contribs.org/Update_contribs

guest22

Re: How to update completely and properly a SME?
« Reply #36 on: April 07, 2017, 05:56:22 AM »
@mmccarn,

would it be possible to DISABLE a (standard) repo and/or multiple repo's? smeextras repo holds outdated packages (way back to 2011) and results in dependency issues with other repo's. So I would like to exclude this repo from being used by yumcheck.

(for now I have added --disablerepo=smeextras to the script yum command)

TIA

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: How to update completely and properly a SME?
« Reply #37 on: April 07, 2017, 01:02:24 PM »
I've added this note to the bug with the script; let me know over there if you disagree with what I'm saying.

If you use "--disablerepo" on the command line when invoking yumcheck.sh, a yum syntax error is generated for any extra rpms installed from the specified repo.

That is, if you call yumcheck.sh with a command line like this:
> yumcheck.sh --disablerepo=sogo3 @sogo
Then the resulting yum command looks something like this:
> yum --disablerepo=sogo3 --enablerepo=sogo3 --setopt="sogo3.includepkgs=gnustep-base.x86_64..."

which causes yum to complain.

The script needs to be modified to:
1. avoid direct update attempts from repositories that are disabled on the command line

2. do something intelligent with rpms that came from the "disabled" repositories.

I can see a way to work on #1, and for now I'll  try to list the RPMs and REPOs that had no update attempted (for #2), but doing something really clever for #2 may be a bit beyond me...

guest22

Re: How to update completely and properly a SME?
« Reply #38 on: April 07, 2017, 01:08:18 PM »
Quick question, there are now 3 scripts. 2 on the wiki page and 1 attached to the above mentioned bug.

Can this be reduced to only 1 preferred script and adjust the wiki page please?

I am now confused as to what script to use.

TIA

Offline mmccarn

  • *
  • 2,626
  • +10/-0
Re: How to update completely and properly a SME?
« Reply #39 on: April 07, 2017, 01:35:06 PM »
I had not done that since the first useful script was created by @Arnaud, and I had not heard his opinion of my version..

I have updated the wiki page to indicate only my 'yumcheck.sh' script, with the original 2 scripts available on the 'discussion' page for reference.

I am actively using and fine-tuning 'yumcheck.sh' - and adjusting it in the bug and in the wiki page instructions when I make changes.


guest22

Re: How to update completely and properly a SME?
« Reply #40 on: April 07, 2017, 01:43:24 PM »
Thanks!

@Arnaud, would you agree on going forward with the yumcheck script as attached to the bug please?

In any case, VERY useful contribution all together. Should make it to a standard part of SME Server's update check routine in Server-manager... :wink:

Offline Arnaud

  • *
  • 143
  • +0/-0
    • GuedeL
Re: How to update completely and properly a SME?
« Reply #41 on: April 11, 2017, 08:10:56 PM »
I had not done that since the first useful script was created by @Arnaud, and I had not heard his opinion of my version..
Hi,
I was just not aware that this topic runs further  :? ...My apologies.

@mmccarn, I would say that the previous version of your scripts (= the script #2) is for me sufficient and does the expected job: for each repo there is a list of rpms that are "updatable", you can decide y/n to update them and at the end I run the magic "signal-event post-upgrade; signal-event reboot". Very simple and reliable.
If I just want to see what could be done, I run the script, look at the rpm lists and simply answer "no" to all the updates.
It is possible to recognize the rpms coming via "yum localinstall" too
=> it fulfills the function I was missing.

Of course, it is always possible to add some nice features....But I don't know if it is really necessary. Again: the script#2 already makes me happy! :)
I think that if further functions are wished and seen as necessary (and not just "nice to have"), it should be defined what should be reached.

I still haven't try your last script but I'll do it and report.

Bye
Arnaud

Offline Arnaud

  • *
  • 143
  • +0/-0
    • GuedeL
Re: How to update completely and properly a SME?
« Reply #42 on: April 18, 2017, 08:50:33 PM »
Hi,

the previous version of your scripts (= the script #2) is for me sufficient and does the expected job

that is not exactly true: I had an update last week:
- the yumcheck script  "saw" 2 possible updates (on repos sogo3 + stephdl)
- the script #2 saw no update  :shock:
- the script #1 saw the same 2 possible updates than the yumcheck script
- on the prod machine I updated with the yumcheck script => OK
- on the other machine I updated with script #1 => OK too

=> I will still compare the results of the different scripts and report in case where there is a discordance between them.

Bye Arnaud

guest22

Re: How to update completely and properly a SME?
« Reply #43 on: April 18, 2017, 08:54:08 PM »
How about script #3 please? The one attached to bugzilla.

Offline Arnaud

  • *
  • 143
  • +0/-0
    • GuedeL
Re: How to update completely and properly a SME?
« Reply #44 on: April 18, 2017, 08:55:58 PM »
How about script #3 please? The one attached to bugzilla.
for me it's called "yumcheck script"  isn't it?