Skip to contentSkip to conversation

kexec-tools: Fix rpm build

PATCH In review Ameya Palande 6 participants 15 messages Mar 18, 2010 – Mar 29, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover kexec-tools: Fix rpm build

This patchset fixes currently broken rpm build.

Ameya Palande (6):
kexec-tools: Fix rpm Version tag
kexec-tools: Use same source in rpm spec and Makefile.in
kexec-tools: Add missing include files in dist target
kexec-tools: Add kdump and kexec_test to rpm spec
kexec-tools: Add rpm spec file to the dist-clean target
kexec-tools: Use default rpmbuild definations

 Makefile.in         |   21 +++++----------------
 configure.ac        |    2 +-
 include/Makefile    |    1 +
 kexec-tools.spec.in |    2 ++
 kexec/Makefile      |    1 +
 5 files changed, 10 insertions(+), 17 deletions(-)

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#1 lore raw

PATCH 1/6 kexec-tools: Fix rpm Version tag

Version tag in rpm spec file doesn't allow '-', so use '_' to fix the rpm build.

---
 configure.ac |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure.ac +1 -1
index 88d2e0b..f3994a3 100644
@@ -4,7 +4,7 @@ dnl
 dnl 
 
 dnl ---Required
-AC_INIT(kexec-tools, 2.0.1-git)
+AC_INIT(kexec-tools, 2.0.1_git)
 AC_CONFIG_AUX_DIR(./config)
 AC_CONFIG_HEADERS([include/config.h])
 AC_LANG(C)
Signature · 7 lines
1.6.3.3


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#2 lore raw

PATCH 2/6 kexec-tools: Use same source in rpm spec and Makefile.in

In reply to Ameya Palande
---
 Makefile.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Makefile.in +2 -2
index cb0faae..3532457 100644
@@ -202,7 +202,7 @@ $(TARBALL.gz): $(TARBALL)
 	gzip -c < $^ > $@
 
 RPMDIR=rpm
-rpm: $(TARBALL)
+rpm: $(TARBALL.gz)
 	$(MKDIR) -p $(RPMDIR)/RPM $(RPMDIR)/SRPM $(RPMDIR)/BUILD \
 		$(RPMDIR)/SPECS $(RPMDIR)/TMP $(RPMDIR)/SOURCES
 	unset MAKEFLAGS MAKELEVEL; \
@@ -213,7 +213,7 @@ rpm: $(TARBALL)
 		--define '_specdir $(RPMDIR)/SPECS' \
 		--define '_tmppath $(RPMDIR)/TMP' \
 		--define '_sourcedir $(RPMDIR)/SOURCES' \
-		$(TARBALL)
+		$(TARBALL.gz)
 
 $(SPEC): kexec-tools.spec.in Makefile
 	$(SED) -e 's,^Version: $$,Version: $(PACKAGE_VERSION),' $< > $@
Signature · 7 lines
1.6.3.3


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#3 lore raw

PATCH 3/6 kexec-tools: Add missing include files in dist target

In reply to Ameya Palande
---
 include/Makefile |    1 +
 kexec/Makefile   |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
include/Makefile +1 -0
index de5a3bb..12c1030 100644
@@ -6,6 +6,7 @@ dist += include/Makefile		\
 	include/x86/mb_header.h		\
 	include/elf.h			\
 	include/image.h			\
+	include/unused.h		\
 	include/boot/linuxbios_tables.h	\
 	include/boot/beoboot.h		\
 	include/boot/elf_boot.h
kexec/Makefile +1 -0
index 9a55af2..4e091ba 100644
@@ -32,6 +32,7 @@ dist += kexec/Makefile $(KEXEC_SRCS) $(KEXEC_GENERATED_SRCS)	\
 	kexec/crashdump.h kexec/firmware_memmap.h		\
 	kexec/kexec-elf-boot.h					\
 	kexec/kexec-elf.h kexec/kexec-sha256.h			\
+	kexec/kexec-zlib.h kexec/kexec-lzma.h			\
 	kexec/kexec-syscall.h kexec/kexec.h kexec/kexec.8
 
 $(ARCH)_PROC_IOMEM		= kexec/proc_iomem.c
Signature · 7 lines
1.6.3.3


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#4 lore raw

PATCH 4/6 kexec-tools: Add kdump and kexec_test to rpm spec

In reply to Ameya Palande

Without this patch rpmbuild complains about unpackaged kdump and kexec_test files.

---
 kexec-tools.spec.in |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
kexec-tools.spec.in +2 -0
index 2aa1310..5eadece 100644
@@ -30,6 +30,8 @@ make install DESTDIR=${RPM_BUILD_ROOT}
 %files
 %defattr(-,root,root)
 %{_sbindir}/kexec
+%{_sbindir}/kdump
+%{_libdir}/%{name}/kexec_test
 %doc News
 %doc COPYING
 %doc TODO
Signature · 7 lines
1.6.3.3


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#5 lore raw

PATCH 5/6 kexec-tools: Add rpm spec file to the dist-clean target

In reply to Ameya Palande

This patch adds rpm spec file to the "make dist-clean" target and also removes a wrong comment.

---
 Makefile.in |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
Makefile.in +1 -2
index 3532457..256f4de 100644
@@ -126,7 +126,6 @@ all: $(TARGETS)
 # collect objects to be removed in 'make clean'
 clean =
 
-# collect objects to be removed in 'make clean'
 dist =	AUTHORS COPYING INSTALL News TODO Makefile.in configure.ac configure \
 	kexec-tools.spec.in config/
 
@@ -235,7 +234,7 @@ distclean: dist-clean
 
 dist-clean: clean
 	$(RM) -f config.log config.status config.cache Makefile include/config.h
-	$(RM) -f include/config.h.in configure
+	$(RM) -f include/config.h.in configure $(SPEC)
 	$(RM) -rf autom4te.cache
 
 install: $(TARGETS)
Signature · 7 lines
1.6.3.3


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#6 lore raw

PATCH 6/6 kexec-tools: Use default rpmbuild definations

In reply to Ameya Palande

Since current mechanism for building rpm into custom directory is not working, remove it and switch to system defaults for rpmbuild.

---
 Makefile.in |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)
Makefile.in +3 -13
index 256f4de..cc4f8d3 100644
@@ -200,19 +200,9 @@ $(TARBALL): $(SRCS) $(GENERATED_SRCS)
 $(TARBALL.gz): $(TARBALL)
 	gzip -c < $^ > $@
 
-RPMDIR=rpm
 rpm: $(TARBALL.gz)
-	$(MKDIR) -p $(RPMDIR)/RPM $(RPMDIR)/SRPM $(RPMDIR)/BUILD \
-		$(RPMDIR)/SPECS $(RPMDIR)/TMP $(RPMDIR)/SOURCES
-	unset MAKEFLAGS MAKELEVEL; \
-	$(RPMBUILD) -ta \
-		--define '_rpmdir $(RPMDIR)/RPM' \
-		--define '_srcrpmdir $(RPMDIR)/SRPM' \
-		--define '_builddir $(RPMDIR)/BUILD' \
-		--define '_specdir $(RPMDIR)/SPECS' \
-		--define '_tmppath $(RPMDIR)/TMP' \
-		--define '_sourcedir $(RPMDIR)/SOURCES' \
-		$(TARBALL.gz)
+	unset MAKEFLAGS MAKELEVEL;
+	$(RPMBUILD) -ta $(TARBALL.gz)
 
 $(SPEC): kexec-tools.spec.in Makefile
 	$(SED) -e 's,^Version: $$,Version: $(PACKAGE_VERSION),' $< > $@
@@ -227,7 +217,7 @@ echo::
 
 clean:
 	$(RM) -f $(clean)
-	$(RM) -rf rpm build
+	$(RM) -rf build
 	$(RM) -f $(TARBALL) $(TARBALL.gz)
 
 distclean: dist-clean
Signature · 7 lines
1.6.3.3


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
#7 lore raw

Re: [PATCH 6/6] kexec-tools: Use default rpmbuild definations

Quoted 2 lines · Ameya Palande

Since current mechanism for building rpm into custom directory is not working, remove it and switch to system defaults for rpmbuild.

Does RPM really bit rot that quickly?

I know at the time I added the code it was the only way I could get rpm to build an rpm without being root. Something that seems desirable.

Eric

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#8 lore raw

Re: [PATCH 6/6] kexec-tools: Use default rpmbuild definations

Am 19.03.2010 21:37, schrieb Eric W. Biederman:

Quoted 10 lines
Quoted 2 lines · Ameya Palande

Since current mechanism for building rpm into custom directory is not working, remove it and switch to system defaults for rpmbuild.

Does RPM really bit rot that quickly?

I know at the time I added the code it was the only way I could get rpm to build an rpm without being root. Something that seems desirable.

It works here on openSUSE 11.1 when I change

-RPMDIR=rpm
+RPMDIR=$(shell pwd)/rpm

Of course only after applying the other patches...

Regards,
Bernhard

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#9 lore raw

Re: [PATCH 6/6] kexec-tools: Use default rpmbuild definations

Quoted 11 lines · ext Bernhard Walle

Am 19.03.2010 21:37, schrieb Eric W. Biederman:

Quoted 10 lines
Quoted 2 lines · Ameya Palande

Since current mechanism for building rpm into custom directory is not working, remove it and switch to system defaults for rpmbuild.

Does RPM really bit rot that quickly?

I know at the time I added the code it was the only way I could get rpm to build an rpm without being root. Something that seems desirable.

I can build rpm on ubuntu 9.10 as a normal user without having this custom "rpm" directory.

Review

Quoted 4 lines

It works here on openSUSE 11.1 when I change

(quoted diff) +1 -1
-RPMDIR=rpm
+RPMDIR=$(shell pwd)/rpm

On Ubuntu 9.10 when I removed RPMDIR stuff, rpmbuild command takes system defaults and builds rpm in $HOME/rpmbuild directory.

Cheers,
Ameya.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#10 lore raw

Re: [PATCH 6/6] kexec-tools: Use default rpmbuild definations

In reply to Bernhard Walle
Quoted 17 lines · Bernhard Walle

Am 19.03.2010 21:37, schrieb Eric W. Biederman:

Quoted 10 lines
Quoted 2 lines · Ameya Palande

Since current mechanism for building rpm into custom directory is not working, remove it and switch to system defaults for rpmbuild.

Does RPM really bit rot that quickly?

I know at the time I added the code it was the only way I could get rpm to build an rpm without being root. Something that seems desirable.

It works here on openSUSE 11.1 when I change

(quoted diff) +1 -1
-RPMDIR=rpm
+RPMDIR=$(shell pwd)/rpm
Quoted 1 line

Of course only after applying the other patches...

That seems reasonable to me, care to make it a proper patch?

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#11 lore raw

Re: [PATCH 6/6] kexec-tools: Use default rpmbuild definations

Am 24.03.2010 12:30, schrieb Simon Horman:

Quoted 13 lines · Bernhard Walle
Quoted 12 lines

Am 19.03.2010 21:37, schrieb Eric W. Biederman:

Quoted 10 lines
Quoted 2 lines · Ameya Palande

Since current mechanism for building rpm into custom directory is not working, remove it and switch to system defaults for rpmbuild.

Does RPM really bit rot that quickly?

I know at the time I added the code it was the only way I could get rpm to build an rpm without being root. Something that seems desirable.

Quoted 8 lines
Quoted 6 lines

It works here on openSUSE 11.1 when I change

(quoted diff) +1 -1
-RPMDIR=rpm
+RPMDIR=$(shell pwd)/rpm

Of course only after applying the other patches...

That seems reasonable to me, care to make it a proper patch?

Since 529ad47e356a8e68be9cde771af8e909a784c3fc has been applied which removes that code, this is no longer possible. ;)

However, I'm fine with that change. The user can always create a custom ~/.rpmmacros like

%_topdir /home/bwalle/src/packages

to build the RPM in a local tree.

Regards,
Bernhard

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#12 lore raw

Re: [PATCH 6/6] kexec-tools: Use default rpmbuild definations

Quoted 19 lines · Bernhard Walle

Am 24.03.2010 12:30, schrieb Simon Horman:

Quoted 18 lines · Bernhard Walle
Quoted 17 lines

Am 19.03.2010 21:37, schrieb Eric W. Biederman:

Quoted 10 lines
Quoted 2 lines · Ameya Palande

Since current mechanism for building rpm into custom directory is not working, remove it and switch to system defaults for rpmbuild.

Does RPM really bit rot that quickly?

I know at the time I added the code it was the only way I could get rpm to build an rpm without being root. Something that seems desirable.

It works here on openSUSE 11.1 when I change

(quoted diff) +1 -1
-RPMDIR=rpm
+RPMDIR=$(shell pwd)/rpm
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Of course only after applying the other patches...

That seems reasonable to me, care to make it a proper patch?

Since 529ad47e356a8e68be9cde771af8e909a784c3fc has been applied which removes that code, this is no longer possible. ;)

;)

Quoted 7 lines

However, I'm fine with that change. The user can always create a custom ~/.rpmmacros like

%_topdir /home/bwalle/src/packages

to build the RPM in a local tree.

Ok, that seems reasonable to me too.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#13 lore raw

Anyone working on kexec for embedded powerpc?

In reply to Bernhard Walle

Hi all!
I have a mpc8641 hpcn board which i want to run kexec on and also do some research on software restart.
I think kexec is an excellent idea for embedded systems where you want to have quick restarts, but currently I can only see ppc gamecube support.

Somewhere i saw that Benjamin Herrenschmidt had plans, but it was a rather old message. Have anyone done any work with this for powerpc? Otherwise i intend do start some work to port it to the powerpc platform(if possible).
I guess that the powerpc usage of device tree instead of the "blob" might be the biggest issue?

Is this the correct place for these discussions?

/Daniel Flemström
SE research department
Mälardalen University

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec