Ask Your Question
2

Not able to build a fedora kernel

asked 2015-07-29 07:54:44 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hi,

I want build a fedora kernel. For this I used the steps described in https://fedoraproject.org/wiki/Buildi... . But it failed when I executed "git checkout origin/f22". The command "fedpkg clone -a kernel" was successful. I think command "fedpkg clone kernel " is not required as I tried to check out the code as anonymous user.

The following is the error: [kanda@localhost kernel]$ git checkout origin/f22 Note: checking out 'origin/f22'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:

git checkout -b new_branch_name

HEAD is now at 61b3efd... - CVE-2015-3290 CVE-2015-3291 NMI issues (rhbz 1243465 1245927) [kanda@localhost kernel]$

Any idea on how to resolve the issue?

Regards, Kanda

edit retag flag offensive close merge delete

Comments

Everything you've posted looks all right, so far … what is the error?

BRPocock gravatar imageBRPocock ( 2015-07-29 11:16:06 -0500 )edit

Hi BRPocock, Thanks for looking into this issue. If there is nothing wrong in command "git checkout origin/f22" output, I expected "fedpkg local" command to build kernel. But it has thrown error as follows:

[kanda@localhost kernel]$ fedpkg local Could not execute local: Repo in inconsistent state: HEAD is a detached symbolic reference as it points to '359ba4a5a5d81afae63c91ddc2661772966442ee'

I am new to fedora and also for kernel build. So I am sure I might be missing somthing. Any help is a big help.

Regards, Kanda

kandasamy gravatar imagekandasamy ( 2015-07-29 22:32:04 -0500 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2015-07-30 02:19:39 -0500

geforce gravatar image

updated 2015-07-30 02:32:30 -0500

Try using the local branch name instead.

Use this command to switch branches

fedpkg switch-branch f22

or

git checkout f22

then try creating your branch

git checkout -b new_branch_name

It works here ok

$ git checkout master 
Switched to branch 'master'
Your branch is behind 'origin/master' by 8 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
[leigh@pc-main kernel]$ git pull
Updating 45a3161..b6e2727
Fast-forward
 ...rt-ACPI-video-change-acpi-video-brightnes.patch | 42 -----------
 kdbus.patch                                        | 87 ++++++++++++++++++++++
 kernel.spec                                        | 23 ++++--
 sources                                            |  4 +-
 4 files changed, 107 insertions(+), 49 deletions(-)
 delete mode 100644 Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch
[leigh@pc-main kernel]$ git checkout f22
Switched to branch 'f22'
Your branch is up-to-date with 'origin/f22'.
[leigh@pc-main kernel]$ git checkout -b leigh_f22
Switched to a new branch 'leigh_f22'
[leigh@pc-main kernel]$ fedpkg --dist f22 local

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.3advzJ
+ umask 022
+ cd /home/leigh/Desktop/kernel
+ patch_command='patch -p1 -F1 -s'
edit flag offensive delete link more

Comments

Hi Leigh,

It is working.

Thanks a lot, Kanda

kandasamy gravatar imagekandasamy ( 2015-07-31 00:48:24 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-07-29 07:54:44 -0500

Seen: 1,187 times

Last updated: Jul 30 '15