From 4a087b2d68c7937369b1a25e4f62e8115ca555b4 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 13 May 2013 07:58:52 -0400 Subject: [PATCH 1/4] Add patch to properly report soname version information This patch will be included upstream in 0.10.6 and can be dropped then. - Remove Bundles(ev) as this has not been true since 0.9.5 --- 0001-build-set-soname-in-shared-library.patch | 67 +++++++++++++++++++ libuv.spec | 15 +++-- 2 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 0001-build-set-soname-in-shared-library.patch diff --git a/0001-build-set-soname-in-shared-library.patch b/0001-build-set-soname-in-shared-library.patch new file mode 100644 index 0000000..a5359c8 --- /dev/null +++ b/0001-build-set-soname-in-shared-library.patch @@ -0,0 +1,67 @@ +From fa17cdcdc8f737fbcf986f96d657ca37e07fb1be Mon Sep 17 00:00:00 2001 +From: Ben Noordhuis +Date: Sun, 12 May 2013 14:48:58 +0200 +Subject: [PATCH] build: set soname in shared library + +--- + config-unix.mk | 5 +++++ + src/version.c | 4 +++- + uv.gyp | 9 ++++++++- + 3 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/config-unix.mk b/config-unix.mk +index ae510a332d127e03bd03f6f424e7b2e0c9973053..ea4a0ad4f715ad0ccd834228724b97aa3feed3ae 100644 +--- a/config-unix.mk ++++ b/config-unix.mk +@@ -153,6 +153,11 @@ CPPFLAGS += -Isrc/unix + CFLAGS += -DHAVE_DTRACE + endif + ++ifneq (darwin,$(PLATFORM)) ++# Must correspond with UV_VERSION_MAJOR and UV_VERSION_MINOR in src/version.c ++LDFLAGS += -Wl,-soname,libuv.so.0.10 ++endif ++ + libuv.a: $(OBJS) + $(AR) rcs $@ $^ + +diff --git a/src/version.c b/src/version.c +index 3291d47eebb10532638c58b2e5ffa348064f7564..9e9bf003e4ced453e28dfeb383b6474eb69271ff 100644 +--- a/src/version.c ++++ b/src/version.c +@@ -24,7 +24,9 @@ + /* + * Versions with an even minor version (e.g. 0.6.1 or 1.0.4) are API and ABI + * stable. When the minor version is odd, the API can change between patch +- * releases. ++ * releases. Make sure you update the -soname directives in config-unix.mk ++ * and uv.gyp whenever you bump UV_VERSION_MAJOR or UV_VERSION_MINOR (but ++ * not UV_VERSION_PATCH.) + */ + + #undef UV_VERSION_MAJOR /* TODO(bnoordhuis) Remove in v0.11. */ +diff --git a/uv.gyp b/uv.gyp +index 7824819a9bd4a889b566cefa45873d24822a689e..407da4bb3483a5eb4ff1f23fa90596013e721655 100644 +--- a/uv.gyp ++++ b/uv.gyp +@@ -164,9 +164,16 @@ + ], + }, + 'conditions': [ +- ['"<(library)" == "shared_library"', { ++ ['library=="shared_library"', { + 'cflags': [ '-fPIC' ], + }], ++ ['library=="shared_library" and OS!="mac"', { ++ 'link_settings': { ++ # Must correspond with UV_VERSION_MAJOR and UV_VERSION_MINOR ++ # in src/version.c ++ 'libraries': [ '-Wl,-soname,libuv.so.0.10' ], ++ }, ++ }], + ], + }], + [ 'OS=="linux" or OS=="mac"', { +-- +1.8.2.1 + diff --git a/libuv.spec b/libuv.spec index fe6848f..ec32025 100644 --- a/libuv.spec +++ b/libuv.spec @@ -7,7 +7,7 @@ Name: libuv Epoch: 1 Version: 0.10.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Platform layer for node.js Group: Development/Tools @@ -16,14 +16,13 @@ URL: http://nodejs.org/ Source0: http://libuv.org/dist/v%{version}/%{name}-v%{version}.tar.gz Source2: libuv.pc.in +# Upstream patch for generating versioned shared object +Patch0001: 0001-build-set-soname-in-shared-library.patch + BuildRequires: gyp Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig -# Bundling exception request: -# https://fedorahosted.org/fpc/ticket/231 -Provides: bundled(libev) = 4.04 - %description libuv is a new platform layer for Node. Its purpose is to abstract IOCP on Windows and libev on Unix systems. We intend to eventually contain all platform @@ -42,6 +41,7 @@ Development libraries for libuv %prep %setup -q -n %{name}-v%{version} +%patch0001 -p1 %build export CFLAGS='%{optflags}' @@ -113,6 +113,11 @@ sed -e "s#@prefix@#%{_prefix}#g" \ %{_includedir}/uv-private %changelog +* Mon May 13 2013 Stephen Gallagher - 1:0.10.5-2 +- Add patch to properly report soname version information + This patch will be included upstream in 0.10.6 and can be dropped then. +- Remove Bundles(ev) as this has not been true since 0.9.5 + * Wed Apr 24 2013 T.C. Hollingsworth - 1:0.10.5-1 - new upstream release 0.10.5 From ed8c209f76eb213759ac4b17c33e123bb9fe855a Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Mon, 13 May 2013 14:47:29 -0700 Subject: [PATCH 2/4] don't sed the soname in the spec anymore; the patch takes care of it now --- libuv.spec | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/libuv.spec b/libuv.spec index ec32025..92c9f59 100644 --- a/libuv.spec +++ b/libuv.spec @@ -7,7 +7,7 @@ Name: libuv Epoch: 1 Version: 0.10.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Platform layer for node.js Group: Development/Tools @@ -48,22 +48,12 @@ export CFLAGS='%{optflags}' export CXXFLAGS='%{optflags}' ./gyp_uv -Dcomponent=shared_library -Dlibrary=shared_library -# Modify the build so it produces a versioned shared library -pushd out -mv libuv.target.mk libuv.target.mk.orig -sed "s/libuv.so/libuv.so.%{sover}/g" libuv.target.mk.orig > libuv.target.mk -mv run-benchmarks.target.mk run-benchmarks.target.mk.orig -sed "s/libuv.so/libuv.so.%{sover}/g" run-benchmarks.target.mk.orig > run-benchmarks.target.mk -mv run-tests.target.mk run-tests.target.mk.orig -sed "s/libuv.so/libuv.so.%{sover}/g" run-tests.target.mk.orig > run-tests.target.mk -popd - make %{?_smp_mflags} V=1 -C out BUILDTYPE=Release %install # Copy the shared lib into the libdir mkdir -p %{buildroot}/%{_libdir}/ -cp out/Release/obj.target/libuv.so.%{sover} %{buildroot}/%{_libdir}/libuv.so.%{sover} +cp out/Release/obj.target/libuv.so %{buildroot}/%{_libdir}/libuv.so.%{sover} pushd %{buildroot}/%{_libdir}/ ln -s libuv.so.%{sover} libuv.so.0 ln -s libuv.so.%{sover} libuv.so @@ -113,6 +103,9 @@ sed -e "s#@prefix@#%{_prefix}#g" \ %{_includedir}/uv-private %changelog +* Mon May 13 2013 T.C. Hollingsworth - 1:0.10.5-3 +- don't sed the soname in the spec anymore; the patch takes care of it now + * Mon May 13 2013 Stephen Gallagher - 1:0.10.5-2 - Add patch to properly report soname version information This patch will be included upstream in 0.10.6 and can be dropped then. From 4ed795e63ea07d47c222b52ec51fd1f9739ad5b9 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Mon, 13 May 2013 14:49:22 -0700 Subject: [PATCH 3/4] drop leftover global define for git revision --- libuv.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libuv.spec b/libuv.spec index 92c9f59..5999d43 100644 --- a/libuv.spec +++ b/libuv.spec @@ -1,5 +1,3 @@ -%global git_snapshot 5462dab - #we only need major.minor in the SONAME in the stable (even numbered) series #this should be changed to %%{version} in unstable (odd numbered) releases %global sover 0.10 @@ -105,6 +103,7 @@ sed -e "s#@prefix@#%{_prefix}#g" \ %changelog * Mon May 13 2013 T.C. Hollingsworth - 1:0.10.5-3 - don't sed the soname in the spec anymore; the patch takes care of it now +- drop leftover global define for git revision * Mon May 13 2013 Stephen Gallagher - 1:0.10.5-2 - Add patch to properly report soname version information From 7c1870c9f2e3b2aad4d07a0fc9592d1c6aa52490 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Tue, 28 May 2013 19:49:12 -0700 Subject: [PATCH 4/4] new upstream release 0.10.7 - drop upstreamed patch from 0.10.5-2 --- .gitignore | 1 + 0001-build-set-soname-in-shared-library.patch | 67 ------------------- libuv.spec | 12 ++-- sources | 2 +- 4 files changed, 8 insertions(+), 74 deletions(-) delete mode 100644 0001-build-set-soname-in-shared-library.patch diff --git a/.gitignore b/.gitignore index b599b07..661ff25 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /libuv-v0.10.3.tar.gz /libuv-v0.10.4.tar.gz /libuv-v0.10.5.tar.gz +/libuv-v0.10.7.tar.gz diff --git a/0001-build-set-soname-in-shared-library.patch b/0001-build-set-soname-in-shared-library.patch deleted file mode 100644 index a5359c8..0000000 --- a/0001-build-set-soname-in-shared-library.patch +++ /dev/null @@ -1,67 +0,0 @@ -From fa17cdcdc8f737fbcf986f96d657ca37e07fb1be Mon Sep 17 00:00:00 2001 -From: Ben Noordhuis -Date: Sun, 12 May 2013 14:48:58 +0200 -Subject: [PATCH] build: set soname in shared library - ---- - config-unix.mk | 5 +++++ - src/version.c | 4 +++- - uv.gyp | 9 ++++++++- - 3 files changed, 16 insertions(+), 2 deletions(-) - -diff --git a/config-unix.mk b/config-unix.mk -index ae510a332d127e03bd03f6f424e7b2e0c9973053..ea4a0ad4f715ad0ccd834228724b97aa3feed3ae 100644 ---- a/config-unix.mk -+++ b/config-unix.mk -@@ -153,6 +153,11 @@ CPPFLAGS += -Isrc/unix - CFLAGS += -DHAVE_DTRACE - endif - -+ifneq (darwin,$(PLATFORM)) -+# Must correspond with UV_VERSION_MAJOR and UV_VERSION_MINOR in src/version.c -+LDFLAGS += -Wl,-soname,libuv.so.0.10 -+endif -+ - libuv.a: $(OBJS) - $(AR) rcs $@ $^ - -diff --git a/src/version.c b/src/version.c -index 3291d47eebb10532638c58b2e5ffa348064f7564..9e9bf003e4ced453e28dfeb383b6474eb69271ff 100644 ---- a/src/version.c -+++ b/src/version.c -@@ -24,7 +24,9 @@ - /* - * Versions with an even minor version (e.g. 0.6.1 or 1.0.4) are API and ABI - * stable. When the minor version is odd, the API can change between patch -- * releases. -+ * releases. Make sure you update the -soname directives in config-unix.mk -+ * and uv.gyp whenever you bump UV_VERSION_MAJOR or UV_VERSION_MINOR (but -+ * not UV_VERSION_PATCH.) - */ - - #undef UV_VERSION_MAJOR /* TODO(bnoordhuis) Remove in v0.11. */ -diff --git a/uv.gyp b/uv.gyp -index 7824819a9bd4a889b566cefa45873d24822a689e..407da4bb3483a5eb4ff1f23fa90596013e721655 100644 ---- a/uv.gyp -+++ b/uv.gyp -@@ -164,9 +164,16 @@ - ], - }, - 'conditions': [ -- ['"<(library)" == "shared_library"', { -+ ['library=="shared_library"', { - 'cflags': [ '-fPIC' ], - }], -+ ['library=="shared_library" and OS!="mac"', { -+ 'link_settings': { -+ # Must correspond with UV_VERSION_MAJOR and UV_VERSION_MINOR -+ # in src/version.c -+ 'libraries': [ '-Wl,-soname,libuv.so.0.10' ], -+ }, -+ }], - ], - }], - [ 'OS=="linux" or OS=="mac"', { --- -1.8.2.1 - diff --git a/libuv.spec b/libuv.spec index 5999d43..791e27e 100644 --- a/libuv.spec +++ b/libuv.spec @@ -4,8 +4,8 @@ Name: libuv Epoch: 1 -Version: 0.10.5 -Release: 3%{?dist} +Version: 0.10.7 +Release: 1%{?dist} Summary: Platform layer for node.js Group: Development/Tools @@ -14,9 +14,6 @@ URL: http://nodejs.org/ Source0: http://libuv.org/dist/v%{version}/%{name}-v%{version}.tar.gz Source2: libuv.pc.in -# Upstream patch for generating versioned shared object -Patch0001: 0001-build-set-soname-in-shared-library.patch - BuildRequires: gyp Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -39,7 +36,6 @@ Development libraries for libuv %prep %setup -q -n %{name}-v%{version} -%patch0001 -p1 %build export CFLAGS='%{optflags}' @@ -101,6 +97,10 @@ sed -e "s#@prefix@#%{_prefix}#g" \ %{_includedir}/uv-private %changelog +* Wed May 29 2013 T.C. Hollingsworth - 1:0.10.7-1 +- new upstream release 0.10.7 +- drop upstreamed patch from 0.10.5-2 + * Mon May 13 2013 T.C. Hollingsworth - 1:0.10.5-3 - don't sed the soname in the spec anymore; the patch takes care of it now - drop leftover global define for git revision diff --git a/sources b/sources index 2875a67..3d0fe2f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -169e4d299e791b733892bc1c04b2b6b9 libuv-v0.10.5.tar.gz +0993698aa4793510cc1cd5c56b4aceb4 libuv-v0.10.7.tar.gz