Installing modified source code in EasyApache4

cgibinux

Registered
Aug 31, 2018
3
0
1
52402
cPanel Access Level
Website Owner

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,266
313
Houston

cgibinux

Registered
Aug 31, 2018
3
0
1
52402
cPanel Access Level
Website Owner
Followup to
Installing modified source code in EasyApache4

I have used osc to build custom easyapache4 rpms but I don't see any instructions on the proper way to install them so a cpanel update would always use the custom apache RPMs and use the cpanel RPMs of everything else.

Things to consider:
My custom osc project just contains one subproject ea-apache2
I installed osc and did things on a raspberry pi, not the server it'd install on. The RPMs were made by openSUSE.

I'm guessing it'd involve adding an RPM or yum repository that points to the openSUSE subproject, or maybe installing osc on the server and doing something.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello @cgibinux,

The following quote from the resource linked earlier includes examples of how this works for Apache modules and PHP modules:

Official cPanel Sources:
Official cPanel GitHub All EasyApache 4 package sources are located on cPanels GitHub.
cPanel Production RPM Sources This is cPanels upstream Production ‘branch’ of RPMs that are live on customer systems.
cPanel Development RPM Sources This is cPanels upstream development ‘branch’ of RPMs that are getting ready to go to customer systems, but have not been promoted to the ‘Production’ branch.

Contributions
Apache Modules:
ea-apache24-mod_wsgi - Experimental wsgi package for EasyApache 4.
ea-apache24-mod_xsendfile - mod_xsendfile Apache module for EA4.
ea-apache24-mod_qos - mod_qos Apache 2.4 module for EA4. Currently only works on CentOS 6.

PHP Modules:
ea-php##-php-htscanner-enhanced - Experimental htscanner-enhanced packages.
If I understand correctly, you are not building a custom EA4 RPM for a new Apache or PHP module, but rather you want to replace the existing ea-apache24-2.4.39-4.4.1.cpanel.x86_64 RPM with your own custom RPM. Is that correct? If so, can you provide more information about the steps you have taken thus far?

Thank you.
 

cgibinux

Registered
Aug 31, 2018
3
0
1
52402
cPanel Access Level
Website Owner
Hello @cgibinux,

The following quote from the resource linked earlier includes examples of how this works for Apache modules and PHP modules:



If I understand correctly, you are not building a custom EA4 RPM for a new Apache or PHP module, but rather you want to replace the existing ea-apache24-2.4.39-4.4.1.cpanel.x86_64 RPM with your own custom RPM. Is that correct? If so, can you provide more information about the steps you have taken thus far?

Thank you.
Correct, on a raspberry pi, I used osc to branch from just isv:cpanel:EA4 ea-apache2, checked out the files, created a custom patch to apache, did a commit. On the build.opensuse.org site it shows that it compiled successfully May 30th for CentOS 6 & 7 with a long list of apache rpm files.

ea-apache24-2.4.39-4.8.1.x86_64.rpm (2.36 MB) and many rpm's of modules, that's a different version than the ea-apache24-2.4.39-4.4.1.cpanel.x86_64 installed on the centos 6 server. The directions were to a "production" repository/branch, should I should have done another one to be at the exact same version?

I haven't tried using them on the centos 6 server. Looking for the next step.

In case the custom RPM's don't work, it would be helpful to have instructions on how to quickly revert back to the cpanel version of apache.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello @cgibinux,

The instructions we provide on Building Custom Packages For EasyApache 4 center on building RPMs for Apache and PHP modules that are not included with EasyApache 4. For assistance or questions beyond this (i.e. is a separate YUM repo needed to modify the Apache source RPM), open a support ticket and we can obtain feedback from Development to determine if a different approach is recommended.

In case the custom RPM's don't work, it would be helpful to have instructions on how to quickly revert back to the cpanel version of apache.
The "yum downgrade" command is useful in some cases, however you must also know which dependencies you must also downgrade. It's helpful to setup a development server for testing custom RPMs before pushing them to production. For information on how to obtain a Developer License, see the link below:

Quickstart Development Guide - Obtain a cPanel Developer License - Developer Documentation - cPanel Documentation

Thank you.