Want more timely Centmin Mod News Updates?
Become a Member

Beta Branch update inc/imagick_install.inc - versionlock ImageMagick6

Discussion in 'Centmin Mod Github Commits' started by eva2000, Aug 12, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    update inc/imagick_install.inc - versionlock ImageMagick6

    - imagick PHP extension installed via source compile is compiled against of the system installed ImageMagick6 yum packages provided by REMI yum repo. REMI yum repo ImageMagick6 is constantly updated via yum update. Which means imagick PHP extension can complain during php-fpm restarts or imagick PHP extension usage when yum update does update ImageMagick6 system packages. This usually requires 123.09beta01's centmin.sh menu option 15 run to recompile imagick PHP extension against the newly updated ImageMagick6 yum packages. Most folks new to Centmin Mod wouldn't know to run centmin.sh menu option 15 to fix this PHP-FPM - Restarting PHP-FPM gives a PHP warning
    - the solution I committed now is to version lock ImageMagick6 system packages at initial Centmin Mod install time so that general manual or yum-cron initiated yum updates skip over ImageMagick6 yum updates so as to preserve the same version that imagick PHP extension was compiled against. Then only unlock the version lock when you subsequently run 123.09beta01's centmin.sh menu option 15 which will update ImageMagick6 system package + recompile imagick PHP extension and then re-lock the updated ImageMagick6 system version.

    Continue reading...

    123.09beta01 branch
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    example from updated routine when you run centmin.sh menu option 15 in 123.09beta01
    Code (Text):
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2...
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 15
    --------------------------------------------------------
    

    Code (Text):
    Check for php extensions
    
    Check for ImageMagicK System Updates (YUM)
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.linode.com
     * epel: fedora-epel.mirror.lstn.net
     * extras: mirrors.linode.com
     * remi: repo1.dal.innoscale.net
     * updates: mirrors.linode.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package ImageMagick6.x86_64 0:6.9.9.5-1.el7.remi will be updated
    ---> Package ImageMagick6.x86_64 0:6.9.9.6-1.el7.remi will be an update
    ---> Package ImageMagick6-c++.x86_64 0:6.9.9.5-1.el7.remi will be updated
    ---> Package ImageMagick6-c++.x86_64 0:6.9.9.6-1.el7.remi will be an update
    ---> Package ImageMagick6-c++-devel.x86_64 0:6.9.9.5-1.el7.remi will be updated
    ---> Package ImageMagick6-c++-devel.x86_64 0:6.9.9.6-1.el7.remi will be an update
    ---> Package ImageMagick6-devel.x86_64 0:6.9.9.5-1.el7.remi will be updated
    ---> Package ImageMagick6-devel.x86_64 0:6.9.9.6-1.el7.remi will be an update
    ---> Package ImageMagick6-libs.x86_64 0:6.9.9.5-1.el7.remi will be updated
    ---> Package ImageMagick6-libs.x86_64 0:6.9.9.6-1.el7.remi will be an update
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ================================================================================
     Package                    Arch       Version                   Repository
                                                                               Size
    ================================================================================
    Updating:
     ImageMagick6               x86_64     6.9.9.6-1.el7.remi        remi      75 k
     ImageMagick6-c++           x86_64     6.9.9.6-1.el7.remi        remi     171 k
     ImageMagick6-c++-devel     x86_64     6.9.9.6-1.el7.remi        remi     109 k
     ImageMagick6-devel         x86_64     6.9.9.6-1.el7.remi        remi     108 k
     ImageMagick6-libs          x86_64     6.9.9.6-1.el7.remi        remi     2.2 M
    
    Transaction Summary
    ================================================================================
    Upgrade  5 Packages
    

    Code (Text):
    Total download size: 2.7 M
    Downloading packages:
    No Presto metadata available for remi
    --------------------------------------------------------------------------------
    Total                                               12 MB/s | 2.7 MB  00:00
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Updating   : ImageMagick6-libs-6.9.9.6-1.el7.remi.x86_64                 1/10
      Updating   : ImageMagick6-6.9.9.6-1.el7.remi.x86_64                      2/10
      Updating   : ImageMagick6-devel-6.9.9.6-1.el7.remi.x86_64                3/10
      Updating   : ImageMagick6-c++-6.9.9.6-1.el7.remi.x86_64                  4/10
      Updating   : ImageMagick6-c++-devel-6.9.9.6-1.el7.remi.x86_64            5/10
      Cleanup    : ImageMagick6-c++-devel-6.9.9.5-1.el7.remi.x86_64            6/10
      Cleanup    : ImageMagick6-devel-6.9.9.5-1.el7.remi.x86_64                7/10
      Cleanup    : ImageMagick6-6.9.9.5-1.el7.remi.x86_64                      8/10
      Cleanup    : ImageMagick6-c++-6.9.9.5-1.el7.remi.x86_64                  9/10
      Cleanup    : ImageMagick6-libs-6.9.9.5-1.el7.remi.x86_64                10/10
      Verifying  : ImageMagick6-devel-6.9.9.6-1.el7.remi.x86_64                1/10
      Verifying  : ImageMagick6-libs-6.9.9.6-1.el7.remi.x86_64                 2/10
      Verifying  : ImageMagick6-c++-devel-6.9.9.6-1.el7.remi.x86_64            3/10
      Verifying  : ImageMagick6-6.9.9.6-1.el7.remi.x86_64                      4/10
      Verifying  : ImageMagick6-c++-6.9.9.6-1.el7.remi.x86_64                  5/10
      Verifying  : ImageMagick6-c++-6.9.9.5-1.el7.remi.x86_64                  6/10
      Verifying  : ImageMagick6-libs-6.9.9.5-1.el7.remi.x86_64                 7/10
      Verifying  : ImageMagick6-6.9.9.5-1.el7.remi.x86_64                      8/10
      Verifying  : ImageMagick6-devel-6.9.9.5-1.el7.remi.x86_64                9/10
      Verifying  : ImageMagick6-c++-devel-6.9.9.5-1.el7.remi.x86_64           10/10
    
    Updated:
      ImageMagick6.x86_64 0:6.9.9.6-1.el7.remi                                  
      ImageMagick6-c++.x86_64 0:6.9.9.6-1.el7.remi                              
      ImageMagick6-c++-devel.x86_64 0:6.9.9.6-1.el7.remi                        
      ImageMagick6-devel.x86_64 0:6.9.9.6-1.el7.remi                            
      ImageMagick6-libs.x86_64 0:6.9.9.6-1.el7.remi                            
    
    Complete!
    
    real    0m11.027s
    user    0m6.270s
    sys     0m1.257s
    

    locked versions after ImageMagick6 update
    Code (Text):
    Loaded plugins: fastestmirror, priorities, versionlock
    Error: Error: versionlock delete: no matches
    Loaded plugins: fastestmirror, priorities, versionlock
    Adding versionlock on: 0:ImageMagick6-6.9.9.6-1.el7.remi
    Adding versionlock on: 0:ImageMagick6-devel-6.9.9.6-1.el7.remi
    Adding versionlock on: 0:ImageMagick6-c++-6.9.9.6-1.el7.remi
    Adding versionlock on: 0:ImageMagick6-c++-devel-6.9.9.6-1.el7.remi
    Adding versionlock on: 0:ImageMagick6-libs-6.9.9.6-1.el7.remi
    versionlock added: 5
    

    Then the imagick PHP extension recompile part picks up on updated ImageMagick6
    Code (Text):
    checking for PHP prefix... /usr/local
    checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
    checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20160303
    checking for PHP installed headers prefix... /usr/local/include/php
    checking if debug is enabled... no
    checking if zts is enabled... no
    checking for re2c... re2c
    checking for re2c version... 0.14.3 (ok)
    checking for gawk... gawk
    checking whether to enable the imagick extension... yes, shared
    checking for pkg-config... /bin/pkg-config
    checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist
    checking Testing /usr/bin/MagickWand-config... It exists
    found in /usr/bin/MagickWand-config
    checking if ImageMagick version is at least 6.2.4... found version 6.9.9 Q16
    checking for MagickWand.h or magick-wand.h header... user location /usr/include/ImageMagick-6/wand/MagickWand.h
    checking PHP version is at least 5.1.3... yes. found 7.1.8
    libs
    -lMagickWand-6.Q16 -lMagickCore-6.Q16
    

    and imagick is compiled into PHP against the locked version = ImageMagick 6.9.9-6 Q16 x86_64 2017-08-11
    Code (Text):
    php --ri imagick
    
    imagick
    
    imagick module => enabled
    imagick module version => 3.4.3
    imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
    Imagick compiled with ImageMagick version => ImageMagick 6.9.9-6 Q16 x86_64 2017-08-11 http://www.imagemagick.org
    Imagick using ImageMagick library version => ImageMagick 6.9.9-6 Q16 x86_64 2017-08-11 http://www.imagemagick.org
    ImageMagick copyright => © 1999-2017 ImageMagick Studio LLC
    ImageMagick release date => 2017-08-11
    ImageMagick number of supported formats:  => 238
    ImageMagick supported formats => 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    
    Directive => Local Value => Master Value
    imagick.locale_fix => 0 => 0
    imagick.skip_version_check => 0 => 0
    imagick.progress_monitor => 0 => 0
    

    The same happens on fresh initial Centmin Mod installs ImageMagick6 is version locked.

    You can verify the versionlock using command
    Code (Text):
    yum versionlock list
    

    example
    Code (Text):
    yum versionlock list
    Loaded plugins: fastestmirror, priorities, versionlock
    0:libc-client-2007f-16.el7.*
    0:uw-imap-devel-2007f-16.el7.*
    0:ImageMagick6-6.9.9.6-1.el7.remi.*
    0:ImageMagick6-devel-6.9.9.6-1.el7.remi.*
    0:ImageMagick6-c++-6.9.9.6-1.el7.remi.*
    0:ImageMagick6-c++-devel-6.9.9.6-1.el7.remi.*
    0:ImageMagick6-libs-6.9.9.6-1.el7.remi.*
    versionlock list done
    
     
    Last edited: Aug 12, 2017
  3. Sunka

    Sunka Active Member

    926
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +389
    Local Time:
    12:35 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    So we can not update through yum remi repo update than option 15 afert that?
    Is there solution to continue that old way?

    Or at least when execute yum update for remi repo we can see that there is newer version, so after that go to option 15 to update and recompile.

    There is more of us who did that way, than the newer users which do not know that after update they should run option 15.
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    yes sort of

    you can do old way via --disableplugin=priorities,versionlock that disables versionlock plugin temporarily for yum command
    Code (Text):
    yum update --enablerepo=remi --disableplugin=priorities,versionlock
    

    then you'd need to update version lock
    Code (Text):
    yum versionlock delete ImageMagick6 ImageMagick6-devel ImageMagick6-c++ ImageMagick6-c++-devel ImageMagick6-libs
    yum versionlock ImageMagick6 ImageMagick6-devel ImageMagick6-c++ ImageMagick6-c++-devel ImageMagick6-libs
    

    then run centmin.sh menu option 15 to recompile imagick PHP extension which would do the manual yum and version lock again anyway as it does this before recompiling imagick PHP extension.

    old or new way, still require centmin.sh menu option 15 to recompile imagick PHP extension
     
  5. Sunka

    Sunka Active Member

    926
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +389
    Local Time:
    12:35 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    So, new way is only through option 15 - it will download, update and recompile?

    Any thoughts to see is there is a new version so I do not have to run option 15 every day?
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    just do yum list updates
    Code (Text):
    yum list updates --enablerepo=remi --disableplugin=priorities,versionlock
    
     
  7. Jimmy

    Jimmy Premium Member Premium Member

    1,138
    252
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +609
    Local Time:
    6:35 PM
    1.13.x
    MariaDB 10.1.x
    So let's say I exit CMM menu and it does the Yum Update check, it will always show that there are updates until I run #15 and update IM?

    I'll get the list / update lines and if I run the update line, since IM is locked, it won't update. But until I do the IM update via #15 I'll see that there are updates every time I exit CMM menu.
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    no ImageMagick6 when versionlocked will be hidden from normal yum update checks, so you won't see that there is an ImageMagick6 update at all.

    Unless you run
    Code (Text):
    yum list updates --enablerepo=remi --disableplugin=priorities,versionlock
    
     
    • Informative Informative x 1
  9. Jimmy

    Jimmy Premium Member Premium Member

    1,138
    252
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +609
    Local Time:
    6:35 PM
    1.13.x
    MariaDB 10.1.x
    I just wonder if...

    Is the fact that people need to update via Yum and then #15 to confusing for newbies (for the first time)

    versus

    Not updating IM when there is a security risk and not updating because there is no notice to update - again for a newbie or anyone else for that matter.

    I would say the first is the better solution because people will have an issue the first time, but remember after that. Also, CMM isn't exactly newbie proof. People need to read up on CMM and not just go in blindly. CMM has somewhat of a learning curve.

    You might be trying to make it easier for people but missing an important IM security update...
     
  10. eva2000

    eva2000 Administrator Staff Member

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    oh in future will add ImageMagick6 version update check, unlock, relock into centmin.sh menu option 24 exit yum checks too just figure out how to do it optimally :)
     
    • Like Like x 1
  11. Jimmy

    Jimmy Premium Member Premium Member

    1,138
    252
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +609
    Local Time:
    6:35 PM
    1.13.x
    MariaDB 10.1.x
    Sounds good. Though I would leave it the way it was until you figure that out. People who don't visit this site often might not even realize that IM needs to be updated - because they just run the yum update and not list. I know I don't follow IM updates from IM.

    Granted I've usually run the list yum since I had an update issue. But I assume some people don't run the Yum list updates but rather just install the updates vs. listing them.
     
  12. eva2000

    eva2000 Administrator Staff Member

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    yeah i just don't want to add several additional commands to the instructions for unlocking, updating and re-locking ImageMagick6 when there are updates on centmin.sh menu option 24 exit so figuring that part out now
     
  13. Jimmy

    Jimmy Premium Member Premium Member

    1,138
    252
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +609
    Local Time:
    6:35 PM
    1.13.x
    MariaDB 10.1.x
    Why don't you just have the yum list updates list the updates when coming out the menu. That way people will see right away what needs to be update. That might actually be good overall for people to see what needs to be updated vs. blindly updating. Just an idea.

    Maybe if IM is on that list have a line that says to run #15.
     
  14. Jimmy

    Jimmy Premium Member Premium Member

    1,138
    252
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +609
    Local Time:
    6:35 PM
    1.13.x
    MariaDB 10.1.x
    Maybe coming out the CMM menu you have a section which

    Lists updates.
    Has the commands to both list and update.
    Lists if CMM needs to be updated.

    Like an info box with necessary information and "Update Status" box.
     
  15. eva2000

    eva2000 Administrator Staff Member

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    Yeah that is the path I am testing first :)
     
    • Like Like x 1
  16. eva2000

    eva2000 Administrator Staff Member

    30,606
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,297
    Local Time:
    9:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    preview of what updated centmin.sh menu option 24 exit yum update check would look like :)

    Code (Text):
     checking for YUM updates... please wait...
    -------------------------------------------------------------
      New YUM Updates available for host host.domain.com
    -------------------------------------------------------------
      To list available YUM Updates type:
    -------------------------------------------------------------
      yum list updates --disableplugin=priorities,versionlock --enablerepo=remi
    -------------------------------------------------------------
      Following Updates are available:
    -------------------------------------------------------------
    ImageMagick6.x86_64                        6.9.9.6-1.el7.remi               remi
    ImageMagick6-c++.x86_64                    6.9.9.6-1.el7.remi               remi
    ImageMagick6-c++-devel.x86_64              6.9.9.6-1.el7.remi               remi
    ImageMagick6-devel.x86_64                  6.9.9.6-1.el7.remi               remi
    ImageMagick6-libs.x86_64                   6.9.9.6-1.el7.remi               remi
    epel-release.noarch                        7-10                             epel
    
    -------------------------------------------------------------
      To update type these commands:
    -------------------------------------------------------------
      run centmin.sh menu option 15 to update imagick PHP ext then run:
    
      yum update --disableplugin=priorities --enablerepo=remi
    -------------------------------------------------------------
     Centmin Mod local code is up to date at /usr/local/src/centminmod
     no available updates at this time...
    -------------------------------------------------------------
    
     
    • Like Like x 2
    • Winner Winner x 1
  17. Jimmy

    Jimmy Premium Member Premium Member

    1,138
    252
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +609
    Local Time:
    6:35 PM
    1.13.x
    MariaDB 10.1.x
    Looks nice.