-1

I am new to Debian 8, and still very much a Linux beginner. I am currently running Debian 8 Oracle VM Virtualbox in Windows 10, for reference.

For a project I am working on, my task is installing Debian 8 packages from the source package to a specified rootfs folder. After getting the source files (.tar.gz, .diff.gz, .dsc) and extracting them, I run:

dpkg-source -x <package>.dsc

Which extracts the source to the working directory.

The issue I'm having is generating the .deb files from the extracted. The standard way to do it is to let apt handle the installation of the dependencies from the online repository via:

apt-get build-dep <package>

then generate the .deb files via:

dpkg-buildpackage -b

But this will install the dependencies to my rootfs. In addition, since I downloaded the majority of the packages to my local machine, I'd like to be able to manually install each dependency from my local source packages rather than online.

From my understanding, I was tasked this to avoid polluting the specified fs with documentation and non-essential files, since the number of Debian 8 packages that will be added to this fs is >700.

If there are any mistakes / misunderstandings with my knowledge of Linux & Debian 8, please let me know.

halfer
  • 19,824
  • 17
  • 99
  • 186
kapkong
  • 117
  • 1
  • 7
  • 1
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww May 25 '18 at 00:19
  • My apologies. Thanks for the clarification. – kapkong May 25 '18 at 13:04
  • 1
    You can flag the question and ask the moderators move it so you don't have to delete it on one site and create it on another site. It also resets the question's score. For whatever reasons, the Stack Exchange network does not allow you to migrate it yourself. Also see [Author initiated migration to other SE sites?](http://meta.stackoverflow.com/q/254851) – jww May 25 '18 at 22:42

1 Answers1

0

You can create a docker container and install your dependencies in there and do all your work in there. You can configure docker to put the docker containers on any filesystem you like.

Any approach that does not use containers is unlikely to work because AFAIK most Linux distributions, including Debian, do not support dependency relocation. Nix is an exception. So containers are a way around that.

Robin Green
  • 32,079
  • 16
  • 104
  • 187