Saturday, February 23, 2008

Slackware/Zenwalk: src2pkg tool

from: http://www.linux.com/feature/121499

Slackware's "magic package maker"



By Drew Ames
on
November 30, 2007 (9:00:00 AM)

Slackware
Linux today features a powerful and easy-to-use package management
system, but making Slackware packages has not always been
straightforward. Now Slackware application developers have a tool for
easily making Slackware packages from source code and precompiled
binaries. Src2pkg, now in version 1.6, very nearly lives up to its
author's tag of being Slackware's "magic package maker."



The traditional method for installing software in Linux is to download the source code, uncompress it, and then run ./configure && make && make install.
The result is compiled software that is installed in the (hopefully)
correct spots in the file system. The problem is that there is no easy
way to track which files end up at which locations. The result is that
it can be extremely difficult to remove or upgrade applications.



Package managers solve that problem. Slackware packages are simply
tar archives, compressed with gzip (with the .tgz extension), that
contain a file structure and the compiled files. Slackware's package
tools unpack the package files to the correct directories and maintain
a database tracking where the files are installed.



Many people seem to equate package management with dependency
checking. In fact, dependency checking is a secondary and, from a
Slackware perspective, a largely unnecessary part of package
management. A full Slackware installation includes a reasonably
complete set of libraries so that the dependancies for most software
are already included. However, when other libraries are required, the
application's Web page usually lists them so they can be downloaded,
compiled, and installed. In just over a year of using Slackware, I have
had to install fewer than 10 libraries for the applications I built.



Until recently the two best ways to make Slackware packages were to
use the program Checkinstall or use SlackBuild scripts. Both methods
compile source code, create a directory structure, and package
everything in a .tgz file. Checkisntall works by substituting the checkinstall command for the make install command. Checkinstall works well with Slackware 11 (released October 2006), but an incompatibility with the latest coreutils causes problems for Checkinstall with Slackware 12 (released July 2007).



SlackBuilds are bash shell scripts that guide the configuration,
compilation, and packaging of source code. Well-written SlackBuilds
work extremely well. Slackbuilds.org maintains a high-quality community repository of SlackBuild scripts for a wide varitey of software.



Src2pkg, a better alternative



Src2pkg, a command-line utility for which version 1.0 was released
in February, offers a superior alternative to Checkinstall, and is
useful a SlackBuild script is not readily available for an application
or a user is not experienced enough with shell scripting to make one.
Src2pkg's author, Gilbert Ashley, designed the program to not only
compile Slackware packages from source code, but also from Debian or
RPM package binary files, and from generic binary files, which are
described in the src2pkg manual as "binary content which is usually
installed by running an install.sh script, .run file, or other
installation routine." Finally, src2pkg will create build scripts so
that users can customize their package builds. Providing a number of
options for dealing with source code is necessary because of the wide
variety of ways that source code is distributed.



Version 1.6 of src2pkg was officially released on September 18. I downloaded its Slackware package from from the author's Web site
and installed it. I built and installed four packages to test the
various features of src2pkg, its documentation, and the level of
support offered by its author.



The easiest way to use src2pkg is to log in as root and simply type src2pkg filename,
but the man page list a number of switches to customize the build
process. User options use capital letters following a dash, and build
options use lowercase letters following a dash. I found the following
user options useful for my builds:



  • -C -- place finished package in the current directory
  • -N -- generate a starting src2pkg script and slack-desc description file without building the package
  • -S -- use a shell script for installation (install.sh by default)
  • -VV -- be verbose -- show all output from the build steps
  • -W -- remove (wipe out) temporary build files
  • -X -- run the first src2pkg or src2pkg.auto script in the current directory


In addition to the man page, src2pkg has documentation available in
the /usr/doc/src2pkg-1.6 directory. The additional documentation
consists of HTML-encoded descriptions of the various features and
functions of the application, two README files, and an FAQ text file.
The documentation is informative and helpful. The information is dense
but well-written and contains many helpful suggestions for building
packages.



Building Slackware packages



I built Emacs 22.1
as my first package. This latest version of Emacs was released a month
or so before the latest version of Slackware, but there is to date no
official Slackware package for it and no SlackBuild script available at
Slackbuilds.org. I took advantage of another feature of src2pkg and
used it to download the source file and then build the package with
this command:



src2pkg http://ftp.gnu.org/pub/gnu/emacs/emacs-22.1.tar.gz


Src2pkg successfully downloaded the source code archive, and
configured, made, and built the package. The configure process
automatically found the GTK libraries. When src2pkg finished, it
displayed a message with the location of the Slackware package. I
installed it, and Emacs 22.1 ran without a problem. In fact, all of the
packages I built with src2pkg installed successfully and ran well.



I experienced a problem when I attempted my next built of the desktop publishing program Scribus 1.3.3.9. My first attempt resulted in an error:



Creating working directories:
PKG_DIR=/tmp/scribus-1.3.3.9-pkg-1
SRC_DIR=/tmp/scribus-1.3.3.9-src-1
Unpacking source archive - Done
Decompressing (unknown) archive: Scribus.app.tgz FAILED!
Unable to unpack Scribus.app.tgz. Exiting...
src2pkg FAILURE in UNPACK_RENAME


A quick email message to Gilbert Ashley produced a response with the
solution. The error was the result of "a very rare snag with tarballs
that contain another (or more) tarballs inside them." The fix is to
open the file /usr/libexec/src2pkg/FUNCTIONS and uncomment line 778
from #OPEN_SOURCE=1 to OPEN_SOURCE=1. That line is in the file, but commented because the author is aware of the glitch.



After making that configuration change, the Scribus package built
correctly. The command I used to build Scribus used options to ensure
that I could see the output of the build process, that the finished
package was placed in the directory with the source code, and that the
temporary build files were deleted after the package was built:



src2pkg -VV -C -W scribus-1.3.3.9.tar.bz2


To test src2pgk's ability to convert RPM files and its creation of
build scripts, I downloaded a game called Orbit, file name
orbital-1.01-691.i586.rpm, from the OpenSUSE 10.2 repository. The command src2pkg orbital-1.01-691.i586.rpm -N built a src2pkg script called orbital.src2pkg.auto. The command src2pkg -VV -C -W -X built the package using the src2pkg script in that directory.



The build script generated by src2pkg is very simple, consisting of
44 lines. The following lines are where some users will want to add
configuration options:



# Any extra options go here
# EXTRA_CONFIGS=''
# STD_FLAGS='-O2 -march=i486 -mtune=i686'


Build scripts can help users save specific configuration options so
that they can be repeated each time the package is built. Additionally,
build scripts can be real time-savers when you're troubleshooting a
package build. Simply change a line or two in the script, build the
package again, and repeat the process until the package is just the way
you want it.



My final package build for this test was Opera 9.24.
Opera distributes the browser's source code as a generic binary that
uses an interactive shell script, install,sh, to configure and build
the application. Therefore, src2pkg requires the use of the -S switch.



To build the package, I used the command src2pkg -C -VV -W -S opera-9.24-20071015.6-shared-qt.i386-en.tar.gz. The interactive installation script successfully ran within the src2pgk process.



Tuesday, February 19, 2008

EVE Online Appoints In-World Economist

EVE Online Appoints In-World Economist

Reykjavik, Iceland – June 27, 2007 – CCP
Games, one of the world’s largest independent game developers, today
announced the appointment of a in-world lead economist for EVE Online.
This is the first time an MMOG has commissioned a dedicated real world
economist to operate at this level of economic monitoring and research
for a virtual world. The appointment is a real testament to the growing
intricacy and strength of EVE Online’s thriving virtual economy.

Dr.
Eyjólfur Guðmundsson brings over 15 years’ experience in economic
studies and research, and joins CCP directly from the University of
Akureyri, Iceland, where he among several teaching positions held the
position of the Dean of the Faculty of Business and Science. Prior to
that he was a research associate at the University of Rhode Island’s
Department of Environmental and Natural Resource Economics where he
also completed his PhD. He has authored or co-authored 15 publications.
Dr. Guðmundsson’s first blog on EVE Online economics is at
http://myeve.eve-online.com/devblog.asp?a=blog&bid=481.

Dr.
Guðmundsson will publish quarterly reports on the state of the EVE
Online economy as well as ongoing analysis of other economic
indicators, such as inflation, economic growth and price trends. His
research is designed to provide players with information necessary to
make strategic decisions, but is also expected to have an impact on
future development of the game. Dr. Guðmundsson will also be
responsible for coordinating research initiatives with academic
institutions.

"EVE Online may be set in the future, but the
skills needed to play are rooted in the real world of today. Players
operate vast corporations whose shares are traded in-game among players
so economic strength and agility is key to their success. Just as
entrepreneurs and executives rely on real-world economic indicators,
EVE Online players need timely information and analysis of the in-game
economy,” said Hilmar Pétursson, CEO of CCP Games. “That’s why we
created this important position and we’re delighted to have someone of
Eyjólfur’s caliber and expertise fill the role.”

“Virtual
worlds and MMOGs are emerging as one of the most interesting areas of
experimental economics. Since becoming involved with EVE Online, I have
been exploring the game and growing more fascinated with the community,
its complexities and the unlimited potential of it all. I can see that
CCP has understood that the social structures in EVE Online are far
beyond those of other games,” said Eyjólfur Guðmundsson. “Economic
information is the lifeblood of the game and I believe that, by
ensuring everyone has access to the same data, we will enhance the
player experience and facilitate economic stability in EVE.”

Monday, February 18, 2008

Zenwalk 5.0 just rocks!

Well...I decided to try Zenwalk 5.0 and it blew me awat. I stopped using Ubuntu after
noticing that Zenwalk was very slim and not fatty and it is very fast on my Dell Inspiron 600m.
I was able to run a couple of C programs that I have with no problems and also was able to
connect to my Airport Express very quick. The Iceweasel browser is working perfect and so far I
can tell that is a rock solid distro since it is a Slackware based distro. It is like a mini Slackware distro without all that fat that you see in other distros.

I am keeping this one!

-2501

Sunday, February 17, 2008

My thoughts about Carlos Castaneda's last battle on earth

I am a fan of Carlos Castaneda's book series, I can't deny it. A lot of my friends have
come to me asking me about his death and his departure to the unknown. Why did he not
vanish like Juan Matus?

For me, you can read his books as fiction or real stories but that does not matter to me. His stories,
as in religion, they don't really proof you if they are real or not...you need to have faith. But in
Castaneda's case, I think he showed to see the reality in the world that we live in and how to keep
your discipline in whatever you do 24 hrs a day and 365 days. Tha't what matters to me and at
this point in my life, I don't think about heavens or hell because there is no real proof about it.
I already accepted death as my advisor. Death is always walking next to us and someday he will
look at my straight to my eyes telling me that is time to go and I won't fight back.

Life is short and I play very hard everyday. Hopefully, I can negotiate some kind of deal with
Death in my last battle on earth.

Saturday, February 02, 2008

Interview: Beating Colossus

from: http://www.netbsd.org/gallery/schueth-interview.html


Joachim Schueth has beaten a reconstruction of the famous
Colossus Mark II
code breaking machine in November 2007. The Colossus computers were
used in World War II to break the German encrypted messages.
Equipped with a NetBSD-powered laptop and profound knowledge of
cryptography and the Ada programming language, Schueth has won the
code-cracking challenge. We talked with him about the historical and technical
backgrounds of the
Cipher Event  and the tools he has used.

Powered by ScribeFire.