Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 482658 - sys-apps/openrc-9999 - Create changelog from git
Summary: sys-apps/openrc-9999 - Create changelog from git
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-27 10:37 UTC by Thomas Deutschmann (RETIRED)
Modified: 2013-09-17 16:12 UTC (History)
1 user (show)

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-27 10:37:04 UTC
Hi,

this is an enhancement for sys-apps/openrc's live ebuild, to create a changelog from git's commit messages:

--- sys-apps/openrc/openrc-9999.ebuild.old	2013-08-27 12:22:57.000000000 +0200
+++ sys-apps/openrc/openrc-9999.ebuild	2013-08-27 12:30:47.000000000 +0200
@@ -52,6 +52,13 @@
 		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 to chdir back to previous directory"
+	fi
 
 	# Allow user patches to be applied without modifying the ebuild
 	epatch_user
@@ -143,6 +150,10 @@
 	if use newnet; then
 		dodoc README.newnet
 	fi
+	
+	if [[ ${PV} == 9999* ]] ; then
+		dodoc ChangeLog
+	fi
 }
 
 add_boot_init() {

Reproducible: Always
Comment 1 William Hubbs gentoo-dev 2013-08-27 17:35:14 UTC
There are a couple of reasons I'm not really interested in this.

First, you can view the changelog with git itself, or by going to
https://github.com/OpenRc/openrc and viewing them there.

Another thing to consider is that this changelog includes all changes
from the very beginning of the history, so it will continually grow with
each update.

Another consideration is that if we do this for the live ebuild, we
would need to do the same for each release, and there isn't an easy way
to do that and have the ChangeLog included in the tarball.

Also, in the future, please do not put patches inline in bug comments;
they are useless there since they cannot be applied to the ebuild.
Please attach them to the bug instead.
Comment 2 William Hubbs gentoo-dev 2013-09-03 16:17:56 UTC
I will take a look at this again, reopening.
Comment 3 William Hubbs gentoo-dev 2013-09-17 16:12:47 UTC
I have migrated to the newest git eclass.
Since we use shallow clones by default now, this patch will not work.
I don't know the exact reason for switching to shallow clones other than
to save space in the distfiles directory and maybe to cut down on
processing time since we do not download all of the history now.
Feel free to reopen if you are still interested in this and you find
another way to make it work.