Please also read insightful pages linked from “Notes on Debian” by Russ Allbery (long time Debian developer) which have best practices for advanced packaging topics.
The default locale of the build environment is C.
Some programs such as the read function of Python3 change their behavior depending on the locale.
Adding the following code to the debian/rules file ensures building the program under the C.UTF-8 locale.
LC_ALL := C.UTF-8 export LC_ALL
If upstream documents are encoded in old encoding schemes, converting them to UTF-8 is a good idea.
Use the iconv command in the libc-bin package to convert the encoding of plain text files.
$ iconv -f latin1 -t utf8 foo_in.txt > foo_out.txt
Use w3m(1) to convert from HTML files to UTF-8 plain text files. When you do this, make sure to execute it under UTF-8 locale.
$ LC_ALL=C.UTF-8 w3m -o display_charset=UTF-8 \ -cols 70 -dump -no-graph -T text/html \ < foo_in.html > foo_out.txt
Run these scripts in the override_dh_* target of the debian/rules file.
When you face build problems or core dumps of generated binary programs, you need to resolve them yourself. That’s debug.
This is too deep a topic to describe here. So, let me just list few pointers and hints for some typical debug tools.
Wikipedia: “core dump”
Update the “/etc/security/limits.conf” file to include the following:
* soft core unlimited
gdb - The GNU Debugger
strace - Trace system calls and signals
ltrace - Trace library calls
“perl -d:Trace script.pl” - Trace a Perl script
lsof - List open files by processes
Tip | |
---|---|
The script command records console outputs. |
Tip | |
---|---|
The screen and tmux commands used with the ssh command offer secure and robust remote connection terminals. |
Tip | |
---|---|
A Python- and Shell-like REPL (=READ + EVAL + PRINT + LOOP) environment for Perl is offered by the reply command from the libreply-perl (new) package and the re.pl command from the libdevel-repl-perl (old) package. |
Tip | |
---|---|
The rlwrap and rlfe commands add input line editing capability with history support to any interactive commands. E.g. “rlwrap dash -i'” . |