Skip to contentSkip to conversation

libsass: fix runtime version

PATCH Superseded Yi Zhao 2 participants 7 messages Apr 21, 2025 – Apr 24, 2025

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Yi Zhao

author
#0 lore raw

PATCH 1/2 libsass: fix runtime version

Fix libsass runtime version shown in 'sassc --version'.

Before the fix:

$ sassc --version
sassc: [NA]
libsass: [NA]
sass2scss: 1.1.1
sass: 3.5

After the fix:

$ sassc  --version
sassc: 3.6.2
libsass: 3.6.6
sass2scss: 1.1.1
sass: 3.5
---
 meta/recipes-support/sass/libsass_git.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-support/sass/libsass_git.bb +4 -0
index f0824944b9..52ee5e47f9 100644
@@ -11,4 +11,8 @@ PV = "3.6.6"
 
 S = "${WORKDIR}/git"
 
+do_configure:append() {
+    sed -i -e 's/\[NA\]/${PV}/g' ${S}/include/sass/version.h
+}
+
 BBCLASSEXTEND = "native"
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 2/2 sassc: fix runtime version

Fix sassc runtime version shown in 'sassc --version'.

Before the fix:

$ sassc --version
sassc: [NA]
libsass: [NA]
sass2scss: 1.1.1
sass: 3.5

After the fix:

$ sassc  --version
sassc: 3.6.2
libsass: 3.6.6
sass2scss: 1.1.1
sass: 3.5
---
 meta/recipes-support/sass/sassc_git.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-support/sass/sassc_git.bb +4 -0
index b7f57ca244..dfc5ee5857 100644
@@ -12,6 +12,10 @@ SRCREV = "66f0ef37e7f0ad3a65d2f481eff09d09408f42d0"
 S = "${WORKDIR}/git"
 PV = "3.6.2"
 
+do_configure:append() {
+    sed -i -e 's/\[NA\]/${PV}/g' ${S}/sassc_version.h
+}
+
 CVE_STATUS[CVE-2022-43357] = "cpe-incorrect: this is CVE for libsass, not sassc wrapper"
 
 BBCLASSEXTEND = "native"
Signature · 1 line
2.34.1
#2 lore raw

Re: [OE-core] [PATCH 2/2] sassc: fix runtime version

meta/recipes-support/sass/sassc_git.bb SRCREV = "66f0ef37e7f0ad3a65d2f481eff09d09408f42d0" · line 17

Quoted 3 lines · Yi Zhao via lists.openembedded.org
meta/recipes-support/sass/sassc_git.bb +3 -0
+do_configure:append() {
+    sed -i -e 's/\[NA\]/${PV}/g' ${S}/sassc_version.h
+}

This is a generated file (from sassc_version.h.in), so why is it not generated correctly? Should we rather do that?

Alex

author
#3 lore raw

Re: [OE-core] [PATCH 2/2] sassc: fix runtime version

Quoted 8 lines · Alexander Kanavin via lists.openembedded.org

meta/recipes-support/sass/sassc_git.bb SRCREV = "66f0ef37e7f0ad3a65d2f481eff09d09408f42d0" · line 17

Quoted 3 lines · Yi Zhao via lists.openembedded.org
meta/recipes-support/sass/sassc_git.bb +3 -0
+do_configure:append() {
+    sed -i -e 's/\[NA\]/${PV}/g' ${S}/sassc_version.h
+}

This is a generated file (from sassc_version.h.in), so why is it not generated correctly? Should we rather do that?

There is already a sassc_version.h file with version number [NA] in the source directory. When ${S} != ${B}, the generated sassc_version.h is located in the build directory, and the same file in the source directory is not overwritten. However, the latter is used during build, resulting in version [NA]. Can it be fixed by inheriting autotools-brokensep? Or copy the generated sassc_version.h from ${B} to ${S}after do_configure?

//Yi

Quoted 11 lines

Alex

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#215234): https://lists.openembedded.org/g/openembedded-core/message/215234
Mute This Topic: https://lists.openembedded.org/mt/112372256/7283133
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw

Re: [OE-core] [PATCH 2/2] sassc: fix runtime version

Quoted 7 lines · Yi Zhao

There is already a sassc_version.h file with version number [NA] in the source directory. When ${S} != ${B}, the generated sassc_version.h is located in the build directory, and the same file in the source directory is not overwritten. However, the latter is used during build, resulting in version [NA]. Can it be fixed by inheriting autotools-brokensep? Or copy the generated sassc_version.h from ${B} to ${S}after do_configure?

I think a better fix is to make a patch that deletes the bogus generated sassc_version.h from the source tree. Normally this patch would be offered upstream, but it looks like this upstream is inactive, so you can mark the patch as Inactive-Upstream [last commit X years ago].

Alex

author
#5 lore raw

Re: [OE-core] [PATCH 2/2] sassc: fix runtime version

Quoted 8 lines · Alexander Kanavin
Quoted 7 lines · Yi Zhao

There is already a sassc_version.h file with version number [NA] in the source directory. When ${S} != ${B}, the generated sassc_version.h is located in the build directory, and the same file in the source directory is not overwritten. However, the latter is used during build, resulting in version [NA]. Can it be fixed by inheriting autotools-brokensep? Or copy the generated sassc_version.h from ${B} to ${S}after do_configure?

Quoted 5 lines

I think a better fix is to make a patch that deletes the bogus generated sassc_version.h from the source tree. Normally this patch would be offered upstream, but it looks like this upstream is inactive, so you can mark the patch as Inactive-Upstream [last commit X years ago].

Thanks. I will send v2.

//Yi

Quoted 2 lines

Alex

#6 lore raw
In reply to Yi Zhao

meta/recipes-support/sass/libsass_git.bb PV = "3.6.6" · line 16

Quoted 3 lines · Yi Zhao via lists.openembedded.org
meta/recipes-support/sass/libsass_git.bb +3 -0
+do_configure:append() {
+    sed -i -e 's/\[NA\]/${PV}/g' ${S}/include/sass/version.h
+}

Same question as the other patch in the serie.

Alex