public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCHES] kernel-2.eclass: Various changes requested by users. + [STABLEREQ?] sys-kernel/gentoo-sources-3.8.7: Any objections against stabilizing?
@ 2013-04-12 21:41 Tom Wijsman
  2013-04-13  7:03 ` Fabio Erculiani
  2013-04-14  5:09 ` [gentoo-dev] " Ryan Hill
  0 siblings, 2 replies; 15+ messages in thread
From: Tom Wijsman @ 2013-04-12 21:41 UTC (permalink / raw
  To: gentoo-dev; +Cc: gentoo-kernel


[-- Attachment #1.1: Type: text/plain, Size: 2656 bytes --]

Hello everyone


Attached you will find the various changes I plan to apply to
kernel-2.eclass after a week if there are no objections, feel free to
take a look at them. A summary of the changes:

- Added a warning after the variables that modifying other variables in
  the eclass is not supported, there is a chance that we will not fix
  resulting bugs. Fixes bug #421721.

- Make use of readme.gentoo.eclass to make the user aware of the Gentoo
  Linux Kernel Upgrade Guide only the first time he emerges the
  package. Fixes bug #457598.

- Clarify the default DESCRIPTION and make it not use versions, a
  directory with ebuilds that inherit this eclass may contain multiple
  versions and we also don't want to give the impression that a new
  directory needs to made if that's not the case. Fixes bug #445110.

- Clarified which patch depths are used in the normal output and error
  output when applying patches. Fixes bug #436402.

- Made sure .tmp_gas_check is created inside the temp folder, it
  accidentally created temp.tmp_gas_check instead. Fixes bug #336732.

- Make UNIPATCH_DOCS work again, install 0000_README document when
  using genpatches. Fixes bug #301478.

Since these are quite a few changes, it doesn't hurt posting them here.

I'll also summarize the past commits I made, for those who missed them:

- Kernel sources and (gen)patches now use xz instead of bz2. Fixes bug
  #421721.

- Added sys-devel/bc as a RDEPEND to kernel-2.eclass. Fixes bug
  #461848.

- Use UID 0 instead of root to assign permissions to super user. Fixes
  bug #315807.

The commit diffs can be obtained at http://sources.gentoo.org/

There is a guideline that reporting small changes to barely used
eclasses here is not required, but that made some out-of-tree users
unhappy; sorry for that, I'll try to get every eclass change reviewed
in the future to avoid these issues. Small changes, like the above, I
will try to combine together to avoid unnecessary mail and commit spam.

That being said, since 3.8.7 has landed upstream we would like to hear
about any issues we don't know about yet that would block stabilization;
if we can, I plan to start stabilization in less than two weeks. Unless
there are valid reasons for this to be done earlier/later.

I'll add 3.2.43 and 3.8.7 to the tree in a moment, as it is late 3.0.73
and 3.4.40 will be for tomorrow...

Have a nice day. :)

-- 
With kind regards,

Tom Wijsman (TomWij)
Gentoo Developer

E-mail address  : TomWij@gentoo.org
GPG Public Key  : 6D34E57D
GPG Fingerprint : C165 AF18 AB4C 400B C3D2  ABF0 95B2 1FCD 6D34 E57D

[-- Attachment #1.2: kernel-2.eclass.patches --]
[-- Type: application/octet-stream, Size: 8385 bytes --]

commit 3e92b0b08438d7cf66d325cfc7bbe38bec6b0800
Author: Tom Wijsman <TomWij@live.com>
Date:   Fri Apr 12 15:25:01 2013 +0200

    Added a warning after the variables that modifying other variables in the eclass is not supported, there is a chance that we will not fix resulting bugs. Fixes bug #421721.

diff --git a/kernel-2.eclass b/kernel-2.eclass
index 1e6db22..22be9ed 100644
--- a/kernel-2.eclass
+++ b/kernel-2.eclass
@@ -69,6 +69,10 @@
 # UNIPATCH_STRICTORDER	- if this is set places patches into directories of
 #						  order, so they are applied in the order passed
 
+# Changing any other variable in this eclass is not supported; you can request
+# for additional variables to be added by contacting the current maintainer.
+# If you do change them, there is a chance that we will not fix resulting bugs.
+
 inherit eutils toolchain-funcs versionator multilib
 EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
 

commit ccf6386791e8420269799c219518f42f01103810
Author: Tom Wijsman <TomWij@live.com>
Date:   Fri Apr 12 16:40:56 2013 +0200

    Make use of readme.gentoo.eclass to make the user aware of the Gentoo Linux Kernel Upgrade Guide only the first time he emerges the package. Fixes bug #457598.

diff --git a/kernel-2.eclass b/kernel-2.eclass
index 22be9ed..dc480fb 100644
--- a/kernel-2.eclass
+++ b/kernel-2.eclass
@@ -73,7 +73,7 @@
 # for additional variables to be added by contacting the current maintainer.
 # If you do change them, there is a chance that we will not fix resulting bugs.
 
-inherit eutils toolchain-funcs versionator multilib
+inherit eutils toolchain-funcs versionator multilib readme.gentoo
 EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
 
 # Added by Daniel Ostrow <dostrow@gentoo.org>
@@ -100,6 +100,13 @@ RESTRICT="binchecks strip"
 # set LINUX_HOSTCFLAGS if not already set
 : ${LINUX_HOSTCFLAGS:="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include"}
 
+# Kernel upgrade documentation
+#==============================================================
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+When you plan to upgrade the kernel, you may be interested in the Gentoo Linux
+Kernel Upgrade Guide: http://www.gentoo.org/doc/en/kernel-upgrade.xml"
+
 # debugging functions
 #==============================================================
 # this function exists only to help debug kernel-2.eclass
@@ -781,12 +788,6 @@ postinst_sources() {
 	# Don't forget to make directory for sysfs
 	[[ ! -d ${ROOT}sys ]] && kernel_is 2 6 && mkdir ${ROOT}sys
 
-	echo
-	elog "If you are upgrading from a previous kernel, you may be interested"
-	elog "in the following document:"
-	elog "  - General upgrade guide: http://www.gentoo.org/doc/en/kernel-upgrade.xml"
-	echo
-
 	# if K_EXTRAEINFO is set then lets display it now
 	if [[ -n ${K_EXTRAEINFO} ]]; then
 		echo ${K_EXTRAEINFO} | fmt |
@@ -1191,10 +1192,12 @@ kernel-2_src_install() {
 	install_universal
 	[[ ${ETYPE} == headers ]] && install_headers
 	[[ ${ETYPE} == sources ]] && install_sources
+	readme.gentoo_create_doc
 }
 
 kernel-2_pkg_postinst() {
 	[[ ${ETYPE} == sources ]] && postinst_sources
+	readme.gentoo_print_elog
 }
 
 kernel-2_pkg_setup() {

commit ce71bc155415849dbee18a142459f8ed6296df22
Author: Tom Wijsman <TomWij@live.com>
Date:   Fri Apr 12 17:06:24 2013 +0200

    Clarify the default DESCRIPTION and make it not use versions, a directory with ebuilds that inherit this eclass may contain multiple versions and we also don't want to give the impression that a new directory needs to made if that's not the case. Fixes bug #445110.

diff --git a/kernel-2.eclass b/kernel-2.eclass
index dc480fb..195fd7f 100644
--- a/kernel-2.eclass
+++ b/kernel-2.eclass
@@ -432,7 +432,7 @@ if [[ ${ETYPE} == sources ]]; then
 	PDEPEND="!build? ( virtual/dev-manager )"
 
 	SLOT="${PVR}"
-	DESCRIPTION="Sources for the ${KV_MAJOR}.${KV_MINOR:-$KV_PATCH} linux kernel"
+	DESCRIPTION="Sources based on the Linux Kernel."
 	IUSE="symlink build"
 
 	# Bug #266157, deblob for libre support

commit b0d6bbe5804383549974592e10833678562ceb83
Author: Tom Wijsman <TomWij@live.com>
Date:   Fri Apr 12 17:52:02 2013 +0200

    Clarified which patch depths are used in the normal output and error output when applying patches. Fixes bug #436402.

diff --git a/kernel-2.eclass b/kernel-2.eclass
index 195fd7f..d00f9e8 100644
--- a/kernel-2.eclass
+++ b/kernel-2.eclass
@@ -990,12 +990,12 @@ unipatch() {
 
 			if [ -z "${PATCH_DEPTH}" ]; then PATCH_DEPTH=0; fi
 
-			ebegin "Applying ${i/*\//} (-p${PATCH_DEPTH}+)"
 			while [ ${PATCH_DEPTH} -lt 5 ]; do
 				echo "Attempting Dry-run:" >> ${STDERR_T}
 				echo "cmd: patch -p${PATCH_DEPTH} --no-backup-if-mismatch --dry-run -f < ${i}" >> ${STDERR_T}
 				echo "=======================================================" >> ${STDERR_T}
 				if [ $(patch -p${PATCH_DEPTH} --no-backup-if-mismatch --dry-run -f < ${i} >> ${STDERR_T}) $? -eq 0 ]; then
+					ebegin "Applying ${i/*\//} (-p${PATCH_DEPTH})"
 					echo "Attempting patch:" > ${STDERR_T}
 					echo "cmd: patch -p${PATCH_DEPTH} --no-backup-if-mismatch -f < ${i}" >> ${STDERR_T}
 					echo "=======================================================" >> ${STDERR_T}
@@ -1008,17 +1008,17 @@ unipatch() {
 						eerror "Failed to apply patch ${i/*\//}"
 						eerror "Please attach ${STDERR_T} to any bug you may post."
 						eshopts_pop
-						die "Failed to apply ${i/*\//}"
+						die "Failed to apply ${i/*\//} on patch depth ${PATCH_DEPTH}."
 					fi
 				else
 					PATCH_DEPTH=$((${PATCH_DEPTH} + 1))
 				fi
 			done
 			if [ ${PATCH_DEPTH} -eq 5 ]; then
-				eend 1
+				eerror "Failed to dry-run patch ${i/*\//}"
 				eerror "Please attach ${STDERR_T} to any bug you may post."
 				eshopts_pop
-				die "Unable to dry-run patch."
+				die "Unable to dry-run patch on any patch depth lower than 5."
 			fi
 		done
 	done

commit bedaf8052261a1889d7125683ee0f1acfc561579
Author: Tom Wijsman <TomWij@live.com>
Date:   Fri Apr 12 18:36:04 2013 +0200

    Made sure .tmp_gas_check is created inside the temp folder, it accidentally created temp.tmp_gas_check instead. Fixes bug #336732.

diff --git a/kernel-2.eclass b/kernel-2.eclass
index d00f9e8..c77e7e3 100644
--- a/kernel-2.eclass
+++ b/kernel-2.eclass
@@ -1157,11 +1157,11 @@ kernel-2_src_unpack() {
 	if [[ -n ${KV_MINOR} &&  ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} < 2.6.27 ]]
 	then
 		sed -i \
-			-e 's|TOUT	:= .tmp_gas_check|TOUT	:= $(T).tmp_gas_check|' \
+			-e "s|TOUT	:= .tmp_gas_check|TOUT	:= \"${T}\"/.tmp_gas_check|" \
 			"${S}"/arch/ppc/Makefile
 	else
 		sed -i \
-			-e 's|TOUT	:= .tmp_gas_check|TOUT	:= $(T).tmp_gas_check|' \
+			-e "s|TOUT	:= .tmp_gas_check|TOUT	:= \"${T}\"/.tmp_gas_check|" \
 			"${S}"/arch/powerpc/Makefile
 	fi
 }

commit 6fc0d0fe5636313555f087105ad6b048f876c6fb
Author: Tom Wijsman <TomWij@live.com>
Date:   Fri Apr 12 20:01:46 2013 +0200

    Make UNIPATCH_DOCS work again, install 0000_README document when using genpatches. Fixes bug #301478.

diff --git a/kernel-2.eclass b/kernel-2.eclass
index c77e7e3..c0dc87b 100644
--- a/kernel-2.eclass
+++ b/kernel-2.eclass
@@ -747,6 +747,10 @@ install_sources() {
 	fi
 
 	mv ${WORKDIR}/linux* "${D}"/usr/src
+
+	if [[ -z ${UNIPATCH_DOCS} ]] ; then
+		dodoc ${UNIPATCH_DOCS}
+	fi
 }
 
 # pkg_preinst functions
@@ -1023,13 +1027,23 @@ unipatch() {
 		done
 	done
 
-	# This is a quick, and kind of nasty hack to deal with UNIPATCH_DOCS which
-	# sit in KPATCH_DIR's. This is handled properly in the unipatch rewrite,
-	# which is why I'm not taking too much time over this.
+	# When genpatches is used, we want to install 0000_README which documents
+	# the patches that were used; such that the user can see them, bug #301478.
+	if [[ ! -z ${K_WANT_GENPATCHES} ]] ; then
+		UNIPATCH_DOCS="${UNIPATCH_DOCS} 0000_README"
+	fi
+
+	# When files listed in UNIPATCH_DOCS are found in KPATCH_DIR's, we copy it
+	# to the temporary directory and remember them in UNIPATCH_DOCS to install
+	# them during the install phase.
 	local tmp
-	for i in ${UNIPATCH_DOCS}; do
-		tmp="${tmp} ${i//*\/}"
-		cp -f ${i} "${T}"/
+	for x in ${KPATCH_DIR}; do
+		for i in ${UNIPATCH_DOCS}; do
+			if [[ -f "${x}/${i}" ]] ; then
+				tmp="${tmp} \"${T}/${i}\""
+				cp -f "${x}/${i}" "${T}"/
+			fi
+		done
 	done
 	UNIPATCH_DOCS="${tmp}"
 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-04-14 17:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-12 21:41 [gentoo-dev] [PATCHES] kernel-2.eclass: Various changes requested by users. + [STABLEREQ?] sys-kernel/gentoo-sources-3.8.7: Any objections against stabilizing? Tom Wijsman
2013-04-13  7:03 ` Fabio Erculiani
2013-04-13  9:07   ` Tom Wijsman
2013-04-14  5:09 ` [gentoo-dev] " Ryan Hill
2013-04-14  6:55   ` Tom Wijsman
2013-04-14  8:24     ` Ryan Hill
2013-04-14  8:23       ` Andreas K. Huettel
2013-04-14 10:08         ` Ryan Hill
2013-04-14 10:06           ` Pacho Ramos
2013-04-14 10:52             ` Tom Wijsman
2013-04-14 15:02               ` Alan McKinnon
2013-04-14 17:15             ` Andreas K. Huettel
2013-04-14 17:21               ` Pacho Ramos
2013-04-14  9:31       ` Pacho Ramos
2013-04-14  9:29     ` Pacho Ramos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox