Update contribs

From SME Server
Revision as of 14:50, 13 December 2017 by Mmccarn (talk | contribs) (→‎yumcheck.sh: Change attachment number to point to new 'yumstingy' and add notes in case curl won't download the file)
Jump to navigationJump to search

Is this article helpful to you?
Please consider donating or volunteering
Thank you!

Update contribs

Background

Important.png Note:
These scripts depend on a yum feature introduced in Centos 6 / SME 9, and will not work on earlier versions


Due to dependencies, the installation of contribs requires very often the installation of rpms coming from 3rd party (non-SME) repositories.

Enabling 3rd party repositories during a general yum update can pull in packages that are incompatible with SME server such as newer versions of PHP, mysql, samba, etc.

Updating the installed contribs needs sometimes to update the dependencies or sometimes only the dependencies get updated.

In order to avoid serious problems of compatibility, it is very important that all the rpms get updated only from the repository they are installed from, instead of only taking the most recent release existing in all the repositories that are available.

Yum doesn't do this job in one command but small scripts must be used for this purpose.

yumcheck.sh

yumcheck.sh can be used to check for and optionally install updates to packages that were originally installed from a 3rd party repository.

yumcheck.sh is an attachment to bugzilla:10158

Install at the sme server shell using: (If this curl command doesn't work you can open the bug using the link above, view the attachment, create a local file with the same content, and make the local file executable)

curl -s https://bugs.contribs.org/attachment.cgi?id=6014 |sed -e 's/\r//' >/usr/local/bin/yumcheck.sh
chmod +x /usr/local/bin/yumcheck.sh


Usage:

yumcheck.sh
Check for updates for all packages installed from non-standard repos. Output only info for packages that need updates
Indicate before exit if any packages were installed using yum localinstall
Indicate before exit if the server requires signal-event post-upgrade; signal-event reboot
yumcheck.sh update
Run in verbose mode, do the updates, prompt the user after checking each repo if updates are pending
yumcheck.sh update -q -y
Show only those items to be updated, do the updates, and answer 'yes' to each suggested update.
yumcheck.sh @/
List all rpms that have been installed using yum localinstall
yumcheck.sh @smecontribs @sogo @/
Check for updates from "smecontribs", "sogo3", and any locally installed rpms
Note that "@sogo" will be expanded to "sogo3" at runtime. Likewise, "@sme" would expand to "smecontribs"

Notes:

  • Using the default settings will list updates from the enabled repositories multiple times (once for each disabled repo with installed packages)
  • Since this command starts from the output of /sbin/e-smith/audittools/newrpms, it is possible to get errors. That is, if you configure a repository, install a package from it, then remove the configuration, this script will error.
  • Arguments starting with "@" are stripped out and handled separately. If *all* arguments start with "@", the default "check-update -q" will be passed to yum.


Related Information

Alternative Scripts

Original scripts

Forum

How to update completely and properly a SME?

Bugzilla

IDProductComponentSummary
10158SME Server FutureNew Feature RequestNFR Improve support for 3rd party repositories