Compare commits

..

No commits in common. "cbb978e5149e74713a2601cbe386fe5914843596" and "03827cdc580b320d9beb8dc99688ee8605f5c4d2" have entirely different histories.

5 changed files with 4 additions and 16 deletions

View File

@ -5,12 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.9.0] - 2025-05-09
### Added
- Use zstd when creating and restoring images
## [0.8.4] - 2025-05-09
### Added

View File

@ -101,8 +101,6 @@ def ogCreateImageSyntax (dev, imgfile, tool='partclone', level='gzip'):
'gzip': ' | gzip -c > ',
3: ' | bzip -c > ',
'bzip': ' | bzip -c > ',
4: ' | zstd -c > ',
'zstd': ' | zstd -c > ',
}.get (level, ' > ')
#print (f'param1 ({param1}) param2 ({param2}) param3 ({param3}) imgfile ({imgfile})')
@ -152,8 +150,6 @@ def ogRestoreImageSyntax (imgfile, part, tool=None, level=None):
'gzip': ' gzip -dc ',
3: ' bzip -dc ',
'bzip': ' bzip -dc ',
4: ' zstd -dc ',
'zstd': ' zstd -dc ',
}.get (level, '')
#print (f'tool ({tool}) level ({level}) compressor ({compressor})')
if compressor == '':
@ -599,8 +595,7 @@ def ogGetImageInfo (imgfile):
imgdetect = False
filehead = f'/tmp/{os.path.basename (imgfile)}.infohead'
compressor = subprocess.run (['file', imgfile], capture_output=True, text=True).stdout.split()[1]
if 'Zstandard' == compressor: compressor = 'zstd'
if compressor not in ['gzip', 'lzop', 'zstd']:
if compressor not in ['gzip', 'lzop']:
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_IMAGE, f'Image format is not valid {imgfile}')
return

View File

@ -7,7 +7,6 @@
#*/
import os
import re
import glob
import subprocess

View File

@ -58,7 +58,7 @@ def ogUcastSyntax (op, sess, file=None, device=None, tool=None, level=None):
raise TypeError (f'argument "tool" has unsupported value "{tool}"')
if level is None:
raise TypeError ('missing required argument: "level"')
if level.lower() not in ['lzop', 'gzip', 'zstd']:
if level.lower() not in ['lzop', 'gzip', '0', '1']:
raise TypeError (f'argument "level" has unsupported value "{level}"')
elif 'SENDFILE' == op or 'RECEIVERFILE' == op:
if file is None:
@ -290,7 +290,7 @@ def ogMcastSyntax (op, sess, file=None, device=None, tool=None, level=None):
raise TypeError (f'argument "tool" has unsupported value "{tool}"')
if level is None:
raise TypeError ('missing required argument: "level"')
if level.lower() not in ['lzop', 'gzip', 'zstd']:
if level.lower() not in ['lzop', 'gzip', '0', '1']:
raise TypeError (f'argument "level" has unsupported value "{level}"')
elif 'SENDFILE' == op or 'RECEIVERFILE' == op:
if file is None:

View File

@ -35,7 +35,7 @@ OGLOGCOMMAND='/tmp/command.log'
ACTIONCACHEFULL='NONE' #Que hacer cuando la cache no tenga espacio libre. [ NONE | FORMAT ] ]
RESTOREPROTOCOLNOTCACHE=None #Que protocolo de restauracion usar en el caso de que no exista cache o no exista espacio sufiente. [NONE | UNICAST | MULTICAST].NONE retorna error
IMGPROG='partclone'
IMGCOMP='zstd'
IMGCOMP='lzop'
IMGEXT='img'
IMGREDUCE=True
#OGWINREDUCE=True #Al enviar particion reducir el sistema de archivos previamente.