It is easier to install on rpm based systems with a spec file.

Bug #224496 reported by Todd Denniston
4
Affects Status Importance Assigned to Milestone
libmodbus
Fix Released
Wishlist
Stéphane Raimbault

Bug Description

With a spec file, rpm based system users,
can place the release tarball (and any patches) in rpmbuild/SOURCES and
untar the spec file into rpmbuild/SPECS, and then build rpms for installation and distribution using the following commands:
cd rpmbuild/
#make installable rpms.
rpmbuild -bb SPECS/libmodbus.spec
#make source rpms (which will include the patches)
rpmbuild -bs SPECS/libmodbus.spec
rpm -Uvh RPMS/i386/libmodbus-*

attached is the libmodbus.spec for 1.9.0
extern_for_cpp_1.9.0.patch is at:
https://bugs.launchpad.net/libmodbus/+bug/224485
http://launchpadlibrarian.net/14028982/extern_for_cpp_1.9.0.patch

Related branches

Revision history for this message
Todd Denniston (todd-denniston) wrote :
Revision history for this message
Todd Denniston (todd-denniston) wrote :

attached is the libmodbus.spec for 1.2.4
extern_for_cpp_1.2.4.patch is at:
https://bugs.launchpad.net/libmodbus/+bug/224485
http://launchpadlibrarian.net/14028961/extern_for_cpp_1.2.4.patch

patch-error-treat-todd_on_1.2.4.patch
will be attached in a moment, it is a variation on
http://launchpadlibrarian.net/13100082/patch-error-treat-todd.patch
from
https://bugs.launchpad.net/libmodbus/+bug/211460

Revision history for this message
Todd Denniston (todd-denniston) wrote :
Revision history for this message
Todd Denniston (todd-denniston) wrote :

New libmodbus.spec for 1.9.0

- get the license corrected in the spec file.
- add a URL for where to find libmodbus.
- Tweak the summary and description.

Revision history for this message
Stéphane Raimbault (sra) wrote :

I don't want to update the file to each beta until the 2.0 release so
I already use the 2.0 name in the spec file.

I don't want to apply this patch to the 1.2 series only to the trunk one.

Changed in libmodbus:
assignee: nobody → sra
importance: Undecided → Wishlist
milestone: none → 2.0
status: New → Fix Committed
Revision history for this message
Todd Denniston (todd-denniston) wrote :

Stéphane Raimbault wrote, On 05/01/2008 07:10 PM:
> I don't want to update the file to each beta until the 2.0 release so
> I already use the 2.0 name in the spec file.
>
Thats OK.
I was really commenting on future major version changes, I have worked with a couple of other libraries (Xforms and lesstif) and noted that they found it easier to deal with trouble reports when the "real" binary (not the softlinks to it) was versioned with the real release number, but they had some problems getting libtool to behave[1].
So again, this is something to mainly keep in the back of your mind for V2 -> V3 transition.

[1] with lesstif they had a very difficult time, the softlink was required to be libXm.so.1.2 (the version of motif it was being compatible with) but the version of lesstif was 0.94.4.

> I don't want to apply this patch to the 1.2 series only to the trunk
> one.

I assume that you mean:
You intend to apply the 1.9.0 version in the trunk.
But you do not intend to apply the 1.2.4 version.

Seems like a sound decision, considering you do not intend to cut a 1.2.5 revision.

Note that since you committed the patch for c++ (Bug #224485), you can remove references to it from the .spec file when you apply it to the trunk. :)

Revision history for this message
Todd Denniston (todd-denniston) wrote :

the 2.0 announcement:
https://launchpad.net/libmodbus/+announcement/430
indicates this bug was fixed in the 2.0 release, but...

I am not finding the spec file in the http://launchpad.net/libmodbus/trunk/2.0.0/+download/libmodbus-2.0.0.tar.gz
(Sorry, I just noticed the release.)

Here is an updated spec file.

I assume that in 2.0.1, on a redhat product, I will be able to do something _like_:
cd %_topdir/
cp mystore/libmodbus-2.0.1.tar.gz SOURCES/
tar -xzvf SOURCES/libmodbus-2.0.1.tar.gz libmodbus-2.0.1/packagecontrol/libmodbus.spec
mv libmodbus-2.0.1/packagecontrol/libmodbus.spec SPECS/
rpmbuild -bs SPECS/libmodbus.spec
rpmbuild -bb SPECS/libmodbus.spec

to get all the rpms I will need for an RH based system.
The above Assumes you will modify the Version: line in the spec to:
Version: 2.0.1
before or while packaging the tar.gz.

Revision history for this message
Stéphane Raimbault (sra) wrote :

I added libmodbus.spec to the tarball:

=== modified file 'Makefile.am'
--- Makefile.am 2008-05-18 12:58:15 +0000
+++ Makefile.am 2008-06-03 11:37:56 +0000
@@ -1,4 +1,4 @@
-EXTRA_DIST = MIGRATION
+EXTRA_DIST = MIGRATION libmodbus.spec
 SUBDIRS = modbus tests

 pkgconfigdir = $(libdir)/pkgconfig

Why you don't browse the source code with this URL (or better use bzr)?
http://bazaar.launchpad.net/~sra/libmodbus/trunk/files
so you can use the spec file in the source repo to apply some changes.

I already made the change about LGPL v3 in the 2.0.0 release.

Changed in libmodbus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.