From 10bc2ef852277cf8e9858f75cea9f55b482bf85b Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Thu, 6 Jun 2019 09:43:20 -0700 Subject: Update to internal 6-6-19 Signed-off-by: Ed Tanous --- .../recipes-core/at-scale-debug/at-scale-debug.bb | 4 +- .../recipes-core/crashdump/crashdump_git.bb | 4 +- .../recipes-core/ipmi/intel-ipmi-oem_%.bbappend | 2 +- .../recipes-core/ipmi/ipmi-providers.bb | 2 +- .../recipes-core/os-release/os-release.bbappend | 56 +--------------- .../recipes-core/os-release/version-vars.inc | 78 ++++++++++++++++++++++ .../recipes-core/peci-pcie/peci-pcie_git.bb | 4 +- 7 files changed, 89 insertions(+), 61 deletions(-) create mode 100644 meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc (limited to 'meta-openbmc-mods/meta-common/recipes-core') diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug.bb b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug.bb index fd71e0abf..fda0716c5 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug.bb @@ -12,9 +12,9 @@ DEPENDS = "sdbusplus openssl libpam" do_configure[depends] += "virtual/kernel:do_shared_workdir" -SRC_URI = "git://github.com/Intel-BMC/at-scale-debug;protocol=ssh" +SRC_URI = "git://git@github.com/Intel-BMC/at-scale-debug;protocol=ssh" -SRCREV = "acf016bebe2cada610eb4aab7b97fdcd03e2200d" +SRCREV = "0536b8cc3591a310ab36d145540811c728f8ef60" S = "${WORKDIR}/git" SYSTEMD_SERVICE_${PN} += "com.intel.AtScaleDebug.service" diff --git a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb index bbf4f0183..a1c53389d 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/crashdump/crashdump_git.bb @@ -10,8 +10,8 @@ inherit cmake LICENSE = "CLOSED" LIC_FILES_CHKSUM = "" -SRC_URI = "git://github.com/Intel-BMC/at-scale-debug;protocol=ssh" -SRCREV = "acf016bebe2cada610eb4aab7b97fdcd03e2200d" +SRC_URI = "git://git@github.com/Intel-BMC/at-scale-debug;protocol=ssh" +SRCREV = "0536b8cc3591a310ab36d145540811c728f8ef60" S = "${WORKDIR}/git/crashdump" PACKAGES += "libpeci" diff --git a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend index 01cc72e69..22568dba2 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/intel-ipmi-oem_%.bbappend @@ -1,2 +1,2 @@ SRC_URI = "git://github.com/openbmc/intel-ipmi-oem.git" -SRCREV = "1f2eb5eac4a75a219ece15850a3c2dfc0fdc5991" +SRCREV = "53870d7308e374df0c0382e3208ff1567a160947" diff --git a/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb b/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb index d4ad9c4e6..b5448060f 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/ipmi/ipmi-providers.bb @@ -1,7 +1,7 @@ SUMMARY = "Intel IPMI Providers" DESCRIPTION = "IPMI Provider Libraries" -SRC_URI = "git://github.com/Intel-BMC/intel-ipmi-providers;protocol=ssh" +SRC_URI = "git://git@github.com/Intel-BMC/intel-ipmi-providers;protocol=ssh" SRCREV = "3f8aa7959d2e8475e50743d32ff178257aafc1e7" S = "${WORKDIR}/git" diff --git a/meta-openbmc-mods/meta-common/recipes-core/os-release/os-release.bbappend b/meta-openbmc-mods/meta-common/recipes-core/os-release/os-release.bbappend index 584d3b645..059931ed2 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/os-release/os-release.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-core/os-release/os-release.bbappend @@ -5,60 +5,9 @@ # and pasting into another recipe ensure it is understood # what that means! -def irun_git(d, oeroot, git_cmd, **kwargs): - err = None - try: - cmd = 'git --work-tree {} --git-dir {}/.git {}'.format(oeroot, oeroot, git_cmd) - ret, err = bb.process.run(cmd, **kwargs) - if err is not None: - ret += err - except bb.process.ExecutionError as e: - ret = '' - if e.stdout is not None: - ret += e.stdout - if e.stderr is not None: - ret += e.stderr - except Exception as e: - ret = str(e) - return ret.strip('\n') +require version-vars.inc -def repo_status(d, f, repo, tagargs): - import subprocess - - cmd_list = [['HEAD', 'rev-parse HEAD'], - ['TAG', 'describe {} --dirty --long'.format(tagargs)], - ['STATUS', 'status -sb']] - - f.write(('\n# REPOSITORY: {} '.format(os.path.basename(repo))).ljust(80, '+') + '\n') - for item in cmd_list: - f.write('# {}: '.format(item[0])) - sb = irun_git(d, repo, item[1]) - if sb: - sb_lines = sb.split('\n') - if len(sb_lines) == 1: - f.write(sb_lines[0]) - else: - f.write('\n# ' + '\n# '.join(sb_lines)) - f.write('\n') - -python() { - corebase = d.getVar('COREBASE', True) - mibase = os.path.join(corebase, 'meta-openbmc-mods') - obmc_vers = irun_git(d, corebase, 'describe --dirty --long') - meta_vers = irun_git(d, mibase, 'rev-parse HEAD')[0:7] - version_id = '{}-{}'.format(obmc_vers, meta_vers) - if version_id: - d.setVar('VERSION_ID', version_id) - versionList = version_id.split('-') - version = '{}-{}'.format(versionList[0], versionList[1]) - d.setVar('VERSION', version) - - build_id = irun_git(d, corebase, 'describe --abbrev=0') - if build_id: - d.setVar('BUILD_ID', build_id) -} - -OS_RELEASE_FIELDS_append = " BUILD_ID" +OS_RELEASE_FIELDS_append = " OPENBMC_VERSION IPMI_MAJOR IPMI_MINOR IPMI_AUX13 IPMI_AUX14 IPMI_AUX15 IPMI_AUX16" python do_compile_append () { import glob @@ -80,6 +29,7 @@ python do_compile_append () { # Ensure the git commands run every time bitbake is invoked. BB_DONT_CACHE = "1" +do_compile[nostamp]="1" # Make os-release available to other recipes. SYSROOT_DIRS_append = " ${sysconfdir}" diff --git a/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc b/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc new file mode 100644 index 000000000..b6a2504a2 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/os-release/version-vars.inc @@ -0,0 +1,78 @@ +def irun_git(d, oeroot, git_cmd, **kwargs): + err = None + try: + cmd = 'git --work-tree {} --git-dir {}/.git {}'.format(oeroot, oeroot, git_cmd) + ret, err = bb.process.run(cmd, **kwargs) + if err is not None: + ret += err + except bb.process.ExecutionError as e: + ret = '' + if e.stdout is not None: + ret += e.stdout + if e.stderr is not None: + ret += e.stderr + except Exception as e: + ret = str(e) + return ret.strip('\n') + +def repo_status(d, f, repo, tagargs): + import subprocess + + cmd_list = [['HEAD', 'rev-parse HEAD'], + ['TAG', 'describe {} --dirty --long'.format(tagargs)], + ['STATUS', 'status -sb']] + + f.write(('\n# REPOSITORY: {} '.format(os.path.basename(repo))).ljust(80, '+') + '\n') + for item in cmd_list: + f.write('# {}: '.format(item[0])) + sb = irun_git(d, repo, item[1]) + if sb: + sb_lines = sb.split('\n') + if len(sb_lines) == 1: + f.write(sb_lines[0]) + else: + f.write('\n# ' + '\n# '.join(sb_lines)) + f.write('\n') + +python() { + import re + + gen = d.getVar('PRODUCT_GENERATION', True) + if gen is None: + gen = 'unknown' + + corebase = d.getVar('COREBASE', True) + mibase = os.path.join(corebase, 'meta-openbmc-mods') + obmc_vers = irun_git(d, corebase, 'describe --dirty --long') + if obmc_vers is None: + raise bb.build.FuncFailed("Missing version tag for openbmc-openbmc") + d.setVar('OPENBMC_VERSION', obmc_vers) + + obmc_hash = irun_git(d, corebase, 'rev-parse HEAD') + meta_vers = irun_git(d, mibase, + 'describe --long --abbrev=6 ' + + '--match \'{}-[0-9]*\.[0-9]*\''.format(gen)) + + # Until tags in meta-openbmc-mods, interim measure keep builds working. + if meta_vers.startswith('fatal:'): + meta_vers = '{}-0.0-0'.format(gen) + + meta_hash = irun_git(d, mibase, 'rev-parse HEAD') + version_id = '{}-{}'.format(meta_vers, obmc_hash[0:7]) + if version_id: + d.setVar('VERSION_ID', version_id) + versionList = version_id.split('-') + versionList = re.split('-|\.', version_id) + version = '{}.{}-{}'.format(versionList[0], versionList[1], versionList[2]) + d.setVar('VERSION', version) + d.setVar('IPMI_MAJOR', versionList[1]) + d.setVar('IPMI_MINOR', versionList[2]) + d.setVar('IPMI_AUX13', hex(int(versionList[3]))) + d.setVar('IPMI_AUX14', '0x{}'.format(meta_hash[0:2])) + d.setVar('IPMI_AUX15', '0x{}'.format(meta_hash[2:4])) + d.setVar('IPMI_AUX16', '0x{}'.format(meta_hash[4:6])) + + build_id = irun_git(d, mibase, 'describe --abbrev=0') + if build_id: + d.setVar('BUILD_ID', build_id) +} diff --git a/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb b/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb index 506484311..d66a14281 100644 --- a/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb +++ b/meta-openbmc-mods/meta-common/recipes-core/peci-pcie/peci-pcie_git.bb @@ -5,12 +5,12 @@ LICENSE = "CLOSED" LIC_FILES_CHKSUM = "" inherit cmake systemd -SRC_URI = "git://github.com/Intel-BMC/at-scale-debug;protocol=ssh" +SRC_URI = "git://git@github.com/Intel-BMC/at-scale-debug;protocol=ssh" DEPENDS = "boost sdbusplus crashdump" PV = "0.1+git${SRCPV}" -SRCREV = "acf016bebe2cada610eb4aab7b97fdcd03e2200d" +SRCREV = "0536b8cc3591a310ab36d145540811c728f8ef60" S = "${WORKDIR}/git/peci_pcie" -- cgit v1.2.3