SPECS: umlinux.spec - merged from DEVEL.
pawelz
pawelz at pld-linux.org
Sun Nov 23 23:54:33 CET 2008
Author: pawelz Date: Sun Nov 23 22:54:33 2008 GMT
Module: SPECS Tag: HEAD
---- Log message:
- merged from DEVEL.
---- Files affected:
SPECS:
umlinux.spec (1.25 -> 1.26)
---- Diffs:
================================================================
Index: SPECS/umlinux.spec
diff -u SPECS/umlinux.spec:1.25 SPECS/umlinux.spec:1.26
--- SPECS/umlinux.spec:1.25 Mon Feb 12 23:09:18 2007
+++ SPECS/umlinux.spec Sun Nov 23 23:54:27 2008
@@ -1,46 +1,42 @@
# $Revision$, $Date$
-%define kernel_version 2.4.27
-%define utils_version 20040406
+# TODO
+# - does it make sens to package module-build for umlinux? Is it possible?
+
+%define basever 2.6.27
+%define postver .7
+%define alt_kernel uml
Summary: User Mode Linux
Summary(pl.UTF-8): Linux w przestrzeni użytkownika
Name: umlinux
-Version: 2
-Release: 1.%{kernel_version}.1
+Version: %{basever}%{postver}
+Release: 0.1
Epoch: 0
License: GPL
Group: Applications/Emulators
-Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-%{kernel_version}.tar.bz2
-# Source0-md5: 59a2e6fde1d110e2ffa20351ac8b4d9e
-Source1: %{name}-config
-Source2: http://dl.sourceforge.net/user-mode-linux/uml_utilities_%{utils_version}.tar.bz2
-# Source2-md5: 2c1ccd9efacbfb39e42d482b89b2550a
-Source3: http://user-mode-linux.sourceforge.net/UserModeLinux-HOWTO.html
-# Source3-md5: 781dc3611ebf60ac07814a1cd31c936d
-Source4: %{name}-etc-umltab
-Source5: %{name}-rc-init
-Patch0: http://dl.sourceforge.net/user-mode-linux/uml-patch-%{kernel_version}-1.bz2
-Patch1: ftp://ftp.linux.ee/pub/gentoo/portage/sys-apps/usermode-utilities/files/20040406-CAN-2004-1295.patch
-Patch2: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.smbfs.patch
-Patch3: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.CAN-2004-1056.patch
-Patch4: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources.AF_UNIX.patch
-Patch5: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.binfmt_elf.patch
-Patch6: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.XDRWrapFix.patch
-Patch7: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.78362.patch
-Patch8: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.77666.patch
-Patch9: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.77094.patch
-Patch10: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.27.CAN-2004-1295.patch
-Patch11: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.78363.patch
-Patch12: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.CAN-2004-1137.patch
-Patch13: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.CAN-2004-1016.patch
-Patch14: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.binfmt_a.out.patch
-Patch15: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.brk-locked.patch
-Patch16: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.cmdlineLeak.patch
-Patch17: ftp://ftp.linux.ee/pub/gentoo/portage/sys-kernel/usermode-sources/files/usermode-sources-2.4.vma.patch
+Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2
+# Source0-md5: b3e78977aa79d3754cb7f8143d7ddabd
+Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
+# Source1-md5: 1d0e83c620f3960d4d1e813f186b39f6
+Source2: %{name}-config
URL: http://user-mode-linux.sourceforge.net/
-BuildRequires: libpcap-static
-BuildRequires: modutils
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define localversion %{release}
+%define kernel_release %{version}-%{alt_kernel}-%{localversion}
+
+%define defconfig arch/um/defconfig
+
+%define topdir %{_builddir}/%{name}-%{version}
+%define srcdir %{topdir}/linux-%{basever}
+
+%define CommonOpts HOSTCC="%{kgcc}" HOSTCFLAGS="-Wall -Wstrict-prototypes %{rpmcflags} -fomit-frame-pointer"
+%define MakeOpts %{CommonOpts} ARCH=um CC="%{kgcc}" LDFLAGS=-L/lib
+%define DepMod /bin/true
+
+%define _kernelsrcdir /usr/src/linux-%{version}-%{alt_kernel}
+
+%define CrossOpts ARCH=um LDFLAGS=-L/lib CC="%{__cc}"
+
%description
User Mode Linux.
@@ -58,131 +54,139 @@
%description modules -l pl.UTF-8
Moduły Linuksa w przestrzeni użytkownika.
+%package doc
+Summary: Linux documentaion
+Summary(pl.UTF-8): Dokumentacja Linuksa
+Group: Documentation
-%package utils
-Summary: User Mode Linux Utilities
-Summary(pl.UTF-8): Narzędzia dla Linuksa w przestrzeni użytkownika
-Group: Applications/Emulators
-Version: %{utils_version}
-
-%description utils
-Utilities for User Mode Linux.
+%description doc
+Linux documentation.
-%description utils -l pl.UTF-8
-Narzędzia dla Linuksa w przestrzeni użytkownika.
-
-%package utils-perl
-Summary: User Mode Linux Perl Utilities
-Summary(pl.UTF-8): Narzędzia perlowe dla Linuksa w przestrzeni użytkownika
-Group: Applications/Emulators
-Version: %{utils_version}
+%description doc -l pl.UTF-8
+Dokumentacja systemu Linux.
-%description utils-perl
-Perl Utilities for User Mode Linux.
+%prep
+%setup -qc
-%description utils-perl -l pl.UTF-8
-Narzędzia perlowe dla Linuksa w przestrzeni użytkownika.
+cd linux-%{basever}
-%package init
-Summary: Automagic startup/shutdown User Mode Linux
-Summary(pl.UTF-8): Automagiczy start/stop Linuksa w przestrzeni użytkownika
-Group: Applications/Emulators
+%if "%{postver}" != "%{nil}"
+%{__bzip2} -dc %{SOURCE1} | patch -p1 -s
+%endif
-%description init
-Utilities for automagic startup/shutdown User Mode Linux.
+# Fix EXTRAVERSION in main Makefile
+sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}-%{alt_kernel}#g' Makefile
-%description init -l pl.UTF-8
-Automagiczy start/stop Linuksa w przestrzeni użytkownika.
+# cleanup backups after patching
+find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
-%prep
-%setup -q -n linux-%{kernel_version} -a 2
-%patch0 -p1
-cd tools
-%patch1 -p1
-cd ..
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
+%build
-cp %{SOURCE1} ./.config
-cp %{SOURCE3} .
+cd linux-%{basever}
-%build
-%{__make} ARCH=um oldconfig
-%{__make} ARCH=um dep
-# $((0x... )) it's not /bin/sh compatible:
-%{__make} ARCH=um SHELL=/bin/bash linux
-%{__make} ARCH=um modules
-%{__make} -C tools
+BuildConfig() {
+ %{?debug:set -x}
+ cat $RPM_SOURCE_DIR/umlinux-config > %{defconfig}
+
+%{?debug:sed -i "s:# CONFIG_DEBUG_SLAB is not set:CONFIG_DEBUG_SLAB=y:" %{defconfig}}
+%{?debug:sed -i "s:# CONFIG_DEBUG_PREEMPT is not set:CONFIG_DEBUG_PREEMPT=y:" %{defconfig}}
+%{?debug:sed -i "s:# CONFIG_RT_DEADLOCK_DETECT is not set:CONFIG_RT_DEADLOCK_DETECT=y:" %{defconfig}}
+
+}
+
+BuildKernel() {
+ %{?debug:set -x}
+ echo "Building kernel $1 ..."
+ %{__make} %CrossOpts mrproper \
+ RCS_FIND_IGNORE='-name build-done -prune -o'
+ ln -sf %{defconfig} .config
+
+ %{__make} %CrossOpts clean \
+ RCS_FIND_IGNORE='-name build-done -prune -o'
+ %{__make} %CrossOpts include/linux/version.h \
+ %{?with_verbose:V=1}
+
+ %{__make} %CrossOpts scripts/mkcompile_h \
+ %{?with_verbose:V=1}
+
+ %{__make} %CrossOpts \
+ %{?with_verbose:V=1}
+}
+
+PreInstallKernel() {
+ %{__make} %CrossOpts modules_install \
+ %{?with_verbose:V=1} \
+ DEPMOD=%DepMod \
+ INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
+ KERNELRELEASE=%{kernel_release}
+
+ # You'd probabelly want to make it somewhat different
+ install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}
+ install Module.symvers $KERNEL_INSTALL_DIR%{_kernelsrcdir}/Module.symvers-dist
+
+ echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
+ if [ %DepMod = /sbin/depmod ]; then
+ /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-%{kernel_release} -r %{kernel_release} || :
+ fi
+ touch $KERNEL_INSTALL_DIR/lib/modules/%{kernel_release}/modules.dep
+ echo "KERNEL RELEASE %{kernel_release} DONE"
+}
+
+KERNEL_BUILD_DIR=`pwd`
+echo "-%{localversion}" > localversion
+
+KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel"
+rm -rf $KERNEL_INSTALL_DIR
+BuildConfig
+ln -sf %{defconfig} .config
+install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
+rm -f include/linux/autoconf.h
+%{__make} %CrossOpts include/linux/autoconf.h
+install include/linux/autoconf.h \
+ $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-dist.h
+install .config \
+ $KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-dist
+BuildKernel
+PreInstallKernel
+
+%{__make} %CrossOpts include/linux/utsrelease.h
+cp include/linux/utsrelease.h{,.save}
+cp include/linux/version.h{,.save}
+cp scripts/mkcompile_h{,.save}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},/etc/rc.d/init.d}
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/umltab
-install %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/uml
-
-%{__make} ARCH=um modules_install INSTALL_MOD_PATH=$RPM_BUILD_ROOT
-install linux $RPM_BUILD_ROOT%{_bindir}/umlinux
-install tools/moo/uml_moo $RPM_BUILD_ROOT%{_bindir}
-install tools/umlgdb/umlgdb $RPM_BUILD_ROOT%{_bindir}
-install tools/port-helper/port-helper $RPM_BUILD_ROOT%{_bindir}
-install tools/uml_net/uml_net $RPM_BUILD_ROOT%{_bindir}
-install tools/uml_router/uml_switch $RPM_BUILD_ROOT%{_bindir}
-install tools/watchdog/uml_watchdog $RPM_BUILD_ROOT%{_bindir}
-install tools/jail/jailer.pl $RPM_BUILD_ROOT%{_bindir}
-install tools/jailtest/jailtest $RPM_BUILD_ROOT%{_bindir}
-install tools/tunctl/tunctl $RPM_BUILD_ROOT%{_bindir}
-install tools/honeypot/honeypot.pl $RPM_BUILD_ROOT%{_bindir}
-# install tools/honeypot/hppfslib.pm ?
-# install tools/honeypot/hppfs.pm ?
+
+install -d $RPM_BUILD_ROOT{%{_bindir},/lib/modules/%{kernel_release}/misc,%{_kernelsrcdir}}
+
+cd linux-%{basever}
+install linux $RPM_BUILD_ROOT%{_bindir}/linux
+%{__make} ARCH=um modules_install INSTALL_MOD_PATH=$RPM_BUILD_ROOT
+
+cp -a Documentation $RPM_BUILD_ROOT%{_kernelsrcdir}/Documentation
+
+cd %{topdir}/linux-%{basever}
+
+%post modules
+%depmod %{kernel_release}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc *.html
-%attr(755,root,root) %{_bindir}/umlinux
-
-%files utils
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/jailtest
-%attr(755,root,root) %{_bindir}/port-helper
-%attr(755,root,root) %{_bindir}/tunctl
-%attr(755,root,root) %{_bindir}/umlgdb
-%attr(755,root,root) %{_bindir}/uml_moo
-%attr(755,root,root) %{_bindir}/uml_net
-%attr(755,root,root) %{_bindir}/uml_switch
-%attr(755,root,root) %{_bindir}/uml_watchdog
-
-%files utils-perl
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/honeypot.pl
-%attr(755,root,root) %{_bindir}/jailer.pl
-# honeypot/hppfslib.pm ?
-# honeypot/hppfs.pm ?
+%attr(755,root,root) %{_bindir}/linux
%files modules
%defattr(644,root,root,755)
-/lib/*
+%dir /lib/modules/%{kernel_release}
+/lib/modules/%{kernel_release}/kernel
+/lib/modules/%{kernel_release}/misc
+%ghost /lib/modules/%{kernel_release}/modules.*
-%files init
+%files doc
%defattr(644,root,root,755)
-%attr(754,root,root) /etc/rc.d/init.d/uml
-/etc/umltab
+%{_kernelsrcdir}/Documentation
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -190,19 +194,77 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
-Revision 1.25 2007/02/12 22:09:18 glen
-- tabs in preamble
+Revision 1.26 2008/11/23 22:54:27 pawelz
+- merged from DEVEL.
+
+Revision 1.23.2.19 2008/11/23 22:35:39 pawelz
+- packaged docs
+
+Revision 1.23.2.18 2008/11/23 20:29:34 pawelz
+- removed init scripts for umlinux. It makes no sens - main purpose of
+ umlinux is testing, not virtual servers hosting.
+
+Revision 1.23.2.17 2008/11/23 15:00:09 pawelz
+- pass correct kernel version string to depmod
+- do not depmod after uninstallation of all modules
+- fixed '%%files modules' section
+- -modules subpackage builds and installs now
+
+Revision 1.23.2.16 2008/11/23 14:15:10 pawelz
+- up to 2.6.26.7
+
+Revision 1.23.2.15 2008/11/01 03:11:28 zbyniu
+- localversion fixes
+
+Revision 1.23.2.14 2008/11/01 02:03:55 pawelz
+- added todo
+
+Revision 1.23.2.13 2008/11/01 02:01:14 pawelz
+- do not build -init package. Init script does not work.
+
+Revision 1.23.2.12 2008/11/01 01:53:14 pawelz
+- HOWTO is no longer available
+- do not package kernel-{source,module-build,headers}
+- up tu 2.6.27.4
+
+Revision 1.23.2.11 2008/10/28 23:19:49 glen
+- when will people learn?
+
+Revision 1.23.2.10 2008/10/28 22:46:19 pawelz
+- rewritten %%build section (based on kernel-vanilla.spec at Titanium)
+- it builds now
+- NFY
+
+Revision 1.23.2.9 2008/10/28 09:16:59 pawelz
+- depmod in post/postun
+
+Revision 1.23.2.8 2008/10/27 21:31:18 pawelz
+- it builds now
+- NFY
+
+Revision 1.23.2.7 2008/10/27 20:40:48 pawelz
+- dropped outdated BRs
+- fixed %build
+- it %builds now but not %installs
+
+Revision 1.23.2.6 2008/10/27 19:37:32 pawelz
+- started update to 2.6.27.3
+- dropped outdated patches
+
+Revision 1.23.2.5 2008/10/27 19:24:36 pawelz
+- droped patch 1 (outdated)
+
+Revision 1.23.2.4 2008/10/27 19:16:53 pawelz
+- removed -utils. Thes files are packeged in *working* umlinux-tools.spec
-Revision 1.24 2007/02/12 01:06:35 baggins
+Revision 1.23.2.3 2007/02/12 13:20:16 baggins
- converted to UTF-8
-Revision 1.23 2005/06/24 13:41:35 glen
-- updated to 2.4.27
-- apply patches from gentoo
-- doesn't build (missing osdeps/thread.h)
+Revision 1.23.2.2 2005/12/01 12:43:53 witekfl
+- updated md5sum
-Revision 1.22 2005/06/24 11:55:37 glen
-- CAN-2004-1295
+Revision 1.23.2.1 2005/06/30 19:46:00 glen
+- 2.6 one. builds but doesn't work
Revision 1.21 2005/06/24 11:19:09 glen
- anybody using this?
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/umlinux.spec?r1=1.25&r2=1.26&f=u
More information about the pld-cvs-commit
mailing list