WeBankPartners/we-cmdb

release包解压问题

lin1005q opened this issue · 5 comments

描述您遇到的bug
➜ wecmdb unzip cmdb.zip
Archive: cmdb.zip
error: cannot create CMDB�+-�Φ.md
Illegal byte sequence
creating: image/
inflating: image/webankpartners-cmdb-app.tar
creating: sql/
inflating: sql/init.sql
creating: yamls/
inflating: yamls/1-cmdb-db.yml
inflating: yamls/2-cmdb-app.yml

如何重现
直接解压即可

预期行为

截图

附加

应该是下载的文件不完整导致
https://github.com/WeBankPartners/we-cmdb/releases/download/v1.5.3/cmdb.zip
md5 331fe4944979ecccc8672dfac90735d4
sha1 cdfd91a39b27e9a25cbe021d55f4ed981321004a
e89e5818de3fb44317832f62bf0fe8a0ef396cc560b03b23ceb3c98fb8ee227d
请对比一下hash值,若不相同,可尝试重新下载文件。

➜  wecmdb ls
cmdb.zip image    sql      yamls
➜  wecmdb md5 cmdb.zip
MD5 (cmdb.zip) = 331fe4944979ecccc8672dfac90735d4
➜  wecmdb shasum -a 1 cmdb.zip
cdfd91a39b27e9a25cbe021d55f4ed981321004a  cmdb.zip
➜  wecmdb rm -rf image sql yamls
➜  wecmdb ls
cmdb.zip
➜  wecmdb unzip cmdb.zip
Archive:  cmdb.zip
error:  cannot create CMDB�+-�Φ.md
        Illegal byte sequence
   creating: image/
  inflating: image/webankpartners-cmdb-app.tar
   creating: sql/
  inflating: sql/init.sql
   creating: yamls/
  inflating: yamls/1-cmdb-db.yml
  inflating: yamls/2-cmdb-app.yml

我觉得是包构建脚本的问题,因为我是先下载的之前的版本,出现了这个问题 。后来想换个高版本看看,结果同样如此。

我这里无法重新这个问题,看报错信息,可能是因为不支持.md文件的中文字符,尝试使用其他解压软件试下,md文件只是说明文档,可以单独提取出来查看,不影响部署。
roy@roywu-NB1:Desktop$ md5sum cmdb.zip
331fe4944979ecccc8672dfac90735d4 cmdb.zip
roy@roywu-NB1:/mnt/c/Users/roywu/Desktop$ unzip -v
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.

Compiled with gcc 6.3.0 20170415 for Unix (Linux ELF).

UnZip special compilation options:
ACORN_FTYPE_NFS
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
SYMLINKS (symbolic links supported, if RTL and file system permit)
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars, char coding: UTF-8] (handle UTF-8 paths)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.6, 6-Sept-2010)
VMS_TEXT_CONV
WILD_STOP_AT_DIR
[decryption, version 2.11 of 05 Jan 2007]

UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]
roy@roywu-NB1:Desktop$ unzip cmdb.zip
Archive: cmdb.zip
inflating: CMDB╢└┴в░▓╫░.md
creating: image/
inflating: image/webankpartners-cmdb-app.tar
creating: sql/
inflating: sql/init.sql
creating: yamls/
inflating: yamls/1-cmdb-db.yml
inflating: yamls/2-cmdb-app.yml

Hi,我特意搜了一下,看到这个帖子。确定了问题是因为压缩包内的文件名是gbk编码的。按照文章里面的操作,我已经提取成功了。
https://biang.io/blog/development/tools/os/osx/other/Mac-Zip-package-after-decompression-file-name-appear-garbled-how-to-solve

image

👍