RE: Creating RPMS from source without Makefile






Mazda Motor Logistics Europe NV, Blaasveldstraat 162, B-2830 Willebroek
VAT BE 406.024.281, RPR Mechelen, ING 310-0092504-52, IBAN : BE64 3100 0925 0452, SWIFT : BBRUBEBB

-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Karl Latiss
Sent: dinsdag 16 oktober 2007 5:21
To: General Red Hat Linux discussion list
Subject: Re: Creating RPMS from source without Makefile

On Mon, 2007-10-15 at 15:35 +0200, Mertens, Bram wrote:
Hi,

For several applications/tools I'd like to create an RPM to make
maintenance easier. However some of these come without a Makefile
(usually just untar in the correct directory). For others
I'd like to
add some additional (configuration) files and such.

According to the maximum rpm book it is recommended to keep
patches and
such separate from the original sources (pristine sources).
But so far
I've been unable to find an explanation on how exactly to
set this up.
I've download the httpd source rpm and noticed that it contains some
additional files in the SOURCES directory which have been added as
additional "SourceX" lines in the spec file. These are installed by
additional "install" commands in the spec file.

You may want to start with a package less complex than httpd
to see how
things work.

I wasn't trying to build httpd, I realise it is "quite" complex and
probably not a good example package. But it was the only package I
could think of straight away that would have a number of patches and
additional files (the RH logos).

Is this the recommended approach? Is there a way to group
these files
somehow? After installing the httpd source rpm the SOURCE dir was
filled with files with no way to determin which were related to the
httpd package wand which not.

You may also want to visit

http://docs.fedoraproject.org/drafts/rpm-guide-en/ch-creating-
rpms.html

for a simpler walkthrough.

This is one of the docs I started from. But all it says is:
"As covered in Chapter 2, a major tenet of the philosophy behind RPM is
to start with pristine-unmodified--sources. You may need to patch or
customize the sources for your environment, but you can always go back
to the original sources."
And a bit further:
"Start with pristine sources; then patch as needed. A patch is an
automated set of modifications to the source code. Use the diff command
to build a patch and the patch command to apply the patch (that is, to
modify the source code). Keep the original sources separate from any
patches you need to make the software work in your environment."

But I didn't find anything on "best practices" on HOW to organise these
patches. Whether or not to store them in an archive, a separate
directory or just next to the sources.

E.g. Say I want to build two different packages, neither of which
contains a Makefile. Where do I store the Makefile? I can't store them
both in the SOURCES directory as the names would conflict.
And if you build several packages storing the additional files for all
of these in the SOURCES directory will quickly create a mess.

Kind regards

Bram

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: netkit-telnet compile fail. `exit undeclared in main.cc ?
    ... and in what order to run the patches and what is done to compile, install, ... or remove the package. ... patch prior to actual compilation and this patch process fails ... or just the materials that come in the source rpm? ...
    (comp.os.linux.misc)
  • Re: Fedora Updates: whole packages vs patches
    ... single Solaris patch can patch more than one package. ... that diff file and original rpm to generate updated rpm. ...
    (Fedora)
  • Re: Make RPMs from .spec and package source tarball? how?
    ... and then make an RPM based on the ATRPMS spec for the package. ... Install the mythtv source package from atrpms. ... Make the changes you need to the sources and prepare a patch. ...
    (Fedora)
  • Re: Fedora Updates: whole packages vs patches
    ... is recreating the base if you remove the patch. ... > location of the original package, and restore the needed parts from there. ... Implementing a tool that could replace changed files inside binary RPM, ... either download a patch, or new RPM. ...
    (Fedora)
  • Re: Creating RPMS from source without Makefile
    ... Creating RPMS from source without Makefile ... For several applications/tools I'd like to create an RPM to make ... additional "install" commands in the spec file. ... httpd package wand which not. ...
    (RedHat)