diff --git a/.gitignore b/.gitignore index 774eed4..6ff1285 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ simh-3.8.1-noroms.tar.gz /simh-3.9.0-noroms.tar.gz /simh-3.11.0-noroms.tar.gz +/simh-3.12.5-noroms.tar.gz diff --git a/build-fix.patch b/build-fix.patch new file mode 100644 index 0000000..18df6de --- /dev/null +++ b/build-fix.patch @@ -0,0 +1,12 @@ +diff -wbBur sim/PDP11/pdp11_ch.c sim.q/PDP11/pdp11_ch.c +--- sim/PDP11/pdp11_ch.c 2024-05-05 11:03:00.000000000 +0300 ++++ sim.q/PDP11/pdp11_ch.c 2024-11-17 00:33:07.981278910 +0300 +@@ -271,7 +271,7 @@ + CONST uint8 *p; + + tmxr_poll_rx (&ch_tmxr); +- if (tmxr_get_packet_ln (&ch_lines[0], &p, &count) != SCPE_OK) { ++ if (tmxr_get_packet_ln (&ch_lines[0], (void*)&p, &count) != SCPE_OK) { + sim_debug (DBG_ERR, &ch_dev, "TMXR error receiving packet\n"); + return 0; + } diff --git a/changelog b/changelog new file mode 100644 index 0000000..2e22ae8 --- /dev/null +++ b/changelog @@ -0,0 +1,129 @@ +* Tue Feb 25 2025 Davide Cavalca - 3.11.0-28 +- Convert the spec from tabs to spaces +- Refactor and update the spec to follow the latest packaging guidelines + +* Sun Jan 19 2025 Fedora Release Engineering - 3.11.0-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Sep 04 2024 Miroslav Suchý - 3.11.0-26 +- convert license to SPDX + +* Sat Jul 20 2024 Fedora Release Engineering - 3.11.0-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 3.11.0-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 3.11.0-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jan 24 2023 Lucian Langa - 3.11.0-22 +- forgot the patch file in previous commit + +* Tue Jan 24 2023 Lucian Langa - 3.11.0-21 +- add patch from Joshua Cogliati to fix FTBFS +- update build flags + +* Sat Jan 21 2023 Fedora Release Engineering - 3.11.0-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 3.11.0-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 3.11.0-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.11.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 3.11.0-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 3.11.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun Apr 05 2020 Lucian Langa - 3.9.0-14 +- update generation script +- apply temporary gcc10 fix +- update to latest upstream + +* Thu Jan 30 2020 Fedora Release Engineering - 3.9.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 3.9.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 3.9.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 3.9.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 3.9.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 3.9.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 3.9.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 3.9.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 05 2016 Fedora Release Engineering - 3.9.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 3.9.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Aug 18 2014 Fedora Release Engineering - 3.9.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 3.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri Jan 24 2014 Lucian Langa - 3.9.0-1 +- sync with latest upstream stable +- drop all patches - fixed upstream +- fix bogus dates + +* Tue Aug 06 2013 Lucian Langa - 3.8.1-11 +- don't create versioned docdir + +* Sun Aug 04 2013 Fedora Release Engineering - 3.8.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 3.8.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 3.8.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 3.8.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed May 19 2010 Lucian Langa - 3.8.1-6 +- bump rel to fix NVR higher than previous version + +* Sat Jan 09 2010 Lucian Langa - 3.8.1-5 +- fix altair segfault + +* Tue Nov 17 2009 Lucian Langa - 3.8.1-4 +- add correct source + +* Fri Nov 13 2009 Lucian Langa - 3.8.1-3 +- update description + +* Sun Nov 08 2009 Lucian Langa - 3.8.1-2 +- add correct generate script + +* Thu Oct 08 2009 Lucian Langa - 3.8.1-1 +- remove separate docs +- misc cleanups +- new upstream release + +* Wed Dec 24 2008 Lucian Langa - 3.8.0-1 +- initial spec file + + diff --git a/simh-3.11.0-crl.patch b/simh-3.11.0-crl.patch deleted file mode 100644 index 23c5c10..0000000 --- a/simh-3.11.0-crl.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff '--color=auto' -Naur simh-3.11.0/sim/PDP11/pdp11_defs.h simh-3.11.0-mod/sim/PDP11/pdp11_defs.h ---- simh-3.11.0/sim/PDP11/pdp11_defs.h 2017-02-10 15:31:48.000000000 +0100 -+++ simh-3.11.0-mod/sim/PDP11/pdp11_defs.h 2023-01-24 07:58:53.969038121 +0100 -@@ -900,7 +900,7 @@ - #define WrMemW(pa,d) uc15_WrMemW (pa, d) - #define WrMemB(pa, d) uc15_WrMemB (pa, d) - --uint32 uc15_memsize; -+extern uint32 uc15_memsize; - int32 uc15_RdMemW (int32 pa); - int32 uc15_RdMemB (int32 pa); - void uc15_WrMemW (int32 pa, int32 d); -diff '--color=auto' -Naur simh-3.11.0/sim/sim_fio.c simh-3.11.0-mod/sim/sim_fio.c ---- simh-3.11.0/sim/sim_fio.c 2019-02-05 14:03:02.000000000 +0100 -+++ simh-3.11.0-mod/sim/sim_fio.c 2023-01-24 07:59:00.666042586 +0100 -@@ -182,7 +182,7 @@ - #if defined (VMS) - return fopen (file, mode, "ALQ=32", "DEQ=4096", - "MBF=6", "MBC=127", "FOP=cbt,tef", "ROP=rah,wbh", "CTX=stm"); --#elif (defined (__linux) || defined (__linux__) || defined (__hpux) || defined (_AIX)) && !defined (DONT_DO_LARGEFILE) -+#elif (defined (__hpux) || defined (_AIX)) && !defined (DONT_DO_LARGEFILE) - return fopen64 (file, mode); - #else - return fopen (file, mode); -@@ -261,9 +261,9 @@ - - #endif /* end Windows */ - --/* Linux, HP/UX, and AIX */ -+/* HP/UX, and AIX */ - --#if defined (__linux) || defined (__linux__) || defined (__hpux) || defined (_AIX) -+#if defined (__hpux) || defined (_AIX) - #define S_SIM_IO_FSEEK_EXT_ 1 - - int sim_fseeko (FILE *st, t_offset xpos, int origin) -@@ -278,9 +278,9 @@ - - #endif /* end Linux with LFS */ - --/* Apple OS/X and the BSD family */ -+/* Linux, Apple OS/X and the BSD family */ - --#if defined (__APPLE__) || defined (__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__) -+#if defined (__linux) || defined (__linux__) || defined (__APPLE__) || defined (__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__) - #define S_SIM_IO_FSEEK_EXT_ 1 - - int sim_fseeko (FILE *st, t_offset xpos, int origin) diff --git a/simh-3.8.0-gcc.patch b/simh-3.8.0-gcc.patch deleted file mode 100644 index 8b5ba50..0000000 --- a/simh-3.8.0-gcc.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- simh/makefile 2008-06-06 15:00:46.000000000 +0300 -+++ simh-mod/makefile 2008-12-24 11:39:05.000000000 +0200 -@@ -12,10 +12,10 @@ - OS_CCDEFS = -lrt -lm -D_GNU_SOURCE - endif - endif -- CC = gcc -std=c99 -U__STRICT_ANSI__ -g $(OS_CCDEFS) -I . -+ CC = gcc -std=gnu89 -U__STRICT_ANSI__ -g $(OS_CCDEFS) $(OPT) -I . - ifeq ($(USE_NETWORK),) - else -- NETWORK_OPT = -DUSE_NETWORK -isystem /usr/local/include /usr/local/lib/libpcap.a -+ NETWORK_OPT = -DUSE_NETWORK -lpcap - endif - else - #Win32 Environments diff --git a/simh-3.8.1-altair-segfault.patch b/simh-3.8.1-altair-segfault.patch deleted file mode 100644 index cb04fa3..0000000 --- a/simh-3.8.1-altair-segfault.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur simh-3.8.1/ALTAIR/altair_dsk.c simh-3.8.1-mod/ALTAIR/altair_dsk.c ---- simh-3.8.1/ALTAIR/altair_dsk.c 2005-08-26 21:47:22.000000000 +0300 -+++ simh-3.8.1-mod/ALTAIR/altair_dsk.c 2009-11-14 21:22:23.000000000 +0200 -@@ -325,6 +325,8 @@ - cur_sect[cur_disk]);*/ - pos = DSK_TRACSIZE * cur_track[cur_disk]; - pos += DSK_SECTSIZE * cur_sect[cur_disk]; -+ if ((uptr == NULL) || (uptr->fileref == NULL)) -+ return 0; - rtn = fseek(uptr -> fileref, pos, 0); - rtn = fread(dskbuf, 137, 1, uptr -> fileref); - cur_byte[cur_disk] = 1; diff --git a/simh.spec b/simh.spec index 08d3511..0a73311 100644 --- a/simh.spec +++ b/simh.spec @@ -1,29 +1,28 @@ -%define _legacy_common_support 1 -Name: simh -Version: 3.11.0 -Release: 25%{?dist} -Summary: A highly portable, multi-system emulator +Name: simh +Version: 3.12.5 +Release: %autorelease +Summary: Highly portable, multi-system emulator -#The licensing is mostly MIT, but there is also some GPL+ (literally, v1+) code -#in there, notably in AltairZ80/. -#(each target is compiled into its own binary, so only AltairZ80 is GPL+) -License: MIT and GPL+ +# The licensing is mostly MIT, but there is also some GPL+ (literally, v1+) code +# in there, notably in AltairZ80/. +# (each target is compiled into its own binary, so only AltairZ80 is GPL+) +License: MIT AND GPL-1.0-or-later -URL: http://simh.trailing-edge.com/ -Source0: simh-%{version}-noroms.tar.gz +URL: http://simh.trailing-edge.com/ +Source0: simh-%{version}-noroms.tar.gz # we use # this script to remove the roms binary and patented code before shipping it. # Download the upstream tarball and invoke this script while in the # tarball's directory: # ./simh-generate-tarball.sh 3.8.1 -Source1: simh-generate-tarball.sh -Patch0: simh-3.11.0-crl.patch +Source1: simh-generate-tarball.sh +Patch: https://gitlab.archlinux.org/archlinux/packaging/packages/simh/-/raw/3.12.5-1/build-fix.patch - -BuildRequires: make BuildRequires: gcc -BuildRequires: libpcap-devel, dos2unix -#Requires: +BuildRequires: make +BuildRequires: sed + +BuildRequires: libpcap-devel %description SIMH is a historical computer simulation system. It consists of simulators @@ -48,153 +47,51 @@ SIMH implements simulators for: * Scientific Data Systems SDS 940 %prep -%setup -qn %{name}-%{version}/sim -%patch -P0 -p2 +%autosetup -n %{name}-%{version}/sim -p1 +# Convert docs to UNIX line endings +sed -i 's/\r$//' */*.txt %build -mkdir -p BIN -CC="$CC -I . -fPIE -g" -LDFLAGS="$LDFLAGS -lm" -make %{?_smp_mflags} -e ROMS_OPT="%{optflags}" USE_NETWORK=1 - +CC="$CC -I . -fPIE -g -D_LARGEFILE64_SOURCE" +LDFLAGS="$LDFLAGS -lm -lpcap" +%make_build -e ROMS_OPT="%{optflags}" USE_NETWORK=1 LIBPATH="${_libdir}" %install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%{_bindir} -for i in `ls BIN/`; do - install -p -m 755 BIN/$i $RPM_BUILD_ROOT%{_bindir}/simh-$i +for i in BIN/*; do + [ -f "$i" ] && install -Dpm0755 "$i" "%{buildroot}%{_bindir}/simh-$(basename "$i")" done -mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name} -for i in `find -iname "*.txt"`; do dos2unix -k $i; done - %files -%{_bindir}/* -%doc ALTAIR/altair.txt NOVA/eclipse.txt 0readme_311.txt 0readme_ethernet.txt +%{_bindir}/simh-altair +%{_bindir}/simh-eclipse +%{_bindir}/simh-gri +%{_bindir}/simh-h316 +%{_bindir}/simh-i1401 +%{_bindir}/simh-i1620 +%{_bindir}/simh-i7094 +%{_bindir}/simh-id16 +%{_bindir}/simh-id32 +%{_bindir}/simh-lgp +%{_bindir}/simh-nova +%{_bindir}/simh-pdp1 +%{_bindir}/simh-pdp10 +%{_bindir}/simh-pdp11 +%{_bindir}/simh-pdp15 +%{_bindir}/simh-pdp4 +%{_bindir}/simh-pdp7 +%{_bindir}/simh-pdp8 +%{_bindir}/simh-pdp9 +%{_bindir}/simh-sds +%{_bindir}/simh-sigma +%{_bindir}/simh-uc15 +%{_bindir}/simh-vax +%{_bindir}/simh-vax780 +%doc ALTAIR/altair.txt NOVA/eclipse.txt %doc I7094/i7094_bug_history.txt Interdata/id_diag.txt %doc PDP1/pdp1_diag.txt PDP10/pdp10_bug_history.txt PDP18B/pdp18b_diag.txt %doc S3/haltguide.txt S3/readme_s3.txt S3/system3.txt SDS/sds_diag.txt %doc VAX/vax780_bug_history.txt - %changelog -* Sat Jul 20 2024 Fedora Release Engineering - 3.11.0-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Sat Jan 27 2024 Fedora Release Engineering - 3.11.0-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 3.11.0-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jan 24 2023 Lucian Langa - 3.11.0-22 -- forgot the patch file in previous commit - -* Tue Jan 24 2023 Lucian Langa - 3.11.0-21 -- add patch from Joshua Cogliati to fix FTBFS -- update build flags - -* Sat Jan 21 2023 Fedora Release Engineering - 3.11.0-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 3.11.0-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 3.11.0-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 3.11.0-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jan 27 2021 Fedora Release Engineering - 3.11.0-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 3.11.0-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Sun Apr 05 2020 Lucian Langa - 3.9.0-14 -- update generation script -- apply temporary gcc10 fix -- update to latest upstream - -* Thu Jan 30 2020 Fedora Release Engineering - 3.9.0-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Jul 26 2019 Fedora Release Engineering - 3.9.0-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sat Feb 02 2019 Fedora Release Engineering - 3.9.0-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 3.9.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Feb 09 2018 Fedora Release Engineering - 3.9.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Aug 03 2017 Fedora Release Engineering - 3.9.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 3.9.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 3.9.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Feb 05 2016 Fedora Release Engineering - 3.9.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Fri Jun 19 2015 Fedora Release Engineering - 3.9.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Mon Aug 18 2014 Fedora Release Engineering - 3.9.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sun Jun 08 2014 Fedora Release Engineering - 3.9.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Fri Jan 24 2014 Lucian Langa - 3.9.0-1 -- sync with latest upstream stable -- drop all patches - fixed upstream -- fix bogus dates - -* Tue Aug 06 2013 Lucian Langa - 3.8.1-11 -- don't create versioned docdir - -* Sun Aug 04 2013 Fedora Release Engineering - 3.8.1-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Thu Feb 14 2013 Fedora Release Engineering - 3.8.1-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Sat Jul 21 2012 Fedora Release Engineering - 3.8.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jan 14 2012 Fedora Release Engineering - 3.8.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Wed May 19 2010 Lucian Langa - 3.8.1-6 -- bump rel to fix NVR higher than previous version - -* Sat Jan 09 2010 Lucian Langa - 3.8.1-5 -- fix altair segfault - -* Tue Nov 17 2009 Lucian Langa - 3.8.1-4 -- add correct source - -* Fri Nov 13 2009 Lucian Langa - 3.8.1-3 -- update description - -* Sun Nov 08 2009 Lucian Langa - 3.8.1-2 -- add correct generate script - -* Thu Oct 08 2009 Lucian Langa - 3.8.1-1 -- remove separate docs -- misc cleanups -- new upstream release - -* Wed Dec 24 2008 Lucian Langa - 3.8.0-1 -- initial spec file - - +%autochangelog diff --git a/sources b/sources index 93591cc..948f0c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (simh-3.11.0-noroms.tar.gz) = f4561701d67b774f56364ae7706a9a27a4030c52528db0198893b6ef8793124e3a9264b8d3b16a69d7084bd4e74c1cdaa897a8b2626ac679beadcaad217c0513 +SHA512 (simh-3.12.5-noroms.tar.gz) = 5441199cebc35e49f44fddbc049c29680c1d00aac2c514f2cb3a9649188d6c3f50613e647d7de9b064a4b2d5e81037854efb056891033c240331edf69c9fbbb3