Skip to content
Unverified Commit 7a961cf0 authored by Maximilian Bosch's avatar Maximilian Bosch
Browse files

osquery: fix build

We use `dpkg` 1.19.2 since 23661254.
This version dropped pkg_db_reset` in  `<dpkg/dpkg_db.h>` which broke compilation with the
following errors:

```
/build/source/osquery/tables/system/linux/deb_packages.cpp: In function 'void osquery::tables::dpkg_setup(pkg_array*)':
/build/source/osquery/tables/system/linux/deb_packages.cpp:83:3: error: 'pkg_array_init_from_db' was not declared in this scope
   pkg_array_init_from_db(packages);
   ^~~~~~~~~~~~~~~~~~~~~~
/build/source/osquery/tables/system/linux/deb_packages.cpp:83:3: note: suggested alternative: 'pkg_array_init_from_hash'
   pkg_array_init_from_db(packages);
   ^~~~~~~~~~~~~~~~~~~~~~
   pkg_array_init_from_hash
/build/source/osquery/tables/system/linux/deb_packages.cpp: In function 'void osquery::tables::dpkg_teardown(pkg_array*)':
/build/source/osquery/tables/system/linux/deb_packages.cpp:93:3: error: 'pkg_db_reset' was not declared in this scope
   pkg_db_reset();
   ^~~~~~~~~~~~
/build/source/osquery/tables/system/linux/deb_packages.cpp:93:3: note: suggested alternative: 'pkg_hash_reset'
   pkg_db_reset();
   ^~~~~~~~~~~~
   pkg_hash_reset
make[2]: *** [osquery/tables/CMakeFiles/osquery_system_tables.dir/build.make:115: osquery/tables/CMakeFiles/osquery_system_tables.dir/system/linux/deb_packages.cpp.o] Error 1
```

As there's currently no upstream fix, it's better to use an older
version of `dpkg` for now.
parent aa21b4b3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment