PackageManager just because
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.2 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. package Variables
  2. import (
  3. "os"
  4. )
  5. const (
  6. DatabaseName string = "package_manager.db"
  7. FsHashDatabaseName string = "fs_hash.db"
  8. )
  9. var (
  10. RootDir string = "/"
  11. FsHashPicksBucket []byte = []byte("FilesystemPicks")
  12. FsHashIndexBucket []byte = []byte("FilesystemIndex")
  13. PruneRegexPaths []string = []string{
  14. "^/\\.git$",
  15. "^/dist$",
  16. "^/boot/grub$",
  17. "^/proc$",
  18. "^/dev$",
  19. "^/mnt$",
  20. "^/sys$",
  21. "^/src$",
  22. "^/root$",
  23. "^/home$",
  24. "^/build$",
  25. "^/tools$",
  26. "^/run/user$",
  27. "^/usr/share/zoneinfo-leaps$",
  28. "^/usr/share/zoneinfo$",
  29. "^/usr/share/zsh$",
  30. "^/tmp$",
  31. "^/var/db$",
  32. "^/var/cache$",
  33. "^/var/log$",
  34. "^/var/spool$",
  35. "^/var/lib/texmf$",
  36. "^/var/lib/postgres$",
  37. "^/var/lib/pacman$",
  38. "^/var/lib/NetworkManager$",
  39. "^/var/lib/systemd$",
  40. "^/var/lib/xkb/README.compiled$",
  41. "/lost\\+found$",
  42. }
  43. IgnoreRegexPaths []string = []string{
  44. "^/etc/passwd$",
  45. "^/etc/passwd-$",
  46. "^/etc/group$",
  47. "^/etc/group-$",
  48. "^/var/.updated$",
  49. "^/var/lib/mlocate/mlocate.db$",
  50. "^/var/lib/krb5kdc/kdc.conf$",
  51. "^/var/lib/alsa/asound.state$",
  52. }
  53. )
  54. func init() {
  55. var (
  56. rootDir string
  57. )
  58. rootDir = os.Getenv("ROOTDIR")
  59. if rootDir != "" {
  60. RootDir = rootDir
  61. }
  62. }