Changes

From SME Server
Jump to navigationJump to search
19,156 bytes added ,  16:10, 15 December 2018
Add notes on correcting yum source after using smedev, smetest or smecontribs-testing
Line 20: Line 20:  
yumcheck.sh is an attachment to [[bugzilla:10158]]
 
yumcheck.sh is an attachment to [[bugzilla:10158]]
   −
Install at the sme server shell using:
+
Install at the sme server shell using (updated 2017-12-14):<br />
 
(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)
 
(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 <nowiki>https://bugs.contribs.org/attachment.cgi?id=6014</nowiki> |sed -e 's/\r//' >/usr/local/bin/yumcheck.sh
+
  curl -s <nowiki>https://bugs.contribs.org/attachment.cgi?id=6016</nowiki> |sed -e 's/\r//' >/usr/local/bin/yumcheck.sh
 
  chmod +x /usr/local/bin/yumcheck.sh
 
  chmod +x /usr/local/bin/yumcheck.sh
   Line 46: Line 46:  
* Arguments starting with "@" are stripped out and handled separately.  If *all* arguments start with "@", the default "check-update -q" will be passed to yum.
 
* Arguments starting with "@" are stripped out and handled separately.  If *all* arguments start with "@", the default "check-update -q" will be passed to yum.
    +
=== Problems ===
 +
 +
==== smeupdates-testing ====
 +
You might be directed in the forums or in bugzilla to install an update to a package from the smedev, smetest, or smeupdates-testing repository.  Once the developer is confident that the update works and solves the problem, it gets "released" to smeupdates or smecontribs.  In this case, yumcheck.sh will continue to look for updates only in original repo until you have installed the "released" version from the correct repository.
 +
 +
Assuming you have been directed to update "smeserver-php-scl" from the "smecontribs-testing" repository, you would "correct" the package once it is released by running:<syntaxhighlight lang="bash">
 +
yum --enablerepo=smecontribs reinstall smeserver-php-scl
 +
</syntaxhighlight>Note: "yum reinstall" works only for identical package versions.  If smecontribs has a newer version, you can get it using "yum --enablerepo=smecontribs update smeserver-php-scl"
 +
 +
==== Changed Dependencies ====
 +
From time to time an rpm will acquire new dependencies. Since yumcheck.sh is restricting each repository to only the packages that already came from that repository, the update will fail.
 +
 +
To work around this problem, you will need to update the affected packages manually with the source repository enabled.
 +
 +
Be sure to check the output of your yum update command carefully before allowing the update to be installed - make sure that no SME-specific rpms are included in the update!
 +
 +
Example:
 +
 +
yumcheck.sh fails to run due to a dependency problem:<syntaxhighlight lang="bash">
 +
# yumcheck.sh update
 +
...
 +
Error: Package: php71-php-mcrypt-7.1.25-1.el6.remi.x86_64 (installed)
 +
          Requires: php71-php-common(x86-64) = 7.1.25-1.el6.remi
 +
...
 +
 +
</syntaxhighlight>Find the repository that the installed package came from:<syntaxhighlight lang="bash">
 +
# yum info php71-php-mcrypt
 +
# yum info php71-php-mcrypt
 +
Loaded plugins: fastestmirror, post-transaction-actions, smeserver
 +
Loading mirror speeds from cached hostfile
 +
* base: centos2.zswap.net
 +
* smeaddons: mirror.canada.pialasse.com
 +
* smeextras: mirror.canada.pialasse.com
 +
* smeos: mirror.canada.pialasse.com
 +
* smeupdates: mirror.canada.pialasse.com
 +
* updates: centos2.zswap.net
 +
Installed Packages
 +
Name        : php71-php-mcrypt
 +
Arch        : x86_64
 +
Version    : 7.1.25
 +
Release    : 2.el6.remi
 +
Size        : 39 k
 +
Repo        : installed
 +
From repo  : remi-safe
 +
Summary    : Standard PHP module provides mcrypt library support
 +
URL        : http://www.php.net/
 +
License    : PHP
 +
Description : The php71-php-mcrypt package contains a dynamic shared object that will add
 +
            : support for using the mcrypt library to PHP.
 +
</syntaxhighlight>Do an update with only the indicated repository enabled:<syntaxhighlight lang="bash">
 +
# yum --disablerepo=* --enablerepo=remi-safe update
 +
...
 +
Dependencies Resolved
 +
 +
============================================================================================================================================================
 +
Package                                  Arch                          Version                                    Repository                        Size
 +
============================================================================================================================================================
 +
Updating:
 +
php54-php                                x86_64                        5.4.45-16.el6.remi                          remi-safe                        1.4 M
 +
php54-php-bcmath                          x86_64                        5.4.45-16.el6.remi                          remi-safe                        59 k
 +
php54-php-cli                            x86_64                        5.4.45-16.el6.remi                          remi-safe                        2.7 M
 +
php54-php-common                          x86_64                        5.4.45-16.el6.remi                          remi-safe                        581 k
 +
php54-php-enchant                        x86_64                        5.4.45-16.el6.remi                          remi-safe                        44 k
 +
php54-php-gd                              x86_64                        5.4.45-16.el6.remi                          remi-safe                        125 k
 +
php54-php-imap                            x86_64                        5.4.45-16.el6.remi                          remi-safe                        65 k
 +
php54-php-ldap                            x86_64                        5.4.45-16.el6.remi                          remi-safe                        56 k
 +
php54-php-mbstring                        x86_64                        5.4.45-16.el6.remi                          remi-safe                        498 k
 +
php54-php-mcrypt                          x86_64                        5.4.45-16.el6.remi                          remi-safe                        49 k
 +
php54-php-mysqlnd                        x86_64                        5.4.45-16.el6.remi                          remi-safe                        1.8 M
 +
php54-php-pdo                            x86_64                        5.4.45-16.el6.remi                          remi-safe                        91 k
 +
php54-php-pear                            noarch                        1:1.10.7-1.el6.remi                        remi-safe                        371 k
 +
php54-php-process                        x86_64                        5.4.45-16.el6.remi                          remi-safe                        54 k
 +
php54-php-soap                            x86_64                        5.4.45-16.el6.remi                          remi-safe                        160 k
 +
php54-php-tidy                            x86_64                        5.4.45-16.el6.remi                          remi-safe                        51 k
 +
php54-php-xml                            x86_64                        5.4.45-16.el6.remi                          remi-safe                        119 k
 +
php55-php                                x86_64                        5.5.38-10.el6.remi                          remi-safe                        1.4 M
 +
php55-php-bcmath                          x86_64                        5.5.38-10.el6.remi                          remi-safe                        60 k
 +
php55-php-cli                            x86_64                        5.5.38-10.el6.remi                          remi-safe                        2.6 M
 +
php55-php-common                          x86_64                        5.5.38-10.el6.remi                          remi-safe                        672 k
 +
php55-php-enchant                        x86_64                        5.5.38-10.el6.remi                          remi-safe                        45 k
 +
php55-php-gd                              x86_64                        5.5.38-10.el6.remi                          remi-safe                        67 k
 +
php55-php-imap                            x86_64                        5.5.38-10.el6.remi                          remi-safe                        66 k
 +
php55-php-ldap                            x86_64                        5.5.38-10.el6.remi                          remi-safe                        57 k
 +
php55-php-mbstring                        x86_64                        5.5.38-10.el6.remi                          remi-safe                        512 k
 +
php55-php-mcrypt                          x86_64                        5.5.38-10.el6.remi                          remi-safe                        50 k
 +
php55-php-mysqlnd                        x86_64                        5.5.38-10.el6.remi                          remi-safe                        175 k
 +
php55-php-pdo                            x86_64                        5.5.38-10.el6.remi                          remi-safe                        93 k
 +
php55-php-pear                            noarch                        1:1.10.7-1.el6.remi                        remi-safe                        371 k
 +
php55-php-process                        x86_64                        5.5.38-10.el6.remi                          remi-safe                        58 k
 +
php55-php-soap                            x86_64                        5.5.38-10.el6.remi                          remi-safe                        163 k
 +
php55-php-tidy                            x86_64                        5.5.38-10.el6.remi                          remi-safe                        52 k
 +
php55-php-xml                            x86_64                        5.5.38-10.el6.remi                          remi-safe                        150 k
 +
php56-php-pear                            noarch                        1:1.10.7-1.el6.remi                        remi-safe                        371 k
 +
php70-php-pear                            noarch                        1:1.10.7-1.el6.remi                        remi-safe                        371 k
 +
php71-php                                x86_64                        7.1.25-2.el6.remi                          remi-safe                        1.4 M
 +
php71-php-bcmath                          x86_64                        7.1.25-2.el6.remi                          remi-safe                        68 k
 +
php71-php-cli                            x86_64                        7.1.25-2.el6.remi                          remi-safe                        2.7 M
 +
php71-php-common                          x86_64                        7.1.25-2.el6.remi                          remi-safe                        597 k
 +
php71-php-enchant                        x86_64                        7.1.25-2.el6.remi                          remi-safe                        53 k
 +
php71-php-fpm                            x86_64                        7.1.25-2.el6.remi                          remi-safe                        1.4 M
 +
php71-php-gd                              x86_64                        7.1.25-2.el6.remi                          remi-safe                        70 k
 +
php71-php-imap                            x86_64                        7.1.25-2.el6.remi                          remi-safe                        73 k
 +
php71-php-json                            x86_64                        7.1.25-2.el6.remi                          remi-safe                        62 k
 +
php71-php-ldap                            x86_64                        7.1.25-2.el6.remi                          remi-safe                        65 k
 +
php71-php-mbstring                        x86_64                        7.1.25-2.el6.remi                          remi-safe                        522 k
 +
php71-php-mcrypt                          x86_64                        7.1.25-2.el6.remi                          remi-safe                        58 k
 +
php71-php-mysqlnd                        x86_64                        7.1.25-2.el6.remi                          remi-safe                        164 k
 +
php71-php-pdo                            x86_64                        7.1.25-2.el6.remi                          remi-safe                        102 k
 +
php71-php-pear                            noarch                        1:1.10.7-1.el6.remi                        remi-safe                        370 k
 +
php71-php-process                        x86_64                        7.1.25-2.el6.remi                          remi-safe                        66 k
 +
php71-php-soap                            x86_64                        7.1.25-2.el6.remi                          remi-safe                        156 k
 +
php71-php-tidy                            x86_64                        7.1.25-2.el6.remi                          remi-safe                        60 k
 +
php71-php-xml                            x86_64                        7.1.25-2.el6.remi                          remi-safe                        155 k
 +
php72-php                                x86_64                        7.2.13-2.el6.remi                          remi-safe                        1.5 M
 +
php72-php-bcmath                          x86_64                        7.2.13-2.el6.remi                          remi-safe                        70 k
 +
php72-php-cli                            x86_64                        7.2.13-2.el6.remi                          remi-safe                        2.9 M
 +
php72-php-common                          x86_64                        7.2.13-2.el6.remi                          remi-safe                        627 k
 +
php72-php-enchant                        x86_64                        7.2.13-2.el6.remi                          remi-safe                        54 k
 +
php72-php-gd                              x86_64                        7.2.13-2.el6.remi                          remi-safe                        73 k
 +
php72-php-imap                            x86_64                        7.2.13-2.el6.remi                          remi-safe                        74 k
 +
php72-php-json                            x86_64                        7.2.13-2.el6.remi                          remi-safe                        64 k
 +
php72-php-ldap                            x86_64                        7.2.13-2.el6.remi                          remi-safe                        69 k
 +
php72-php-mbstring                        x86_64                        7.2.13-2.el6.remi                          remi-safe                        557 k
 +
php72-php-mysqlnd                        x86_64                        7.2.13-2.el6.remi                          remi-safe                        166 k
 +
php72-php-pdo                            x86_64                        7.2.13-2.el6.remi                          remi-safe                        104 k
 +
php72-php-process                        x86_64                        7.2.13-2.el6.remi                          remi-safe                        67 k
 +
php72-php-soap                            x86_64                        7.2.13-2.el6.remi                          remi-safe                        157 k
 +
php72-php-tidy                            x86_64                        7.2.13-2.el6.remi                          remi-safe                        61 k
 +
php72-php-xml                            x86_64                        7.2.13-2.el6.remi                          remi-safe                        156 k
 +
 +
Transaction Summary
 +
============================================================================================================================================================
 +
Upgrade      71 Package(s)
 +
 +
Total size: 30 M
 +
Is this ok [y/N]: y
 +
...
 +
 +
Updated:
 +
  php54-php.x86_64 0:5.4.45-16.el6.remi              php54-php-bcmath.x86_64 0:5.4.45-16.el6.remi        php54-php-cli.x86_64 0:5.4.45-16.el6.remi       
 +
  php54-php-common.x86_64 0:5.4.45-16.el6.remi      php54-php-enchant.x86_64 0:5.4.45-16.el6.remi      php54-php-gd.x86_64 0:5.4.45-16.el6.remi         
 +
  php54-php-imap.x86_64 0:5.4.45-16.el6.remi        php54-php-ldap.x86_64 0:5.4.45-16.el6.remi          php54-php-mbstring.x86_64 0:5.4.45-16.el6.remi   
 +
  php54-php-mcrypt.x86_64 0:5.4.45-16.el6.remi      php54-php-mysqlnd.x86_64 0:5.4.45-16.el6.remi      php54-php-pdo.x86_64 0:5.4.45-16.el6.remi       
 +
  php54-php-pear.noarch 1:1.10.7-1.el6.remi          php54-php-process.x86_64 0:5.4.45-16.el6.remi      php54-php-soap.x86_64 0:5.4.45-16.el6.remi       
 +
  php54-php-tidy.x86_64 0:5.4.45-16.el6.remi        php54-php-xml.x86_64 0:5.4.45-16.el6.remi          php55-php.x86_64 0:5.5.38-10.el6.remi           
 +
  php55-php-bcmath.x86_64 0:5.5.38-10.el6.remi      php55-php-cli.x86_64 0:5.5.38-10.el6.remi          php55-php-common.x86_64 0:5.5.38-10.el6.remi     
 +
  php55-php-enchant.x86_64 0:5.5.38-10.el6.remi      php55-php-gd.x86_64 0:5.5.38-10.el6.remi            php55-php-imap.x86_64 0:5.5.38-10.el6.remi       
 +
  php55-php-ldap.x86_64 0:5.5.38-10.el6.remi        php55-php-mbstring.x86_64 0:5.5.38-10.el6.remi      php55-php-mcrypt.x86_64 0:5.5.38-10.el6.remi     
 +
  php55-php-mysqlnd.x86_64 0:5.5.38-10.el6.remi      php55-php-pdo.x86_64 0:5.5.38-10.el6.remi          php55-php-pear.noarch 1:1.10.7-1.el6.remi       
 +
  php55-php-process.x86_64 0:5.5.38-10.el6.remi      php55-php-soap.x86_64 0:5.5.38-10.el6.remi          php55-php-tidy.x86_64 0:5.5.38-10.el6.remi       
 +
  php55-php-xml.x86_64 0:5.5.38-10.el6.remi          php56-php-pear.noarch 1:1.10.7-1.el6.remi          php70-php-pear.noarch 1:1.10.7-1.el6.remi       
 +
  php71-php.x86_64 0:7.1.25-2.el6.remi              php71-php-bcmath.x86_64 0:7.1.25-2.el6.remi        php71-php-cli.x86_64 0:7.1.25-2.el6.remi         
 +
  php71-php-common.x86_64 0:7.1.25-2.el6.remi        php71-php-enchant.x86_64 0:7.1.25-2.el6.remi        php71-php-fpm.x86_64 0:7.1.25-2.el6.remi         
 +
  php71-php-gd.x86_64 0:7.1.25-2.el6.remi            php71-php-imap.x86_64 0:7.1.25-2.el6.remi          php71-php-json.x86_64 0:7.1.25-2.el6.remi       
 +
  php71-php-ldap.x86_64 0:7.1.25-2.el6.remi          php71-php-mbstring.x86_64 0:7.1.25-2.el6.remi      php71-php-mcrypt.x86_64 0:7.1.25-2.el6.remi     
 +
  php71-php-mysqlnd.x86_64 0:7.1.25-2.el6.remi      php71-php-pdo.x86_64 0:7.1.25-2.el6.remi            php71-php-pear.noarch 1:1.10.7-1.el6.remi       
 +
  php71-php-process.x86_64 0:7.1.25-2.el6.remi      php71-php-soap.x86_64 0:7.1.25-2.el6.remi          php71-php-tidy.x86_64 0:7.1.25-2.el6.remi       
 +
  php71-php-xml.x86_64 0:7.1.25-2.el6.remi          php72-php.x86_64 0:7.2.13-2.el6.remi                php72-php-bcmath.x86_64 0:7.2.13-2.el6.remi     
 +
  php72-php-cli.x86_64 0:7.2.13-2.el6.remi          php72-php-common.x86_64 0:7.2.13-2.el6.remi        php72-php-enchant.x86_64 0:7.2.13-2.el6.remi     
 +
  php72-php-gd.x86_64 0:7.2.13-2.el6.remi            php72-php-imap.x86_64 0:7.2.13-2.el6.remi          php72-php-json.x86_64 0:7.2.13-2.el6.remi       
 +
  php72-php-ldap.x86_64 0:7.2.13-2.el6.remi          php72-php-mbstring.x86_64 0:7.2.13-2.el6.remi      php72-php-mysqlnd.x86_64 0:7.2.13-2.el6.remi     
 +
  php72-php-pdo.x86_64 0:7.2.13-2.el6.remi          php72-php-process.x86_64 0:7.2.13-2.el6.remi        php72-php-soap.x86_64 0:7.2.13-2.el6.remi       
 +
  php72-php-tidy.x86_64 0:7.2.13-2.el6.remi          php72-php-xml.x86_64 0:7.2.13-2.el6.remi         
 +
 +
Complete!
 +
 +
</syntaxhighlight>
 +
 +
The objective is to update only the package or packages that are blocking safe updates using yumcheck.sh.  If updating as above (with only the indicated repository enabled) includes too many packages, you might need to add package names to the update command.  If the indicated packages include dependencies from other repositories you may need to enable those other repositories.
 +
 +
The epel repository, for example, contains many useful packages (fail2ban, nodejs, roundcube, imapsync, and many more) - but "yum --enablerepo=epel update" would break horde and php on a SME server.  In that case you would add the affected package to the update command:<syntaxhighlight lang="bash">
 +
# yum --enablerepo=epel update roundcube
 +
</syntaxhighlight>
    
===Related Information===
 
===Related Information===
Line 58: Line 231:  
  |disablecache=1
 
  |disablecache=1
 
  |noresultsmessage="Bug not found"
 
  |noresultsmessage="Bug not found"
  |headers=show}} [[Category:Howto]] [[Category:Tools]] [[Category:Updating]]
+
  |headers=show}}   [[Category:Howto]]   [[Category:Tools]]   [[Category:Updating]]

Navigation menu