Update fails due to .gitignore files

I think that commit SHA db488807e44dcc80e51572f22a393631ff569ad3 broke the daily update scripts.

Today my daily update failed with no changes made on my side. I noticed in that commit above that the author removed a lot of .gitignore files.

Output of daily.sh:

  librenms  clete2  /  opt  librenms  sudo -u librenms ./daily.sh
Updating to latest codebase                        FAIL
error: Your local changes to the following files would be overwritten by merge:
	bootstrap/cache/.gitignore
	logs/.gitignore
	rrd/.gitignore
	storage/app/.gitignore
	storage/app/public/.gitignore
	storage/debugbar/.gitignore
	storage/framework/cache/.gitignore
	storage/framework/sessions/.gitignore
	storage/framework/testing/.gitignore
	storage/framework/views/.gitignore
	storage/logs/.gitignore
Please, commit your changes or stash them before you can merge.
Aborting
Updating Composer packages                         OK
Updating SQL-Schema                                OK
Updating submodules                                OK
Cleaning up DB                                     OK
Fetching notifications                             OK
Caching PeeringDB data                             OK

I reset git and updating worked. Just thought I’d post this in case anyone else runs into this issue.

Hello

can you run ./validate.php and post the output please.

Kevin, validate showed me that I had untracked files and I reset git to fix it.

All good now just letting you know.

  librenms  clete2  /  opt  librenms  sudo -u librenms ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.48.1-10-g49f206f
DB Schema | 2019_01_16_195644_add_vrf_id_and_bgpLocalAs (131)
PHP       | 7.0.33
MySQL     | 10.3.12-MariaDB
RRDTool   | 1.4.8
SNMP      | NET-SNMP 5.7.2
====================================

[OK]    Composer Version: 1.8.3
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[WARN]  Your RRD directory is not set to 0775
	[FIX]:
	chmod 775 /opt/librenms/rrd}
[FAIL]  We have found some files that are owned by a different user than librenms, this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
	[FIX]:
	sudo chown -R librenms:librenms /opt/librenms
	sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
	sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
	Files:
	 /opt/librenms/rrd/aws/services-46.rrd
	 /opt/librenms/rrd/aws/services-44.rrd
	 /opt/librenms/rrd/aws/services-43.rrd
	 /opt/librenms/rrd/aws/services-42.rrd
	 /opt/librenms/rrd/aws/services-45.rrd
1 Like

Should really fix this files though that returning in validate.

I’m having the same issue:

Yes this happened after a bad merge.

just run

./scripts/github-remove -d

1 Like

Thank you Kevin, it worked!