two bugs in custombuild build file (both 1.1 & 1.2)

Kiekeboe100

Verified User
Joined
Apr 19, 2008
Messages
146
Location
Belgium
Hi,

I found two errors in the build script from CustomBuild 1.1.18

The custom apache configuration files aren't used:
line 639:
Code:
if [ -d custom/configure/ap1/conf ]; then
        AP1CUSTOMCONFDIR=custom/configure/ap1/conf
fi
---- becomes ----
Code:
if [ -d custom/ap1/conf ]; then
        AP1CUSTOMCONFDIR=custom/ap1/conf
fi

line 644:
Code:
if [ -d custom/configure/ap2/conf ]; then
        AP2CUSTOMCONFDIR=custom/configure/ap2/conf
fi
---- becomes ----
Code:
if [ -d custom/ap2/conf ]; then
        AP2CUSTOMCONFDIR=custom/ap2/conf
fi

Another problem is that the custom cert_config isn't used.
around line 3962:
after
Code:
mkdir -p /etc/httpd/conf/ssl.crt
add
Code:
APACHE2_CERTCONFIG=configure/ap2/cert_config
                        if [ -e custom/ap2/cert_config ]; then
                                APACHE2_CERTCONFIG=custom/ap2/cert_config
                        fi

and after
Code:
#install the cert/key
change
Code:
-config ./configure/ap2/cert_config
to
Code:
-config ${APACHE2_CERTCONFIG}

it seems these are also present in custombuild 1.2.12
lines 648, 653, 5491
 
Last edited:
Hello,

I'll have to confirm with Martynas, but I believe the "configure" part of the custom path isn't designed to be there. You basically copy the configure directory, and rename it to custom.

eg:
http://help.directadmin.com/item.php?id=191

there is no "configure" directory in the custom path.

John

Martynas ?

I agree, configure is not supposed to be in the custom path.
That's why I supplied the change in "build". Build is looking for custom/configure/ap2/... while it should be looking for custom/ap2/...
 
Is this "feature" documented somewhere? It seems counter intuitive to me, and I can't remember reading it when I first looked at the custombuild information.

But now that I know I will just create the "configure" subfolder :)

thanks,
Stijn
 

John,

These are the ./configure values which are to be put in custom/ap2/configure.apache. This is the normal behaviour.

But for the apache httpd.conf files (and extra .conf files, and now also the cert_config file), you need a folder custom/CONFIGURE/ap2/conf/ with there the httpd.conf.

The custom folder has to look like this

Code:
custom
--ap2
----configure.apache
----(configure.php5)
--configure
----ap2
------cert_config
------conf
--------httpd.conf
--------extra
----------httpd-alias.conf

While the following makes more sense, as this is the exact replica of the configure folder.

Code:
custom
--ap2
----configure.apache
----(configure.php5)
----cert_config
----conf
------httpd.conf
------extra
--------httpd-alias.conf

But I also understand that this was a choice that has already been made, and because of that it isn't changed with just one update, as there would be a lot of people who's .conf file won't work anymore.

Kind regards,
Stijn
 
Last edited:
Hello,

Thanks guys for your persistence. I didn't realize it was a discrepancy between the formats, thought it was confusion as to which format was correct. What I've done is added a check for the correct custom/ap2 formatted path after the custom/configure/ap2 formatted path. If you have your custom configs in either, the scripts will still find them, so nothing breaks. The custom/ap2 is checked 2nd, so it will have higher priority.

So now, if you have anything in custom/configure/ap2 (for example), it should be moved to custom/ap2 for correctness (even though it will still work if you don't move them).

John
 
Perfect John and thanks. Is this currently available with ./build update or do we have to wait for a release. If we do have to wait for a release this can also temporarily be fixed with a simple replacement:

cd /usr/local/directadmin/custombuild/
perl -pi -e 's/custom\/configure/custom/' build
./build rewrite_confs

BigWil
 
Back
Top