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

A simple start...



Hi,

I'm glad to see this project is rolling along.  I thought the LSB was
a good thing too, but it was too secretive - I could never figure out
if there was a hidden agenda there on not.

I think a rather simple thing to do would be to figure out a scheme
where RPMs could also be built from Debian source packages, in
addition to .debs.

We could put together something like a "debhelper-rpm" package.  The
debian/rules files for packages that supported building RPMs could
support three additional targets:

  debian/rules binary-all-rpm     (for building all the RPM binary packages)
  debian/rules binary-arch-rpm    (for building only the 
                                   architecture-dependent RPMs)
  debian/rules binary-indep-rpm   (for building only the
                                   architecture-independent RPMs)

(Note that I've omitted building SRPMs for now, just to keep things simple)

The debian/rules fragment could look something like this:

-- being here - start --

i=$(shell pwd)/debian/tmp
b=$(shell pwd)/debian/build

# Note: build, clean targets are shared with normal Debian build

binary-indep: build install

binary-arch: build install \
                libgnome0-rpm \
                libgnome-dev-rpm \
                libgtktty0-rpm \
                libgtktty-dev-rpm \
                libzvt0-rpm \
                libzvt-dev-rpm \
                libgtkxmhtml0-rpm \
                libgtkxmhtml-dev-rpm \
                gnome-hello-rpm

#
# libgnome0-rpm
#

libgnome0-rpm: install
        @echo "--- Building RPM: $@"
        dhrpm_installdocs       -p$@ -P$(brpm)/$@ README NEWS AUTHORS
        dhrpm_installchangelogs -p$@ -P$(brpm)/$@ ChangeLog
        dhrpm_movefiles         -p$@ -P$(brpm)/$@
        mkdir -p $(brpm)/$@/usr/share/gnome
        mv $(brpm)/$@/usr/share/gtkrc $(brpm)/$@/usr/share/gnome
        dhrpm_strip             -p$@ -P$(brpm)/$@ 
        dhrpm_compress          -p$@ -P$(brpm)/$@ 
        dhrpm_fixperms          -p$@ -P$(brpm)/$@ 
        dhrpm_undocumented      -p$@ -P$(brpm)/$@ \
                                dns-helper.1 gnome_segv.1
        dhrpm_shlibdeps		-p$@ -P$(brpm)/$@
        dhrpm_genspec           -p$@ -P$(brpm)/$@
        dhrpm_buildrpm          -p$@ -P$(brpm)/$@

-- end cut --

Frankly, I don't think this would be too hard to write.  It probably
would only take a day or two to write a "debhelper-rpm" that could be
used for doing dual RPM-DEB builds of packages that alien is already
pretty good at converting.

The tricky part will be writing the "dhrpm_genspec" script, which will
look at the binaries that have been installed into (as in my example)
debian/build/libgnome0, and generate a spec file in that directory
that the normal RPM build process can use (just installing binaries
though, not building the source).  Some of this code may already be
written, sitting inside alien.

I am not suggesting that we should be replacing the RPM building
mechanism.  Let's get that straight before anybody flames me!

But if we built some test packages using this mechanism - it would
quickly expose areas where Red Hat and Debian policy differs (sonames,
the ways packages are split, etc.).  Then we can work on unifying
those policies - or agree to disagree on some policies, and look for
technological fixes.

Cheers,

 - Jim



Reply to: