Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1696417 - Do not change user.email globally
Summary: Do not change user.email globally
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: dionaea
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Ambroz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-04 19:55 UTC by Tuomo Soini
Modified: 2019-04-04 21:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-04 21:05:49 UTC


Attachments (Terms of Use)

Description Tuomo Soini 2019-04-04 19:55:45 UTC
Description of problem:

If anybody clones dionaea from fedora repo and does fedpkg prep, their git config is changed to user.email rpmbuild and user.name rpmbuild.

That is really, really nasty.

Fix for the issue:

diff --git a/dionaea.spec b/dionaea.spec
index 88444b9..196e0f8 100644
--- a/dionaea.spec
+++ b/dionaea.spec
@@ -239,8 +239,8 @@ rm -rf .git
 # Remove the .gitignore to prevent ignoring changes in some files
 rm -f .gitignore
 git init -q
-git config --global user.email "rpmbuild"
-git config --global user.name "rpmbuild"
+git config user.email "rpmbuild"
+git config user.name "rpmbuild"
 git add .
 git commit -a -m "base"

Comment 1 Todd Zullinger 2019-04-04 21:03:54 UTC
This affects all branches, so it's applicable to Fedora as well as EPEL.  I filed https://src.fedoraproject.org/rpms/dionaea/pull-request/2 with the simplest fix (the same one Tuomo used above).  But I did note in the PR comment that this could likely be simplified by allowing %autosetup to initialize the git repo as needed, which includes setting the user.name and user.email values.

Comment 2 Adam Williamson 2019-04-04 21:05:49 UTC
Ugh, what a bad idea that was!

Fixed on all branches (with provenpackager privs), thanks for spotting it.


Note You need to log in before you can comment on or make changes to this bug.