xref: /freebsd/contrib/file/magic/Magdir/apt (revision d8a0fe102c0cfdfcd5b818f850eff09d8536c9bc)
1
2#------------------------------------------------------------------------------
3# $File: apt,v 1.1 2016/10/17 19:51:57 christos Exp $
4# apt: file(1) magic for APT Cache files
5# <http://www.fifi.org/doc/libapt-pkg-doc/cache.html/ch2.html>
6# <https://anonscm.debian.org/cgit/apt/apt.git/tree/apt-pkg/pkgcache.h#n292>
7
8# before version 10 ("old format"), data was in arch-specific long/short
9
10# old format 64 bit
110   	name		apt-cache-64bit-be
12>12	beshort		1		\b, dirty
13>40 	bequad		x		\b, %llu packages
14>48 	bequad		x		\b, %llu versions
15
16# old format 32 bit
170   	name    	apt-cache-32bit-be
18>8  	beshort 	1		\b, dirty
19>40 	belong  	x		\b, %u packages
20>44 	belong  	x		\b, %u versions
21
22# new format
230	name		apt-cache-be
24>6	byte    	1		\b, dirty
25>24	belong  	x		\b, %u packages
26>28	belong		x		\b, %u versions
27
280	bequad		0x98FE76DC
29>8	ubeshort	<10		APT cache data, version %u
30>>10	beshort	    	x	  	\b.%u, 64 bit big-endian
31>>0	use		apt-cache-64bit-be
32
330	lequad	    	0x98FE76DC
34>8	uleshort    	<10		APT cache data, version %u
35>>10	leshort		x		\b.%u, 64 bit little-endian
36>>0	use		\^apt-cache-64bit-be
37
380	belong	    	0x98FE76DC
39>4	ubeshort    	<10	 	APT cache data, version %u
40>>6	ubeshort    	x		\b.%u, 32 bit big-endian
41>>0	use  		apt-cache-32bit-be
42>4	ubyte	    	>9		APT cache data, version %u
43>>5	ubyte	    	x		\b.%u, big-endian
44>>0	use 		apt-cache-be
45
460	lelong	    	0x98FE76DC
47>4	uleshort    	<10		APT cache data, version %u
48>>6	uleshort   	x		\b.%u, 32 bit little-endian
49>>0	use 		\^apt-cache-32bit-be
50>4	ubyte	    	>9		APT cache data, version %u
51>>5	ubyte	    	x		\b.%u, little-endian
52>>0	use		\^apt-cache-be
53