#
-# If you define the following as 1, only kernel, -headers and -source
-# packages will be built
-
-%bcond_without smp # don't build SMP kernel
-%bcond_without up # don't build UP kernel
-%bcond_without boot # don't build BOOT kernel
-%bcond_without source # don't build source
-%bcond_without doc # don't build documentation package
-%bcond_without grsec # don't apply grsecurity patch
-%bcond_without kheaders # build without support for glibc-kernel-headers
-%bcond_with win4lin # apply the Win4lin patches
-
+# Conditional build:
+%bcond_without smp # don't build SMP kernel
+%bcond_without up # don't build UP kernel
+%bcond_without boot # don't build BOOT kernel
+%bcond_without source # don't build source
+%bcond_without doc # don't build documentation package
+%bcond_without grsec # don't apply grsecurity patch
+%bcond_without kheaders # build without support for glibc-kernel-headers
+%bcond_with win4lin # apply the Win4lin patches
+#
%define base_arch %(echo %{_target_cpu} | sed 's/i.86/i386/;s/athlon/i386/;s/amd64/x86_64/')
%define no_install_post_strip 1
%define no_install_post_compress_modules 1
#
-%define pre_version rc3
-%define netfilter_snap 20031121
-%define i2c_version 2.8.0
+%define pre_version %{nil}
+%define netfilter_snap 20031209
+%define i2c_version 2.8.1
Summary: The Linux kernel (the core of the Linux operating system)
Summary(de): Der Linux-Kernel (Kern des Linux-Betriebssystems)
Summary(es): Núcleo (Kernel) linux genérico
Summary(pt_BR): Kernel Linux (a parte central do sistema operacional Linux)
Name: kernel
Version: 2.4.23
-Release: 0.2
-License: GPL
+Release: 0.9
+License: GPL v2
Group: Base/Kernel
-Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.22.tar.bz2
-# Source0-md5: 75dc85149b06ac9432106b8941eb9f7b
+Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-%{version}.tar.bz2
+# Source0-md5: 642af5ab5e1fc63685fde85e9ae601e4
Source1: %{name}-autoconf.h
Source2: %{name}-BuildASM.sh
Source3: http://www.garloff.de/kurt/linux/dc395/dc395-141.tar.gz
# Source3-md5: 8ed492197244b6a772270417c66214d3
-Source5: linux-2.4.19-netfilter-IMQ.patch.tar.bz2
-# Source5-md5: b8f2f7a268a5cb75fabcaec3b5d45fcd
Source7: http://www10.software.ibm.com/developer/opensource/jfs/project/pub/jfs-2.4-1.1.4.tar.gz
# Source7-md5: ea33c28ca1d3afa448b20f337b615b48
Source20: %{name}-ia32.config
Source1002: %{name}-grsec.config
Source2000: %{name}-win4lin.config
-# Interesting URLs, patches:
-# http://www.hardrock.org/kernel/current-updates/
-
# New features/updates/backports
# Essential stuff
Patch0: %{name}-pldfblogo.patch
-# http://www.kernel.org/pub/linux/kernel/v2.4/testing/
-Patch1: patch-%{version}-%{pre_version}.bz2
-
# from ftp://ftp.kernel.org/pub/linux/kernel/people/hvr/testing/
Patch10: patch-cryptoloop-jari-2.4.22-rc2.0
# from ftp://ftp.xs4all.nl/pub/crypto/freeswan/freeswan-*
-Patch12: linux-2.4.21-freeswan-2.00.patch.gz
+Patch12: linux-2.4.23-freeswan-2.04.patch.gz
Patch15: linux-2.4.23-sched-O1.patch
# http://dl.sourceforge.net/user-mode-linux/uml-patch-2.4.20-6.bz2
Patch20: uml-patch-2.4.20-6-21.bz2
Patch21: linux-2.4.21-uml-o1.patch
# http://dl.sourceforge.net/user-mode-linux/host-skas3.patch
Patch22: linux-2.4.20-uml-host-skas3.patch
+# http://www.kernel.org/pub/linux/kernel/people/jgarzik/libata/
+Patch23: 2.4.23-libata1.patch.bz2
+# missing <linux/mm.h> include in libata-core.c (needed on alpha)
+Patch24: linux-2.4.23-libata1-include.patch
# New filesystems
# http://linux-xfs.sgi.com/projects/xfs/
-#Patch25: linux-2.4.21-core-xfs-1.3.0.patch.gz
-#Patch26: linux-xfs-1.3.0pre5.patch.gz
-Patch25: linux-2.4.23-xfs-2003-11-11.patch.gz
+Patch25: linux-2.4.23-xfs-2003-12-01.patch.gz
# http://acl.bestbits.at/
Patch31: linux-2.4.21-jfs-acl.patch
Patch32: linux-2.4.22-ea+acl+nfsacl-0.8.60.diff.gz
# http://dl.sourceforge.net/linux-ntfs/
-Patch40: linux-2.4.22-ntfs-2.1.4c.patch.gz
+Patch40: linux-2.4.23-ntfs-2.1.5a.patch.bz2
# FC01_davfs_0.2.4.patch
Patch50: linux-2.4.20-davfs-0.2.4.patch.bz2
# FC02_davfs__FUNCTION__.patch
# Networking
-# new version of netfilter.
-Patch100: linux-2.4.23-netfilter-%{netfilter_snap}.patch.gz
+# ALWAYS use released patchomatic tarball (don't use CVS)
+# DO NOT include patches from patch-o-matic/userspace since they cause iptables incompatibilities
+Patch100: linux-2.4.23-netfilter-pom-%{netfilter_snap}.patch.gz
+Patch101: linux-2.4.23-netfilter-IMQ-target.patch
+# http://rnvs.informatik.uni-leipzig.de/ipp2p/index_en.html
+# http://rnvs.informatik.uni-leipzig.de/ipp2p/downloads/ipp2p-0.5a_vs_2.4.22.diff.gz
+Patch102: ipp2p-0.5a_vs_2.4.22.diff.gz
+
# http://ebtables.sourceforge.net/
-Patch110: ebtables-brnf-2_vs_2.4.22.diff.gz
+Patch110: ebtables-brnf-3_vs_2.4.22.diff.gz
# http://trash.net/~kaber/imq/
-Patch120: imq-2.4.18.diff-10
+Patch120: linux-2.4.21-imq-1.diff
# ftp://ftp.samba.org/pub/unpacked/ppp/linux/mppe/
Patch125: linux-2.4.18-mppe.patch
Patch130: linux-2.4.22-tun-new-style.patch
# http://people.sistina.com/~thornber/patches/2.4-stable/
Patch200: linux-2.4.23-dm-3.patch
-# EVMS support (http://www.sourceforge.net/projects/evms/)
-# Disabled due to conflicts with LVM2 and device mapper tools
+# EVMS additional patches (http://www.sourceforge.net/projects/evms/)
Patch205: linux-2.4.22-evms-2.1.1.patch
#from http://dl.sourceforge.net/i810fb/linux-2.4.20-i810fb.diff.bz2
Patch231: linux-2.4.21-aic7xxx-mmapio.patch
Patch235: linux-2.4.20-audigy.patch.bz2
Patch240: linux-2.4.20-ecc.patch
-# i2c - version 2.8.0
-Patch255: linux-2.4.22-i2c-%{i2c_version}.patch
+# i2c - http://secure.netroedge.com/~lm78/
+Patch255: linux-2.4.23-i2c-%{i2c_version}.patch
Patch256: linux-2.4.21-i2c-headers.patch
Patch257: linux-2.4.21-i2c-sparc64.patch
Patch265: linux-2.4.20-e820.patch
Patch275: linux-2.4.20-qla2x00-v6.04.00-fo.patch.gz
# TV stuff from http://bytesex.org/
-Patch301: 20_v4l2-2.4.22.diff.gz
-Patch302: 30_bt832-2.4.22.diff
-Patch303: 30_btaudio-2.4.22.diff
+Patch301: 20_v4l2-2.4.23-pre7.diff.gz
+Patch302: 30_bt832-2.4.23-pre7.diff
+Patch303: 30_btaudio-2.4.23-pre7.diff
+
+# I18N stuff
+# Adds a sysctl for controlling the default iocharset
+Patch400: %{name}-nls_default.patch
# The following go last as they touch a lot of code
# and/or are on bcond and/or are ifarch
# Win4Lin
Patch900: linux-2.4.20-Win4Lin.PLD.patch.bz2
-Patch991: linux-2.4.20-Win4Lin-mki-adapter.patch.bz2
+Patch901: linux-2.4.20-Win4Lin-mki-adapter.patch.bz2
+
+# http://openipmi.sourceforge.net/
+Patch950: linux-2.4.23-ipmi-v27.patch
# Assorted bugfixes
Patch1414: linux-2.4.21-oopsmeharder.patch
Patch1415: linux-mtd-missing-include-fix-2.4.7-pre6.patch
Patch1416: linux-2.4.21-no-FPU.patch
-Patch1417: linux-2.4.22-ac4-ide+sata.patch
Patch1418: linux-2.4.21-hpt372-chicken-egg-hack.patch
Patch1419: linux-2.4.21-agp-num_of_masks.patch
# fix spare disk counting for raid 5
Patch1420: linux-raid5-spare-counting.patch
Patch1421: linux-2.4.21-bttv-typo.patch
-Patch1422: linux-2.4.21-ipt_TRACE-typo.patch
-
-Patch1500: linux-2.4.23-modular-ide.patch
Patch2000: linux-PPC-SMP.patch
Patch2001: linux-2.4-ppc-procesor.patch
Patch3010: linux-2.4.21-ipsec-sparc64.patch
Patch3011: linux-2.4.22-gcc33-inline.patch
Patch3012: linux-2.4.22-gcc-ext3.patch
+Patch3013: linux-2.4.23-ppc-symbols.patch
# Security patches/fixes
+# modified http://www.hardrock.org/kernel/current-updates/linux-2.4.23-updates.patch
+# since we already have some of these fixes applied
+Patch3500: http://www.hardrock.org/kernel/current-updates/linux-2.4.23-updates.patch
+# ftp://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.4.24/acpi-20031203-2.4.24.diff.bz2
+Patch3510: acpi-20031203-2.4.24.diff.bz2
+Patch3600: linux-2.4-sysctl-empty.patch
Patch4000: grsecurity-2.0-rc3-2.4.22-O1.patch
ExclusiveOS: Linux
BuildRequires: modutils
BuildRequires: ed
PreReq: modutils
-PreReq: geninitrd >= 2.40
+PreReq: geninitrd >= 1354
Requires(post,postun): fileutils
Requires(postun): awk
Provides: %{name}-up = %{version}-%{release}
Provides: module-info
Provides: i2c = %{i2c_version}
Provides: bttv = 0.7.83
-Provides: %{name}(netfilter) = 1.2.9rc1-%{netfilter_snap}
+Provides: %{name}(netfilter) = 1.2.9-%{netfilter_snap}
Provides: %{name}(reiserfs) = %{version}
Provides: %{name}(agpgart) = %{version}
#Provides: %{name}(cdrw)
#Provides: %{name}(cdmrw)
AutoReqProv: no
Obsoletes: kernel-modules
-Conflicts: iptables < 1.2.9rc1
+Conflicts: iptables < 1.2.9
Conflicts: lvm < 1.0.4
Conflicts: xfsprogs < 2.1.0
Conflicts: reiserfsprogs < 3.6.3
Provides: module-info
Provides: i2c = %{i2c_version}
Provides: bttv = 0.7.83
-Provides: %{name}(netfilter) = 1.2.9rc1-%{netfilter_snap}
+Provides: %{name}(netfilter) = 1.2.9-%{netfilter_snap}
Provides: %{name}(reiserfs) = %{version}
Provides: %{name}(agpgart) = %{version}
#Provides: %{name}(cdrw)
#Provides: %{name}(cdmrw)
AutoReqProv: no
-Conflicts: iptables < 1.2.9rc1
+Conflicts: iptables < 1.2.9
Conflicts: lvm < 1.0.4
Conflicts: xfsprogs < 2.1.0
Conflicts: reiserfsprogs < 3.6.3
Provides: %{name}-headers(agpgart) = %{version}
Provides: %{name}-headers(reiserfs) = %{version}
Provides: %{name}-headers(bridging) = %{version}
-Provides: i2c-devel = %{i2c_version}
-Provides: %{name}-headers(netfilter) = 1.2.9rc1-%{netfilter_snap}
+Provides: kernel-i2c-devel = %{i2c_version}
+Provides: %{name}-headers(netfilter) = 1.2.9-%{netfilter_snap}
+Obsoletes: kernel-i2c-devel
AutoReqProv: no
%description headers
Este pacote contém documentação para o kernel Linux.
%prep
-%setup -q -a3 -n linux-2.4.22
-%patch1 -p1
+%setup -q -a3 -n linux-%{version}
# new JFS
rm -fr fs/jfs
gzip -dc %{SOURCE7} | tar -xf -
%patch20 -p1
%patch21 -p1
%patch22 -p1
+%patch23 -p1
+%patch24 -p1
%patch25 -p1
#%patch26 -p1
%patch32 -p1
%patch70 -p1
%patch80 -p1
%patch100 -p1
+%patch101 -p1
+%patch102 -p1
%patch110 -p1
%patch120 -p1
%patch125 -p1
%patch301 -p1
%patch302 -p1
%patch303 -p1
+%patch400 -p1
+%patch950 -p1
%patch1000 -p1
%patch1002 -p1
%patch1003 -p1
%patch1414 -p1
%patch1415 -p0
%patch1416 -p1
-# XXX: is there updated one?
-#%patch1417 -p1
%patch1418 -p1
%patch1419 -p1
%patch1420 -p1
%patch1421 -p1
-# XXX: no TRACE in netfilter included here (at this moment)
-#%patch1422 -p1
-
-%patch1500 -p1
%patch2000 -p0
%patch2001 -p1
%patch3011 -p1
%patch3012 -p1
+%patch3013 -p1
-# XXX: UPDATE (proc in 2.4.23 was converted to seq_file so bigger changes are needed)
+%patch3500 -p1
+%patch3510 -p1
+%patch3600 -p1
%{?with_grsec:%patch4000 -p1}
mv -f drivers/scsi/sym53c8xx.c drivers/scsi/sym53c8xx_old.c
%if %{with win4lin}
echo Win4Lin patch ...
%patch900 -p1
-%patch991 -p1
+%patch901 -p1
%endif
%endif
KERNELRELEASE=$KernelVer
echo KERNEL RELEASE $KernelVer
%endif
+ echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
+ depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer $KernelVer || echo
}
KERNEL_BUILD_DIR=`pwd`
# SMP KERNEL
%{?with_smp:BuildKernel smp}
+%if ! %{with up} && ! %{with smp}
+# We need include/asm created somewhere
+make symlinks
+%endif
+
# BOOT kernel
%ifnarch i586 i686 athlon
KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR-installed%{_libdir}/bootdisk"
cd $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
+# remove foreign architecture files
+cd include
+mkdir _asm_keep
+mv asm-generic _asm_keep
+%ifarch sparc sparc64
+ mv asm-sparc* _asm_keep
+%else
+ mv `resolvesymlink asm 2> /dev/null || readlink asm 2> /dev/null` _asm_keep
+%endif
+rm -rf asm-*
+mv _asm_keep/* .
+rmdir _asm_keep
+cd ..
+
+%if %{with source}
+MYARCH=%{_arch}
+%ifarch %{ix86}
+MYARCH=i386
+%endif
+%ifarch sparc sparc64
+MYARCH="sparc sparc64"
+%endif
+cd arch
+mv $MYARCH ..
+cd ..
+rm -rf arch/*
+mv $MYARCH arch
+%endif
+
%if %{with source}
%{__make} mrproper