Bug 1979456

Summary: etckeeper /etc/etckeeper/commit.d/20store-metadata filter_ignore grep fix
Product: [Fedora] Fedora Reporter: Peter Bieringer <pb>
Component: etckeeperAssignee: Thomas Moschny <thomas.moschny>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 34CC: thomas.moschny
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: etckeeper-1.18.17-1.fc34 etckeeper-1.18.17-1.fc35 etckeeper-1.18.17-1.el8 etckeeper-1.18.17-1.el7 etckeeper-1.18.17-1.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-17 14:42:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Bieringer 2021-07-06 06:05:20 UTC
Description of problem:
on one particular system, cron.daily suddenly produces e-mails like:

/etc/cron.daily/etckeeper:

grep: (Standardeingabe): Übereinstimmungen in Binärdatei
grep: (Standardeingabe): Übereinstimmungen in Binärdatei



Version-Release number of selected component (if applicable):
etckeeper-1.18.16-1.fc34.noarch


How reproducible:
always

Steps to Reproduce:
1. etckeeper commit 'daily autocommit'

Actual results:
grep: (Standardeingabe): Übereinstimmungen in Binärdatei
grep: (Standardeingabe): Übereinstimmungen in Binärdatei


Expected results:
no such message, but a proper one like

On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)
	modified:   *** (untracked content)

no changes added to commit (use "git add" and/or "git commit -a")




Additional info:

Traced and finally found the particular "grep" which causes the message

Adding "-a" option will suppress, have still no clue why the input to grep (via the filter pipe) was interpreted as binary at all...but this fix helps:

--- /etc/etckeeper/commit.d/20store-metadata.orig	2021-07-06 08:01:06.749595439 +0200
+++ /etc/etckeeper/commit.d/20store-metadata	2021-07-06 07:57:50.900635852 +0200
@@ -22,7 +22,7 @@
 			git)
 				(git ls-files -oi --exclude-standard; git ls-files -oi --exclude-standard --directory) | sort | uniq > "$listfile" || true
 				if [ -s "$listfile" ]; then
-					sed 's/^\.\///' | grep -xFvf "$listfile"
+					sed 's/^\.\///' | grep -axFvf "$listfile"
 				else
 					cat -
 				fi

Comment 2 Fedora Update System 2022-03-08 23:05:21 UTC
FEDORA-2022-e807ff6933 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-e807ff6933

Comment 3 Fedora Update System 2022-03-08 23:05:22 UTC
FEDORA-2022-6ca441e78a has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-6ca441e78a

Comment 4 Fedora Update System 2022-03-08 23:05:23 UTC
FEDORA-EPEL-2022-61114e4dea has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-61114e4dea

Comment 5 Fedora Update System 2022-03-08 23:05:23 UTC
FEDORA-EPEL-2022-c28760ff69 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-c28760ff69

Comment 6 Fedora Update System 2022-03-08 23:05:24 UTC
FEDORA-2022-b500914ffc has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b500914ffc

Comment 7 Fedora Update System 2022-03-09 15:46:04 UTC
FEDORA-2022-b500914ffc has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-b500914ffc`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-b500914ffc

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2022-03-09 19:51:37 UTC
FEDORA-2022-6ca441e78a has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-6ca441e78a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-6ca441e78a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2022-03-09 20:13:09 UTC
FEDORA-2022-e807ff6933 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-e807ff6933`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-e807ff6933

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2022-03-09 20:40:53 UTC
FEDORA-EPEL-2022-c28760ff69 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-c28760ff69

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2022-03-09 20:42:42 UTC
FEDORA-EPEL-2022-61114e4dea has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-61114e4dea

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2022-03-17 14:42:19 UTC
FEDORA-2022-e807ff6933 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2022-03-17 15:45:35 UTC
FEDORA-2022-6ca441e78a has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2022-03-17 16:11:24 UTC
FEDORA-EPEL-2022-61114e4dea has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2022-03-17 16:14:20 UTC
FEDORA-EPEL-2022-c28760ff69 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2022-03-26 15:15:25 UTC
FEDORA-2022-b500914ffc has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.