CustomBuild 2.0 rev. 2369 with steroids

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
10,628
Location
LT, EU
Hello,

CB 2.0 rev. 2369 has been released. It's a huge release for developers :) As it now lets you overwrite any call, execute pre/post hooks etc. For example, you could now:
1) create "./build varnish" or just overwrite regular "./build apache" call with whatever you want by using pre-call hook and 'exiting' at the end
2) execute anything before/after CustomBuild command, for example, after update_versions you could mail yourself/server-owner a message that updates have been applied

All CustomBuild variables are reachable in 'hooks', structure is /usr/local/directadmin/custombuild/custom/hooks/command/pre/anything.sh (pre could be post as well), for example, you could try custom/hooks/versions/pre/test.sh with the following content:
Code:
#!/bin/sh
echo "Oh yeah! My PHP version is ${PHP1_RELEASE_OPT}, and I'm just exiting with a strange error code instead of listing the version updates...."
exit 4

If you'd like to just finish the function, "return" instead of "exit" could be used.

For per-function hooks - if any are needed, just create a ticket/mail us, and they'll be added :)

In addition to this, CB 2.0 rev. 2369 includes update_versions_full, update_full and update_versions full calls, they all do the same:
1) Update OS packages
2) Update CustomBuild and CustomBuild packages

Everything with just a single call.
 
All that I can say is simply... AWESOME JOB! Thank you! Now it's a peace of cake to apply custom patches when needed.

Regarding "update_full" - we may need some additional info regarding what exactly it does. For example in FreeBSD - is it calling freebsd-update and/or updating all ports?
 
All that I can say is simply... AWESOME JOB! Thank you! Now it's a peace of cake to apply custom patches when needed.

Regarding "update_full" - we may need some additional info regarding what exactly it does. For example in FreeBSD - is it calling freebsd-update and/or updating all ports?
“pkg -y upgrade” for now.
 
I think we need some useful examples utilizing this new feature. Like a HOW-TO with practical examples.
 
i've renamed my default username, when trying to update custombuild i get

chown: invalid group: 'root:admin'
 
i've renamed my default username, when trying to update custombuild i get

chown: invalid group: 'root:admin'
It's not related to the version announced. It can be ignored, unless you have any particular problem with it?
 
Can I also add a post hook for the cronjob? In addition to the email that's being send when there is a update available, I would like to call a simple command:

Code:
/root/pushover-notification/notification.sh "title" "updates that are available"

So that I can also receive Pushover notifications when there are updates available.
 
Can I also add a post hook for the cronjob? In addition to the email that's being send when there is a update available, I would like to call a simple command:

Code:
/root/pushover-notification/notification.sh "title" "updates that are available"

So that I can also receive Pushover notifications when there are updates available.
Check CB 2.0 rev. 2048:
Added custom/hooks/cron_execute/pre and custom/hooks/cron_execute/post hooks for pre/post execution of the CustomBuild cronjob. "./build cron" is needed to re-generate the cronjob which uses the hooks.
 
:eek: That's quick, thanks 😄 One thing; I got an error after ./build update, ./build cron and manually testing the cron:

Code:
./custombuild: line 26: syntax error: unexpected end of file

That's because this if isn't closed:

Code:
if [ "${AVAIL_UPDATES}" -gt 0 ]; then

After adding

Code:
fi

to line 16 it works again. And the hook is working perfectly, now update messages are also send as a push notification (y) :

More info; https://erulezz.dev/directadmin-push-notifications-with-pushover/
 

Attachments

  • IMG_0597.PNG
    IMG_0597.PNG
    117 KB · Views: 41
Last edited:
Hey.
It looks like a corupted version of file is uploaded on servers.
Please have a look:
Code:
[root@s1 custombuild]# ./build version
2.0.0 (rev: 2606)

Another ./build update
Code:
Saving to: '/usr/local/directadmin/custombuild/ioncube_loaders_lin_x86-64.tar.gz'


/usr/local/directadmin/custombuild/ 100%[================================================================>]  13.08M  42.4MB/s    in 0.3s


2020-11-27 22:08:04 (42.4 MB/s) - '/usr/local/directadmin/custombuild/ioncube_loaders_lin_x86-64.tar.gz' saved [13714677/13714677]


MD5 Checksum on ioncube_loaders_lin_x86-64.tar.gz passed.

Now it's time for ./build ioncube
Code:
*** MD5 Checksum for ioncube_10.4.4/ioncube_loaders_lin_x86-64.tar.gz failed *again*.***
The md5 checksum value may be incorrect, or a wrong file is being downloaded.
Install continuing with this possibly corrupted file. (it may also be fine)




ionCube loader 10.4.4 is now installed for PHP 7.4.
 
Hey.
It looks like a corupted version of file is uploaded on servers.
Please have a look:
Code:
[root@s1 custombuild]# ./build version
2.0.0 (rev: 2606)

Another ./build update
Code:
Saving to: '/usr/local/directadmin/custombuild/ioncube_loaders_lin_x86-64.tar.gz'


/usr/local/directadmin/custombuild/ 100%[================================================================>]  13.08M  42.4MB/s    in 0.3s


2020-11-27 22:08:04 (42.4 MB/s) - '/usr/local/directadmin/custombuild/ioncube_loaders_lin_x86-64.tar.gz' saved [13714677/13714677]


MD5 Checksum on ioncube_loaders_lin_x86-64.tar.gz passed.

Now it's time for ./build ioncube
Code:
*** MD5 Checksum for ioncube_10.4.4/ioncube_loaders_lin_x86-64.tar.gz failed *again*.***
The md5 checksum value may be incorrect, or a wrong file is being downloaded.
Install continuing with this possibly corrupted file. (it may also be fine)




ionCube loader 10.4.4 is now installed for PHP 7.4.
May you try:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build ioncube

Thank you for the report! It should try installing 10.4.5 now :)
 
Thanks @smtalk now it's fine:
Code:
[root@s1 custombuild]# ./build ioncube
Downloading             ioncube_loaders_lin_x86-64.tar.gz...
--2020-11-27 22:59:34--  https://files-lt.directadmin.com/services/custombuild/ioncube_10.4.5/ioncube_loaders_lin_x86-64.tar.gz
Resolving files-lt.directadmin.com (files-lt.directadmin.com)... 193.46.84.159
Connecting to files-lt.directadmin.com (files-lt.directadmin.com)|193.46.84.159|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13714677 (13M) [application/octet-stream]
Saving to: '/usr/local/directadmin/custombuild/ioncube_loaders_lin_x86-64.tar.gz'

/usr/local/directadmin/custombuild/ 100%[================================================================>]  13.08M  41.4MB/s    in 0.3s

2020-11-27 22:59:35 (41.4 MB/s) - '/usr/local/directadmin/custombuild/ioncube_loaders_lin_x86-64.tar.gz' saved [13714677/13714677]

ionCube loader 10.4.5 is now installed for PHP 7.4.

That was quick!
 
I asked this before but it was ignored..... When I use this with Evo, my download rate increases when compiling (1.5MB/s shown here, it fluctuates)..... Why? Doesn't make sense?

*Think I posted in the wrong thread.
 

Attachments

  • whatthehellisdownloading.jpg
    whatthehellisdownloading.jpg
    250.8 KB · Views: 13
Yes, it’s a wrong thread. CB does not show any network stats on compilation time, so, you should contact the creator of that software for this question.
 
I think you missed my point....... What would be downloading when I compile stuff? Enhanced skin is fine, a few kB if that for the text output, but Evo seems to want to rinse my download, especially over 1MB/s 🤷‍♂️

I do wish JBMC would support Enhanced going forward, or even remove it totally...... Seems we are now forced to use Evo.
 
How can I add two post hooks for php and exim.conf? I would like a script to run after custombuild updates them.
 
Back
Top