Building Debian from Source

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Building Debian from Source

Justin Phelps
I'm working to build a deb package from source, but I'm having trouble redirecting the "make install" command to the package location.

I attempted to use --prefix, but that broke the init.d script that was being written.
I set DESTDIR=, which resulted in a good init.d script, but the shared objects are not linked properly once I install the package on a fresh instance.

What's the right way to invoke the make install script and have all output written to a specific directory, while also ensuring shared objects are linked relative to that directory instead of the build system?
Reply | Threaded
Open this post in threaded view
|

Re: Building Debian from Source

Mike Jumper-3
On Mon, Dec 9, 2019 at 4:21 PM Justin Phelps <[hidden email]> wrote:
I'm working to build a deb package from source, but I'm having trouble redirecting the "make install" command to the package location.

I attempted to use --prefix, but that broke the init.d script that was being written.

Broke how?

--prefix (provided to the configure script prior to running "make") is the correct way. That option controls the base directory for all installed components, including guacd (which would be installed to PREFIX/sbin). The install location of guacd is dynamically substituted into the init script as part of the build:


- Mike

Reply | Threaded
Open this post in threaded view
|

Re: Building Debian from Source

Justin Phelps
Hey Mike,

Here's the failure when I only use --prefix=my/build/dir

 /usr/bin/install -c init.d/guacd '/etc/init.d'
/usr/bin/install: cannot create regular file '/etc/init.d/guacd': Permission denied
Makefile:531: recipe for target 'install-initSCRIPTS' failed

If I also try to override the init.d script location with --with-init-dir=my/build/dir/etc/init.d the generated file has this full path, which doesn't work on the actual target system. The target system being the standard /etc/init.d/guacd


On Mon, Dec 9, 2019 at 4:31 PM Mike Jumper <[hidden email]> wrote:
On Mon, Dec 9, 2019 at 4:21 PM Justin Phelps <[hidden email]> wrote:
I'm working to build a deb package from source, but I'm having trouble redirecting the "make install" command to the package location.

I attempted to use --prefix, but that broke the init.d script that was being written.

Broke how?

--prefix (provided to the configure script prior to running "make") is the correct way. That option controls the base directory for all installed components, including guacd (which would be installed to PREFIX/sbin). The install location of guacd is dynamically substituted into the init script as part of the build:


- Mike

Reply | Threaded
Open this post in threaded view
|

Re: Building Debian from Source

Justin Phelps
Sorry, when I use --prefix with --with-init-dir. Not only --prefix.

On Mon, Dec 9, 2019 at 4:40 PM Justin Phelps <[hidden email]> wrote:
Hey Mike,

Here's the failure when I only use --prefix=my/build/dir

 /usr/bin/install -c init.d/guacd '/etc/init.d'
/usr/bin/install: cannot create regular file '/etc/init.d/guacd': Permission denied
Makefile:531: recipe for target 'install-initSCRIPTS' failed

If I also try to override the init.d script location with --with-init-dir=my/build/dir/etc/init.d the generated file has this full path, which doesn't work on the actual target system. The target system being the standard /etc/init.d/guacd


On Mon, Dec 9, 2019 at 4:31 PM Mike Jumper <[hidden email]> wrote:
On Mon, Dec 9, 2019 at 4:21 PM Justin Phelps <[hidden email]> wrote:
I'm working to build a deb package from source, but I'm having trouble redirecting the "make install" command to the package location.

I attempted to use --prefix, but that broke the init.d script that was being written.

Broke how?

--prefix (provided to the configure script prior to running "make") is the correct way. That option controls the base directory for all installed components, including guacd (which would be installed to PREFIX/sbin). The install location of guacd is dynamically substituted into the init script as part of the build:


- Mike

Reply | Threaded
Open this post in threaded view
|

Re: Building Debian from Source

Mike Jumper-3
In reply to this post by Justin Phelps
Doesn't Debian provide tooling for doing exactly what you describe (fooling the build tools into installing in non-root locations)?

I would expect the packaging tooling to work the same for the guacamole-server source as any other source that uses GNU Autotools.

- Mike

On Mon, Dec 9, 2019, 16:40 Justin Phelps <[hidden email]> wrote:
Hey Mike,

Here's the failure when I only use --prefix=my/build/dir

 /usr/bin/install -c init.d/guacd '/etc/init.d'
/usr/bin/install: cannot create regular file '/etc/init.d/guacd': Permission denied
Makefile:531: recipe for target 'install-initSCRIPTS' failed

If I also try to override the init.d script location with --with-init-dir=my/build/dir/etc/init.d the generated file has this full path, which doesn't work on the actual target system. The target system being the standard /etc/init.d/guacd


On Mon, Dec 9, 2019 at 4:31 PM Mike Jumper <[hidden email]> wrote:
On Mon, Dec 9, 2019 at 4:21 PM Justin Phelps <[hidden email]> wrote:
I'm working to build a deb package from source, but I'm having trouble redirecting the "make install" command to the package location.

I attempted to use --prefix, but that broke the init.d script that was being written.

Broke how?

--prefix (provided to the configure script prior to running "make") is the correct way. That option controls the base directory for all installed components, including guacd (which would be installed to PREFIX/sbin). The install location of guacd is dynamically substituted into the init script as part of the build:


- Mike