ossim team mailing list archive
-
ossim team
-
Mailing list archive
-
Message #00000
Open Source Security Information Management "Building From Source" Mini-HOWTO
Hi everybody!
I will try to set up a public build server for testing. Before of
that I will tell you what I did to use the Launchpad autobuilder.
REMEMBER: Stuff like my Name or my PGP key should be changed. :-D
You should use a Debian like system and assure that all the tools I
mention are installed. It might be of use having installed the tool
"command-not-found-data" on your system. This is a default on Ubuntu
Desktop installations, but not on Ubuntu Server or Debian GNU/Linux.
Of course, it is always usefull having read the man pages and docs:
http://www.debian.org/doc/
Also, you should edit ~/.profile or ~/.bash_profile (or whatever you
use as login script for your shell) to include the following vars:
## environment variables
DEBEMAIL=pablo.hoertner@xxxxxxxxxxxx
DEBFULLNAME="Pablo Hoertner"
GIT_AUTHOR_NAME="Pablo Hoertner"
GIT_AUTHOR_EMAIL=pablo.hoertner@xxxxxxxxxxxx
GIT_COMMITTER_NAME="Pablo Hoertner"
GIT_COMMITTER_EMAIL=pablo.hoertner@xxxxxxxxxxxx
EMAIL=pablo.hoertner@xxxxxxxxxxxx
export DEBEMAIL DEBFULLNAME GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL EMAIL
Don't forget to source the script after editing, e.g. ". ~/.profile"
ATTENTION: If you want to build your package for Ubuntu 10.04.1 LTS
"Lucid Lynx" (or newer) or for Debian Squeeze you will first need to
build the libgda2 data abstraction library as OSSIM has not yet been
updated to work with version 3 or 4. For Ubuntu 9.10 "Karmic Koala"
and Linux Mint 8 "Helena" etc.) or Debian Lenny this is not needed.
redtux@nostrix ~ $ sudo aptitude install cdbs gnome-pkg-tools
redtux@nostrix ~ $ sudoedit /etc/apt/sources.list
## Sources for backporting
deb-src http://archive.ubuntu.com/ubuntu jaunty main universe
redtux@nostrix ~ $ sudo aptitude update
redtux@nostrix ~ $ mkdir -pv src/libgda2
mkdir: created directory `src/libgda2'
redtux@nostrix ~ $ cd src/libgda2/
redtux@nostrix ~/src/libgda2 $ apt-get source -t jaunty libgda2
redtux@nostrix ~/src/libgda2 $ cd libgda2-1.2.4/
redtux@nostrix ~/src/libgda2/libgda2-1.2.4 $ editor debian/changelog
libgda2 (1.2.4-1.4) maverick; urgency=low
* Built libgda2-dev for Ubuntu "Lucid Lynx" and newer
* Changed distroseries from "unstable" to "maverick"
* Ubuntu PPA package release: ppa:ossim/ppa (https://launchpad.net/~ossim)
* PGP-Signed <source.changes> and *.dsc with DSA key ID F6A719C2
* TODO: Check lintian errors and adopt to policy! ;)
-- Pablo Hoertner <pablo.hoertner@xxxxxxxxxxxx> Wed, 9 Feb 2011 16:22:56 +0100
redtux@nostrix ~/src/libgda2/libgda2-1.2.4 $ dpkg-parsechangelog
If you get something like the following your PGP key is missing. ;)
gpg: skipped "0xF6A719C2": secret key not available
redtux@nostrix ~/src/libgda2 $ cd ..
redtux@nostrix ~/src/libgda2 $ dput ppa:ossim/ppa libgda2_1.2.4-1.4_source.changes
Okay, we now have packages for lucid and for maverick in Launchpad.
I hope everything worked well. Let's build the OSSIM packages now.
First, you need to get the sources from the OSSIM .git repository:
redtux@nostrix ~ $ mkdir -pv src/ossim
mkdir: created directory `src/ossim'
redtux@nostrix ~ $ cd src/ossim/
redtux@nostrix ~/src/ossim $ git clone git://git.assembla.com/os-sim.2.git
Initialized empty Git repository in /home/redtux/src/ossim/os-sim.2/.git/
redtux@nostrix ~/src/ossim $ cd os-sim.2/os-sim/
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ dpkg-parsechangelog
You should now get an error telling you that the changelog is
malformed. So we fix it and make our first commit to .git. ;-)
We need to fix at least the last two entries on the top. The name
needs to start with only one blank followed by -- and the name.
Before the date you need to put two blanks (not just one) … :-)
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ editor debian/changelog
ossim (1:2.3.1-8) ossim; urgency=low
* Multiple fix
-- jdelacasa <jdelacasa@xxxxxxxxxxxxxx> Fri, 10 Aug 2010 13:22:00 +0100
ossim (1:2.3.1-7) ossim; urgency=low
* Merge all the changes from upstream 2.2b branch
-- Carlos Terron <cterron@xxxxxxxxxxxxxx> Fri, 30 Jul 2010 12:22:00 +0100
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: debian/changelog
#
no changes added to commit (use "git add" and/or "git commit -a")
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ git commit -a
[master 45abdaa] Fixed OSSIM Changelog to comply to the Debian format. Please read: http://www.debian.org/doc/debian-policy/ch-source.html#s-dpkgchangelog
1 files changed, 6 insertions(+), 7 deletions(-)
It seems like we have no rights to merge this fix, so we'll mail it.
redtux@nostrix ~/src/ossim/os-sim.2 $ git push origin master
fatal: The remote end hung up unexpectedly
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ cd ..
redtux@nostrix ~/src/ossim/os-sim.2 $ git format-patch origin
redtux@nostrix ~/src/ossim/os-sim.2 $ less 0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch
Move it outside the .git branch so cannot be seen by GIT.
redtux@nostrix ~/src/ossim/os-sim.2 $ mv -v 0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch ..
`0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch' -> `../0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch'
Finally, we make one last addition to the dependencies and write
everything to the OSSIM Changelog for the records. Then: Upload!
redtux@nostrix ~/src/ossim/os-sim.2 $ cd os-sim/
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ editor debian/control
Build-Depends: debhelper (>= 5.0.37.2), […], uuid-dev, libtool
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ git status
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ git commit -a
[master 7c6ea68] Added uuid-dev and libtool to OSSIM build-depends.
1 files changed, 1 insertions(+), 1 deletions(-)
redtux@nostrix ~/src/ossim/os-sim.2 $ git format-patch origin
0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch
0002-Added-uuid-dev-and-libtool-to-OSSIM-build-depends.patch
redtux@nostrix ~/src/ossim/os-sim.2 $ mv -v 000* ../
`0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch' -> `../0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch'
`0002-Added-uuid-dev-and-libtool-to-OSSIM-build-depends.patch' -> `../0002-Added-uuid-dev-and-libtool-to-OSSIM-build-depends.patch'
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ editor debian/changelog
ossim (1:2.3.1-9) maverick; urgency=low
* OSSIM package release for Ubuntu "Lucid Lynx" 10.04.1 LTS and newer
* debian/control:
+ Added uuid-dev to ensure correct build (uuid/uuid.h needed)
+ Added libtool for Ubuntu autobuilder
* Built libgda2-dev for Ubuntu "Lucid Lynx" and "Maverick Meerkat"
* Changed distroseries from "ossim" to "maverick"
* Ubuntu PPA package release: ppa:ossim/ppa (https://launchpad.net/~ossim)
* PGP-Signed <source.changes> and *.dsc with DSA key ID F6A719C2
* TODO: Check lintian errors and adopt to policy! ;)
-- Pablo Hoertner <pablo.hoertner@xxxxxxxxxxxx> Tue, 8 Feb 2011 20:23:31 +0100
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ git status
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ git commit -a
[master 8b2fd3f] Added 2.3.1-9 changes (resp. Ubuntu transition) to OSSIM Changelog.
1 files changed, 14 insertions(+), 0 deletions(-)
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ cd ..
redtux@nostrix ~/src/ossim/os-sim.2 $ git format-patch origin
0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch
0002-Added-uuid-dev-and-libtool-to-OSSIM-build-depends.patch
0003-Added-2.3.1-9-changes-resp.-Ubuntu-transition-to-OSS.patch
redtux@nostrix ~/src/ossim/os-sim.2 $ mv -v 000* ../
`0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch' -> `../0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch'
`0002-Added-uuid-dev-and-libtool-to-OSSIM-build-depends.patch' -> `../0002-Added-uuid-dev-and-libtool-to-OSSIM-build-depends.patch'
`0003-Added-2.3.1-9-changes-resp.-Ubuntu-transition-to-OSS.patch' -> `../0003-Added-2.3.1-9-changes-resp.-Ubuntu-transition-to-OSS.patch'
redtux@nostrix ~/src/ossim/os-sim.2 $ cd os-sim/
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ debuild -k0xF6A719C2 -S -sa --lintian-opts -i
NOTE: Probably you will need to install 'dpatch' first.
redtux@nostrix ~/src/ossim/os-sim.2/os-sim $ cd ..
redtux@nostrix ~/src/ossim/os-sim.2 $ dput ppa:ossim/ppa ossim_2.3.1-9_source.changes
redtux@nostrix ~/src/ossim/os-sim.2 $ git status
redtux@nostrix ~/src/ossim/os-sim.2 $ git commit -a
[master 648acea] Added Ubuntu source files for OSSIM 2.3.1-9 to the GIT repository.
1 files changed, 0 insertions(+), 178 deletions(-)
delete mode 100644 os-sim/agent/etc/agent/config.cfg.orig
redtux@nostrix ~/src/ossim/os-sim.2 $ git format-patch origin
0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch
0002-Added-uuid-dev-and-libtool-to-OSSIM-build-depends.patch
0003-Added-2.3.1-9-changes-resp.-Ubuntu-transition-to-OSS.patch
0004-Added-Ubuntu-source-files-for-OSSIM-2.3.1-9-to-the-G.patch
redtux@nostrix ~/src/ossim/os-sim.2 $ mv -v 000* ../
`0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch' -> `../0001-Fixed-OSSIM-Changelog-to-comply-to-the-Debian-format.patch'
`0002-Added-uuid-dev-and-libtool-to-OSSIM-build-depends.patch' -> `../0002-Added-uuid-dev-and-libtool-to-OSSIM-build-depends.patch'
`0003-Added-2.3.1-9-changes-resp.-Ubuntu-transition-to-OSS.patch' -> `../0003-Added-2.3.1-9-changes-resp.-Ubuntu-transition-to-OSS.patch'
`0004-Added-Ubuntu-source-files-for-OSSIM-2.3.1-9-to-the-G.patch' -> `../0004-Added-Ubuntu-source-files-for-OSSIM-2.3.1-9-to-the-G.patch'
Last not least we are going to create backports of the remaining
.deb's and upload them to our PPA for public testing. Enjoy! :-)
redtux@nostrix ~/src/ossim/os-sim.2 $ cd ..
redtux@nostrix ~/src/ossim $ sudoedit /etc/apt/sources.list
deb-src http://www.ossim.net/download/ lenny.old/
redtux@nostrix ~/src/ossim $ sudo aptitude update
The rest should be like at the very beginning. Maybe you get an
error as the directory has been moved from lenny/ to lenny.old/.
If so, try downloading and extracting everything by hand. DONE!
Good luck and best regards
Pablo
--
Pablo Hoertner <pablo@xxxxxxxxxx>
About /me: http://about.me/redtux
Attachment:
signature.asc
Description: Digital signature