ruby: do not clone the spec repo in do_configure 45/4645/1
authorJackie Huang <jackie.huang@windriver.com>
Tue, 7 Jul 2020 08:46:39 +0000 (16:46 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Fri, 28 Aug 2020 07:50:54 +0000 (15:50 +0800)
There is potential issue to clone repo in do_configure,
so move it to SRC_URI so it will be cloned in do_fetch,
and also set the correct SRCREV.

Issue-ID: INF-183
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: Iaeb21dfa946540cca8db62dd9a3cfc0e682375e7

meta-stx/recipes-devtools/ruby/ruby_2.0.0-p648.bb

index 540b906..25972c3 100644 (file)
@@ -18,12 +18,13 @@ inherit openssl10
 
 DEPENDS += " libnsl2"
 
-# file://ruby-CVE-2017-9226.patch # Not applicable
+SRCREV = "1a828cad2d559e2ff55a5f01cc5de217b9c9bc2b"
+
 SRC_URI += " \
-           file://ruby-CVE-2017-9228.patch \
-          file://ext.socket.extmk.patch \
-           "
-#  file://run-ptest 
+       git://github.com/ruby/spec.git;protocol=https;rev=${SRCREV};destsuffix=spec/rubyspec \
+       file://ruby-CVE-2017-9228.patch \
+       file://ext.socket.extmk.patch \
+       "
 
 SRC_URI[md5sum] = "05db49992d01731fee023cad09bb4e52"
 SRC_URI[sha256sum] = "8690bd6b4949c333b3919755c4e48885dbfed6fd055fe9ef89930bde0d2376f8"
@@ -40,7 +41,6 @@ PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
 
 EXTRA_AUTORECONF += "--exclude=aclocal"
 
-#    --disable-versioned-paths 
 EXTRA_OECONF ?= " "
 EXTRA_OECONF = "\
     --disable-install-doc \
@@ -57,7 +57,7 @@ EXTRA_OEMAKE = " \
 do_configure_prepend() {
     cd ${S}
     rm -rf spec/rubyspec
-    git clone git://github.com/ruby/rubyspec.git spec/rubyspec
+    cp -rf ${WORKDIR}/spec ${S}
     cd ${B}
 }