You are not logged in.

#1 2017-12-29 19:29:56

loqs
Member
Registered: 2014-03-06
Posts: 18,853

[SOLVED] linux 4.14.10 source permissions

building linux 4.14.10 fails with
make[2]: execvp: ./sync-check.sh: Permission denied
because the script is not executable,  this is the change https://git.kernel.org/pub/scm/linux/ke … 3f361c102b

$ stat src/linux-4.14/tools/objtool/sync-check.sh 
  File: src/linux-4.14/tools/objtool/sync-check.sh
  Size: 584       	Blocks: 8          IO Block: 4096   regular file
Device: fe01h/65025d	Inode: 70535113    Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1001/ testuser)   Gid: (  1001/   testuser)
Access: 2017-12-29 19:08:37.543226697 +0000
Modify: 2017-12-29 19:08:37.543226697 +0000
Change: 2017-12-29 19:08:37.543226697 +0000
 Birth: -

but checking patch adding --verbose

Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff --git a/tools/objtool/sync-check.sh b/tools/objtool/sync-check.sh
|new file mode 100755
|index 000000000000..1470e74e9d66
|--- /dev/null
|+++ b/tools/objtool/sync-check.sh
--------------------------
patching file tools/objtool/sync-check.sh
Using Plan A...
Hunk #1 succeeded at 1.

I can change the PKGBUILD to fixup the permissions but I would like to understand why they are not correct after patch creates the file.
Edit:
switching patch to

  git apply "${srcdir}/patch-${pkgver}"

creates the file 755.

Last edited by loqs (2017-12-29 20:36:19)

Offline

#2 2017-12-29 20:08:44

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] linux 4.14.10 source permissions

Might the filesystem where you are trying to build be mounted with noexec?

Edit:
Nope, that's not the problem, fails here and I'm sure the filesystem is not mounted with noexec.

Last edited by R00KIE (2017-12-29 20:17:05)


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2017-12-29 20:19:52

loqs
Member
Registered: 2014-03-06
Posts: 18,853

Re: [SOLVED] linux 4.14.10 source permissions

Rookie no there is no filesystem limitation as proven by git apply creating the file correctly.  It seems patch is creating the file with default permissions looking through the patch man page I can not find anything covering permissions.

Offline

#4 2017-12-29 20:32:02

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,680

Re: [SOLVED] linux 4.14.10 source permissions

Yep, apparently GNU patch doesn't support file permissions. Arch kernel maintainers are aware of it.

Last edited by Scimmia (2017-12-29 20:56:48)

Online

#5 2017-12-29 20:35:56

loqs
Member
Registered: 2014-03-06
Posts: 18,853

Re: [SOLVED] linux 4.14.10 source permissions

Scimmia thank you for the confirmation / explanation.

Offline

#6 2017-12-29 21:07:34

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,680

Re: [SOLVED] linux 4.14.10 source permissions

There's some researching going on in #archlinux, apparently GNU patch supports changing the file mode of an existing file, but not applying it when creating a new file. They're not sure yet if it's a bug or an unimplemented feature.

Online

Board footer

Powered by FluxBB