0

My buddy wrote a custom patch about a year ago for my iPad that allows me to use certain apps despite being jail broken. Unfortunately it no longer works but I figured out that it can be fixed by creating a few directories manually before installing the deb package.

Is it possible to bundle this preinst code with my existing deb file so that the directories are created automatically before the install fails? Please note that I do not have the original source code of the deb package.

user1647347
  • 507
  • 1
  • 8
  • 23

1 Answers1

1

Sure. Extract the contents of the Debian package (using dpkg -x), then create a file named preinst in the DEBIAN directory. This has to be an executable (or a shell script) with proper permissions; usualluy 0755 is good enough. The contents may be as follows:

#!/bin/bash

mkdir -p /path/to/folder

Then re-create the package using dpkg-deb --build, and it should be fine now.

  • Hmm I tried that and it extracted the folder but Debian was not there. The structure was: -Library->MobileSubstrate->DynamicLibraries – user1647347 Dec 25 '12 at 18:38
  • @user1647347 then use `-e` as well, it'll give you the control and all the post/preinst and -rm files, copy them to the root directory of the package into a directory named DEBIAN. –  Dec 25 '12 at 18:40