tsrpmv: making tsrpm easier
I use tsrpm a lot but find its output hard to interpret and it's invocation difficult to remember. Additionally I was always passing options to tsrpm like --verbose, so I wrote a wrapper script to automatically add that to any tsrpm command. I call the script tsrpmv, short for tsrpm verbose. It can be downloaded from http://www.timesys.com/blog_files/tsrpmv. Mark it executable and place it in /opt/timesys/bin.
tsrpmv is a wrapper for tsrpm that gives it many advantages, including:
- it remembers the architecture you last used, such as
armv5l, on both a per-package and system-wide basis, so you don't have to specify the architecture every time on the command line - it allows short forms of common commands, such as
-bforbuildor-tfor--target= - if you are in a directory with a single spec file and invoke it with the
-b(build) command, it will automatically append the spec file on the command line for you - it hides useless tsrpm output such as:
++ setopt KSH_ARRAYS ++ : ++ _x=ehxB ++ set +x ++ unset _x
while still giving the entire tsrpm output in a log file - it pretty-prints and color codes most
./configureoutput, so that you get* checking for function prototypes [ yes] * checking for stddef.h [ yes] * checking for stdlib.h [ yes]
- significant output is color-coded;
yesandokis in green,noandfailis in red, compiler and preprocessor warnings are in yellow, and errors are in red. - if a cross-compilation fails inside ./configure, it automatically tries to show the relevant part of the
config.logthat gives the error - if a cross-compilations fails inside ./configure due to a missing dependency, it automatically tries to cross-install that dependency and restart the cross-compilation, recursing for multiple levels of missing dependencies if needed
- it makes cross-installing easier by automatically finding the newest version of both standard and devel packages for the given architecture
- it shows a list of all packages that are cross-installed, formatted for quick importing into a python script
- it will save all compiled binary and source RPMs into a shared directory for use with other projects (for example, as dependencies to another package)
- it will extract all versions of a particular source package into target directories in preparation for cross-compiling
- it automatically times the output of tsrpm so that you can see how long compilation took
- it has variable levels of verbosity
In my next several blog entries I will explain how to use tsrpmv to make cross-compilation easier and more effective.
- joseph's blog
- Login or register to post comments





