Compare commits

..

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

5 changed files with 89 additions and 101 deletions

View file

@ -0,0 +1,44 @@
From 01cff84b8ea1221c3bd0a2f3017b75fc79ba823a Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Fri, 31 Jan 2020 20:51:09 +0900
Subject: [PATCH 07/11] MISC::remove_space: handle the case str consists of
just spaces (#176)
In the funcion MISC::remove_space , when the input str consists of just spaces,
the current implementation causes invalid access against str because
the variable i2 can be (size_t)-1.
When compiled with -Wp,-D_GLIBCXX_ASSERTIONS, this actually causes abort like:
/usr/include/c++/9/bits/basic_string.h:1048: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference = const char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]: Assertion '__pos <= size()' failed.
Note that for this case, i finally becomes lng (== str.length()), and
str.substr(pos, len) returns empty string when pos == str.length(), so
this patch should behave as the previous behavior.
---
src/jdlib/miscutil.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/jdlib/miscutil.cpp b/src/jdlib/miscutil.cpp
index a7d3dd34..ccd71e45 100644
--- a/src/jdlib/miscutil.cpp
+++ b/src/jdlib/miscutil.cpp
@@ -304,7 +304,7 @@ std::string MISC::remove_space( const std::string& str )
// 前
size_t i = 0;
- while( 1 ){
+ while( i < lng ){
// 半角
if( str[ i ] == ' ' ) ++i;
@@ -315,6 +315,7 @@ std::string MISC::remove_space( const std::string& str )
str[ i +2 ] == str_space[ 2 ] ) i += lng_space;
else break;
}
+ if (i >= lng) return "";
// 後
size_t i2 = lng -1;
--
2.24.1

132
jd.spec
View file

@ -11,40 +11,37 @@
##########################################
# Defined by upsteam
#
%define main_ver 0.15.0
%define main_ver 0.8.0
#%%define strtag 20200118
%dnl %define pre_ver beta
##########################################
#
%global reponame JDim
%global gitdate 20260110
%global gitcommit 95c8d64c60e607aebb9097b9dd4b865670b1844c
%dnl %global gitcommit JDim-v%{main_ver}
%global gitdate 20220709
#%%global gitcommit 2e5d386ece56e67194959f59addd6996f190fdc4
%global gitcommit JDim-v%{main_ver}
%global shortcommit %(c=%{gitcommit}; echo ${c:0:7})
%global tarballdate 20260110
%global tarballtime 2319
%global tarballdate 20220718
%global tarballtime 1607
##########################################
# Defined by vendor
#
%define vendor_rel 1
%define extra_rel %{nil}
%define use_gitcommit_as_rel 0
# Tag name changed from vendor to vendorname so as not to
# overwrite Vendor entry in Summary
%define vendorname fedora
%define gtkmmdevel pkgconfig(gtkmm-3.0)
%define fontpackage mona-fonts-VLGothic
##########################################
##########################################
%if 0%{?use_gitcommit_as_rel} >= 1
%global gittag %{gitdate}git%{shortcommit}
%global gitver_rpm ^%{gittag}
%global gitver_build -%{gittag}
%global rel %{vendor_rel}.D%{gitdate}git%{shortcommit}%{?dist}
%else
%global gittag %{nil}
%global gitver_rpm %{nil}
%global gitver_build %{nil}
%define rel %{vendor_rel}%{?dist}
%endif
%define _with_migemo 1
@ -67,28 +64,27 @@
%endif
#%%undefine _annotated_build
%if 0%{?use_gitcommit_as_rel} >= 1
%global clamp_mtime_to_source_date_epoch 0
%endif
##########################################
Name: jd
Epoch: 1
Version: %{main_ver}%{?strtag:.%{strtag}}%{?pre_ver:~%{pre_ver}}%{gitver_rpm}
Release: 1%{?dist}%{flagrel}
Version: %{main_ver}%{?strtag:.%{strtag}}
Release: %{rel}%{flagrel}
Summary: A 2ch browser
# Automatically converted from old format: GPLv2 - review is highly recommended.
License: GPL-2.0-only
License: GPLv2
URL: https://github.com/JDimproved/JDim
%dnl Source0: http://dl.sourceforge.jp/jd4linux/%{repoid}/%{name}-%{main_ver}-%{strtag}.tgz
#Source0: http://dl.sourceforge.jp/jd4linux/%{repoid}/%{name}-%{main_ver}-%{strtag}.tgz
Source0: JDim-%{tarballdate}T%{tarballtime}.tar.gz
Source1: create-JD-git-bare-tarball.sh
Patch0: jdim-0.3.0-env-pkg-distro-specific.patch
# Upstream patch
BuildRequires: gcc-c++
BuildRequires: pkgconfig(gtkmm-3.0)
BuildRequires: %{gtkmmdevel}
BuildRequires: libgcrypt-devel
BuildRequires: libxcrypt-devel
BuildRequires: pkgconfig(alsa)
@ -119,7 +115,7 @@ Requires: %{fontpackage}
JD is a 2ch browser based on gtkmm2.
%prep
%setup -q -c -T -n %{name}-%{main_ver}%{?strtag:.%{strtag}}%{gitver_build} -a 0
%setup -q -c -T -a 0
git clone ./%{reponame}.git
cd JDim
@ -128,22 +124,20 @@ git config user.name "%{name} Fedora maintainer"
git config user.email "%{name}-owner@fedoraproject.org"
%if 0%{?use_gitcommit_as_rel} >= 1
git checkout -b %{main_ver}-fedora-local %{gitcommit}
git checkout -b %{version}-fedora-local %{gitcommit}
%else
git checkout -b %{main_ver}-fedora-local %{gitcommit}
#git checkout -b %{main_ver}-fedora-local %{reponame}-v%{main_ver}
git checkout -b %{version}-fedora-local %{reponame}-v%{main_ver}
%endif
cp -a [A-Z]* ..
# reset to base, as git information is embedded in the source
git checkout -b %{main_ver}-fedora
git checkout -b %{version}-fedora
#git reset %{reponame}-v%{main_ver}
%if 0%{?use_gitcommit_as_rel} >= 1
git reset %{gitcommit}
%else
git reset %{gitcommit}
#git reset %{reponame}-v%{main_ver}
git reset %{reponame}-v%{main_ver}
%endif
%build
@ -162,6 +156,12 @@ export LDFLAGS="$LDFLAGS -Wl,--push-state,--no-as-needed -lcrypt -Wl,--pop-state
export CC="${CC} -fsanitize=address -fsanitize=undefined"
export CXX="${CXX} -fsanitize=address -fsanitize=undefined"
export LDFLAGS="${LDFLAGS} -pthread"
# Currently -fPIE binary cannot work with ASAN on kernel 4.12
# https://github.com/google/sanitizers/issues/837
export CFLAGS="$(echo $CFLAGS | sed -e 's|-specs=[^ \t][^ \t]*hardened[^ \t][^ \t]*||g')"
export CXXFLAGS="$(echo $CXXFLAGS | sed -e 's|-specs=[^ \t][^ \t]*hardened[^ \t][^ \t]*||g')"
export LDFLAGS="$(echo $LDFLAGS | sed -e 's|-specs=[^ \t][^ \t]*hardened[^ \t][^ \t]*||g')"
%endif
%meson \
@ -176,8 +176,7 @@ export LDFLAGS="${LDFLAGS} -pthread"
-Dtls=gnutls \
%{nil}
%meson_build \
--ninja-args "-k 0"
%meson_build
%install
cd %{reponame}
@ -193,7 +192,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/jdim.desktop
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/jdim.metainfo.xml
cd %{reponame}
%if 0%{?use_gcc_strict_sanitize} >= 1
%if 0%{use_gcc_strict_sanitize} >= 1
export ASAN_OPTIONS=detect_leaks=0
%endif
%meson_test -v
@ -201,8 +200,7 @@ export ASAN_OPTIONS=detect_leaks=0
%files
%defattr(-,root,root,-)
%license COPYING
%doc ChangeLog
%doc README.md
%doc ChangeLog README
%{_bindir}/jdim
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
@ -211,72 +209,6 @@ export ASAN_OPTIONS=detect_leaks=0
%{_datadir}/icons/hicolor/*/apps/jdim.*
%changelog
* Sat Jan 10 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.15.0-1
- 0.15.0
* Sun Jul 27 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.14.0-1
- 0.14.0
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.13.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.13.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jan 11 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.13.0-1
- 0.13.0
* Mon Jul 29 2024 Miroslav Suchý <msuchy@redhat.com> - 1:0.12.0-3
- convert license to SPDX
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.12.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sun Jul 07 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.12.0-1
- 0.12.0
* Tue Jun 18 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.12.0~beta-1
- 0.12.0-beta
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.11.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.11.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jan 13 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.11.0-1
- 0.11.0
* Sun Dec 24 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.11.0~beta-1
- 0.11.0 beta
* Sun Jul 23 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.10.1-1
- 0.10.1
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.10.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sun Jul 9 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.10.0-1
- 0.10.0
* Mon Jun 19 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.10.0~beta-1
- 0.10.0 beta
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.9.0-2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jan 18 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.9.0-2
- Add missing cstdint header inclusion (gcc13)
* Sun Jan 8 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.9.0-1
- JDim 0.9.0
* Sun Dec 18 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.9.0-0.1.beta.D20221218git3f6cf65
- 0.9.0 beta
* Wed Jul 27 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.8.0-1.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jul 18 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:0.8.0-1
- JDim 0.8.0

View file

@ -0,0 +1,11 @@
--- jd-0.3.0/JDim/src/environment.cpp.env_fedora 2020-01-31 14:58:08.306098160 +0900
+++ jd-0.3.0/JDim/src/environment.cpp 2020-01-31 14:59:30.123024272 +0900
@@ -619,7 +619,7 @@ std::string ENVIRONMENT::get_jdinfo()
jd_info <<
"[バージョン] " << progname << " " << version << "\n" <<
"[ディストリ ] " << distribution << "\n" <<
- "[パッケージ] " << "バイナリ/ソース( <配布元> )" << "\n" <<
+ "[パッケージ] " << "Fedora Project配布のバイナリrpm" << "\n" <<
"[ DEWM ] " << desktop << "\n" <<
"[ gtkmm  ] " << get_gtkmm_version() << "\n" <<
"[ glibmm  ] " << get_glibmm_version() << "\n" <<

1
noautobuild Normal file
View file

@ -0,0 +1 @@
Check svn later

View file

@ -1 +1 @@
SHA512 (JDim-20260110T2319.tar.gz) = c51355599dddc8794f0c7975a8f4db15879f4a4a99771493469a42927d43f1619b8ef02a70d7e492ea61cbc93c1b00232ec09fe59f5c10c1460dde06c8d84b2c
SHA512 (JDim-20220718T1607.tar.gz) = 267776cc3e5f08d868bc3089a47eff3682bbd35a5955d20c7f60f473acef29ce392f0adc8aacf246e0379643a297b1b4a4abe6ccba5d2618518d3cd8d6754bcf