This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
Cluster Project branch, STABLE2, updated. cluster-2.02.00-26-gb2be4d6
- From: fabbione at sourceware dot org
- To: cluster-cvs at sources dot redhat dot com, cluster-devel at redhat dot com
- Date: 21 Mar 2008 05:50:11 -0000
- Subject: Cluster Project branch, STABLE2, updated. cluster-2.02.00-26-gb2be4d6
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 <fabbione@fabbione.net>
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 <fabbione@fabbione.net>
-----------------------------------------------------------------------
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 (<IFILE>) {
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 (<OFFICIAL_VERSION>) {
+ 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