- Move kmod and libsymlink dependency generators to redhat-rpm-config

- These are specific to Fedora so might as well live there, and
  this also avoids having to carry patches in rpm (and rebuild for
  changes) for no good reason
This commit is contained in:
Panu Matilainen 2014-04-15 10:11:47 +03:00
parent 7464dd0d4f
commit 056da825f0
4 changed files with 5 additions and 71 deletions

View File

@ -1,4 +0,0 @@
# Make libfoo.so symlinks require the soname-provide of the target library
%__libsymlink_requires %{_rpmconfigdir}/elfdeps --provides --soname-only
%__libsymlink_magic ^symbolic link to `.*lib.*\.so\..*'$
%__libsymlink_exclude_path ^.*[[:digit:]]$

View File

@ -1,59 +0,0 @@
diff -up rpm-4.11.2-rc1/fileattrs/kmod.attr.kmod-provides rpm-4.11.2-rc1/fileattrs/kmod.attr
--- rpm-4.11.2-rc1/fileattrs/kmod.attr.kmod-provides 2014-01-20 11:47:48.325409810 +0200
+++ rpm-4.11.2-rc1/fileattrs/kmod.attr 2014-01-20 11:47:48.325409810 +0200
@@ -0,0 +1,2 @@
+%__kmod_provides %{_rpmconfigdir}/kmod.prov
+%__kmod_path ^/lib/modules/.*$
diff -up rpm-4.11.2-rc1/fileattrs/Makefile.am.kmod-provides rpm-4.11.2-rc1/fileattrs/Makefile.am
--- rpm-4.11.2-rc1/fileattrs/Makefile.am.kmod-provides 2014-01-20 11:47:48.325409810 +0200
+++ rpm-4.11.2-rc1/fileattrs/Makefile.am 2014-01-20 11:49:31.764544198 +0200
@@ -7,6 +7,6 @@ fattrsdir = $(rpmconfigdir)/fileattrs
fattrs_DATA = \
appdata.attr desktop.attr elf.attr font.attr libtool.attr perl.attr \
perllib.attr pkgconfig.attr python.attr ocaml.attr script.attr \
- mono.attr
+ mono.attr kmod.attr
EXTRA_DIST = $(fattrs_DATA)
diff -up rpm-4.11.2-rc1/scripts/kmod.prov.kmod-provides rpm-4.11.2-rc1/scripts/kmod.prov
--- rpm-4.11.2-rc1/scripts/kmod.prov.kmod-provides 2014-01-20 11:47:48.325409810 +0200
+++ rpm-4.11.2-rc1/scripts/kmod.prov 2014-01-20 11:47:48.325409810 +0200
@@ -0,0 +1,17 @@
+#!/bin/sh +x
+
+IFS=$'\n'
+
+for i in $(grep -E '(/lib/modules/.*\.ko|/lib/modules/.*/modules.builtin)');
+do
+ kmod=$(basename $i);
+
+ if [ $kmod == "modules.builtin" ]; then
+ for j in $(cat $i); do
+ j=$(basename $j);
+ echo "kmod($j)"
+ done
+ else
+ echo "kmod($kmod)"
+ fi
+done
diff -up rpm-4.11.2-rc1/scripts/Makefile.am.kmod-provides rpm-4.11.2-rc1/scripts/Makefile.am
--- rpm-4.11.2-rc1/scripts/Makefile.am.kmod-provides 2014-01-17 13:17:29.000000000 +0200
+++ rpm-4.11.2-rc1/scripts/Makefile.am 2014-01-20 11:50:24.065601168 +0200
@@ -20,7 +20,7 @@ EXTRA_DIST = \
ocaml-find-requires.sh ocaml-find-provides.sh \
pkgconfigdeps.sh libtooldeps.sh appdata.prov \
fontconfig.prov desktop-file.prov script.req \
- macros.perl macros.php macros.python
+ macros.perl macros.php macros.python kmod.prov
rpmconfig_SCRIPTS = \
brp-compress brp-python-bytecompile brp-java-gcjcompile \
@@ -34,7 +34,7 @@ rpmconfig_SCRIPTS = \
pkgconfigdeps.sh libtooldeps.sh \
ocaml-find-requires.sh ocaml-find-provides.sh \
fontconfig.prov desktop-file.prov script.req \
- rpmdb_loadcvt rpm2cpio.sh tcl.req tgpg
+ rpmdb_loadcvt rpm2cpio.sh tcl.req tgpg kmod.prov
rpmconfig_DATA = \
rpm.daily rpm.log rpm.supp \

View File

@ -3,7 +3,7 @@ index 7656c80..d1aeeba 100644
--- a/scripts/Makefile.am --- a/scripts/Makefile.am
+++ b/scripts/Makefile.am +++ b/scripts/Makefile.am
@@ -23,6 +23,7 @@ EXTRA_DIST = \ @@ -23,6 +23,7 @@ EXTRA_DIST = \
macros.perl macros.php macros.python kmod.prov macros.perl macros.php macros.python
rpmconfig_SCRIPTS = \ rpmconfig_SCRIPTS = \
+ appdata.prov \ + appdata.prov \

View File

@ -24,7 +24,7 @@
Summary: The RPM package management system Summary: The RPM package management system
Name: rpm Name: rpm
Version: %{rpmver} Version: %{rpmver}
Release: %{?snapver:0.%{snapver}.}8%{?dist} Release: %{?snapver:0.%{snapver}.}9%{?dist}
Group: System Environment/Base Group: System Environment/Base
Url: http://www.rpm.org/ Url: http://www.rpm.org/
Source0: http://rpm.org/releases/rpm-4.11.x/%{name}-%{srcver}.tar.bz2 Source0: http://rpm.org/releases/rpm-4.11.x/%{name}-%{srcver}.tar.bz2
@ -33,7 +33,6 @@ Source1: db-%{bdbver}.tar.gz
%else %else
BuildRequires: libdb-devel BuildRequires: libdb-devel
%endif %endif
Source10: libsymlink.attr
# Disable autoconf config.site processing (#962837) # Disable autoconf config.site processing (#962837)
Patch1: rpm-4.11.x-siteconfig.patch Patch1: rpm-4.11.x-siteconfig.patch
@ -47,8 +46,6 @@ Patch4: rpm-4.8.1-use-gpg2.patch
Patch5: rpm-4.9.90-armhfp.patch Patch5: rpm-4.9.90-armhfp.patch
#conditionally applied patch for arm hardware floating point #conditionally applied patch for arm hardware floating point
Patch6: rpm-4.9.0-armhfp-logic.patch Patch6: rpm-4.9.0-armhfp-logic.patch
# Generate kmod(basename.ko) provides for kernel
Patch7: rpm-4.11.1-kmod-find-provides.patch
# Fedora has big package stacks based on broken dependency EVRs, reduce the # Fedora has big package stacks based on broken dependency EVRs, reduce the
# double separator error into an error on released versions (#1065563) # double separator error into an error on released versions (#1065563)
@ -270,7 +267,6 @@ packages on a system.
%patch2 -p1 -b .fedora-specspo %patch2 -p1 -b .fedora-specspo
%patch3 -p1 -b .no-man-dirs %patch3 -p1 -b .no-man-dirs
%patch4 -p1 -b .use-gpg2 %patch4 -p1 -b .use-gpg2
%patch7 -p1 -b .kmod-provides
%patch10 -p1 -b .double-sep-warning %patch10 -p1 -b .double-sep-warning
@ -366,8 +362,6 @@ echo "r /var/lib/rpm/__db.*" > ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d/rpm.conf
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
mkdir -p $RPM_BUILD_ROOT%{rpmhome}/macros.d mkdir -p $RPM_BUILD_ROOT%{rpmhome}/macros.d
install -m 644 %{SOURCE10} ${RPM_BUILD_ROOT}%{rpmhome}/fileattrs/libsymlink.attr
mkdir -p $RPM_BUILD_ROOT/var/lib/rpm mkdir -p $RPM_BUILD_ROOT/var/lib/rpm
for dbi in \ for dbi in \
Basenames Conflictname Dirnames Group Installtid Name Obsoletename \ Basenames Conflictname Dirnames Group Installtid Name Obsoletename \
@ -539,6 +533,9 @@ exit 0
%doc COPYING doc/librpm/html/* %doc COPYING doc/librpm/html/*
%changelog %changelog
* Tue Apr 15 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-9
- move kmod and libsymlink dependency generators to redhat-rpm-config
* Mon Apr 14 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-8 * Mon Apr 14 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-8
- fix appdata.prov script missing from package - fix appdata.prov script missing from package