update to 1.0.4 [release 1.0.4-1mamba;Sat May 07 2022]

This commit is contained in:
Silvan Calarco 2024-02-07 23:52:22 +01:00
parent e5200c5396
commit 78e5e61181
3 changed files with 44 additions and 56 deletions

View File

@ -1,50 +0,0 @@
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

@ -0,0 +1,21 @@
From 1e0515b23b90588ce406669134feca56ddcbbe43 Mon Sep 17 00:00:00 2001
From: FabioLolix <fabio.loli@disroot.org>
Date: Mon, 12 Jun 2023 00:51:49 +0200
Subject: [PATCH] Fix build with gcc 13.1.1
---
src/libappimage/utils/hashlib.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libappimage/utils/hashlib.h b/src/libappimage/utils/hashlib.h
index 45240f7..6b68489 100644
--- a/src/libappimage/utils/hashlib.h
+++ b/src/libappimage/utils/hashlib.h
@@ -1,6 +1,7 @@
#pragma once
// system
+#include <cstdint>
#include <istream>
#include <vector>

View File

@ -1,27 +1,33 @@
Name: libappimage
Version: 1.0.3
Version: 1.0.4
Release: 1mamba
Summary: Implements functionality for dealing with AppImage files
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://appimage.org
URL: https://github.com/AppImage/libappimage
Source: https://github.com/AppImage/libappimage.git/v%{version}/libappimage-%{version}.tar.bz2
Patch0: libappimage-1.0.3-gcc-10.patch
Patch1: libappimage-1.0.4-gcc-13.2.0.patch
License: MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libarchive-devel
BuildRequires: libboost-devel
BuildRequires: libcairo-devel
BuildRequires: libgcc
BuildRequires: libgdk-pixbuf-devel
BuildRequires: libglib-devel
BuildRequires: liblzma-devel
BuildRequires: librsvg-devel
BuildRequires: libsquashfuse-devel
BuildRequires: libstdc++6-devel
BuildRequires: libxdg-utils-cxx-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: cmake
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: libsquashfuse-devel
BuildRequires: libxdg-utils-cxx-devel
%description
Implements functionality for dealing with AppImage files.
@ -39,11 +45,19 @@ This package contains libraries and header files for developing applications tha
%prep
%setup -q
%patch0 -p1
%define _default_patch_fuzz 2
%patch 1 -p1 -b .gcc-13.2.0
%build
%cmake -d build \
-DCMAKE_CXX_FLAGS="%{optflags} -Wno-narrowing -fcommon"
-DCMAKE_C_FLAGS="%{optflags} -ffat-lto-objects" \
-DCMAKE_CXX_FLAGS="%{optflags} -Wno-narrowing -fcommon" \
-DUSE_SYSTEM_XZ=ON \
-DUSE_SYSTEM_SQUASHFUSE=ON \
-DUSE_SYSTEM_LIBARCHIVE=ON \
-DUSE_SYSTEM_BOOST=ON \
-DUSE_SYSTEM_XDGUTILS=ON \
-DBUILD_TESTING=OFF
%make
@ -81,6 +95,9 @@ This package contains libraries and header files for developing applications tha
%doc README.md
%changelog
* Sat May 07 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.4-1mamba
- update to 1.0.4
* Sun Dec 27 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.3-1mamba
- update to 1.0.3