Skip to contentSkip to conversation

No longer able to build kernel into RPM on Fedora

PATCH In review Shawn Starr 2 participants 5 messages Oct 12, 2013 – Oct 13, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

Hello folks,

My usual approach to testing git snapshots of Linus's tree (with custom patches applied on top) is to make rpm and install this into my system for a clean add/remove of test kernels.

However, the developers of rpm removed the --target and -ta options, so I can't take tarball and build into RPM anymore.

Since I last built custom RPM builds of Linus's tree was likely Fedora 18, it seems the option target got removed by 19.

Any ideas, fixes?

Thanks,
Shawn

#1 lore raw

PATCH 1/1 Force check for rpm-build where package is not installed

Quoted 9 lines · Shawn Starr

Hello folks,

My usual approach to testing git snapshots of Linus's tree (with custom patches applied on top) is to make rpm and install this into my system for a clean add/remove of test kernels.

However, the developers of rpm removed the --target and -ta options, so I can't take tarball and build into RPM anymore.

Quoted 7 lines

Since I last built custom RPM builds of Linus's tree was likely Fedora 18, it seems the option target got removed by 19.

Any ideas, fixes?

Thanks,
Shawn

Sorry for noise, I was missing rpm-build. That said, here's a patch to force check for rpm-build as any modern RPM distribution should be be using a newer rpm release.

Thanks,
Shawn

---
 scripts/package/Makefile               | 8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)
scripts/package/Makefile +7 -1
index a4f31c9..aac24de 100644
@@ -23,7 +23,7 @@
 
 # Do we have rpmbuild, otherwise fall back to the older rpm
 RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
-                  else echo rpm; fi)
+                  else echo none; fi)
 
 # Remove hyphens since they have special meaning in RPM filenames
 KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
@@ -51,6 +51,12 @@ rpm-pkg rpm: FORCE
        rm -f $(objtree)/.scmversion
        $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
        mv -f $(objtree)/.tmp_version $(objtree)/.version
+       @if test "$(RPM)" != "rpmbuild"; then \
+               echo "To build the kernel you must install the rpm-build package from your distri
+               echo "aborting package creation." ; \
+               false; \
+       fi
+
        $(RPM) $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
        rm $(KERNELPATH).tar.gz kernel.spec
 
#2 lore raw

resend [PATCH][BUILD] Force check for rpm-build where package is not installed

Quoted 18 lines · Shawn Starr
Quoted 9 lines · Shawn Starr

Hello folks,

My usual approach to testing git snapshots of Linus's tree (with custom patches applied on top) is to make rpm and install this into my system for a clean add/remove of test kernels.

However, the developers of rpm removed the --target and -ta options, so I can't take tarball and build into RPM anymore.

Quoted 7 lines

Since I last built custom RPM builds of Linus's tree was likely Fedora 18, it seems the option target got removed by 19.

Any ideas, fixes?

Thanks,
Shawn

Quoted 7 lines

Sorry for noise, I was missing rpm-build. That said, here's a patch to force check for rpm-build as any modern RPM distribution should be be using a newer rpm release.

Thanks,
Shawn

---
 scripts/package/Makefile               | 8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)
scripts/package/Makefile +3 -1
index a4f31c9..aac24de 100644                                                                                                                     
@@ -23,7 +23,7 @@                                                                                                                                 
                                                                                                                                                  
 # Do we have rpmbuild, otherwise fall back to the older rpm                                                                                      
 RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \                                                                              
-                  else echo rpm; fi)                                                                                                             
+                  else echo none; fi)                                                                                                           
                                                                                                                                                  
 # Remove hyphens since they have special meaning in RPM filenames                                                                                
 KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))                                                                                               
@@ -51,6 +51,12 @@ rpm-pkg rpm: FORCE                                                                                                             
        rm -f $(objtree)/.scmversion                                                                                                              
        $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version                                                                    
        mv -f $(objtree)/.tmp_version $(objtree)/.version
+       @if test "$(RPM)" != "rpmbuild"; then \
+               echo "To build the kernel you must install the rpm-build 

package from your distribution" ;\
+ echo "aborting package creation." ; \
+ false; \
+ fi
+

        $(RPM) $(RPMOPTS) --target $(UTS_MACHINE) -ta $(KERNELPATH).tar.gz
        rm $(KERNELPATH).tar.gz kernel.spec
#3 lore raw
In reply to Shawn Starr

As a temporary work around, can you revert to the older version of RPM?

Regards

Quoted 22 lines · Shawn Starr

Hello folks,

My usual approach to testing git snapshots of Linus's tree (with custom patches applied on top) is to make rpm and install this into my system for a clean add/remove of test kernels.

However, the developers of rpm removed the --target and -ta options, so I can't take tarball and build into RPM anymore.

Since I last built custom RPM builds of Linus's tree was likely Fedora 18, it seems the option target got removed by 19.

Any ideas, fixes?

Thanks,
Shawn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 5 lines
Chris Jones

Founder and Lead Software Architect
Paradise Software
[email protected]
#4 lore raw
Quoted 2 lines · Chris Jones

As a temporary work around, can you revert to the older version of RPM?

Hi Chris,

I was missing rpm-build, I have a patch submitted to force use of rpm-build. AFAIK, nobody uses legacy rpm anymore since falling back to just rpm will fail since it does not have --target or -ta options.

Thanks,
Shawn

Quoted 25 lines

Regards

Quoted 21 lines · Shawn Starr

Hello folks,

My usual approach to testing git snapshots of Linus's tree (with custom patches applied on top) is to make rpm and install this into my system for a clean add/remove of test kernels.

However, the developers of rpm removed the --target and -ta options, so I can't take tarball and build into RPM anymore.

Since I last built custom RPM builds of Linus's tree was likely Fedora 18, it seems the option target got removed by 19.

Any ideas, fixes?

Thanks,
Shawn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/