# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../aufs/pkg_linux_post.conf # Copyright (C) 2010 - 2013 The OpenSDE Project # # More information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. A copy of the # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- # get version of the aufs package and determine file name of the sources pkg_aufs_ver="$( pkgdesc ver aufs )" pkg_aufs_source_file=`match_source_file -p aufs3-standalone-${pkg_aufs_ver} aufs` # extracting Aufs sources into a tempdir if we found a matching source file if [ ! -z "$pkg_aufs_source_file" ]; then pkg_aufs_tempdir=$( mktemp -d ) tar -C $pkg_aufs_tempdir -xf $pkg_aufs_source_file pkg_aufs_srcdir="$( basename $( ls -1d $pkg_aufs_tempdir/* ) )" ln -sf $pkg_aufs_srcdir $pkg_aufs_tempdir/aufs3-standalone # patching the kernel sources echo_status "Including Aufs3 support (aufs package enabled)" var_append patchfiles ' ' "$pkg_aufs_tempdir/aufs3-standalone/aufs3-kbuild.patch" var_append patchfiles ' ' "$pkg_aufs_tempdir/aufs3-standalone/aufs3-base.patch" var_append patchfiles ' ' "$pkg_aufs_tempdir/aufs3-standalone/aufs3-mmap.patch" var_append patchfiles ' ' "$pkg_aufs_tempdir/aufs3-standalone/aufs3-standalone.patch" # apply possible local patches we have in the aufs package dir var_append patchfiles ' ' "$base/package/*/aufs/*.diff" # copying sources into kernel source tree pkg_aufs_copy_source_files() { cp -rv $pkg_aufs_tempdir/aufs3-standalone/{Documentation,fs} . cp -rv $pkg_aufs_tempdir/aufs3-standalone/include/uapi/linux/aufs_type.h include/uapi/linux/ } hook_add prepatch 5 "pkg_aufs_copy_source_files" # removing tempdir hook_add finish 9 "rm -rf $pkg_aufs_tempdir" else echo_warning "No matching source file found for Aufs3 support" fi