bb.tests.fetch.GitShallowTest: always allow file transport
PATCH 1/1 bb.tests.fetch.GitShallowTest: always allow file transport
From: Alexandre Belloni <[email protected]>
Following CVE-2022-39253, distributions are disabling file:// transport for
submodules. See https://git.launchpad.net/ubuntu/+source/git/tree/debian/patches/CVE-2022-39253-11.patch?h=applied/ubuntu/jammy-security
[YOCTO #14941]
--- lib/bb/tests/fetch.py | 5 +++++ 1 file changed, 5 insertions(+)
lib/bb/tests/fetch.py +5 -0
@@ -1865,6 +1865,9 @@ class GitShallowTest(FetcherTest): # Make this look like it was cloned from a remote... self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir) self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir) + + self.d.setVar('FETCHCMD_git', "git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat -c protocol.file.allow=always") + self.add_empty_file('asub', cwd=smdir) self.add_empty_file('bsub', cwd=smdir)
@@ -1898,6 +1901,8 @@ class GitShallowTest(FetcherTest): self.add_empty_file('asub', cwd=smdir) self.add_empty_file('bsub', cwd=smdir) + self.d.setVar('FETCHCMD_git', "git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat -c protocol.file.allow=always") + self.git('submodule init', cwd=self.srcdir) self.git('submodule add file://%s' % smdir, cwd=self.srcdir) self.git('submodule update', cwd=self.srcdir)
Signature · 1 line
2.37.3
Not sure how to fix it, but before adding more "-c core.fsyncobjectfiles=0", please check
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14939
Quoted 54 lines · Alexandre Belloni via lists.openembedded.org
From: Alexandre Belloni <[email protected]>
Following CVE-2022-39253, distributions are disabling file:// transport for submodules. See
https://git.launchpad.net/ubuntu/+source/git/tree/debian/patches/CVE-2022-39253-11.patch?h=applied/ubuntu/jammy-security[YOCTO #14941]
Signed-off-by Alexandre Belloni <[email protected]>--- lib/bb/tests/fetch.py | 5 +++++ 1 file changed, 5 insertions(+)lib/bb/tests/fetch.py +3
-0@@ -1865,6 +1865,9 @@ class GitShallowTest(FetcherTest): # Make this look like it was cloned from a remote... self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir) self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir) + + self.d.setVar('FETCHCMD_git', "git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat -c protocol.file.allow=always") + self.add_empty_file('asub', cwd=smdir)
self.add_empty_file('bsub', cwd=smdir)lib/bb/tests/fetch.py +2
-0@@ -1898,6 +1901,8 @@ class GitShallowTest(FetcherTest): self.add_empty_file('asub', cwd=smdir) self.add_empty_file('bsub', cwd=smdir) + self.d.setVar('FETCHCMD_git', "git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat -c protocol.file.allow=always") + self.git('submodule init', cwd=self.srcdir) self.git('submodule add file://%s' % smdir, cwd=self.srcdir)
self.git('submodule update', cwd=self.srcdir)
--
2.37.3-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#14044):
https://lists.openembedded.org/g/bitbake-devel/message/14044
Mute This Topic: https://lists.openembedded.org/mt/94472006/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 4 lines · Martin Jansa
Not sure how to fix it, but before adding more "-c core.fsyncobjectfiles=0", please check
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14939
Yeah, I just copied the default value, I should probably append instead
Quoted 58 lines
Quoted 54 lines · Alexandre Belloni via lists.openembedded.org
From: Alexandre Belloni <[email protected]>
Following CVE-2022-39253, distributions are disabling file:// transport for submodules. See
https://git.launchpad.net/ubuntu/+source/git/tree/debian/patches/CVE-2022-39253-11.patch?h=applied/ubuntu/jammy-security[YOCTO #14941]
Signed-off-by Alexandre Belloni <[email protected]>--- lib/bb/tests/fetch.py | 5 +++++ 1 file changed, 5 insertions(+)lib/bb/tests/fetch.py +3
-0@@ -1865,6 +1865,9 @@ class GitShallowTest(FetcherTest): # Make this look like it was cloned from a remote... self.git('config --add remote.origin.url "%s"' % smdir, cwd=smdir) self.git('config --add remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"', cwd=smdir) + + self.d.setVar('FETCHCMD_git', "git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat -c protocol.file.allow=always") + self.add_empty_file('asub', cwd=smdir)
self.add_empty_file('bsub', cwd=smdir)lib/bb/tests/fetch.py +2
-0@@ -1898,6 +1901,8 @@ class GitShallowTest(FetcherTest): self.add_empty_file('asub', cwd=smdir) self.add_empty_file('bsub', cwd=smdir) + self.d.setVar('FETCHCMD_git', "git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat -c protocol.file.allow=always") + self.git('submodule init', cwd=self.srcdir) self.git('submodule add file://%s' % smdir, cwd=self.srcdir)
self.git('submodule update', cwd=self.srcdir)
--
2.37.3-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#14044):
https://lists.openembedded.org/g/bitbake-devel/message/14044
Mute This Topic: https://lists.openembedded.org/mt/94472006/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com