Wednesday, 18 January 2012

Upgrading from CruiseControl.NET 1.5 to 1.6 / 1.7

I've finally decided to update the version of CruiseControl.NET I use, going from 1.5 straight to 1.7 nightly build. My previous attempt ended with cryptic error messages, but, as this time the build server was already having some problems and required maintenance, I went through with the update (after fixing the problems first, of course).

Most important thing, if you don't already know it: there's a validator included in the downloadable package, which you can use to check how the server will interpret your pretty configuration files spaghetti. If you are making use of the pre-processor feature - the validator is indispensable. A neat trick while using it is copying the output (processed) configuration, changing the input files and copying the new output to a separate file, then running diff on those two to check whether the actual change you just introduced is what you were intending to do. In my case - I was checking whether I got exactly the same output while using a two-years-newer release by running my original configuration through the 1.5 validator and trying to get identical results from the 1.7 parser.
The initial result you'll get will most likely be this:

Unused node detected: xmlns:cb="urn:ccnet.config.builder"

Oh. Not good. StackOverflow has an answer that claims to fix this problem, only to result in this:

Unused node detected: xmlns="http://thoughtworks.org/ccnet/1/5"

Well - not exactly a change for the better.  What is the problem? The changes in the configuration parser made it a bit more picky about the files it accepts. Now they have to start with the XML preamble and include the version information (1.5 or 1.6, there's no 1.7 schema yet). The required beginning of the main configuration file is now as follows:

<?xml version="1.0" encoding="utf-8"?>
<cruisecontrol xmlns:cb="urn:ccnet.config.builder"
xmlns="http://thoughtworks.org/ccnet/1/5">

Also, while 1.5 allowed you to include files containing a "naked" node (e.g. to reuse svn version control configuration), 1.6 requires the top level node in the included file to be either a <cb:config-template> or <cb:scope>. Thus, to be on the safe side, start each of your configuration sub-files with the following:

<?xml version="1.0" encoding="utf-8"?>
<cb:config-template xmlns:cb="urn:ccnet.config.builder"
xmlns="http://thoughtworks.org/ccnet/1/5">

With those changes in place, my configuration file results in the same pre-processor output both in CruiseControl.NET 1.5 and 1.7.

Friday, 8 May 2009

D'oh!

I just spent two hours blaming CruiseControl.Net release candidate for a bug, which turned out to be a trailing \ in my configuration.


So remember, kids: nant -D:publishroot="E:\PublicBuilds\" publishbuild will invoke nant with the default target. To make it work as expected, one has to use nant -D:publishroot="E:\PublicBuilds\\" publishbuild.

Monday, 25 August 2008

Using a cellphone GPRS/EDGE/UMTS Internet connection through Bluetooth under Gentoo Linux

Before you start, make sure that:



  • you can browse the Internet from your cellphone (take note of the connection profile you use)

  • you have a working Bluetooth connection between your phone and the PC

  • the devices are paired for connecting without asking for confirmation

  • you have bluez-utils emerged with USE="old-daemons"

Configure a RFCOMM connection with the phone:



  • in /etc/conf.d/bluetooth set RFCOMM_ENABLE=true

  • use sdptool search DUN to find the device's Bluetooth hardware address and the channel on which the cellphone listens for RFCOMM, the scan will take some time

  • in /etc/bluetooth/rfcomm.conf add a new connection with the address and channel you just found:

#
# RFCOMM configuration file.
#

rfcomm0 {
# Automatically bind the device at startup
bind yes;

# Bluetooth address of the device
device XX:XX:XX:XX:XX:XX;

# RFCOMM channel for the connection
channel 4;

# Description of the connection
comment "Cellphone GPRS/UMTS DUN";
}

  • execute /etc/init.d/bluetooth restart, you should now have a /dev/rfcomm0 device available, and cat /dev/rfcomm0 should cause the PC to connect to the cellphone (cat will output nothing, just kill it with Crtl+C when you verify the connection works).


Kernel requirements: besides what is needed for Bluetooth, enable all options under Device Drivers / Network device support / PPP (point-to-point protocol) support. This only adds 16KB to the kernel size. Recompile, install, reboot with your new kernel (or if you really don't want to reboot, compile PPP as a module and modprobe it).


Emerge ppp with USE="dhcp". Create a network service with ln -s /etc/init.d/net /etc/init.d/net.ppp0. Configure it by creating /etc/conf.d/net.ppp0 with the following contents:


### GPRS/EDGE/UMTS configuration ###
config_ppp0=( "ppp" )
link_ppp0="/dev/rfcomm0"

pppd_ppp0=(
"noauth"
"debug"
"local"

"defaultroute"
"usepeerdns"

"lcp-echo-interval 15"
"lcp-echo-failure 3"

"lock"

"115200"
"crtscts"
)

chat_ppp0="
ABORT BUSY
ABORT ERROR
ABORT 'NO ANSWER'
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT 'Invalid Login'
ABORT 'Login incorrect'
'' AT
TIMEOUT 5
OK 'ATH'
OK 'ATE1'
OK 'AT+CGDCONT=1,\"IP\",\"internet\"'
OK 'ATD*99#'
TIMEOUT 60
CONNECT ''
TIMEOUT 5
~--''
"
### end GPRS/EDGE/UMTS configuration ###

You'll need to replace "internet" with the name of the connection profile you use for your data transfer (this should be provided by your cellular operator - "internet" is what Plus GSM uses in Poland). Start the connection with /etc/init.d/net.ppp0 start and everything should work.


Software used:



  • sys-kernel/gentoo-sources-2.6.25-r7

  • sys-apps/openrc-0.2.5

  • sys-apps/baselayout-2.0.0

  • net-wireless/bluez-libs -3.36

  • net-wireless/bluez-utils-3.36 with USE="old-daemons"

  • net-dialup/ppp-2.4.4-r15 with USE="dhcp"


Hardware used:



  • Nokia N95 8GB

  • HP Pavilion built-in Bluetooth adapter


How-To based on articles:


Sunday, 6 July 2008

Wymiana procesora w laptopie

Jakiś czas temu otwarcie obudowy laptopa było dla mnie przerażające - na pewno coś zepsuję, pogubię śrubki i nie będzie działać. Od pierwszego udokumentowanego podejścia minęło już nieco czasu, zdążyłem się oswoić i nabrać śmiałości. Fotorelacja z wczorajszej zabawy - wymiany procesora w laptopie HP Compaq - jest do obejrzenia dla ciekawskich, ja mam jeszcze parę dodatkowych wskazówek:

  • Rozkręcając laptopa/notebooka/inny mały komputer miej pod ręką pastę termoprzewodzącą i jakąś niekłaczącą szmatkę/chusteczki. Nawet jeśli planujesz tylko zajrzeć do środka - część elementów może wykorzystywać zewnętrzną obudowę w charakterze radiatora, pastę termoprzewodzącą trzeba zawsze wymienić (dokładnie usunąć starą, zaaplikować cienką warstwę świeżej) jeśli się rozdzieli posmarowane nią elementy.
  • Oznaczaj/zapisuj skąd wykręciłeś niestandardowe śrubki). Oszczędza to potem sporo kombinowania. ;-)
  • Większość śrub trzymających obudowę będzie wkręcana od spodu, ale część znajduje się zawsze z wierzchu, pod klawiaturą lub przyciskami multimedialnymi. Sprawdź czy płytka z tymi przyciskami nie jest przykręcona zanim zaczniesz ją podważać. :-)
  • Górna część laptopa (wyświetlacz i klawiatura) połączona jest z płytą główną kilkoma taśmami. Wyglądają one na strasznie delikatne i trudne do wpięcia, na szczęście tak nie jest. Wystarczy je odpiąć (zatrzask jest zazwyczaj od strony płyty głównej) i wyciągnąć.
  • Jeśli coś wymieniałeś - sprawdź, czy komputer nadal się uruchamia przed zmontowaniem go z powrotem. Zazwyczaj da się to zrobić nawet bez klawiatury, a można sobie oszczędzić sporo zbędnej pracy.

Przy okazji - mam na sprzedaż 2 kości RAM do laptopa (DDR 333Mhz 256MB CL2.5) oraz procesor Intel Celeron M 330 1.4GHz.

Monday, 12 May 2008

Witamy w Chinach

Właśnie zobaczyłem mało przyjazny komunikat:


This video is not available in your country.

Cholera. Od kiedy YouTube cenzuruje filmy? W tym przypadku ("Nowy Hymn Radia Maryja / Rammstein") na 100% nie chodzi o ochronę praw autorskich - przy takich zarzutach zdejmują film, a ten przez proxy z Wielkiej Brytanii można obejrzeć.