3 PRAGMA application_id = 0x5a504442;
4 PRAGMA user_version = 1;
6 -- should be faster with rowid due to the blob content
7 -- these are really just blobs of data
16 -- information about packages
17 -- a package is identified by a package,version,release triple
18 create table packages (
20 version text, -- the upstream version string
21 release integer, -- the local release number
25 licenses text, -- hash of actual license? need table for more than one?
27 build_time integer default (strftime('%s', 'now')),
29 checksum text, -- checksum of package contents. null for incompleted packages
30 primary key (package,version,release)
35 -- files contained in a package
36 create table packagefiles (
42 path text, -- filesystem path
43 mode text, -- perms, use text for octal rep?
44 username text, -- name of owner
45 groupname text, -- group of owner
46 uid integer, -- numeric uid, generally ignored
47 gid integer, -- numeric gid, generally ignored
48 --filetype integer default 0, -- 0 regular file, 1 directory, 2 symlink
49 -- regular file if null target and not null hash
50 -- except that we could not know the hash, or care
51 -- directory if null hash and null target
52 -- symlink if null hash and not null target
53 -- hard link if not null hash and not null target
54 -- device special files add dev number column
55 -- fifos add mode? Can encode filetype in mode.
56 target text, -- link target for symlinks
57 hash text, -- null if no actual content, i.e. anything but a regular file
58 mtime integer, -- seconds since epoch, finer resolution probably not needed
59 primary key (package,version,release,path),
60 foreign key (package,version,release) references packages (package,version,release) on delete cascade
65 create table elfinfo (
66 file text, -- hash of blob
68 foreign key (file) references files on delete cascade
71 -- TODO just elf information?
72 -- and just hash, not package?
73 create table elflibraries (
74 file text primary key,
76 foreign key (file) references files on delete cascade
81 create table elfneeded (
83 needed text, -- soname of dependency
84 primary key (file, needed),
85 foreign key (file) references files on delete cascade
90 -- package scripts: table of package, stage, file
91 create table scripts (
99 -- package dependencies: table of package, dependency, dep type (package, soname)
100 create table packagedeps (
104 required text, -- package name
105 -- following can be null for not checked
113 create table provides (
116 label text -- a capability label
119 create table requires (
122 label text -- a capability label
125 create table packagegroups (