From 184da4d0a10cc4e6cb7f519e3d8fe6fac298df30 Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 8 Aug 2022 14:11:07 -0400 Subject: [PATCH] Import rpm: 62568a54f56c6a78e4ccf9c408976c5abc68209e --- .gitignore | 1 + README.rst | 18 +++++ gating.yaml | 8 +++ sgabios-hostcc.patch | 19 ++++++ sgabios.spec | 159 +++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 6 files changed, 206 insertions(+) create mode 100644 .gitignore create mode 100644 README.rst create mode 100644 gating.yaml create mode 100644 sgabios-hostcc.patch create mode 100644 sgabios.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d672d24 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/sgabios-20170427-gitcbaee52.tar.xz diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..c10d5c8 --- /dev/null +++ b/README.rst @@ -0,0 +1,18 @@ +=================== +sgabios development +=================== + +sgabios is maintained in a `source tree`_ rather than directly in dist-git +using packit service that provides way to develope using regular source code +structure and provides way to generate SRPM and build using koji service. + +Developers deliver all changes to source-git using merge request. Only maintainers +will be pushing changes sent to source-git to dist-git. + +Each release in dist-git is tagged in the source repository so you can easily +check out the source tree for a build. The tags are in the format +name-version-release, but note release doesn't contain the dist tag since the +source can be built in different build roots (Fedora, CentOS, etc.) + +.. _source tree: https://gitlab.com/redhat/centos-stream/src/sgabios + diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..3279454 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,8 @@ +# recipients: kvmqe-ci, yfu, xuwei +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +subject_type: brew-build +rules: + - !PassingTestCaseRule {test_case_name: kvm-ci.sgabios.x86_64.brew-build.gating.tier1.functional} diff --git a/sgabios-hostcc.patch b/sgabios-hostcc.patch new file mode 100644 index 0000000..3d91b52 --- /dev/null +++ b/sgabios-hostcc.patch @@ -0,0 +1,19 @@ +--- a/Makefile ++++ b/Makefile +@@ -30,6 +30,7 @@ + LDSCRIPT := rom16.ld + LDFLAGS := -T $(LDSCRIPT) -nostdlib + OBJCOPY := objcopy ++HOSTCC := $(CC) + + ASRCS = sgabios.S + +@@ -55,7 +56,7 @@ + $(LD) $(LDFLAGS) $(OBJS) -o $@ + + csum8: csum8.c +- $(CC) -Wall -O2 -o $@ $< ++ $(HOSTCC) -Wall -O2 -o $@ $< + + sgabios.o: buildinfo + diff --git a/sgabios.spec b/sgabios.spec new file mode 100644 index 0000000..9f6c4a2 --- /dev/null +++ b/sgabios.spec @@ -0,0 +1,159 @@ +%if 0%{?fedora} +%define cross 1 +%endif + +%global hash cbaee52 +%global date 20170427 + + +Name: sgabios +Epoch: 1 +Version: 0.%{date}git +Release: 3%{?dist} +Summary: Serial graphics BIOS option rom + +Group: Applications/Emulators +License: ASL 2.0 +URL: https://github.com/qemu/sgabios +# There are no upstream releases. This archive is prepared as follows: +# +# git clone https://github.com/qemu/sgabios +# cd sgabios +# hash=`git log -1 --format='%h'` +# date=`git log -1 --format='%cd' --date=short | tr -d -` +# git archive --prefix sgabios-${date}-git${hash}/ ${hash} | xz -7e > ../openbios-${date}-git${hash}.tar.xz +Source0: sgabios-%{date}-git%{hash}.tar.xz +Patch0: sgabios-hostcc.patch + +%if 0%{?cross} +BuildRequires: binutils-x86_64-linux-gnu gcc-x86_64-linux-gnu +Buildarch: noarch +%else +ExclusiveArch: %{ix86} x86_64 +%endif + +Requires: %{name}-bin = %{epoch}:%{version}-%{release} + +# Sgabios is noarch, but required on architectures which cannot build it. +# Disable debuginfo because it is of no use to us. +%global debug_package %{nil} + +%description +SGABIOS is designed to be inserted into a BIOS as an option rom to provide over +a serial port the display and input capabilities normally handled by a VGA +adapter and a keyboard, and additionally provide hooks for logging displayed +characters for later collection after an operating system boots. + + +%package bin +Summary: Sgabios for x86 +Buildarch: noarch + +%description bin +SGABIOS is designed to be inserted into a BIOS as an option rom to provide over +a serial port the display and input capabilities normally handled by a VGA +adapter and a keyboard, and additionally provide hooks for logging displayed +characters for later collection after an operating system boots. + + +%prep +%setup -q -n sgabios-%{date}-git%{hash} +%autopatch + + +%build +unset MAKEFLAGS +make \ + HOSTCC=gcc \ +%if 0%{?cross} + CC=x86_64-linux-gnu-gcc \ + AS=x86_64-linux-gnu-as \ + LD=x86_64-linux-gnu-ld \ + OBJCOPY=x86_64-linux-gnu-objcopy \ + OBJDUMP=x86_64-linux-gnu-objdump +%endif + + +%install +mkdir -p $RPM_BUILD_ROOT%{_datadir}/sgabios +install -m 0644 sgabios.bin $RPM_BUILD_ROOT%{_datadir}/sgabios + + +%files +%doc COPYING design.txt + + +%files bin +%dir %{_datadir}/sgabios/ +%{_datadir}/sgabios/sgabios.bin + + +%changelog +* Fri Jun 28 2019 Danilo de Paula - 1:0.20170427git-3 +- Rebuild all virt packages to fix RHEL's upgrade path +- Resolves: rhbz#1695587 + (Ensure modular RPM upgrade path) + +* Wed Jun 27 2018 Danilo de Paula - 1:0.20170427git-2 +- Trigger a new sgabios build + +* Sun Mar 25 2018 Cole Robinson - 1:0.20170427git-1 +- Switch to qemu sgabios repo, which has an extra bugfix + +* Fri Feb 09 2018 Fedora Release Engineering - 1:0.20110622svn-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Nov 22 2017 Paolo Bonzini - 1:0.20110622svn-12 +- Allow disabling cross-compilation + +* Thu Jul 27 2017 Fedora Release Engineering - 1:0.20110622svn-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1:0.20110622svn-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 1:0.20110622svn-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 1:0.20110622svn-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 1:0.20110622svn-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 1:0.20110622svn-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 1:0.20110622svn-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Dec 6 2012 Peter Robinson 1:0.20110622svn-3 +- Root sgabios package is noarch too because it only contains docs + +* Thu Oct 25 2012 Paolo Bonzini - 1:0.20110622svn-2 +- Cross compile (fixes bug #869876). + +* Wed Oct 17 2012 Cole Robinson - 1:0.20110622svn-2 +- Fix deps with epoch bump + +* Mon Oct 15 2012 Paolo Bonzini - 1:0.20110622svn-1 +- Move date from release to version (requires epoch bump). + +* Sun Aug 12 2012 Richard W.M. Jones - 0-1.1.20110622svn +- Fix date in release string. + NB: To make this version > than the previous, I had to use 1.1.20110622 + instead of 0.1.20110622, since the old second field was 20110623. +- Unset MAKEFLAGS, since parallel make breaks the build. +- Bring the spec file up to modern standards. + +* Sat Jul 21 2012 Fedora Release Engineering - 0-0.20110623SVN +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 0-0.20110622SVN +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Nov 21 2011 Justin M. Forbes 0.0-0.20110621SVN +- Updates per review. + +* Tue Jun 21 2011 Justin M. Forbes 0.1-0.20110621SVN +- Created initial package diff --git a/sources b/sources new file mode 100644 index 0000000..f4bc1b7 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA1 (sgabios-20170427-gitcbaee52.tar.xz) = 5e233c2aee6b1d3b2b6a48f2052796cda80e785e