update to 1.0.3 [release 1.0.3-1mamba;Sun Dec 27 2020]

This commit is contained in:
Silvan Calarco 2024-01-06 03:47:07 +01:00
parent 107389a5e6
commit e5200c5396
2 changed files with 59 additions and 9 deletions

View File

@ -0,0 +1,50 @@
diff --git a/src/libappimage/utils/StringSanitizer.cpp b/src/libappimage/utils/StringSanitizer.cpp
index fee9f7d..521d82e 100644
--- a/src/libappimage/utils/StringSanitizer.cpp
+++ b/src/libappimage/utils/StringSanitizer.cpp
@@ -13,6 +13,20 @@ std::string StringSanitizer::sanitizeForPath() {
std::vector<std::string::value_type> buffer{};
buffer.reserve(input_.size());
+ // these three lists can be used to compose alphabets for sanitization
+ static constexpr std::initializer_list<std::string::value_type> asciiLetters_ = {
+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
+ 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
+ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+ };
+ static constexpr std::initializer_list<std::string::value_type> asciiDigits_ = {
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+ };
+ static constexpr std::initializer_list<std::string::value_type> pathSafeChars_ = {
+ '.', '-', '_'
+ };
+
// first of all, we compose an alphabet of safe characters
// all characters not contained in this alphabet will be replaced by some safe character, e.g., an underscore (_)
std::vector<std::string::value_type> safeAlphabet{asciiDigits_.size() + asciiLetters_.size() + pathSafeChars_.size()};
diff --git a/src/libappimage/utils/StringSanitizer.h b/src/libappimage/utils/StringSanitizer.h
index 5301ec1..9919ed6 100644
--- a/src/libappimage/utils/StringSanitizer.h
+++ b/src/libappimage/utils/StringSanitizer.h
@@ -10,20 +10,6 @@ class StringSanitizer {
private:
std::string input_;
- // these three lists can be used to compose alphabets for sanitization
- static constexpr std::initializer_list<std::string::value_type> asciiLetters_ = {
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
- 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
- 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- };
- static constexpr std::initializer_list<std::string::value_type> asciiDigits_ = {
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
- };
- static constexpr std::initializer_list<std::string::value_type> pathSafeChars_ = {
- '.', '-', '_'
- };
-
public:
/**
* Default constructor.

View File

@ -1,14 +1,14 @@
Name: libappimage Name: libappimage
Version: 1.0.2 Version: 1.0.3
Release: 2mamba Release: 1mamba
Summary: Implements functionality for dealing with AppImage files Summary: Implements functionality for dealing with AppImage files
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://appimage.org URL: https://appimage.org
## GITSOURCE https://github.com/AppImage/libappimage.git v1.0.2
Source: https://github.com/AppImage/libappimage.git/v%{version}/libappimage-%{version}.tar.bz2 Source: https://github.com/AppImage/libappimage.git/v%{version}/libappimage-%{version}.tar.bz2
Patch0: libappimage-1.0.3-gcc-10.patch
License: MIT License: MIT
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -30,8 +30,7 @@ Implements functionality for dealing with AppImage files.
Group: Development/Libraries Group: Development/Libraries
Summary: Development files for %{name} Summary: Development files for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
## note: you can add this requirement if .pc files are provided by this package Requires: pkg-config
#Requires: pkg-config
%description devel %description devel
This package contains libraries and header files for developing applications that use %{name}. This package contains libraries and header files for developing applications that use %{name}.
@ -40,13 +39,11 @@ This package contains libraries and header files for developing applications tha
%prep %prep
%setup -q %setup -q
%patch0 -p1
%build %build
%cmake -d build \ %cmake -d build \
\ -DCMAKE_CXX_FLAGS="%{optflags} -Wno-narrowing -fcommon"
%ifarch arm
-DCMAKE_CXX_FLAGS="%{optflags} -Wno-narrowing"
%endif
%make %make
@ -84,6 +81,9 @@ This package contains libraries and header files for developing applications tha
%doc README.md %doc README.md
%changelog %changelog
* Sun Dec 27 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.3-1mamba
- update to 1.0.3
* Tue Nov 12 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.2-2mamba * Tue Nov 12 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.2-2mamba
- added debug package - added debug package