summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-11-12 15:41:48 -0600
committerJohn Klug <john.klug@multitech.com>2020-11-12 15:41:48 -0600
commit792f811ca0d40b1d75eb84fa6841be2af82cdfe7 (patch)
treea00946a683f4505ccca7335429049568215f756a /patches
parenta16d788bfebc3c619c87f64615469e2a52451cc5 (diff)
downloadmlinux-792f811ca0d40b1d75eb84fa6841be2af82cdfe7.tar.gz
mlinux-792f811ca0d40b1d75eb84fa6841be2af82cdfe7.tar.bz2
mlinux-792f811ca0d40b1d75eb84fa6841be2af82cdfe7.zip
Switch to Yocto Thud branch
Diffstat (limited to 'patches')
-rw-r--r--patches/dont_use_network_on_unpack_of_tag.patch95
-rw-r--r--patches/git-branch-set-upstream-to.patch15
-rw-r--r--patches/kernel-revision-ext-mod.patch25
-rw-r--r--patches/perl-sdk-config-pkg-name.patch11
-rw-r--r--patches/rename-mtr-conflicts-with-mtr-product.patch61
5 files changed, 165 insertions, 42 deletions
diff --git a/patches/dont_use_network_on_unpack_of_tag.patch b/patches/dont_use_network_on_unpack_of_tag.patch
new file mode 100644
index 0000000..562e532
--- /dev/null
+++ b/patches/dont_use_network_on_unpack_of_tag.patch
@@ -0,0 +1,95 @@
+diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
+index 59a2ee8f..03611804 100644
+--- a/bitbake/lib/bb/fetch2/git.py
++++ b/bitbake/lib/bb/fetch2/git.py
+@@ -141,6 +141,19 @@ class Git(FetchMethod):
+ def supports_checksum(self, urldata):
+ return False
+
++ # git HASH verification code (is the REV a hash or not)
++ def bad_git_hash(self, revision):
++ if not revision or len(revision) != 40 or (False in [c in "abcdef0123456789" for c in revision]):
++ if not revision:
++ bb.note("bad_git_hash: SRCREV is not a defined string")
++ elif len(revision) != 40:
++ bb.debug(2,"bad_git_hash: revision len is not 40: " + str(len(revision)))
++ bb.debug(2,"bad_git_hash: revision dump: %s" % ":".join("{:02x}".format(ord(c)) for c in revision))
++ else:
++ bb.debug(2,"bad_git_hash: revision bad char: %s" % ":".join("{:02x}".format(ord(c)) for c in revision))
++ return True
++ return False
++
+ def urldata_init(self, ud, d):
+ """
+ init git specific variable within url data
+@@ -241,16 +254,52 @@ class Git(FetchMethod):
+
+ ud.setup_revisions(d)
+
++ # EARLY_GITSRCNAME start
++ gitsrcname = '%s%s' % (ud.host.replace(':', '.'), ud.path.replace('/', '.').replace('*', '.'))
++ if gitsrcname.startswith('.'):
++ gitsrcname = gitsrcname[1:]
++ # EARLY_GITSRCNAME end
++
++ # EARLY_GITDIR start
++ dl_dir = d.getVar("DL_DIR")
++ gitdir = d.getVar("GITDIR") or (dl_dir + "/git2")
++ ud.clonedir = os.path.join(gitdir, gitsrcname)
++ ud.localfile = ud.clonedir
++ # EARLY_GITDIR end
++
+ for name in ud.names:
+ # Ensure anything that doesn't look like a sha256 checksum/revision is translated into one
+- if not ud.revisions[name] or len(ud.revisions[name]) != 40 or (False in [c in "abcdef0123456789" for c in ud.revisions[name]]):
++ # First try the local repository
++ if self.bad_git_hash(ud.revisions[name]):
+ if ud.revisions[name]:
+ ud.unresolvedrev[name] = ud.revisions[name]
+- ud.revisions[name] = self.latest_revision(ud, d, name)
+-
+- gitsrcname = '%s%s' % (ud.host.replace(':', '.'), ud.path.replace('/', '.').replace('*', '.'))
+- if gitsrcname.startswith('.'):
+- gitsrcname = gitsrcname[1:]
++ if len(ud.revisions[name]) != 0:
++ # Assume this is a tag, and retrieve hash from local source,
++ # if possible. Deviation from openembedded, which goes to
++ # remote source for tags.
++ cmd = "%s rev-parse %s^{}" % (ud.basecmd, ud.revisions[name])
++ savedrev = ud.revisions[name]
++ if os.path.isdir(ud.localfile):
++ try:
++ # Validate local git repository
++ cmd = "%s --bare fsck --no-full" % (ud.basecmd)
++ runfetchcmd(cmd,d,workdir=ud.localfile)
++ # Valid repository, so see if we can get the hash
++ cmd = "%s rev-parse %s^{}" % (ud.basecmd, ud.revisions[name])
++ ud.revisions[name] = runfetchcmd(cmd,d,workdir=ud.localfile).rstrip()
++ except bb.fetch.FetchError:
++ bb.note("do_fetch: removing invalid git file system: " + ud.localfile)
++ cmd = "rm -rf " + ud.localfile + ";rm -f " + ud.localfile + ".done"
++ ud.revisions[name] = savedrev
++
++ if self.bad_git_hash(ud.revisions[name]):
++ ud.revisions[name] = self.latest_revision(ud, d, name)
++
++ bb.debug(2,"urldata_init: ud.revisions[name] " + ud.revisions[name])
++ bb.debug(2,"urldata_init: ud.host " + ud.host)
++ bb.debug(2,"urldata_init: ud.path " + ud.path)
++
++ # gitsrcname code purposely moved to EARLY_GITSRCNAME
+
+ # for rebaseable git repo, it is necessary to keep mirror tar ball
+ # per revision, so that even the revision disappears from the
+@@ -260,10 +309,7 @@ class Git(FetchMethod):
+ for name in ud.names:
+ gitsrcname = gitsrcname + '_' + ud.revisions[name]
+
+- dl_dir = d.getVar("DL_DIR")
+- gitdir = d.getVar("GITDIR") or (dl_dir + "/git2")
+- ud.clonedir = os.path.join(gitdir, gitsrcname)
+- ud.localfile = ud.clonedir
++ # gitdir/clonedir/localfile purposely moved to EARLY_GITDIR
+
+ mirrortarball = 'git2_%s.tar.gz' % gitsrcname
+ ud.fullmirror = os.path.join(dl_dir, mirrortarball)
diff --git a/patches/git-branch-set-upstream-to.patch b/patches/git-branch-set-upstream-to.patch
deleted file mode 100644
index a4c9996..0000000
--- a/patches/git-branch-set-upstream-to.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-# set-upstream was removed from git in change 52668846ea2d41ffbd87cda7cb8e492dea9f2c4d
-# on 2017-08-17 and first introduced in 2.15.0:
-# https://git.kernel.org/pub/scm/git/git.git/commit/?h=v2.15.0&id=52668846ea2d41ffbd87cda7cb8e492dea9f2c4d
-diff -Naru orig/bitbake/lib/bb/fetch2/git.py new/bitbake/lib/bb/fetch2/git.py
---- orig/bitbake/lib/bb/fetch2/git.py 2018-01-05 12:57:04.963756203 -0600
-+++ new/bitbake/lib/bb/fetch2/git.py 2018-01-05 12:57:32.419755391 -0600
-@@ -327,7 +327,7 @@
- branchname = ud.branches[ud.names[0]]
- runfetchcmd("%s checkout -B %s %s" % (ud.basecmd, branchname, \
- ud.revisions[ud.names[0]]), d, workdir=destdir)
-- runfetchcmd("%s branch --set-upstream %s origin/%s" % (ud.basecmd, branchname, \
-+ runfetchcmd("%s branch --set-upstream-to origin/%s" % (ud.basecmd, \
- branchname), d, workdir=destdir)
- else:
- runfetchcmd("%s checkout %s" % (ud.basecmd, ud.revisions[ud.names[0]]), d, workdir=destdir)
diff --git a/patches/kernel-revision-ext-mod.patch b/patches/kernel-revision-ext-mod.patch
new file mode 100644
index 0000000..c7da73c
--- /dev/null
+++ b/patches/kernel-revision-ext-mod.patch
@@ -0,0 +1,25 @@
+diff -Naru orig/layers/openembedded-core/meta/classes/kernel-module-split.bbclass new/layers/openembedded-core/meta/classes/kernel-module-split.bbclass
+--- orig/layers/openembedded-core/meta/classes/kernel-module-split.bbclass 2020-07-13 17:38:32.148762374 -0500
++++ new/layers/openembedded-core/meta/classes/kernel-module-split.bbclass 2020-07-13 17:36:27.740764540 -0500
+@@ -33,7 +33,7 @@
+ KERNEL_MODULES_META_PACKAGE ?= "${@ d.getVar("KERNEL_PACKAGE_NAME") or "kernel" }-modules"
+
+ KERNEL_MODULE_PACKAGE_PREFIX ?= ""
+-KERNEL_MODULE_PACKAGE_SUFFIX ?= "-${KERNEL_VERSION}"
++KERNEL_MODULE_PACKAGE_SUFFIX ?= "-${KERNEL_VERSION}${KERNEL_REVISION}"
+ KERNEL_MODULE_PROVIDE_VIRTUAL ?= "1"
+
+ python split_kernel_module_packages () {
+diff -Naru orig/layers/openembedded-core/meta/classes/module-base.bbclass new/layers/openembedded-core/meta/classes/module-base.bbclass
+--- orig/layers/openembedded-core/meta/classes/module-base.bbclass 2020-07-13 17:38:20.708762573 -0500
++++ new/layers/openembedded-core/meta/classes/module-base.bbclass 2020-07-13 17:36:52.756764104 -0500
+@@ -16,6 +16,9 @@
+ export KERNEL_VERSION = "${@oe.utils.read_file('${STAGING_KERNEL_BUILDDIR}/kernel-abiversion')}"
+ KERNEL_OBJECT_SUFFIX = ".ko"
+
++# Kernel revision
++export KERNEL_REVISION = "${@oe.utils.read_file('${STAGING_KERNEL_BUILDDIR}/mlinux_pr')}"
++
+ # kernel modules are generally machine specific
+ PACKAGE_ARCH = "${MACHINE_ARCH}"
+
diff --git a/patches/perl-sdk-config-pkg-name.patch b/patches/perl-sdk-config-pkg-name.patch
new file mode 100644
index 0000000..c1ee7ca
--- /dev/null
+++ b/patches/perl-sdk-config-pkg-name.patch
@@ -0,0 +1,11 @@
+diff -Naru orig/layers/openembedded-core/meta/recipes-core/meta/target-sdk-provides-dummy.bb new/layers/openembedded-core/meta/recipes-core/meta/target-sdk-provides-dummy.bb
+--- orig/layers/openembedded-core/meta/recipes-core/meta/target-sdk-provides-dummy.bb 2019-10-16 12:33:35.885748272 -0500
++++ new/layers/openembedded-core/meta/recipes-core/meta/target-sdk-provides-dummy.bb 2019-10-16 12:39:00.417738664 -0500
+@@ -20,6 +20,7 @@
+ libxml-parser-perl \
+ perl-module-bytes \
+ perl-module-carp \
++ perl-module-config \
+ perl-module-constant \
+ perl-module-data-dumper \
+ perl-module-errno \
diff --git a/patches/rename-mtr-conflicts-with-mtr-product.patch b/patches/rename-mtr-conflicts-with-mtr-product.patch
index b98a6d9..b7f767f 100644
--- a/patches/rename-mtr-conflicts-with-mtr-product.patch
+++ b/patches/rename-mtr-conflicts-with-mtr-product.patch
@@ -1,8 +1,7 @@
-diff --git a/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.86.bb b/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.86.bb
---- a/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.86.bb
-+++ /dev/null
-diff --git a/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.86.bb b/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.86.bb
-@@ -1,21 +0,0 @@
+diff -Naru orig/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.87.bb new/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.87.bb
+--- orig/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.87.bb 2020-07-14 15:55:52.000000000 -0500
++++ new/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.87.bb 1969-12-31 18:00:00.000000000 -0600
+@@ -1,27 +0,0 @@
-SUMMARY = "Combined traceroute and ping utility"
-DESCRIPTION = "mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool."
-HOMEPAGE = "http://www.bitwizard.nl/mtr/"
@@ -10,27 +9,30 @@ diff --git a/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr_0.
-DEPENDS = "ncurses"
-
-LICENSE = "GPLv2"
--LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
-- file://mtr.c;beginline=5;endline=16;md5=af1fafbbfa1bfd48af839f4bb3221106"
+-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+- file://ui/mtr.c;beginline=5;endline=16;md5=af1fafbbfa1bfd48af839f4bb3221106"
-
--SRC_URI = "ftp://ftp.bitwizard.nl/mtr/mtr-${PV}.tar.gz"
+-PV .= "+git${SRCPV}"
-
--SRC_URI[md5sum] = "8d63592c9d4579ef20cf491b41843eb2"
--SRC_URI[sha256sum] = "c5d948920b641cc35f8b380fc356ddfe07cce6a9c6474afe242fc58113f28c06"
+-SRCREV = "e6d0a7e93129e8023654ebf58dfa8135d1b1af56"
+-SRC_URI = "git://github.com/traviscross/mtr"
-
--inherit autotools
+-S = "${WORKDIR}/git"
+-
+-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--without-gtk"
-
--PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-diff --git a/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr-conflicts-with-mtr-product_0.86.bb b/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr-conflicts-with-mtr-product_0.86.bb
-new file mode 100644
-index 000000000..1d8a2cf9d
---- /dev/null
-+++ b/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr-conflicts-with-mtr-product_0.86.bb
-@@ -0,0 +1,21 @@
+-
+-PACKAGES += "${PN}-bash-completions"
+-
+-FILES_${PN}-bash-completions = "${datadir}/bash-completion/"
+diff -Naru orig/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr-conflicts-with-mtr-product_0.87.bb new/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr-conflicts-with-mtr-product_0.87.bb
+--- orig/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr-conflicts-with-mtr-product_0.87.bb 1969-12-31 18:00:00.000000000 -0600
++++ new/layers/meta-openembedded/meta-networking/recipes-support/mtr/mtr-conflicts-with-mtr-product_0.87.bb 2020-07-14 15:55:52.000000000 -0500
+@@ -0,0 +1,27 @@
+SUMMARY = "Combined traceroute and ping utility"
+DESCRIPTION = "mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool."
+HOMEPAGE = "http://www.bitwizard.nl/mtr/"
@@ -38,18 +40,23 @@ index 000000000..1d8a2cf9d
+DEPENDS = "ncurses"
+
+LICENSE = "GPLv2"
-+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
-+ file://mtr.c;beginline=5;endline=16;md5=af1fafbbfa1bfd48af839f4bb3221106"
++LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
++ file://ui/mtr.c;beginline=5;endline=16;md5=af1fafbbfa1bfd48af839f4bb3221106"
+
-+SRC_URI = "ftp://ftp.bitwizard.nl/mtr/mtr-${PV}.tar.gz"
++PV .= "+git${SRCPV}"
+
-+SRC_URI[md5sum] = "8d63592c9d4579ef20cf491b41843eb2"
-+SRC_URI[sha256sum] = "c5d948920b641cc35f8b380fc356ddfe07cce6a9c6474afe242fc58113f28c06"
++SRCREV = "e6d0a7e93129e8023654ebf58dfa8135d1b1af56"
++SRC_URI = "git://github.com/traviscross/mtr"
+
-+inherit autotools
++S = "${WORKDIR}/git"
++
++inherit autotools pkgconfig
+
+EXTRA_OECONF = "--without-gtk"
+
-+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
++PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
++
++PACKAGES += "${PN}-bash-completions"
++
++FILES_${PN}-bash-completions = "${datadir}/bash-completion/"