Code Monkey home page Code Monkey logo

Comments (5)

grugnog avatar grugnog commented on June 6, 2024 11

I have been using aconfmgr on my workstation recently and really loving it - thank you for working on this @CyberShadow!

Here is my ignore list - this might be too broad for some people, but I think might be a useful starting place for people who want a more manageable list of configs starting out:

# Boot binaries
IgnorePath '/boot/*.img'
IgnorePath '/boot/*/*.EFI'
IgnorePath '/boot/*/*.efi'
IgnorePath '/boot/vmlin*'
# Certificate databases
IgnorePath '/etc/ca-certificates/extracted/*'
IgnorePath '/etc/ssl/certs/*'
IgnorePath '/etc/pacman.d/gnupg/*'
# Cache and generated files
IgnorePath '/etc/*.cache'
IgnorePath '/etc/*.gen'
# Password files
IgnorePath '/etc/*shadow*'
IgnorePath '/usr/share/*'
# Configuration database
IgnorePath '/etc/dconf'
# Mount files
IgnorePath '*/.updated'
IgnorePath '*/lost+found/*'
# Opt packages (check that they don't include config)
IgnorePath '/opt/*'
# Binary libraries
IgnorePath '/usr/lib/*'
# Local binaries
IgnorePath '/usr/local/include/*'
IgnorePath '/usr/local/lib/*'
IgnorePath '/usr/local/share/applications/mimeinfo.cache'
# Var databases, logs, swap and temp files
IgnorePath '/var/db/sudo'
IgnorePath '/var/lib/*'
IgnorePath '/var/log/*'
IgnorePath '/var/swap*'
IgnorePath '/var/tmp/*'

from aconfmgr.

Dieterbe avatar Dieterbe commented on June 6, 2024 1

Well, there is a comment at the top that says Created automatically by update-mime-database, so that's probably who created it. (Also, it's nice that that comment is there - all auto-generated files ideally ought to have one like that.)

Ah, good point. I wrote a quick script to confirm that indeed the majority of the files are autogenerated. A bunch are not, but are owned by a package. and a couple of them don't have the header and are not package owned. But inspecting them reveals they're either binary files or probably autogenerated in which case i would consider it a bug that they don't have the header.
It seems to me that not tracking files which are package owned but possibly modified, or not marked as autogenerated, may result in an improperly function system when doing an aconfmgr apply, so i'm still skeptical of ignoring all of them. Perhaps we could ignore them if they have the "autogenerated" header...

~ ❯❯❯ cat inspect-usr-share-mime.sh                                                                                                                                                                             ✘ 1 
#!/bin/bash
for file in $(find /usr/share/mime -type f); do
  if egrep -q 'Created automatically by update-mime-database|update-mime-database command' $file; then
    continue
  fi
  if pacman -Qo $file &>/dev/null; then
    continue
  fi
  echo "$file"
done
~ ❯❯❯ ./inspect-usr-share-mime.sh
/usr/share/mime/magic
/usr/share/mime/XMLnamespaces
/usr/share/mime/treemagic
/usr/share/mime/version
/usr/share/mime/icons
/usr/share/mime/mime.cache
/usr/share/mime/types
/usr/share/mime/generic-icons
/usr/share/mime/subclasses
/usr/share/mime/aliases

from aconfmgr.

CyberShadow avatar CyberShadow commented on June 6, 2024

Thanks for filing this. It has been on my list of things for a while. Excerpt from my TODO file:

  • Move default ignore list to default configuration preset; add stuff from my own ignore list
    • Migration: if none of the default ignore paths exist in the configuration, warn and add them (to 10-aconfmgr-default-ignores.sh)
    • Add per-package presets
    • /var/log

and I can't imagine anyone wanting to include the pacman cache either

That should already be excluded by default (/var/cache/pacman is under /var/cache, which is in the current initial value of ignore_paths).

from aconfmgr.

Dieterbe avatar Dieterbe commented on June 6, 2024

How certain are you that everything in '/usr/share/*' is safe to ignore?
I am surprised by the amount of files in there that aren't owned by any package.
E.g. i have ~1000 stray files in /usr/share/mime, a couple tens in /usr/share/icons/ and /usr/share/fonts/, and a one off /usr/share/glib-2.0/schemas/gschemas.compiled

I was expecting these to be installed by postinstall/preinstall hooks, but grepping around a bit in /var/abs looks like many package include fonts and icons as normal (tracked) files in the package, and i couldn't find a reference to the gschemas.compiled. Checking for some "really popular ones" that aconfmgr took as stray, like /usr/share/mime/application/gzip.xml gave me no hits in /var/abs. So not sure where these are coming from.

from aconfmgr.

CyberShadow avatar CyberShadow commented on June 6, 2024

Checking for some "really popular ones" that aconfmgr took as stray, like /usr/share/mime/application/gzip.xml gave me no hits in /var/abs. So not sure where these are coming from.

Well, there is a comment at the top that says Created automatically by update-mime-database, so that's probably who created it. (Also, it's nice that that comment is there - all auto-generated files ideally ought to have one like that.)

from aconfmgr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.