Coding⏱️ 3 min read📅 2026-06-11

How to Fix: RPM build error: empty %files file debugfiles.list

RPM build error: empty %files file debugfiles.list in Korora 23 (Fedora 23) spec file.

Quick Answer: Check the %files section to ensure it includes all necessary files and correct any typos or formatting issues.

The error 'empty %files file debugfiles.list' occurs when the RPM build process fails to generate a valid %files section in the package's spec file. This is particularly frustrating for users who have successfully built packages in the past, as it indicates a problem with the package's installation files.

To resolve this issue, we will need to inspect the spec file and identify the cause of the error. We will then apply the necessary corrections to ensure that the %files section is properly generated.

💡 Why You Are Getting This Error

  • The first main reason for this error is that the debugfiles.list file is empty or missing in the spec file. This can happen if the package's dependencies are not correctly specified or if there are errors in the %install section of the spec file.
  • An alternative reason for this error could be that the package's build environment is not properly configured, which may result in incorrect file names being generated during the build process.

🛠️ Step-by-Step Verified Fixes

Inspecting and correcting the spec file

  1. Step 1: Step 1: Open the spec file in a text editor and search for the %files section. Verify that it is correctly formatted and includes all necessary files.
  2. Step 2: Step 2: Check the package's dependencies by running the command 'rpm --eval %%files' and inspecting the output to ensure that all required files are being generated.
  3. Step 3: Step 3: If the debugfiles.list file is empty or missing, add it back to the spec file with the correct contents. For example, if the package has a file called 'config', you would add the line '%files /usr/lib/freefilesync/config' to the %files section.

Configuring the build environment

  1. Step 1: Step 1: Check the RPM version being used by running the command 'rpm --version'. Ensure that it is compatible with the package's dependencies.
  2. Step 2: Step 2: Verify that the build environment is properly configured by checking the directory structure and file permissions. If necessary, adjust the configuration to ensure that all files are generated correctly.

🎯 Final Words

To resolve the error 'empty %files file debugfiles.list', inspect the spec file for errors, correct any mistakes, and verify that the build environment is properly configured. By following these steps, you should be able to generate a valid %files section and successfully build your package.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions