Closed Fullaxx closed 1 year ago
Not exactly missing - in this patch there were already existing changes in the code by which you can not correctly apply. The changes are simply duplicated - at least for kernel 6.4
I'm not sure what the appropriate process is here...
According to the readme, the process is:
aufs5-mmap.patch fails to patch b/c fs/aufs does not exist yet... Shall I copy fs first and then expect aufs5-mmap.patch to patch properly?
ok thank you. It looks like applying mmap patch after everything else does work. Maybe we can get the readme updated to reflect this?
Hello,
Brett Kuskie:
Most recent patch to 5.10.140 and 5.15.41 fails to patch properly. In each of the referenced commits: aufs5-mmap.patch is looking to patch fs/aufs/f_op.c but this files doesn't exist yet.
o misc
For now, you can simply ignore the error about fs/aufs/f_op.c.
J. R. Okajima
Puppy Linux also has this problem with the new mmap.patch:
Ignoring patch errors is sadly not very easy when building on Github.....
2023-08-15T01:05:52.9484880Z Adding Aufs to the kernel sources 2023-08-15T01:05:52.9492297Z 2023-08-15T01:05:52.9494033Z patch -N -p1 < aufs5-kbuild.patch 2023-08-15T01:05:52.9517158Z patching file fs/Kconfig 2023-08-15T01:05:52.9517411Z patching file fs/Makefile 2023-08-15T01:05:52.9517824Z Hunk #1 succeeded at 134 (offset -2 lines). 2023-08-15T01:05:52.9528355Z 2023-08-15T01:05:52.9528643Z patch -N -p1 < aufs5-base.patch 2023-08-15T01:05:52.9552078Z patching file MAINTAINERS 2023-08-15T01:05:52.9566697Z patching file drivers/block/loop.c 2023-08-15T01:05:52.9570124Z patching file fs/dcache.c 2023-08-15T01:05:52.9573005Z patching file fs/fcntl.c 2023-08-15T01:05:52.9575991Z patching file fs/namespace.c 2023-08-15T01:05:52.9579920Z patching file fs/splice.c 2023-08-15T01:05:52.9587622Z patching file include/linux/fs.h 2023-08-15T01:05:52.9589696Z Hunk #1 succeeded at 1338 (offset 6 lines). 2023-08-15T01:05:52.9592651Z Hunk #2 succeeded at 1859 (offset 15 lines). 2023-08-15T01:05:52.9592918Z Hunk #3 succeeded at 2348 (offset 16 lines). 2023-08-15T01:05:52.9593738Z Hunk #4 succeeded at 2585 (offset 16 lines). 2023-08-15T01:05:52.9595400Z patching file include/linux/lockdep.h 2023-08-15T01:05:52.9595688Z patching file include/linux/mnt_namespace.h 2023-08-15T01:05:52.9595938Z patching file include/linux/splice.h 2023-08-15T01:05:52.9598896Z patching file kernel/locking/lockdep.c 2023-08-15T01:05:52.9629922Z 2023-08-15T01:05:52.9630556Z patch -N -p1 < aufs5-standalone.patch 2023-08-15T01:05:52.9643828Z patching file fs/dcache.c 2023-08-15T01:05:52.9652093Z patching file fs/exec.c 2023-08-15T01:05:52.9654215Z patching file fs/fcntl.c 2023-08-15T01:05:52.9654783Z patching file fs/file_table.c 2023-08-15T01:05:52.9655186Z patching file fs/namespace.c 2023-08-15T01:05:52.9662362Z patching file fs/notify/group.c 2023-08-15T01:05:52.9665008Z patching file fs/open.c 2023-08-15T01:05:52.9669448Z patching file fs/read_write.c 2023-08-15T01:05:52.9670055Z patching file fs/splice.c 2023-08-15T01:05:52.9670459Z patching file fs/xattr.c 2023-08-15T01:05:52.9673146Z patching file kernel/locking/lockdep.c 2023-08-15T01:05:52.9682021Z patching file kernel/task_work.c 2023-08-15T01:05:52.9682478Z Hunk #1 succeeded at 164 (offset 10 lines). 2023-08-15T01:05:52.9683110Z patching file security/security.c 2023-08-15T01:05:52.9708886Z 2023-08-15T01:05:52.9709202Z patch -N -p1 < aufs5-mmap.patch 2023-08-15T01:05:52.9721209Z can't find file to patch at input line 8 2023-08-15T01:05:52.9721896Z Perhaps you used the wrong -p or --strip option? 2023-08-15T01:05:52.9726956Z The text leading up to this was: 2023-08-15T01:05:52.9727635Z -------------------------- 2023-08-15T01:05:52.9729318Z |SPDX-License-Identifier: GPL-2.0 2023-08-15T01:05:52.9729838Z |aufs5.10.140 mmap patch 2023-08-15T01:05:52.9730066Z | 2023-08-15T01:05:52.9731933Z |diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c 2023-08-15T01:05:52.9732268Z |index 65de7d94d3e4..e57334b462b1 100644 2023-08-15T01:05:52.9734307Z |--- a/fs/aufs/f_op.c 2023-08-15T01:05:52.9734571Z |+++ b/fs/aufs/f_op.c 2023-08-15T01:05:52.9736709Z -------------------------- 2023-08-15T01:05:52.9736954Z File to patch: 2023-08-15T01:05:52.9738812Z Skip this patch? [y] 2023-08-15T01:05:52.9739084Z Skipping patch. 2023-08-15T01:05:52.9739469Z 1 out of 1 hunk ignored 2023-08-15T01:05:52.9739852Z can't find file to patch at input line 20 2023-08-15T01:05:52.9740215Z Perhaps you used the wrong -p or --strip option? 2023-08-15T01:05:52.9740470Z The text leading up to this was: 2023-08-15T01:05:52.9740763Z -------------------------- 2023-08-15T01:05:52.9741086Z |diff --git a/fs/aufs/file.h b/fs/aufs/file.h 2023-08-15T01:05:52.9743355Z |index 878c8708a4aa..e78a1d48e5cd 100644 2023-08-15T01:05:52.9745834Z |--- a/fs/aufs/file.h 2023-08-15T01:05:52.9749234Z |+++ b/fs/aufs/file.h 2023-08-15T01:05:52.9749777Z -------------------------- 2023-08-15T01:05:52.9750205Z File to patch: 2023-08-15T01:05:52.9750418Z Skip this patch? [y] 2023-08-15T01:05:52.9750614Z Skipping patch. 2023-08-15T01:05:52.9750823Z 1 out of 1 hunk ignored 2023-08-15T01:05:52.9751812Z patching file fs/proc/base.c 2023-08-15T01:05:52.9752051Z patching file fs/proc/nommu.c 2023-08-15T01:05:52.9752481Z patching file fs/proc/task_mmu.c 2023-08-15T01:05:52.9752857Z Hunk #2 succeeded at 1886 (offset -2 lines). 2023-08-15T01:05:52.9753105Z patching file fs/proc/task_nommu.c 2023-08-15T01:05:52.9753515Z patching file include/linux/mm.h 2023-08-15T01:05:52.9753945Z patching file include/linux/mm_types.h 2023-08-15T01:05:52.9754379Z patching file kernel/fork.c 2023-08-15T01:05:52.9754794Z Hunk #1 succeeded at 557 (offset 3 lines). 2023-08-15T01:05:52.9755397Z patching file mm/Makefile 2023-08-15T01:05:52.9755888Z patching file mm/filemap.c 2023-08-15T01:05:52.9756306Z patching file mm/mmap.c 2023-08-15T01:05:52.9756611Z Hunk #4 succeeded at 1904 with fuzz 2 (offset 3 lines). 2023-08-15T01:05:52.9756940Z Hunk #5 succeeded at 2772 (offset 20 lines). 2023-08-15T01:05:52.9757232Z Hunk #6 succeeded at 2791 (offset 20 lines). 2023-08-15T01:05:52.9757699Z Hunk #7 succeeded at 2985 (offset 20 lines). 2023-08-15T01:05:52.9758175Z Hunk #8 succeeded at 3062 (offset 20 lines). 2023-08-15T01:05:52.9759392Z Hunk #9 succeeded at 3376 (offset 20 lines). 2023-08-15T01:05:52.9759902Z patching file mm/nommu.c 2023-08-15T01:05:52.9760315Z patching file mm/prfile.c 2023-08-15T01:05:52.9778407Z WARNING: failed to add some Aufs patches to the kernel sources. 2023-08-15T01:05:52.9841224Z ##[error]Process completed with exit code 1.
Thanks for the update J.R. And thanks for all the hard work keeping aufs up to date!
This is the code which is run on Github with $GITHUB_ACTIONS to apply the aufs patches for Puppy Linux - what simple change is needed to temporarily overcome this problem?
if [ "$AUFS" != "no" ] ; then
log_msg "Adding Aufs to the kernel sources"
## hack - Aufs adds this file in the mmap patch, but it may be already there
if [ -f mm/prfile.c ] ; then
mmap=../aufs_sources/aufs${aufs_version}-mmap.patch
[ -f $mmap ] && grep -q 'mm/prfile.c' $mmap && rm -f mm/prfile.c #delete or mmap patch will fail
fi
for i in kbuild base standalone mmap; do #loopback tmpfs-idr vfs-ino
patchfile=../aufs_sources/aufs${aufs_version}-$i.patch
( echo ; echo "patch -N -p1 < ${patchfile##*/}" ) &>> ${BUILD_LOG}
patch -N -p1 < ${patchfile} &>> ${BUILD_LOG}
if [ $? -ne 0 ] ; then
log_msg "WARNING: failed to add some Aufs patches to the kernel sources."
[ -n "$GITHUB_ACTIONS" ] && exit 1
log_msg "Check it manually and either CRTL+C to bail or hit enter to go on"
read goon
fi
done
cp -r ../aufs_sources/{fs,Documentation} .
cp ../aufs_sources/include/linux/aufs_type.h include/linux 2>/dev/null
cp ../aufs_sources/include/uapi/linux/aufs_type.h include/linux 2>/dev/null
[ -d ../aufs_sources/include/uapi ] && \
cp -r ../aufs_sources/include/uapi/linux/aufs_type.h include/uapi/linux
fi
Try moving this line: cp -r ../aufs_sources/{fs,Documentation} . before applying the aufs5-mmap.patch (you might have to split your for loop)
Here is my script to apply patches (Comments indicate recent changes): echo "Patching AUFS" echo "Applying aufs?-kbuild.patch ..." patch -p1 < ${TEMPSTORAGE}/${AUFSGITDIR}/aufs?-kbuild.patch || bail "patching aufs?-kbuild.patch" echo "Applying aufs?-base.patch ..." patch -p1 < ${TEMPSTORAGE}/${AUFSGITDIR}/aufs?-base.patch || bail "patching aufs?-base.patch"
echo "Copying docs/fs ..." cp -r ${TEMPSTORAGE}/${AUFSGITDIR}/{Documentation,fs} ./ || bail "patching aufs docs" echo "Applying aufs?-mmap.patch ..." patch -p1 < ${TEMPSTORAGE}/${AUFSGITDIR}/aufs?-mmap.patch || bail "patching aufs?-mmap.patch"
------- Blind-Carbon-Copy
From: "J. R. Okajima" @.> To: @. Subject: aufs5 and aufs6 GIT release MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: @.> Date: Mon, 21 Aug 2023 09:41:38 +0900 Message-ID: @.>
o bugfix
J. R. Okajima
------- End of Blind-Carbon-Copy
Thanks J.R.! This is much appreciated to keep automated kernel builds working!
Most recent patch to 5.10.140 and 5.15.41 fails to patch properly. In each of the referenced commits: aufs5-mmap.patch is looking to patch fs/aufs/f_op.c but this files doesn't exist yet.
When I follow the process in the readme: I can successfully apply aufs5-kbuild.patch I can successfully apply aufs5-base.patch aufs5-mmap.patch fails to patch due to missing file.
https://github.com/sfjro/aufs-standalone/commit/3e0d5904463904cee6815efb982cdcecb9e5ab90 https://github.com/sfjro/aufs-standalone/commit/5e0110ef0c18ac8d9f7f3712e07c32d889c9c5a2