tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[GSoC] Add support for FreeBSD package format, RPM and Debian packages(if time allows) to pkgsrc


I'm student from Sofia University "St. Kliment Ohridski", Bulgaria.

Here is my application to GSoC:

Short description: Adding ability to build packages in format other than the pkgsrc-native, focusing on FreeBSD ports, .rpm and .dpkg, install and de-install them using their corresponding native package tools. This will increase utility value of pkgsrc.

Anton Petrov Panev,

Dianabad, bl.12, vh. 3, ap.50,

1172 Sofia,


IRC nickname: todesumnz


Mobile: +359885198573

Time zone UTC+3


I plan to add support for FreeBSD and RPM packages. If the time allows, I will add support for Debian packages. The minimal target is to support FreeBSD packages.

Work plan per package set (FreeBSD, Red Hat, Debian):

1. Research - 20-60 hours (20 hours per package format). This period includes reading pkgsrc, FreeBSD ports(.rpm, .dpkg) documentation and getting familiar with existing tools.

2. Implementation - Coding and some testing.

I'll try to use the already existing abstractions and framework as documented in "pkgsrc/mk/flavor/README" and "original commit message".

For FreeBSD packages, I'll probably only need to redefine some variables, map some flags, etc..

For RedHat packages I'll have to generate "spec" file and use rpm tool to create a RPM file. The "spec" file in use simple line format and is divided in several sections. First section containing general information (similar to +BUILD_INFO file in pkgsrc package) formatted in tag:value format. The other sections start with %<tag/flag> line, where <tag/flag> notes the time to execute the following script (pre/post-install and pre/post-deinstall scripts). Adding support for RedHad packages may require dependency to rpm tool, therefore I may add checks, if the required package is installed.

For Debian packages I should generate "control" file (similar to +BUILD_INFO file in pkgsrc package). Generate pre/post-install and pre/post-deinstall scripts, if necessary.

Generate file with md5 check sums of all files in the package. Adding support for Debian packages may require dependency to dpkg tool, therefore I may add checks, if the required package is installed.

3. Testing - (20 hours) Build 100 packages, install and de-install them using the corresponding native tool.

During development, I'll start with packages without or with few dependencies and gradually migrate to packages with a lot of dependencies or requiring special permissions. I plan to write a script to run the tests and write in log file.

4. Documentation - writing documentation.

I should finish work on FreeBSD package format and start working on RPM format around 01/07.




Sofia University "St. Kliment Ohridski", studying for master degree in Computer Science.

2006 - 2010:

Technical University of Sofia - bachelor degree in Computer Science.

2009 - HP-UX Administration course

I have two years experience working with Linux, using GNU 'make' on everyday basis.

Here is the first comment I received:

Jörg Sonnenberger April 2, 2011, 8:04 p.m.

The biggest issue gensolpkg faced in the past and still faces is the mapping of pkgsrc dependencies (Dewey) to the native mechanism. I expect the same to apply more or less to all other systems. I would like to see an example of how to deal with this first (preferable on as it is quite central to both the usefulness of this project and the difficulty of implementation. One might say it is actually the hardest issue of the whole project.

To handle dependencies I plan to build all pre-required packages along with the package in question.

For FreeBSD packages pkg_add tool will try to fetch and install all dependencies. PACKAGESITE variable can be used to point to a location, where needed packages can be found.

perl>=5.12.0 perl<5.14.0 (pkgsrc dependency)

perl.5.1[2-3].0 (FreeBSD dependency)

rpm tool will return error, if pre-required package is missing.

requires: perl >= 5.12.0, perl < 5.14.0 (RPM 'spec' file)

Same goes for dpkg tool. It is the user responsibility to install the pre-required packages.

Depends: perl (>= 5.12.0), perl (<< 5.14.0) (debian 'control' file)
Best Regards,
Anton Panev.

Home | Main Index | Thread Index | Old Index