diff --git a/0001-Use-https-if-pfx-option-is-specified.patch b/0001-Use-https-if-pfx-option-is-specified.patch new file mode 100644 index 0000000000000000000000000000000000000000..810d99e4babf754b35f88b38b3ac5c27eed652d7 --- /dev/null +++ b/0001-Use-https-if-pfx-option-is-specified.patch @@ -0,0 +1,24 @@ +From cc3fec4c24f377bad834a0d2dfa69f122ac6fe64 Mon Sep 17 00:00:00 2001 +From: John Gozde +Date: Fri, 28 Mar 2014 12:33:37 -0600 +Subject: [PATCH] Use https if 'pfx' option is specified. + +crypto.createCredentials can accept a PFX or PKCS12 private key via the +'pfx' option. +--- + lib/server.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/server.js b/lib/server.js +index a0cbc9f..e204c9a 100644 +--- a/lib/server.js ++++ b/lib/server.js +@@ -38,7 +38,7 @@ Server.prototype.configure = function configure(app) { + debug('Configuring %s', app ? 'connect / express application' : 'HTTP server'); + + if(!app) { +- if (this.options.key && this.options.cert) { ++ if ((this.options.key && this.options.cert) || this.options.pfx) { + this.server = https.createServer(this.options, this.handler.bind(this)); + } + else { diff --git a/nodejs-tiny-lr-fork.spec b/nodejs-tiny-lr-fork.spec index 74fdad8686be69600a6d60273b1b0b613c1af79e..fd048476f2bbc597f1669cb04ce79b287a4027ee 100644 --- a/nodejs-tiny-lr-fork.spec +++ b/nodejs-tiny-lr-fork.spec @@ -2,11 +2,14 @@ %global enable_tests 0 Name: nodejs-tiny-lr-fork Version: 0.0.5 -Release: 4 +Release: 5 Summary: A tiny LiveReload server implementation you can spawn in the background License: MIT URL: https://github.com/shama/tiny-lr Source0: https://registry.npmjs.org/tiny-lr-fork/-/tiny-lr-fork-%{version}.tgz + +Patch1: 0001-Use-https-if-pfx-option-is-specified.patch + BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging @@ -18,7 +21,7 @@ BuildRequires: npm(noptify) npm(qs) npm(request) npm(supertest) %{summary}. %prep -%setup -q -n package +%autosetup -p1 -n package %nodejs_fixdep faye-websocket '~0.7' %nodejs_fixdep qs '^6.0.2' %nodejs_fixdep noptify '~0.0.3' @@ -59,6 +62,9 @@ ln -sf %{nodejs_sitelib}/tiny-lr-fork/bin/update-livereload \ %{_bindir}/update-livereload %changelog +* Tue May 14 2024 zhangxingrong - 0.0.5-5 +- backport upstream patch + * Tue Apr 9 2024 liyanan - 0.0.5-4 - fix tiny-lr command error