public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     399c68f8bc7592a02ced53869e0e376eb1bfe2f1
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:39:58 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:36 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=399c68f8

/etc/conf.d/rc doesn't exists anymore.

---
 targets/support/livecdfs-update.sh | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index dc4f71f..402be44 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -11,12 +11,6 @@ then
 		/etc/ssh/sshd_config
 fi
 
-# Turn off udev tarball
-sed -i 's:RC_DEVICE_TARBALL="yes":RC_DEVICE_TARBALL="no":' /etc/conf.d/rc
-
-# Turn off udev coldplugging
-sed -i 's:RC_COLDPLUG="yes":RC_COLDPLUG="no":' /etc/conf.d/rc
-
 # Clean up the time and set to UTC
 rm -rf /etc/localtime
 cp /usr/share/zoneinfo/UTC /etc/localtime


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-11-28 11:41 Raúl Porcel
  0 siblings, 0 replies; 27+ messages in thread
From: Raúl Porcel @ 2014-11-28 11:41 UTC (permalink / raw
  To: gentoo-commits

commit:     5b5b9661a89b1677010522d71961da54abe1be9b
Author:     Raúl Porcel <armin76 <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 28 11:40:28 2014 +0000
Commit:     Raúl Porcel <armin76 <AT> gentoo <DOT> org>
CommitDate: Fri Nov 28 11:40:28 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=5b5b9661

Fix name of system.map for sparc

---
 targets/support/netboot2-final.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/targets/support/netboot2-final.sh b/targets/support/netboot2-final.sh
index ebd5187..4460e95 100755
--- a/targets/support/netboot2-final.sh
+++ b/targets/support/netboot2-final.sh
@@ -51,7 +51,7 @@ case ${clst_hostarch} in
 		fi
 		for x in ${clst_boot_kernel}; do
 			elftoaout ${clst_target_path}/kernels/${x} -o ${clst_target_path}/${x}-a.out
-			${piggyback} ${clst_target_path}/${x}-a.out ${clst_target_path}/kernels/misc/System.map-${x} ${clst_target_path}/kernels/misc/${x}.igz
+			${piggyback} ${clst_target_path}/${x}-a.out ${clst_target_path}/kernels/misc/System-${x}.map ${clst_target_path}/kernels/misc/${x}.igz
 		done
 		;;
 	ia64)


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-10-26 12:27 Raúl Porcel
  0 siblings, 0 replies; 27+ messages in thread
From: Raúl Porcel @ 2014-10-26 12:27 UTC (permalink / raw
  To: gentoo-commits

commit:     57206e6504cb0d849453a298401209e4b02fd011
Author:     Raúl Porcel <armin76 <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 26 12:27:33 2014 +0000
Commit:     Raúl Porcel <armin76 <AT> gentoo <DOT> org>
CommitDate: Sun Oct 26 12:27:33 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=57206e65

Typo

Signed-off-by: Raúl Porcel <armin76 <AT> gentoo.org>

---
 targets/support/create-iso.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh
index 922057e..49f3f40 100755
--- a/targets/support/create-iso.sh
+++ b/targets/support/create-iso.sh
@@ -13,7 +13,7 @@ case ${clst_hostarch} in
 		;;
 	*)
 		cdmaker="mkisofs"
-		cdmakerpkg="app-cdr/cdrkit or app/cdr-cdrtools"
+		cdmakerpkg="app-cdr/cdrkit or app-cdr/cdrtools"
 		;;
 esac
 


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-04-20 13:41 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-04-20 13:41 UTC (permalink / raw
  To: gentoo-commits

commit:     ea06266ec713b0bcaf635259e44f802c4e6c7d65
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 20 13:21:21 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Apr 20 13:22:26 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=ea06266e

netboot2.sh: Fix missing slashes in paths

---
 targets/support/netboot2-final.sh | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/targets/support/netboot2-final.sh b/targets/support/netboot2-final.sh
index 732a1f1..ebd5187 100755
--- a/targets/support/netboot2-final.sh
+++ b/targets/support/netboot2-final.sh
@@ -4,20 +4,20 @@ source ${clst_shdir}/support/functions.sh
 source ${clst_shdir}/support/filesystem-functions.sh
 
 
-extract_kernels ${clst_target_path}boot
+extract_kernels ${clst_target_path}/boot
 
-# Move kernel binaries to ${clst_target_path}kernels, and
-# move everything else to ${clst_target_path}kernels/misc
-mkdir ${clst_target_path}kernels
-mkdir ${clst_target_path}kernels/misc
+# Move kernel binaries to ${clst_target_path}/kernels, and
+# move everything else to ${clst_target_path}/kernels/misc
+mkdir ${clst_target_path}/kernels
+mkdir ${clst_target_path}/kernels/misc
 
 for x in ${clst_boot_kernel}; do
-	mv ${clst_target_path}boot/${x} ${clst_target_path}kernels
-	mv ${clst_target_path}boot/${x}.igz ${clst_target_path}kernels/misc
-	mv ${clst_target_path}boot/System-${x}.map ${clst_target_path}kernels/misc
+	mv ${clst_target_path}/boot/${x} ${clst_target_path}/kernels
+	mv ${clst_target_path}/boot/${x}.igz ${clst_target_path}/kernels/misc
+	mv ${clst_target_path}/boot/System-${x}.map ${clst_target_path}/kernels/misc
 done
 
-rmdir ${clst_target_path}boot
+rmdir ${clst_target_path}/boot
 
 # Any post-processing necessary for each architecture can be done here.  This
 # may include things like sparc's elftoaout, x86's PXE boot, etc.
@@ -50,8 +50,8 @@ case ${clst_hostarch} in
 			piggyback=piggyback64
 		fi
 		for x in ${clst_boot_kernel}; do
-			elftoaout ${clst_target_path}/kernels/${x} -o ${clst_target_path}${x}-a.out
-			${piggyback} ${clst_target_path}/${x}-a.out ${clst_target_path}kernels/misc/System.map-${x} ${clst_target_path}kernels/misc/${x}.igz
+			elftoaout ${clst_target_path}/kernels/${x} -o ${clst_target_path}/${x}-a.out
+			${piggyback} ${clst_target_path}/${x}-a.out ${clst_target_path}/kernels/misc/System.map-${x} ${clst_target_path}/kernels/misc/${x}.igz
 		done
 		;;
 	ia64)


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     1737c71b31d3e1c8dfc90fc7b900ff47dde476a8
Author:     Douglas Freed <dwfreed <AT> mtu <DOT> edu>
AuthorDate: Mon Mar  3 04:31:29 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:37 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=1737c71b

livecdfs-update: No tmpfs on /lib/firmware

As of a while ago, we no longer ship a separate firmware tarball, so we
don't need a tmpfs for /lib/firmware anymore, so let's stop mounting
one.  Fixes firmware issues with current minimal install ISOs.

---
 targets/support/livecdfs-update.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 402be44..e20dc29 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -95,7 +95,6 @@ echo "####################################################" >> /etc/fstab
 
 # fstab tweaks
 echo "tmpfs	/					tmpfs	defaults	0 0" >> /etc/fstab
-echo "tmpfs	/lib/firmware			tmpfs	defaults	0 0" >> /etc/fstab
 echo "tmpfs	/usr/portage			tmpfs	defaults	0 0" >> /etc/fstab
 # If /usr/lib/X11/xkb/compiled then make it tmpfs
 if [ -d /usr/lib/X11/xkb/compiled ]


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     11eb8988841a3ac755099159ea949d33cb63c3fe
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:00 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:36 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=11eb8988

Rename System.map in a way that it won't be matched if multiple kernel are used.

The System.map-version file gets renamed to System.map-${kname}.
This causes some trouble when you have more than one kernel as the file from
the previous kernel will be matched as well. To prevent that, I change
the naming slightly.

---
 targets/support/functions.sh      | 4 ++--
 targets/support/netboot2-final.sh | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/targets/support/functions.sh b/targets/support/functions.sh
index 224833f..7face15 100755
--- a/targets/support/functions.sh
+++ b/targets/support/functions.sh
@@ -106,9 +106,9 @@ extract_kernels() {
 			mv ${1}/initramfs-* ${1}/${x}.igz
 		fi
 
-		if [ -e ${1}/System.map-* ];
+		if [ -e ${1}/System.map-* ]
 		then
-			mv ${1}/System.map-* ${1}/System.map-${x}
+			mv ${1}/System.map-* ${1}/System-${x}.map
 		fi
 	done
 }

diff --git a/targets/support/netboot2-final.sh b/targets/support/netboot2-final.sh
index 55835d2..732a1f1 100755
--- a/targets/support/netboot2-final.sh
+++ b/targets/support/netboot2-final.sh
@@ -14,7 +14,7 @@ mkdir ${clst_target_path}kernels/misc
 for x in ${clst_boot_kernel}; do
 	mv ${clst_target_path}boot/${x} ${clst_target_path}kernels
 	mv ${clst_target_path}boot/${x}.igz ${clst_target_path}kernels/misc
-	mv ${clst_target_path}boot/System.map* ${clst_target_path}kernels/misc/System.map-${x}
+	mv ${clst_target_path}boot/System-${x}.map ${clst_target_path}kernels/misc
 done
 
 rmdir ${clst_target_path}boot


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     76ab4acec42add4aed66bbe8fc67c22fad959227
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:03 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:37 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=76ab4ace

Fix and improve kernel build when kerncache is enabled.

This patch gets rid of setting ROOT for merging kernel sources. Instead, the
sources are moved manually to the kerncache directory. A new file is created
containing the kernel version and it is fed into package.provided to prevent
merging the kernel sources again.
Brian Dolbec: fix whitespace error.

---
 targets/support/kmerge.sh | 38 ++++++++++++++++++++++++++++++--------
 1 file changed, 30 insertions(+), 8 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 7c7f8fe..5d1c674 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -197,8 +197,17 @@ then
 
 	# Create the kerncache directory if it doesn't exists
 	mkdir -p /tmp/kerncache/${clst_kname}
-   	clst_root_path=/tmp/kerncache/${clst_kname} PKGDIR=${PKGDIR} clst_myemergeopts="--quiet --nodeps --update --newuse" run_merge "${clst_ksource}" || exit 1
-	KERNELVERSION=`portageq best_visible / "${clst_ksource}"`
+
+
+	if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.KERNELVERSION ]
+	then
+		KERNELVERSION=$(</tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.KERNELVERSION)
+		mkdir -p ${clst_port_conf}/profile
+		echo "${KERNELVERSION}" > ${clst_port_conf}/profile/package.provided
+	else
+		rm -f ${clst_port_conf}/profile/package.provided
+	fi
+
 	if [ ! -e ${clst_port_conf}/profile/package.provided ]
 	then
 		mkdir -p ${clst_port_conf}/profile
@@ -209,8 +218,26 @@ then
 			echo "${KERNELVERSION}" >> ${clst_port_conf}/profile/package.provided
 		fi
 	fi
+
 	[ -L /usr/src/linux ] && rm -f /usr/src/linux
-	ln -s /tmp/kerncache/${clst_kname}/usr/src/linux /usr/src/linux
+
+	PKGDIR=${PKGDIR} clst_myemergeopts="--quiet --nodeps --update --newuse" run_merge "${clst_ksource}" || exit 1
+
+	SOURCESDIR="/tmp/kerncache/${clst_kname}/sources"
+	if [ -L /usr/src/linux ]
+	then
+
+		# A kernel was merged, move it to $SOURCESDIR
+		[ -e ${SOURCESDIR} ] && rm -Rf ${SOURCESDIR}
+
+		KERNELVERSION=`portageq best_visible / "${clst_ksource}"`
+		echo "${KERNELVERSION}" > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.KERNELVERSION
+
+		echo "Moving kernel sources to ${SOURCESDIR} ..."
+		mv `readlink -f /usr/src/linux` ${SOURCESDIR}
+
+	fi
+	ln -sf ${SOURCESDIR} /usr/src/linux
 
 	# If catalyst has set to a empty string, extraversion wasn't specified so we
 	# skip this part
@@ -259,9 +286,4 @@ unset USE
 if [ -n "${clst_KERNCACHE}" ]
 then
 	echo ${clst_kernel_use} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE
-
-	if [ -e ${clst_port_conf}/profile/package.provided ]
-	then
-		sed -i "/^$(echo "${KERNELVERSION}" | sed -e 's|/|\\/|g')\$/d" ${clst_port_conf}/profile/package.provided
-	fi
 fi


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     fc237c79afec6ff6518727c724050bbb8bd5029c
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:39:59 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:36 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=fc237c79

Fix merging kernel without kerncache enabled.

This is the proper fix for building kernels without kerncache.
It prevents the creation of kerncache specific files and does not check for them.
Build with kerncache require the later patch to work.

---
 targets/support/kmerge.sh | 109 +++++++++++++++++++++++++---------------------
 1 file changed, 59 insertions(+), 50 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 3c08702..7c7f8fe 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -109,7 +109,7 @@ genkernel_compile(){
 	else
 		genkernel ${GK_ARGS} || exit 1
 	fi
-	if [ -e /var/tmp/${clst_kname}.config ]
+	if [ -n "${clst_KERNCACHE}" -a -e /var/tmp/${clst_kname}.config ]
 	then
 		md5sum /var/tmp/${clst_kname}.config | awk '{print $1}' > \
 			/tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG
@@ -144,63 +144,58 @@ fi
 # USE variables (and thus different patches enabled/disabled.) Also, there's no
 # real benefit in using the pkgcache for kernel source ebuilds.
 
-USE_MATCH=0
-if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE ]
+
+# Check if we have a match in kerncach
+
+if [ -n "${clst_KERNCACHE}" ]
 then
-	STR1=$(for i in `cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
-	STR2=$(for i in ${clst_kernel_use}; do echo $i; done|sort)
-	if [ "${STR1}" = "${STR2}" ]
+
+	USE_MATCH=0
+	if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE ]
 	then
-		#echo "USE Flags match"
-		USE_MATCH=1
-	else
-		if [ -n "${clst_KERNCACHE}" ]
+		STR1=$(for i in `cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
+		STR2=$(for i in ${clst_kernel_use}; do echo $i; done|sort)
+		if [ "${STR1}" = "${STR2}" ]
 		then
-		[ -d /tmp/kerncache/${clst_kname}/ebuilds ] && \
-			rm -r /tmp/kerncache/${clst_kname}/ebuilds
-		[ -e /tmp/kerncache/${clst_kname}/usr/src/linux/.config ] && \
-			rm /tmp/kerncache/${clst_kname}/usr/src/linux/.config
+			#echo "USE Flags match"
+			USE_MATCH=1
+		else
+			[ -d /tmp/kerncache/${clst_kname}/ebuilds ] && \
+				rm -r /tmp/kerncache/${clst_kname}/ebuilds
+			[ -e /tmp/kerncache/${clst_kname}/usr/src/linux/.config ] && \
+				rm /tmp/kerncache/${clst_kname}/usr/src/linux/.config
 		fi
 	fi
-fi
 
-EXTRAVERSION_MATCH=0
-if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION ]
-then
-	STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION`
-	STR2=${clst_kextraversion}
-	if [ "${STR1}" = "${STR2}" ]
+	EXTRAVERSION_MATCH=0
+	if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION ]
 	then
-		if [ -n "${clst_KERNCACHE}" ]
+		STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION`
+		STR2=${clst_kextraversion}
+		if [ "${STR1}" = "${STR2}" ]
 		then
 			#echo "EXTRAVERSION match"
 			EXTRAVERSION_MATCH=1
 		fi
 	fi
-fi
 
-CONFIG_MATCH=0
-if [ -n "${clst_KERNCACHE}" -a \
-     -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG ]
-then
-	if [ ! -e /var/tmp/${clst_kname}.config ]
+	CONFIG_MATCH=0
+	if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG ]
 	then
-		CONFIG_MATCH=1
-	else
-		STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG`
-		STR2=`md5sum /var/tmp/${clst_kname}.config|awk '{print $1}'`
-		if [ "${STR1}" = "${STR2}" ]
+		if [ ! -e /var/tmp/${clst_kname}.config ]
 		then
 			CONFIG_MATCH=1
+		else
+			STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG`
+			STR2=`md5sum /var/tmp/${clst_kname}.config|awk '{print $1}'`
+			if [ "${STR1}" = "${STR2}" ]
+			then
+				CONFIG_MATCH=1
+			fi
 		fi
 	fi
-fi
 
-[ -e ${clst_make_conf} ] && \
-	echo "USE=\"\${USE} ${clst_kernel_use} build\"" >> ${clst_make_conf}
-
-if [ -n "${clst_KERNCACHE}" ]
-then
+	# Create the kerncache directory if it doesn't exists
 	mkdir -p /tmp/kerncache/${clst_kname}
    	clst_root_path=/tmp/kerncache/${clst_kname} PKGDIR=${PKGDIR} clst_myemergeopts="--quiet --nodeps --update --newuse" run_merge "${clst_ksource}" || exit 1
 	KERNELVERSION=`portageq best_visible / "${clst_ksource}"`
@@ -216,26 +211,39 @@ then
 	fi
 	[ -L /usr/src/linux ] && rm -f /usr/src/linux
 	ln -s /tmp/kerncache/${clst_kname}/usr/src/linux /usr/src/linux
+
+	# If catalyst has set to a empty string, extraversion wasn't specified so we
+	# skip this part
+	if [ "${EXTRAVERSION_MATCH}" = "0" ]
+	then
+		if [ ! "${clst_kextraversion}" = "" ]
+		then
+			echo "Setting extraversion to ${clst_kextraversion}"
+			sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+			echo ${clst_kextraversion} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
+		else
+			touch /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
+		fi
+	fi
+
 else
 	[ -L /usr/src/linux ] && rm -f /usr/src/linux
 	run_merge "${clst_ksource}" || exit 1
-fi
-make_destpath
-
-# If catalyst has set to a empty string, extraversion wasn't specified so we
-# skip this part
-if [ "${EXTRAVERSION_MATCH}" = "0" ]
-then
 	if [ ! "${clst_kextraversion}" = "" ]
 	then
 		echo "Setting extraversion to ${clst_kextraversion}"
 		sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
-		echo ${clst_kextraversion} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
-	else
-		touch /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
 	fi
 fi
 
+
+# Update USE flag in make.conf
+[ -e ${clst_make_conf} ] && \
+	echo "USE=\"\${USE} ${clst_kernel_use} build\"" >> ${clst_make_conf}
+
+make_destpath
+
+
 build_kernel
 sed -i "/USE=\"\${USE} ${clst_kernel_use} build\"/d" ${clst_make_conf}
 # grep out the kernel version so that we can do our modules magic
@@ -246,11 +254,12 @@ EXV=`grep ^EXTRAVERSION\ \= /usr/src/linux/Makefile | sed -e "s/EXTRAVERSION =//
 clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV}
 
 unset USE
-echo ${clst_kernel_use} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE
 
 
 if [ -n "${clst_KERNCACHE}" ]
 then
+	echo ${clst_kernel_use} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE
+
 	if [ -e ${clst_port_conf}/profile/package.provided ]
 	then
 		sed -i "/^$(echo "${KERNELVERSION}" | sed -e 's|/|\\/|g')\$/d" ${clst_port_conf}/profile/package.provided


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     bc93b507122c7a9949b1349db44bee04b5c9f77b
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:02 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:37 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=bc93b507

Make use of _kernelopts for hppa.

Since hppa only support one command line for both 32 and 64bit kernel,
we merge both kernelopts in the same line.
This is useful for adding extra arguments like 'panic=30' directly in
the spec file.
Brian Dolbec: fix whitepace error.

---
 targets/support/bootloader-setup.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh
index 857ce6f..b76b5c4 100755
--- a/targets/support/bootloader-setup.sh
+++ b/targets/support/bootloader-setup.sh
@@ -47,7 +47,14 @@ case ${clst_hostarch} in
 		# Make sure we strip the extension to the kernel to allow palo to choose
 		boot_kernel_common_name=${first/%32/}
 		boot_kernel_common_name=${boot_kernel_common_name/%64/}
-		echo "--commandline=0/${boot_kernel_common_name} initrd=${first}.igz root=/dev/ram0 init=/linuxrc cdroot ${cmdline_opts}" >> ${icfg}
+
+		for x in ${clst_boot_kernel}
+		do
+			eval kopts=\$clst_boot_kernel_${x}_kernelopts
+			my_kopts="${my_kopts} ${kopts}"
+		done
+
+		echo "--commandline=0/${boot_kernel_common_name} initrd=${first}.igz ${default_append_line} ${my_kopts}" >> ${icfg}
 		echo "--bootloader=boot/iplboot" >> ${icfg}
 		echo "--ramdisk=boot/${first}.igz" >> ${icfg}
 		for x in ${clst_boot_kernel}


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     9f6593588d095729fc54829fa8dce74633e4ed8d
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:05 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:37 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=9f659358

Use the system's iplboot to be sure it matches palo's version.

For hppa, cdtar is a bad idea because the iplboot version in the tar file
might not match palo's version.

---
 targets/support/bootloader-setup.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh
index b76b5c4..d9e2620 100755
--- a/targets/support/bootloader-setup.sh
+++ b/targets/support/bootloader-setup.sh
@@ -41,6 +41,8 @@ case ${clst_hostarch} in
 	;;
 	hppa)
 		# NO SOFTLEVEL SUPPORT YET
+		mkdir -p $1/boot
+
 		icfg=$1/boot/palo.conf
 		kmsg=$1/boot/kernels.msg
 		hmsg=$1/boot/help.msg
@@ -54,6 +56,9 @@ case ${clst_hostarch} in
 			my_kopts="${my_kopts} ${kopts}"
 		done
 
+		# copy the bootloader for the final image
+		cp /usr/share/palo/iplboot $1/boot/
+
 		echo "--commandline=0/${boot_kernel_common_name} initrd=${first}.igz ${default_append_line} ${my_kopts}" >> ${icfg}
 		echo "--bootloader=boot/iplboot" >> ${icfg}
 		echo "--ramdisk=boot/${first}.igz" >> ${icfg}


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     fc7214ad8f2277dfa729800f5c68a5c0018ae2c9
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:04 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:37 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=fc7214ad

Don't make cdtar mandatory.

On hppa, we don't need cdtar.

---
 targets/support/functions.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/targets/support/functions.sh b/targets/support/functions.sh
index 7face15..8c59033 100755
--- a/targets/support/functions.sh
+++ b/targets/support/functions.sh
@@ -51,8 +51,12 @@ extract_cdtar() {
 	# which will normally contains a pre-built binary
 	# boot-loader/filesystem skeleton for the ISO.
 	cdtar=${clst_cdtar}
-	[ -z "${cdtar}" ] && die "Required key cdtar not defined, exiting"
-	tar -I lbzip2 -xpf ${cdtar} -C $1 || die "Couldn't extract cdtar ${cdtar}"
+	if [ -z "${cdtar}" ]
+	then
+		echo "No cdtar specified. Skipping."
+	else
+		tar -I lbzip2 -xpf ${cdtar} -C $1 || die "Couldn't extract cdtar ${cdtar}"
+	fi
 }
 
 extract_kernels() {


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     b8d75d6068e07bf3fdf450bc9659bdf897967877
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:39:57 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:36 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=b8d75d60

depscan.sh doesn't exists anymore.

---
 targets/support/post-kmerge.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/post-kmerge.sh b/targets/support/post-kmerge.sh
index c17680c..58b2e08 100755
--- a/targets/support/post-kmerge.sh
+++ b/targets/support/post-kmerge.sh
@@ -7,6 +7,5 @@ source /tmp/chroot-functions.sh
 # Only run depscan.sh if modules exist
 if [ -n "$(ls /lib/modules)" ]
 then
-	/sbin/depscan.sh
 	find /lib/modules -name modules.dep -exec touch {} \;
 fi


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-04-18 16:52 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-04-18 16:52 UTC (permalink / raw
  To: gentoo-commits

commit:     bde6b52fc53597b9e940c24ea2803439ec5f2fab
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:39:56 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:36 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=bde6b52f

update-modules doesn't exists anymore.

---
 targets/support/kmerge.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index f5e1aa8..3c08702 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -245,8 +245,6 @@ SUB=`grep ^SUBLEVEL\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
 EXV=`grep ^EXTRAVERSION\ \= /usr/src/linux/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g"`
 clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV}
 
-/sbin/update-modules --assume-kernel=${clst_fudgeuname}
-
 unset USE
 echo ${clst_kernel_use} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE
 


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-03-03 16:07 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-03-03 16:07 UTC (permalink / raw
  To: gentoo-commits

commit:     4609476225ccdef6d6e5a363464b76ebb64e412a
Author:     Douglas Freed <dwfreed <AT> mtu <DOT> edu>
AuthorDate: Mon Mar  3 04:31:29 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Mar  3 06:04:12 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=46094762

livecdfs-update: No tmpfs on /lib/firmware

As of a while ago, we no longer ship a separate firmware tarball, so we
don't need a tmpfs for /lib/firmware anymore, so let's stop mounting
one.  Fixes firmware issues with current minimal install ISOs.

---
 targets/support/livecdfs-update.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 402be44..e20dc29 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -95,7 +95,6 @@ echo "####################################################" >> /etc/fstab
 
 # fstab tweaks
 echo "tmpfs	/					tmpfs	defaults	0 0" >> /etc/fstab
-echo "tmpfs	/lib/firmware			tmpfs	defaults	0 0" >> /etc/fstab
 echo "tmpfs	/usr/portage			tmpfs	defaults	0 0" >> /etc/fstab
 # If /usr/lib/X11/xkb/compiled then make it tmpfs
 if [ -d /usr/lib/X11/xkb/compiled ]


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-02-19 17:47 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-02-19 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     55d7d3dad42c3206e1eb67122a0bc3d35de1b40c
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:05 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Feb 19 17:42:36 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=55d7d3da

Use the system's iplboot to be sure it matches palo's version.

For hppa, cdtar is a bad idea because the iplboot version in the tar file
might not match palo's version.

---
 targets/support/bootloader-setup.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh
index b76b5c4..d9e2620 100755
--- a/targets/support/bootloader-setup.sh
+++ b/targets/support/bootloader-setup.sh
@@ -41,6 +41,8 @@ case ${clst_hostarch} in
 	;;
 	hppa)
 		# NO SOFTLEVEL SUPPORT YET
+		mkdir -p $1/boot
+
 		icfg=$1/boot/palo.conf
 		kmsg=$1/boot/kernels.msg
 		hmsg=$1/boot/help.msg
@@ -54,6 +56,9 @@ case ${clst_hostarch} in
 			my_kopts="${my_kopts} ${kopts}"
 		done
 
+		# copy the bootloader for the final image
+		cp /usr/share/palo/iplboot $1/boot/
+
 		echo "--commandline=0/${boot_kernel_common_name} initrd=${first}.igz ${default_append_line} ${my_kopts}" >> ${icfg}
 		echo "--bootloader=boot/iplboot" >> ${icfg}
 		echo "--ramdisk=boot/${first}.igz" >> ${icfg}


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-02-19 17:47 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-02-19 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     b3892c57e1fbfb6b7a4224631aeb5320dfcad822
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:02 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Feb 19 17:40:26 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=b3892c57

Make use of _kernelopts for hppa.

Since hppa only support one command line for both 32 and 64bit kernel,
we merge both kernelopts in the same line.
This is useful for adding extra arguments like 'panic=30' directly in
the spec file.
Brian Dolbec: fix whitepace error.

---
 targets/support/bootloader-setup.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh
index 857ce6f..b76b5c4 100755
--- a/targets/support/bootloader-setup.sh
+++ b/targets/support/bootloader-setup.sh
@@ -47,7 +47,14 @@ case ${clst_hostarch} in
 		# Make sure we strip the extension to the kernel to allow palo to choose
 		boot_kernel_common_name=${first/%32/}
 		boot_kernel_common_name=${boot_kernel_common_name/%64/}
-		echo "--commandline=0/${boot_kernel_common_name} initrd=${first}.igz root=/dev/ram0 init=/linuxrc cdroot ${cmdline_opts}" >> ${icfg}
+
+		for x in ${clst_boot_kernel}
+		do
+			eval kopts=\$clst_boot_kernel_${x}_kernelopts
+			my_kopts="${my_kopts} ${kopts}"
+		done
+
+		echo "--commandline=0/${boot_kernel_common_name} initrd=${first}.igz ${default_append_line} ${my_kopts}" >> ${icfg}
 		echo "--bootloader=boot/iplboot" >> ${icfg}
 		echo "--ramdisk=boot/${first}.igz" >> ${icfg}
 		for x in ${clst_boot_kernel}


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-02-19 17:47 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-02-19 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     59e71a64d4e3a75e00e10e477b251b6cbd831d81
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:00 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Feb 19 17:32:02 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=59e71a64

Rename System.map in a way that it won't be matched if multiple kernel are used.

The System.map-version file gets renamed to System.map-${kname}.
This causes some trouble when you have more than one kernel as the file from
the previous kernel will be matched as well. To prevent that, I change
the naming slightly.

---
 targets/support/functions.sh      | 4 ++--
 targets/support/netboot2-final.sh | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/targets/support/functions.sh b/targets/support/functions.sh
index 224833f..7face15 100755
--- a/targets/support/functions.sh
+++ b/targets/support/functions.sh
@@ -106,9 +106,9 @@ extract_kernels() {
 			mv ${1}/initramfs-* ${1}/${x}.igz
 		fi
 
-		if [ -e ${1}/System.map-* ];
+		if [ -e ${1}/System.map-* ]
 		then
-			mv ${1}/System.map-* ${1}/System.map-${x}
+			mv ${1}/System.map-* ${1}/System-${x}.map
 		fi
 	done
 }

diff --git a/targets/support/netboot2-final.sh b/targets/support/netboot2-final.sh
index 55835d2..732a1f1 100755
--- a/targets/support/netboot2-final.sh
+++ b/targets/support/netboot2-final.sh
@@ -14,7 +14,7 @@ mkdir ${clst_target_path}kernels/misc
 for x in ${clst_boot_kernel}; do
 	mv ${clst_target_path}boot/${x} ${clst_target_path}kernels
 	mv ${clst_target_path}boot/${x}.igz ${clst_target_path}kernels/misc
-	mv ${clst_target_path}boot/System.map* ${clst_target_path}kernels/misc/System.map-${x}
+	mv ${clst_target_path}boot/System-${x}.map ${clst_target_path}kernels/misc
 done
 
 rmdir ${clst_target_path}boot


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-02-19 17:47 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-02-19 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     0398f6f0786ae92f10d3adccf39dbea3a5cfab16
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:04 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Feb 19 17:42:35 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=0398f6f0

Don't make cdtar mandatory.

On hppa, we don't need cdtar.

---
 targets/support/functions.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/targets/support/functions.sh b/targets/support/functions.sh
index 7face15..8c59033 100755
--- a/targets/support/functions.sh
+++ b/targets/support/functions.sh
@@ -51,8 +51,12 @@ extract_cdtar() {
 	# which will normally contains a pre-built binary
 	# boot-loader/filesystem skeleton for the ISO.
 	cdtar=${clst_cdtar}
-	[ -z "${cdtar}" ] && die "Required key cdtar not defined, exiting"
-	tar -I lbzip2 -xpf ${cdtar} -C $1 || die "Couldn't extract cdtar ${cdtar}"
+	if [ -z "${cdtar}" ]
+	then
+		echo "No cdtar specified. Skipping."
+	else
+		tar -I lbzip2 -xpf ${cdtar} -C $1 || die "Couldn't extract cdtar ${cdtar}"
+	fi
 }
 
 extract_kernels() {


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-02-19 17:47 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-02-19 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     84cc9e2cdcea063e2d6bd8bb8489df9f4a380353
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:03 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Feb 19 17:41:55 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=84cc9e2c

Fix and improve kernel build when kerncache is enabled.

This patch gets rid of setting ROOT for merging kernel sources. Instead, the
sources are moved manually to the kerncache directory. A new file is created
containing the kernel version and it is fed into package.provided to prevent
merging the kernel sources again.
Brian Dolbec: fix whitespace error.

---
 targets/support/kmerge.sh | 38 ++++++++++++++++++++++++++++++--------
 1 file changed, 30 insertions(+), 8 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 7c7f8fe..5d1c674 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -197,8 +197,17 @@ then
 
 	# Create the kerncache directory if it doesn't exists
 	mkdir -p /tmp/kerncache/${clst_kname}
-   	clst_root_path=/tmp/kerncache/${clst_kname} PKGDIR=${PKGDIR} clst_myemergeopts="--quiet --nodeps --update --newuse" run_merge "${clst_ksource}" || exit 1
-	KERNELVERSION=`portageq best_visible / "${clst_ksource}"`
+
+
+	if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.KERNELVERSION ]
+	then
+		KERNELVERSION=$(</tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.KERNELVERSION)
+		mkdir -p ${clst_port_conf}/profile
+		echo "${KERNELVERSION}" > ${clst_port_conf}/profile/package.provided
+	else
+		rm -f ${clst_port_conf}/profile/package.provided
+	fi
+
 	if [ ! -e ${clst_port_conf}/profile/package.provided ]
 	then
 		mkdir -p ${clst_port_conf}/profile
@@ -209,8 +218,26 @@ then
 			echo "${KERNELVERSION}" >> ${clst_port_conf}/profile/package.provided
 		fi
 	fi
+
 	[ -L /usr/src/linux ] && rm -f /usr/src/linux
-	ln -s /tmp/kerncache/${clst_kname}/usr/src/linux /usr/src/linux
+
+	PKGDIR=${PKGDIR} clst_myemergeopts="--quiet --nodeps --update --newuse" run_merge "${clst_ksource}" || exit 1
+
+	SOURCESDIR="/tmp/kerncache/${clst_kname}/sources"
+	if [ -L /usr/src/linux ]
+	then
+
+		# A kernel was merged, move it to $SOURCESDIR
+		[ -e ${SOURCESDIR} ] && rm -Rf ${SOURCESDIR}
+
+		KERNELVERSION=`portageq best_visible / "${clst_ksource}"`
+		echo "${KERNELVERSION}" > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.KERNELVERSION
+
+		echo "Moving kernel sources to ${SOURCESDIR} ..."
+		mv `readlink -f /usr/src/linux` ${SOURCESDIR}
+
+	fi
+	ln -sf ${SOURCESDIR} /usr/src/linux
 
 	# If catalyst has set to a empty string, extraversion wasn't specified so we
 	# skip this part
@@ -259,9 +286,4 @@ unset USE
 if [ -n "${clst_KERNCACHE}" ]
 then
 	echo ${clst_kernel_use} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE
-
-	if [ -e ${clst_port_conf}/profile/package.provided ]
-	then
-		sed -i "/^$(echo "${KERNELVERSION}" | sed -e 's|/|\\/|g')\$/d" ${clst_port_conf}/profile/package.provided
-	fi
 fi


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-02-19 17:47 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-02-19 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     3fc30a6a60b93f01fa4e1db4689694d5795cb43a
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:39:59 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Feb 19 17:32:02 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3fc30a6a

Fix merging kernel without kerncache enabled.

This is the proper fix for building kernels without kerncache.
It prevents the creation of kerncache specific files and does not check for them.
Build with kerncache require the later patch to work.

---
 targets/support/kmerge.sh | 109 +++++++++++++++++++++++++---------------------
 1 file changed, 59 insertions(+), 50 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index 3c08702..7c7f8fe 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -109,7 +109,7 @@ genkernel_compile(){
 	else
 		genkernel ${GK_ARGS} || exit 1
 	fi
-	if [ -e /var/tmp/${clst_kname}.config ]
+	if [ -n "${clst_KERNCACHE}" -a -e /var/tmp/${clst_kname}.config ]
 	then
 		md5sum /var/tmp/${clst_kname}.config | awk '{print $1}' > \
 			/tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG
@@ -144,63 +144,58 @@ fi
 # USE variables (and thus different patches enabled/disabled.) Also, there's no
 # real benefit in using the pkgcache for kernel source ebuilds.
 
-USE_MATCH=0
-if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE ]
+
+# Check if we have a match in kerncach
+
+if [ -n "${clst_KERNCACHE}" ]
 then
-	STR1=$(for i in `cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
-	STR2=$(for i in ${clst_kernel_use}; do echo $i; done|sort)
-	if [ "${STR1}" = "${STR2}" ]
+
+	USE_MATCH=0
+	if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE ]
 	then
-		#echo "USE Flags match"
-		USE_MATCH=1
-	else
-		if [ -n "${clst_KERNCACHE}" ]
+		STR1=$(for i in `cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE`; do echo $i; done|sort)
+		STR2=$(for i in ${clst_kernel_use}; do echo $i; done|sort)
+		if [ "${STR1}" = "${STR2}" ]
 		then
-		[ -d /tmp/kerncache/${clst_kname}/ebuilds ] && \
-			rm -r /tmp/kerncache/${clst_kname}/ebuilds
-		[ -e /tmp/kerncache/${clst_kname}/usr/src/linux/.config ] && \
-			rm /tmp/kerncache/${clst_kname}/usr/src/linux/.config
+			#echo "USE Flags match"
+			USE_MATCH=1
+		else
+			[ -d /tmp/kerncache/${clst_kname}/ebuilds ] && \
+				rm -r /tmp/kerncache/${clst_kname}/ebuilds
+			[ -e /tmp/kerncache/${clst_kname}/usr/src/linux/.config ] && \
+				rm /tmp/kerncache/${clst_kname}/usr/src/linux/.config
 		fi
 	fi
-fi
 
-EXTRAVERSION_MATCH=0
-if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION ]
-then
-	STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION`
-	STR2=${clst_kextraversion}
-	if [ "${STR1}" = "${STR2}" ]
+	EXTRAVERSION_MATCH=0
+	if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION ]
 	then
-		if [ -n "${clst_KERNCACHE}" ]
+		STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION`
+		STR2=${clst_kextraversion}
+		if [ "${STR1}" = "${STR2}" ]
 		then
 			#echo "EXTRAVERSION match"
 			EXTRAVERSION_MATCH=1
 		fi
 	fi
-fi
 
-CONFIG_MATCH=0
-if [ -n "${clst_KERNCACHE}" -a \
-     -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG ]
-then
-	if [ ! -e /var/tmp/${clst_kname}.config ]
+	CONFIG_MATCH=0
+	if [ -e /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG ]
 	then
-		CONFIG_MATCH=1
-	else
-		STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG`
-		STR2=`md5sum /var/tmp/${clst_kname}.config|awk '{print $1}'`
-		if [ "${STR1}" = "${STR2}" ]
+		if [ ! -e /var/tmp/${clst_kname}.config ]
 		then
 			CONFIG_MATCH=1
+		else
+			STR1=`cat /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.CONFIG`
+			STR2=`md5sum /var/tmp/${clst_kname}.config|awk '{print $1}'`
+			if [ "${STR1}" = "${STR2}" ]
+			then
+				CONFIG_MATCH=1
+			fi
 		fi
 	fi
-fi
 
-[ -e ${clst_make_conf} ] && \
-	echo "USE=\"\${USE} ${clst_kernel_use} build\"" >> ${clst_make_conf}
-
-if [ -n "${clst_KERNCACHE}" ]
-then
+	# Create the kerncache directory if it doesn't exists
 	mkdir -p /tmp/kerncache/${clst_kname}
    	clst_root_path=/tmp/kerncache/${clst_kname} PKGDIR=${PKGDIR} clst_myemergeopts="--quiet --nodeps --update --newuse" run_merge "${clst_ksource}" || exit 1
 	KERNELVERSION=`portageq best_visible / "${clst_ksource}"`
@@ -216,26 +211,39 @@ then
 	fi
 	[ -L /usr/src/linux ] && rm -f /usr/src/linux
 	ln -s /tmp/kerncache/${clst_kname}/usr/src/linux /usr/src/linux
+
+	# If catalyst has set to a empty string, extraversion wasn't specified so we
+	# skip this part
+	if [ "${EXTRAVERSION_MATCH}" = "0" ]
+	then
+		if [ ! "${clst_kextraversion}" = "" ]
+		then
+			echo "Setting extraversion to ${clst_kextraversion}"
+			sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+			echo ${clst_kextraversion} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
+		else
+			touch /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
+		fi
+	fi
+
 else
 	[ -L /usr/src/linux ] && rm -f /usr/src/linux
 	run_merge "${clst_ksource}" || exit 1
-fi
-make_destpath
-
-# If catalyst has set to a empty string, extraversion wasn't specified so we
-# skip this part
-if [ "${EXTRAVERSION_MATCH}" = "0" ]
-then
 	if [ ! "${clst_kextraversion}" = "" ]
 	then
 		echo "Setting extraversion to ${clst_kextraversion}"
 		sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
-		echo ${clst_kextraversion} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
-	else
-		touch /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
 	fi
 fi
 
+
+# Update USE flag in make.conf
+[ -e ${clst_make_conf} ] && \
+	echo "USE=\"\${USE} ${clst_kernel_use} build\"" >> ${clst_make_conf}
+
+make_destpath
+
+
 build_kernel
 sed -i "/USE=\"\${USE} ${clst_kernel_use} build\"/d" ${clst_make_conf}
 # grep out the kernel version so that we can do our modules magic
@@ -246,11 +254,12 @@ EXV=`grep ^EXTRAVERSION\ \= /usr/src/linux/Makefile | sed -e "s/EXTRAVERSION =//
 clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV}
 
 unset USE
-echo ${clst_kernel_use} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE
 
 
 if [ -n "${clst_KERNCACHE}" ]
 then
+	echo ${clst_kernel_use} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE
+
 	if [ -e ${clst_port_conf}/profile/package.provided ]
 	then
 		sed -i "/^$(echo "${KERNELVERSION}" | sed -e 's|/|\\/|g')\$/d" ${clst_port_conf}/profile/package.provided


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-02-19 17:47 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-02-19 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     6ad029963a3e3d4258923e3685226d5c20f50fd1
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:39:56 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Feb 19 17:32:02 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=6ad02996

update-modules doesn't exists anymore.

---
 targets/support/kmerge.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/targets/support/kmerge.sh b/targets/support/kmerge.sh
index f5e1aa8..3c08702 100755
--- a/targets/support/kmerge.sh
+++ b/targets/support/kmerge.sh
@@ -245,8 +245,6 @@ SUB=`grep ^SUBLEVEL\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
 EXV=`grep ^EXTRAVERSION\ \= /usr/src/linux/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g"`
 clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV}
 
-/sbin/update-modules --assume-kernel=${clst_fudgeuname}
-
 unset USE
 echo ${clst_kernel_use} > /tmp/kerncache/${clst_kname}/${clst_kname}-${clst_version_stamp}.USE
 


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-02-19 17:47 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-02-19 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     964aad3e1a4836afbc056ca10e506529740bcd41
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:39:57 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Feb 19 17:32:02 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=964aad3e

depscan.sh doesn't exists anymore.

---
 targets/support/post-kmerge.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/targets/support/post-kmerge.sh b/targets/support/post-kmerge.sh
index c17680c..58b2e08 100755
--- a/targets/support/post-kmerge.sh
+++ b/targets/support/post-kmerge.sh
@@ -7,6 +7,5 @@ source /tmp/chroot-functions.sh
 # Only run depscan.sh if modules exist
 if [ -n "$(ls /lib/modules)" ]
 then
-	/sbin/depscan.sh
 	find /lib/modules -name modules.dep -exec touch {} \;
 fi


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2014-02-19 17:47 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2014-02-19 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     99f59f94e33d0a708829e11411e9c1392d1175b9
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:39:58 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Feb 19 17:32:02 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=99f59f94

/etc/conf.d/rc doesn't exists anymore.

---
 targets/support/livecdfs-update.sh | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index dc4f71f..402be44 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -11,12 +11,6 @@ then
 		/etc/ssh/sshd_config
 fi
 
-# Turn off udev tarball
-sed -i 's:RC_DEVICE_TARBALL="yes":RC_DEVICE_TARBALL="no":' /etc/conf.d/rc
-
-# Turn off udev coldplugging
-sed -i 's:RC_COLDPLUG="yes":RC_COLDPLUG="no":' /etc/conf.d/rc
-
 # Clean up the time and set to UTC
 rm -rf /etc/localtime
 cp /usr/share/zoneinfo/UTC /etc/localtime


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2013-11-21  9:06 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2013-11-21  9:06 UTC (permalink / raw
  To: gentoo-commits

commit:     968cb74cbe7a7bcbdef80a0dd46f696db2d746af
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Sat Mar  2 19:17:01 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Nov 21 09:00:10 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=968cb74c

livecdfs-update.sh: Set XSESSION in /etc/env.d/90xsession

As part of the OpenRC migration, the recommended place for configuring
the default X session moved from /etc/rc.conf to /etc/env.d/90xsession
[1].

[1]: http://www.gentoo.org/doc/en/openrc-migration.xml

---
 targets/support/livecdfs-update.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 5e578b0..0a3fa3f 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -171,8 +171,7 @@ fi
 # Setup configured default X Session
 if [ -n "${clst_livecd_xsession}" ]
 then
-	sed -i "s:#XSESSION=\"Gnome\":XSESSION=\"${clst_livecd_xsession}\":" \
-		/etc/rc.conf
+	echo "XSESSION=\"${clst_livecd_xsession}\"" > /etc/env.d/90xsession
 fi
 
 # touch /etc/asound.state


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2013-11-21  9:06 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2013-11-21  9:06 UTC (permalink / raw
  To: gentoo-commits

commit:     d0734f69ce73af819e79290a09d6d0292950d126
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Fri Mar  8 12:26:16 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Nov 21 09:00:10 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=d0734f69

livecdfs-update.sh: Run env-update to pick up any /etc/env.d/ changes

Otherwise the XSESSION change from e523136 (livecdfs-update.sh: Set
XSESSION in /etc/env.d/90xsession, 2013-03-02) is not noticed.

---
 targets/support/livecdfs-update.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 0a3fa3f..e9cdec1 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -396,3 +396,5 @@ if [ -e /lib/rcscripts/addons/udev-start.sh ]
 then
 	sed -i "s:\t\[\[ -x /sbin/evms_activate:\t\[\[ -x \${CDBOOT} \]\] \&\& \[\[ -x /sbin/evms_activate:" /lib/rcscripts/addons/udev-start.sh
 fi
+
+env-update


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2013-11-21  9:06 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2013-11-21  9:06 UTC (permalink / raw
  To: gentoo-commits

commit:     2596eb8ce4958255561a11e2081647d2cacf772e
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Sun Mar  3 12:58:16 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Nov 21 09:00:10 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=2596eb8c

livecdfs-update.sh: Fix '/etc/sshd' check for sshd_config tweaks

sshd_config lives in /etc/ssh, not /etc/sshd.  This typo has been
present since the block was introduced by c06264e (Initial import of
Catalyst 2.0.0, 2005-04-04), so it's obviously not a widely used
feature ;).  It might be better to just remove the block entirely.

---
 targets/support/livecdfs-update.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 0928f17..5e578b0 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -5,7 +5,7 @@ RUN_DEFAULT_FUNCS="no"
 source /tmp/chroot-functions.sh
 
 # Allow root logins to our CD by default
-if [ -e /etc/sshd/sshd_config ]
+if [ -e /etc/ssh/sshd_config ]
 then
 	sed -i 's:^#PermitRootLogin\ yes:PermitRootLogin\ yes:' \
 		/etc/ssh/sshd_config


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/
@ 2013-11-21  9:06 Brian Dolbec
  0 siblings, 0 replies; 27+ messages in thread
From: Brian Dolbec @ 2013-11-21  9:06 UTC (permalink / raw
  To: gentoo-commits

commit:     2d9697c7d872652a9146d4904cb63af53be62e70
Author:     W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Sun Mar  3 16:48:11 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Nov 21 09:00:10 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=2d9697c7

livecdfs-update.sh: Use `bash --login` to spawn startx

Starting a "login" version of Bash via `su` is tricky.  The naive:

  su - ${first_user} -c startx

fails because `su - ...` clears a number of environment variables (so
the prefixed `source /etc/profile` doesn't accomplish anything), but
Bash isn't started with the `--login` option, so it doesn't source
/etc/profile internally.  From bash(1):

  A login shell is one whose first character of argument zero is a -,
  or one started with the --login option.
  ...
  An interactive shell is one started without non-option arguments and
  without the -c option whose standard input and error are both
  connected to terminals (as determined by isatty(3)), or one started
  with the -i option...
  ...
  When bash is invoked as an interactive login shell, or as a
  non-interactive shell with the --login option, it first reads and
  executes commands from the file /etc/profile, if that file exists.
  After reading that file, it looks for ~/.bash_profile,
  ~/.bash_login, and ~/.profile, in that order, and reads and executes
  commands from the first one that exists and is readable.  The
  --noprofile option may be used when the shell is started to inhibit
  this behavior.

In order to get the login-style profile loading with a non-interactive
`su` invocation, you need to use something like:

  echo "${command}" | su - "${user}"

This starts a login shell and pipes the command in via stdin, which
seems to fake Bash into thinking its running from an interactive
terminal.  Not the most elegant, but the other implementations I can
think of are even worse:

  su - "${user}" -c "bash --login -c ${command}"
  su - "${user}" -c 'source /etc/profile &&
      (source .bash_profile || ...) && ${command}"

The old expression was broken anyway due to unescaped ampersands in
the sed expression.  From sed(1):

  s/regexp/replacement/
    Attempt to match regexp against the pattern space.  If successful,
    replace that portion matched with replacement.  The replacement
    may contain the special character & to refer to that portion of
    the pattern space which matched, and the special escapes \1
    through \9 to refer to the corresponding matching sub-expressions
    in the regexp.

This means that the old expression (with unescaped ampersands) lead
to:

  source /etc/profile ##STARTX##STARTX su - ${first_user} -c startx

with ${first_user} expanded.  This commented out startx, so it was
never run.

---
 targets/support/livecdfs-update.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index e9cdec1..dc4f71f 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -387,9 +387,7 @@ esac
 # We want the first user to be used when auto-starting X
 if [ -e /etc/startx ]
 then
-	sed -i \
-		"s:##STARTX:source /etc/profile \&\& su - ${first_user} -c startx:" \
-		/root/.bashrc
+	sed -i "s:##STARTX:echo startx | su - '${first_user}':" /root/.bashrc
 fi
 
 if [ -e /lib/rcscripts/addons/udev-start.sh ]


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

end of thread, other threads:[~2014-11-28 11:41 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-18 16:52 [gentoo-commits] proj/catalyst:3.0 commit in: targets/support/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2014-11-28 11:41 Raúl Porcel
2014-10-26 12:27 Raúl Porcel
2014-04-20 13:41 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-03-03 16:07 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2014-02-19 17:47 Brian Dolbec
2013-11-21  9:06 Brian Dolbec
2013-11-21  9:06 Brian Dolbec
2013-11-21  9:06 Brian Dolbec
2013-11-21  9:06 Brian Dolbec

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