From 3cd0709f2088121a3d8cdb97fd981efd0325ae18 Mon Sep 17 00:00:00 2001 From: Tom spot Callaway Date: Thu, 1 Sep 2022 21:26:06 -0400 Subject: [PATCH] update to 1.6.5, rebuild for R 4.2.1, bootstrap on --- .gitignore | 1 + 0001-Use-unbundled-libuv-new.patch | 83 ++++++++++++++++++++++++++++++ R-httpuv.spec | 21 +++++--- sources | 2 +- 4 files changed, 98 insertions(+), 9 deletions(-) create mode 100644 0001-Use-unbundled-libuv-new.patch diff --git a/.gitignore b/.gitignore index 37272ab..75ac67e 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /httpuv_1.5.5.tar.gz /httpuv_1.6.0.tar.gz /httpuv_1.6.1.tar.gz +/httpuv_1.6.5.tar.gz diff --git a/0001-Use-unbundled-libuv-new.patch b/0001-Use-unbundled-libuv-new.patch new file mode 100644 index 0000000..b4af18b --- /dev/null +++ b/0001-Use-unbundled-libuv-new.patch @@ -0,0 +1,83 @@ +diff -up httpuv/src/callbackqueue.cpp.system httpuv/src/callbackqueue.cpp +diff -up httpuv/src/callbackqueue.h.system httpuv/src/callbackqueue.h +diff -up httpuv/src/http.h.system httpuv/src/http.h +diff -up httpuv/src/httprequest.h.system httpuv/src/httprequest.h +diff -up httpuv/src/httpresponse.cpp.system httpuv/src/httpresponse.cpp +diff -up httpuv/src/httpuv.cpp.system httpuv/src/httpuv.cpp +diff -up httpuv/src/Makevars.system httpuv/src/Makevars +--- httpuv/src/Makevars.system 2021-12-13 14:41:14.000000000 -0500 ++++ httpuv/src/Makevars 2022-09-01 21:19:46.407616592 -0400 +@@ -5,7 +5,7 @@ CXX_STD=CXX11 + + UNAME := $(shell uname) + +-PKG_LIBS = ./libuv/.libs/libuv.a ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread ++PKG_LIBS = $(shell pkgconf --libs libuv) ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread + + ifeq ($(UNAME), Darwin) + PKG_LIBS += -framework CoreServices +@@ -23,7 +23,7 @@ endif + + PKG_CFLAGS = $(C_VISIBILITY) -DSTRICT_R_HEADERS + PKG_CXXFLAGS = $(CXX_VISIBILITY) -DSTRICT_R_HEADERS +-PKG_CPPFLAGS = -Ilibuv/include -pthread ++PKG_CPPFLAGS = -pthread $(shell pkgconf --cflags libuv) + + # To avoid spurious warnings from `R CMD check --as-cran`, about compiler + # warning flags like -Werror. +@@ -43,49 +43,4 @@ CONFIGURE_FLAGS="--quiet" + # PKG_CPPFLAGS += -D_GLIBCXX_ASSERTIONS + + +-$(SHLIB): libuv/.libs/libuv.a http-parser/http_parser.o sha1/sha1.o base64/base64.o +- +-# We needed to rename lt~obsolete.m4 because the name causes problems with R +-# CMD check. Here we rename it back. +-libuv/m4/lt~obsolete.m4: libuv/m4/lt_obsolete.m4 +- cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4 +- +-# Run ./configure to create the Makefile. +-# +-# On systems that do _not_ have automake installed, we need to make sure that +-# configure does not try to run automake, because it will fail. To do that, we +-# we need to touch various autotools-related files so it doesn't try to run +-# autotools programs again. We also need to make sure configure is executable, +-# because on some platforms, calling unzip() in R does not preserve the +-# executable bit. +-# +-# If the system does have automake, then we'll run autogen.sh before configure, +-# as per the official build instructions for libuv. autogen.sh will in turn run +-# aclocal, autoconf, and automake. +-# +-# It's VERY IMPORTANT that mtime(aclocal.m4) <= mtime(configure), and also +-# mtime(aclocal.m4) <= mtime(Makefile.in). On some platforms, passing multiple +-# files to a single touch command gives them all the same time, but on others +-# (Solaris and possibly some Fedoras) the timestamps are slightly increasing +-# from one to the next, i.e. the order matters. To remove this fragility, we +-# use "-r aclocal.m4" to ensure that all three files are guaranteed to have +-# precisely the same timestamp value. +-libuv/Makefile: libuv/m4/lt~obsolete.m4 +- cd libuv; \ +- if ! command -v automake >/dev/null 2>&1 ; then \ +- echo "automake not found. Touching files so configure will not try to run automake."; \ +- touch aclocal.m4; \ +- touch -r aclocal.m4 configure Makefile.in; \ +- else \ +- echo "automake found. Running autogen.sh."; \ +- sh autogen.sh; \ +- fi; \ +- chmod +x configure; \ +- CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS) $(C_VISIBILITY)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" ./configure $(CONFIGURE_FLAGS) +- +-libuv/.libs/libuv.a: libuv/Makefile +- $(MAKE) --directory=libuv \ +- HAVE_DTRACE=0 +- +-clean: +- $(MAKE) --directory=libuv distclean ++$(SHLIB): http-parser/http_parser.o sha1/sha1.o base64/base64.o +diff -up httpuv/src/socket.cpp.system httpuv/src/socket.cpp +diff -up httpuv/src/socket.h.system httpuv/src/socket.h +diff -up httpuv/src/thread.h.system httpuv/src/thread.h +diff -up httpuv/src/uvutil.h.system httpuv/src/uvutil.h +diff -up httpuv/src/webapplication.h.system httpuv/src/webapplication.h diff --git a/R-httpuv.spec b/R-httpuv.spec index 1a0b99a..131a45a 100644 --- a/R-httpuv.spec +++ b/R-httpuv.spec @@ -1,30 +1,30 @@ -%bcond_with bootstrap +%bcond_without bootstrap %global packname httpuv -%global packver 1.6.1 +%global packver 1.6.5 %global rlibdir %{_libdir}/R/library Name: R-%{packname} -Version: 1.6.1 -Release: 5%{?dist} +Version: %{packver} +Release: 1%{?dist} Summary: HTTP and WebSocket Server Library # Main: GPLv2+; http-parser: MIT; sha1: Public Domain License: GPLv2+ and MIT and Public Domain URL: https://CRAN.R-project.org/package=%{packname} Source0: https://cran.r-project.org/src/contrib/%{packname}_%{packver}.tar.gz -Patch0001: 0001-Use-unbundled-libuv.patch +Patch0001: 0001-Use-unbundled-libuv-new.patch # Here's the R view of the dependencies world: # Depends: -# Imports: R-Rcpp >= 0.11.0, R-utils, R-R6, R-promises, R-later >= 0.8.0 +# Imports: R-Rcpp >= 1.0.7, R-utils, R-R6, R-promises, R-later >= 0.8.0 # Suggests: R-testthat, R-callr, R-curl, R-websocket # LinkingTo: R-Rcpp, R-later # Enhances: BuildRequires: R-devel BuildRequires: tex(latex) -BuildRequires: R-Rcpp-devel >= 0.11.0 +BuildRequires: R-Rcpp-devel >= 1.0.7 BuildRequires: R-utils BuildRequires: R-R6 BuildRequires: R-promises @@ -54,7 +54,7 @@ by Joyent, Inc. %setup -q -c -n %{packname} pushd %{packname} -%patch0001 -p1 +%patch0001 -p1 -b .system rm -r src/libuv sed -i '/libuv/d' MD5 popd @@ -94,6 +94,11 @@ export LANG=C.UTF-8 %changelog +* Thu Sep 1 2022 Tom Callaway - 1.6.5-1 +- update to 1.6.5 +- rebuild for R 4.2.1 +- bootstrap on + * Wed Jul 20 2022 Fedora Release Engineering - 1.6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 21f5d66..925f59b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (httpuv_1.6.1.tar.gz) = 20c55f461ff44a61834da0dea85531f06286e97321ef365b3d3f0add3ef1bd7db4fae2b928d18910f3c418c7f32aac72281d9ca4662815c1777aac6b4db0b3d9 +SHA512 (httpuv_1.6.5.tar.gz) = aaa3d6551d37b955b68072dc8e61a23d8c1c0b288dc5249aa46ab242682aef278e9f3a42e84809c68b4b6136f846171d8e4134eeb6b08749ed3758ef3752b79e