Permission denied running splitconfig.pl when running debian/rules updateconfigs

Bug #273437 reported by Fabrice Coutadeur
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

I'm compiling the kernel to update a module, and when running debian/rules updateconfigs, I'm getting this error:
debian/scripts/misc/oldconfig: line 66: /home/fabrice/temp/linux-2.6.24/debian/scripts/misc/splitconfig.pl: Permission denied
make: *** [updateconfigs] Error 1

A simple chmod u+x splitconfig.pl fix the problem. It's only a matter of having this file executable in the source tarball.

Tags: kj-triage
Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

By the way, I got the source with this command:
apt-get source linux-image-$(uname -r)
Following the wiki page (https://help.ubuntu.com/community/Kernel/Compile)

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi fabrice_sp,

Hrm, that's interesting since this looks like the file does have executable permissions set in at least the ubuntu-hardy git tree:

ogasawara@yoji:~/ubuntu-hardy$ ls -l debian/scripts/misc/splitconfig.pl
-rwxr-xr-x 1 ogasawara ogasawara 2271 2008-08-15 12:42 debian/scripts/misc/splitconfig.pl

But when I did download the source as you did I can confirm that it is _not_ set to executable:

ogasawara@yoji:/tmp/linux-2.6.24$ ls -la debian/scripts/misc/splitconfig.pl
-rw-r--r-- 1 root root 2271 2008-09-25 15:33 debian/scripts/misc/splitconfig.pl

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Triaged a while ago but has not had any updated comments for quite some time. Please let us know if this issue remains in the current Ubuntu release, http://www.ubuntu.com/getubuntu/download . If the issue remains, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-triage
Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

It's still the case in Lucid:
fabrice@fabrice-laptop:~/linux-2.6.32$ ls -la debian/scripts/misc/splitconfig.pl
-rw-r--r-- 1 fabrice fabrice 2405 2010-03-13 22:10 debian/scripts/misc/splitconfig.pl

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Andy Whitcroft (apw)
Changed in linux (Ubuntu):
assignee: nobody → Andy Whitcroft (apw)
Revision history for this message
Andy Whitcroft (apw) wrote :

This is a side effect of the use of the origin + diff upload form we use for the kernel. Execute permissions are not honoured. As these items are not normally used in builds this is not normally an issue. Will look see if we can call these directly using perl.

Andy Whitcroft (apw)
Changed in linux (Ubuntu):
assignee: Andy Whitcroft (apw) → nobody
Revision history for this message
ronny (ronny-standtke) wrote :

I just run into exactly this issue because I had to build my own kernel because of
https://bugs.launchpad.net/gentoo/+bug/796030

Revision history for this message
linuxar (linuxar) wrote :

I confirm the bug is also present in the Xubuntu 12.04 (latest update):

without any modification to the config files, but simply for testing, I launched:

linux-3.2.0$ debian/rules updateconfigs

and got the following output:

dh_testdir;
/bin/bash -e debian/scripts/misc/kernelconfig updateconfigs
* Run silentoldconfig (yes=0) on amd64/config.flavour.generic ...
make[1]: Entering directory `/home/felix/Downloads/__SOURCES__/linux-3.2.0'
  HOSTCC scripts/basic/fixdep
  GEN /home/felix/Downloads/__SOURCES__/linux-3.2.0/build/Makefile
  HOSTCC scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC scripts/kconfig/zconf.tab.o
  HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
.config:5452:warning: override: TREE_RCU changes choice state
#
# configuration written to .config
#
make[1]: Leaving directory `/home/felix/Downloads/__SOURCES__/linux-3.2.0'
* Run silentoldconfig (yes=0) on amd64/config.flavour.virtual ...
make[1]: Entering directory `/home/felix/Downloads/__SOURCES__/linux-3.2.0'
  GEN /home/felix/Downloads/__SOURCES__/linux-3.2.0/build/Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
.config:5452:warning: override: TREE_RCU changes choice state
#
# configuration written to .config
#
make[1]: Leaving directory `/home/felix/Downloads/__SOURCES__/linux-3.2.0'
Running splitconfig.pl for amd64

debian/scripts/misc/kernelconfig: line 130: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/splitconfig.pl: Permission denied
make: *** [updateconfigs] Error 1

For the record:

$ uname -a
Linux machine 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
linuxar (linuxar) wrote :

Apparently, the problem is that the splitconfig.pl, as downloaded by apt-get source command is not executable. So, the workaround is to:

linux-3.2.0$ chmod +x debian/scripts/misc/splitconfig.pl

and then relaunch:

linux-3.2.0$ debian/rules updateconfigs

But, now, the new errors are:

Running config-check for all configurations ...

debian/scripts/misc/kernelconfig: line 160: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/../config-check: Permission denied
debian/scripts/misc/kernelconfig: line 160: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/../config-check: Permission denied
debian/scripts/misc/kernelconfig: line 160: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/../config-check: Permission denied
debian/scripts/misc/kernelconfig: line 160: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/../config-check: Permission denied
debian/scripts/misc/kernelconfig: line 160: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/../config-check: Permission denied
debian/scripts/misc/kernelconfig: line 160: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/../config-check: Permission denied
debian/scripts/misc/kernelconfig: line 160: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/../config-check: Permission denied
debian/scripts/misc/kernelconfig: line 160: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/../config-check: Permission denied
debian/scripts/misc/kernelconfig: line 160: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/../config-check: Permission denied
debian/scripts/misc/kernelconfig: line 160: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/../config-check: Permission denied

*** ERROR: 10 config-check failures detected

It seems to be a problem of permissions, too.

Revision history for this message
linuxar (linuxar) wrote :

Indeed. The workaround was to properly set the permissions:

linux-3.2.0$ chmod +x /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian/scripts/misc/../config-check

Now the final output of

linux-3.2.0$ debian/rules updateconfigs

is:

check-config: /home/felix/Downloads/__SOURCES__/linux-3.2.0/debian.master/config/enforce: loading checks
check-config: 42/42 checks passed -- exit 0
rm -rf build

so, it seems to work.

However, should'nt the permissions be properly set up by apt-get source when downloading the source package?

Revision history for this message
linuxar (linuxar) wrote :

Sorry,

It was only later that I saw on the page

https://help.ubuntu.com/community/Kernel/Compile

the instructions:

For these two commands to work, you need to give the scripts in the debian/scripts/misc and debian/scripts directories execute permission with the following command:

chmod -R u+x debian/scripts/*

Mea culpa.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.