How to recompile a package, the easiest way?

I’m testing edits I made to grub2, mode specifically grub-core/term/usb_keyboard.c.

I have the source code obtained from https://github.com/rhboot/grub2/blob/fedora-44/grub-core and also the source obtained from https://kojipkgs.fedoraproject.org//packages/grub2/2.12/60.fc44/src/grub2-2.12-60.fc44.src.rpm.

I tried to recompile from the former but got this error when running

./bootstrap
./configure
make

:

configure: error: in '/home/shizuma/.local/src/grub2':
configure: error: no acceptable C compiler found in $PATH
See 'config.log' for more details

This PC was never meant to compile C code.

What I’d prefer is a way to recompile grub without having to deal with a gazillion of devel files and dependencies that there is no easy way to get rid of after compilation.

There’s a beautiful method described there but I’m afraid it’s specific to rpmfusion.

Edits are below:

--- usb_keyboard.c.orig	2026-07-27 08:35:13.144132452 -0400
+++ usb_keyboard.c	2026-07-27 08:35:32.725865065 -0400
@@ -28,7 +28,8 @@
 
 GRUB_MOD_LICENSE ("GPLv3+");
 
-

+/* Définition du délai anti-rebond en millisecondes */
+#define GRUB_USB_DEBOUNCE_DELAY_MS 80
 
 enum
   {
@@ -80,6 +81,10 @@
   grub_uint8_t last_report[8];
   int index;
   int max_index;
+
+  /* NOUVEAU: Variables pour l'anti-rebond (Key Debouncing) */
+  int last_accepted_keycode;
+  grub_uint64_t last_accepted_time;
 };
 
 static int grub_usb_keyboard_getkey (struct grub_term_input *term);
@@ -220,27 +225,7 @@
       return 0;
     }
 
-  /* Test showed that getting report may make the keyboard go nuts.
-     Moreover since we're reattaching keyboard it usually sends
-     an initial message on interrupt pipe and so we retrieve
-     the same keystatus.
-   */
-#if 0
-  {
-    grub_uint8_t report[8];
-    grub_usb_err_t err;
-    grub_memset (report, 0, sizeof (report));
-    err = grub_usb_control_msg (usbdev, GRUB_USB_REQTYPE_CLASS_INTERFACE_IN,
-    				USB_HID_GET_REPORT, 0x0100, interfno,
-				sizeof (report), (char *) report);
-    if (err)
-      data->status = 0;
-    else
-      data->status = report[0];
-  }
-#else
   data->status = 0;
-#endif
 
   data->transfer = grub_usb_bulk_read_background (usbdev,
 						  data->endp,
@@ -256,6 +241,10 @@
   data->mods = 0;
   data->dead = 0;
 
+  /* NOUVEAU: Initialisation des variables anti-rebond */
+  data->last_accepted_keycode = KEY_NO_KEY;
+  data->last_accepted_time = 0;
+
   grub_term_register_input_active ("usb_keyboard", &grub_usb_keyboards[curnum]);
 
   return 1;
@@ -283,6 +270,7 @@
 {
   int index = termdata->index;
   int i, keycode;
+  grub_uint64_t current_time;
 
   /* Sanity check */
   if (index < 2)
@@ -300,8 +288,6 @@
           /* Don't parse (rest of) this report */
           termdata->index = 0;
           if (keycode != KEY_NO_KEY)
-          /* Don't replace last report with current faulty report
-           * in future ! */
             grub_memcpy (termdata->current_report,
                          termdata->last_report,
                          sizeof (termdata->report));
@@ -317,6 +303,19 @@
          * ignore it. */
         continue;
 
+      /* 
+       * NOUVEAU : FILTRE ANTI-REBOND (KEY DEBOUNCING)
+       * Si la touche est identique à la dernière touche enregistrée et 
+       * qu'elle survient trop vite (moins de GRUB_USB_DEBOUNCE_DELAY_MS),
+       * on l'ignore (rebond du dongle/clavier sans-fil).
+       */
+      current_time = grub_get_time_ms ();
+      if (keycode == termdata->last_accepted_keycode &&
+          (current_time - termdata->last_accepted_time) < GRUB_USB_DEBOUNCE_DELAY_MS)
+        {
+          continue; /* Rebond détecté, passer à la touche suivante */
+        }
+
       if (keycode == KEY_CAPS_LOCK)
         {
           termdata->mods ^= GRUB_TERM_STATUS_CAPS;
@@ -331,6 +330,10 @@
           continue;
         }
 
+      /* NOUVEAU: Sauvegarder la touche acceptée et le timestamp */
+      termdata->last_accepted_keycode = keycode;
+      termdata->last_accepted_time = current_time;
+
       termdata->last_key = grub_term_map_key (keycode,
                                               interpret_status (termdata->current_report[0])
 					        | termdata->mods);

You will need to install the tools and libraries that grub needs for its build.
Have you install the gcc compiler?

sudo dnf install /usr/bin/gcc

Well, one needs to install the required dependencies and developer tools to develop. There’s no getting around it. If you don’t want these to be installed on your system, you can:

All of these provide environments that are different from your system, so you can delete and re-create them as required, just in different ways.

:backhand_index_pointing_up: +1 for these options.

My personal favorite to temporarily install a bunch of packages is to use either Distrobox or Toobox to spin up a quick Fedora container, work in there (with access to all the files in my home), and then throw it away when I am done.

Going with mock, however I don’t see what’s wrong with my patch. It’s refusing to apply it.

~/.local/src/grub2-rebuild/grub2$ mock -r fedora-44-x86_64 --rebuild grub2-*.src.rpm

(...)
Applying: Revert "Add support for Linux EFI stub loading on arm architectures"
Applying: loader/efi/linux.c: Free mempath after use
Applying: loader/efi/linux.c: Unload image on errors
Applying: loader/efi/linux.c: Disable code not used on x86 when building for x86
Applying: util/grub-editenv: remove stale env_block on unsupported filesystem
Applying: grub-get-kernel-settings: Treate kernel-uki-dtbloader as default kernel
Applying: mdraid: fix metadata 1.0 detection in userspace utilities on IEEE1275
Applying: grub-install: use search.fs_uuid for RAID1 on IEEE1275
Applying: 
Patch failed at 0423 
~/.local/src/grub2-rebuild/grub2$ ll 042*
-rw-rw-r-- 1 shizuma shizuma 1,7K 27 jui 12:49 0420-util-grub-editenv-remove-stale-env_block-on-unsuppor.patch
-rw-rw-r-- 1 shizuma shizuma 2,3K 27 jui 12:49 0421-grub-get-kernel-settings-Treate-kernel-uki-dtbloader.patch
-rw-rw-r-- 1 shizuma shizuma 1,7K 27 jui 12:49 0422-mdraid-fix-metadata-1.0-detection-in-userspace-utils-on-IEEE1275.patch
-rw-rw-r-- 1 shizuma shizuma 1,4K 27 jui 12:49 0423-grub-install-use-search.fs_uuid-for-RAID1-on-IEEE1275.patch
-rw-rw-r-- 1 shizuma shizuma 3,5K 27 jui 13:37 0424-custom-usb-keyboard.patch
~/.local/src/grub2-rebuild/grub2$ cat 0424-custom-usb-keyboard.patch 
--- grub-core/term/usb_keyboard.c.orig	2026-07-27 08:35:13.144132452 -0400
+++ grub-core/term/usb_keyboard.c	2026-07-27 08:35:32.725865065 -0400
@@ -28,7 +28,8 @@
 
 GRUB_MOD_LICENSE ("GPLv3+");
 
-

+/* Définition du délai anti-rebond en millisecondes */
+#define GRUB_USB_DEBOUNCE_DELAY_MS 80
 
 enum
   {
@@ -80,6 +81,10 @@
   grub_uint8_t last_report[8];
   int index;
   int max_index;
+
+  /* NOUVEAU: Variables pour l'anti-rebond (Key Debouncing) */
+  int last_accepted_keycode;
+  grub_uint64_t last_accepted_time;
 };
 
 static int grub_usb_keyboard_getkey (struct grub_term_input *term);
@@ -220,27 +225,7 @@
       return 0;
     }
 
-  /* Test showed that getting report may make the keyboard go nuts.
-     Moreover since we're reattaching keyboard it usually sends
-     an initial message on interrupt pipe and so we retrieve
-     the same keystatus.
-   */
-#if 0
-  {
-    grub_uint8_t report[8];
-    grub_usb_err_t err;
-    grub_memset (report, 0, sizeof (report));
-    err = grub_usb_control_msg (usbdev, GRUB_USB_REQTYPE_CLASS_INTERFACE_IN,
-    				USB_HID_GET_REPORT, 0x0100, interfno,
-				sizeof (report), (char *) report);
-    if (err)
-      data->status = 0;
-    else
-      data->status = report[0];
-  }
-#else
   data->status = 0;
-#endif
 
   data->transfer = grub_usb_bulk_read_background (usbdev,
 						  data->endp,
@@ -256,13 +241,15 @@
   data->mods = 0;
   data->dead = 0;
 
+  /* NOUVEAU: Initialisation des variables anti-rebond */
+  data->last_accepted_keycode = KEY_NO_KEY;
+  data->last_accepted_time = 0;
+
   grub_term_register_input_active ("usb_keyboard", &grub_usb_keyboards[curnum]);
 
   return 1;
 }
 
-

-
 static void
 send_leds (struct grub_usb_keyboard_data *termdata)
 {
@@ -283,6 +270,7 @@
 {
   int index = termdata->index;
   int i, keycode;
+  grub_uint64_t current_time;
 
   /* Sanity check */
   if (index < 2)
@@ -300,8 +288,6 @@
           /* Don't parse (rest of) this report */
           termdata->index = 0;
           if (keycode != KEY_NO_KEY)
-          /* Don't replace last report with current faulty report
-           * in future ! */
             grub_memcpy (termdata->current_report,
                          termdata->last_report,
                          sizeof (termdata->report));
@@ -317,6 +303,19 @@
          * ignore it. */
         continue;
 
+      /* 
+       * NOUVEAU : FILTRE ANTI-REBOND (KEY DEBOUNCING)
+       * Si la touche est identique à la dernière touche enregistrée et 
+       * qu'elle survient trop vite (moins de GRUB_USB_DEBOUNCE_DELAY_MS),
+       * on l'ignore (rebond du dongle/clavier sans-fil).
+       */
+      current_time = grub_get_time_ms ();
+      if (keycode == termdata->last_accepted_keycode &&
+          (current_time - termdata->last_accepted_time) < GRUB_USB_DEBOUNCE_DELAY_MS)
+        {
+          continue; /* Rebond détecté, passer à la touche suivante */
+        }
+
       if (keycode == KEY_CAPS_LOCK)
         {
           termdata->mods ^= GRUB_TERM_STATUS_CAPS;
@@ -331,6 +330,10 @@
           continue;
         }
 
+      /* NOUVEAU: Sauvegarder la touche acceptée et le timestamp */
+      termdata->last_accepted_keycode = keycode;
+      termdata->last_accepted_time = current_time;
+
       termdata->last_key = grub_term_map_key (keycode,
                                               interpret_status (termdata->current_report[0])
 					        | termdata->mods);
@@ -468,4 +471,4 @@
 	grub_usb_keyboards[i].data = 0;
       }
   grub_usb_unregister_attach_hook_class (&attach_hook);
-}
+}

Thanks,
I see the do-rebase script but have no clue how to use it. Besides, I’m using f44, not rawhide. Care to elaborate?

I don’t know if you’ve seen this, however, the tutorial below has some insights on how a “mock” build is done (the stated command is fedpkg --release f42 mockbuild, where --release f42 specifies the Fedora release number. This is for a set of unpackaged files, which are not in an RPM.

The mock software is below, and is likely what you want to use, if you want to build source RPMs, which have already been packaged.

The patch must be in this format:
git-format-patch: Prepare patches for e-mail submission | Man Page | Commands | git-core-doc | ManKier

I used Fedora Copr for building:
Copr Buildsystem - COPR documentation

Here are the steps that worked for me:

# Prepare patch
sudo dnf install git-core
git clone https://github.com/rhboot/grub2.git
cd grub2
git config user.name "${USER}"
git config user.email "${USER}@${HOSTNAME}"
git reset --hard origin/HEAD
nano grub-core/term/usb_keyboard.c
git add -A
git commit -m test
git format-patch --start-number=999 -1

# Set up Copr
sudo dnf install copr-cli
xdg-open https://copr.fedorainfracloud.org/api/

# Copr parameters
COPR_PROJECT="testing"
COPR_PACKAGE="grub2"
COPR_BLDDEP="git-core"

# Copr script
tee ${COPR_PACKAGE}.sh << EOI > /dev/null
git clone https://src.fedoraproject.org/rpms/${COPR_PACKAGE}.git .
git checkout f$(rpm -E %{fedora})
sed -i -E -e "
/^Release:/s|\S+$|99%{?dist}|
/^Source2:/s|\S+$|https://src.fedoraproject.org/repo/pkgs/\
%{name}/&/sha512/\$(sed -n -e '/(gnulib\S*)/s|^.*\s||p' sources)/&|
/^Source4:/s|http|https|
/^Source5:/s|\S+$|https://src.fedoraproject.org/repo/pkgs/\
%{name}/&/sha512/\$(sed -n -e '/(theme\S*)/s|^.*\s||p' sources)/&|
" ${COPR_PACKAGE}.spec
tee -a grub.patches << EOF > /dev/null
Patch0999: 0999-test.patch
EOF
base64 -d << EOF | gunzip > 0999-test.patch
$(gzip -c 0999-test.patch | base64)
EOF
EOI

# Build package
copr create ${COPR_PROJECT} \
--chroot fedora-$(rpm -E %{fedora})-$(arch)
copr add-package-custom ${COPR_PROJECT} \
--name ${COPR_PACKAGE} \
--script-builddeps ${COPR_BLDDEP} \
--script ${COPR_PACKAGE}.sh
copr build-package ${COPR_PROJECT} \
--name ${COPR_PACKAGE}

If you already created the repo and added the package:

  • Skip copr create or replace it with copr modify.
  • Replace copr add-package-custom with copr edit-package-custom.

As an alternative, you can fork the DistGit repo and use it to build the package.

Thanks so much.

This is amazing. However the build failed. Can you see why?

  • at that step nano grub-core/term/usb_keyboard.c, I added the patched file to replace the original.
  • at that step git format-patch --start-number=999 HEAD~1, the following file was produced
$ cat 0999-test.patch 
From 0cfa8fd3eb519d3ffcc97c4ac3f88249a77b7b90 Mon Sep 17 00:00:00 2001
From: josevillani <EtLp6@yandex.com>
Date: Mon, 27 Jul 2026 21:13:39 -0400
Subject: [PATCH] test

---
 grub-core/term/usb_keyboard.c | 55 ++++++++++++++++++-----------------
 1 file changed, 29 insertions(+), 26 deletions(-)

diff --git a/grub-core/term/usb_keyboard.c b/grub-core/term/usb_keyboard.c
index 7322d8dff..6dc3e59e5 100644
--- a/grub-core/term/usb_keyboard.c
+++ b/grub-core/term/usb_keyboard.c
@@ -28,7 +28,8 @@
 
 GRUB_MOD_LICENSE ("GPLv3+");
 
-

+/* Définition du délai anti-rebond en millisecondes */
+#define GRUB_USB_DEBOUNCE_DELAY_MS 80
 
 enum
   {
@@ -80,6 +81,10 @@ struct grub_usb_keyboard_data
   grub_uint8_t last_report[8];
   int index;
   int max_index;
+
+  /* NOUVEAU: Variables pour l'anti-rebond (Key Debouncing) */
+  int last_accepted_keycode;
+  grub_uint64_t last_accepted_time;
 };
 
 static int grub_usb_keyboard_getkey (struct grub_term_input *term);
@@ -220,27 +225,7 @@ grub_usb_keyboard_attach (grub_usb_device_t usbdev, int configno, int interfno)
       return 0;
     }
 
-  /* Test showed that getting report may make the keyboard go nuts.
-     Moreover since we're reattaching keyboard it usually sends
-     an initial message on interrupt pipe and so we retrieve
-     the same keystatus.
-   */
-#if 0
-  {
-    grub_uint8_t report[8];
-    grub_usb_err_t err;
-    grub_memset (report, 0, sizeof (report));
-    err = grub_usb_control_msg (usbdev, GRUB_USB_REQTYPE_CLASS_INTERFACE_IN,
-    				USB_HID_GET_REPORT, 0x0100, interfno,
-				sizeof (report), (char *) report);
-    if (err)
-      data->status = 0;
-    else
-      data->status = report[0];
-  }
-#else
   data->status = 0;
-#endif
 
   data->transfer = grub_usb_bulk_read_background (usbdev,
 						  data->endp,
@@ -256,13 +241,15 @@ grub_usb_keyboard_attach (grub_usb_device_t usbdev, int configno, int interfno)
   data->mods = 0;
   data->dead = 0;
 
+  /* NOUVEAU: Initialisation des variables anti-rebond */
+  data->last_accepted_keycode = KEY_NO_KEY;
+  data->last_accepted_time = 0;
+
   grub_term_register_input_active ("usb_keyboard", &grub_usb_keyboards[curnum]);
 
   return 1;
 }
 
-

-
 static void
 send_leds (struct grub_usb_keyboard_data *termdata)
 {
@@ -283,6 +270,7 @@ parse_keycode (struct grub_usb_keyboard_data *termdata)
 {
   int index = termdata->index;
   int i, keycode;
+  grub_uint64_t current_time;
 
   /* Sanity check */
   if (index < 2)
@@ -300,8 +288,6 @@ parse_keycode (struct grub_usb_keyboard_data *termdata)
           /* Don't parse (rest of) this report */
           termdata->index = 0;
           if (keycode != KEY_NO_KEY)
-          /* Don't replace last report with current faulty report
-           * in future ! */
             grub_memcpy (termdata->current_report,
                          termdata->last_report,
                          sizeof (termdata->report));
@@ -317,6 +303,19 @@ parse_keycode (struct grub_usb_keyboard_data *termdata)
          * ignore it. */
         continue;
 
+      /* 
+       * NOUVEAU : FILTRE ANTI-REBOND (KEY DEBOUNCING)
+       * Si la touche est identique à la dernière touche enregistrée et 
+       * qu'elle survient trop vite (moins de GRUB_USB_DEBOUNCE_DELAY_MS),
+       * on l'ignore (rebond du dongle/clavier sans-fil).
+       */
+      current_time = grub_get_time_ms ();
+      if (keycode == termdata->last_accepted_keycode &&
+          (current_time - termdata->last_accepted_time) < GRUB_USB_DEBOUNCE_DELAY_MS)
+        {
+          continue; /* Rebond détecté, passer à la touche suivante */
+        }
+
       if (keycode == KEY_CAPS_LOCK)
         {
           termdata->mods ^= GRUB_TERM_STATUS_CAPS;
@@ -331,6 +330,10 @@ parse_keycode (struct grub_usb_keyboard_data *termdata)
           continue;
         }
 
+      /* NOUVEAU: Sauvegarder la touche acceptée et le timestamp */
+      termdata->last_accepted_keycode = keycode;
+      termdata->last_accepted_time = current_time;
+
       termdata->last_key = grub_term_map_key (keycode,
                                               interpret_status (termdata->current_report[0])
 					        | termdata->mods);
@@ -468,4 +471,4 @@ GRUB_MOD_FINI(usb_keyboard)
 	grub_usb_keyboards[i].data = 0;
       }
   grub_usb_unregister_attach_hook_class (&attach_hook);
-}
+}
\ No newline at end of file
-- 
2.55.0

The failed build is there: Making sure you're not a bot!

I found some text processing / handling issues in the 0999-test.patch. When using COPR, it makes hard to get into the chroot to inspect whats failing when it fails. For this reason, I always do local mock runs first and that’s how I found the git am issues with 0999-test.patch and fixed them.

I built your SRPM here:

I have to point out that when COPR is used for kernel and grub, the signing key/cert is “Red Hat Test Certificate” and if you are secure booting, this will be an issue. The TL;DR: if you want to use this grub2 COPR build with secure boot, you will need to remove the “Red Hat Test Certificate” and use a key/cert you own (and hopefully loaded into your machines MOK store). The shortest path to test your patch is to turn off/disable secure boot, install this COPR grub build, test it out and if you want to keep it, you’ll need to make a decision: sign with your key/cert, disable secure boot, upstream the changes and hope they land in Fedora 44 (so that grub gets signed with “kernel-signer” key).

I don’t know how you manage to do that. I keep failing with empty patch error.

~/.local/src/grub2$ COPR_PROJECT="testing"
COPR_PACKAGE="grub2"
COPR_BLDDEP="git-core"
tee ${COPR_PACKAGE}.sh << "EOI" > /dev/null
git clone https://src.fedoraproject.org/rpms/${COPR_PACKAGE}.git .
git checkout f$(rpm -E %{fedora})
sed -i -E -e "
/^Release:/s|\S+$|99%{?dist}|
/^Source2:/s|\s+| https://src.fedoraproject.org/repo/pkgs/%{name}/gnulib-\
%{gnulibversion}.tar.gz/sha512/$(sed -n -e '/(gnulib\S*)/s|^.*\s||p' sources)/|
/^Source4:/s|http|https|
/^Source5:/s|\s+| https://src.fedoraproject.org/repo/pkgs/%{name}/\
theme.tar.bz2/sha512/$(sed -n -e '/(theme\S*)/s|^.*\s||p' sources)/|
" ${COPR_PACKAGE}.spec
tee -a grub.patches << "EOF" > /dev/null
Patch0999: 0999-test.patch
EOF
tee 0999-test.patch.gz.b64 << "EOF" > /dev/null
H4sICE+naGoAAzA5OTktdGVzdC5wYXRjaAC1WOtS28gS/h3VPkRvUhVsLBn5bmBJQcBkfQKGxWar
UjlZ1Vgam1lkySuNnLAs73J+Hp6DFzvf6GbZXFKnzp4pAtJcerq/7v66lePAn1HD5qzWqG03OrVO
03Fsp91ktQnrOJ36mJst3uiyCWtv1+nU92jI51TrkGnuxD9UN82adgwxO/S7H/KFcF3mCfqpJ0/m
7f0b5jn8W9X2Z++0Iyb5Do0irlO9S/+IXJytt8ns7rQ6O60aGWbTNLVhNP6d23KHPp8fjA5//kKS
h1LTDMPQaBpEY8P2A74leTDbisKxdc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test.patch.gz.b64 | gunzip > 0999-test.patch
EOI

copr create ${COPR_PROJECT} \
--chroot fedora-$(rpm -E %{fedora})-$(arch)
copr add-package-custom ${COPR_PROJECT} \
--name ${COPR_PACKAGE} \
--script-builddeps ${COPR_BLDDEP} \
--script ${COPR_PACKAGE}.sh
copr build-package ${COPR_PROJECT} \
--name ${COPR_PACKAGE}

Something went wrong:
Error: name: You already have a project named 'testing'.

Something went wrong:
Error: Package grub2 already exists in copr josevillani/testing.
Build was added to testing:
  https://copr.fedorainfracloud.org/coprs/build/10782774
Created builds: 10782774
Watching build(s): (this may be safely interrupted)
  08:58:50 Build 10782774: pending
  08:59:20 Build 10782774: running
  09:00:20 Build 10782774: pending
  09:00:50 Build 10782774: running
  09:02:21 Build 10782774: failed

Build error: Build(s) 10782774 failed.

@allenhewes I don’t know either how you did it. After comparison, my patch and yours were identical. And mocking your src.rpm worked whereas mine kept failing miserably all day yesterday. P.S. I don’t use secure boot.

My edits to usb_keyboard.c didn’t work BTW. Issue is still present. Back to the drawing board, so its best if I learn to do recompile properly since I could rewrite usb_keyboard.c quite often in this test period.

I recompiled a lot on RH but it was 20-25 years ago, and things were quite different (rpm + yum). Also compiling on Debian for 30 years, no problem at all. It was the norm in the debian 2 era. (dpkg-buildpackage -uc -b). Total newbie to the proper way doing it on Fedora still. I’ll learn I guess. I use to.

Thanks for your kind help, and patience, guys!

OMG. Thank you so much!

Create or edit operation was successful.
Build was added to testing:
  https://copr.fedorainfracloud.org/coprs/build/10782932
Created builds: 10782932
Watching build(s): (this may be safely interrupted)
  09:47:24 Build 10782932: pending
  09:47:54 Build 10782932: running
  09:55:56 Build 10782932: succeeded

I think there was non-printables in there, form feeds I think… I’ve already forgotten..

Sure, and no problem… I’ll delete my COPR.

Welcome back! …and there’s quite a few ways to do everything on Fedora: it just depends on your goal(s).

I’ll see myself out, @vgaetera got you covered…