Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#887 closed defect (fixed)

Remove pre-release suffix from library name (libgeos-3.7.0alpha.so -> libgeos-3.7.0.so)

Reported by: Bas Couwenberg Owned by: geos-devel@…
Priority: major Milestone: 3.7.0
Component: Default Version: main
Severity: Unassigned Keywords:
Cc:

Description

The autotools build includes the pre-release suffix in the library filename.

This has quite an impact on packaging, requiring a library package rename for every pre-release, and NEW processing of that new package which causes delays.

The attached patch strip the pre-release suffix from the library filename.

Attachments (1)

strip-pre-release-suffix.patch (1.1 KB ) - added by Bas Couwenberg 6 years ago.

Download all attachments as: .zip

Change History (11)

by Bas Couwenberg, 6 years ago

comment:1 by Bas Couwenberg, 6 years ago

Note that geos-config needs to be patched as well, see: #742

comment:2 by Sandro Santilli <strk@…>, 6 years ago

Resolution: fixed
Status: newclosed

In 5eca48f/git:

Strip pre-release suffix from library name

Patch by Bas Couwenberg
Closes #887

comment:3 by robe, 6 years ago

Resolution: fixed
Status: closedreopened

This doesn't work for me for something like

3.7.0alpha or 3.7.0beta1dev

Works for 3.7.0alpha1. I'm going to revise.

comment:4 by Regina Obe <lr@…>, 6 years ago

Resolution: fixed
Status: reopenedclosed

In 40314bb/git:

Revise remove pre-release suffix to handle lack of number, and presense of dev. Closes #887

comment:5 by Bas Couwenberg, 6 years ago

With ? instead of * it will break for for numbers higher than 9, that many pre-releases are unlikely, but not out of the question.

comment:6 by robe, 6 years ago

Might be my sed.

When I tried:

echo "3.7.0alpha" | sed -E 's/(alpha|beta|rc)[[0-9]]*(dev)?$//'

I got this:

3.7.0alpha

I thought * too meant 0 or more, but seems to not be respecting the 0

However this works:

$ echo "3.7.0alpha" | sed -E 's/(alpha|beta|rc)[0-9]*(dev)?$//'

Gives:

3.7.0

What's the purpose of the extra []? My sed version is: sed (GNU sed) 4.2.2

I'd be happy to change it to if that works for you

's/(alpha|beta|rc)[0-9]*(dev)?$//'

comment:7 by robe, 6 years ago

You know just 0-9? doesn't work for me either for

3.7.0alpha not sure why I thought it did.

comment:8 by Bas Couwenberg, 6 years ago

The single blockquotes are stripped by m4(1), hence the need for additional quotes.

You're probably on Windows where the GNU tools are not as modern.

Instead of matching the pre-release suffix, it may be more portable to match the version string and replace the entire string with only the matched numeric version.

Does the following in configure.ac work on your system?

VERSION_RELEASE=`echo "$VERSION" | sed -E 's/^([[0-9]+\.[0-9]+\.[0-9]+]).*?$/\1/'`

comment:9 by robe, 6 years ago

I think it was just the extra brackets I wasn't aware of because I was just testing on the console. The above works without the extra [] so I'll commit that.

I've got some other issues with configure on windows mingw64, which I have to check if it's something in GEOS or my configure script. For building GEOS on windows I'm using CMake and that just produces unversioned dlls all the time.

I'll go ahead and commit what you have above and just check the bots to see if they are okay with it.

comment:10 by Regina Obe <lr@…>, 6 years ago

In 028fcc1/git:

Revise again to strip anything following the version number.
Revised patch from Bas Couwenberg. References #887

Note: See TracTickets for help on using tickets.