Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ip7z/7zip #24089

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: add ip7z/7zip #24089

wants to merge 1 commit into from

Conversation

takumin
Copy link
Contributor

@takumin takumin commented Jun 18, 2024

ip7z/7zip: 7-Zip is a file archiver with a high compression ratio

$ aqua g -i ip7z/7zip

Check List

How to confirm if this package works well

Reviewers aren't necessarily familiar with this package, so please describe how to confirm if this package works well.
Please confirm if this package works well yourself as much as possible.

Command and output

  • Binary name for
    • darwin: 7zz
    • linux: 7zzs
    • windows: 7za

Below is the output of the binary for linux:

$ 7zzs

7-Zip (z) 24.06 (x64) : Copyright (c) 1999-2024 Igor Pavlov : 2024-05-26
 64-bit locale=ja_JP.UTF-8 Threads:32 OPEN_MAX:1024, ASM

Usage: 7zz <command> [<switches>...] <archive_name> [<file_names>...] [@listfile]

<Commands>
  a : Add files to archive
  b : Benchmark
  d : Delete files from archive
  e : Extract files from archive (without using directory names)
  h : Calculate hash values for files
  i : Show information about supported formats
  l : List contents of archive
  rn : Rename files in archive
  t : Test integrity of archive
  u : Update files to archive
  x : eXtract files with full paths

<Switches>
  -- : Stop switches and @listfile parsing
  -ai[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : Include archives
  -ax[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : eXclude archives
  -ao{a|s|t|u} : set Overwrite mode
  -an : disable archive_name field
  -bb[0-3] : set output log level
  -bd : disable progress indicator
  -bs{o|e|p}{0|1|2} : set output stream for output/error/progress line
  -bt : show execution time statistics
  -i[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : Include filenames
  -m{Parameters} : set compression Method
    -mmt[N] : set number of CPU threads
    -mx[N] : set compression level: -mx1 (fastest) ... -mx9 (ultra)
  -o{Directory} : set Output directory
  -p{Password} : set Password
  -r[-|0] : Recurse subdirectories for name search
  -sa{a|e|s} : set Archive name mode
  -scc{UTF-8|WIN|DOS} : set charset for console input/output
  -scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} : set charset for list files
  -scrc[CRC32|CRC64|SHA256|SHA1|XXH64|BLAKE2SP|*] : set hash function for x, e, h commands
  -sdel : delete files after compression
  -seml[.] : send archive by email
  -sfx[{name}] : Create SFX archive
  -si[{name}] : read data from stdin
  -slp : set Large Pages mode
  -slt : show technical information for l (List) command
  -snh : store hard links as links
  -snl : store symbolic links as links
  -sni : store NT security information
  -sns[-] : store NTFS alternate streams
  -so : write data to stdout
  -spd : disable wildcard matching for file names
  -spe : eliminate duplication of root folder for extract command
  -spf[2] : use fully qualified file paths
  -ssc[-] : set sensitive case mode
  -sse : stop archive creating, if it can't open some input file
  -ssp : do not change Last Access Time of source files while archiving
  -ssw : compress shared files
  -stl : set archive timestamp from the most recently modified file
  -stm{HexMask} : set CPU thread affinity mask (hexadecimal number)
  -stx{Type} : exclude archive type
  -t{Type} : Set type of archive
  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] : Update options
  -v{Size}[b|k|m|g] : Create volumes
  -w[{path}] : assign Work directory. Empty path means a temporary directory
  -x[r[-|0]][m[-|2]][w[-]]{@listfile|!wildcard} : eXclude filenames
  -y : assume Yes on all queries

If files such as configuration file are needed, please share them.

Reference

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Jun 18, 2024
@suzuki-shunsuke suzuki-shunsuke added this to the v4.196.0 milestone Jun 18, 2024
@takumin
Copy link
Contributor Author

takumin commented Jun 18, 2024

It seems that the following error is output:

get the unarchiver or decompressor by the file extension: get the unarchiver or decompressor by the file extension: format unrecognized by filename: .7z

How to reproduce:

$ cmdx t ip7z/7zip

This is the raw error log:

ERRO[0000] install the package                           aqua_version=2.29.0 env=windows/amd64 error="get the unarchiver or decompressor by the file extension: get the unarchiver or decompressor by the file extension: format unrecognized by filename: .7z" package_name=ip7z/7zip package_version=22.00 program=aqua registry=standard
ERRO[0001] install the package                           aqua_version=2.29.0 env=windows/amd64 error="get the unarchiver or decompressor by the file extension: get the unarchiver or decompressor by the file extension: format unrecognized by filename: .7z" package_name=ip7z/7zip package_version=23.01 program=aqua registry=standard
ERRO[0001] install the package                           aqua_version=2.29.0 env=windows/amd64 error="get the unarchiver or decompressor by the file extension: get the unarchiver or decompressor by the file extension: format unrecognized by filename: .7z" package_name=ip7z/7zip package_version=21.07 program=aqua registry=standard
ERRO[0001] install the package                           aqua_version=2.29.0 env=windows/amd64 error="get the unarchiver or decompressor by the file extension: get the unarchiver or decompressor by the file extension: format unrecognized by filename: .7z" package_name=ip7z/7zip package_version=22.01 program=aqua registry=standard
ERRO[0001] install the package                           aqua_version=2.29.0 env=windows/amd64 error="get the unarchiver or decompressor by the file extension: get the unarchiver or decompressor by the file extension: format unrecognized by filename: .7z" package_name=ip7z/7zip package_version=24.06 program=aqua registry=standard
ERRO[0001] install the package                           aqua_version=2.29.0 env=windows/amd64 error="get the unarchiver or decompressor by the file extension: get the unarchiver or decompressor by the file extension: format unrecognized by filename: .7z" package_name=ip7z/7zip package_version=24.05 program=aqua registry=standard
FATA[0001] aqua failed                                   aqua_version=2.29.0 env=windows/amd64 error="it failed to install some packages" program=aqua

maybe:

Need to remove file extensions?
https://github.com/aquaproj/aqua/blob/v2.29.0/pkg/asset/format.go#L34

Do I need a new Unarchiver or Decompressor for the code below?
https://github.com/aquaproj/aqua/blob/v2.29.0/pkg/unarchive/unarchive.go#L116

For your reference: pure go 7-zip package:
https://github.com/bodgit/sevenzip

Sorry if I'm wrong ;-)

@suzuki-shunsuke
Copy link
Member

aqua doesn't support 7 zip at the moment.

I created an issue to support 7 zip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants