diff options
author | Christos Zoulas <christos@zoulas.com> | 2022-09-12 13:13:28 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2022-09-12 13:13:28 +0000 |
commit | 18e5da080f6a9b116b04ac07466465557609c67a (patch) | |
tree | 41feb309a2e0f4a094df4bcac3bea44849cf12d3 | |
parent | 5b799130c30f711996d9cd5eb3355e9b138e385f (diff) | |
download | file-git-18e5da080f6a9b116b04ac07466465557609c67a.tar.gz |
Move the magic for GPKG files into gentoo file. Simplify the rule since
we can rely on the format being ustar or ustar-compatible GNU. (Michal Gorny)
-rw-r--r-- | magic/Magdir/archive | 25 | ||||
-rw-r--r-- | magic/Magdir/gentoo | 27 |
2 files changed, 27 insertions, 25 deletions
diff --git a/magic/Magdir/archive b/magic/Magdir/archive index 79153153..758c93ef 100644 --- a/magic/Magdir/archive +++ b/magic/Magdir/archive @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: archive,v 1.168 2022/09/10 13:19:26 christos Exp $ +# $File: archive,v 1.169 2022/09/12 13:13:28 christos Exp $ # archive: file(1) magic for archive formats (see also "msdos" for self- # extracting compressed archives) # @@ -32,9 +32,6 @@ >>>>>>>>0 regex \^[0-9]{2,4}[.](png|jpg|jpeg|tif|tiff|gif|bmp) #foo >>>>>>>>>0 use tar-cbt -# GPKG starts with <directory>/gpkg-1 file ->>>>>>>>0 search/100 /gpkg-1\0 ->>>>>>>>>0 use tar-gpkg # if 1st member name without digits and without used image suffix then it is a TAR archive >>>>>>>>0 default x >>>>>>>>>0 use tar-file @@ -172,26 +169,6 @@ # or maybe like ComicInfo.xml >0 string >\0 \b, 1st image %-.60s -# Summary: Gentoo GLEP 78 binary package -# URL: https://www.gentoo.org/glep/glep-0078.html -# Note: assumes the strict format -0 name tar-gpkg ->0 regex [^/]+ Gentoo GLEP 78 (GPKG) binary package for "%s" -!:mime application/x-tar -!:ext tar -# the logic below requires the gpkg-1 file to be empty ->>124 string 00000000000\0 -# determine the compression used by looking at the second member name ->>>512 search/100 .tar. ->>>>&0 string gz\0 using gzip compression ->>>>&0 string bz2\0 using bzip2 compression ->>>>&0 string lz\0 using lzip compression ->>>>&0 string lz4\0 using lz4 compression ->>>>&0 string lzo\0 using lzo compression ->>>>&0 string xz\0 using xz compression ->>>>&0 string zst\0 using zstd compression ->>>(636.o+1024) search/611 .sig\0 \b, signed - # Incremental snapshot gnu-tar format from: # https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html 0 string GNU\ tar- GNU tar incremental snapshot data diff --git a/magic/Magdir/gentoo b/magic/Magdir/gentoo index 94b5dfc2..f1a91acf 100644 --- a/magic/Magdir/gentoo +++ b/magic/Magdir/gentoo @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: gentoo,v 1.1 2022/09/11 21:04:30 christos Exp $ +# $File: gentoo,v 1.2 2022/09/12 13:13:28 christos Exp $ # gentoo: file(1) magic for gentoo specific formats # # Summary: Gentoo ebuild Manifest files (GLEP 74) @@ -53,3 +53,28 @@ 0 string \<?xml >0 search/512 \<catmetadata Gentoo category metadata file >0 search/512 \<pkgmetadata Gentoo package metadata file + +# Summary: Gentoo GLEP 78 binary package +# Reference: https://www.gentoo.org/glep/glep-0078.html +# Note: assumes the strict format +# Submitted by: Michal Gorny <mgorny@gentoo.org> + +# GPKG uses ustar (or ustar-compatible GNU format) that starts with +# a <directory>/gpkg-1 file +257 string ustar +>0 search/100 /gpkg-1\0 +>>0 regex [^/]+ Gentoo GLEP 78 (GPKG) binary package for "%s" +!:mime application/x-tar +!:ext tar +# the logic below requires the gpkg-1 file to be empty +>>>124 string 00000000000\0 +# determine the compression used by looking at the second member name +>>>>512 search/100 .tar. +>>>>>&0 string gz\0 using gzip compression +>>>>>&0 string bz2\0 using bzip2 compression +>>>>>&0 string lz\0 using lzip compression +>>>>>&0 string lz4\0 using lz4 compression +>>>>>&0 string lzo\0 using lzo compression +>>>>>&0 string xz\0 using xz compression +>>>>>&0 string zst\0 using zstd compression +>>>>(636.o+1024) search/611 .sig\0 \b, signed |