Compare commits
20 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
604180f030 | ||
|
|
a15b8533e9 | ||
|
|
9ba8a88ec4 | ||
|
|
ca6de1b4ce | ||
|
|
956e54007c | ||
|
|
2d31bd5d93 | ||
|
|
4db0e42cc1 | ||
|
|
fdc6a110fd | ||
|
|
27044e6b40 | ||
|
|
cdb9c3a5f2 | ||
|
|
460429b7d7 | ||
|
|
68df1ef9f2 | ||
|
|
c483836b6d | ||
|
|
0e77794aca | ||
|
|
1c82df6d52 | ||
|
|
059e3a9a41 | ||
|
|
caa9d840f8 | ||
|
|
4a58d05773 | ||
|
|
25e3b84421 | ||
|
|
17e99c1c47 |
3 changed files with 56 additions and 56 deletions
|
|
@ -1,28 +0,0 @@
|
|||
From 38f6bbe5ec0bc77fcf4f564e716acd23372cef3a Mon Sep 17 00:00:00 2001
|
||||
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
|
||||
Date: Tue, 16 Jul 2024 15:52:09 +0900
|
||||
Subject: [PATCH] misc/string.c: fix one byte ahead access in dup_string
|
||||
|
||||
In dup_string in misc/string.c , even if the destination
|
||||
buffer is allocated with n_char bytes,
|
||||
the source buffer `str` can be accessed up to only n_char bytes.
|
||||
---
|
||||
src/misc/string.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/misc/string.c b/src/misc/string.c
|
||||
index 1374607da..97acd9c92 100644
|
||||
--- a/src/misc/string.c
|
||||
+++ b/src/misc/string.c
|
||||
@@ -78,7 +78,7 @@ char *dup_string(const char *str, size_t n_char)
|
||||
char *p = TMALLOC(char, n_char + 1);
|
||||
|
||||
if (p != NULL) {
|
||||
- (void) memcpy(p, str, n_char + 1);
|
||||
+ (void) memcpy(p, str, n_char);
|
||||
p[n_char] = '\0';
|
||||
}
|
||||
return p;
|
||||
--
|
||||
2.45.2
|
||||
|
||||
80
ngspice.spec
80
ngspice.spec
|
|
@ -13,22 +13,22 @@
|
|||
%global userelease 1
|
||||
%endif
|
||||
|
||||
%global majorver 43
|
||||
#%%global minorver 3
|
||||
%global docver 43
|
||||
%global majorver 45
|
||||
%global minorver 2
|
||||
%global docver 45
|
||||
%undefine prever
|
||||
%global prerpmver %(echo "%{?prever}" | sed -e 's|-||g')
|
||||
|
||||
%global baserelease 2
|
||||
%global baserelease 1
|
||||
|
||||
%if 0%{?usegitbare} >= 1
|
||||
# pre-master-42
|
||||
%global gitcommit c87df54f24969de0c9d503c349258d9953ae208a
|
||||
%global gitdate 20231111
|
||||
# pre-master-45
|
||||
%global gitcommit 1d0beb5e266420b1dd756913356a295ddb60fdce
|
||||
%global gitdate 20250830
|
||||
%global shortcommit %(c=%{gitcommit}; echo ${c:0:7})
|
||||
|
||||
%global tarballdate 20231112
|
||||
%global tarballtime 1636
|
||||
%global tarballdate 20250831
|
||||
%global tarballtime 2034
|
||||
%endif
|
||||
|
||||
%if 0%{?userelease} >= 1
|
||||
|
|
@ -55,11 +55,12 @@ Release: %{baserelease}%{?dist}%{flagrel}
|
|||
Summary: A mixed level/signal circuit simulator
|
||||
|
||||
# ngspice-42-manual.pdf CC-BY-SA-4.0 AND BSD-3-Clause
|
||||
License: BSD
|
||||
# Automatically converted from old format: BSD - review is highly recommended.
|
||||
License: LicenseRef-Callaway-BSD
|
||||
URL: http://ngspice.sourceforge.net
|
||||
|
||||
%if 0%{?userelease} >= 1
|
||||
Source0: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/%{majorver}/ngspice-%{majorver}.tar.gz
|
||||
Source0: https://downloads.sourceforge.net/project/ngspice/ng-spice-rework/%{majorver}%{?minorver:.%minorver}/ngspice-%{majorver}%{?minorver:.%minorver}.tar.gz
|
||||
%endif
|
||||
%if 0%{?usegitbare} >= 1
|
||||
Source0: ngspice-%{tarballdate}T%{tarballtime}.tar.gz
|
||||
|
|
@ -74,10 +75,6 @@ Source10: create-ngspice-git-bare-tarball.sh
|
|||
# Link libspice.so with -lBLT or -lBLIlite, depending on whether in tk mode or
|
||||
# not (bug 1047056, debian bug 737279)
|
||||
Patch0: ngspice-37-blt-linkage-workaround.patch
|
||||
# https://sourceforge.net/p/ngspice/bugs/679/
|
||||
# https://sourceforge.net/p/ngspice/ngspice/merge-requests/19/
|
||||
# misc/string.c: fix one byte ahead access in dup_string
|
||||
Patch19: MR19-misc-string.c-fix-one-byte-ahead-access-in-dup_strin.patch
|
||||
|
||||
|
||||
BuildRequires: make
|
||||
|
|
@ -111,6 +108,7 @@ BuildRequires: flex
|
|||
BuildRequires: ImageMagick
|
||||
BuildRequires: mot-adms
|
||||
|
||||
BuildRequires: xorg-x11-server-Xvfb
|
||||
BuildRequires: git
|
||||
|
||||
Requires: %{name}-codemodel%{?_isa} = %{version}-%{release}
|
||||
|
|
@ -143,7 +141,7 @@ It can be used for VLSI simulations as well.
|
|||
|
||||
%package -n tclspice
|
||||
Summary: Tcl/Tk interface for ngspice
|
||||
BuildRequires: tk-devel
|
||||
BuildRequires: pkgconfig(tk) <= 8.999
|
||||
BuildRequires: blt-devel
|
||||
|
||||
%description -n tclspice
|
||||
|
|
@ -175,7 +173,7 @@ developing applications that use libngspice.
|
|||
|
||||
%prep
|
||||
%if 0%{?userelease} >= 1
|
||||
%setup -q -n %{name}-%{majorver}
|
||||
%setup -q -n %{name}-%{majorver}%{?minorver:.%minorver}
|
||||
git init
|
||||
git config user.name "%{name} maintainer"
|
||||
git config user.email "%{name}-maintainers@fedoraproject.org"
|
||||
|
|
@ -215,7 +213,6 @@ popd
|
|||
|
||||
%patch -P0 -p2 -b .link
|
||||
git commit -m "Link libspice.so with -lBLT or -lBLIlite, depending on whether in tk mode or not" -a
|
||||
cat %PATCH19 | git am
|
||||
|
||||
# make sure the examples are UTF-8...
|
||||
for nonUTF8 in \
|
||||
|
|
@ -225,7 +222,7 @@ for nonUTF8 in \
|
|||
ChangeLog \
|
||||
%{nil}
|
||||
do
|
||||
%{_bindir}/iconv -f ISO-8859-1 -t utf-8 $nonUTF8 > $nonUTF8.conv
|
||||
iconv -f ISO-8859-1 -t utf-8 $nonUTF8 > $nonUTF8.conv
|
||||
%{__mv} -f $nonUTF8.conv $nonUTF8
|
||||
done
|
||||
git commit -m "Change files to UTF8" -a
|
||||
|
|
@ -240,6 +237,7 @@ git commit -m "Fix permission" -a || :
|
|||
|
||||
# Move spinit directory to arch-dependent
|
||||
sed -i configure.ac -e '\@AC_DEFINE_UNQUOTED.*NGSPICEDATADIR@s|echo .dprefix/share/ngspice|echo %{_libdir}/ngspice|'
|
||||
sed -i configure.ac -e '\@AC_DEFINE_UNQUOTED.*NGSPICELIBDIR@s|echo .dprefix/share/ngspice|echo %{_libdir}/ngspice|'
|
||||
sed -i src/misc/ivars.c -e 's|\(["/]\)share/ngspice|\1%_lib/ngspice|'
|
||||
sed -i src/misc/ivars.c -e 's|\(["/]\)lib/ngspice|\1%_lib/ngspice|'
|
||||
grep -rl "(pkgdatadir)/" . | xargs sed -i -e 's|(pkgdatadir)/|(pkglibdir)/|'
|
||||
|
|
@ -288,7 +286,7 @@ cd %{name}
|
|||
|
||||
# ---- Tclspice ----------------------------------------------------------------
|
||||
# Adding BLT support
|
||||
export CFLAGS="%{optflags} -I%{_includedir}/blt"
|
||||
export CFLAGS="%{optflags} -I$(pkg-config --variable=includedir tcl)/blt"
|
||||
|
||||
# Make builddir for tclspice
|
||||
%{__mkdir} -p tclspice
|
||||
|
|
@ -328,11 +326,11 @@ export CPPFLAGS=-DUSE_INTERP_RESULT
|
|||
--enable-predictor \
|
||||
--enable-shared \
|
||||
--with-readline=yes \
|
||||
--with-tcl=%{_libdir}/ \
|
||||
--with-tcl=$(pkg-config --variable=libdir tcl) \
|
||||
--libdir=%{_libdir}/tclspice \
|
||||
%{nil}
|
||||
|
||||
%{__make} -k
|
||||
%make_build -k
|
||||
# Once install to the temp dir
|
||||
rm -rf $(pwd)/../INST-TCLSPICE
|
||||
%{__make} INSTALL="install -p" install DESTDIR=$(pwd)/../INST-TCLSPICE
|
||||
|
|
@ -374,8 +372,7 @@ do
|
|||
%{nil}
|
||||
|
||||
%{__make} clean
|
||||
# No parallel make
|
||||
%{__make} -k
|
||||
%make_build -k
|
||||
# Once install to the temp dir
|
||||
rm -rf $(pwd)/INST-NGSPICE-${opt}
|
||||
%{__make} INSTALL="install -p" install DESTDIR=$(pwd)/INST-NGSPICE-${opt}
|
||||
|
|
@ -431,7 +428,7 @@ cp -pr ./src/spicelib/devices/adms/ %{buildroot}%{_libdir}/%{name}
|
|||
# Ensuring that all docs are under %%{_pkgdocdir}
|
||||
mkdir -p %{buildroot}%{_pkgdocdir}
|
||||
cp -pr examples/ %{buildroot}%{_pkgdocdir}
|
||||
install -cpm 0644 %{SOURCE1} %{buildroot}%{_pkgdocdir}/%{name}-%{version}.pdf
|
||||
install -cpm 0644 %{SOURCE1} %{buildroot}%{_pkgdocdir}/%{name}-%{majorver}.pdf
|
||||
|
||||
cp -a \
|
||||
Stuarts_Poly_Notes \
|
||||
|
|
@ -466,12 +463,15 @@ mkdir USERPROFILE
|
|||
echo "set ngbehavior=mc" > USERPROFILE/spice.rc
|
||||
export USERPROFILE=$(pwd)/USERPROFILE
|
||||
|
||||
make check
|
||||
xvfb-run \
|
||||
-s "-screen 0 640x480x24" \
|
||||
make check
|
||||
|
||||
popd
|
||||
|
||||
%files
|
||||
%{_bindir}/*
|
||||
%{_libdir}/%{name}/ivlng.*
|
||||
%{_mandir}/man1/*
|
||||
%doc %{_pkgdocdir}
|
||||
%license COPYING
|
||||
|
|
@ -483,6 +483,7 @@ popd
|
|||
%{_libdir}/tclspice/libspice*.so*
|
||||
%{_libdir}/tclspice/%{name}/*.cm
|
||||
%{_libdir}/tclspice/%{name}/*.tcl
|
||||
%{_libdir}/tclspice/%{name}/ivlng.*
|
||||
%{_libdir}/tclspice/%{name}/scripts/
|
||||
|
||||
%files codemodel
|
||||
|
|
@ -499,6 +500,33 @@ popd
|
|||
%{_includedir}/ngspice/
|
||||
|
||||
%changelog
|
||||
* Sun Sep 07 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 45.2-1
|
||||
- Update to 45.2
|
||||
|
||||
* Tue Sep 02 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 45-1
|
||||
- Update to 45
|
||||
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 44.2-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Fri Jan 31 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 44.2-3
|
||||
- Use tk8 explicitly
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 44.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sun Jan 12 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 44.2-1
|
||||
- Update to 44.2
|
||||
|
||||
* Mon Dec 30 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 44-1
|
||||
- Update to 44
|
||||
|
||||
* Mon Sep 2 2024 Miroslav Suchý <msuchy@redhat.com> - 43-4
|
||||
- convert license to SPDX
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 43-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Tue Jul 16 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 43-2
|
||||
- Apply upstream patch for fixing one byte ahead access in string manipulation
|
||||
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (ngspice-43.tar.gz) = ad938e6ea8f9874c04d1033599bf39d3728e763fbd42ba77bd036b6c00271600695b3656f3f34547c39153382f55e7d7d5d6cb732f272d149cdbe21988c0d636
|
||||
SHA512 (ngspice-43-manual.pdf) = 01bd68983c10ca8ef2a399354290032a0e9a9881159a3781459c576e662efa91af403ef191e846694ef418a8aec3e867d8e916d8a41a6d616d3169daf22be444
|
||||
SHA512 (ngspice-45.2.tar.gz) = 4090e9433457c0b49dc1e7561bc630a5c6a340391f26be8142c6bd514ae13b72137589964fe9ae5a01069c9de7d8457bd41b0811a335b2c93a3c6e07044b35b1
|
||||
SHA512 (ngspice-45-manual.pdf) = 425d9320a01d409c7baab83d111f92643cae7df62a109e06d7e4fd366262441f4fdd62532db63fb4d4af4cb98e478b4f9fca5bd6c63fb89507dba685220f34ab
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue