Re: RFC: kernel-modules in Fedora Extras

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2006-01-16 at 19:15 +0100, Thorsten Leemhuis wrote:

> Should we have add a %{?kmod_per_package_add-on} into the output that
> get_rpmtemplate creates?

Urk, yes, I've considered stuff like that too, but hated it enough to
not even suggest it ;)

I hope and believe these things can be taken care of in the userspace
$foo-common package, possibly using triggers if absolutely needed and if
nothing else works.

> Take for example the nvidia-drivers of a well known 3rd party repo: they
> currently have a
> Conflicts:  kernel-module-nvidia-legacy-%{kernel}
> in them -- that would not be possible with the new scheme and that
> sounds like a problem to me.

Isn't it enough to make the userspace packages (ones providing
nvidia-glx-common and nvidia-glx-legacy-common) conflict with each
other?

> They also have some special things for %pre and %post which lead to the
> question: Do we also need something like 
> %{?kmod_per_package_add-on_pre}
> %{?kmod_per_package_add-on_postun}

...and the same for preun, post, pretrans, posttrans, triggerprein,
triggerin, triggerun, triggerpostun...

> > [URLs to sample packages]
>
> Creat, thanks! Looks quite good.

Ok, next round: added RHEL4 compatibility (packaging-wise, not code).
Informational patches to kmodtool and lirc-kmod.spec attached,
containing only the essential changes that were made to accomplish this.

http://cachalot.mine.nu/5/SRPMS/lirc-kmod-0.8.0-0.9.pre4.2.6.15_1.1858_FC5.src.rpm
http://cachalot.mine.nu/5/SRPMS/thinkpad-kmod-5.8-8.2.6.14_1.1656_FC4.src.rpm
--- fedora-kmodhelper	2006-01-14 22:39:21.000000000 +0200
+++ kmodtool	2006-01-17 12:50:47.000000000 +0200
@@ -60,9 +60,10 @@
 {
     if [[ "${1}" = "up" ]] || [[ "${1}" = "UP" ]] ; then
       local variant=""
+      local dashvariant=""
     elif [[ "${1}" ]] ; then
-     local variant="${1}"
-     local dashvariant="-${1}"
+      local variant="${1}"
+      local dashvariant="-${1}"
     fi
 
     cat <<EOF
@@ -71,11 +72,11 @@
 Group:            System Environment/Kernel
 Provides:         kernel-module = ${verrel}${variant}
 Provides:         kmod-${kmod_name} = %{version}-%{release}
-Requires:         kernel-%{_target_cpu} = ${verrel}${variant}
+Requires:         kernel${dashvariant}-%{_target_cpu} = ${verrel}
 Requires:         ${kmod_name}-kmod-common = %{version}
 Requires(post):   /sbin/depmod
 Requires(postun): /sbin/depmod
-BuildRequires:    kernel-devel-%{_target_cpu} = ${verrel}${variant}
+BuildRequires:    kernel${dashvariant}-devel-%{_target_cpu} = ${verrel}
 %description   -n kmod-${kmod_name}${dashvariant}
 This package provides the ${kmod_name} kernel modules built for the Linux
 kernel ${verrel}${variant} for the %{_target_cpu} family of processors.
diff -r -Nu lirc-kmod-0.8.0-0.8.pre4.2.6.15_1.1853_FC5/lirc-kmod.spec lirc-kmod-0.8.0-0.9.pre4.2.6.15_1.1858_FC5/lirc-kmod.spec
--- lirc-kmod-0.8.0-0.8.pre4.2.6.15_1.1853_FC5/lirc-kmod.spec	2006-01-14 23:23:15.000000000 +0200
+++ lirc-kmod-0.8.0-0.9.pre4.2.6.15_1.1858_FC5/lirc-kmod.spec	2006-01-17 21:14:27.000000000 +0200
@@ -52,8 +52,12 @@
 %build
 for kvariant in %{kvariants}
 do
-    [ -n "${kvariant}" ] || kvariant=up
-    ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant#up}-%{_target_cpu}
+    if [ -n "${kvariant#up}" ] ; then
+        ksrc=%{_usrsrc}/kernels/%{kverrel}-$kvariant-%{_target_cpu}
+    else
+        kvariant=up
+        ksrc=%{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}
+    fi
     mdst=/lib/modules/%{kverrel}${kvariant#up}/extra/%{kmod_name}
 
     cd _kmod_build_$kvariant
@@ -64,8 +68,9 @@
     # gpio: missing drivers/media/video/bttv.h in kernel-devel
     [ -e $ksrc/drivers/media/video/bttv.h ] || nobuild="$nobuild gpio"
     # parallel: not smp safe
-    [ "${kvariant}" = "smp" ] && nobuild="$nobuild parallel"
+    grep -q ^CONFIG_SMP=y $ksrc/.config && nobuild="$nobuild parallel"
     # i2c and all usb drivers: these don't compile with 2.6.15 as of 0.8.0pre4
+    # TODO: this doesn't work eg. when kverrel=2.6.X (if "X" is a single digit)
     %if "%{kverrel}" >= "2.6.15"
     nobuild="$nobuild atiusb i2c igorplugusb imon mceusb2 mceusb sasem streamzap"
     %endif
-- 
fedora-extras-list mailing list
fedora-extras-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-extras-list

[Index of Archives]     [Fedora General Discussion]     [Fedora Art]     [Fedora Docs]     [Fedora Package Review]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite Backpacking]     [KDE Users]

  Powered by Linux