1.391 bug

wattie

Verified User
Joined
May 31, 2008
Messages
1,235
Location
Bulgaria
/usr/local/directadmin/custombuild: ./build update
[: st_dev=83: unexpected operator
./custombuild.tar.gz 100% of 105 kB 131 kBps
extracting custombuild.tar.gz for 1.1 ...
x custombuild/
x custombuild/build
x custombuild/configure/
x custombuild/configure/pureftpd/
x custombuild/configure/pureftpd/configure.pureftpd
x custombuild/configure/ap1/
x custombuild/configure/ap1/configure.php5
x custombuild/configure/ap1/configure.apache_ssl
x custombuild/configure/ap1/conf/
x custombuild/configure/ap1/conf/mime.types
x custombuild/configure/ap1/conf/httpd.conf
x custombuild/configure/ap1/conf/extra/
x custombuild/configure/ap1/conf/extra/httpd-vhosts.conf
x custombuild/configure/ap1/conf/extra/httpd-deflate.conf
x custombuild/configure/ap1/conf/extra/httpd-multilang-errordoc.conf
x custombuild/configure/ap1/conf/extra/httpd-info.conf
x custombuild/configure/ap1/conf/extra/httpd-alias.conf
x custombuild/configure/ap1/conf/extra/httpd-userdir.conf
x custombuild/configure/ap1/conf/extra/httpd-languages.conf
x custombuild/configure/ap1/conf/extra/httpd-default.conf
x custombuild/configure/ap1/conf/extra/httpd-autoindex.conf
x custombuild/configure/ap1/conf/extra/directadmin-vhosts.conf
x custombuild/configure/ap1/conf/extra/httpd-ssl.conf
x custombuild/configure/ap1/conf/magic
x custombuild/configure/ap1/configure.php4
x custombuild/configure/ap2/
x custombuild/configure/ap2/configure.php5
x custombuild/configure/ap2/conf/
x custombuild/configure/ap2/conf/httpd.conf_2.0
x custombuild/configure/ap2/conf/mime.types
x custombuild/configure/ap2/conf/httpd.conf
x custombuild/configure/ap2/conf/extra/
x custombuild/configure/ap2/conf/extra/httpd-vhosts.conf
x custombuild/configure/ap2/conf/extra/httpd-deflate.conf
x custombuild/configure/ap2/conf/extra/httpd-mpm.conf
x custombuild/configure/ap2/conf/extra/httpd-multilang-errordoc.conf
x custombuild/configure/ap2/conf/extra/httpd-mpm.conf_2.0
x custombuild/configure/ap2/conf/extra/httpd-info.conf
x custombuild/configure/ap2/conf/extra/httpd-alias.conf
x custombuild/configure/ap2/conf/extra/httpd-userdir.conf
x custombuild/configure/ap2/conf/extra/httpd-languages.conf
x custombuild/configure/ap2/conf/extra/httpd-dav.conf
x custombuild/configure/ap2/conf/extra/httpd-default.conf
x custombuild/configure/ap2/conf/extra/httpd-autoindex.conf
x custombuild/configure/ap2/conf/extra/directadmin-vhosts.conf
x custombuild/configure/ap2/conf/extra/httpd-ssl.conf
x custombuild/configure/ap2/conf/extra/httpd-manual.conf
x custombuild/configure/ap2/conf/magic
x custombuild/configure/ap2/cert_config
x custombuild/configure/ap2/configure.apache
x custombuild/configure/ap2/configure.php4
x custombuild/configure/dovecot/
x custombuild/configure/dovecot/dovecot.conf
x custombuild/configure/proftpd/
x custombuild/configure/proftpd/configure.proftpd
x custombuild/configure/suphp/
x custombuild/configure/suphp/configure.php5
x custombuild/configure/suphp/configure.suphp
x custombuild/configure/suphp/configure.php4
./versions.txt 100% of 4627 B 29 kBps
[: st_dev=83: unexpected operator
File already exists: servers.txt
MD5 Checksum on servers.txt passed.
File already exists: httpd-2.2.19.tar.gz
MD5 Checksum on httpd-2.2.19.tar.gz passed.
File already exists: httpd_2
File already exists: httpd_2_freebsd
File already exists: httpd_2_debian
File already exists: mime.types
File already exists: mod_perl-2.0.4.tar.gz
MD5 Checksum on mod_perl-2.0.4.tar.gz passed.
File already exists: curl-7.21.6.tar.gz
MD5 Checksum on curl-7.21.6.tar.gz passed.
File already exists: pcre-8.12.tar.gz
MD5 Checksum on pcre-8.12.tar.gz passed.
File already exists: libmcrypt-2.5.8.tar.gz
MD5 Checksum on libmcrypt-2.5.8.tar.gz passed.
File already exists: mhash-0.9.9.9.tar.gz
MD5 Checksum on mhash-0.9.9.9.tar.gz passed.
File already exists: freetype-2.4.4.tar.gz
MD5 Checksum on freetype-2.4.4.tar.gz passed.
File already exists: libiconv-1.13.1.tar.gz
MD5 Checksum on libiconv-1.13.1.tar.gz passed.
File already exists: libxml2-2.7.6.tar.gz
MD5 Checksum on libxml2-2.7.6.tar.gz passed.
File already exists: libxslt-1.1.26.tar.gz
MD5 Checksum on libxslt-1.1.26.tar.gz passed.
File already exists: icu4c-4_6_1-src.tgz
MD5 Checksum on icu4c-4_6_1-src.tgz passed.
File already exists: php-5.2.17.tar.gz
MD5 Checksum on php-5.2.17.tar.gz passed.
File already exists: php-5.2.17-mail-header.patch
MD5 Checksum on php-5.2.17-mail-header.patch passed.
File already exists: Mail-SpamAssassin-3.3.1.tar.gz
MD5 Checksum on Mail-SpamAssassin-3.3.1.tar.gz passed.
File already exists: webalizer-2.23-05-src.tgz
File already exists: proftpd-1.3.3e.tar.gz
MD5 Checksum on proftpd-1.3.3e.tar.gz passed.
File already exists: proftpd
File already exists: proftpd_freebsd
File already exists: proftpd_debian
File already exists: suphp-0.7.1.tar.gz
MD5 Checksum on suphp-0.7.1.tar.gz passed.
File already exists: dovecot-2.0.13.tar.gz
MD5 Checksum on dovecot-2.0.13.tar.gz passed.
File already exists: dovecot.boot
File already exists: dovecot.boot.freebsd
File already exists: dovecot.boot.debian
File already exists: dovecot.conf
File already exists: exim.conf.dovecot.patch
MD5 Checksum on exim.conf.dovecot.patch passed.
File already exists: autoconf-2.68.tar.gz
MD5 Checksum on autoconf-2.68.tar.gz passed.
File already exists: m4-1.4.16.tar.gz
MD5 Checksum on m4-1.4.16.tar.gz passed.
File already exists: automake-1.11.1.tar.gz
MD5 Checksum on automake-1.11.1.tar.gz passed.
File already exists: libtool-2.4.tar.gz
MD5 Checksum on libtool-2.4.tar.gz passed.
/usr/local/directadmin/custombuild:
 
Me too

I also have the same exact problem.

also
Code:
karutis# ./build update_versions
[: st_dev=100: unexpected operator
karutis# ./build clean
[: st_dev=100: unexpected operator

Code:
karutis# uname -a
FreeBSD karutis.-----.lt 7.3-RELEASE FreeBSD 7.3-RELEASE #0: Tue Aug  3 21:25:01 EEST 2010     [email protected]:/usr/obj/usr/src/sys/KARUTIS  amd64
 
Yep, sounds like an issue on the BSD release:

Code:
/usr/local/directadmin/custombuild: uname -a
FreeBSD ... 7.4-RELEASE FreeBSD 7.4-RELEASE #0: Thu Feb 17 03:51:56 UTC 2011 [email][email protected][/email]:/usr/obj/usr/src/sys/GENERIC  i386
 
The only thing I see in the build script that could possibly display that error, is the call to 'fetch'. I don't have a FreeBSD box to test, but I would try issuing the command outside of the build script:
Code:
 fetch -o ./custombuild.tar.gz http://files.directadmin.com/services/custombuild/1.2/custombuild.tar.gz
And see if it is the fetch command producing the stat error.
 
Nope, that's not the case.

Code:
karutis# fetch -o ./custombuild.tar.gz http://files.directadmin.com/services/custombuild/1.2/custombuild.tar.gz
./custombuild.tar.gz                          100% of  105 kB  111 kBps

Thing is that this error gets produced on virtually all build commands:

Code:
karutis# ./build
[: st_dev=100: unexpected operator
 +--------------------------------------------------------+
 |                                                        |
 |            DirectAdmin WebServices Installer           |
 |     Written by Martynas Bendorius and DirectAdmin      |
 |                   Version: 1.1.30                      |
 |                                                        |
 +--------------------------------------------------------+
 |  To build everything run:                              |
 |     ./build all                                        |
 |                                                        |
<.....>

karutis# ./build some-incorrect-param
[: st_dev=100: unexpected operator
 +--------------------------------------------------------+
 |                                                        |
 |            DirectAdmin WebServices Installer           |
<......>
 
how about inserting the line:
set -x
right after the '#!' line then run it again. You should then be able to see each and every line executed in the main code. That should narrow it down to the function in the build script, then you can add a 'set -x' at the beginning of that function to see the actual call that produces that error.
 
This where i get it:

Code:
+ [ ! -e /usr/local/directadmin/custombuild/custombuild.log ]
+ [ FreeBSD = FreeBSD ]
+ stat -s /usr/local/directadmin/custombuild/custombuild.log
+ LOGSIZE=st_dev=100 st_ino=74670 st_mode=0100600 st_nlink=1 st_uid=0 st_gid=0 st_rdev=309911 st_size=1280 st_atime=1309222924 st_mtime=1309360430 st_ctime=1309360430 st_birthtime=1309222924 st_blksize=4096 st_blocks=4 st_flags=0
+ [ st_dev=100 st_ino=74670 st_mode=0100600 st_nlink=1 st_uid=0 st_gid=0 st_rdev=309911 st_size=1280 st_atime=1309222924 st_mtime=1309360430 st_ctime=1309360430 st_birthtime=1309222924 st_blksize=4096 st_blocks=4 st_flags=0 -gt 10485760 ]
[b][color=red][: st_dev=100: unexpected operator[/color][/b]
+ uname -m
+ grep -c 64
+ B64COUNT=1
+ [ 1 -eq 1 ]
+ B64=1
+ LD_LIBRARY_PATH=/lib64:/usr/lib64:/usr/local/lib64:/lib:/usr/lib:/usr/local/lib

So i suppose it's this line:
Code:
  24         if [ ${OS} = "FreeBSD" ]; then
  25                 [b][color=red]LOGSIZE=`stat -s ${LOGFILE}`[/b][/color]
  26         else
  27                 LOGSIZE=`stat -c %s ${LOGFILE}`
  28         fi
  29
 
Last edited:
I didn't see that stat in the build script before, I must be getting old :)

That is the problem, 'stat -s' on FreeBSD is returning a list of of things that the stat function would. Then on line 30 it is trying to compare that to 10485760, which is the error you are getting.

Two things you could do, find the flag to stat to only return the filesize or use a combination of 'ls,cut,sed' or what other combination of shell utilities to isolate the filesize. The other option is to just hard code something there for LOGSIZE (i.e. LOGSIZE=10485761) and have custombuild clobber the log file each time you run it.
 
It should go like this:

Code:
  23         if [ ${OS} = "FreeBSD" ]; then
  24                 LOGSIZE=`stat [b][color=red]-f %z[/color][/b] ${LOGFILE}`
  25         else
  26                 LOGSIZE=`stat -c %s ${LOGFILE}`
  27         fi
  28

Problem is that after each ./build update it is "updated" to the non-fixed version. Immutable flag here is not a very good idea too. Any other ideas?
 
This is only a temporary fix, until smtalk fixes it permanently. The only other option, would be to create a custom version of stat on your box, but that could break other scripts that might depend on it.
 
It's not that:

Code:
/: fetch -o ./custombuild.tar.gz http://files.directadmin.com/services/custombuild/1.2/custombuild.tar.gz
./custombuild.tar.gz                          100% of  105 kB  125 kBps
 
The issue is resolved now. Do a ./build update and everything will be fine from then on.
 
try:
Code:
./build set custombuild 1.2
./build clean
./build update
 
Did anybody have BFD (Bruteforce Detector) installed before updating to 1.391? After updating, BFD doesn't seem to catch anything anymore yet the DA version seems to be catching things.
 
Did anybody have BFD (Bruteforce Detector) installed before updating to 1.391? After updating, BFD doesn't seem to catch anything anymore yet the DA version seems to be catching things.

BFD + APF or BFD + iptables or BFD + CSF?
maybe you should check your BFD configuration
 
Back
Top