Re: [SLE] Creating rpm's for Suse



On Mon, 23 Oct 2006, Marius Roets <roets.marius@xxxxxxxxx> wrote:-

Hi everybody,
I have some question on creating RPM's for a Suse distribution.
1) Does Suse have a specific way of doing things?

They have a "build" script that will create a clean build environment
and build RPMs within that environment. There's also the build service.
Or you can just use rpmbuild. Since I haven't got an account to use the
build service, and I like to build packages as a normal user rather than
root, I use rpmbuild.

2) If yes, is there a howto somewhere?

Check out http://www.opensuse.org/ and also pay attention to the SUSE
package conventions.

3) How do I test it without having a second clean system?

Good question. So far I've not had a problem with building and testing
on the same system.

4) If I want to create rpm's for more than one Suse version, do I need
to build it on each one?

Yes. Each version of SUSE has different library versions and building
against one version isn't a guarantee that it will work on an earlier or
later version.

5) And if I want to make distro independent (well suppose it's not
completely possible) rpm? Any tips on doing that.

A noarch rpm? As in doesn't matter if it's PPC or Intel, 32bit or 64bit?
As long as the RPMs doesn't contain any binaries, just scripts or even
plain data files, it can be built as noarch.

If you're meaning distro-independent as in can install on SUSE, Fedora,
Mandriva, and other distributions, then yes you can as well.

If you write the spec file to handle the minor differences in
menu-handling[0], or file locations[1], you can make a source rpm that
will build on the different distributions.

Or, if you don't need a desktop menu entry, you can statically link the
binaries and then you don't rely on the shared libraries being present
on the target system.

That's something I'm fiddling about with right now. My
multi-distribution spec file looks to see which system it's running on,
and sets up some variables and default paths, depending on the
distribution.

An example of my multi-distribution spec file is here:

<URL:http://www.davjam.org/~davjam/linux/specfiles/template.spec>

I don't know what other packagers think about it, but I've been using it
as the basis for spec files for several packages I've built for 32bit
SUSE 9.0-9.3, 32bit and 64bit SUSE 10.0 and 10.1, 32bit openSUSE
10.2alpha5, and Fedora Core 5, and all the packages have built as they
should.

It's even kind enough to put the distribution and version as a part of
the rpm filename. E.g. the package kenny (translates to and from the
Southpark kenny-speak) has the following packages:

kenny-1.7-1.fc5.noarch.rpm
kenny-1.7-1.suse93.noarch.rpm
kenny-1.7-1.suse100.noarch.rpm
kenny-1.7-1.suse101.noarch.rpm
kenny-1.7-1.suse102.noarch.rpm

Finally, there's the opensuse-packaging@ mailing list where you can get
advice as well.


[0] SUSE and Fedora seem to use the same menu system as specified at
<URL:http://www.freedesktop.org/>. There's slight differences in _how_
you get the entries into the menu structure, but they're not
significant. Mandriva uses a menu system based on, but not quite the
same as that used by Debian.

[1] SUSE defaults to putting package documents into
/usr/share/doc/packages whereas Fedora puts them in /usr/share/doc.
Since I don't have a Mandriva system I'm not sure where they put things.

[2] Don't you just love standards. There's just so many you can choose
from :-)

Regards,
David Bolt

--
Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/
AMD1800 1GB WinXP/SUSE 9.3 | AMD2400 256MB SuSE 9.3 | A3010 4MB RISCOS 3.11
AMD2600(64) 512MB SUSE 10.0 | AMD2400 768MB SUSE 10.0 | A4000 4MB RISCOS 3.11
AMD2800(64) 512MB SUSE 10.1 | RPC600 129MB RISCOS 3.6 | Falcon 14MB TOS 4.02

--
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-faq@xxxxxxxx



Relevant Pages

  • [SLE] Re: A better SuSE Support DB?
    ... revenue from those who decided to use a different distribution ... Linux distributions (Debian, Mandrake, and SuSE) only SuSE is ... installing from the 'net, to throw some cash at the people behind ... individual packages that comprise SuSE Linux, ...
    (SuSE)
  • Re: [opensuse] Why Not Fix the Easy Bugs??
    ... provided as a SERVICE and is a form of distribution, ... far from everything in there is in any way officially maintained by SUSE. ... Any member of the openSUSE community can maintain packages in the build ... please file a bug, because that would be an extremely serious incident. ...
    (SuSE)
  • Re: [opensuse] pure-ftp
    ... Is it possible to obtain pure-ftp for SuSE 10.1? ... There is an rpm on the distribution dvd/cd. ... And you can use the packages from build ...
    (SuSE)
  • Re: The GNU Ada compiler
    ... >>> Do your packages for Suse replace the Gnat packages that Suse ... if the distribution ships a gnat package, ...
    (comp.lang.ada)
  • SUSE Security Announcement: gpg (SuSE-SA:2003:048)
    ... ElGamal signing keys can be attacked within seconds to reveal the ... the update packages that we provide prevent the use of ElGamal signing ... there are only update packages for SuSE Linux 8.2 ...
    (Bugtraq)