tags:

views:

276

answers:

1

Hi,

I'm repackaging some software (which has its own installer) for private use under a Debian-based system. That software is already compiled (no source), so I basically run the installer into the DESTDIR tree.

Unfortunately, the installer requires that a system username and groupname is previously created. Now, I know it is a simple matter of doing it "by hand" prior to building (and installing) the Debian package. But I'm wondering if it is possible to instruct debuild to "fake the creation of a user" (while running as root with fakeroot). Editing the debian/preinst.ex and debian/postrm.ex works for doing those operations, but this also concerns the build stage, where those users become unnecessary after the build.

So basically this ammounts to let the Debian build tools (and tools run within the build) to "believe" that a certain user already exists... Short of running in a chroot environment (such as pbuilder), how can I do this?

+1  A: 

A bit late, but my best guess would be an LD_PRELOAD, which requires building a separate C-file compiled to a dynamic library which can override I.E. getpwnam() which is probably what the installer uses to check for the user.

But first, I would REALLY look to see if the "installer" can't be coerced into unpack-mode. Many installers can, using hidden options.

Rawler