[opensuse-kernel] Trim kernel-source package
Greetings. The following is a submission to reduce the number of files that will be installed when one wants to compile kernel modules, offering saving both in time and space. Disks are touted as cheap, but let's face it, spending ~340 MB for kernel sources means you have 340 less for your personal files. The time savings should be obvious too: less files to install, and also less files to index — locatedb, quota, beagle/etc., you name it. This is especially beneficial for developers and OBS or OBS-like instances where packages are not only built in random order(*), but where the chroots are usually torn down everytime. (*) Calling build locally and manually, without --clean, and with the same buildroot everytime would allow for a time optimization when all KMPs are built after another, as big packages like kernel-* would not have to be reinstalled/deleted everytime. With this patch(set) — there is a bit of cleanup upfront —, the "kernel-devel" package is introduced which contains all (and only) the necessary files to support external module building. The entire source for personal recompilation orgies is moved out to "kernel-source", which now behaves like "kernel-source-vanilla" already did. The standalone sources' (kernel-source) path has been changed so as to not overlap with those used for module building, because people always trash their KMP build environment for the shipped kernel when they ran cloneconfig. Another desired side-effect of the so-codified separation into the kernel-devel package is that dangerous calls that would cause above-mentioned trashing are now completely inhibited. This modification has been tested with various kinds of free and non-free packages and kernel versions already. The latter is especially important because they are the most likely ones to break because of their awkward-to-horrid Makefiles. These have been made available for a long time already at jftp.medozas.de; the list includes at least: fglrx-kmp-default-8.681~2.6.31.11~jen93-jen0.x86_64.rpm ndiswrapper-kmp-default-1.55~2.6.31.11~jen93-3.4.jen2.x86_64.rpm nvidiagfx-kmp-default-190.53~2.6.31.11~jen93-jen8.x86_64.rpm nvidiagfx-legacy173-kmp-default-173.14.22~2.6.31.11~jen93-jen8.x86_64.rpm nvidiagfx-legacy71-kmp-default-71.86.11~2.6.31.11~jen93-jen8.x86_64.rpm nvidiagfx-legacy96-kmp-default-96.43.14~2.6.31.11~jen93-jen8.x86_64.rpm ttyrpld-kmp-default-2.60~2.6.31.11~jen93-jen4.x86_64.rpm virtualbox-modules-kmp-default-3.1.2_56127~2.6.31.12~jen93-jen0.x86_64.rpm vmware-modules-kmp-default-6.5.3~185404~2.6.31.12~jen93-jen3.x86_64.rpm xtables-addons-kmp-default-1.22~2.6.31.12~jen93-jen0.x86_64.rpm It was also tested with 2.6.32 and — since somebody decided out of the blue to rebase last week :-) — just now with .33-rc6 too. The resulting kernel-devel package is 10x smaller in installed size and has roughly 3x fewer files. The following changes since commit 69aad1a30e31d4f33ab56a1f195c7c4229c9dd66: Nikanth Karthikesan (1): - patches.fixes/dm-stripe-zero-stripes: dm-stripe: return -EINVAL if stripe count is zero (bnc#576312). are available in the git repository at: git://dev.medozas.de/suse-kernel less-source Jan Engelhardt (3): misc: use proper tar options kernel-source: use more macros kernel-source: split devel files and full-source doc/README.SUSE | 4 +- kernel-source.changes | 7 +++++ rpm/compute-PATCHVERSION.sh | 2 +- rpm/group-source-files | 33 +++++++++++++++++++++++++ rpm/kernel-binary.spec.in | 12 ++++---- rpm/kernel-source.spec.in | 56 +++++++++++++++++++++++++++++++++++++++---- rpm/kernel-syms.spec.in | 4 +- scripts/tar-up.sh | 2 +- 8 files changed, 103 insertions(+), 17 deletions(-) create mode 100755 rpm/group-source-files -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
--- doc/README.SUSE | 4 ++-- kernel-source.changes | 5 +++++ rpm/compute-PATCHVERSION.sh | 2 +- rpm/kernel-binary.spec.in | 6 +++--- rpm/kernel-source.spec.in | 2 +- scripts/tar-up.sh | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/doc/README.SUSE b/doc/README.SUSE index bb63204..b49e335 100644 --- a/doc/README.SUSE +++ b/doc/README.SUSE @@ -302,9 +302,9 @@ can be generated from vanilla sources + patches like this: $ cd /usr/src/packages/SOURCES $ for f in patches.*.tar.bz2; do \ - tar xfj $f || break; \ + tar -xjf "$f" || break; \ done - $ tar xfj linux-2.6.5.tar.bz2 + $ tar -xjf linux-2.6.5.tar.bz2 # Apply the patches diff --git a/kernel-source.changes b/kernel-source.changes index 92c2fad..4697333 100644 --- a/kernel-source.changes +++ b/kernel-source.changes @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Feb 5 07:47:40 UTC 2010 - jengelh@medozas.de + +- use standard short options in tar commands + +------------------------------------------------------------------- Thu Feb 4 13:23:57 CET 2010 - knikanth@suse.de - patches.fixes/dm-stripe-zero-stripes: dm-stripe: return -EINVAL diff --git a/rpm/compute-PATCHVERSION.sh b/rpm/compute-PATCHVERSION.sh index fb9a1a5..27becf6 100755 --- a/rpm/compute-PATCHVERSION.sh +++ b/rpm/compute-PATCHVERSION.sh @@ -49,7 +49,7 @@ while read patch; do warned=true fi tmp_files="$tmp_files $dir" - tar xjf "$p/$dir.tar.bz2" + tar -xjf "$p/$dir.tar.bz2" echo "$patch" continue 2 fi diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in index 78daad3..93d61dd 100644 --- a/rpm/kernel-binary.spec.in +++ b/rpm/kernel-binary.spec.in @@ -43,7 +43,7 @@ # Define some CONFIG variables as rpm macros as well. (rpm cannot handle # defining them all at once.) %define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT -%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} +%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)} %define split_base (%CONFIG_SPLIT_PACKAGE == "y") %define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y") @@ -585,8 +585,8 @@ if [ %CONFIG_MODULES = y ]; then fi fi - tar cf - -T %my_builddir/obj-files | \ - tar xf - -C %rpm_install_dir/%cpu_arch_flavor + tar -cf - -T %my_builddir/obj-files | \ + tar -xf - -C %rpm_install_dir/%cpu_arch_flavor # bnc#507084 find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \ while read f; do diff --git a/rpm/kernel-source.spec.in b/rpm/kernel-source.spec.in index bd681ad..c1067ef 100644 --- a/rpm/kernel-source.spec.in +++ b/rpm/kernel-source.spec.in @@ -150,7 +150,7 @@ cd $RPM_BUILD_ROOT/usr/src ln -sf linux%variant linux%variant # dummy symlink # Unpack the vanilla kernel sources -tar xjf %_sourcedir/linux-%srcversion.tar.bz2 +tar -xjf %_sourcedir/linux-%srcversion.tar.bz2 mv linux-%srcversion linux-%kernelrelease%variant diff --git a/scripts/tar-up.sh b/scripts/tar-up.sh index f3bf649..296a07c 100755 --- a/scripts/tar-up.sh +++ b/scripts/tar-up.sh @@ -222,7 +222,7 @@ stable_tar() { cd "$chdir" find "$@" \( -type f -o -type l -o -type d -a -empty \) -print0 | \ LC_ALL=C sort -z | \ - tar cf - --null -T - "${tar_opts[@]}" + tar -cf - --null -T - "${tar_opts[@]}" ) | bzip2 -9 >"$tarball" } -- 1.6.6.1 -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
Hi Jan, Le vendredi 5 février 2010 22:44, Jan Engelhardt a écrit :
--- doc/README.SUSE | 4 ++-- kernel-source.changes | 5 +++++ rpm/compute-PATCHVERSION.sh | 2 +- rpm/kernel-binary.spec.in | 6 +++--- rpm/kernel-source.spec.in | 2 +- scripts/tar-up.sh | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/doc/README.SUSE b/doc/README.SUSE index bb63204..b49e335 100644 --- a/doc/README.SUSE +++ b/doc/README.SUSE @@ -302,9 +302,9 @@ can be generated from vanilla sources + patches like this:
$ cd /usr/src/packages/SOURCES $ for f in patches.*.tar.bz2; do \ - tar xfj $f || break; \ + tar -xjf "$f" || break; \ done - $ tar xfj linux-2.6.5.tar.bz2 + $ tar -xjf linux-2.6.5.tar.bz2
# Apply the patches
diff --git a/kernel-source.changes b/kernel-source.changes index 92c2fad..4697333 100644 --- a/kernel-source.changes +++ b/kernel-source.changes @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Feb 5 07:47:40 UTC 2010 - jengelh@medozas.de + +- use standard short options in tar commands
Out of curiosity, did you have any reason other than esthetic for this change? Do the missing dash cause any compatibility issue? -- Jean Delvare Suse L3 -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Saturday 2010-02-06 14:56, Jean Delvare wrote:
Le vendredi 5 février 2010 22:44, Jan Engelhardt a écrit :
--- doc/README.SUSE | 4 ++-- kernel-source.changes | 5 +++++ rpm/compute-PATCHVERSION.sh | 2 +- rpm/kernel-binary.spec.in | 6 +++--- rpm/kernel-source.spec.in | 2 +- scripts/tar-up.sh | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/doc/README.SUSE b/doc/README.SUSE index bb63204..b49e335 100644 --- a/doc/README.SUSE +++ b/doc/README.SUSE @@ -302,9 +302,9 @@ can be generated from vanilla sources + patches like this:
$ cd /usr/src/packages/SOURCES $ for f in patches.*.tar.bz2; do \ - tar xfj $f || break; \ + tar -xjf "$f" || break; \ done - $ tar xfj linux-2.6.5.tar.bz2 + $ tar -xjf linux-2.6.5.tar.bz2
# Apply the patches
diff --git a/kernel-source.changes b/kernel-source.changes index 92c2fad..4697333 100644 --- a/kernel-source.changes +++ b/kernel-source.changes @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Feb 5 07:47:40 UTC 2010 - jengelh@medozas.de + +- use standard short options in tar commands
Out of curiosity, did you have any reason other than esthetic for this change? Do the missing dash cause any compatibility issue?
The reasons are outlined in the info page for tar - namely that the non-dash oldoptions are error prone. It is not mandatory, but I thought might as well do it while at it. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
Le samedi 6 février 2010 15:00, Jan Engelhardt a écrit :
On Saturday 2010-02-06 14:56, Jean Delvare wrote:
Le vendredi 5 février 2010 22:44, Jan Engelhardt a écrit :
diff --git a/kernel-source.changes b/kernel-source.changes index 92c2fad..4697333 100644 --- a/kernel-source.changes +++ b/kernel-source.changes @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Feb 5 07:47:40 UTC 2010 - jengelh@medozas.de + +- use standard short options in tar commands
Out of curiosity, did you have any reason other than esthetic for this change? Do the missing dash cause any compatibility issue?
The reasons are outlined in the info page for tar - namely that the non-dash oldoptions are error prone. It is not mandatory, but I thought might as well do it while at it.
Sure, I have no objection, I was just curious. -- Jean Delvare Suse L3 -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
--- kernel-source.changes | 1 + rpm/kernel-source.spec.in | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel-source.changes b/kernel-source.changes index 4697333..959ec1f 100644 --- a/kernel-source.changes +++ b/kernel-source.changes @@ -2,6 +2,7 @@ Fri Feb 5 07:47:40 UTC 2010 - jengelh@medozas.de - use standard short options in tar commands +- rpm/kernel-source.spec.in: use macros in a few more places ------------------------------------------------------------------- Thu Feb 4 13:23:57 CET 2010 - knikanth@suse.de diff --git a/rpm/kernel-source.spec.in b/rpm/kernel-source.spec.in index c1067ef..3395d0a 100644 --- a/rpm/kernel-source.spec.in +++ b/rpm/kernel-source.spec.in @@ -151,18 +151,18 @@ ln -sf linux%variant linux%variant # dummy symlink # Unpack the vanilla kernel sources tar -xjf %_sourcedir/linux-%srcversion.tar.bz2 -mv linux-%srcversion linux-%kernelrelease%variant +mv linux-%srcversion "%buildroot/%src_install_dir" %if %do_vanilla -cp -al linux-%kernelrelease%variant linux-%kernelrelease-vanilla +cp -al "%buildroot/%src_install_dir" linux-%kernelrelease-vanilla cd linux-%kernelrelease-vanilla %_sourcedir/apply-patches --vanilla %_sourcedir/series.conf %my_builddir %symbols rm -f $(find . -name ".gitignore") cd .. %endif -cd linux-%kernelrelease%variant +cd "%buildroot/%src_install_dir" %_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols rm -f $(find . -name ".gitignore") -- 1.6.6.1 -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
--- kernel-source.changes | 1 + rpm/group-source-files | 33 ++++++++++++++++++++++++++++++ rpm/kernel-binary.spec.in | 6 ++-- rpm/kernel-source.spec.in | 48 ++++++++++++++++++++++++++++++++++++++++++++- rpm/kernel-syms.spec.in | 4 +- 5 files changed, 86 insertions(+), 6 deletions(-) create mode 100755 rpm/group-source-files diff --git a/kernel-source.changes b/kernel-source.changes index 959ec1f..2159ede 100644 --- a/kernel-source.changes +++ b/kernel-source.changes @@ -3,6 +3,7 @@ Fri Feb 5 07:47:40 UTC 2010 - jengelh@medozas.de - use standard short options in tar commands - rpm/kernel-source.spec.in: use macros in a few more places +- rpm/kernel-source.spec.in: split devel files and full source ------------------------------------------------------------------- Thu Feb 4 13:23:57 CET 2010 - knikanth@suse.de diff --git a/rpm/group-source-files b/rpm/group-source-files new file mode 100755 index 0000000..1511609 --- /dev/null +++ b/rpm/group-source-files @@ -0,0 +1,33 @@ +#!/bin/bash + +loc="$1"; +if [[ -z "$loc" ]]; then + echo "Need to specify the location of the tree to be trimmed."; + exit 1; +fi; + +exec 7> >(sort -u > FL-devel-dirs.raw); +for i in ` ( + find "$loc" -type f \( \ + -iname "Kconfig*" -o -iname "Kbuild*" -o \ + -iname "Makefile*" \); + find "$loc"/{include/*,scripts} "$loc"/arch/*/include \ + ! -type d; ) | + sort -u`; do + + i="${i#$loc/}"; + d="${i%/*}"; + [[ "$i" != "$d" ]] && echo "$loc/$d" >&7; + echo "$loc/$i"; +done | sort -u >FL-devel-files.raw; + +find "$loc" -type d | sort -u | perl -pe 's{^}{%dir /}' >FL-all-dirs.rpm; +diff -dpru <(find "$loc" ! -type d | sort) FL-devel-files.raw | + tail -n +4 | grep ^- | cut -b 2- >FL-all-files.raw; + +perl -pe 's{^}{%dir /}' <FL-devel-dirs.raw >FL-devel-dirs.rpm; +perl -pe 's{^}{/}' <FL-devel-files.raw >FL-devel-files.rpm; +perl -pe 's{^}{/}' <FL-all-files.raw >FL-all-files.rpm; + +comm FL-all-files.raw FL-devel-files.raw | \ + pcregrep '^[^\t]' >FL-nondevel-files.raw; diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in index 93d61dd..c68e2dc 100644 --- a/rpm/kernel-binary.spec.in +++ b/rpm/kernel-binary.spec.in @@ -346,7 +346,7 @@ fi export NO_BRP_STRIP_DEBUG=true # /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the -# kernel-source package is installed. Don't check for stale symlinks +# kernel-devel package is installed. Don't check for stale symlinks # in the brp-symlink check: export NO_BRP_STALE_LINK_ERROR=yes @@ -516,7 +516,7 @@ if [ %CONFIG_MODULES = y ]; then %endif # Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor - # so that kernel-source + kernel-%build_flavor is sufficient for building + # so that kernel-devel + kernel-%build_flavor is sufficient for building # modules that have modversions as well. mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor @@ -775,7 +775,7 @@ License: GPL v2 only Group: Development/Sources Provides: multiversion(kernel) Provides: %name-devel = %version-%source_rel -Requires: kernel-source%variant = %version-%source_rel +Requires: kernel-devel%variant = %version-%source_rel Supplements: packageand(%name:kernel-source) AutoReqProv: on diff --git a/rpm/kernel-source.spec.in b/rpm/kernel-source.spec.in index 3395d0a..3492ec4 100644 --- a/rpm/kernel-source.spec.in +++ b/rpm/kernel-source.spec.in @@ -18,6 +18,8 @@ # norootforbuild # icecream 0 +%define huge_package 0 + %define srcversion @SRCVERSION@ %define patchversion @PATCHVERSION@ %define variant @VARIANT@%{nil} @@ -27,6 +29,7 @@ %define src_install_dir usr/src/linux-%kernelrelease%variant %define obj_install_dir /%src_install_dir-obj %define rpm_install_dir %buildroot%real_install_dir +%define fullsrc_install_dir usr/src/linux-src-%kernelrelease%variant Name: kernel-source@VARIANT@ Summary: The Linux Kernel Sources @@ -41,7 +44,7 @@ Group: Development/Sources Url: http://www.kernel.org/ AutoReqProv: off BuildRequires: coreutils sed -BuildRequires: fdupes +BuildRequires: fdupes pcre-tools Requires(post): coreutils sed Provides: multiversion(kernel) Provides: linux @@ -62,6 +65,7 @@ Source21: config.conf Source23: supported.conf Source33: check-for-config-changes Source34: check-supported-list +Source35: group-source-files Source37: README.SUSE Source38: README.KSYMS Source40: source-timestamp @@ -114,6 +118,19 @@ Linux kernel sources with many fixes and improvements. %source_timestamp +%package -n kernel-devel +Summary: Development files needed for building kernel modules +License: GPL v2 only +Group: Development/Sources +AutoReqProv: off +Provides: multiversion(kernel) + +%description -n kernel-devel +Kernel-level headers and Makefiles required for development of +external kernel modules. + +%source_timestamp + %package vanilla Summary: Vanilla Linux kernel sources with minor build fixes. License: GPL v2 only @@ -192,9 +209,38 @@ for script in post; do %_sourcedir/source-$script.sh > %name-$script.sh done +pushd "%buildroot" +%if %huge_package +cp -a "%src_install_dir" "%fullsrc_install_dir" +echo "-%release-LOCAL" >"%fullsrc_install_dir/localversion" +%endif + +# Remove files that are unneeded for KMP building +"%_sourcedir/group-source-files" "%src_install_dir" +xargs -a FL-nondevel-files.raw rm -f +cat FL-devel-{dirs,files}.rpm >>"$OLDPWD/master.files" +mv FL-* "%_sourcedir/" +find "%src_install_dir" -type d -print0 | sort -rz | \ + xargs -0 rmdir 2>/dev/null || : +find "%src_install_dir" -type d | sort | \ + perl -pe 's{^}{%%dir /}' >>"$OLDPWD/master.files" +popd %post -f %name-post.sh + +# Need a near-empty kernel-source package for the time being, or +# Build will pick an older kernel-source that will then - naturally - +# clash with kernel-devel. %files +%defattr(-,root,root) +%if %huge_package +/%fullsrc_install_dir +%else +# Need something, or rpmlint will delete the package. +%dir /usr/src +%endif + +%files -n kernel-devel %defattr(-, root, root) %ghost /usr/src/linux%variant /usr/share/doc/packages/%name diff --git a/rpm/kernel-syms.spec.in b/rpm/kernel-syms.spec.in index 693727e..fcfcc18 100644 --- a/rpm/kernel-syms.spec.in +++ b/rpm/kernel-syms.spec.in @@ -27,7 +27,7 @@ Version: @RPMVERSION@ %if %using_buildservice Release: @RELEASE_PREFIX@<RELEASE> %else -%define kernel_source_release %(LC_ALL=C rpm -q kernel-source%variant-%version --qf "%{RELEASE}" | grep -v 'not installed' || echo 0) +%define kernel_source_release %(LC_ALL=C rpm -q kernel-devel%variant-%version --qf "%{RELEASE}" | grep -v 'not installed' || echo 0) Release: %kernel_source_release %endif License: GPL v2 only @@ -38,7 +38,7 @@ BuildRequires: coreutils @REQUIRES@ Provides: multiversion(kernel) Source: README.KSYMS -Requires: kernel-source%variant = %version-%source_rel +Requires: kernel-devel%variant = %version-%source_rel BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: @ARCHS@ Prefix: /usr/src -- 1.6.6.1 -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On 5.2.2010 22:44, Jan Engelhardt wrote:
Greetings.
The following is a submission to reduce the number of files that will be installed when one wants to compile kernel modules, offering saving both in time and space. Disks are touted as cheap, but let's face it, spending ~340 MB for kernel sources means you have 340 less for your personal files. The time savings should be obvious too: less files to install, and also less files to index — locatedb, quota, beagle/etc., you name it. This is especially beneficial for developers and OBS or OBS-like instances where packages are not only built in random order(*), but where the chroots are usually torn down everytime.
...
This modification has been tested with various kinds of free and non-free packages and kernel versions already. The latter is especially important because they are the most likely ones to break because of their awkward-to-horrid Makefiles. These have been made available for a long time already at jftp.medozas.de; the list includes at least:
fglrx-kmp-default-8.681~2.6.31.11~jen93-jen0.x86_64.rpm ndiswrapper-kmp-default-1.55~2.6.31.11~jen93-3.4.jen2.x86_64.rpm nvidiagfx-kmp-default-190.53~2.6.31.11~jen93-jen8.x86_64.rpm nvidiagfx-legacy173-kmp-default-173.14.22~2.6.31.11~jen93-jen8.x86_64.rpm nvidiagfx-legacy71-kmp-default-71.86.11~2.6.31.11~jen93-jen8.x86_64.rpm nvidiagfx-legacy96-kmp-default-96.43.14~2.6.31.11~jen93-jen8.x86_64.rpm ttyrpld-kmp-default-2.60~2.6.31.11~jen93-jen4.x86_64.rpm virtualbox-modules-kmp-default-3.1.2_56127~2.6.31.12~jen93-jen0.x86_64.rpm vmware-modules-kmp-default-6.5.3~185404~2.6.31.12~jen93-jen3.x86_64.rpm xtables-addons-kmp-default-1.22~2.6.31.12~jen93-jen0.x86_64.rpm
It was also tested with 2.6.32 and — since somebody decided out of the blue to rebase last week :-) — just now with .33-rc6 too.
The resulting kernel-devel package is 10x smaller in installed size and has roughly 3x fewer files.
Thanks. I uploaded a kernel package with your changes to https://build.opensuse.org/project/show?project=home%3Amichal-m%3Akernel-spl... , which called for one minor fix (http://gitorious.org/~mmarek/opensuse/split-kernel-source/commit/a9016712). If it goes well otherwise, I'll push this to the main repo. Michal -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Thursday 2010-02-18 14:31, Michal Marek wrote:
Thanks. I uploaded a kernel package with your changes to https://build.opensuse.org/project/show?project=home%3Amichal-m%3Akernel-spl... , which called for one minor fix (http://gitorious.org/~mmarek/opensuse/split-kernel-source/commit/a9016712). If it goes well otherwise, I'll push this to the main repo.
In the meantime a number of minor issues popped up while (re)building the kernel package over and over together with other packages of openSUSE, so I will want to prepare a new submission with those fixes included. Please await. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Thursday 2010-02-18 15:09, Jan Engelhardt wrote:
On Thursday 2010-02-18 14:31, Michal Marek wrote:
Thanks. I uploaded a kernel package with your changes to https://build.opensuse.org/project/show?project=home%3Amichal-m%3Akernel-spl... , which called for one minor fix (http://gitorious.org/~mmarek/opensuse/split-kernel-source/commit/a9016712). If it goes well otherwise, I'll push this to the main repo.
In the meantime a number of minor issues popped up while (re)building the kernel package over and over together with other packages of openSUSE, so I will want to prepare a new submission with those fixes included. Please await.
The following changes since commit 854e9885f3f36a709209291908c7b93be26c2780: Michal Marek (1): - rpm/kabi.pl: Do not print harmless kabi changes by default. are available in the git repository at: git://dev.medozas.de/suse-kernel master Jan Engelhardt (5): misc: use proper tar options kernel-source: use more macros kernel-source: split devel files and full-source Add sparc64 configuration specs: use %_smp_mflags config.conf | 2 + config/sparc64/default | 4250 +++++++++++++++++++++++++++++++++++++++++++ doc/README.SUSE | 4 +- kernel-source.changes | 9 + rpm/compute-PATCHVERSION.sh | 2 +- rpm/group-source-files.sh | 33 + rpm/kernel-binary.spec.in | 33 +- rpm/kernel-docs.spec.in | 6 +- rpm/kernel-source.spec.in | 68 +- rpm/kernel-syms.spec.in | 4 +- rpm/source-postdevel.sh | 13 + scripts/tar-up.sh | 2 +- 12 files changed, 4392 insertions(+), 34 deletions(-) create mode 100644 config/sparc64/default create mode 100755 rpm/group-source-files.sh create mode 100755 rpm/source-postdevel.sh -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On 23.2.2010 21:55, Jan Engelhardt wrote:
On Thursday 2010-02-18 15:09, Jan Engelhardt wrote:
On Thursday 2010-02-18 14:31, Michal Marek wrote:
Thanks. I uploaded a kernel package with your changes to https://build.opensuse.org/project/show?project=home%3Amichal-m%3Akernel-spl... , which called for one minor fix (http://gitorious.org/~mmarek/opensuse/split-kernel-source/commit/a9016712). If it goes well otherwise, I'll push this to the main repo.
In the meantime a number of minor issues popped up while (re)building the kernel package over and over together with other packages of openSUSE, so I will want to prepare a new submission with those fixes included. Please await.
The following changes since commit 854e9885f3f36a709209291908c7b93be26c2780: Michal Marek (1): - rpm/kabi.pl: Do not print harmless kabi changes by default.
are available in the git repository at:
git://dev.medozas.de/suse-kernel master
Minor nitpic: please stick to one kernel-source.changes per commit, the changes you made are independent of each other (and according to git log you made them within one month timespan), so there is no need to stuff then into one entry.
Jan Engelhardt (5): misc: use proper tar options kernel-source: use more macros
OK.
kernel-source: split devel files and full-source
Why are you creating a separate /usr/src/linux-src directory? Is it not possible to continue installing everything into /usr/src/linux and just split the files between kernel-source and kernel-devel? People usually expect that the full kernel source is in /usr/src/linux.
Add sparc64 configuration
OK.
specs: use %_smp_mflags
Hmm, this however completely ignores the --jobs parameter of the build script: $ rpm --define 'jobs 10' --eval '-j%jobs vs %_smp_mflags' -j10 vs -j2 This is a dual-core machine, but with icecream set up that has a plenty of idle hosts available. So until the rpm macro is updated to take %jobs into account or the build script is updated to also override %_smp_mflags, I'm not convinced by this change. Thanks, Michal -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Wednesday 2010-02-24 11:37, Michal Marek wrote:
kernel-source: split devel files and full-source
Why are you creating a separate /usr/src/linux-src directory? Is it not possible to continue installing everything into /usr/src/linux and just split the files between kernel-source and kernel-devel? People usually expect that the full kernel source is in /usr/src/linux.
No. Putting the source into the same spot as devel packages is the root reason that people are able to trash their KMP building environment. And I opted to leave the devel part in /usr/src/linux because more specfiles and Makefiles depend on it. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On 24.2.2010 11:46, Jan Engelhardt wrote:
On Wednesday 2010-02-24 11:37, Michal Marek wrote:
kernel-source: split devel files and full-source
Why are you creating a separate /usr/src/linux-src directory? Is it not possible to continue installing everything into /usr/src/linux and just split the files between kernel-source and kernel-devel? People usually expect that the full kernel source is in /usr/src/linux.
No. Putting the source into the same spot as devel packages is the root reason that people are able to trash their KMP building environment.
I see, people who compile their kernel as root in /usr/src/linux directly break the /usr/src/linux-obj/... builddirs. But I would argue that people who do the above and people who build KMPs are two almost distinct groups :).
And I opted to leave the devel part in /usr/src/linux because more specfiles and Makefiles depend on it.
Yes, but then many people "depend" on the /usr/src/linux location to contain full sources of the kernel (I can imagine the bugreports and blog posts complaining that the evil SUSE moved away the kernel sources for no good reason...). Could you please post a patch that only splits the files between kernel-source and kernel-devel, so that we can handle the /usr/src/linux -> /usr/src/linux-src move separately? Thanks! Michal -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Wednesday 2010-02-24 13:50, Michal Marek wrote:
Why are you creating a separate /usr/src/linux-src directory? Is it not possible to continue installing everything into /usr/src/linux and just split the files between kernel-source and kernel-devel? People usually expect that the full kernel source is in /usr/src/linux.
No. Putting the source into the same spot as devel packages is the root reason that people are able to trash their KMP building environment.
I see, people who compile their kernel as root in /usr/src/linux directly break the /usr/src/linux-obj/... builddirs. But I would argue that people who do the above and people who build KMPs are two almost distinct groups :)
Not quite. Let's say they just start compilation in /usr/src/linux, but then go on using the regular kernel and then decide to build some module. There it goes boom.
And I opted to leave the devel part in /usr/src/linux because more specfiles and Makefiles depend on it.
Yes, but then many people "depend" on the /usr/src/linux location to contain full sources of the kernel (I can imagine the bugreports and blog posts complaining that the evil SUSE moved away the kernel sources for no good reason...).
/usr/src/linux was deprecated as a global location years ago by upstream. Remember symlinking /usr/include/linux to /usr/src/linux/include? Gone. I guess the *only* reason why /usr/src/linux is still used today is: 1. frankly we could not come up with a better location ;-) 2. it's only the kmp macro that still needs it (Requires a location without %version it. Shipped Makefiles can and should default to /lib/modules/$(shell uname -r)/build in any case.) Why do people depend on it? Why do they need it? Compile tests to see if something is CONFIG_xyz=y can be done without the full source. I know VMware survives the proposed split layout. So does fglrx -- given that proprietary stuff usually has a primary market share on the worst Makefiles. All this dependency on source has been noticed ages ago. Heck, iptables even ships the *headers* for itself because it can't even be sure they exist in /usr/include/linux. (But that's just sort of a special userspace case.) Those packages which still rely on source need to finally get the grip and move their a.b.code forward. (N.B.: I am talking about upstream in general. The decision to make 'kernel-docs' and 'perf' copying off kernel-source is an openSUSE-specific decision.) -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Thursday 2010-02-25 02:35, Jan Engelhardt wrote:
On Wednesday 2010-02-24 13:50, Michal Marek wrote:
Why are you creating a separate /usr/src/linux-src directory? Is it not possible to continue installing everything into /usr/src/linux and just split the files between kernel-source and kernel-devel? People usually expect that the full kernel source is in /usr/src/linux.
No. Putting the source into the same spot as devel packages is the root reason that people are able to trash their KMP building environment.
I see, people who compile their kernel as root in /usr/src/linux directly break the /usr/src/linux-obj/... builddirs. But I would argue that people who do the above and people who build KMPs are two almost distinct groups :)
Not quite. Let's say they just start compilation in /usr/src/linux, but then go on using the regular kernel and then decide to build some module. There it goes boom.
And I opted to leave the devel part in /usr/src/linux because more specfiles and Makefiles depend on it.
Yes, but then many people "depend" on the /usr/src/linux location to contain full sources of the kernel
Again, I see no reason for this dependence; it is a result of projects with flawed design. I thus urge you to pick all of the five patches to flag up these broken packages. The following changes since commit 91092a59187c5c673c6e70e19012dafc35f6074b: Tony Jones (1): - patches.trace/powerpc-rename-irq-tracing: should have been deleted by previous commit are available in the git repository at: git://dev.medozas.de/suse-kernel master Jan Engelhardt (5): misc: use proper tar options kernel-source: use more macros Add sparc64 configuration kernel-source: split source and devel into two packages kernel-source: split location of files config.conf | 2 + config/sparc64/default | 4250 +++++++++++++++++++++++++++++++++++++++++++ doc/README.SUSE | 4 +- kernel-source.changes | 30 + rpm/compute-PATCHVERSION.sh | 2 +- rpm/group-source-files.pl | 67 + rpm/kernel-binary.spec.in | 20 +- rpm/kernel-docs.spec.in | 6 +- rpm/kernel-source.spec.in | 71 +- rpm/kernel-syms.spec.in | 4 +- rpm/source-postdevel.sh | 13 + scripts/tar-up.sh | 2 +- 12 files changed, 4446 insertions(+), 25 deletions(-) create mode 100644 config/sparc64/default create mode 100755 rpm/group-source-files.pl create mode 100755 rpm/source-postdevel.sh -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On 4.3.2010 11:34, Jan Engelhardt wrote:
On Thursday 2010-02-25 02:35, Jan Engelhardt wrote:
On Wednesday 2010-02-24 13:50, Michal Marek wrote:
I see, people who compile their kernel as root in /usr/src/linux directly break the /usr/src/linux-obj/... builddirs. But I would argue that people who do the above and people who build KMPs are two almost distinct groups :)
Not quite. Let's say they just start compilation in /usr/src/linux, but then go on using the regular kernel and then decide to build some module. There it goes boom.
And I opted to leave the devel part in /usr/src/linux because more specfiles and Makefiles depend on it.
Yes, but then many people "depend" on the /usr/src/linux location to contain full sources of the kernel
Again, I see no reason for this dependence; it is a result of projects with flawed design. I thus urge you to pick all of the five patches to flag up these broken packages.
Hi Jan, I merged the branch (commit 54e2592), but I reverted the /usr/src/linux -> /usr/src/linux-src move. I agree that it would make it harder for users to shoot themselves in the foot, but the costs are 1) bugreports / complaints from users who can't find their kernel source 2) duplication both on the media and in the installed system 3) some packages rebuild files from /usr/src/linux/, OK, these can be easily fixed. 1) is what worries me most, but I guess coolo would not be all that happy about an additional 7MB package on the DVD. Michal -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Wednesday 2010-02-24 11:37, Michal Marek wrote:
are available in the git repository at:
git://dev.medozas.de/suse-kernel master
Minor nitpic: please stick to one kernel-source.changes per commit, the changes you made are independent of each other (and according to git log you made them within one month timespan), so there is no need to stuff then into one entry.
specs: use %_smp_mflags
Hmm, this however completely ignores the --jobs parameter of the build script: $ rpm --define 'jobs 10' --eval '-j%jobs vs %_smp_mflags' -j10 vs -j2 This is a dual-core machine, but with icecream set up that has a plenty of idle hosts available. So until the rpm macro is updated to take %jobs into account or the build script is updated to also override %_smp_mflags, I'm not convinced by this change.
Changed accordingly now: The following changes since commit 854e9885f3f36a709209291908c7b93be26c2780: Michal Marek (1): - rpm/kabi.pl: Do not print harmless kabi changes by default. are available in the git repository at: git://dev.medozas.de/suse-kernel master Jan Engelhardt (4): misc: use proper tar options kernel-source: use more macros kernel-source: split devel files and full-source Add sparc64 configuration config.conf | 2 + config/sparc64/default | 4250 +++++++++++++++++++++++++++++++++++++++++++ doc/README.SUSE | 4 +- kernel-source.changes | 23 + rpm/compute-PATCHVERSION.sh | 2 +- rpm/group-source-files.sh | 33 + rpm/kernel-binary.spec.in | 18 +- rpm/kernel-docs.spec.in | 6 +- rpm/kernel-source.spec.in | 68 +- rpm/kernel-syms.spec.in | 4 +- rpm/source-postdevel.sh | 13 + scripts/tar-up.sh | 2 +- 12 files changed, 4404 insertions(+), 21 deletions(-) create mode 100644 config/sparc64/default create mode 100755 rpm/group-source-files.sh create mode 100755 rpm/source-postdevel.sh -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
participants (3)
-
Jan Engelhardt
-
Jean Delvare
-
Michal Marek