Skip to content

Commit

Permalink
Changed example to include a farther back version of Debian to be mor…
Browse files Browse the repository at this point in the history
…e realistic
  • Loading branch information
fzakaria committed Mar 10, 2024
1 parent ebaf7cf commit 4692d6a
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,37 @@ You can even attach multiple distributions together and query across them.
```console
$ sqlite3 debian.sqlite
> ATTACH './debian-stable-20240211.sqlite' AS 'debian-stable-20240211';
> ATTACH './debian-stable-20230612.sqlite' AS 'debian-stable-20230612';
> ATTACH './debian-buster-20230612.sqlite' AS 'debian-buster-20240211';
> SELECT * FROM pragma_database_list;
seq name file
--- ---------------------- ------------------------------------------------------------
0 main /home/fzakaria/sqlelf/debian.sqlite

2 debian-stable-20240211 /home/sqlelf/debian-stable-20240211.sqlite

3 debian-stable-20230612 /home/fzakaria/sqlelf/debian-stable-20230612.sqlite
3 debian-buster-20230612 /home/fzakaria/debian-buster-20240211.sqlite
```

You can run interesting queries across multiple distributions.

For instance, you can find whether any supported GLIBC version has been added or removed across the two distributions.

```sql
SELECT version
SELECT version, debian_version
FROM (
SELECT version, 20230612 AS debian_version FROM `debian-stable-20230612`.elf_symbols
SELECT version, 'stable' AS debian_version FROM `debian-stable-20240211`.elf_symbols
UNION ALL
SELECT version, 20240211 AS debian_version FROM `debian-stable-20240211`.elf_symbols
SELECT version, 'buster' AS debian_version FROM `debian-buster-20240211`.elf_symbols
)
WHERE version LIKE 'GLIBC\_%' ESCAPE '\'
GROUP BY version
HAVING COUNT(DISTINCT debian_version) = 1;
version debian_version
----------------- --------------
GLIBC_2.30 stable
GLIBC_2.31 stable
GLIBC_2.32 stable
GLIBC_2.35 stable
GLIBC_ABI_DT_RELR stable
```

0 comments on commit 4692d6a

Please sign in to comment.