PDA

View Full Version : two bugs in custombuild build file (both 1.1 & 1.2)



Kiekeboe100
02-13-2010, 11:47 AM
Hi,

I found two errors in the build script from CustomBuild 1.1.18

The custom apache configuration files aren't used:
line 639:

if [ -d custom/configure/ap1/conf ]; then
AP1CUSTOMCONFDIR=custom/configure/ap1/conf
fi---- becomes ----

if [ -d custom/ap1/conf ]; then
AP1CUSTOMCONFDIR=custom/ap1/conf
fi

line 644:

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

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

mkdir -p /etc/httpd/conf/ssl.crt add

APACHE2_CERTCONFIG=configure/ap2/cert_config
if [ -e custom/ap2/cert_config ]; then
APACHE2_CERTCONFIG=custom/ap2/cert_config
fi

and after
#install the cert/key change

-config ./configure/ap2/cert_config
to

-config ${APACHE2_CERTCONFIG}

it seems these are also present in custombuild 1.2.12
lines 648, 653, 5491

DirectAdmin Support
02-15-2010, 09:29 PM
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

Kiekeboe100
02-16-2010, 03:32 AM
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/...

smtalk
02-17-2010, 10:13 AM
http://directadmin.com/forum/showthread.php?p=174831#post174831 (should be uploaded to DirectAdmin servers soon)

P.S. custom/configure path is not a bug (it was a feature request on the forums and we wouldn't like to change the defaults now)

Kiekeboe100
02-19-2010, 07:13 AM
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

DirectAdmin Support
02-19-2010, 04:21 PM
Hello,

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

Php: http://help.directadmin.com/item.php?id=252

John

Kiekeboe100
02-20-2010, 03:24 AM
Hello,

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

Php: http://help.directadmin.com/item.php?id=252

John

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



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.



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

BigWil
03-30-2010, 04:33 PM
Hello,

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

Php: http://help.directadmin.com/item.php?id=252

John

Wait a minute John. These are saying to put the conf files under custom/ap# and the build script is looking under custom/configure/ap# for the conf files.

What is it going to be in the future? Can we straighten out the confusion on this matter please?

RE: http://www.directadmin.com/forum/showthread.php?p=177622

BigWil

DirectAdmin Support
03-30-2010, 05:17 PM
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

BigWil
03-30-2010, 05:38 PM
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

DirectAdmin Support
03-31-2010, 12:05 AM
./build updatewill get you the new one.

John