OpenSuSE: multi-megabyte binary blob `/etc/udev/hwdb.bin` does not need to be versioned with `etckeeper` – via Unix & Linux Stack Exchange
Posted by jpluimers on 2019/04/22
I wondered [WayBack] linux – Why is this a binary multi-megabyte blob /etc/udev/hwdb.bin
under /etc
? – Unix & Linux Stack Exchange.
All my OpenSuSE systems had the /etc/udev/hwdb.bin
file with sizes varying between 7.5 and 10 megabytes with many of the zypper dist-upgrade
causing updates.
Luckily the system also contains these files which had valid unit definitions, so the file was generated/updated during boot:
/usr/bin/systemd-hwdb
/usr/lib/systemd/system/sysinit.target.wants/systemd-hwdb-update.service
/usr/lib/systemd/system/systemd-hwdb-update.service
Thanks [WayBack] nwildner for answering that question!
So after installing etckeeper
and performing etckeeper init
you can immediately remove it from the git
repository:
# cd /etc
# git rm --cached /etc/udev/hwdb.bin
rm 'udev/hwdb.bin'
# git commit -m "no need for /etc/udev/hwdb.bin to be under revision control as systemd-hwdb maintains it"
For more background, see [WayBack] How to make Git “forget” about a file that was tracked but is now in .gitignore? – Stack Overflow.
–jeroen
Leave a Reply