Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 482604 - net-misc/netifrc-9999 - Create changelog from git
Summary: net-misc/netifrc-9999 - Create changelog from git
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: netifrc (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: netifrc Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-08-26 21:22 UTC by Thomas Deutschmann (RETIRED)
Modified: 2013-08-28 16:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2013-08-26 21:22:59 UTC
Hi,

this is an enhancement for net-misc/netifrc's live ebuild, to create a changelog from git's commit messages:

--- netifrc-9999.ebuild.old	2013-08-26 23:12:31.000000000 +0200
+++ netifrc-9999.ebuild	2013-08-26 23:20:12.000000000 +0200
@@ -33,7 +33,14 @@
 		local ver="git-${EGIT_VERSION:0:6}"
 		sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die
 	fi
-
+	
+	if [[ ${PV} == 9999* ]] ; then
+		einfo "Producing ChangeLog from Git history ..."
+		pushd "${S}/.git" >/dev/null || die "Unable to chdir into ${S}/.git"
+		git log > "${S}"/ChangeLog || die "Unable to get logs from git"
+		popd >/dev/null || die "Unable chdir back to previous directory"
+	fi
+	
 	# Allow user patches to be applied without modifying the ebuild
 	epatch_user
 }
@@ -49,6 +56,10 @@
 
 src_install() {
 	emake ${MAKE_ARGS} DESTDIR="${D}" install
+	
+	if [[ ${PV} == 9999* ]] ; then
+		dodoc ChangeLog
+	fi
 }
 
 pkg_postinst() {

Reproducible: Always
Comment 1 William Hubbs gentoo-dev 2013-08-27 17:28:51 UTC
I will let @robbat2 decide whether to do this, but I don't recommend it
since it is possible to view the changes online on the project's gitweb.

Also, in the future, please do not put patches inline in the comments,
but attach them to the bug.
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2013-08-27 18:33:02 UTC
Why I am asking for this change:

1) How should I know *which* version I have installed? Does the version I am using contain a commit, which should fix something I want to test?

2) While testing other live ebuilds a changelog was really helpful, because I knew what has changed. Yes, I can visit some websites but sometimes I am testing without an internet connection...

3) If you are really concerned about the changelog size, you can add add some limits (like --max-count, or stop on merge, add a hard coded start commit each time a new version will be released, so that the changelogs only contains the latest changes since the last release).


William, regarding the inline patch:
I saw Jeroen obsoleting my provided patch attachments in the past. Then I found the "Patches on bug reports: thanks but no thanks for the credit" thread in the gentoo-dev mailing list [1] and thought that this is 'the new standard' now and started to provide my patches inline, so that Jeroen and other bug wranglers will save time.

Please, can I get an official advice if I should revert to attachments or keep those inline patches? Thanks!


See also:
=========
[1] http://article.gmane.org/gmane.linux.gentoo.devel/86566
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-08-28 16:15:52 UTC
InCVS.

axs/williamh:
long-term I would like to package a ChangeLog with it. For users that find their network is broken by a change, they should know what to look at, at least.