]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
buildcpio.py: Switch to using cpio-2.15
authorKhem Raj <raj.khem@gmail.com>
Tue, 6 Feb 2024 18:49:39 +0000 (10:49 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 8 Feb 2024 10:58:31 +0000 (10:58 +0000)
This helps in getting it building with newer architectures like riscv32
since it has upgraded gnulib over 2.14 which has the needed fixes.

Drop the -fno-common workaround as it is already applied to cpio

drop --disable-maintainer-mode

Fixes
configure: WARNING: unrecognized options: --disable-maintainer-mode

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/buildcpio.py
meta/lib/oeqa/sdk/cases/buildcpio.py
meta/lib/oeqa/selftest/cases/meta_ide.py

index ce122ebcf980d26ad89f0e2307e2be24a031a6f8..7be734cb4f462a09e627601b8f9eec18aab66bbf 100644 (file)
@@ -14,7 +14,7 @@ class BuildCpioTest(OERuntimeTestCase):
 
     @classmethod
     def setUpClass(cls):
-        uri = 'https://downloads.yoctoproject.org/mirror/sources/cpio-2.14.tar.gz'
+        uri = 'https://downloads.yoctoproject.org/mirror/sources/cpio-2.15.tar.gz'
         cls.project = TargetBuildProject(cls.tc.target,
                                          uri,
                                          dl_dir = cls.tc.td['DL_DIR'])
@@ -29,10 +29,6 @@ class BuildCpioTest(OERuntimeTestCase):
     @OEHasPackage(['autoconf'])
     def test_cpio(self):
         self.project.download_archive()
-        self.project.run_configure('--disable-maintainer-mode')
-        # This sed is needed until
-        # https://git.savannah.gnu.org/cgit/cpio.git/commit/src/global.c?id=641d3f489cf6238bb916368d4ba0d9325a235afb
-        # is in a release.
-        self.project._run(r'sed -i -e "/char \*program_name/d" %s/src/global.c' % self.project.targetdir)
+        self.project.run_configure()
         self.project.run_make()
         self.project.run_install()
index 33b946fc16688d5ec985b1e79862dec9a5ccb085..51003b19cd013060d7e8f41071094e7e2369bb15 100644 (file)
@@ -19,10 +19,10 @@ class BuildCpioTest(OESDKTestCase):
     """
     def test_cpio(self):
         with tempfile.TemporaryDirectory(prefix="cpio-", dir=self.tc.sdk_dir) as testdir:
-            tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftp.gnu.org/gnu/cpio/cpio-2.14.tar.gz")
+            tarball = self.fetch(testdir, self.td["DL_DIR"], "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz")
 
             dirs = {}
-            dirs["source"] = os.path.join(testdir, "cpio-2.14")
+            dirs["source"] = os.path.join(testdir, "cpio-2.15")
             dirs["build"] = os.path.join(testdir, "build")
             dirs["install"] = os.path.join(testdir, "install")
 
@@ -30,8 +30,7 @@ class BuildCpioTest(OESDKTestCase):
             self.assertTrue(os.path.isdir(dirs["source"]))
             os.makedirs(dirs["build"])
 
-            self._run("sed -i -e '/char.*program_name/d' {source}/src/global.c".format(**dirs))
-            self._run("cd {build} && {source}/configure --disable-maintainer-mode $CONFIGURE_FLAGS".format(**dirs))
+            self._run("cd {build} && {source}/configure $CONFIGURE_FLAGS".format(**dirs))
             self._run("cd {build} && make -j".format(**dirs))
             self._run("cd {build} && make install DESTDIR={install}".format(**dirs))
 
index e446d9308d53dabdf5d0f6b598a32f08fcb72fc1..ffe0d2604d1c3146ea55109fafcadf0301dd85d9 100644 (file)
@@ -44,10 +44,10 @@ class MetaIDE(OESelftestTestCase):
     def test_meta_ide_can_build_cpio_project(self):
         dl_dir = self.td.get('DL_DIR', None)
         self.project = SDKBuildProject(self.tmpdir_metaideQA + "/cpio/", self.environment_script_path,
-                        "https://ftp.gnu.org/gnu/cpio/cpio-2.14.tar.gz",
+                        "https://ftp.gnu.org/gnu/cpio/cpio-2.15.tar.gz",
                         self.tmpdir_metaideQA, self.td['DATETIME'], dl_dir=dl_dir)
         self.project.download_archive()
-        self.assertEqual(self.project.run_configure('$CONFIGURE_FLAGS --disable-maintainer-mode','sed -i -e "/char \*program_name/d" src/global.c;'), 0,
+        self.assertEqual(self.project.run_configure('$CONFIGURE_FLAGS'), 0,
                         msg="Running configure failed")
         self.assertEqual(self.project.run_make(), 0,
                         msg="Running make failed")