Compare commits

..

No commits in common. "rawhide" and "f37" have entirely different histories.

11 changed files with 144 additions and 104 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

2
.gitignore vendored
View file

@ -2,5 +2,3 @@ yasm-1.0.1.tar.gz
yasm-1.1.0.tar.gz
/yasm-1.2.0.tar.gz
/yasm-1.3.0.tar.gz
/yasm-9defefa.tar.gz
/yasm-121ab15.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

19
gating.yaml Normal file
View file

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

View file

@ -1 +1 @@
SHA512 (yasm-121ab15.tar.gz) = e005153fc14b2131c828848a4026ad7f7982ac611bc0848c6cf2cb4fdeeed91efcffde9b4a6dc4e968f32afff4517620b5157b1cefe418366200bcb05e839b81
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,15 +0,0 @@
diff -up yasm-9defefae9fbcb6958cddbfa778c1ea8605da8b8b/libyasm/bitvect.h.gcc15 yasm-9defefae9fbcb6958cddbfa778c1ea8605da8b8b/libyasm/bitvect.h
--- yasm-9defefae9fbcb6958cddbfa778c1ea8605da8b8b/libyasm/bitvect.h.gcc15 2023-09-22 07:21:20.000000000 +0200
+++ yasm-9defefae9fbcb6958cddbfa778c1ea8605da8b8b/libyasm/bitvect.h 2025-02-15 22:14:50.029332956 +0100
@@ -83,7 +83,11 @@ typedef Z_longword *Z_longwordp
#ifdef MACOS_TRADITIONAL
#define boolean Boolean
#else
+ #if __STDC_VERSION__ < 202311L
typedef enum boolean { false = FALSE, true = TRUE } boolean;
+ #else
+ typedef bool boolean;
+ #endif
#endif
#endif

View file

@ -1,8 +0,0 @@
diff -up yasm-9defefae9fbcb6958cddbfa778c1ea8605da8b8b/modules/objfmts/macho/tests/nasm64/Makefile.inc.orig yasm-9defefae9fbcb6958cddbfa778c1ea8605da8b8b/modules/objfmts/macho/tests/nasm64/Makefile.inc
--- yasm-9defefae9fbcb6958cddbfa778c1ea8605da8b8b/modules/objfmts/macho/tests/nasm64/Makefile.inc.orig 2023-09-22 07:21:20.000000000 +0200
+++ yasm-9defefae9fbcb6958cddbfa778c1ea8605da8b8b/modules/objfmts/macho/tests/nasm64/Makefile.inc 2024-03-22 12:07:58.945545848 +0100
@@ -1,4 +1,3 @@
-TESTS += modules/objfmts/macho/tests/nasm64/macho64_test.sh
EXTRA_DIST += modules/objfmts/macho/tests/nasm64/nasm-macho64-pic.asm
EXTRA_DIST += modules/objfmts/macho/tests/nasm64/nasm-macho64-pic.hex

View file

@ -1,38 +1,21 @@
%global git 1
%global commit 121ab150b3577b666c79a79f4a511798d7ad2432
%global date 20250625
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Summary: Modular Assembler
Name: yasm
Version: 1.3.0^%{date}git%{shortcommit}
Release: 5%{?dist}
Version: 1.3.0
Release: 16%{?dist}
# See COPYING for the detail, there is quite a lot!
# Bitvect is (GPL-1.0-or-later AND GPL-2.0-or-later OR Artistic-1.0-Perl OR LGPL-2.0-or-later
# Everything else is BSD. Either 2 or 3 clause.
License: BSD-2-Clause AND BSD-3-Clause AND (GPL-1.0-or-later AND GPL-2.0-or-later OR Artistic-1.0-Perl OR LGPL-2.0-or-later)
License: BSD and (GPLv2+ or Artistic or LGPLv2+) and LGPLv2
URL: http://yasm.tortall.net/
%if 0%{?git}
Source: https://github.com/yasm/yasm/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
# https://github.com/yasm/yasm/issues/270
Patch0: yasm-tests.patch
# https://github.com/yasm/yasm/issues/283
Patch1: yasm-gcc15.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: python3
%else
Source: http://www.tortall.net/projects/yasm/releases/yasm-%{version}.tar.gz
%endif
Patch1: 0001-Update-elf-objfmt.c.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: bison
BuildRequires: byacc
BuildRequires: gettext-devel
BuildRequires: xmlto
Provides: bundled(md5-plumb)
Provides: deprecated()
%description
Yasm is a complete rewrite of the NASM assembler under the "new" BSD License
@ -60,31 +43,20 @@ Install this package if you need to rebuild applications that use yasm.
%prep
%if 0%{?git}
%setup -q -n %{name}-%{commit}
%ifarch i686
%patch 0 -p1
%endif
%patch 1 -p1
autoreconf -I m4 -fiv
%else
%setup -q
%endif
%patch1 -p1
%build
%configure
%make_build
make %{?_smp_mflags}
%install
%make_install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%check
# tests must be run sequentially
# https://github.com/yasm/yasm/issues/269
make check
%files
%license Artistic.txt BSD.txt COPYING GNU_GPL-2.0 GNU_LGPL-2.0
@ -103,47 +75,6 @@ make check
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0^20250625git121ab15-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0^20250625git121ab15-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Thu Aug 07 2025 Dominik Mierzejewski <dominik@greysector.net> - 1.3.0^20250625git121ab15-3
- mark as deprecated, see https://fedoraproject.org/wiki/Changes/DeprecateYASM
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0^20250625git121ab15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Sat Feb 15 2025 Dominik Mierzejewski <dominik@greysector.net> - 1.3.0^20250625git121ab15-1
- update to git 121ab15
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0^20230922git9defefa-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
- fix build with GCC 15
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0^20230922git9defefa-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Thu Mar 21 2024 Dominik Mierzejewski <dominik@greysector.net> - 1.3.0^20230922git9defefa-1
- update to latest git snapshot
- drop obsolete patch
- use modern macros
- run the test suite in %check
- fixes: CVE-2023-37732 CVE-2023-31975 CVE-2021-33454
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Nov 22 2023 Nick Clifton <nickc@redhat.com> - 1.3.0-19
- Spec File: Migrated to SPDX license. (#2222115)
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild