Compare commits

...

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

11 changed files with 200 additions and 52 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/slang-2.3.2.tar.bz2
/slang-2.3.3.tar.bz2

View File

@ -1 +0,0 @@
bbf7f2dcc14e7c7fca40868fd4b411a2bd9e2655 SOURCES/slang-2.3.2.tar.bz2

View File

@ -1,31 +0,0 @@
commit d338fd6e949ef62e7eac4eb5c024059e02158b06
Author: Miroslav Lichvar <mlichvar@redhat.com>
Date: Wed Jul 25 13:07:42 2018 +0200
Replaced memcpy in SLang_getkey
memcpy() is not defined for overlapping buffers, i.e. it may copy bytes
in any direction. As SLMEMMOVE is not defined in slang, replace the
SLMEMCPY call with a for loop.
diff --git a/src/slgetkey.c b/src/slgetkey.c
index 86e7946..d9bc678 100644
--- a/src/slgetkey.c
+++ b/src/slgetkey.c
@@ -40,13 +40,13 @@ unsigned int SLang_getkey (void)
if (SLang_Input_Buffer_Len)
{
- unsigned int imax;
+ unsigned int i, imax;
ch = (unsigned int) *SLang_Input_Buffer;
SLang_Input_Buffer_Len--;
imax = SLang_Input_Buffer_Len;
- SLMEMCPY ((char *) SLang_Input_Buffer,
- (char *) (SLang_Input_Buffer + 1), imax);
+ for (i = 0; i < imax; i++)
+ SLang_Input_Buffer[i] = SLang_Input_Buffer[i + 1];
}
else if (SLANG_GETKEY_ERROR == (ch = _pSLsys_getkey ())) return ch;

1
ci.fmf Normal file
View File

@ -0,0 +1 @@
resultsdb-testcase: separate

25
gating.yaml Normal file
View File

@ -0,0 +1,25 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
#Rawhide
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/tier1-public.functional}
#gating rhel
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-public.functional}
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/tier1-internal.functional}

47
plans.fmf Normal file
View File

@ -0,0 +1,47 @@
/tier1-internal:
plan:
import:
url: https://src.fedoraproject.org/tests/slang.git
name: /plans/tier1/internal
adjust:
enabled: false
when: distro == centos-stream, fedora
because: They don't have access to internal repos.
/tier1-public:
plan:
import:
url: https://src.fedoraproject.org/tests/slang.git
name: /plans/tier1/public
/tier2-tier3-internal:
plan:
import:
url: https://src.fedoraproject.org/tests/slang.git
name: /plans/tier2-tier3/internal
adjust:
enabled: false
when: distro == centos-stream, fedora
because: They don't have access to internal repos.
/tier2-tier3-public:
plan:
import:
url: https://src.fedoraproject.org/tests/slang.git
name: /plans/tier2-tier3/public
/others-internal:
plan:
import:
url: https://src.fedoraproject.org/tests/slang.git
name: /plans/others/internal
adjust:
enabled: false
when: distro == centos-stream, fedora
because: They don't have access to internal repos.
/others-public:
plan:
import:
url: https://src.fedoraproject.org/tests/slang.git
name: /plans/others/public

54
slang-sast.patch Normal file
View File

@ -0,0 +1,54 @@
commit 99a1d340301dcee86cabc16b9721e21562691f9c
Author: John E. Davis <jed@jedsoft.org>
Date: Mon May 20 00:19:16 2024 -0400
pre2.3.4-13: Initialize the variables provided by the %g operator to zero to not
leak uninitialized data from the stack if not set by %P. (Miroslav
Lichvar)
diff --git a/src/sldisply.c b/src/sldisply.c
index 2664aad..00d3acb 100644
--- a/src/sldisply.c
+++ b/src/sldisply.c
@@ -534,6 +534,8 @@ static unsigned int tt_sprintf(char *buf, unsigned int buflen, SLCONST char *fmt
parms [1] = x; /* p1 */
parms [2] = y; /* p2 */
+ memset (variables, 0, sizeof(variables));
+
offset = 0;
zero_pad = 0;
field_width = 0;
commit 89d32bb2a32037ce7307b385da88e23dab6f31f6
Author: John E. Davis <jed@jedsoft.org>
Date: Wed Nov 6 10:49:27 2024 -0500
pre2.3.4-16: Removed unnecessary chack for a NULL string in keymap.c:find_the_key, and corrected a potential memory leak in the sltoken.c:compile_byte_compiled_multistring function
diff --git a/src/slkeymap.c b/src/slkeymap.c
index ab9f391..0a2de96 100644
--- a/src/slkeymap.c
+++ b/src/slkeymap.c
@@ -335,7 +335,7 @@ static int find_the_key (SLFUTURE_CONST char *s, SLkeymap_Type *kml, SLang_Key_T
last = key;
key = key->next;
- if ((key != NULL) && (key->str != NULL))
+ if (key != NULL)
{
len = key_len = key->str[0];
if (len > str_len) len = str_len;
diff --git a/src/sltoken.c b/src/sltoken.c
index d142eee..dd3142e 100644
--- a/src/sltoken.c
+++ b/src/sltoken.c
@@ -1999,7 +1999,7 @@ static int compile_byte_compiled_multistring (char *buf)
if ((last_type != type) && (type != 0))
{
SLang_verror (SL_INVALID_DATA_ERROR, "Unexpected object (0x%X) encountered in stream", (int)this_type);
- return -1;
+ goto return_error;
}
type = last_type;

View File

@ -4,18 +4,20 @@
%bcond_with oniguruma
%endif
Summary: The shared library for the S-Lang extension language
Summary: Shared library for the S-Lang extension language
Name: slang
Version: 2.3.2
Release: 3%{?dist}
License: GPLv2+
Version: 2.3.3
Release: 8%{?dist}
License: GPL-2.0-or-later
URL: https://www.jedsoft.org/slang/
Source: https://www.jedsoft.org/releases/%{name}/%{name}-%{version}.tar.bz2
# don't use memcpy() on overlapping buffers
Patch1: slang-getkey-memmove.patch
# disable test that fails with SIGHUP ignored (e.g. in koji)
Patch2: slang-sighuptest.patch
BuildRequires: gcc libpng-devel pcre-devel zlib-devel
# fix issues found by static analysis
Patch3: slang-sast.patch
BuildRequires: make
BuildRequires: gcc libpng-devel zlib-devel
%{?with_oniguruma:BuildRequires: oniguruma-devel}
# static removed in 2.3.1a-3
Obsoletes: slang-static < 2.3.1a-3
@ -54,22 +56,19 @@ based on the S-Lang extension language.
%prep
%setup -q
%patch1 -p1 -b .getkey-memmove
%patch2 -p1 -b .sighuptest
# fix permissions of installed modules
sed -i '/^INSTALL_MODULE=/s/_DATA//' configure
# disable test failing on 32-bit archs
sed -i '/TEST_SCRIPTS_SLC = /s/array //' src/test/Makefile
%patch3 -p1 -b .sast
%build
%configure \
--with-{pcre,png,z}lib=%{_libdir} \
--with-{pcre,png,z}inc=%{_includedir} \
--with-{png,z}lib=%{_libdir} \
--with-{png,z}inc=%{_includedir} \
--without-pcre \
%if %{with oniguruma}
--with-oniglib=%{_libdir} \
--with-oniginc=%{_includedir} \
%else
--without-onig \
%endif
;
@ -93,7 +92,6 @@ make check
%ldconfig_scriptlets
%files
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc NEWS
%{_libdir}/libslang*.so.2*
@ -114,8 +112,61 @@ make check
%{_includedir}/slang
%changelog
* Fri Jul 27 2018 Miroslav Lichvar <mlichvar@redhat.com> - 2.3.2-3
- don't use memcpy() on overlapping buffers (#1607024)
* Wed Nov 06 2024 Miroslav Lichvar <mlichvar@redhat.com> - 2.3.3-8
- fix issues found by static analysis (RHEL-36476)
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2.3.3-7
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.3.3-6
- Bump release for June 2024 mass rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jan 24 2023 Miroslav Lichvar <mlichvar@redhat.com> - 2.3.3-3
- disable pcre module (#2128372)
- convert license tag to SPDX
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Aug 08 2022 Miroslav Lichvar <mlichvar@redhat.com> - 2.3.3-1
- update to 2.3.3
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 27 2018 Miroslav Lichvar <mlichvar@redhat.com> - 2.3.2-4
- don't use memcpy() on overlapping buffers
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sun Apr 01 2018 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.3.2-2
- Rebuild against oniguruma 6.8.1

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (slang-2.3.3.tar.bz2) = f882f09e3fcd53427de0f233c9fc3ab15497f2323007be9a084696c8cf810ffe2726cd003149e757df26198b390b9f8c1ff411dc6473513457bd0f94722f8490