diff --git a/CMakeLists.txt b/CMakeLists.txt index ed100e29..e0b5d709 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set_property( GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS ON ) project( sirikali ) -set( PGR_VERSION "1.6.0" ) +set( PGR_VERSION "1.7.0" ) set( COPYRIGHT_YEARS "2016-2024" ) file(WRITE ${PROJECT_BINARY_DIR}/VERSION_INFO "${PGR_VERSION}") diff --git a/changelog b/changelog index 362ec1d6..726ce747 100644 --- a/changelog +++ b/changelog @@ -283,8 +283,10 @@ version 1.4.2(December 18,2019) -- Add support for building with Qt6. -- Add support for securefs version >= 1.0.0. - version 1.7.0(October 01, 2024) + version 1.7.0(November 09, 2024) [WINDOWS] -- Internally manage securefs and make it possible to update it from within the app. [LINUX] -- Internally manage gocryptfs and securefs and make it possible to update them from within the app. + [FLATPAK] +-- Bundle Cryfs along side Securefs and Gocryptfs. diff --git a/src/3rdParty/lxqt_wallet/frontend/CMakeLists.txt b/src/3rdParty/lxqt_wallet/frontend/CMakeLists.txt index d0e4bbb8..0bfe2640 100644 --- a/src/3rdParty/lxqt_wallet/frontend/CMakeLists.txt +++ b/src/3rdParty/lxqt_wallet/frontend/CMakeLists.txt @@ -71,7 +71,7 @@ else() message(STATUS "Checking for modules 'KF6Wallet'") find_package(KF6Wallet QUIET) if(KF6Wallet_FOUND ) - message(STATUS " Found KF5Wallet, version ${KF6Wallet_VERSION}") + message(STATUS " Found KF6Wallet, version ${KF6Wallet_VERSION}") file(APPEND ${PROJECT_BINARY_DIR}/storage_manager.h "\n#define HAS_KWALLET_SUPPORT 1\n") SET(KWALLET_SUPPORT "true") else() diff --git a/src/engines.cpp b/src/engines.cpp index bfdbd922..e0586d68 100644 --- a/src/engines.cpp +++ b/src/engines.cpp @@ -165,6 +165,13 @@ static bool _has_no_extension( const QString& e ) template< typename Function > static QString _executableFullPath( const QString& f,Function function ) { + if( utility::platformIsFlatPak() ){ + + auto m = settings::instance().flatpakIntance().globalBinPath() ; + + return m + "/" + f ; + } + if( utility::platformIsWindows() ){ if( utility::startsWithDriveLetter( f ) ){ @@ -192,15 +199,10 @@ static QString _executableFullPath( const QString& f,Function function ) QString exe ; - auto list = function() ; + auto list = function() ; list.prepend( engines::defaultBinPath() ) ; - if( utility::platformIsFlatPak() ){ - - list.removeAll( "/app/bin" ) ; - } - for( const auto& it : utility::asConst( list ) ){ if( !it.isEmpty() ){ @@ -1416,80 +1418,22 @@ engines::engine::exe_args engines::engine::unMountCommand( const engines::engine } } -struct flatpak_result -{ - bool valid ; - bool src_newer ; -} ; - -static flatpak_result _source_more_recent( const QString& src,const QString& dst ) -{ -#if QT_VERSION >= QT_VERSION_CHECK( 5,10,0 ) - - auto m = QFileInfo( src ).birthTime() ; - - auto e = QFileInfo( dst ).birthTime() ; - - if( m.isValid() && e.isValid() ){ - - return { true,m > e } ; - }else{ - return { false,false } ; - } -#else - Q_UNUSED( src ) - Q_UNUSED( dst ) - - return { false,false } ; -#endif -} - void engines::engine::setUpBinary( bool add, QStringList& apps, const QString& basePath, const QString& exeName ) const { - if( utility::platformIsFlatPak() ){ - - auto src = "/app/bin/" + exeName ; - - if( QFile::exists( src ) ){ - - auto dst = basePath + exeName ; - - if( !QFile::exists( dst ) ){ - - utility::copyFile( src,dst ) ; - - }else if( settings::instance().flatpakUpdated() ){ - - auto m = _source_more_recent( src,dst ) ; + if( !utility::platformIsFlatPak() ){ - if( m.valid ){ + if( add && !QFile::exists( basePath + exeName ) ){ - if( m.src_newer ){ + auto m = exeName ; - QFile::remove( dst ) ; + m[ 0 ] = m[ 0 ].toUpper() ; - utility::copyFile( src,dst ) ; - } - }else{ - QFile::remove( dst ) ; - - utility::copyFile( src,dst ) ; - } - } + apps.append( m ) ; } } - - if( add && !QFile::exists( basePath + exeName ) ){ - - auto m = exeName ; - - m[ 0 ] = m[ 0 ].toUpper() ; - - apps.append( m ) ; - } } void engines::engine::setUpBinary( bool,QStringList&,const QString& ) const diff --git a/src/engines/cryfs.cpp b/src/engines/cryfs.cpp index 8e0ee556..f787f357 100644 --- a/src/engines/cryfs.cpp +++ b/src/engines/cryfs.cpp @@ -23,6 +23,8 @@ #include "options.h" #include "custom.h" +#include "../settings.h" + static engines::engine::BaseOptions _setOptions() { engines::engine::BaseOptions s ; @@ -74,7 +76,8 @@ static engines::engine::BaseOptions _setOptions() auto exe = "flatpak-spawn" ; - auto m = engines::defaultBinPath() + "cryfs-unmount" ; + auto e = settings::instance().flatpakIntance().globalBinPath() ; + auto m = e + "/cryfs-unmount" ; s.unMountCommand = QStringList{ exe,"--host",m,"--immediate","%{mountPoint}" } ; }else{ @@ -116,7 +119,6 @@ bool cryfs::updatable() const void cryfs::setUpBinary( bool add,QStringList& apps,const QString& basePath ) const { - return ; //enable when version 1.0.0 is officially out engines::engine::setUpBinary( add,apps,basePath,"cryfs" ) ; engines::engine::setUpBinary( false,apps,basePath,"cryfs-unmount" ) ; } diff --git a/src/engines/gocryptfs.cpp b/src/engines/gocryptfs.cpp index bc4f1e8d..bece932c 100644 --- a/src/engines/gocryptfs.cpp +++ b/src/engines/gocryptfs.cpp @@ -160,7 +160,11 @@ static bool _set_if_found( const Function& function ) bool gocryptfs::updatable() const { - if( utility::canDownload() ){ + if( utility::platformIsFlatPak() ){ + + return false ; + + }else if( utility::canDownload() ){ return utility::platformIsLinux() ; }else{ diff --git a/src/engines/securefs.cpp b/src/engines/securefs.cpp index 217922db..7c053237 100644 --- a/src/engines/securefs.cpp +++ b/src/engines/securefs.cpp @@ -87,7 +87,11 @@ securefs::securefs() : bool securefs::updatable() const { - if( utility::canDownload() ){ + if( utility::platformIsFlatPak() ){ + + return false ; + + }else if( utility::canDownload() ){ return utility::platformIsLinux() || utility::platformIsWindows() ; }else{ diff --git a/src/flatpak/io.github.mhogomchungu.sirikali.json b/src/flatpak/io.github.mhogomchungu.sirikali.json index dc3e3b33..f4b2ae62 100644 --- a/src/flatpak/io.github.mhogomchungu.sirikali.json +++ b/src/flatpak/io.github.mhogomchungu.sirikali.json @@ -330,8 +330,8 @@ "sources" : [ { "type" : "archive", - "url" : "https://github.com/cryfs/cryfs/archive/refs/tags/1.0.0-rc1.tar.gz", - "sha256" : "79b4d665dd4fed2e4a380930e5c4d8ff458ef803881051cde193743d88168164" + "url" : "https://github.com/cryfs/cryfs/archive/refs/tags/1.0.0.tar.gz", + "sha256" : "8211c1637c2f8c419534c16c207efeae0d506abe9d8c7c0f44003e16a87d80a2" }, { "type" : "patch", @@ -389,7 +389,7 @@ }, { "name" : "io.github.mhogomchungu.sirikali", - "buildsystem" : "cmake-ninja", + "buildsystem" : "cmake", "config-opts" : [ "-DCMAKE_BUILD_TYPE=release", "-DBUILD_FLATPAK=TRUE" diff --git a/src/flatpak/io.github.mhogomchungu.sirikali.metainfo.xml b/src/flatpak/io.github.mhogomchungu.sirikali.metainfo.xml index 31099149..88845f8b 100644 --- a/src/flatpak/io.github.mhogomchungu.sirikali.metainfo.xml +++ b/src/flatpak/io.github.mhogomchungu.sirikali.metainfo.xml @@ -20,7 +20,7 @@ Francis Banyikwa -

This application makes it easy to use Gocryptfs, Securefs and Cryfs to store documents in secured folders.

Securefs and Gocryptfs are bundled with the application and users who prefer to use Cryfs should manually install it first at "~/.var/app/io.github.mhogomchungu.sirikali/data/SiriKali/bin" folder.

+

This application makes it easy to use Gocryptfs, Securefs and Cryfs to store documents in secured folders.

All three tools are bundled with the application

io.github.mhogomchungu.sirikali.desktop @@ -36,6 +36,15 @@ + + https://github.com/mhogomchungu/sirikali/releases/download/$version/sirikali-$version.tar.xz/ + +

Changelog

+
    +
  • Bundle Cryfs along side Securefs and Gocryptfs
  • +
+
+
https://github.com/mhogomchungu/sirikali/releases/download/$version/sirikali-$version.tar.xz/