[opensuse-kernel] Bashing my head against the desk re kernel-flavors
I can't take it anymore. Development on a new kernel flavor is just so complicated and rife with little things to "take care of" which are simply hindering development and making life a misery of little mistakes, and forgetful actions, and even when something comes out right, building an RPM includes untarring 250MB of source code just to tell me the config is bad within the first 4 files compiled or so. The one thing that is really tiring me, though, is the layout of /usr/src/packages. In the way SUSE has it, kernel-source, kernel-flavor and every other thing installed from an SRPM install into exactly the same directory. This has some effects that are annoying me to some degree I am not comfortable with 1) broken packages which maintainers are unwilling to fix which blithely untar every *.tar.bz2 in /usr/src/packages/SOURCES (xorg-x11-libs!) 2) kernel-source, kernel-flavor SRPMS overwrite each other if they are installed. ARGH! 3) kernel-flavor .spec file is actually in SOURCES and not SPECS when it gets installed. WHAT? I really need to know, what kind of design decision is it that all RPMs get dumped into the same directory? Now, in a sane system like the /usr/share/doc/packages directory each package has it's basename in there. Each package is separate and self-contained. Docs for one do not go in the folder for docs for another.. :) Why was this never brought across to RPM builds? Is it because people are used to using build chroots and so on? Even in that scenario building a source RPM sort of requires the whole shebang to be in place right? What am I doing wrong here and how can I stop using /usr/src/packages for RPM development, and if this IS possible AND recommended, why does this method still even exist? If not doing anything wrong, why on earth can't we split RPM sources into their own package directories in /usr/src/packages like /usr/src/packages/kernel-source /usr/src/packages/kernel-whatever (yes of course it will duplicate files with the above but it's all compressed) /usr/src/packages/xorg-x11-libs etc.? -- Matt Sealey, Genesi, Manager Developer Relations -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
Matt Sealey wrote:
I can't take it anymore. Development on a new kernel flavor is just so complicated and rife with little things to "take care of" which are simply hindering development and making life a misery of little mistakes, and forgetful actions, and even when something comes out right, building an RPM includes untarring 250MB of source code just to tell me the config is bad within the first 4 files compiled or so.
Try the attached spec files as a base instead. kernel-source should work fine without alteration. kernel-default just needs the build_flavor macro changed to whatever you want to call it. These spec files, or something close to them, are going to be used in the next release.
The one thing that is really tiring me, though, is the layout of /usr/src/packages.
[snipped]
If not doing anything wrong, why on earth can't we split RPM sources into their own package directories in /usr/src/packages like
/usr/src/packages/kernel-source /usr/src/packages/kernel-whatever (yes of course it will duplicate files with the above but it's all compressed) /usr/src/packages/xorg-x11-libs
On my system, I use the following ~/.rpmmacros: %_sourcedir /home/jeffm/src/packages/%{name} %_specdir /home/jeffm/src/packages/%{name} %_builddir /home/jeffm/src/packages/BUILD This is an RPM thing, not a kernel package thing. Your best bet is to file a bug report. It should be easy to change the macros in /usr/lib/rpm/macros to something else - but that's not a decision the kernel teams make. -Jeff -- Jeff Mahoney SUSE Labs # # spec file for package kernel-default (Version 2.6.29) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild %define using_buildservice 0%{?opensuse_bs} %define variant %if %using_buildservice # Strip off the build number ("y") from the "x.y" release number %define source_rel %(release=%release; echo ${release%.*}) %else # We don't have build numbers internally %define source_rel %release %endif # Don't use shell commands in build macros, this won't work outside of rpm %define build_flavor default %define build_kdump 0 %define build_xen 0 %define build_vanilla 0 %define build_ps3 0 %define srcversion 2.6.28 %define patchversion 2.6.29-rc1 # This works fine, but the build service won't expand it for security reasons #%define variant %(case %build_flavor in (rt|rt_*) echo -rt ;; (vanilla) echo -vanilla ;; esac) %if %{build_flavor} == "kdump" %define build_kdump 1 %endif %if %{build_flavor} == "xen" %define build_xen 1 %endif %if %{build_flavor} == "vanilla" %define build_vanilla 1 %endif %if %{build_flavor} == "ps3" %define build_ps3 1 %endif %(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,modversions,symsets.pl}) %define arch_symbols %(%_sourcedir/arch-symbols %_target_cpu) %define symbols %(set -- %name kernel-%build_flavor $(case %build_flavor in (rt|rt_*) echo RT ;; esac) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) %define cpu_arch_flavor %(%_sourcedir/guards %symbols %arch_symbols < %_sourcedir/config.conf | grep '/%build_flavor$') # Define some CONFIG variables as rpm macros as well. (rpm cannot handle # defining them all at once.) %define config_vars CONFIG_MODULES %{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)} %ifarch %ix86 x86_64 %define install_vdso 1 %else %define install_vdso 0 %endif %if %build_vanilla || %build_kdump || %CONFIG_MODULES != "y" %define split_packages 0 %else %define split_packages 1 %endif Name: kernel-%build_flavor Summary: Dummy summary Version: 2.6.29 %if %using_buildservice Release: rc1.<RELEASE> BuildRequires: kernel-source %else %define kernel_source_release %(rpm -q kernel-source%variant-%version --qf "%{RELEASE}") Release: %kernel_source_release BuildRequires: kernel-source%variant = %version-%kernel_source_release %endif License: GPL Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on BuildRequires: coreutils module-init-tools sparse BuildRequires: fdupes Provides: %{name}_%_target_cpu = %version-%release %if %split_packages Requires: %name-base_%_target_cpu = %version-%release %endif Requires(pre): coreutils awk Requires(post): module-init-tools # This Requires is wrong, because the post/postun scripts have a # test -x update-bootloader, having perl-Bootloader is not a hard requirement. # But, there is no way to tell rpm or yast to schedule the installation # of perl-Bootloader before kernel-binary.rpm if both are in the list of # packages to install/update. Likewise, this is true for mkinitrd. # A specific version of perl-Bootloader is not required, because the post/postun # scripts handle the two API versions of 10.1/SLES10 GA and 10.2/SLES10 SP1 Requires(post): perl-Bootloader Requires(post): mkinitrd #!BuildIgnore: perl-Bootloader mkinitrd %if ! %using_buildservice BuildRequires: kernel-dummy %endif %ifarch ia64 # arch/ia64/scripts/unwcheck.py BuildRequires: python %endif %ifarch s390 s390x BuildRequires: dwarfextract %endif %if %build_xen %ifarch %ix86 Provides: kernel-xenpae = %version Obsoletes: kernel-xenpae <= %version %endif #!BuildIgnore: xen %endif Provides: %name-nongpl Obsoletes: %name-nongpl %if %build_vanilla # force bzip2 instead of lzma compression to allow install on older dist versions %define _binary_payload w9.bzdio %endif # dead network if installed on SLES10, otherwise it will work (mostly) Conflicts: sysfsutils < 2.0 %if ! %build_vanilla Conflicts: apparmor-profiles <= 2.1 Conflicts: apparmor-parser < 2.3 # root-lvm only works with newer udevs Conflicts: udev < 118 Conflicts: lvm2 < 2.02.33 %endif %ifarch %ix86 Conflicts: libc.so.6()(64bit) %endif Provides: kernel = %version-%source_rel %ifarch %ix86 Provides: k_athlon k_debug k_deflt k_deflt_22 k_deflt_24 k_eide k_laptop k_orig k_pentiu k_pos_ibm k_psmp k_smp k_smp_22 k_smp_24 smp kernel-smp Obsoletes: k_athlon k_debug k_deflt k_deflt_22 k_deflt_24 k_eide k_laptop k_orig k_pentiu k_pos_ibm k_psmp k_smp k_smp_22 k_smp_24 smp kernel-smp %else %ifarch ia64 Provides: k_debug k_deflt k_itanium2 k_itanium2-smp k_smp kernel-sn2 Obsoletes: k_debug k_deflt k_itanium2 k_itanium2-smp k_smp kernel-sn2 %else %ifarch ppc Provides: k_chrp k_chrps k_deflt k_pmac k_pmacs k_prep k_preps Obsoletes: k_chrp k_chrps k_deflt k_pmac k_pmacs k_prep k_preps %else %ifarch ppc64 %else %ifarch s390x Provides: kernel-64bit k_deflt Obsoletes: kernel-64bit k_deflt %else %ifarch x86_64 Provides: k_deflt k_numa k_smp smp kernel-smp Obsoletes: k_deflt k_numa k_smp smp kernel-smp %endif %endif %endif %endif %endif %endif Source10: preun.sh Source11: postun.sh Source12: pre.sh Source13: post.sh Source20: series.conf Source21: config.conf Source22: supported.conf Source30: arch-symbols Source31: guards Source32: config-subst Source33: check-for-config-changes Source34: check-supported-list Source40: build-source-timestamp Source41: built-in-where Source44: find-provides Source45: module-renames Source46: modversions Source47: symsets.pl Source100: config.tar.bz2 Source101: kabi.tar.bz2 %define my_builddir %_builddir/%{name}-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: %ix86 ia64 ppc ppc64 s390x x86_64 # These files are found in the kernel-source package: NoSource: 100 NoSource: 101 # The following KMPs have been integrated into the kernel package. Obsoletes: iwlwifi-kmp Obsoletes: ipw3945-kmp Obsoletes: adm8211-kmp Obsoletes: rt2x00-kmp Obsoletes: rfswitch-kmp Obsoletes: uvcvideo-kmp Obsoletes: atl2-kmp Obsoletes: wlan-ng-kmp Obsoletes: et131x-kmp Obsoletes: ivtv-kmp Obsoletes: at76_usb-kmp Obsoletes: pcc-acpi-kmp Obsoletes: uvcvideo-kmp Obsoletes: ralink-rt2860-kmp # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash # Provide the exported symbols as "ksym(symbol) = hash" %define __find_provides %my_builddir/find-provides %name # Will modules not listed in supported.conf abort the kernel build (0/1)? %define supported_modules_check 0 %define tolerate_unknown_new_config_options 0 # kABI change tolerance (default in maintenance should be 4, 6, 8 or 15, # 31 is the maximum; see scripts/kabi-checks) %define tolerate_kabi_changes 31 %description Dummy description. %prep %setup -q -c -T -a 100 -a 101 supported_conf() { %_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u } # Generate the list of modules to be marked as supported { supported_conf base for how in external; do comm -2 -3 <(supported_conf base $how) <(supported_conf base) \ | sed -e 's:$: '"$how"':' done } | sed -e 's,.*/,,' -e 's,\.ko$,,' > %my_builddir/Module.supported # Create grep pattern file for the modules to end up in the base package comm -2 -3 <(supported_conf base) <(supported_conf) \ | sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \ > %my_builddir/grep-for-base-modules # Release number without the EXTRAVERSION RELEASE=%source_rel while [ "$RELEASE" != "${RELEASE#[^0-9]*.}" ]; do RELEASE=${RELEASE#[^0-9]*.} done if [ -f %_sourcedir/localversion ] ; then cat %_sourcedir/localversion > %my_builddir/localversion fi KERNELRELEASE="%patchversion-$RELEASE-%build_flavor" SRCDIR="/usr/src/linux-%patchversion-$RELEASE%variant" BUILDDIR="%buildroot$SRCDIR-obj/%cpu_arch_flavor" mkdir -p "$BUILDDIR" cat config/%cpu_arch_flavor \ | %_sourcedir/config-subst CONFIG_LOCALVERSION '"'-$RELEASE-%build_flavor'"' \ | %_sourcedir/config-subst CONFIG_SUSE_KERNEL y \ %if 0%{?__debug_package:1} | %_sourcedir/config-subst CONFIG_DEBUG_INFO y \ %endif > %my_builddir/.config cpu_arch_flavor="%cpu_arch_flavor" cat >> .rpm-defs <<EOF cpu_arch=${cpu_arch_flavor%/*} KERNELRELEASE="$KERNELRELEASE" BUILDDIR="$BUILDDIR" SRCDIR="$SRCDIR" EOF %if 0%{?__debug_package:1} cat >> .rpm-defs <<EOF MAKE_ARGS="\$MAKE_ARGS CONFIG_DEBUG_INFO=y" EOF %endif echo CONFIG_MODULES=%CONFIG_MODULES >> .rpm-defs sed 's:^sourcedir=.*:sourcedir="%_sourcedir":; s:^builddir=.*:builddir="%my_builddir":' \ %_sourcedir/find-provides >%my_builddir/find-provides chmod +x %my_builddir/find-provides %build source .rpm-defs mkdir -p $BUILDDIR cd $BUILDDIR cp %my_builddir/.config %my_builddir/Module.supported . MAKE_ARGS="$MAKE_ARGS -C $SRCDIR O=$PWD" %if %{tolerate_unknown_new_config_options} MAKE_ARGS="$MAKE_ARGS -k " yes '' | make oldconfig $MAKE_ARGS %else make silentoldconfig $MAKE_ARGS < /dev/null %_sourcedir/check-for-config-changes %my_builddir/.config .config rm -f %my_builddir/.config %endif make prepare $MAKE_ARGS krel=$(make -s kernelrelease $MAKE_ARGS) if [ "$krel" != "$KERNELRELEASE" ]; then echo "Kernel release mismatch: $krel != $KERNELRELEASE" >&2 exit 1 fi cat > .kernel-binary.spec.buildenv <<EOF # Override the timestamp 'uname -v' reports with the build # timestamp. export KBUILD_BUILD_VERSION="$(grep SHA1_ID %_sourcedir/build-source-timestamp | awk '{ print $2 }')" export KBUILD_BUILD_TIMESTAMP="$(head -n 1 %_sourcedir/build-source-timestamp)" # The following branch/timestamp will end up in Oopses. export OOPS_TIMESTAMP="$( echo -n $(sed -ne 's/^GIT Branch: \(.*\)/\1-/p' \ %_sourcedir/build-source-timestamp) head -n 1 %_sourcedir/build-source-timestamp \ | tr -dc 0-9)" export KBUILD_VERBOSE=0 export KBUILD_SYMTYPES=1 EOF source .kernel-binary.spec.buildenv %ifarch s390x %if ! %build_vanilla [ -f scripts/kmsg-doc] && chmod +x scripts/kmsg-doc make %{?jobs:-j%jobs} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y D=2 %else make %{?jobs:-j%jobs} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y %endif %else make %{?jobs:-j%jobs} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y %endif %install source .rpm-defs # get rid of /usr/lib/rpm/brp-strip-debug # strip removes too much from the vmlinux ELF binary export NO_BRP_STRIP_DEBUG=true # /lib/modules/$KERNELRELEASE/build will be a stale symlink until the # kernel-source package is installed. Don't check for stale symlinks # in the brp-symlink check: export NO_BRP_STALE_LINK_ERROR=yes cd $BUILDDIR mkdir -p %buildroot/boot # (Could strip out non-public symbols.) cp -p System.map %buildroot/boot/System.map-$KERNELRELEASE add_vmlinux() { local vmlinux=boot/vmlinux-$KERNELRELEASE %if 0%{?__debug_package:1} local vmlinux_debug=usr/lib/debug/$vmlinux.debug mkdir -p $(dirname %buildroot/$vmlinux_debug) cp vmlinux %buildroot/$vmlinux /usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \ -l vmlinux.sourcefiles %buildroot/$vmlinux objcopy --only-keep-debug \ %buildroot/$vmlinux \ %buildroot/$vmlinux_debug || : objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \ --strip-debug \ %buildroot/$vmlinux || : mkdir -p %buildroot/usr/src/debug LANG=C sort -z -u vmlinux.sourcefiles | grep -z -v "<built-in>" \ | ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug ) find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755 find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644 %else cp vmlinux %buildroot/$vmlinux %endif if [ "$1" = --compressed ]; then gzip -9 %buildroot/$vmlinux chmod a-x %buildroot/$vmlinux.gz fi } %if %build_kdump add_vmlinux chmod 644 %buildroot/boot/vmlinux-$KERNELRELEASE image=vmlinux %else # architecture specifics %ifarch %ix86 x86_64 add_vmlinux --compressed %if %build_xen image=vmlinuz %else image=bzImage %endif cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-$KERNELRELEASE image=vmlinuz %endif %ifarch alpha add_vmlinux --compressed cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-$KERNELRELEASE image=vmlinuz %endif %ifarch ppc ppc64 add_vmlinux chmod 644 %buildroot/boot/vmlinux-$KERNELRELEASE image=vmlinux %endif %ifarch ia64 add_vmlinux --compressed mv %buildroot/boot/vmlinux-$KERNELRELEASE.gz \ %buildroot/boot/vmlinuz-$KERNELRELEASE image=vmlinuz %endif %ifarch s390 s390x add_vmlinux --compressed cp -p arch/s390/boot/image %buildroot/boot/image-$KERNELRELEASE image=image if [ -x "$(which dwarfextract 2>/dev/null)" ] ; then dwarfextract vmlinux %buildroot/boot/Kerntypes-$KERNELRELEASE fi %if ! %build_vanilla mkdir -p %buildroot/usr/share/man/man9 [ -d man ] && find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';' %endif %endif if [ -e init/kerntypes.o ]; then cp init/kerntypes.o %buildroot/boot/Kerntypes-$KERNELRELEASE fi # end of build_kdump %endif for sub in '-base' '' '-extra'; do %if %split_packages if [ "x$sub" = "x-base" ]; then base_package=1 else base_package=0 fi %else base_package=1 %endif for script in preun postun pre post; do sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@IMAGE@:$image:g" \ -e "s:@FLAVOR""@:%build_flavor:g" \ -e "s:@SUBPACKAGE@:%name$sub:g" \ -e "s:@BASE_PACKAGE@:$base_package:g" \ -e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \ -e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \ %_sourcedir/$script.sh > %my_builddir/$script$sub.sh done done %if %build_kdump || %build_xen || %build_vanilla || %build_ps3 # keep this -suffix list in sync with post.sh and postun.sh suffix=-%build_flavor %endif ln -s $image$suffix %buildroot/boot/$image$suffix ln -s initrd$suffix %buildroot/boot/initrd$suffix cp .config %buildroot/boot/config-$KERNELRELEASE %if %install_vdso # Install the unstripped vdso's that are linked in the kernel image make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot %endif # Create a dummy initrd with roughly the size the real one will have. # That way, YaST will know that this package requires some additional # space in /boot. dd if=/dev/zero of=%buildroot/boot/initrd-$KERNELRELEASE \ bs=1024 seek=2047 count=1 if [ $CONFIG_MODULES = y ]; then # Figure out where the symbols that vmlinux exports are defined. # (We need this information below as well as in find-provides; we "annotate" # the original Module.symvers here to make sure that we are consistent in # both places.) %_sourcedir/built-in-where < Module.symvers > Module.symvers.split mv Module.symvers.split Module.symvers gzip -c9 < Module.symvers > %buildroot/boot/symvers-$KERNELRELEASE.gz make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot if ! %_sourcedir/check-supported-list \ %_sourcedir %buildroot/lib/modules/$KERNELRELEASE; then %if %supported_modules_check exit 1 %endif echo "Consistency check error: please update supported.conf." fi %ifarch s390 s390x if [ -x "$(which dwarfextract 2>/dev/null)" -a \ -f %buildroot/boot/Kerntypes-$KERNELRELEASE ] ; then find %buildroot -name "*.ko" > kofiles.list dwarfextract %buildroot/boot/Kerntypes-$KERNELRELEASE -C kofiles.list fi %endif # Also put the resulting file in $obj_dir/$cpu_arch/%build_flavor # so that kernel-source%variant + kernel-%build_flavor is sufficient # for building modules that have modversions as well. obj_dir=usr/src/linux-${KERNELRELEASE%%-%build_flavor}%variant-obj # Table of types used in exported symbols (for modversion debugging). %_sourcedir/modversions --pack . > %buildroot/boot/symtypes-$KERNELRELEASE if [ -s %buildroot/boot/symtypes-$KERNELRELEASE ]; then gzip -9 %buildroot/boot/symtypes-$KERNELRELEASE else rm -f %buildroot/boot/symtypes-$KERNELRELEASE fi # Some architecture's $(uname -m) output is different from the ARCH # parameter that needs to be passed to kbuild. Create symlinks from # $(uname -m) to the ARCH directory. [ -e %buildroot/$obj_dir/%_target_cpu ] \ || ln -sf $cpu_arch %buildroot/$obj_dir/%_target_cpu # We were building in %my_builddir/linux-%srcversion, but the sources will # later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the # build symlink. rm -f %buildroot/lib/modules/$KERNELRELEASE/{source,build} ln -s /usr/src/linux-${KERNELRELEASE%%-%build_flavor} \ %buildroot/lib/modules/$KERNELRELEASE/source ln -s /$obj_dir/$cpu_arch/%build_flavor \ %buildroot/lib/modules/$KERNELRELEASE/build # Abort if there are any undefined symbols msg="$(/sbin/depmod -F %buildroot/boot/System.map-$KERNELRELEASE \ -b %buildroot -ae $KERNELRELEASE 2>&1)" if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then exit 1 fi %if %split_packages # Generate the lists of supported and unsupported modules. ( cd %buildroot : > %my_builddir/supported-modules : > %my_builddir/unsupported-modules for module in $(find lib/modules/$KERNELRELEASE -type f -name '*.ko'); do case "$(/sbin/modinfo -F supported $module)" in (yes|external) modname=$(basename $module .ko) deps=$(/sbin/modinfo -F depends $module|tr ',' ' ') echo "$modname: $deps" >> %my_builddir/Makefile.supported echo "/$module" >> %my_builddir/supported-modules ;; (*) echo "/$module" >> %my_builddir/unsupported-modules ;; esac done ) add_dependent_modules() { local modules_dep=$1 xargs make -rRs -f <(echo -e '%:\n\t@echo $@' ; cat $modules_dep) } modules_dep=%buildroot/lib/modules/$KERNELRELEASE/modules.dep # Make sure that no supported modules depend on any unsupported modules. dependent_unsupported_modules=$( OUT=$(mktemp) sed -e 's/:.*//g' < %my_builddir/Makefile.supported | \ xargs make -rRsk -f %my_builddir/Makefile.supported > $OUT sed -ne '/No rule/s/^.*No rule to make target//p' < $OUT | tr -d "\`'" ) if [ -n "$dependent_unsupported_modules" ]; then echo "The following unsupported modules are used by supported modules:" echo "$dependent_unsupported_modules" echo "Please fix supported.conf." if [ ! -e %_sourcedir/IGNORE-UNSUPPORTED-DEPS ]; then exit 1 fi fi # Compute the list of base modules: modules that core modules depend on # implicitly are also core modules. grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \ | add_dependent_modules $modules_dep > %my_builddir/base-modules # All supported modules which are not core modules belong in %name. comm -3 <(sort %my_builddir/supported-modules) \ <(sort %my_builddir/base-modules) \ | tr -d ' '> %my_builddir/main-modules %else ( cd %buildroot find lib/modules/$KERNELRELEASE -type f -name '*.ko' -printf '/%%p\n' ) > %my_builddir/base-modules %endif # generate symsets mkdir -p %my_builddir/{base,main,extra}-symsets for f in %my_builddir/{base,main,unsupported}-modules; do if [ -f "$f" ]; then sed 's:^/:%buildroot/:' "$f" > "$f-br" fi done reference= if test -d %my_builddir/kabi/$cpu_arch/symsets-%build_flavor; then $reference="--reference=%my_builddir/kabi/$cpu_arch/symsets-%build_flavor" fi %_sourcedir/symsets.pl --generate-symsets \ $reference \ --symvers=Module.symvers \ --modules=%my_builddir/base-modules-br \ --output-dir=%my_builddir/base-symsets %if %split_packages %_sourcedir/symsets.pl --generate-symsets \ $reference \ --modules=%my_builddir/main-modules-br \ --required-modules=%my_builddir/base-modules-br \ --output-dir=%my_builddir/main-symsets %_sourcedir/symsets.pl --generate-symsets \ $reference \ --modules=%my_builddir/unsupported-modules-br \ --required-modules=%my_builddir/base-modules-br \ --required-modules=%my_builddir/main-modules-br \ --output-dir=%my_builddir/extra-symsets %endif # check for kabi changes KABI=0 if [ -n "$reference" ]; then %_sourcedir/symsets.pl --check-kabi \ $reference \ --commonsyms=%my_builddir/kabi/commonsyms \ --usedsyms=%my_builddir/kabi/usedsyms --severities=%my_builddir/kabi/severities \ --max-badness=%tolerate_kabi_changes || KABI=$? fi if [ $KABI -ne 0 ]; then echo "kABI changes of badness $KABI exceed the maximum allowed badness" \ "of %tolerate_kabi_changes. Please try to avoid the kABI changes." if [ ! -e %my_builddir/kabi/$cpu_arch/ignore-%build_flavor -a \ ! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \ "directory to build this kernel even though its badness is" \ "higher than allowed for an official kernel." exit 1 fi # Indicate the ABI badness in build result emails. echo "KABI BADNESS $KABI" > %_rpmdir/%_arch/mbuild_subject.tag fi symsets=%my_builddir/symsets-$KERNELRELEASE mkdir -p $symsets find %my_builddir/{base,main,extra}-symsets -type f \ | xargs --replace='{}' cp '{}' $symsets/ tar c -C ${symsets%/*} ${symsets##*/} \ | gzip -9 \ > %buildroot/boot/symsets-$KERNELRELEASE.tar.gz # Set up some module aliases install -d -m 755 %buildroot/etc/modprobe.d/ install -m 644 %_sourcedir/module-renames %buildroot/etc/modprobe.d/ make clean rm -f source find . -type f -o -type l |sed -e "s,^\.,/$obj_dir/%cpu_arch_flavor," \ > %my_builddir/kernel-devel.files fi add_dirs_to_filelist() { local filelist filelist=$(cat "$@") echo "$filelist" # Below, we do this: # - remove filelist macros # - remove last pathname component # - generate all parents and make the list unique # - skip directories owned be other packages # - add the %dir prefix (double-escaped for find and rpm) echo "$filelist" \ | sed -re 's:%%%%[a-z]+(\([^)]+\))? ?::g' \ | sed -re 's:/[^/]+$::' \ | sed -nre ':a; p; s:/[^/]+$::; ta' \ | sort -u \ | sed -r -e '\:^(|/boot|/etc|/lib(/modules|/firmware)?|/usr(/src)?)$:d' \ | sed -e 's:^:%%%%dir :' } # Collect the file lists. { cd %buildroot cat <<-EOF /boot/initrd-%version-%release-%build_flavor %%%%ghost /boot/initrd /boot/vmlinuz-%version-%release-%build_flavor %%%%ghost /boot/vmlinuz /boot/System.map-%version-%release-%build_flavor EOF # Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that # the file gets removed when uninstalling the kernel. echo '%%%%ghost /boot/initrd-'${KERNELRELEASE}'-kdump' touch $RPM_BUILD_ROOT/boot/initrd-${KERNELRELEASE}-kdump if [ $CONFIG_MODULES = y ]; then find lib/modules/$KERNELRELEASE \ -type d -o \ \( -path '*/modules.*' ! -path '*/modules.order' \) \ -printf '%%%%%%%%ghost /%%p\n' -o \ -name '*.ko' -prune -o \ -printf '/%%p\n' cat %my_builddir/base-modules echo '%%%%config /etc/modprobe.d/module-renames' fi test -d lib/firmware/$KERNELRELEASE && \ find lib/firmware/$KERNELRELEASE \ -type d -o \ -printf '/%%p\n' if [ -e .%_docdir/%name ]; then echo "%%%%doc %_docdir/%name" fi } | add_dirs_to_filelist > %my_builddir/kernel-base.files %if %split_packages add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files %endif # Hardlink duplicate files automatically (from package fdupes): It doesn't save # much, but it keeps rpmlint from breaking the package build. %fdupes $RPM_BUILD_ROOT %preun -f preun.sh %postun -f postun.sh %pre -f pre.sh %post -f post.sh %if %split_packages %files -f kernel-main.files %else %files -f kernel-base.files %endif %defattr(-, root, root) %package base Summary: Base kernel package License: GPL Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on Provides: %name-base_%_target_cpu = %version-%release Requires(pre): coreutils awk Requires(post): module-init-tools Requires(post): perl-Bootloader Requires(post): mkinitrd %ifarch %ix86 Conflicts: libc.so.6()(64bit) %endif %description base Dummy description. %preun base -f preun-base.sh %postun base -f postun-base.sh %pre base -f pre-base.sh %post base -f post-base.sh %if %split_packages %files base -f kernel-base.files %defattr(-, root, root) %endif %package extra Summary: Unsupported kernel modules License: GPL Group: System/Kernel Url: http://www.kernel.org/ AutoReqProv: on Provides: %name-extra_%_target_cpu = %version-%release Requires: %{name}_%_target_cpu = %version-%release Requires(pre): coreutils awk Requires(post): module-init-tools Requires(post): perl-Bootloader Requires(post): mkinitrd Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu) Supplements: packageand(product(openSUSE):%{name}_%_target_cpu) %ifarch %ix86 Conflicts: libc.so.6()(64bit) %endif %description extra Dummy description. %preun extra -f preun-extra.sh %postun extra -f postun-extra.sh %pre extra -f pre-extra.sh %post extra -f post-extra.sh %if %split_packages %files extra -f kernel-extra.files %defattr(-, root, root) %endif %ifarch s390x %if ! %build_vanilla %package man Summary: The collection of man pages generated by the kmsg script. Group: System Environment/Kernel %description man This package includes the man pages that have been generated from the kmsg message documentation comments. %files man %defattr(-,root,root) /usr/share/man/man9/* %endif %endif %package devel Summary: The development environment needed to build KMPs Group: Development/Kernel Requires: kernel-source%variant AutoReqProv: on %description devel Dummy description. %files devel -f kernel-devel.files %defattr(-,root,root) /boot/config-* /boot/symsets-* /boot/symtypes-* /boot/symvers-* /boot/vmlinux-*gz # # spec file for package kernel-source (Version 2.6.29) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild # icecream 0 # FIXME: this check will go before the next release ... %if 0%{?opensuse_bs} # Strip off the build number ("y") from the "x.y" release number %define source_rel %(release=%release; echo ${release%.*}) %else # We don't have build numbers internally %define source_rel %release %endif %define srcversion 2.6.28 %define patchversion 2.6.29-rc1 %define tolerate_unknown_new_config_options 0 Name: kernel-source Summary: Dummy summary Version: 2.6.29 Release: rc1.<RELEASE> License: GPL Group: Development/Sources AutoReqProv: off BuildRequires: coreutils sed BuildRequires: fdupes Requires(post): coreutils sed BuildArchitectures: noarch ExclusiveArch: %ix86 ppc ppc64 s390 s390x ia64 x86_64 Provides: linux Provides: %name = %version-%source_rel Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%srcversion.tar.bz2 Source1: source-post.sh Source2: %name.rpmlintrc Source10: preun.sh Source11: postun.sh Source12: pre.sh Source13: post.sh Source14: series.conf Source16: guards Source21: config.conf Source23: supported.conf Source30: config-subst Source33: check-for-config-changes Source34: check-supported-list Source37: README.SUSE Source40: build-source-timestamp Source41: built-in-where Source44: find-provides Source45: module-renames Source46: modversions Source47: extract-modaliases Source48: macros.kernel-source Source49: kernel-module-subpackage Source50: symsets.pl Source50: kernel-syms.spec Source51: kernel-debug.spec Source52: kernel-default.spec Source53: kernel-kdump.spec Source54: kernel-pae.spec Source55: kernel-ppc64.spec Source56: kernel-ps3.spec Source57: kernel-s390.spec Source58: kernel-trace.spec Source59: kernel-vanilla.spec Source60: kernel-xen.spec Source100: config.tar.bz2 Source101: patches.arch.tar.bz2 Source102: patches.drivers.tar.bz2 Source103: patches.fixes.tar.bz2 Source104: patches.rpmify.tar.bz2 Source105: patches.suse.tar.bz2 Source107: patches.xen.tar.bz2 Source108: patches.addon.tar.bz2 Source109: patches.kernel.org.tar.bz2 Source110: patches.apparmor.tar.bz2 Source111: patches.rt.tar.bz2 Source112: patches.trace.tar.bz2 Source120: kabi.tar.bz2 BuildRoot: %_tmppath/%name-%version-build Prefix: /usr/src # Build with bash instead of sh as the shell: this turns on bash # extensions like <(...). %define _buildshell /bin/bash %define my_builddir %_builddir/%{name}-%{version} %(chmod +x %_sourcedir/{guards,config-subst,check-for-config-changes,symsets.pl}) %define symbols %(set -- $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) %define variant %(name=%name ; echo ${name##kernel-source}) %define variant_symbols %(case %name in (*-rt) echo "RT" ;; esac) %if "%variant" == "" %define do_vanilla 1 %endif %description Dummy description. %package vanilla Summary: Headers and build infrastructure necessary for building KMPs Group: Development/Sources AutoReqProv: off %description vanilla Vanilla Linux kernel sources with minor build fixes. Authors: -------- Linus Torvalds <torvalds@osdl.org> see /usr/src/linux/CREDITS for more details. %prep if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then echo "Please get a copy of linux-%srcversion.tar.bz2 from" \ "ftp://ftp.kernel.org/pub/linux/kernel/v2.6/." fi echo "Symbol(s): %symbols" # Unpack all sources and patches %setup -q -c -T -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 %build # Release number without the EXTRAVERSION RELEASE=%source_rel while [ "$RELEASE" != "${RELEASE#[^0-9]*.}" ]; do RELEASE=${RELEASE#[^0-9]*.} done KERNELRELEASE=%patchversion-$RELEASE KERNELDIR=$RPM_BUILD_ROOT/usr/src/linux-$KERNELRELEASE%variant cat > %_builddir/%{name}-%{version}/.rpm-defs <<EOF KERNELRELEASE=$KERNELRELEASE KERNELDIR=$KERNELDIR EOF mkdir -p $RPM_BUILD_ROOT/usr/src cd $RPM_BUILD_ROOT/usr/src # Unpack the vanilla kernel sources bzip2 -cd %_sourcedir/linux-%srcversion.tar.bz2 \ | tar xf - chmod -x linux-%srcversion/arch/arm/mach-at91/board-yl-9200.c # executable by accident (fixed in 2.6.27) mv linux-%srcversion linux-$KERNELRELEASE%variant %if %do_vanilla cp -al linux-$KERNELRELEASE%variant linux-$KERNELRELEASE-vanilla %endif cd linux-$KERNELRELEASE%variant %_sourcedir/guards %variant_symbols %symbols < %_sourcedir/series.conf \ > .patches for patch in $(< .patches); do if ! patch -s -F0 -E -p1 --no-backup-if-mismatch \ -i %_builddir/%name-%version/$patch; then echo "*** Patch $patch failed ***" exit 1 fi done if [ -f %_sourcedir/localversion ] ; then cat %_sourcedir/localversion > localversion fi rm -f $KERNELDIR/.patches echo "/usr/src/linux-$KERNELRELEASE%variant" > %my_builddir/%name.files # Hardlink duplicate files automatically (from package fdupes). %fdupes $RPM_BUILD_ROOT cd $RPM_BUILD_ROOT/usr/src rm -f $(find . -name ".gitignore") ln -sf linux%variant linux%variant # dummy symlink %install source .rpm-defs # Install the documentation and example Kernel Module Package. DOC=$RPM_BUILD_ROOT/usr/share/doc/packages/%name mkdir -p $DOC cp %_sourcedir/README.SUSE $DOC ln -s /usr/share/doc/packages/%name/README.SUSE $KERNELDIR/ install -m 755 -d $RPM_BUILD_ROOT/etc/rpm install -m 644 %_sourcedir/macros.kernel-source $RPM_BUILD_ROOT/etc/rpm/ install -m 755 -d $RPM_BUILD_ROOT/usr/lib/rpm install -m 644 %_sourcedir/kernel-module-subpackage \ $RPM_BUILD_ROOT/usr/lib/rpm/ sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \ -e "s:@VARIANT@:%variant:g" \ %_sourcedir/source-post.sh > %name-post.sh %post -f %name-post.sh %files -f %name.files %defattr(-, root, root) %ghost /usr/src/linux%variant /usr/share/doc/packages/%name /etc/rpm/macros.kernel-source /usr/lib/rpm/kernel-module-subpackage %if %do_vanilla %files vanilla %%defattr(-, root, root) /usr/src/linux-%patchversion-%source_rel-vanilla %endif
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jeff Mahoney wrote:
Matt Sealey wrote:
I can't take it anymore. Development on a new kernel flavor is just so complicated and rife with little things to "take care of" which are simply hindering development and making life a misery of little mistakes, and forgetful actions, and even when something comes out right, building an RPM includes untarring 250MB of source code just to tell me the config is bad within the first 4 files compiled or so.
Try the attached spec files as a base instead. kernel-source should work fine without alteration. kernel-default just needs the build_flavor macro changed to whatever you want to call it. These spec files, or something close to them, are going to be used in the next release.
Oh, actually, you can remove this chunk entirely from kernel-default.spec. It takes the release number from the installed kernel-source package. %if ! %using_buildservice BuildRequires: kernel-dummy %endif - -Jeff - -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkluPNIACgkQLPWxlyuTD7J9NgCfQMGZw1QZW1cykBH4NJmKDbB8 T+YAn1q3AWuAQEAm1SmsRSlhjuVzoLIb =FFTa -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
Jeff Mahoney wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Jeff Mahoney wrote:
Oh, actually, you can remove this chunk entirely from kernel-default.spec. It takes the release number from the installed kernel-source package.
%if ! %using_buildservice BuildRequires: kernel-dummy %endif
I was already doing this in my current stuff, although I was told by some SUSE guys that this was required for BS (obviously it's not). The whole kernel-dummy thing is really weird and I don't really understand why it's needed anyway. I am going to back everything up and start this kernel thing all over again, because it is driving me seven ways to insanity at the moment. I should be asleep recovering from food poisoning but... -- Matt -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Matt Sealey wrote:
Jeff Mahoney wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Jeff Mahoney wrote:
Oh, actually, you can remove this chunk entirely from kernel-default.spec. It takes the release number from the installed kernel-source package.
%if ! %using_buildservice BuildRequires: kernel-dummy %endif
I was already doing this in my current stuff, although I was told by some SUSE guys that this was required for BS (obviously it's not).
The whole kernel-dummy thing is really weird and I don't really understand why it's needed anyway.
The confusion arises because there are multiple build systems now. There used to be only one internal build system. Then, a few years ago, the openSUSE Build Service was built. Recently, we have an internal version of that as well. The "new" build systems can handle release number synchronization between related packages and two-factor release numbers, like "1.14". The "old' build system couldn't handle synchronization and only supported single-factor release numbers, like "13". kernel-dummy is a way to "fake" synchronization. The kernel-dummy package is built first, and then *all* of the other packages inherit its release number via some black magic you don't want to know about. The distributions are now build using the "new" build system, but we still use the old one for building kernels for testing by customers. So, it's still needed for that. Eventually it will go away. Without the release number synchronization, you could end up with things like: kernel-source-2.6.27-184 kernel-default-2.6.27-139 kernel-syms-2.6.27-167 They would all be based on the same code, but you'd have no way of knowing that. You could also install a new kernel-source, but have no obvious way of knowing that they're NOT based on the same code. So, we do a bit of juggling to make sure all the release numbers match up and make those relationships obvious. - -Jeff - -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkluRUQACgkQLPWxlyuTD7Lv7wCgm48S7pMxH+DKWO/EiZ3+UrIp gv4AniSqhbdR6ctoU9Guo6gJ1GYD9VSq =fJZF -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
Jeff Mahoney wrote:
Matt Sealey wrote:
On my system, I use the following ~/.rpmmacros: %_sourcedir /home/jeffm/src/packages/%{name} %_specdir /home/jeffm/src/packages/%{name} %_builddir /home/jeffm/src/packages/BUILD
:O So if I install an RPM it will go into that directory all the time?
This is an RPM thing, not a kernel package thing.
Indeed but..
Your best bet is to file a bug report.
I think I will just be told the above and have it marked "WONTFIX".. as usual :D
/usr/lib/rpm/macros to something else - but that's not a decision the kernel teams make.
Okay. I will have a go during the week or weekend. Writing it on the whiteboard now. -- Matt -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
Hi, On Wed, 14 Jan 2009, Matt Sealey wrote:
I can't take it anymore. Development on a new kernel flavor is just so complicated and rife with little things to "take care of" which are simply hindering development and making life a misery of little mistakes, and forgetful actions, and even when something comes out right, building an RPM includes untarring 250MB of source code just to tell me the config is bad within the first 4 files compiled or so.
The one thing that is really tiring me, though, is the layout of /usr/src/packages.
If you use 'build' (the package and program in there) to build your packages, not rpm -b* or rpmbuild directly it doesn't matter where your sources are, hence the (unfortunate) layout of /usr/src/packages/ doesn't enter the picture. If you nevertheless want to have a different layout of %_sourcedir, simply add the following to your ~/.rpmmacros (or root, as whomever you start building): %_sourcedir %{_topdir}/SOURCES/%{name}-%{version} And yes, the current flat layout is an artifact of us using build roots all the time, so nobody cared to ever change it to something else after dozens of years (remember to us internally its layout and existence is irrelevant) :-) As more than a few people are annoyed by that it might change in the future. I bet there's a bug report about that layout already, in case there isn't there should be one I guess, you might want to check. Ciao, Michael. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
Michael Matz wrote:
Hi,
And yes, the current flat layout is an artifact of us using build roots all the time, so nobody cared to ever change it to something else after dozens of years (remember to us internally its layout and existence is irrelevant) :-) As more than a few people are annoyed by that it might change in the future. I bet there's a bug report about that layout already, in case there isn't there should be one I guess, you might want to check.
https://bugzilla.novell.com/show_bug.cgi?id=466222 I couldn't really find one so I made one that is a dependent of the xorg-x11-libs thing I tripped up on when first trying this stuff. I couldn't CC either of you guys.. :/ -- Matt -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
* Matt Sealey (matt@genesi-usa.com) [20090114 23:29]:
I couldn't CC either of you guys.. :/
Replace suse.de in the address by novell.com and it will work. Philipp -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Wed, Jan 14, 2009 at 01:13:00PM -0600, Matt Sealey wrote:
I can't take it anymore. Development on a new kernel flavor is just so complicated and rife with little things to "take care of" which are simply hindering development and making life a misery of little mistakes, and forgetful actions, and even when something comes out right, building an RPM includes untarring 250MB of source code just to tell me the config is bad within the first 4 files compiled or so.
The one thing that is really tiring me, though, is the layout of /usr/src/packages.
In the way SUSE has it, kernel-source, kernel-flavor and every other thing installed from an SRPM install into exactly the same directory. This has some effects that are annoying me to some degree I am not comfortable with
1) broken packages which maintainers are unwilling to fix which blithely untar every *.tar.bz2 in /usr/src/packages/SOURCES (xorg-x11-libs!)
2) kernel-source, kernel-flavor SRPMS overwrite each other if they are installed. ARGH!
3) kernel-flavor .spec file is actually in SOURCES and not SPECS when it gets installed. WHAT?
I really need to know, what kind of design decision is it that all RPMs get dumped into the same directory? Now, in a sane system like the /usr/share/doc/packages directory each package has it's basename in there. Each package is separate and self-contained. Docs for one do not go in the folder for docs for another.. :)
kernel-source SRPM is sufficient to install for _all_ kernel flavours. You do not need the kernel-<flavour> SRPMs. Ciao, Marcus -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Wednesday 14 January 2009 20:13:00 Matt Sealey wrote:
The one thing that is really tiring me, though, is the layout of /usr/src/packages.
As pointed out already, it is straightforward to change rpm's defaults in ~/.rpmmacros. This still only gives different per-user settings, and different packages can still step on their toes (and they will still create a big mess in the SOURCES directory). People are led to include %name in all patch names to somewhat reduce the mess, for example. When using rpm directly without a chroot, I like to keep everything in the same sub-directory instead. For building, I use the attached script. This would make much saner defaults for rpm IMO. This doesn't seem to be a popular opinion, however. Andreas
participants (6)
-
Andreas Gruenbacher
-
Jeff Mahoney
-
Marcus Meissner
-
Matt Sealey
-
Michael Matz
-
Philipp Thomas