rpms/thinkpad-kmod/devel kmodtool, NONE, 1.1 thinkpad-kmod-2615pm.patch, NONE, 1.1 thinkpad-kmod-percpu.patch, NONE, 1.1 thinkpad-kmod.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Ville Skytta (scop)
fedora-extras-commits at redhat.com
Thu Jan 26 22:21:46 UTC 2006
Author: scop
Update of /cvs/extras/rpms/thinkpad-kmod/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18900/devel
Modified Files:
.cvsignore sources
Added Files:
kmodtool thinkpad-kmod-2615pm.patch thinkpad-kmod-percpu.patch
thinkpad-kmod.spec
Log Message:
auto-import thinkpad-kmod-5.8-9.2.6.14_1.1656_FC4 on branch devel from thinkpad-kmod-5.8-9.2.6.14_1.1656_FC4.src.rpm
Initial import.
--- NEW FILE kmodtool ---
#!/bin/bash
# kmodtool - Helper script for building kernel module RPMs
# Copyright (c) 2003-2006 Ville Skyttä <ville.skytta at iki.fi>,
# Thorsten Leemhuis <fedora at leemhuis.info>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
myprog="kmodtool"
myver="0.10.3"
knownvariants='\(BOOT\|\(big\|huge\)mem\|debug\|enterprise\|kdump\|smp\|uml\|xen\(0\|U\|-\(guest\|hypervisor\)\)\)'
kmod_name=
kver=
verrel=
variant=
get_verrel ()
{
verrel="$(echo "${1-$(uname -r)}" | sed 's/'${knownvariants}'$//')"
}
print_verrel ()
{
get_verrel $@ || return $?
echo "${verrel}"
}
get_variant ()
{
variant="$(echo "${1-$(uname -r)}" | sed 's/^.*'${knownvariants}'$/\1/')"
[ "${variant}" != "${1-$(uname -r)}" ] || variant='""'
}
print_variant ()
{
get_variant $@ || return $?
echo "${variant}"
}
get_rpmtemplate ()
{
local variant="${1}"
local dashvariant="${variant:+-${variant}}"
cat <<EOF
%package -n kmod-${kmod_name}${dashvariant}
Summary: ${kmod_name} kernel module(s)
Group: System Environment/Kernel
Provides: kernel-module = ${verrel}${variant}
Provides: kmod-${kmod_name} = %{version}-%{release}
Requires: kernel${dashvariant}-%{_target_cpu} = ${verrel}
Requires: ${kmod_name}-kmod-common = %{version}
Requires(post): /sbin/depmod
Requires(postun): /sbin/depmod
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.
%post -n kmod-${kmod_name}${dashvariant}
/sbin/depmod -aeF /boot/System.map-${verrel}${variant} ${verrel}${variant} > /dev/null || :
%postun -n kmod-${kmod_name}${dashvariant}
/sbin/depmod -aF /boot/System.map-${verrel}${variant} ${verrel}${variant} &> /dev/null || :
%files -n kmod-${kmod_name}${dashvariant}
%defattr(644,root,root,755)
/lib/modules/${verrel}${variant}/extra/${kmod_name}/
EOF
}
print_rpmtemplate ()
{
kmod_name="${1}"
shift
kver="${1}"
get_verrel "${1}"
shift
if [ -z "${kmod_name}" ] ; then
echo "Please provide the kmodule-name as first parameter." >&2
exit 2
elif [ -z "${kver}" ] ; then
echo "Please provide the kver as second parameter." >&2
exit 2
elif [ -z "${verrel}" ] ; then
echo "Couldn't find out the verrel." >&2
exit 2
fi
for variant in "$@" ; do
get_rpmtemplate "${variant}"
done
}
usage ()
{
cat <<EOF
You called: ${invocation}
Usage: ${myprog} <command> <option>+
Commands:
verrel <uname>
- Get "base" version-release.
variant <uname>
- Get variant from uname.
rpmtemplate <mainpgkname> <uname> <variants>
- Return a template for
version
- Output version number and exit.
EOF
}
invocation="$(basename ${0}) $@"
while [ "${1}" ] ; do
case "${1}" in
verrel)
shift
print_verrel $@
exit $?
;;
variant)
shift
print_variant $@
exit $?
;;
rpmtemplate)
shift
print_rpmtemplate "$@"
exit $?
;;
version)
echo "${myprog} ${myver}"
exit 0
;;
*)
echo "Error: Unknown option '${1}'." >&2
usage >&2
exit 2
;;
esac
done
# Local variables:
# mode: sh
# sh-indentation: 2
# indent-tabs-mode: nil
# End:
# ex: ts=2 sw=2 et
thinkpad-kmod-2615pm.patch:
--- NEW FILE thinkpad-kmod-2615pm.patch ---
--- 2.6/drivers/thinkpadpm.c~ 2004-09-19 12:32:57.000000000 +0300
+++ 2.6/drivers/thinkpadpm.c 2005-12-26 20:18:07.000000000 +0200
@@ -39,6 +39,9 @@
#include <linux/apm_bios.h>
#include <linux/pm.h>
#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
+#include <linux/pm_legacy.h>
+#endif
#include "thinkpad_common.h"
#include "thinkpadpm.h"
@@ -472,7 +475,7 @@
{
/*** Set up APM BIOS interface ***/
- if ( !pm_active ) {
+ if ( !PM_IS_ACTIVE() ) {
printk(KERN_INFO "thinkpadpm: Power management not active. :-(\n");
return -ENODEV;
}
thinkpad-kmod-percpu.patch:
--- NEW FILE thinkpad-kmod-percpu.patch ---
--- 2.6/drivers/thinkpadpm.c~ 2004-09-19 12:32:57.000000000 +0300
+++ 2.6/drivers/thinkpadpm.c 2005-01-08 01:18:48.000000000 +0200
@@ -169,11 +169,11 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)
#define get_gdt_table() (cpu_gdt_table[get_cpu()])
-#define put_gdt_table() put_cpu()
#else
-#define get_gdt_table() (get_cpu_ptr(cpu_gdt_table))
-#define put_gdt_table() put_cpu_ptr(cpu_gdt_table)
+#include <linux/percpu.h>
+#define get_gdt_table() (per_cpu(cpu_gdt_table, get_cpu()))
#endif
+#define put_gdt_table() put_cpu()
/**
* apm_bios_call - Make an APM BIOS 32bit call
--- NEW FILE thinkpad-kmod.spec ---
# stuff to be implemented externally:
Source10: kmodtool
%define kmodtool sh %{SOURCE10}
# end stuff to be ...
%define kmod_name thinkpad
%define kverrel %(%{kmodtool} verrel %{?kver} 2>/dev/null)
%{!?kvariants: %global kvariants %(%{kmodtool} variant %{?kver} 2>/dev/null)}
Name: %{kmod_name}-kmod
Summary: %{kmod_name} kernel modules
Version: 5.8
Release: 9.%(echo %{kverrel} | tr - _)
URL: http://tpctl.sourceforge.net/
Source0: http://download.sf.net/tpctl/thinkpad_%{version}.tar.gz
Patch0: %{name}-percpu.patch
Patch1: %{name}-2615pm.patch
License: GPL
Group: System Environment/Kernel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Do other arch thinkpads (that we care about) exist?
ExclusiveArch: i586 i686
%description
This package provides %{kmod_name} kernel modules.
# magic hidden here:
%{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
%prep
# to understand the magic better or to debug it, uncomment this:
#%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null
#sleep 5
%setup -q -T -c -a 0
cd %{kmod_name}-%{version}
%{__perl} -pi -e 's|-O2\s+||' 2.6/drivers/Makefile
sed -i 's|depmod -a|echo depmod -a disabled|' 2.6/drivers/Makefile
%patch0 -p0
%patch1 -p0
cd ..
for kvariant in %{kvariants} ; do
cp -a %{kmod_name}-%{version}* _kmod_build_$kvariant
done
%build
for kvariant in %{kvariants} ; do
make %{?_smp_mflags} -C _kmod_build_$kvariant/2.6/drivers V=1 \
KSRC=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
done
%install
rm -rf $RPM_BUILD_ROOT
for kvariant in %{kvariants} ; do
make -C _kmod_build_$kvariant/2.6/drivers install \
MODULESROOT=$RPM_BUILD_ROOT/lib/modules/%{kverrel}$kvariant/extra
done
chmod u+x $RPM_BUILD_ROOT/lib/modules/*/extra/%{kmod_name}/*
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Fri Jan 20 2006 Ville Skyttä <ville.skytta at iki.fi> - 5.8-9
- Remove "up" == "" support, related cleanups.
* Tue Jan 17 2006 Ville Skyttä <ville.skytta at iki.fi> - 5.8-8
- Add RHEL4 compatibility (packaging, not code).
* Sat Jan 14 2006 Ville Skyttä <ville.skytta at iki.fi> - 5.8-7
- Convert to using new kmodhelper.
* Wed Jan 4 2006 Ville Skyttä <ville.skytta at iki.fi> - 5.8-6
- Drop 2.6.15pre support hack.
* Tue Dec 27 2005 Ville Skyttä <ville.skytta at iki.fi> - 5.8-5
- s/kmod-config(thinkpad)/thinkpad-kmod-common/
* Mon Dec 26 2005 Ville Skyttä <ville.skytta at iki.fi> - 5.8-4
- Require kmod-config(thinkpad).
* Mon Dec 19 2005 Ville Skyttä <ville.skytta at iki.fi> - 5.8-3
- Don't build xen-* or smp modules by default.
- Hack to build with kernel >= 2.6.15 without legacy PM configured.
* Sun Dec 18 2005 Thorsten Leemhuis <fedora at leemhuis.info> - 5.8-2
- Split into thinkpad and thinkpad-kmod.
- Adjust to new Fedora Extras kernel module scheme.
* Sat Apr 2 2005 Ville Skyttä <ville.skytta at iki.fi> - 5.8-1
- Adjust for FC4 kernel-devel.
- Drop console.perms munging, document it in README.Fedora instead.
* Sat Jan 8 2005 Ville Skyttä <ville.skytta at iki.fi> - 0:5.8-0.fdr.3
- Patch to work with kernel 2.6.10.
- Drop udev stuff and thinkpad group, intruduce console.perms munging.
* Sun Dec 5 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:5.8-0.fdr.2
- Drop support for kernels < 2.6, require udev, clean up specfile.
- Install modules into /lib/modules/$uname/updates/thinkpad
(was /lib/modules/$uname/thinkpad).
* Mon Nov 22 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:5.8-0.fdr.1
- Update to 5.8.
- Patch to work with kernel 2.6.9 (final).
* Wed Sep 22 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:5.7-0.fdr.1
- Update to 5.7.
* Sat Sep 11 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:5.6-0.fdr.2
- Reset module file modes to 644 for 2.6 kernels too.
- Drop private copy of kmodhelper, use the one in fedora-rpmdevtools instead
(2.4 kernels only).
* Tue Sep 7 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:5.6-0.fdr.1
- Update to 5.6, parmdesc patch applied upstream.
- Patch to honor kernel optflags for 2.6 kernels.
* Fri Jul 30 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:5.5-0.fdr.1
- Update to 5.5.
- Clean up kernel >= 2.6 support.
* Sun Mar 14 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:5.0-0.fdr.4
- Fix README path in %%description (#503).
- Avoid misleading build error message when no kernel-source is installed.
* Mon Feb 9 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:5.0-0.fdr.3
- Update to kmodhelper 0.9.8.
* Sat Jan 31 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:5.0-0.fdr.2
- Further spec cleanups, kmodhelper 0.9.7.
* Fri Jan 30 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:5.0-0.fdr.1
- Update to 5.0, and kmodhelper to 0.9.6.
- Use MAKEDEV again.
* Thu Jan 8 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:4.999-0.fdr.0.2.trial1
- Cosmetic specfile changes.
* Sun Dec 28 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.999-0.fdr.0.1.trial1
- Update to 4.999-trial1.
- Experimental, untested support for kernel 2.6.
- New version (0.9.5) of kmodhelper.
* Sat Dec 20 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.8-0.fdr.7
- Honor --target again.
- New version of kmodhelper.
* Fri Dec 19 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.8-0.fdr.6
- Pretty much reworked specfile, it should now be relatively easy to build
modules for all kernel variants if one so desires.
- Back to providing kernel-module instead of kernel-modules because the
naming scheme doesn't coexist prettily with up2date's kernel-modules
behavior.
- Run depmod only if installing/uninstalling modules for the running kernel.
* Sat Dec 6 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.8-0.fdr.5
- Require /boot/vmlinuz-%%{kversion} (bug 503).
- Provide kernel-modules instead of kernel-module (bug 503).
- Build modules with the correct $CC.
* Tue Nov 25 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.8-0.fdr.4
- Don't use MAKEDEV to create /dev/thinkpad.
* Sat Nov 22 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.8-0.fdr.3
- Use sourceforge.net tarball.
* Sun Nov 16 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.8-0.fdr.2
- Add kernel config location workararound for .nptl kernels.
* Sat Oct 11 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.8-0.fdr.1
- Update to 4.8.
- Include kernel cflags scripts in the package.
* Tue Jul 29 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.6-0.fdr.2
- Nuke reference to README.modules.conf in %%description (bug 503).
- Use fedora-rpm-helper.
* Thu Jul 24 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.6-0.fdr.1
- Update to 4.6.
- Drop README.modules.conf; upstream README has the necessary info.
* Sat May 17 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.4-0.fdr.1
- Update to 4.4 (from Debian).
- Un-hardwire 2.4.x build.
- Use proper kernel CFLAGS.
- Require specific kernel version.
- Use /dev/MAKEDEV for creating the device node, and own it.
- %%{buildroot} -> $RPM_BUILD_ROOT.
- Post(un)install scriptlet cleanups.
* Fri Apr 25 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.3-0.fdr.4
- Actually build for a 2.4.x kernel, hardwired for now (#214).
* Mon Apr 21 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.3-0.fdr.3
- Rename to kernel-module-thinkpad.
- Obsolete kernel-mod-thinkpad.
- Add ExclusiveArch: i586 i686.
- Fix missing epoch in kernel-source dependency.
* Mon Apr 7 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.3-0.fdr.2
- Actually include README.modules.conf (#8 comment 13).
* Sat Apr 5 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:4.3-0.fdr.1
- Update to 4.3.
- More spec file cleanups.
* Mon Mar 31 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:3.7-0.fdr.3
- Small spec cleanups.
* Sun Mar 30 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:3.7-0.fdr.2
- %%postun tricks for better cleanup after erase.
* Thu Mar 27 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:3.7-0.fdr.1
- Updated according to Fedora naming guidelines RC3.
* Sun Feb 23 2003 Ville Skyttä <ville.skytta at iki.fi> - 3.7-1.fedora.4
- Proof-of-concept for new kernel module packaging guideline proposal.
- Create group and /dev/thinkpad only on new install.
- Renamed to thinkpad-kernel.
* Sun Feb 23 2003 Ville Skyttä <ville.skytta at iki.fi> - 3.7-1.fedora.3
- Do install_modules instead of install in %%install to avoid unnecessary
modprobing (#8).
* Sat Feb 15 2003 Ville Skyttä <ville.skytta at iki.fi> - 3.7-1.fedora.2
- Add support for %%kernel define.
* Sat Feb 8 2003 Ville Skyttä <ville.skytta at iki.fi> - 3.7-1.fedora.1
- First Fedora release.
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/thinkpad-kmod/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 26 Jan 2006 22:20:04 -0000 1.1
+++ .cvsignore 26 Jan 2006 22:21:45 -0000 1.2
@@ -0,0 +1 @@
+thinkpad_5.8.tar.gz
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/thinkpad-kmod/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 26 Jan 2006 22:20:04 -0000 1.1
+++ sources 26 Jan 2006 22:21:45 -0000 1.2
@@ -0,0 +1 @@
+288ab19587bb3a8a4d6097448059b4c6 thinkpad_5.8.tar.gz
More information about the fedora-extras-commits
mailing list