Dear all,

I'm heavily working on oscar-packager trying to get most if not all packages to 
build on both rpm and debian distros.
Now oscar-packager is far more smart about packages creation and many more 
packages are now buyilding correctly under debian. (e.g. systemimager).
There is still a lot of work to fix build on both systems (moving main archive 
from src.rpm to tarball is sometimes difficult but far more easy to maintain 
afterward).

So, now here is what oscar-packager can build:

Once the source has been retrieved (from /etc/oscar/oscar-packager/*.cfg) into 
/tmp/oscar-packager/<packagename>

rpm side:
if a build.cfg lists a <package>.cfg, use this to retreive the sources of the 
package.
then
Then run build_rpm.sh (not sure of this)
copy all sources in the %_rpmsource directory
copy rpm/*spec in %_specdir
copy rpm/<packagename>/* to %_rpmsource directory
Then run the precommand from <packagename>.cfg if any
then build the package.

If no build.cfg, then trys to build the rpm using local spec files (in rpm/ 
dir). (usefull for virtual packages (no files) or package that retrieve their 
sources using wget).

then if all the above fails, tryes a "make rpm"

This fits most of the build cases

debian side:
if a build.cfg lists a <package>.cfg, use this to retreive the sources of the 
package.
then
Then run build_deb.sh (not sure of this)
copy all the sources in the /tmp/oscar-packager/<packagedir>
extract the 1st sourcefile
if no extractdir/debian directory, tryes to copy the svn debian dir if any

Then run the precommand from <packagename>.cfg if any
then build the package using dpkg-buildpackage

If no <package>.cfg exists
if /tmp/oscar-packager/<package>/debian exists tries a dpkgbuild from here.

If all above fails,

tries a "make deb".

Note that now, oscar-packager do not work anymore in $PKGDEST.
it works into $packagingdir (/tmp/oscar-packager/<packagename>/
- for rpm it runs the rpmbuild or the "make rpm" from here.
- for deb, it extracts the source here and run the dpkgbuild from the newly 
directory created
  or if no debian/ dir, then it tries make deb from here.

Thus, now, we should not find any garbage into the repositories (no more 
tarballs, src.rpm or such. (except for c3 package that moves itself the src.rpm 
there. Upstream is aware and hopefully will change this).

-------------------------------------------- Sumup 
---------------------------------
For a package to be buildable: (on both rpm and deb)
1/ have a build.cfg with requirements and names of packages to build 
(eventually common: section)

2/ have <package>.cfg per things to build containing the source url and 
evenutally a precommand.
Note that all packages that needs to be build on both rpm and deb must be in 
tarball format (any of .tar.gz, .tar.bz2 .tar.xz .tgz .tbz). if a source is 
.src.rpm, it'll fail on deb, so it's reserved for packages that are not needed 
on debian like blcr which is provided by distro. In such a case, the build.cfg 
contains a empty debian section (with a comment stating that noting is to be 
built).

3/ In some situation, we still use a Makefile. This makefile must have the 
following characteristics:
    - a rpm: and a deb: rule
    - both rules must accept the PKGDEST variable: resulting package must be 
moved to PKGDEST if PKGDEST is not null, otherwize, it must be left in place 
after build.

------------------------------------- new packages supported on debian 
------------------
- systemimager now builds on both pakacing system
- oscar-v
- oscar-installer
- system-update
- oscar-nat
- apitest
- jobmonarch-1.0 (still need work)
- ...

Regards,

--
   Olivier LAHAYE
   CEA DRT/LIST/DCSI/DIR
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Oscar-devel mailing list
Oscar-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to