public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Richard Yao" <ryao@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/genkernel:ryao commit in: /, doc/
Date: Sat, 25 Aug 2012 01:44:31 +0000 (UTC)	[thread overview]
Message-ID: <1345859065.d4bc44450173a9a7abe86d5918fa77cd84a4e918.ryao@gentoo> (raw)

commit:     d4bc44450173a9a7abe86d5918fa77cd84a4e918
Author:     Rick Farina <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 25 00:55:13 2012 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Sat Aug 25 01:44:25 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=d4bc4445

Add support for e2fsprogs back in

Add support for e2fsprogs, specifically mke2fs and e2fsck, back into
genkernel.

Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org>
Signed-off-by: Richard Yao <ryao <AT> gentoo.org>

---
 doc/genkernel.8.txt  |    3 +++
 gen_cmdline.sh       |    6 ++++++
 gen_determineargs.sh |    1 +
 gen_initramfs.sh     |   27 +++++++++++++++++++++++++++
 genkernel.conf       |    3 +++
 5 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
index 9a96f32..912f899 100644
--- a/doc/genkernel.8.txt
+++ b/doc/genkernel.8.txt
@@ -263,6 +263,9 @@ INITIALIZATION
 *--*[*no-*]*dmraid*::
     Includes or excludes DMRAID support.
 
+*--*[*no-*]*e2fsprogs*::
+    Includes or excludes e2fsprogs.
+
 *--*[*no-*]*zfs*::
     Includes or excludes ZFS support.
 

diff --git a/gen_cmdline.sh b/gen_cmdline.sh
index 938b1a5..a305201 100755
--- a/gen_cmdline.sh
+++ b/gen_cmdline.sh
@@ -91,6 +91,8 @@ longusage() {
   echo "	--mdadm-config=<file>	Use file as mdadm.conf in initramfs"
   echo "	--dmraid		Include DMRAID support"
   echo "	--no-dmraid		Exclude DMRAID support"
+  echo "	--e2fsprogs		Include e2fsprogs"
+  echo "	--no-e2fsprogs		Exclude e2fsprogs"
   echo "	--zfs			Include ZFS support"
   echo "	--no-zfs		Exclude ZFS support"
   echo "	--multipath		Include Multipath support"
@@ -306,6 +308,10 @@ parse_cmdline() {
 			fi
 			print_info 2 "CMD_DMRAID: ${CMD_DMRAID}"
 			;;
+		--e2fsprogs|--no-e2fsprogs)
+			CMD_E2FSPROGS=`parse_optbool "$*"`
+			print_info 2 "CMD_E2FSPROGS: ${CMD_E2FSPROGS}"
+			;;
 		--zfs|--no-zfs)
 			CMD_ZFS=`parse_optbool "$*"`
 			print_info 2 "CMD_ZFS: ${CMD_ZFS}"

diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index d1ec199..81ac05f 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -122,6 +122,7 @@ determine_real_args() {
 	set_config_with_override BOOL   GPG                  CMD_GPG
 	set_config_with_override BOOL   MDADM                CMD_MDADM
 	set_config_with_override STRING MDADM_CONFIG         CMD_MDADM_CONFIG
+	set_config_with_override BOOL   E2FSPROGS            CMD_E2FSPROGS
 	set_config_with_override BOOL   ZFS                  CMD_ZFS
 	set_config_with_override BOOL   MULTIPATH            CMD_MULTIPATH
 	set_config_with_override BOOL   FIRMWARE             CMD_FIRMWARE

diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index ac90830..172e42f 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -127,6 +127,32 @@ append_busybox() {
 	rm -rf "${TEMP}/initramfs-busybox-temp" > /dev/null
 }
 
+append_e2fsprogs(){
+	local file
+
+	if [ -d "${TEMP}/initramfs-e2fsprogs-temp" ]
+	then
+		rm -r "${TEMP}/initramfs-e2fsprogs-temp/"
+	fi
+
+	# Using different name for blkid compatibility
+	cd ${TEMP}
+	mkdir -p "${TEMP}/initramfs-e2fsprogs-temp/"
+
+	copy_binaries "${TEMP}"/initramfs-e2fsprogs-temp/ /sbin/{e2fsck,mke2fs}
+
+	for i in /etc/{mke2fs,e2fsck}.conf; do
+		file="$(basename $i)"
+		cp "$i" "${TEMP}/initramfs-e2fsprogs-temp/$file" \
+			|| gen_die "Could not copy over $file"
+	done
+
+	cd "${TEMP}/initramfs-e2fsprogs-temp/"
+	log_future_cpio_content
+	find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
+	rm -rf "${TEMP}/initramfs-e2fsprogs-temp" > /dev/null
+}
+
 append_blkid(){
 	if [ -d "${TEMP}/initramfs-blkid-temp" ]
 	then
@@ -741,6 +767,7 @@ create_initramfs() {
 	append_data 'base_layout'
 	append_data 'auxilary' "${BUSYBOX}"
 	append_data 'busybox' "${BUSYBOX}"
+	append_data 'e2fsprogs' "${E2FSPROGS}"
 	append_data 'lvm' "${LVM}"
 	append_data 'dmraid' "${DMRAID}"
 	append_data 'iscsi' "${ISCSI}"

diff --git a/genkernel.conf b/genkernel.conf
index 5d93a66..af73931 100644
--- a/genkernel.conf
+++ b/genkernel.conf
@@ -87,6 +87,9 @@ USECOLOR="yes"
 # Add iSCSI support.
 #ISCSI="no"
 
+# Add e2fsprogs support.
+#E2FSPROGS="no"
+
 # Include support for unionfs
 #UNIONFS="1"
 


             reply	other threads:[~2012-08-25  1:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-25  1:44 Richard Yao [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-11-05 18:30 [gentoo-commits] proj/genkernel:ryao commit in: /, doc/ Richard Yao
2012-11-05 18:30 Richard Yao
2012-08-25  1:46 Richard Yao
2012-08-25  1:36 Richard Yao
2012-08-25  1:19 Richard Yao
2012-08-25  1:03 Richard Yao
2012-08-25  0:58 Richard Yao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345859065.d4bc44450173a9a7abe86d5918fa77cd84a4e918.ryao@gentoo \
    --to=ryao@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox