Posts Tagged manual

Installing Litmus

Litmus is cool. It is a testing framework for users. It manages the test cases and test results. But it is no automatic testing.

Resources:

However, it was somehow mainly built for mozilla by mozilla, so the only really supported working version is litmus.mozilla.org. You can download and install it, but its not that easy.

I needed to install the following perl packages, most are also listed in INSTALL (I had a centos4):
yum install perl-Getopt-Long perl-Encode perl-Data-Page perl-Params-Util perl-Clone perl-version perl-Time-Piece perl-UNIVERSAL-moniker perl-XML-Parser perl-Class-Trigger perl-Class-DBI perl-HTML-Strip perl-JSON-XS perl-Test-Harness perl-Class-DBI-Pager perl-Date-Manip perl-Class-DBI-mysql perl-Data-Dumper perl-Data-JavaScript-Anon perl-JSON perl-Time-Piece-MySQL perl-XML-XPath perl-Time-HiRes perl-Class-DBI-Plugin-RetrieveAll perl-DBD-mysql perl-DBD-MySQL perl-DBIx-ContextualFetch perl-Class-Data-Inheritable perl-Class-Accessor perl-Ima-DBI perl-Digest-SHA1 perl-Apache-DBI perl-Class-Accessor-Chained perl-Sys-Hostname-Long perl-HTML-Template perl-Text-Template perl-Text-Template-Simple perl-Apache-DBILogin perl-Email-MIME-Encodings perl-Email-Simple perl-Email-MIME-ContentType perl-Email-MIME perl-Email-Address perl-Email-MessageID perl-Module-Pluggable perl-Return-Value perl-Email-MIME-Modifier perl-Email-Send perl-Params-Validate perl-List-MoreUtils perl-DateTime-Locale perl-Class-Singleton perl-Email-Date-Format perl-DateTime perl-DateTime-Format-HTTP perl-DateTime-Format-Mail perl-DateTime-TimeZone perl-PatchReader

Maybe you need not all of those, and some are dependencies of the others, but then on the other hand, having them makes it work…

I installed those from source (CPAN) for more updated versions:
Class-DBI Data-JavaScript HTML-Parser HTML-StripScripts HTML-StripScripts-Parser JSON JSON-XS Template-Toolkit Text-Markdown

Do it like this:
/usr/bin/perl -MCPAN -e ‘install “JSON::XS”‘
CPAN is useful: http://search.cpan.org/~makamaka/JSON-2.12/lib/JSON.pm

Litmus code itself:

In populatedb.sql, you have to say edit the line USE `litmus`; if you want a different database name.

You have to edit localconfig: Important: Set $bugzilla_auth_enabled = 0;
Bugzilla-auth probably never worked.

You need to setup your Webserver to work with Perl, see some other documentation (resources above). Do what INSTALL says. The tests are outdated, 56 fail here, don’t cry.

At the end I ran into the problem that (using litespeed/lsws as a webserver) the login cookie is not set, and you are logged out all the time. Workaround: write a php script that accepts the login and sets the cookie. Suboptimal, but WFM.

EDIT: As a good open source community member, I just wrote some bug reports. With patches. Woohoo!

No Comments

compiling elinks on Stud4

Lynx respectively the configuration on stud4 has some problems with control-keys. Luckily, elinks compiles fine on stud4. You can even browse with tabs and the mouse using it.

wget elinks.or.cz/download/elinks-current-stable.tar.gz
gunzip elinks-current-stable.tar.gz
tar -xf elinks-current-stable.tar
cd elinks-0.11-20080214/
./configure
gmake
src/elinks

No Comments

Squid with parent proxy

This is a configuration for squid for using it with a non-squid parent proxy, i.e. without ICP. This makes especially sense if you want to save bandwidth.

cache_peer proxy.example.com parent 8080 0 no-query no-digest default
#cache_peer proxy.example.com parent 82 0 no-query no-digest login=user:pw
never_direct allow all

If direct fetching is not allowed due to the network structure, without never_direct allow all squid fails with “(110) Connection refused” errors. Using this line denies squid to try to fetch directly.

Other nice things:
Printing out often visited pages:

awk '{print $7}' < /var/log/squid/access.log |sort |uniq -c|sort -n|grep -vE '^ *[0-9] '

(the last grep strips off the entries with only one digit).

I found this very old command for listing the biggest cache objects at http://www.unix.org.ua/squid/FAQ-7.html:


sort -r -n +4 -5 /var/log/squid/access.log | awk '{print $5, $7}' | head -25

Here we have the first command, but for hostnames:

awk '{print $7}' < /var/log/squid/access.log |sed 's/^[a-z]*:\/\///g'|sed 's/\/.*//g'|sort |uniq -c|sort -n

No Comments

Accessing Oracle with OpenOffice Base

Get ojdbc14.jar from:
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc101040.html

Then read here:
http://wiki.services.openoffice.org/wiki/FAQ_(Base)#Why_can.27t_OpenOffice.org_load.2Ffind_my_JDBC_driver.3F

Why can’t OpenOffice.org load/find my JDBC driver?
OpenOffice.org needs to know the path to the class files or the jar files of the JDBC driver. To achieve this, go to the Tools/Options dialog, there choose the page “Java”. On this page, press the “Classpath” button, and add your archive or folder to OOo’s classpath.

Start oobase and create the connection.

No Comments

Linux: Encrypted WLAN

Encrypted WLAN that works for Windows and isn’t as bad as WEP: I chose WPA-PSK with TKIP.

Due to some struggle, I will post my config and setup here. I have a bcm43xx device.
First /etc/wpa_supplicant/wpa_supplicant.conf:


ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
eapol_version=1
ap_scan=1
fast_reauth=1
network={
scan_ssid=1
ssid="yourssid"
psk="yourpsk"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
group=TKIP
}

Bringing it up:


rmmod bcm43xx
modprobe bcm43xx
ifconfig eth1 up
iwlist eth1 scan
# there should be your net in the list, otherwise start again
iwconfig eth1 essid yourssid
killall dhclient
wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant/wpa_supplicant.conf

If it says something containing “success”, go on with dhclient eth1.
But it seems to be quite random sometimes: It says the key is incorrect, and the authentification is tried again in a loop.
Then I just kill it and start the list over and on the third try or something it works.

No Comments