From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7860 invoked by alias); 21 Mar 2008 05:50:11 -0000 Received: (qmail 7831 invoked by uid 9702); 21 Mar 2008 05:50:11 -0000 Date: Fri, 21 Mar 2008 05:50:00 -0000 Message-ID: <20080321055011.7815.qmail@sourceware.org> From: fabbione@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, STABLE2, updated. cluster-2.02.00-26-gb2be4d6 X-Git-Refname: refs/heads/STABLE2 X-Git-Reftype: branch X-Git-Oldrev: 0e05f5554afe6b24a4cc28afcfc8d46fa7ca1814 X-Git-Newrev: b2be4d60359ff6fc01a2ccf9a98850063b8e1da3 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q1/txt/msg00360.txt.bz2 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project". http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=b2be4d60359ff6fc01a2ccf9a98850063b8e1da3 The branch, STABLE2 has been updated via b2be4d60359ff6fc01a2ccf9a98850063b8e1da3 (commit) from 0e05f5554afe6b24a4cc28afcfc8d46fa7ca1814 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b2be4d60359ff6fc01a2ccf9a98850063b8e1da3 Author: Fabio M. Di Nitto Date: Fri Mar 21 06:32:04 2008 +0100 [BUILD] Fix handling of version and libraries soname The overall handling of release_major/minor/micro was wrong and it was discovered only after the first STABLE2 release. This change obsoletes release_major/minor/micro and introduces 3 new configure options: release_version, somajor and sominor. And add options to make/official_release_version. somajor/sominor should only be numbers (no sanity check is performed) and they can either be specified when invoking configure (both must be present at the same time and they will override official_release_version) or in make/official_release_version as: SONAME "2.2" If not specified anywhere they will be generated as before. release_version can now be a random string that will be shown when asking for tool versions. When specified from the configure it will override the one specified in make/official_release_version as previously documented (ex: VERSION "2.02.01"). If not specified anywhere it will be generated by somajor.sominor. NOTE to developers: you will need to rerun configure to regenerate make/defines.mk. NOTE to packagers: sorry about this intrusive change but the problem was noticed too late. Removing --release_major/minor/micro from your configure invokation should be enough and usually those values should be set by upstream. While we provide an easy option to override values, please try to keep them consistent with upstream for easy tracking of bugs vs released versions. NOTE to release manager: make/official_release_version is not tracked in git and should now contains 2 keywords to work properly (order is not important). Signed-off-by: Fabio M. Di Nitto ----------------------------------------------------------------------- Summary of changes: cman/lib/Makefile | 14 +++++----- configure | 79 ++++++++++++++++++++++++++++++----------------------- dlm/lib/Makefile | 26 +++++++++--------- 3 files changed, 65 insertions(+), 54 deletions(-) diff --git a/cman/lib/Makefile b/cman/lib/Makefile index 7124b80..fbc4a28 100644 --- a/cman/lib/Makefile +++ b/cman/lib/Makefile @@ -14,16 +14,16 @@ TARGET= libcman LIBDIRT=$(TARGET).a \ - $(TARGET).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) + $(TARGET).so.$(SOMAJOR).$(SOMINOR) LIBSYMT=$(TARGET).so \ - $(TARGET).so.$(RELEASE_MAJOR) + $(TARGET).so.$(SOMAJOR) INCDIRT=$(TARGET).h include ../../make/defines.mk -SHAREDLIB=$(TARGET).so.${RELEASE_MAJOR}.${RELEASE_MINOR} +SHAREDLIB=$(TARGET).so.${SOMAJOR}.${SOMINOR} STATICLIB=$(TARGET).a all: $(STATICLIB) $(SHAREDLIB) @@ -41,9 +41,9 @@ $(TARGET).a: $(TARGET).o ${AR} r $@ $^ ${RANLIB} $@ -$(TARGET).so.${RELEASE_MAJOR}.${RELEASE_MINOR}: $(TARGET).o - $(CC) -shared -o $@ -Wl,-soname=$(TARGET).so.$(RELEASE_MAJOR) $< - ln -sf $(TARGET).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) $(TARGET).so - ln -sf $(TARGET).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) $(TARGET).so.$(RELEASE_MAJOR) +$(TARGET).so.${SOMAJOR}.${SOMINOR}: $(TARGET).o + $(CC) -shared -o $@ -Wl,-soname=$(TARGET).so.$(SOMAJOR) $< + ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so + ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so.$(SOMAJOR) clean: generalclean diff --git a/configure b/configure index 52beb94..44961b2 100755 --- a/configure +++ b/configure @@ -81,9 +81,9 @@ my %options = ( conffile => \$conffile, fence_agents => \$fence_agents, enable_xen => \$enable_xen, - release_major => \$release_major, - release_minor => \$release_minor, - release_micro => \$release_micro, + somajor => \$somajor, + sominor => \$sominor, + release_version => \$release_version, without_ccs => \$without_ccs, without_cman => \$without_cman, without_dlm => \$without_dlm, @@ -145,9 +145,9 @@ my $err = &GetOptions (\%options, 'sharedir=s', 'confdir=s', 'conffile=s', - 'release_major=s', - 'release_minor=s', - 'release_micro=s', + 'somajor=s', + 'sominor=s', + 'release_version=s', 'fence_agents=s', 'enable_xen', 'without_ccs', @@ -536,14 +536,14 @@ if (!$without_rgmanager) { if (!$disable_kernel_check) { $disable_kernel_check=0; } -if (defined($release_major) && not length $release_major) { - $release_major=""; +if (defined($somajor) && not length $somajor) { + $somajor=""; } -if (defined($release_minor) && not length $release_minor) { - $release_minor=""; +if (defined($sominor) && not length $sominor) { + $sominor=""; } -if (defined($release_micro) && not length $release_micro) { - $release_micro=""; +if (defined($release_version) && not length $release_version) { + $release_version=""; } @args = "find fence/agents -mindepth 2 -maxdepth 2 -name Makefile -printf '%h'"; @@ -634,39 +634,50 @@ while () { close IFILE; -if ((not defined($release_major)) || (not defined($release_minor)) || (not defined($release_micro))) { +if ((not defined($somajor)) || (not defined($sominor)) || (not defined($release_version))) { + + my $current_soname; + my $current_version; if ( -f 'make/official_release_version' ) { - my $current_version = 0; open OFFICIAL_VERSION, '<', "make/official_release_version"; while () { + if ($_ =~ /SONAME/) { + $current_soname = $_; + } if ($_ =~ /VERSION/) { $current_version = $_; - last; } } close OFFICIAL_VERSION; - $current_version =~ s/.*"(.*)"\n/$1/; - my @release_version = split /\./, $current_version; - $release_major = $release_version[0]; - $release_minor = $release_version[1]; - $release_micro = $release_version[2]; - } else { - $release_major = DEVEL; - $release_minor = `date +%s`; - chomp $release_minor; - $release_micro = 0; } -} -print OFILE "RELEASE_VERSION = $release_major.$release_minor.$release_micro\n"; -print OFILE "CFLAGS += -DRELEASE_VERSION=\\\"$release_major.$release_minor.$release_micro\\\"\n"; + if ((not defined($somajor)) || (not defined($sominor))) { + if (not defined($current_soname)) { + $somajor = DEVEL; + $sominor = `date +%s`; + chomp $sominor; + } else { + $current_soname =~ s/.*"(.*)"\n/$1/; + my @release_soname = split /\./, $current_soname; + $somajor = $release_soname[0]; + $sominor = $release_soname[1]; + } + } + + if (not defined($release_version)) { + if (not defined($current_version)) { + $release_version = "$somajor.$sominor"; + } else { + $release_version = $current_version; + $release_version =~ s/.*"(.*)"\n/$1/; + } + } +} -$release_major = abs $release_major; -$release_minor = abs $release_minor; -$release_micro = abs $release_micro; -print OFILE "RELEASE_MAJOR = $release_major\n"; -print OFILE "RELEASE_MINOR = $release_minor\n"; -print OFILE "RELEASE_MICRO = $release_micro\n"; +print OFILE "SOMAJOR = $somajor\n"; +print OFILE "SOMINOR = $sominor\n"; +print OFILE "RELEASE_VERSION = $release_version\n"; +print OFILE "CFLAGS += -DRELEASE_VERSION=\\\"$release_version\\\"\n"; close OFILE; diff --git a/dlm/lib/Makefile b/dlm/lib/Makefile index 85a78b2..b223df7 100644 --- a/dlm/lib/Makefile +++ b/dlm/lib/Makefile @@ -15,13 +15,13 @@ TARGET= libdlm LIBDIRT=$(TARGET).a \ $(TARGET)_lt.a \ - $(TARGET).so.${RELEASE_MAJOR}.${RELEASE_MINOR} \ - $(TARGET)_lt.so.${RELEASE_MAJOR}.${RELEASE_MINOR} + $(TARGET).so.${SOMAJOR}.${SOMINOR} \ + $(TARGET)_lt.so.${SOMAJOR}.${SOMINOR} LIBSYMT=$(TARGET).so \ $(TARGET)_lt.so \ - $(TARGET).so.$(RELEASE_MAJOR) \ - $(TARGET)_lt.so.$(RELEASE_MAJOR) + $(TARGET).so.$(SOMAJOR) \ + $(TARGET)_lt.so.$(SOMAJOR) INCDIRT=$(TARGET).h @@ -29,7 +29,7 @@ UDEVT=51-dlm.rules include ../../make/defines.mk -SHAREDLIB=$(TARGET).so.${RELEASE_MAJOR}.${RELEASE_MINOR} $(TARGET)_lt.so.${RELEASE_MAJOR}.${RELEASE_MINOR} +SHAREDLIB=$(TARGET).so.${SOMAJOR}.${SOMINOR} $(TARGET)_lt.so.${SOMAJOR}.${SOMINOR} STATICLIB=$(TARGET).a $(TARGET)_lt.a all: $(STATICLIB) $(SHAREDLIB) @@ -55,15 +55,15 @@ $(TARGET)_lt.a: $(TARGET)_lt.o ${AR} r $@ $^ ${RANLIB} $@ -$(TARGET).so.${RELEASE_MAJOR}.${RELEASE_MINOR}: $(TARGET).po $(AISTARGET).po - $(CC) $(PTHREAD_LDFLAGS) $(LDFLAGS) -shared -o $@ -Wl,-soname=$(TARGET).so.$(RELEASE_MAJOR) $< - ln -sf $(TARGET).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) $(TARGET).so - ln -sf $(TARGET).so.$(RELEASE_MAJOR).$(RELEASE_MINOR) $(TARGET).so.$(RELEASE_MAJOR) +$(TARGET).so.${SOMAJOR}.${SOMINOR}: $(TARGET).po $(AISTARGET).po + $(CC) $(PTHREAD_LDFLAGS) $(LDFLAGS) -shared -o $@ -Wl,-soname=$(TARGET).so.$(SOMAJOR) $< + ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so + ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so.$(SOMAJOR) -$(TARGET)_lt.so.${RELEASE_MAJOR}.${RELEASE_MINOR}: $(TARGET)_lt.po - $(CC) $(LDFLAGS) -shared -o $@ -Wl,-soname=$(TARGET)_lt.so.$(RELEASE_MAJOR) $< - ln -sf $(TARGET)_lt.so.$(RELEASE_MAJOR).$(RELEASE_MINOR) $(TARGET)_lt.so - ln -sf $(TARGET)_lt.so.$(RELEASE_MAJOR).$(RELEASE_MINOR) $(TARGET)_lt.so.$(RELEASE_MAJOR) +$(TARGET)_lt.so.${SOMAJOR}.${SOMINOR}: $(TARGET)_lt.po + $(CC) $(LDFLAGS) -shared -o $@ -Wl,-soname=$(TARGET)_lt.so.$(SOMAJOR) $< + ln -sf $(TARGET)_lt.so.$(SOMAJOR).$(SOMINOR) $(TARGET)_lt.so + ln -sf $(TARGET)_lt.so.$(SOMAJOR).$(SOMINOR) $(TARGET)_lt.so.$(SOMAJOR) %_lt.o: $(S)/%.c $(CC) $(CFLAGS) -c -o $@ $< hooks/post-receive -- Cluster Project