Timberline Employee Blog

From our living-room to yours

Entries Comments



qmail is now Public Domain

30 November, 2007 (12:38) | Computer Security, Technology | By: admin

qmail in some circles has had a bad rap because of its overly restrictive licensing policies and possibly its punctuation problem. Overly restrictive? Yes, it could only be distributed in source form. In order to use it you must compile it yourself. You could not distribute it compiled form and you couldn’t distribute patched sources for qmail.

Daniel J. Berstein recently made a public announcement that qmail, and the rest of what he has written and proviced to the public, is now placed in the Public Domain.

Watching the video I get the feeling that it is a reactive protest to other freely distributive licenses such as BSD and the GPL varriants. Whatever the reason, this means that all Linux projects like CentOS and Fedora can now distribute qmail without any licensing problems.

Now projects like QmailToaster and Dag Wieer’s RPM repository can now distribute compiled rpms instead of src.rpms.

Compiling Zabbix SVN for CentOS 5.0

28 June, 2007 (09:54) | Computer Security | By: Ben

Zabbix is a complex monitoring tool that allows an administrator to easily view the state of the network. Easily view, that is, once it is set up completely.

At the time of this writing Zabbix has no RPMs to download for CentOS. I made mine with two scripts. It could have been one script if I wanted. getsvn and make_zabbix are the two scripts. Place both in the same empty directory and run getsvn. Update your release number so rpm -Uvh works. You can get some of the files needed by make_zabbix from a src.rpm on a similar platform. Fedora has a 1.4 src at a mirror. Use midnight commander open the src.rpm, navigate to CONTENTS.cpio and extract zabbix.spec, zabbix-agent.init, zabbix-logrotate.in, zabbix-server.init, and zabbix-web.conf. 

Now copy zabbix.spec to zabbixsrcrpm.spec and edit zabbix.spec. Before the make line add these lines:

make dist
# copy tar.gz file for src.rpm
cp %{name}-%{version}.tar.gz ../../SOURCES
# move in src.rpm .spec
mv ../../SPECS/%{name}srcrpm.spec ../../SPECS/%{name}.spec
cd ..
tar xvfz %{name}-%{version}/%{name}-%{version}.tar.gz
cd %{name}-%{version}

What this does is create a few more missing files like include/dbsync.h and creates a tar.gz file. This tar.gz file is what will be used for the src.rpm. It is also extracted in the same build directory and the spec file for the src.rpm is moved in place at this point too.  When your src.rpm is completed you can also run rpmbuild –rebuild zabbix*src.rpm and it should compile correctly.

File: getsvn

#!/bin/tcsh -f

set NAME=zabbix
set VER=1.4.1
set TARGZ=$NAME-$VER.tar.gz
set old_dir = `pwd`

# increment rpm numbers so rpm -Uvh works
nano zabbix.spec
nano zabbixsrcrpm.spec

svn co svn://svn.zabbix.com/branches/$VER
mv $VER “$NAME-$VER”

cd “$NAME-$VER”

aclocal -I m4
autoconf
autoheader
automake -a
automake

cd old_dir
tar cvfz “$TARGZ” “$NAME-$VER”
rm -rf “$NAME-$VER”
./make_zabbix

File: make_zabbix
#!/bin/tcsh -f

set TARGZ=zabbix-1.4.1.tar.gz
set RSPEC=zabbix.spec
set RSPEC2=zabbixsrcrpm.spec
set F1=zabbix-agent.init
set F2=zabbix-logrotate.in
set F3=zabbix-server.init
set F4=zabbix-web.conf

cp “$TARGZ” /usr/src/redhat/SOURCES
cp “$F1″ /usr/src/redhat/SOURCES
cp “$F2″ /usr/src/redhat/SOURCES
cp “$F3″ /usr/src/redhat/SOURCES
cp “$F4″ /usr/src/redhat/SOURCES
cp “$RSPEC” /usr/src/redhat/SPECS
cp “$RSPEC2″ /usr/src/redhat/SPECS

set old_dir = `pwd`
cd /usr/src/redhat/SPECS
rpmbuild -ba –clean –rmsource `basename $RSPEC`

mv /usr/src/redhat/RPMS/i386/zabb* /usr/src/redhat/SRPMS/zabb* $old_dir
rm /usr/src/redhat/SPECS/`basename $RSPEC`