[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building my own packages



On Thu, Nov 05, 2020 at 10:59:39PM +0700, Victor Sudakov wrote:
> tomas@tuxteam.de wrote:
> 
> [dd]
> 
> > 
> > > Next I would like to publish those tweaked and local packages in a local
> > > repository in a corporate intranet, so that I could add this repository to
> > > sources.list and its packages should override the standard Debian ones.
> > 
> > Ah, a new direction to branch into :-)
> > 
> > There are instructions on how to set up a Debian repository, e.g.
> > here [1].
> 
> Maybe I'm looking in the completely wrong direction? Maybe it would be
> easier to install such "special" packages with Docker or Snap or
> something similar? Would this eliminate the problem of dependencies and
> clean builds? 

There are many ways to skin that cat. If you feel at home with Docker,
by all means, go with it. A simple chroot, or a bit more comfy, schroot,
do the same as Docker does (for this use case!) with far less machinery.
That's why I do prefer those "leaner" approaches.

Don't know about Snap.

But the best tool is the one which fits your hand :)

Those "chrooty [1]" approaches find their limits whenever you depend on
a kernel version different from what your machine has. Then, possibly
a VM is in order.

With a chrooty approach, what you do is:

 - prepare a base image. Debootstrap can help you with that.
   Or you trust a pre-built image "out there" (Docker-y people
   do this. For me, that's The Horror :)
 - chroot into that, install whatever build dependencies
   you need
 - typically, set up a directory as a kind of "mailbox" to get
   things in (package source, possibly build scripts) and out
   (your steaming, freshly built package). This is often done
   with a bind-mount (schroot, and probably Docker wrap those
   things for you, you just make some adjustments to some
   config files)
 - build away!

Cheers

[1] Docker is, AFAIK, also a "chrooty" approach.

 - t

Attachment: signature.asc
Description: Digital signature


Reply to: