martes 18 de octubre de 2011

Ubuntu 11 : fatal error: libxml/xmlversion.h: No such file or directory

ERROR: /bin/sh: xslt-config: not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
In file included from src/lxml/lxml.etree.c:239:0:
src/lxml/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1

Solution



sudo apt-get install libxml2-dev libxslt-dev

domingo 16 de octubre de 2011

OpenWRT allow remote ssh access


Allow ssh access from port 12345:

shell>/usr/sbin/iptables -I INPUT 1 -p tcp --dport 12345 -j LOG
shell>/usr/sbin/iptables -I INPUT 1 -p tcp --dport 12345 -j ACCEPT
To check if it loads properly -
shell>/usr/sbin/iptables -L | grep 12345
LOG tcp -- anywhere anywhere tcp dpt:12345 LOG level warning
ACCEPT tcp -- anywhere anywhere tcp dpt:12345
I you want to mantain changes Persistently:
shell>nvram set rc_firewall="/usr/sbin/iptables -I INPUT 1 -p tcp --dport 12345 -j LOG"
shell>nvram set rc_firewall="/usr/sbin/iptables -I INPUT 1 -p tcp --dport 12345 -j ACCEPT"

miércoles 5 de octubre de 2011

Ccreate and apply a patch - Subversion

This is not recommended way to merge code with svn! 
 What are diff files ?
A diff file is the difference between a version of the source code in the repository and a working copy. It represents any changes, such as additional features or bug fixes, that have been made by a developer in a working copy. A diff file is generated using the svn diff command. To create a patch:
svn diff > svn_patch.diff
To apply the patch
patch -p0 -i svn_patch.diff


wath is patch command? 
patch takes a patch file patchfile containing a difference listing produced by the diff program and applies those differences to one or more original files, producing patched versions.

what -pX parameter means? 
 -pnum or --strip=num Strip the smallest prefix containing num leading slashes from each file name found in the patch file. A sequence of one or more adjacent slashes is counted as a single slash. This controls how file names found in the patch file are treated, in case you keep your files in a different directory than the person who sent out the patch. For example, supposing the file name in the patch file was.
 what -i parameter means?
 -i patchfile or --input=patchfile Read the patch from patchfile. If patchfile is -, read from standard input, the default.
Google Analytics Alternative