4

I have created a new deb package from SoftEtherVPN source at https://github.com/SoftEtherVPN/SoftEtherVPN using

checkinstall -D make install

The process successfully installs the software but the resultant deb package fails to install with this error:

unable to create `/proc/sys/kernel/threads-max.dpkg-new' (while processing `./proc/sys/kernel/threads-max'): No such file or directory

I am unable to find out how to fix this error.

MVCE:

ssh root@my_new_14.04_vps_ip
apt-get update && apt-get -y upgrade
apt-get -y install git-core build-essential 
apt-get install libreadline6-dev libncurses5-dev libssl-dev
apt-get install checkinstall
git clone https://github.com/SoftEtherVPN/SoftEtherVPN.git
cd SoftEtherVPN
./configure
checkinstall -D make install
markhorrocks
  • 1,199
  • 19
  • 82
  • 151
  • Are you running as root? Also try to make the directory manually...: sudo mkdir ./proc/sys/kernel/threads-max – ant0nisk Nov 26 '15 at 19:22
  • Try the second suggestion... I don't know if it works though... – ant0nisk Nov 26 '15 at 19:24
  • /proc/sys/kernel/threads-max exists. threads-max is an empty file but touch: cannot touch ‘threads-max.dpkg-new’: No such file or directory – markhorrocks Nov 26 '15 at 19:28
  • That is strange... The error message though says ./proc/sys[...]. Notice the dot before the path... Or maybe the system needs to reboot? Sometimes a reboot solves things :/ – ant0nisk Nov 26 '15 at 19:34
  • Does your package contain stuff in `proc`, or is a script in the package (`postinst` etc) contain commands to create this? Looks like you are trying the former, which will not work - try the latter instead. – tripleee Nov 26 '15 at 19:36
  • There is no postinstall script but there is a proc/sys/kernel/threads-max in the source which is SoftEtherVPN at https://github.com/SoftEtherVPN/SoftEtherVPN – markhorrocks Nov 26 '15 at 19:42
  • I never tried, but I think you cannot "install" files in the `/proc` system; if you want to change the value in `/proc/sys/kernel/threads-max` you need to do something like `cat /path/to/my/threads-max > /proc/sys/kernel/threads-max` in a postinstall script. Do you really need to set this kernel setting on install? I think this should be left to the local admins. In any case try to exclude the files in `/proc` from the package. – Clemens Klein-Robbenhaar Dec 05 '15 at 13:06
  • 2
    Uh, forget about my comment, it seems the source code in `SoftEtherVPN/src/Mayaqua/Unix.c` does the writing to proc. `checkinstall` then thinks this is a file to include in the package. Does `checkinstall --exclude /proc/sys/kernel/threads-max -D make install` help fixing this misunderstanding? – Clemens Klein-Robbenhaar Dec 05 '15 at 13:20
  • Please write this up as an answer so i can award the points. If possible, I would appreciate comment on whether this file is needed and why it's there? – markhorrocks Dec 07 '15 at 16:46

1 Answers1

2

The proc file system exposes a simple pseudo-file interface to many Linux kernel facilities. The threads-max setting, as the name suggests, controls how many threads the kernel allows to be created in the system. The installer tries to write a suitable value to this file, but checkinstall assumes that the installer tries to create or overwrite an actual file in this location. dpkg does not allow this, so the package you get from checkinstall is not compatible.

You can tell checkinstall to ignore this file, and perhaps add a separate postinst script to write this setting by other means when the package is installed, if necessary.

checkinstall --exclude /proc/sys/kernel/threads-max -D make install
tripleee
  • 175,061
  • 34
  • 275
  • 318