Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/binutils.git#88880dcb0579533015ebfa0bdbb2ae5999b9f6e0
This commit is contained in:
DistroBaker 2021-01-25 21:50:22 +00:00
parent 2f52d0f6d8
commit c7e460b189
10 changed files with 404 additions and 1 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,24 @@
--- binutils.orig/bfd/dwarf2.c 2021-01-25 11:26:26.761405305 +0000
+++ binutils-2.35.1/bfd/dwarf2.c 2021-01-25 11:28:51.838572824 +0000
@@ -3252,9 +3252,11 @@ read_rnglists (struct comp_unit *unit, s
low_pc = base_address;
low_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read,
FALSE, rngs_end);
+ rngs_ptr += bytes_read;
high_pc = base_address;
high_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read,
FALSE, rngs_end);
+ rngs_ptr += bytes_read;
break;
case DW_RLE_start_end:
@@ -3274,9 +3276,6 @@ read_rnglists (struct comp_unit *unit, s
return FALSE;
}
- if ((low_pc == 0 && high_pc == 0) || low_pc == high_pc)
- return FALSE;
-
if (!arange_add (unit, arange, low_pc, high_pc))
return FALSE;
}

View File

@ -39,7 +39,7 @@
Summary: A GNU collection of binary utilities
Name: binutils%{?name_cross}%{?_with_debug:-debug}
Version: 2.35.1
Release: 24%{?dist}
Release: 25%{?dist}
License: GPLv3+
URL: https://sourceware.org/binutils
@ -316,6 +316,10 @@ Patch31: binutils-gas-auto-dwarf-5.patch
# Lifetime: Fixed in 2.36
Patch32: binutils-gold-gnu-properties.patch
# Purpose: Update the BFD library to handle DWARF-5 line number ranges.
# Lifetime: Fixed in 2.36
Patch33: binutils-DWARF-5-line-number-parsing.patch
#----------------------------------------------------------------------------
Provides: bundled(libiberty)
@ -900,6 +904,9 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Mon Jan 25 2021 Nick Clifton <nickc@redhat.com> - 2.35.1-25
- Update the BFD library to handle DWARF-5 line number ranges.
* Thu Jan 21 2021 Nick Clifton <nickc@redhat.com> - 2.35.1-24
- Update the GOLD linker to handle x86 .note.gnu.property sections. (#1916925)

14
gating.yaml Normal file
View File

@ -0,0 +1,14 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

6
plans/ci.fmf Normal file
View File

@ -0,0 +1,6 @@
summary: CI Gating Plan
discover:
how: fmf
directory: tests
execute:
how: beakerlib

2
tests/README Normal file
View File

@ -0,0 +1,2 @@
The test's Makefiles are not used in Fedora CI infrastructure. But are kept here
for backward compatibility with traditional beakerlib test harness in RHEL.

View File

@ -0,0 +1,67 @@
# Copyright (c) 2009, 2012 Red Hat, Inc. All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Rebuild kernel, install it, reboot, and check if we're running the correct
# kernel. Tailored specificaly for binutils buildroot testing process.
#
# Author: Milos Prchlik <mprchlik@redhat.com>
#
# Based on gcc/Sanity/rebuild-kernel by:
# Author: Michal Nowak <mnowak@redhat.com>
# Author: Marek Polacek <polacek@redhat.com>
export TEST=/tools/binutils/Sanity/rebuild-kernel-and-reboot
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x ./runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Milos Prchlik <mprchlik@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Description: Rebuild kernel, install it, reboot, and check if we're running the correct kernel" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 20h" >> $(METADATA)
@echo "RunFor: binutils" >> $(METADATA)
@echo "Requires: binutils" >> $(METADATA)
@echo "Requires: gcc" >> $(METADATA)
@echo "Requires: yum-utils rng-tools" >> $(METADATA)
@echo "Requires: rpm-build" >> $(METADATA)
@echo "Requires: newt-devel python-devel perl-ExtUtils-Embed unifdef elfutils-libelf-devel" >> $(METADATA)
@echo "Requires: elfutils-devel pciutils-devel" >> $(METADATA)
@echo "Requires: wget hmaccalc binutils-devel glibc-static texinfo gdb ecj gcc-java ppl-devel cloog-ppl-devel graphviz gmp-devel mpfr-devel" >> $(METADATA)
@echo "Requires: xmlto asciidoc net-tools pesign" >> $(METADATA)
@echo "License: GPLv3+" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,20 @@
Rebuild kernel, install it, reboot, and check if we're running the correct
kernel. Tailored specificaly for binutils buildroot testing process.
Author: Milos Prchlik <mprchlik@redhat.com>
Based on gcc/Sanity/rebuild-kernel by:
Author: Michal Nowak <mnowak@redhat.com>
Author: Marek Polacek <polacek@redhat.com>
Using MACHINE_SET__STRONG host-filter for this test, by setting the "hardware"
section in TCMS properly. That has several effects:
- kernel rebuild is very resoruce-intensive task, and having more powerful
boxes for it is simply good,
- this task will get its own boxes, not clobbered by additional kernel packages
that are usually installed by other tasks in the same run. E.g.kernel-debuginfo,
when installed, will conflict with freshly build kernel packages. This should
workaround such situations,
- this tasks reboots its boxes - should such reboot break something, don't ruin
the whole run by it, right?

View File

@ -0,0 +1,62 @@
summary: Rebuild kernel, install it, reboot, and check if we're running the correct
kernel
description: |
Rebuild kernel, install it, reboot, and check if we're running the correct
kernel. Tailored specificaly for binutils buildroot testing process.
Author: Milos Prchlik <mprchlik@redhat.com>
Based on gcc/Sanity/rebuild-kernel by:
Author: Michal Nowak <mnowak@redhat.com>
Author: Marek Polacek <polacek@redhat.com>
Using MACHINE_SET__STRONG host-filter for this test, by setting the "hardware"
section in TCMS properly. That has several effects:
- kernel rebuild is very resoruce-intensive task, and having more powerful
boxes for it is simply good,
- this task will get its own boxes, not clobbered by additional kernel packages
that are usually installed by other tasks in the same run. E.g.kernel-debuginfo,
when installed, will conflict with freshly build kernel packages. This should
workaround such situations,
- this tasks reboots its boxes - should such reboot break something, don't ruin
the whole run by it, right?
contact:
- Milos Prchlik <mprchlik@redhat.com>
component:
- binutils
test: ./runtest.sh
framework: beakerlib
recommend:
- binutils
- gcc
- yum-utils
- rng-tools
- rpm-build
- newt-devel
- python-devel
- perl-ExtUtils-Embed
- unifdef
- elfutils-libelf-devel
- elfutils-devel
- pciutils-devel
- wget
- hmaccalc
- binutils-devel
- glibc-static
- texinfo
- gdb
- ecj
- gcc-java
- ppl-devel
- cloog-ppl-devel
- graphviz
- gmp-devel
- mpfr-devel
- xmlto
- asciidoc
- net-tools
- pesign
duration: 20h
extra-summary: /tools/binutils/Sanity/rebuild-kernel-and-reboot
extra-task: /tools/binutils/Sanity/rebuild-kernel-and-reboot

View File

@ -0,0 +1,200 @@
#!/bin/bash
# Copyright (c) 2009, 2012 Red Hat, Inc. All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Rebuild kernel, install it, reboot, and check if we're running the correct
# kernel. Tailored specificaly for binutils buildroot testing process.
#
# Author: Milos Prchlik <mprchlik@redhat.com>
#
# Based on gcc/Sanity/rebuild-kernel by:
# Author: Michal Nowak <mnowak@redhat.com>
# Author: Marek Polacek <polacek@redhat.com>
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
export AVC_ERROR='+no_avc_check'
case "$JUST_BUILD" in
0|[Ff][Aa][Ll][Ss][Ee]|[Nn][Oo])
JUST_BUILD=no
;;
*)
JUST_BUILD=yes
;;
esac
LD="${LD:-$(which ld)}"
GCC="${GCC:-$(which gcc)}"
PACKAGE="${PACKAGE:-$(rpm --qf '%{name}\n' -qf $(which $LD) | head -1)}"
GCC_PACKAGE="${GCC_PACKAGE:-$(rpm --qf '%{name}\n' -qf $(which $GCC) | head -1)}"
PACKAGES="${PACKAGES:-$PACKAGE}"
# Kernel package - usualy "kernel", but some trees may use different package
# name (e.g. kernel-PAE).
KERNEL="${KERNEL:-kernel}"
REQUIRES="${REQUIRES:-$KERNEL $GCC_PACKAGE glibc}"
RPM_BUILD_ID="${RPM_BUILD_ID:-.LimeKitten}"
# Workaround possible restraint issues - restraint may fail to set REBOOTCOUNT properly.
REBOOT_FLAG=/.rebuild-kernel-and-reboot.flag
REBOOTCOUNT="${REBOOTCOUNT:-0}"
unset ARCH
rlJournalStart
rlPhaseStartSetup
rlLogInfo "PACKAGES=$PACKAGES"
rlLogInfo "KERNEL=$KERNEL"
rlLogInfo "REQUIRES=$REQUIRES"
rlLogInfo "JUST_BUILD=$JUST_BUILD"
rlLogInfo "COLLECTIONS=$COLLECTIONS"
rlLogInfo "SKIP_COLLECTION_METAPACKAGE_CHECK=$SKIP_COLLECTION_METAPACKAGE_CHECK"
# We'll use a lot of disk space (tens of GBs at least). The root FS
# often is the most beefy one in CI environemnts. Let's use it but also
# let's log what's actually available.
export TMPDIR=/test_tmp_root
rlRun "mkdir -p $TMPDIR"
rlLogInfo "TMPDIR=$TMPDIR"
rlLogInfo 'Disk space:'
df -h | while read line; do
rlLogInfo " $line"
done
# We optionally need to skip checking for the presence of the metapackage
# because that would pull in all the dependent toolset subrpms. We do not
# always want that, especially in CI.
_COLLECTIONS="$COLLECTIONS"
if ! test -z $SKIP_COLLECTION_METAPACKAGE_CHECK; then
for c in $SKIP_COLLECTION_METAPACKAGE_CHECK; do
rlLogInfo "ignoring metapackage check for collection $c"
export COLLECTIONS=$(shopt -s extglob && echo ${COLLECTIONS//$c/})
done
fi
rlLogInfo "(without skipped) COLLECTIONS=$COLLECTIONS"
rlAssertRpm --all
export COLLECTIONS="$_COLLECTIONS"
rlRun "AFTER_REBOOT=no"
if [ "$REBOOTCOUNT" != "0" ]; then
rlLogInfo "Reboot count envvar is non-zero, update our flag"
rlRun "AFTER_REBOOT=yes"
elif [ -f "$REBOOT_FLAG" ]; then
rlLogInfo "FS reboot flag exists, update our flag"
rlRun "AFTER_REBOOT=yes"
fi
if [ "$AFTER_REBOOT" = "no" ]; then
# We optionally need to skip checking for the presence of the metapackage
# because that would pull in all the dependent toolset subrpms. We do not
# always want that, especially in CI.
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
# Speed up keygen.
rlRun "rngd -r /dev/hwrandom || rngd -r /dev/urandom"
# Get the SRPM.
rlFetchSrcForInstalled "$KERNEL"
rlRun "SRPM=`find . -name '*.src.rpm'`"
rlRun "SPECDIR=`rpm --define=\"_topdir $TmpDir\" --eval=%_specdir`"
rlRun "rpm -ivh --define=\"_topdir $TmpDir\" $SRPM"
rlRun "SPECFILE=`find $SPECDIR/ -name '*.spec'`"
builddep_options="--nobest"
rlRun "yum-builddep -y $builddep_options $SPECFILE"
fi
rlPhaseEnd
if [ "$AFTER_REBOOT" = "no" ]; then
rlPhaseStartTest "Build"
if [ "$RPM_BUILD_ID" != "" ]; then
rlRun "sed -i \"s/# % define buildid .local/%define buildid $RPM_BUILD_ID/\" $SPECFILE"
rlRun "sed -i \"s/# define buildid .local/%define buildid $RPM_BUILD_ID/\" $SPECFILE"
fi
if [ "`rlGetPrimaryArch`" == "ppc64" ]; then
TARGET="--target=ppc64"
else
TARGET="--target=$(uname -m)"
fi
if rlRun "CC=$GCC rpmbuild --define=\"_topdir $TmpDir\" -bb $TARGET --clean $SPECFILE &> BUILD_LOG"; then
rlRun "RPMBUILD_OK=yes"
else
rlLogInfo "rpmbuild kernel failed"
rlRun "RPMBUILD_OK=no"
fi
rlBundleLogs "Build-log" BUILD_LOG
rlPhaseEnd
# Install and boot the new kernel only if it's requested *and* the build was successful
if [ "$JUST_BUILD" = 'no' ] && [ "$RPMBUILD_OK" = "yes" ]; then
rlPhaseStartTest "Install"
RPMS="$(ls -1 $TmpDir/RPMS/*/*.rpm | grep -v kernel-selftests-internal | tr '\n' ' ')"
rlRun "yum localinstall -y --disablerepo=\* $RPMS"
rlLogInfo "$(rpm -qa | grep kernel | sort)"
# Update the boot configuration
if [ "$(arch)" = "s390x" ]; then
rlRun "grubby --info=ALL"
rlLogInfo "Default kernel is $(grubby --default-kernel), index $(grubby --default-index)"
rlRun "KERNEL_FILE=$(ls -1 /boot/vmlinuz-*${RPM_BUILD_ID}.$(arch))"
rlRun "ls -al $KERNEL_FILE"
rlRun "grubby --set-default $KERNEL_FILE"
rlLogInfo "Default kernel is $(grubby --default-kernel), index $(grubby --default-index)"
rlRun "zipl"
else
rlRun "grub2-set-default 2"
fi
rlPhaseEnd
rlPhaseStartTest "Reboot"
rlRun "touch $REBOOT_FLAG"
rlLog "Rebooting ..."
rhts-reboot
rlPhaseEnd
fi
fi
# Verify the build ID only if its install and boot were requested
if [ "$JUST_BUILD" = 'no' ]; then
rlPhaseStartTest "Test"
if ! [ "$AFTER_REBOOT" = 'yes' ]; then
rlFail 'Not rebooted. Probably rhts-reboot did not work.'
fi
rlLogInfo "$(uname -a)"
rlRun "uname -r | grep $RPM_BUILD_ID"
rlPhaseEnd
fi
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
rlJournalEnd