Re: [opensuse] Simple source rpm as an example



On Mon, 6 Apr 2009, Philipp Thomas wrote:-

On Mon, 6 Apr 2009 12:06:08 -0400, you wrote:

Much easier to work with ./configure; make; make install

Sorry, but I disagree. This is only easier if you just accept all defaults
(wrong as they might be). Otherwise writing a spec file saves you work as
it automates the steps.

If you use the script "build" then you can get the same results as if
you used the build service, but also a lot faster. This makes fixing a
broken spec file a lot faster and easier. I have a few templates spec[0]
files ready to modify to suit whatever package type I'm building[1]
which I just fill in the required bits to make the package build.

My normal method of working is to use the build script to start by
creating a clean build environment[2], and tweak the spec file between
each build run. It means that I can rapidly add build dependencies that
the configure script sometimes misses.

Also, by starting with an empty %files section, I get around the problem
of not knowing what files are going to be installed as the build I get
told what files were installed but not packages. This I find makes it
much easier to know just what needs to be added.

As for what I use as the build system, I use a 64bit 11.0 system but
build using an 11.1 build environment. This gets me the package checks
that would be performed when building on the build service, again
letting me fix problems quickly. Once the test build is successful, I
redo the test builds for both the 32bit and 64bit versions of 10.3 to
11.1, each with it's one separate build-root[3]. Once a build is
successful on all those, I upload the spec file and source packages to
the build service where it builds them for the versions I don't have[4]
as well as those I do.



[0] They wouldn't be very easy for a novice to read, at least not at
first, since I have added quite a few macros to them to make it a lot
easier for me to build cross-distro packages.

[1] KDE3.5, Gnome, Perl, CLI. I don't have Python or KDE4 in my
templates, as yet, since I've not yet built any packages requiring them.

[2] It only starts "clean". While fixing the spec file, I don't
reinitialise the build environment. Once the package has built
successfully, then I rebuild with a completely fresh environment.

[3] I also have an old 10.3 PPC based system which I sometimes use to do
builds as well. This one has had lzma installed so it can create an 11.0
and 11.1 build system, but I don't use it too often as it's very slow to
build some packages.

[4] Fedora, Mandriva, SLED10, Factory. I've not yet tried building a
Debian/Ubuntu package but it is on my to-do list.

Regards,
David Bolt

--
Team Acorn: http://www.distributed.net/ OGR-NG @ ~100Mnodes RC5-72 @ ~1Mkeys/s
openSUSE 10.3 32b | openSUSE 11.0 32b | |
openSUSE 10.3 64b | openSUSE 11.0 64b | openSUSE 11.1 64b |
openSUSE 10.3 PPC | RISC OS 3.6 | RISC OS 3.11 | TOS 4.02
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • RV: How can I install a Agere NIC in my laptop?
    ... The solution for this request for info say to me fix a spec file or post ... Package already exists: %package debuginfo ... BuildRequires: kernel-source kernel-syms ... Kernelmodule for Agere ET131x network cards ...
    (Fedora)
  • Re: building devel packages
    ... Have you tried rpmbuild? ... If I was building the package, and the source was a .src.rpm or .spm, ... If the spec file has the required bits to build a devel package, ...
    (alt.os.linux.suse)
  • Re: Where do I get info on how a rpm (httpd) is build?
    ... >>You can always fetch the SRC.RPM package and inspect the spec file. ... >>instructions how the source code should builld and included additional ... While the .spec file is text in nature, it isn't a set of instructions as ...
    (Fedora)
  • Re: Program to produce spec files
    ... >> Go back and move the files into the right section of the spec file you ... Perhaps the package you're building does not support DESTDIR ... clobber any existing root-owned files when you try the install. ...
    (Fedora)
  • Re: DTS Environment Control
    ... In your Dev environment you have a source of Dev1 and a destination of Dev2. ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. ... >> In your 200 table wizard generated package you could simply use the object>> model to change the Data Source properties to an Aliased Server then save>> the package back out. ... >> challenge is when you promote your packages up; the connections have to be>> changed to reflect the new environment. ...
    (microsoft.public.sqlserver.dts)