Compare commits

...

No commits in common. "c8" and "c9s" have entirely different histories.
c8 ... c9s

10 changed files with 157 additions and 6 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

5
.gitignore vendored
View File

@ -1 +1,4 @@
SOURCES/yasm-1.3.0.tar.gz
yasm-1.0.1.tar.gz
yasm-1.1.0.tar.gz
/yasm-1.2.0.tar.gz
/yasm-1.3.0.tar.gz

View File

@ -1 +1 @@
b7574e9f0826bedef975d64d3825f75fbaeef55e SOURCES/yasm-1.3.0.tar.gz
b7574e9f0826bedef975d64d3825f75fbaeef55e yasm-1.3.0.tar.gz

View File

@ -0,0 +1,32 @@
From c7d58a55ace0fe4233aac8dc335bea0745ef7dd9 Mon Sep 17 00:00:00 2001
From: kalebskeithley <kaleb@redhat.com>
Date: Thu, 21 May 2020 09:12:36 -0400
Subject: [PATCH] Update elf-objfmt.c
tl;dnr: add support for note.gnu.property note sections.
ceph has a few optimized crc32 routines hand written in assembly in yasm format. (Nobody appears to have the stomach for rewriting them in another format.) Fedora requires that libraries be CET enabled. IOW all .o comprising a shared library need a note.gnu.properties NOTE section with some magic bits that tell the linker that the .o was compiled with the appropriate options.
I can add such a note section, but without this change yasm will not set the correct section flag and I have to resort to some dd magic to set the correct section type before linking all the .o files into the shlib.
---
modules/objfmts/elf/elf-objfmt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/objfmts/elf/elf-objfmt.c b/modules/objfmts/elf/elf-objfmt.c
index 0c3a1426..c4360c03 100644
--- a/modules/objfmts/elf/elf-objfmt.c
+++ b/modules/objfmts/elf/elf-objfmt.c
@@ -1077,6 +1077,10 @@ elf_objfmt_section_switch(yasm_object *object, yasm_valparamhead *valparams,
align = 0;
data.type = SHT_PROGBITS;
data.flags = 0;
+ } else if (strcmp(sectname, ".note.gnu.property") == 0) {
+ align = 8;
+ data.type = SHT_NOTE;
+ data.flags = 0;
} else {
/* Default to code */
align = 1;
--
2.26.2

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.other.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

1
sources Normal file
View File

@ -0,0 +1 @@
fc9e586751ff789b34b1f21d572d96af yasm-1.3.0.tar.gz

View File

@ -0,0 +1,17 @@
summary: testsuite
description: ''
contact: Martin Cermak <mcermak@redhat.com>
component:
- yasm
test: ./runtest.sh
framework: beakerlib
recommend:
- yasm
- bison
- byacc
- gettext-devel
- xmlto
- rpm-build
duration: 48h
extra-summary: /tools/yasm/Regression/testsuite
extra-task: /tools/yasm/Regression/testsuite

View File

@ -0,0 +1,59 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/yasm/Regression/testsuite
# Description: testsuite
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# 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 2 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/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="yasm"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TMP=\$(mktemp -d)"
rlRun "pushd $TMP"
rlFetchSrcForInstalled $PACKAGE
rlRun "dnf builddep -y *src.rpm --nobest"
rlRun "rpm --define='_topdir $TMP' -Uvh *src.rpm"
rlRun "rpmbuild --define='_topdir $TMP' -bc SPECS/yasm.spec"
rlRun "pushd BUILD/yasm-*"
rlPhaseEnd
rlPhaseStartTest
rlRun "make check |& tee test.log"
rlRun "PASS=$(awk '/# PASS:/ {print $3}' test.log)"
rlRun "FAIL=$(awk '/# FAIL:/ {print $3}' test.log)"
rlRun "test $PASS -ge 44"
rlRun "test $FAIL -eq 0"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd; popd"
rlRun "rm -r $TMP"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -1,13 +1,16 @@
Summary: Modular Assembler
Name: yasm
Version: 1.3.0
Release: 7%{?dist}
Release: 15%{?dist}
# See COPYING for the detail, there is quite a lot!
License: BSD and (GPLv2+ or Artistic or LGPLv2+) and LGPLv2
URL: http://yasm.tortall.net/
Source: http://www.tortall.net/projects/yasm/releases/yasm-%{version}.tar.gz
Patch1: 0001-Update-elf-objfmt.c.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: bison
BuildRequires: byacc
BuildRequires: gettext-devel
@ -41,6 +44,7 @@ Install this package if you need to rebuild applications that use yasm.
%prep
%setup -q
%patch1 -p1
%build
@ -53,9 +57,6 @@ rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%clean
rm -rf %{buildroot}
%files
%license Artistic.txt BSD.txt COPYING GNU_GPL-2.0 GNU_LGPL-2.0
@ -74,6 +75,31 @@ rm -rf %{buildroot}
%changelog
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.3.0-15
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.3.0-14
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild