Subversion's user authentication is case sensitive for both userid and password. While this is the standard in the *nix world, unfortunately Windows users tend to put their userid in whatever case they feel like. I couldn't find a configuration option for this in Subversion, also no luck from the net... So I went into the source code and did a quick & dirty workaround since all our users are validating their accounts against Windows Active Directory which is case-insensitive for their userid.
replace strcmp with strcasecmp in the following two lines. This is for Subverison 1.4.0. Just search for strcmp in the same file for newer version.
./subversion/libsvn_repos/authz.c
line 156: else if (strcasecmp(user, group_user) == 0)
line 189: else if (strcasecmp(name, b->user) != 0)
Saturday, February 6, 2010
Monday, January 18, 2010
compiling tesseract for Linux 32-bit
compiling tesseract for Linux 32-bit under a 64-bit Linux environment wasn't the most straight forward thing... even with -m32 flag set for gcc flags,it failed during linking:
setting -m32 for LDFLAGS didn't do the trick, ld likes this flag better "-melf_i386", but setting this in LDFLAGS would cause tesseract fail when running configure
I had to manually go under ccmain do the following with -melf_i386:
tesseract-2.03]$ cd ccmain
ccmain]$ ld -r -o libtesseract_full.o tesseractfull.o \
libtesseract_main.a \
../textord/libtesseract_textord.a \
../pageseg/libtesseract_pageseg.a \
../wordrec/libtesseract_wordrec.a \
../classify/libtesseract_classify.a \
../dict/libtesseract_dict.a \
../viewer/libtesseract_viewer.a \
../image/libtesseract_image.a \
../cutil/libtesseract_cutil.a \
../ccstruct/libtesseract_ccstruct.a \
../ccutil/libtesseract_ccutil.a -melf_i386
after that go back one level up and run make ; make install again.
ld -r -o libtesseract_full.o tesseractfull.o \
libtesseract_main.a \
../textord/libtesseract_textord.a \
../pageseg/libtesseract_pageseg.a \
../wordrec/libtesseract_wordrec.a \
../classify/libtesseract_classify.a \
../dict/libtesseract_dict.a \
../viewer/libtesseract_viewer.a \
../image/libtesseract_image.a \
../cutil/libtesseract_cutil.a \
../ccstruct/libtesseract_ccstruct.a \
../ccutil/libtesseract_ccutil.a
ld: Relocatable linking with relocations from format elf32-i386 (tesseractfull.o) to format elf64-x86-64 (libtesseract_full.o) is not supported
make[3]: *** [libtesseract_full.o] Error 1
libtesseract_main.a \
../textord/libtesseract_textord.a \
../pageseg/libtesseract_pageseg.a \
../wordrec/libtesseract_wordrec.a \
../classify/libtesseract_classify.a \
../dict/libtesseract_dict.a \
../viewer/libtesseract_viewer.a \
../image/libtesseract_image.a \
../cutil/libtesseract_cutil.a \
../ccstruct/libtesseract_ccstruct.a \
../ccutil/libtesseract_ccutil.a
ld: Relocatable linking with relocations from format elf32-i386 (tesseractfull.o) to format elf64-x86-64 (libtesseract_full.o) is not supported
make[3]: *** [libtesseract_full.o] Error 1
setting -m32 for LDFLAGS didn't do the trick, ld likes this flag better "-melf_i386", but setting this in LDFLAGS would cause tesseract fail when running configure
I had to manually go under ccmain do the following with -melf_i386:
tesseract-2.03]$ cd ccmain
ccmain]$ ld -r -o libtesseract_full.o tesseractfull.o \
libtesseract_main.a \
../textord/libtesseract_textord.a \
../pageseg/libtesseract_pageseg.a \
../wordrec/libtesseract_wordrec.a \
../classify/libtesseract_classify.a \
../dict/libtesseract_dict.a \
../viewer/libtesseract_viewer.a \
../image/libtesseract_image.a \
../cutil/libtesseract_cutil.a \
../ccstruct/libtesseract_ccstruct.a \
../ccutil/libtesseract_ccutil.a -melf_i386
after that go back one level up and run make ; make install again.
cd ..
makeMonday, October 26, 2009
Hudson config for SVN credentials
I've been integrating Hudson into our build process, interesting enough that I couldn't find where to set the subversion credentials from Hudson's config menus. Found the solution from web, simply go to URL to config:
http://${HUDSON_HOST:PORT}/scm/SubversionSCM/enterCredential
the file on the server is under:
${HOME}/.hudson/hudson.scm.SubversionSCM.xml
Not sure if it supports multiple repositories with different credentials.
Reference:
http://www.testearly.com/2007/06/12/subversion-authentication-in-hudson/
http://${HUDSON_HOST:PORT}/scm/SubversionSCM/enterCredential
the file on the server is under:
${HOME}/.hudson/hudson.scm.SubversionSCM.xml
Not sure if it supports multiple repositories with different credentials.
Reference:
http://www.testearly.com/2007/06/12/subversion-authentication-in-hudson/
Friday, August 28, 2009
integrate Subversion with Windows Active Directory
apache httpd.conf
<Location /reponame>
DAV svn
SVNPath /opt/subversion/rep/reponame
AuthzSVNAccessFile /opt/subversion/rep/reponame/conf/authz
Require valid-user
AuthBasicProvider ldap
AuthType Basic
AuthName "subversion repository"
AuthLDAPURL "ldap://hostname:389/OU=Users,OU=Shire,DC=shire,DC=org?sAMAccountName?sub?(objectClass=hobbitName)" NONE
AuthLDAPBindDN "CN=Bilbo,CN=Users,DC=shire,DC=org"
AuthLDAPBindPassword "RiNg"
</Location>
authz example
[groups]
wizard = gandalf
hobbit = forodo, sam
[/]
#* = r
@wizard = rw
@hibbot = r
Thursday, August 13, 2009
solaris ps wide
ps -awwx doesn't work under solaris?
don't use the one under /usr/bin/
try this:
/usr/ucb/ps -awwx
/usr/ucb/ps -awwx
Thursday, July 30, 2009
create read-only user in postgres
grant select,insert,update,delete only allows you to grant privileges to an indiviual table.
the following generate the grant commands to all tables in a database for you to copy & paste:
select 'grant select on ' || relname || ' to username;' from pg_class join pg_namespace on pg_namespace.oid=pg_class.relnamespace where nspname ='public' and relkind in ('r','v');
Monday, September 8, 2008
vmware server on ubuntu 8.04 64bit
After installed vmware server 1.0.6 on ubuntu 8.04 64bit, I’ve encountered two problems:
1.
Unable to get the last modification timestamp of the destination file /etc/vmware/ssl/rui.key
solution: apt-get install ia32-libs
2.
Failed to launch vmware:
fwu@vm-master:~$ vmware
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib32/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib32/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib32/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib32/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib32/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib32/libstdc++.so.6)
solution:
fwu@vm-master:~$ sudo
mv /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1.bak
References:
http://ubuntuforums.org/showthread.php?t=312981
http://radio.javaranch.com/davo/2008/06/18/1213791596327.html
1.
Unable to get the last modification timestamp of the destination file /etc/vmware/ssl/rui.key
solution: apt-get install ia32-libs
2.
Failed to launch vmware:
fwu@vm-master:~$ vmware
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib32/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib32/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib32/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib32/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib32/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0′ not found (required by /usr/lib32/libstdc++.so.6)
solution:
fwu@vm-master:~$ sudo
mv /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1.bak
References:
http://ubuntuforums.org/showthread.php?t=312981
http://radio.javaranch.com/davo/2008/06/18/1213791596327.html
Subscribe to:
Posts (Atom)