Compare commits
43 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2589d4ca3 | ||
|
|
ef6d2d6f3b | ||
|
|
5199323820 | ||
|
|
098d75577f | ||
|
|
de188a5217 | ||
|
|
4493c3a916 | ||
|
|
7bec307ba9 | ||
|
|
54c3deae34 | ||
|
|
094ceb167f | ||
|
|
da061792f7 | ||
|
|
9b28485afb | ||
|
|
48e1790736 | ||
|
|
193303670d | ||
|
|
6b79b75652 | ||
|
|
2026c59a47 | ||
|
|
b088feca44 | ||
|
|
2a67bc2983 | ||
|
|
708d2c5339 | ||
|
|
6ba91435b6 | ||
|
|
cc4ecab6d9 | ||
|
|
00b8d51142 | ||
|
|
612b9513f7 | ||
|
|
6daf395fdf | ||
|
|
85a89da9e5 | ||
|
|
ba684ca92b | ||
|
|
32169e5a09 | ||
|
|
ce2e9874cf | ||
|
|
f98c2dc51e |
||
|
|
7785580e74 | ||
|
|
9193b50402 | ||
|
|
64f6480b28 | ||
|
|
3a4ebf1d5a | ||
|
|
41a2f254c4 | ||
|
|
25acd21aaf | ||
|
|
781198e29a | ||
|
|
c9afd4ef64 | ||
|
|
45c798babc | ||
|
|
693893344c | ||
|
|
b008bdc8c9 | ||
|
|
38424fa029 | ||
|
|
65986160a5 | ||
|
|
3158cee071 | ||
|
|
ba60d27788 |
12 changed files with 324 additions and 79 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
1
|
||||||
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -4,3 +4,10 @@
|
||||||
/opencc-0.4.0.tar.gz
|
/opencc-0.4.0.tar.gz
|
||||||
/opencc-0.4.3.tar.gz
|
/opencc-0.4.3.tar.gz
|
||||||
/OpenCC-ver.1.0.2.tar.gz
|
/OpenCC-ver.1.0.2.tar.gz
|
||||||
|
/OpenCC-ver.1.0.3.tar.gz
|
||||||
|
/OpenCC-ver.1.0.5.tar.gz
|
||||||
|
/OpenCC-ver.1.1.1.tar.gz
|
||||||
|
/OpenCC-ver.1.1.2.tar.gz
|
||||||
|
/OpenCC-ver.1.1.4.tar.gz
|
||||||
|
/OpenCC-ver.1.1.7.tar.gz
|
||||||
|
/OpenCC-ver.1.1.9.tar.gz
|
||||||
|
|
|
||||||
35
opencc-check-bounds.patch
Normal file
35
opencc-check-bounds.patch
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
Index: OpenCC-ver.1.0.5/src/BinaryDict.cpp
|
||||||
|
===================================================================
|
||||||
|
--- OpenCC-ver.1.0.5.orig/src/BinaryDict.cpp
|
||||||
|
+++ OpenCC-ver.1.0.5/src/BinaryDict.cpp
|
||||||
|
@@ -63,6 +63,12 @@ void BinaryDict::SerializeToFile(FILE* f
|
||||||
|
}
|
||||||
|
|
||||||
|
BinaryDictPtr BinaryDict::NewFromFile(FILE* fp) {
|
||||||
|
+ size_t offsetBound, savedOffset;
|
||||||
|
+ savedOffset = ftell(fp);
|
||||||
|
+ fseek(fp, 0L, SEEK_END);
|
||||||
|
+ offsetBound = ftell(fp) - savedOffset;
|
||||||
|
+ fseek(fp, savedOffset, SEEK_SET);
|
||||||
|
+
|
||||||
|
BinaryDictPtr dict(new BinaryDict(LexiconPtr(new Lexicon)));
|
||||||
|
|
||||||
|
// Number of items
|
||||||
|
@@ -109,7 +115,7 @@ BinaryDictPtr BinaryDict::NewFromFile(FI
|
||||||
|
// Key offset
|
||||||
|
size_t keyOffset;
|
||||||
|
unitsRead = fread(&keyOffset, sizeof(size_t), 1, fp);
|
||||||
|
- if (unitsRead != 1) {
|
||||||
|
+ if (unitsRead != 1 || keyOffset >= offsetBound) {
|
||||||
|
throw InvalidFormat("Invalid OpenCC binary dictionary (keyOffset)");
|
||||||
|
}
|
||||||
|
const char* key = dict->keyBuffer.c_str() + keyOffset;
|
||||||
|
@@ -118,7 +124,7 @@ BinaryDictPtr BinaryDict::NewFromFile(FI
|
||||||
|
for (size_t j = 0; j < numValues; j++) {
|
||||||
|
size_t valueOffset;
|
||||||
|
unitsRead = fread(&valueOffset, sizeof(size_t), 1, fp);
|
||||||
|
- if (unitsRead != 1) {
|
||||||
|
+ if (unitsRead != 1 || valueOffset >= offsetBound) {
|
||||||
|
throw InvalidFormat("Invalid OpenCC binary dictionary (valueOffset)");
|
||||||
|
}
|
||||||
|
const char* value = dict->valueBuffer.c_str() + valueOffset;
|
||||||
30
opencc-fixes-cmake-vars.patch
Normal file
30
opencc-fixes-cmake-vars.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
commit 01d0b4c88711daf697223be1aee78940f82b983e
|
||||||
|
Author: Peng Wu <pwu@redhat.com>
|
||||||
|
Date: Mon Aug 11 16:22:12 2025 +0800
|
||||||
|
|
||||||
|
Update for https://fedoraproject.org/wiki/Changes/CMake_drop_install_vars
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index b79e5b5..d5974f1 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -21,6 +21,7 @@ cmake_minimum_required(VERSION 3.5)
|
||||||
|
set (PACKAGE_NAME opencc)
|
||||||
|
project (${PACKAGE_NAME} CXX)
|
||||||
|
include (CTest)
|
||||||
|
+include(GNUInstallDirs)
|
||||||
|
|
||||||
|
######## Options
|
||||||
|
option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF)
|
||||||
|
@@ -78,6 +79,11 @@ endif()
|
||||||
|
|
||||||
|
######## Directory
|
||||||
|
|
||||||
|
+set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "")
|
||||||
|
+if(CMAKE_INSTALL_LIBDIR MATCHES "lib64$")
|
||||||
|
+ set(LIB_SUFFIX 64)
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
set (DIR_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||||
|
set (DIR_INCLUDE ${DIR_PREFIX}/include)
|
||||||
|
set (DIR_SHARE ${DIR_PREFIX}/share)
|
||||||
|
|
@ -1,58 +1,22 @@
|
||||||
Index: OpenCC-ver.1.0.2/doc/CMakeLists.txt
|
Index: OpenCC-ver.1.1.9/CMakeLists.txt
|
||||||
===================================================================
|
===================================================================
|
||||||
--- OpenCC-ver.1.0.2.orig/doc/CMakeLists.txt
|
--- OpenCC-ver.1.1.9.orig/CMakeLists.txt
|
||||||
+++ OpenCC-ver.1.0.2/doc/CMakeLists.txt
|
+++ OpenCC-ver.1.1.9/CMakeLists.txt
|
||||||
@@ -29,7 +29,7 @@ if(BUILD_DOCUMENTATION)
|
@@ -154,7 +154,7 @@ add_definitions(
|
||||||
DIRECTORY
|
|
||||||
${CMAKE_BINARY_DIR}/doc/html
|
|
||||||
DESTINATION
|
|
||||||
- ${DIR_SHARE_OPENCC}doc
|
|
||||||
+ ${DIR_SHARE_OPENCC}/doc
|
|
||||||
)
|
|
||||||
|
|
||||||
set_directory_properties(
|
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||||
Index: OpenCC-ver.1.0.2/CMakeLists.txt
|
add_definitions(
|
||||||
===================================================================
|
- -std=c++14
|
||||||
--- OpenCC-ver.1.0.2.orig/CMakeLists.txt
|
+ -std=c++17
|
||||||
+++ OpenCC-ver.1.0.2/CMakeLists.txt
|
-Wall
|
||||||
@@ -66,10 +66,10 @@ set(CMAKE_MACOSX_RPATH 1)
|
)
|
||||||
######## Directory
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
|
||||||
|
@@ -163,7 +163,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "
|
||||||
set (DIR_PREFIX ${CMAKE_INSTALL_PREFIX})
|
endif ()
|
||||||
-set (DIR_INCLUDE ${DIR_PREFIX}/include/)
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
-set (DIR_SHARE ${DIR_PREFIX}/share/)
|
add_definitions(
|
||||||
-set (DIR_ETC ${DIR_PREFIX}/etc/)
|
- -std=c++14
|
||||||
-set (DIR_LIBRARY ${DIR_PREFIX}/lib/)
|
+ -std=c++17
|
||||||
+set (DIR_INCLUDE ${INCLUDE_INSTALL_DIR})
|
-Wall
|
||||||
+set (DIR_SHARE ${SHARE_INSTALL_PREFIX})
|
)
|
||||||
+set (DIR_ETC ${SYSCONF_INSTALL_DIR})
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
|
||||||
+set (DIR_LIBRARY ${LIB_INSTALL_DIR})
|
|
||||||
|
|
||||||
if (DEFINED SHARE_INSTALL_PREFIX)
|
|
||||||
set (DIR_SHARE ${SHARE_INSTALL_PREFIX})
|
|
||||||
@@ -83,8 +83,8 @@ if (DEFINED SYSCONF_INSTALL_DIR)
|
|
||||||
set (DIR_ETC ${SYSCONF_INSTALL_DIR})
|
|
||||||
endif (DEFINED SYSCONF_INSTALL_DIR)
|
|
||||||
|
|
||||||
-set (DIR_SHARE_OPENCC ${DIR_SHARE}opencc/)
|
|
||||||
-set (DIR_SHARE_LOCALE ${DIR_SHARE}locale/)
|
|
||||||
+set (DIR_SHARE_OPENCC ${DIR_SHARE}/opencc/)
|
|
||||||
+set (DIR_SHARE_LOCALE ${DIR_SHARE}/locale/)
|
|
||||||
|
|
||||||
######## Configuration
|
|
||||||
|
|
||||||
Index: OpenCC-ver.1.0.2/src/CMakeLists.txt
|
|
||||||
===================================================================
|
|
||||||
--- OpenCC-ver.1.0.2.orig/src/CMakeLists.txt
|
|
||||||
+++ OpenCC-ver.1.0.2/src/CMakeLists.txt
|
|
||||||
@@ -83,8 +83,8 @@ endif (CMAKE_BUILD_TYPE MATCHES Debug)
|
|
||||||
install(
|
|
||||||
TARGETS
|
|
||||||
libopencc
|
|
||||||
- LIBRARY DESTINATION lib
|
|
||||||
- ARCHIVE DESTINATION lib/static
|
|
||||||
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
|
||||||
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}/static
|
|
||||||
)
|
|
||||||
|
|
||||||
install(
|
|
||||||
|
|
|
||||||
13
opencc-fixes-compile.patch
Normal file
13
opencc-fixes-compile.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
Index: OpenCC-ver.1.1.9/src/SerializedValues.hpp
|
||||||
|
===================================================================
|
||||||
|
--- OpenCC-ver.1.1.9.orig/src/SerializedValues.hpp
|
||||||
|
+++ OpenCC-ver.1.1.9/src/SerializedValues.hpp
|
||||||
|
@@ -18,6 +18,8 @@
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
+#include <cstdint>
|
||||||
|
+
|
||||||
|
#include "Common.hpp"
|
||||||
|
#include "SerializableDict.hpp"
|
||||||
|
|
||||||
44
opencc-fixes-crash.patch
Normal file
44
opencc-fixes-crash.patch
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
commit cfe3ced00bbf764f68f10222b9d2a6367c2c3f82
|
||||||
|
Author: Peng Wu <pwu@redhat.com>
|
||||||
|
Date: Tue Mar 25 13:43:05 2025 +0800
|
||||||
|
|
||||||
|
Fix crash when read the config file
|
||||||
|
|
||||||
|
diff --git a/src/Config.cpp b/src/Config.cpp
|
||||||
|
index a8392b1..5c768c0 100644
|
||||||
|
--- a/src/Config.cpp
|
||||||
|
+++ b/src/Config.cpp
|
||||||
|
@@ -16,6 +16,7 @@
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+#include <sys/stat.h>
|
||||||
|
#include <fstream>
|
||||||
|
#include <list>
|
||||||
|
#include <unordered_map>
|
||||||
|
@@ -216,6 +217,16 @@ std::string GetParentDirectory(const std::string& path) {
|
||||||
|
return path.substr(0, pos + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool isRegularFile(const std::string& path) {
|
||||||
|
+ struct stat info;
|
||||||
|
+
|
||||||
|
+ if (stat(path.c_str(), &info) != 0)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ // Check if it's a regular file
|
||||||
|
+ return (info.st_mode & S_IFMT) == S_IFREG;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
Config::Config() : internal(new ConfigInternal()) {}
|
||||||
|
@@ -241,6 +252,8 @@ ConverterPtr Config::NewFromFile(const std::string& fileName,
|
||||||
|
impl->paths.push_back(PACKAGE_DATA_DIRECTORY);
|
||||||
|
}
|
||||||
|
std::string prefixedFileName = impl->FindConfigFile(fileName);
|
||||||
|
+ if (!isRegularFile(prefixedFileName))
|
||||||
|
+ throw FileNotFound(prefixedFileName);
|
||||||
|
std::ifstream ifs(UTF8Util::GetPlatformString(prefixedFileName));
|
||||||
|
std::string content(std::istreambuf_iterator<char>(ifs),
|
||||||
|
(std::istreambuf_iterator<char>()));
|
||||||
160
opencc.spec
160
opencc.spec
|
|
@ -1,17 +1,22 @@
|
||||||
Name: opencc
|
Name: opencc
|
||||||
Version: 1.0.2
|
Version: 1.1.9
|
||||||
Release: 2%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Libraries for Simplified-Traditional Chinese Conversion
|
Summary: Libraries for Simplified-Traditional Chinese Conversion
|
||||||
License: ASL 2.0
|
License: Apache-2.0
|
||||||
Group: System Environment/Libraries
|
|
||||||
URL: https://github.com/BYVoid/OpenCC
|
URL: https://github.com/BYVoid/OpenCC
|
||||||
# Source URL: https://github.com/BYVoid/OpenCC/archive/ver.%{version}.tar.gz
|
Source0: https://github.com/BYVoid/OpenCC/archive/ver.%{version}.tar.gz#/OpenCC-ver.%{version}.tar.gz
|
||||||
Source0: OpenCC-ver.%{version}.tar.gz
|
Patch0: opencc-fixes-compile.patch
|
||||||
Patch1: opencc-fixes-cmake.patch
|
Patch1: opencc-fixes-crash.patch
|
||||||
|
Patch2: opencc-fixes-cmake.patch
|
||||||
|
Patch3: opencc-fixes-cmake-vars.patch
|
||||||
|
|
||||||
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
|
BuildRequires: python3
|
||||||
|
BuildRequires: marisa-devel
|
||||||
|
BuildRequires: rapidjson-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
OpenCC is a library for converting characters and phrases between
|
OpenCC is a library for converting characters and phrases between
|
||||||
|
|
@ -19,7 +24,6 @@ Traditional Chinese and Simplified Chinese.
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for OpenCC
|
Summary: Documentation for OpenCC
|
||||||
Group: Applications/Text
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
|
|
@ -28,7 +32,6 @@ Doxygen generated documentation for OpenCC.
|
||||||
|
|
||||||
%package tools
|
%package tools
|
||||||
Summary: Command line tools for OpenCC
|
Summary: Command line tools for OpenCC
|
||||||
Group: Applications/Text
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
%description tools
|
%description tools
|
||||||
|
|
@ -38,7 +41,6 @@ for building dictionaries.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for OpenCC
|
Summary: Development files for OpenCC
|
||||||
Group: Development/Libraries
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
|
|
@ -47,26 +49,20 @@ developing applications that use %{name}.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n OpenCC-ver.%{version}
|
%autosetup -n OpenCC-ver.%{version} -p1
|
||||||
%patch1 -p1 -b .cmake
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake . -DENABLE_GETTEXT:BOOL=ON -DBUILD_DOCUMENTATION:BOOL=ON
|
%cmake -DENABLE_GETTEXT:BOOL=ON -DBUILD_DOCUMENTATION:BOOL=ON -DUSE_SYSTEM_MARISA:BOOL=ON -DUSE_SYSTEM_RAPIDJSON:BOOL=ON
|
||||||
make VERBOSE=1 %{?_smp_mflags}
|
%cmake_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
%cmake_install
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
ctest
|
%ctest
|
||||||
|
|
||||||
#%find_lang %{name}
|
#%find_lang %{name}
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc AUTHORS LICENSE README.md
|
%doc AUTHORS LICENSE README.md
|
||||||
%{_libdir}/lib*.so.*
|
%{_libdir}/lib*.so.*
|
||||||
|
|
@ -78,14 +74,134 @@ ctest
|
||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
#%{_datadir}/man/man1/*
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%{_includedir}/*
|
%{_includedir}/*
|
||||||
%{_libdir}/*.so
|
%{_libdir}/*.so
|
||||||
%{_libdir}/pkgconfig/*.pc
|
%{_libdir}/pkgconfig/*.pc
|
||||||
|
%{_libdir}/cmake/opencc/OpenCC*.cmake
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 21 2025 Peng Wu <pwu@redhat.com> - 1.1.9-5
|
||||||
|
- Update CI tests
|
||||||
|
- Resolves: RHBZ#2382996
|
||||||
|
|
||||||
|
* Tue Aug 12 2025 Peng Wu <pwu@redhat.com> - 1.1.9-4
|
||||||
|
- Update for https://fedoraproject.org/wiki/Changes/CMake_drop_install_vars
|
||||||
|
- Resolves: RHBZ#2381327
|
||||||
|
|
||||||
|
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.9-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 17 2025 Peng Wu <pwu@redhat.com> - 1.1.9-2
|
||||||
|
- Update for marisa 0.3.0
|
||||||
|
|
||||||
|
* Thu Feb 6 2025 Peng Wu <pwu@redhat.com> - 1.1.9-1
|
||||||
|
- Update to 1.1.9
|
||||||
|
- Resolves: RHBZ#2340967
|
||||||
|
|
||||||
|
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.7-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.7-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Feb 2 2024 Peng Wu <pwu@redhat.com> - 1.1.7-1
|
||||||
|
- Update to 1.1.7
|
||||||
|
- Resolves: RHBZ#2261417
|
||||||
|
|
||||||
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu May 18 2023 Peng Wu <pwu@redhat.com> - 1.1.4-3
|
||||||
|
- Migrate to SPDX license
|
||||||
|
|
||||||
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Oct 21 2022 Peng Wu <pwu@redhat.com> - 1.1.4-1
|
||||||
|
- Update to 1.1.4
|
||||||
|
|
||||||
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Aug 2 2021 Peng Wu <pwu@redhat.com> - 1.1.2-1
|
||||||
|
- Update to 1.1.2
|
||||||
|
|
||||||
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Aug 4 2020 Peng Wu <pwu@redhat.com> - 1.1.1-1
|
||||||
|
- Update to 1.1.1
|
||||||
|
|
||||||
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-8
|
||||||
|
- Second attempt - Rebuilt for
|
||||||
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Oct 17 2018 Peng Wu <pwu@redhat.com> - 1.0.5-3
|
||||||
|
- Security fix for CVE-2018-16982
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jun 28 2018 Peng Wu <pwu@redhat.com> - 1.0.5-1
|
||||||
|
- Update to 1.0.5
|
||||||
|
|
||||||
|
* Mon Mar 19 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.3-7
|
||||||
|
- Update Python 2 dependency declarations to new packaging standards
|
||||||
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||||
|
|
||||||
|
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Feb 16 2016 Peng Wu <pwu@redhat.com> - 1.0.3-1
|
||||||
|
- Update to 1.0.3
|
||||||
|
|
||||||
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.0.2-3
|
||||||
|
- Rebuilt for GCC 5 C++11 ABI change
|
||||||
|
|
||||||
* Mon Jan 19 2015 Peng Wu <pwu@redhat.com> - 1.0.2-2
|
* Mon Jan 19 2015 Peng Wu <pwu@redhat.com> - 1.0.2-2
|
||||||
- Fixes postun script
|
- Fixes postun script
|
||||||
|
|
||||||
|
|
|
||||||
5
plans/basic.fmf
Normal file
5
plans/basic.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
summary: Basic smoke test
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
execute:
|
||||||
|
how: tmt
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
9909d78a3765eab3165573cf08b51ed9 OpenCC-ver.1.0.2.tar.gz
|
SHA512 (OpenCC-ver.1.1.9.tar.gz) = 713cf00931d7616994eb455eef3bc893096b5cd6d42b346aa1130591752d9612891ea3ed035bd7bd4ec7df1c90425e86375f5b3337fac11663c656c79a8f33e9
|
||||||
|
|
|
||||||
5
tests/main.fmf
Normal file
5
tests/main.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
test: ./runtest.sh
|
||||||
|
duration: 50m
|
||||||
|
framework: beakerlib
|
||||||
|
require:
|
||||||
|
- opencc-tools
|
||||||
25
tests/runtest.sh
Executable file
25
tests/runtest.sh
Executable file
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlShowPackageVersion opencc
|
||||||
|
rlRun -t -l "VERSION=$(rpm -q opencc --queryformat='%{version}')" 0 "Get VERSION"
|
||||||
|
FEDORA_VERSION=$(rlGetDistroRelease)
|
||||||
|
rlLog "FEDORA_VERSION=${DISTRO_RELEASE}"
|
||||||
|
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
|
||||||
|
rlRun "pushd $tmp"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest
|
||||||
|
rlRun "set -o pipefail"
|
||||||
|
rlRun "echo '测试'>input.txt" 0 "Generate input.txt"
|
||||||
|
rlRun "opencc -i input.txt -o output.txt" 0 "Run opencc tool"
|
||||||
|
rlRun "grep '測試' output.txt" 0 "Check output.txt"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $tmp" 0 "Remove tmp directory"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalEnd
|
||||||
Loading…
Add table
Add a link
Reference in a new issue