| FOSSLC is a non-profit organization that specializes in technology and know-how to record conferences with excellent quality. Click on the icons below to view great videos from communities we are actively involved with: | ||||||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
||
Freeseer - Packaging Beta-2 Deb
Hello Folks:
Last week and earlier this week, I have finalized a lot of the application's file system layout and aligned Freeseer with Debian and Ubuntu policies. This will allow us to have a seamless transition into their repositories early next year after we finish this semester's coding.
Unfortunately, a lot of the changes I have implemented cause significant changes to the structure of the application. What I am thinking of doing is a pull request from every one else's forks to integrate into my own fork which should help the merge into mainline.
Implemented Changes
I have changed the build system to a familiar build system that is standard in the build community -- distutils / setuptools. This allows anyone who downloads the source package to quickly and easily rebuild (regenerate the gui and build any C extensions), install or repackage Freeseer with familiar commands similar to GNU's Autotools chain using make.
I removed make from the build order as it was no longer required and moved its functionality into the setuptools script (setup.py). I will be adding some targets (like make install, make configure, etc) for setuptools to allow for in place GUI regeneration. Removing make also removes it from the build dependencies list -- although this is not a big deal as most common build packages include make anyways.
I reorganized the entire package layout of Freeseer and expanded the "namespace" operations where appropriate. This is to comply with the installation of Python applications using pycentral/pysupport. We now have the following layout when installed:
- freeseer
- freeseer/data
- freeseer/core
- freeseer/ui
- freeseer/ui/lib
- freeseer/ui/forms
The lib and forms directory are build support directories and do not need to be included in the final install. I think I'll remove these.
Anyways, the directory structure matches the package setup. Thus, the import statements are fully expanded from the base directory, ex: import freeseer.ui.gui, import freeseer.core.gstreamer, import freeseer.core.logger, etc. The reason for this change is that once the application is installed via pycentral/pysupport, the program needs to know its package information relative to pycentral/pysupport. This also means that Freeseer needs to be executed with `python -m freeseer.main` from the `src` directory -- I included a one liner script to do just that. These changes also enhance the clarity by being more explicit.
How to Build for Debian?
This is the really cool part! Setuptools/distutils doesn't natively support .deb files although it does support Redhat's rpm format. I included the basic information that is required for the .deb package in the /pkg directory along with an alpha script (which I will change to automate the entire process) that executes the commands required.
The normal procedure for creating a .deb is as follows:
- In the src directory, `./setup.py sdist`. This creates a source package that we can distribute online. When a user downloads this package, they can extract it somewhere then install the software with `./setupo.py install` OR they can run the program with `python -m freeseer.main`
- After building the source distribution package, it will appear in ../build relative to the src directory. From the src directory, we can execute the following: `../pkg/build-deb.sh`. This will do the following:
- Make a backup of the source tarball -> freeseer_<version>.orig.tar.gz
- Extract the source tarball within this directory
- Copy over the packing information from pkg/debian/ubuntu-10.04
- Execute `debuild -us -uc`. (This will be added and changed to include signing information)
- A .deb along with the information required for upload to a repository will be in the build directory now.
As you can see, the build process has been highly simplified and is extremely easy to do now.
Next?
I will be cleaning up the build process further and ensuring that lintian does not return any errors, enhance the build script and provide more robust error checking, testing the build process on other Linux systems to expand our support base and verify we have all the requirements to be placed into a repository hosted with Debian / Ubuntu.
I will also research information about running out own PPA to host our software such that we add repository information and we can install the software directly from a package manager.
- jbearden's blog
- Login to post comments







