4

I'm building FFMPEG into an RPM and I have many subpackages defined. Each subpackage is a shared library that FFMPEG provides, or that shared library's development files, ie libavcodec-devel.

I'd like to provide a package called ffmpeg-devel which simply depends on all of the other devel packages. I'm currently doing the following:

%package -n ffmpeg-devel
Summary: ffmpeg-devel
Requires: libavcodec-devel
Requires: libavdevice-devel
Requires: libavfilter-devel
Requires: libavformat-devel
Requires: libavresample-devel
Requires: libavutil-devel
Requires: libpostproc-devel
Requires: libswresample-devel
Requires: libswscale-devel
%description -n ffmpeg-devel
ffmpeg-devel
%files -n ffmpeg-devel
%exclude /*

Now, normally, rpmbuild will see any unpackaged files in the BUILDROOT for the package and fail the build if anything isn't included or specifically excluded. This is a good thing in my opinion, as it prevents packagers from missing things.

The problem above in my ffmpeg-devel virtual package is that it excludes everything, making it impossible for me to see if something wasn't included.

Is there a better way to make empty packages which only include dependencies on other packages?

Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411

1 Answers1

1

I agree with Aaron, you should leave the %files section out.

A part from that you are doing it right. This meta-package is empty so there are no files to see.

What you are missing is checking with /bin/rpm what dependencies will your package ask for:

rpm -qpR my-package.rpm
Bruno9779
  • 1,551
  • 2
  • 14
  • 31
  • Actually, I find that leaving out %files altogether results in no binary package, just the .src.rpm. I can believe that it's my environment, C7 and mock for the dirty work. – stolenmoment Jun 08 '21 at 21:30