Hi,

Can somebody with write acces to the SVN can revew and commit those patches to 
the svn?

I've successfully tested those on CentOS-6.3 x86_64. RPMS that includes thoses 
patches.
they are available here for testing: (kernel used: 2.6.34.1)
http://olivier.lahaye1.free.fr/RPMS/noarch/ (versioned as 4.2.0-0.7svn4568 
meaning it's a pre version and allows for upgrade to final 4.2.0-1)
=> Make sure you're using  0.7 release (not 0.6)
Source RPMS available here: 
http://olivier.lahaye1.free.fr/SRPMS/systemimager-4.2.0-0.7svn4568.el6.src.rpm

All the patches with explanations:

- systemimager_initrd_coreutils_rul.patch
Small Makefile fix (more clean)

- systemimager_initrd_mklib_bef.patch
Avoid overwriting libs that are alreadin installed in build_dir/ This prevent 
libmount-2.10 from CentOS-6.2 to overwrite libmount 2.12 from util-linux, and 
thus have mount, blkid and such to run instead of failing with wrong lib 
version.

- systemimager_initrd_rul.patch
Fix destination lib path. (avoid /lib/lib64 in initrd)

- systemimager_initrd_udev_rul.patch
Disable systemd, libdir=/lib and use $MAKE

- systemimager_initrd_util_linux_rul.patch
Use $MAKE install instead of manualy copy binaries. If make install is not 
used, the libtool wrapper is copied instead of the real lib (wich result in 
missing lib).

- systemimager_server_pm.patch (IMHO, shouldn't be pushed, but provided as it 
helps for now)
This is a temporary  workaround (not included in rpms) for a problem similar to 
bug https://bugzilla.redhat.com/show_bug.cgi?id=441244 . Right now, if the 1st 
partition inside the extended partition start at the same block, parted returns 
an error code (BUZY when trying to reread partition table). This fix avoid this 
by adding one block to the partition created inside the extended partition. Far 
from being a good fix, it makes at least things work. (fix commented in the 
patch) This patch was created when using parted 2.3. The rpms are including 
parted 3.1 and the patch is commented out in order to check if the problem is 
still here.

- systemimager_sysvinit_initrd_rul.patch
Added a test to avoid failing  when trying to copy /lib/ld* and no files are 
found.

- systemimager_util_linux_rul.patch
Enhanced configure step.

- systemimager_parted_3_1_svn4568.patch
Use new parted that should handle more properly extended partitions and not 
fall into a bug similar to https://bugzilla.redhat.com/show_bug.cgi?id=441244

Many thanks for any help on this point.


PS: sorry for posting on both lists, but I think that users can tests those 
rpms.

--
   Olivier LAHAYE
   CEA DRT/LIST/DCSI/DIR

________________________________________
De : LAHAYE Olivier
Date d'envoi : mercredi 25 juillet 2012 14:52
À : [email protected]
Objet : [PROVENANCE  INTERNET] [Oscar-devel] RE : [sisuite-users] RE : Building 
SystemImager on CentOS 6.2? HELP Needed

Hi,

After trying to use my RPM on a CentOS-6.2 system, I'm facing some issues that 
are hard to fix, thus I'm asking before starting to try to make a update so it 
works on CentOS-6.2

1st of all, I've already made some fix to systemimager so it works on 
CentOS-6.2, unfortunately, I'm stuck with systemconfigurator which is not 
supported on CentOS-6.2 (kernel-2.6) and therfore disabled with no equivalent 
in systemimager. Because of this, the bootloader is not written to disk after 
the imaging, and therfore, the imaged system is unable to boot.

So the actual situation is the following:
- systemimager-4.1.99.svn4568/lib/SystemImager/Server.pm:1788 
SystemConfigurator deprecated and nothing to do its job (configure and write 
bootloader, ...)

- systemconfigurator-2.2.11-1/lib/SystemConfig/{Initrd/RH.pm, Boot*, ???} need 
to be fixed to have kernel 2.6+ properly handeled (initramfs instead of initrd, 
dracut instead of initrd (compatible script exist for the moment), ...

So now, I need help on having the ##SYSTEMCONFIGURATOR_PRE## and  
#SYSTEMCONFIGURATOR_POST## steps working in SystemImager. Works need to be done 
on the autoinstallscript and in systemconfigurator (or equivalent).

For now here are my patches for the latest systeminstaller to be able to deploy 
an image:

- systemimager_initrd_coreutils_rul.patch
Small Makefile fix (more clean)

- systemimager_initrd_mklib_bef.patch
Avoid overwriting libs that are alreadin installed in build_dir/ This prevent 
libmount-2.10 from CentOS-6.2 to overwrite libmount 2.12 from util-linux, and 
thus have mount, blkid and such to run instead of failing with wrong lib 
version.

- systemimager_initrd_rul.patch
Fix destination lib path.

- systemimager_initrd_udev_rul.patch
Disable systemd, libdir=/lib and use $MAKE

- systemimager_initrd_util_linux_rul.patch
Use $MAKE install instead of manualy copy binaries. If make install is not 
used, the libtool wrapper is copied instead of the real lib.

- systemimager_server_pm.patch
Fix that may be temporary. Right now, if the 1st partition inside the extended 
partition start at the same block, parted returns an error code. This fix avoid 
this by adding one block to the partition created inside the extended 
partition. Far from being a good fix, it makes at least things work. (fix 
commented in the patch)

- systemimager_sysvinit_initrd_rul.patch
Added a test to avoid failing  when trying to copy /lib/ld* and no files are 
found.

- systemimager_util_linux_rul.patch
Enhanced configure step.


Thanks a lot for your help.

PS: Cross posted on oscar-devel mailing list
________________________________________
De : LAHAYE Olivier
Date d'envoi : lundi 18 juin 2012 09:56
À : [email protected]
Objet : [sisuite-users] RE :  Building SystemImager on CentOS 6.2?

This is wired, as I'me sure I've faced the not updated kernel config issue 
(especially the compression method) and using my srpm on my centos-6.2, Id' 
doesn't ask for this.

I've re-uploaded my src.rpm. please check with this rpm and all the sources.

CentOS-6.2 and RHEL-6.2 should be very similar and shoud build the same way. 
(more over, this issue is related to the rpm, not the system. question is asked 
about things related to the rpm...)

http://olivier.lahaye1.free.fr/SOURCES/ grab the external sources here an copy 
this in /usr/src
Make sure you're using those sources when building and not something else 
downloaded elsewhere that could supersede some of those tarballs.

http://olivier.lahaye1.free.fr/SRPMS/systemimager-4.2.0-0.6svn4568.el6.src.rpm
Install this and build it as root (I know it is bad, but I hadn't time to fix 
the mknod issue).

Cheers,

Olivier.
________________________________________
De : Ole Holm Nielsen [[email protected]]
Date d'envoi : vendredi 15 juin 2012 22:25
À : [email protected]
Objet : Re: [sisuite-users] Building SystemImager on CentOS 6.2?

LAHAYE Olivier <[email protected]> wrote:
> Go there and fetch those sources. It should build without asking any 
> questions (it does for me).
> Hopefully I didn't forgot any Requires: in the spec file.
> http://olivier.lahaye1.free.fr/SOURCES/

Thanks a lot!  I grabbed the missing linux_2.6.34.1.orig.tar.gz file now.

Unfortunately the build process still asks unwarranted questions. This is what I
did:

1. I have checked out SVN trunk revision 4568 from
https://systemimager.svn.sourceforge.net/svnroot/systemimager/trunk
2. In the trunk/ directory I do: make source_tarball
3. Then I build it: cd tmp;  rpmbuild -ta systemimager-4.3.0.tar.bz2

However, during the build process the kernel wants to be reconfigured:

> + make all
> rm -rf /root/rpmbuild/BUILD/systemimager-4.3.0/src/linux-2.6.34.1
> Extracting kernel source...done
> cp -a /root/rpmbuild/BUILD/systemimager-4.3.0/patches/linux.x86_64.config 
> /root/rpmbuild/BUILD/systemimager-4.3.0/src/linux-2.6.34.1/.config
> perl -pi -e "s/^EXTRAVERSION =\s*(\S*)\s*\n/EXTRAVERSION = \1-boel_v4.3.0\n/" 
> /root/rpmbuild/BUILD/systemimager-4.3.0/src/linux-2.6.34.1/Makefile
> make -C /root/rpmbuild/BUILD/systemimager-4.3.0/src/linux-2.6.34.1 oldconfig
> make[1]: Entering directory 
> `/root/rpmbuild/BUILD/systemimager-4.3.0/src/linux-2.6.34.1'
>   HOSTCC  scripts/basic/fixdep
>   HOSTCC  scripts/basic/docproc
>   HOSTCC  scripts/basic/hash
>   HOSTCC  scripts/kconfig/conf.o
>   HOSTCC  scripts/kconfig/kxgettext.o
>   SHIPPED scripts/kconfig/zconf.tab.c
>   SHIPPED scripts/kconfig/lex.zconf.c
>   SHIPPED scripts/kconfig/zconf.hash.c
>   HOSTCC  scripts/kconfig/zconf.tab.o
>   HOSTLD  scripts/kconfig/conf
> scripts/kconfig/conf -o arch/x86/Kconfig
> *
> * Restart config...
> *
> *
> * General setup
> *
> Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [Y/n/?] y
> Local version - append to kernel release (LOCALVERSION) []
> Automatically append version information to the version string 
> (LOCALVERSION_AUTO) [Y/n/?] y
> Kernel compression mode
>> 1. Gzip (KERNEL_GZIP)
>   2. Bzip2 (KERNEL_BZIP2)
>   3. LZMA (KERNEL_LZMA)
>   4. LZO (KERNEL_LZO) (NEW)
> choice[1-4?]:

So something must be wrong. I don't why I have to reconfigure the kernel whereas
Olivier doesn't. FYI, my build host is RHEL6.2 (fully updated).

Thanks for any help,
Ole

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users
--- initrd_source/make.d/coreutils.rul.orig	2012-04-24 12:47:30.000000000 +0200
+++ initrd_source/make.d/coreutils.rul	2012-07-04 17:21:19.103108097 +0200
@@ -23,7 +23,9 @@
 PHONY += coreutils
 coreutils:	$(COREUTILS_DIR).build
 $(COREUTILS_DIR).build:	$(COREUTILS_DIR).unpack
-	cd $(COREUTILS_DIR) && ./configure --without-selinux --prefix=/
+	cd $(COREUTILS_DIR) && ./configure \
+		--prefix=/ \
+		--without-selinux
 	$(MAKE) -j $(NCPUS) -C $(COREUTILS_DIR)
 	touch $@
 
@@ -31,7 +33,7 @@
 coreutils_install: $(COREUTILS_DIR).install
 $(COREUTILS_DIR).install:	$(COREUTILS_DIR).build \
 						$(INITRD_BUILD_DIR).prep
-	cd $(COREUTILS_DIR) && make install DESTDIR=$(INITRD_BUILD_DIR)
+	$(MAKE) -j $(NCPUS) -C $(COREUTILS_DIR) install-exec DESTDIR=$(INITRD_BUILD_DIR)
 
 $(INITRD_SRC_DIR)/$(COREUTILS_TARBALL):
 	[ -d $(INITRD_SRC_DIR) ] || mkdir -p $(INITRD_SRC_DIR)
--- initrd_source/mklibs.bef.orig	2012-04-24 12:47:30.000000000 +0200
+++ initrd_source/mklibs.bef	2012-07-23 15:30:55.252045940 +0200
@@ -86,9 +86,13 @@
         if ( -e "$path/$lib" ) {
             my $source_lib = "$path/$lib";
             $source_lib =~ s|/+|/|g;
-            print ">  Using $source_lib\n";
-            $keepers{$finders{$lib}} = "$source_lib";
-            last;
+            my $dest_lib = "$d$finders{$lib}";
+            $dest_lib =~ s|/+|/|g;
+            if ( ! -e "$dest_lib" ) {
+                print ">  Using $source_lib\n";
+                $keepers{$finders{$lib}} = "$source_lib";
+                last;
+            }
         }
     }
 }
--- initrd_source/initrd.rul.orig	2012-07-10 18:09:21.968045881 +0200
+++ initrd_source/initrd.rul	2012-07-11 17:46:58.402981687 +0200
@@ -163,13 +163,13 @@
 	# Explicitly include more w/mklibs -L.  -dawild-
 ifeq ($(ARCH),x86_64)
 	( cd $(INITRD_BUILD_DIR) && \
-		$(INITRD_DIR)/mklibs.bef -L $(INITRD_SRC_DIR)/$(E2FSPROGS_DIR)/lib:/lib64:/usr/lib64:/lib:/usr/lib -v -d lib64 ./*bin/* )
+		$(INITRD_DIR)/mklibs.bef -L $(INITRD_SRC_DIR)/$(E2FSPROGS_DIR)/lib:/lib64:/usr/lib64:/lib:/usr/lib -v -d . ./*bin/* )
 	# copy libnss files as they are not automatically included
 	cp -a /lib64/libnss* $(INITRD_BUILD_DIR)/lib64
 
 else
 	( cd $(INITRD_BUILD_DIR) && \
-		$(INITRD_DIR)/mklibs.bef -L $(INITRD_SRC_DIR)/$(E2FSPROGS_DIR)/lib:/lib:/usr/lib -v -d lib ./*bin/* )
+		$(INITRD_DIR)/mklibs.bef -L $(INITRD_SRC_DIR)/$(E2FSPROGS_DIR)/lib:/lib:/usr/lib -v -d . ./*bin/* )
 	# copy libnss files as they are not automatically included
 	cp -a /lib/libnss* $(INITRD_BUILD_DIR)/lib
 
--- initrd_source/make.d/udev.rul.orig	2012-07-11 17:58:34.964985408 +0200
+++ initrd_source/make.d/udev.rul	2012-07-11 17:54:42.836170937 +0200
@@ -25,18 +25,19 @@
 		--prefix=/usr \
 		--sysconfdir=/etc \
 		--sbindir=/sbin \
-		--libdir=/usr/lib \
+		--libdir=/lib \
 		--with-rootlibdir=/lib \
+		--with-systemdsystemunitdir=no \
 		--libexecdir=/lib/udev \
-        --disable-extras \
-        --disable-introspection
-	cd $(UDEV_DIR) && make
+		--disable-extras \
+		--disable-introspection
+	$(MAKE) -j $(NCPUS) -C $(UDEV_DIR)
 	touch $@
 
 PHONY += udev_install
 udev_install:	$(UDEV_DIR).install
 $(UDEV_DIR).install:	$(UDEV_DIR).build
-	cd $(UDEV_DIR) && make install DESTDIR=$(INITRD_BUILD_DIR)
+	cd $(UDEV_DIR) && $(MAKE) install-exec DESTDIR=$(INITRD_BUILD_DIR)
 
 $(UDEV_DIR).unpack:   	$(INITRD_DIR)/make.d/udev.rul	\
 			$(INITRD_SRC_DIR)/$(UDEV_TARBALL)
--- initrd_source/make.d/util-linux.rul.orig	2012-04-24 12:47:30.000000000 +0200
+++ initrd_source/make.d/util-linux.rul	2012-07-04 16:19:53.658108577 +0200
@@ -23,17 +23,24 @@
 PHONY += util-linux
 util-linux:	$(UTIL_LINUX_DIR).build
 $(UTIL_LINUX_DIR).build:	$(UTIL_LINUX_DIR).unpack
-	cd $(UTIL_LINUX_DIR) && ./configure
+	cd $(UTIL_LINUX_DIR) && ./configure \
+			--prefix=/ \
+			--sysconfdir=/etc \
+			--libexecdir=/lib/udev \
+			--with-sysroot=$(INITRD_SRC_DIR)
 	$(MAKE) -j $(NCPUS) -C $(UTIL_LINUX_DIR)
 	touch $@
 
+PHONY += util-linux_install
+util-linux_install: $(UTIL_LINUX_DIR).install
 $(UTIL_LINUX_DIR).install:	$(UTIL_LINUX_DIR).build \
 						$(INITRD_BUILD_DIR).prep
-	install -m 755 $(UTIL_LINUX_DIR)/disk-utils/mkswap   $(INITRD_BUILD_DIR)/sbin
-	install -m 755 $(UTIL_LINUX_DIR)/disk-utils/blockdev $(INITRD_BUILD_DIR)/sbin
-	install -m 755 $(UTIL_LINUX_DIR)/fdisk/sfdisk        $(INITRD_BUILD_DIR)/sbin
-	install -m 755 $(UTIL_LINUX_DIR)/mount/mount         $(INITRD_BUILD_DIR)/bin
-	install -m 755 $(UTIL_LINUX_DIR)/mount/umount        $(INITRD_BUILD_DIR)/bin
+	$(MAKE) -j $(NCPUS) -C $(UTIL_LINUX_DIR) install-exec DESTDIR=$(INITRD_BUILD_DIR)
+#	install -m 755 $(UTIL_LINUX_DIR)/disk-utils/mkswap   $(INITRD_BUILD_DIR)/sbin
+#	install -m 755 $(UTIL_LINUX_DIR)/disk-utils/blockdev $(INITRD_BUILD_DIR)/sbin
+#	install -m 755 $(UTIL_LINUX_DIR)/fdisk/sfdisk        $(INITRD_BUILD_DIR)/sbin
+#	install -m 755 $(UTIL_LINUX_DIR)/mount/mount         $(INITRD_BUILD_DIR)/bin
+#	install -m 755 $(UTIL_LINUX_DIR)/mount/umount        $(INITRD_BUILD_DIR)/bin
 
 $(INITRD_SRC_DIR)/$(UTIL_LINUX_TARBALL):
 	[ -d $(INITRD_SRC_DIR) ] || mkdir -p $(INITRD_SRC_DIR)
Index: initrd_source/make.d/parted.rul
===================================================================
--- initrd_source/make.d/parted.rul	(révision 4568)
+++ initrd_source/make.d/parted.rul	(copie de travail)
@@ -6,8 +6,10 @@
 #   - go to 1.6.19
 #   2010.06.13  Brian Elliott Filney
 #   - go to 2.3
+#   2012.11.06  Olivier Lahaye
+#   - go to 3.1 (need to avoid redhat bug 441244)
 
-PARTED_VERSION := 2.3
+PARTED_VERSION := 3.1
 PARTED_TARBALL := parted-$(PARTED_VERSION).tar.xz
 #PARTED_URL := http://ftp.gnu.org/gnu/parted/$(PARTED_TARBALL)
 PARTED_URL := http://download.systemimager.org/pub/parted/$(PARTED_TARBALL)
--- ./lib/SystemImager/Server.pm.orig	2012-07-24 12:40:18.529983921 +0200
+++ ./lib/SystemImager/Server.pm	2012-07-24 13:02:23.030982774 +0200
@@ -578,7 +578,12 @@
                 $startMB{$m} = q($END_OF_LAST_PRIMARY);
             
             } elsif ("$p_type{$m}" eq "logical") {
-                $startMB{$m} = q($END_OF_LAST_LOGICAL);
+                # $startMB{$m} = q($END_OF_LAST_LOGICAL);
+                # Fix parted extended partition table kernel reload error: -OL-
+		# "Warning: The kernel was unable to re-read the partition table..."
+		# Maybe related to bug https://bugzilla.redhat.com/show_bug.cgi?id=441244
+		# => TEMPORARY FIX until parted get fixed.
+                $startMB{$m} = q#$(echo "scale=3; ($END_OF_LAST_LOGICAL + 1)") | bc)#;
             }
 
             if (("$unit_of_measurement" eq "mb") 
--- initrd_source.orig/initrd.rul	2012-04-24 12:47:30.000000000 +0200
+++ initrd_source/initrd.rul	2012-04-25 10:17:36.931447863 +0200
@@ -158,7 +158,7 @@
 								$(ZLIB_DIR).install
 
 	# Copy over the standard libs. -BEF-
-	cp -a /lib/ld*   $(INITRD_BUILD_DIR)/lib
+	test -z "$(echo /lib/ld*)" || cp -a /lib/ld*   $(INITRD_BUILD_DIR)/lib
 	test ! -d /lib64 || cp -a /lib64/ld* $(INITRD_BUILD_DIR)/lib64
 	# Explicitly include more w/mklibs -L.  -dawild-
 ifeq ($(ARCH),x86_64)
--- initrd_source/make.d/util-linux.rul.orig	2012-04-24 12:47:30.000000000 +0200
+++ initrd_source/make.d/util-linux.rul	2012-07-04 16:19:53.658108577 +0200
@@ -23,17 +23,24 @@
 PHONY += util-linux
 util-linux:	$(UTIL_LINUX_DIR).build
 $(UTIL_LINUX_DIR).build:	$(UTIL_LINUX_DIR).unpack
-	cd $(UTIL_LINUX_DIR) && ./configure
+	cd $(UTIL_LINUX_DIR) && ./configure \
+			--prefix=/ \
+			--sysconfdir=/etc \
+			--libexecdir=/lib/udev \
+			--with-sysroot=$(INITRD_SRC_DIR)
 	$(MAKE) -j $(NCPUS) -C $(UTIL_LINUX_DIR)
 	touch $@
 
+PHONY += util-linux_install
+util-linux_install: $(UTIL_LINUX_DIR).install
 $(UTIL_LINUX_DIR).install:	$(UTIL_LINUX_DIR).build \
 						$(INITRD_BUILD_DIR).prep
-	install -m 755 $(UTIL_LINUX_DIR)/disk-utils/mkswap   $(INITRD_BUILD_DIR)/sbin
-	install -m 755 $(UTIL_LINUX_DIR)/disk-utils/blockdev $(INITRD_BUILD_DIR)/sbin
-	install -m 755 $(UTIL_LINUX_DIR)/fdisk/sfdisk        $(INITRD_BUILD_DIR)/sbin
-	install -m 755 $(UTIL_LINUX_DIR)/mount/mount         $(INITRD_BUILD_DIR)/bin
-	install -m 755 $(UTIL_LINUX_DIR)/mount/umount        $(INITRD_BUILD_DIR)/bin
+	$(MAKE) -j $(NCPUS) -C $(UTIL_LINUX_DIR) install-exec DESTDIR=$(INITRD_BUILD_DIR)
+#	install -m 755 $(UTIL_LINUX_DIR)/disk-utils/mkswap   $(INITRD_BUILD_DIR)/sbin
+#	install -m 755 $(UTIL_LINUX_DIR)/disk-utils/blockdev $(INITRD_BUILD_DIR)/sbin
+#	install -m 755 $(UTIL_LINUX_DIR)/fdisk/sfdisk        $(INITRD_BUILD_DIR)/sbin
+#	install -m 755 $(UTIL_LINUX_DIR)/mount/mount         $(INITRD_BUILD_DIR)/bin
+#	install -m 755 $(UTIL_LINUX_DIR)/mount/umount        $(INITRD_BUILD_DIR)/bin
 
 $(INITRD_SRC_DIR)/$(UTIL_LINUX_TARBALL):
 	[ -d $(INITRD_SRC_DIR) ] || mkdir -p $(INITRD_SRC_DIR)
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users

Reply via email to