#75 Ubuntu postinst fix

3.2.0
closed
None
5
2012-08-14
2009-01-01
mdlueck
No

I discovered an unexpected bug in the postinst script of the Ubuntu (for 7.04) package.

The script uses a macro for most link entries to fetch the version number. However the one link for ORexx 2.x compatibility was hard coded a certain version number, and in the ooRexx 3.2 package that is the incorrect version.

I checked in SVN:
http://oorexx.svn.sourceforge.net/viewvc/oorexx/build-utilities/trunk/platform/linux/debian/pkgDeb/debian/postinst?view=markup

and I see no macros, and the "old" version number is there. So I have no idea where the script came from that is in the ooRexx-3.2.0-1.ubuntu704.i386.deb package.

My system has 3.0.4 versions for most links, and 3.0.3 for the ORexx 2.x compatibility link.

Also I fixed the man symlinks in this patch.

Could I have some assistance with updating the ooRexx 3.2 package? I would like to update it to ooRexx-3.2.0-2.ubuntu704.i386.deb possibly.

Thank you!

Discussion

  • Mark Miesfeld

    Mark Miesfeld - 2009-01-01

    Michael,

    1.) The build-utilities stuff for creating a debian package is no longer maintained. You build the debian package using the regular main Makefile in the source tree. It is very similar to building a rpm package. The unix-like-build.txt file explains how to build a debian package.

    The build-utilities debian stuff will still work, but you need to manually edit the shell scripts. There are notes to that effect somewhere in the build-utilities doc.

    2.) I don't see a patch attached here. I fixed the problem with the hard-coded value in the IBM compatibility link. (In the tip of the tree. No changes to the 3.2.0 release source will be made.)

    Since I don't see a patch, I don't know what you mean by the "man symlinks." As I recall I spent quite some time getting those symlinks correct. (Again, these fixes are in main/trunk. Changes aren't made to the release source.)

    3.) "Could I have some assistance with updating the ooRexx 3.2 package? I would
    like to update it to ooRexx-3.2.0-2.ubuntu704.i386.deb possibly"

    We're not going to change the release package on SourceForge. At least I'm not. <grin>

    You can easily build your own ooRexx-3.2.0-2.ubuntu704.i386.deb package if you want. Just follow these steps.

    • Read the build-utilities doc on what debian packaging tools you need installed and be sure you have them installed on the system you are going to build on.

    • Read the unix-like-build.txt file in main/trunk to check on details about building a deb package.

    • Check out a clean version of the 3.2.0 release source code:

    svn co https://oorexx.svn.sourceforge.net/svnroot/oorexx/main/releases/3.2.0/trunk oorexx-3.2.0

    • Edit platform/unix/debian/postinst.in

    At the bottom of the file change:

    ln -sf /opt/ooRexx/man/man1/rexx.1 /usr/share/man/man1/rexx.1
    ln -sf /opt/ooRexx/man/man1/rexxc.1 /usr/share/man/man1/rexxc.1
    ln -sf /opt/ooRexx/man/man1/rxsubcom.1 /usr/share/man/man1/rxsubcom.1
    ln -sf /opt/ooRexx/man/man1/rxqueue.1 /usr/share/man/man1/rxqueue.1
    ln -sf /opt/ooRexx/man/man1/rxmigrate.1 /usr/share/man/man1/rxmigrate.1
    ln -sf /opt/ooRexx/include/rexx.h /usr/include/rexx.h
    ln -sf /opt/ooRexx/share/ooRexx/rexxtry.rex /usr/bin/rexxtry.rex

    # allow backwards compatibility to Object REXX 2.x
    ln -sf /opt/ooRexx/lib/ooRexx/librexxapi.so.3.0.3 /usr/lib/librexxapi.so.2
    fi

    To:

    ln -sf /opt/ooRexx/share/man/man1/rexx.1 /usr/share/man/man1/rexx.1
    ln -sf /opt/ooRexx/share/man/man1/rexxc.1 /usr/share/man/man1/rexxc.1
    ln -sf /opt/ooRexx/share/man/man1/rxsubcom.1 /usr/share/man/man1/rxsubcom.1
    ln -sf /opt/ooRexx/share/man/man1/rxqueue.1 /usr/share/man/man1/rxqueue.1
    ln -sf /opt/ooRexx/share/man/man1/rxdelipc.1 /usr/share/man/man1/rxdelipc.1
    ln -sf /opt/ooRexx/include/rexx.h /usr/include/rexx.h
    ln -sf /opt/ooRexx/share/ooRexx/rexxtry.rex /usr/bin/rexxtry.rex

    # allow backwards compatibility to Object REXX 2.x
    ln -sf /opt/ooRexx/lib/ooRexx/librexxapi.so.${orx_libversion} /usr/lib/librexxapi.so.2
    fi

    That will pick up both the man page fixes and the hard coded lib version fix.

    • Build the deb package:

    ./bootstrap
    ./configure --disable-static
    make
    make deb

    Let me know if you have any problems building your deb package.

    --
    Mark Miesfeld

     
  • mdlueck

    mdlueck - 2009-01-01

    I seem to have forgotten to attach the diff before.

    I no longer have an Ubuntu 7.04 machine. Is there somewhere an ooRexx Ubuntu 7.04 build system?

    What file would need to be edited to indicate a build "-2" version instead of "-1"?
    File Added: postinst.diff

     
  • mdlueck

    mdlueck - 2009-01-01

    Patch to the postinst script of the Ubuntu 7.04 package of ooRexx 3.2

     
  • Mark Miesfeld

    Mark Miesfeld - 2009-01-01

    Michael,

    I forgot to say thanks for bringing up the bug about the hard-code value in the postinst file to our attention. That is now fixed in the tip of the tree.

    Don't worry about not attaching the patch. It is probably good practice for you, but not relevant to us. We are not going to go back and change the 3.2.0 release code, or produce an updated 3.2.0 package.

    The deb build system is rather rigid. It will produce only one package name. What you do then is rename the the file to what you want. Take the .deb file produced and rename it to: ooRexx-3.2.0-2.ubuntu704.i386.deb if that is the name you want. That is all I did to produce the existing name for 3.2.0.

    You can also change the changelog.in file (before you build.) Take the top line:

    oorexx (@PACKAGE_VERSION@-@SVN_REV@) stable; urgency=medium

    and change it to:

    oorexx (@PACKAGE_VERSION@-2) stable; urgency=medium

    I think that may effect the way ooRexx is displayed in a package manager, but I don't think it does much.

    I don't have either a debian, Ubuntu, or Kubuntu system set up right now. I'm not too fond of those distributions. They impose too many restrictions on how I use my own personal hardware. ;-) I don't need some developer in Germany deciding whether I should be 'allowed' to be root or not.

    When we get the beta of 4.0.0 going I'll set up something to build a .deb package. Be sure and test the beta well. Once version 4.0.0 is released, we won't be going back and changing that source code either. <grin>

     
  • Mark Miesfeld

    Mark Miesfeld - 2009-01-01

    The issues noted here are fixed in the current source code base. Thanks again for finding that hard-coded value bug Michael.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks