4

My goal is to create an internal ubuntu repository server that hosts all the compiled (.deb) packages. I am planning to use this internal repo for install/updates instead of the official ubuntu server.

In order to achieve my goal, I need all the compiled packages (.deb). I am trying to generate .deb from a ubuntu package source like the one below.

apt-get source hostname=3.20
apt-get build-dep hostname=3.20 -y
cd hostname-3.20
dpkg-buildpackage -rfakeroot -b

Everything worked fine until this .deb creation. I have successfully created .deb for the hostname package from the source.

Now, I have done the following steps:

  • Uploaded the .deb of hostname to the internal ubuntu server repository.
  • Point the tools (say debootstrap) to this repository.

Now, If I tried to install hostname, debootstrap looks for the dependency of hostname which is libgcc1. I don't have .deb for libgcc1 in the repository so, It threw the error saying libgcc1 is not available.

Here is my question:

Is there any way to recursive compile the source and generate .deb for the source and all its dependencies?

7
  • I can't tell what but something went wrong: debhelper is a common dependency... for building sources, not for installing the binary result. it's supposed to be in a Build-Depends: control field (eg: tracker.debian.org/media/packages/h/hostname/control-3.21 ) and not appear anymore in the resulting binary.
    – A.B
    Jan 18, 2023 at 18:30
  • That's true @A.B. I can see the dependencies on Build-Depends field of the control file under Debian. I can write a tool that reads that field recursively on every dependency until reaching the leaf (with no dependencies or has all dependencies available already). I'm thinking whether there is any tool available already to do this job. If there is any, I don't need to reinvent the wheel. Do you think I have to write a tool on my own? Jan 18, 2023 at 19:18
  • @A.B I have replaced debhelper with libgcc1. Jan 18, 2023 at 20:24
  • But why do you need to recompile these dependencies? Why not just mirror them?
    – muru
    Jan 19, 2023 at 3:05
  • My goal is to create a repository with very minimal packages and do that in an automated way. If I have a list of packages, my automation tool should be able to create a repository with those packages (including their dependencies). Jan 19, 2023 at 3:10

0

You must log in to answer this question.

Browse other questions tagged .