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

Re: Building my own packages



On Mi, 11 nov 20, 12:27:48, Victor Sudakov wrote:
> deloptes wrote:
> > 
> > > The problem is I don't need a ton of information :-) I need to hear from
> > > someone who has already done that for themselves: "I use such and such
> > > tools, and publish my repo this way..."
> > 
> > Well, I use debuild to build and reprepro to maintain a local repository of
> > former KDE3 now called TDE.
> 
> I've already tried reprepro and it seems to do its job well in publishing
> the packages I feed to it. Now it's building time.
> 
> > I do not build automatically but from time to time I pull changes and build
> > the packages. Because there are dependencies it depends which package
> > changes this affects other packages. For that reason I created a Makefile
> > (actually few of them that complement each other).
> > You have to rebuild all dependencies if you rebuild one package. You simply
> > can not just build and replace a package in production environment without
> > testing it, making a backup or whatever.
> 
> There lies the point which I don't completely understand yet. If I want
> to build a php or exim4 package with my own build options, to what
> extent should I also build their dependencies?

You only need to build their dependencies if you make changes to them.

> And how do I name those
> packages so that they coexist with the default Debian ones?

Any change in the package name would do.

> OTOH, sometimes I would want my package (e.g. tcpdump with my patch) to
> override Debian's one.

In this case you make your package have a higher version. For most cases 
it is sufficient to change the package version to something like (using 
current tcpdump from buster as example):

    4.9.3-1~deb10u1+patched

    (use whatever you like after the +)

This way APT will prioritise your package until a ~deb10u2 (e.g. in case 
of a security update) is published. You could use that as a trigger for 
your build system to reapply your patch and publish the updated package 
in your own repository.

> > I guess the answer to your question is that there is no such out of the box
> > tool, but you need something specific to your setup.
> 
> Pity. I wonder what those people and companies use who publish their own
> repos/products for Debian (Hashicorp, PostgreSQL, Zabbix etc).

The use case is significantly different as all those upstreams are 
typically publishing packages for several distros.
 
> I hoped to download Debian's source packages (already including all
> Debian-specific stuff) and just rebuild them with minimal
> changes/patches.

That's quite easy to do with (from memory, it's been a while since I did 
this):

    apt source <binary-package>

    apt build-dep <binary-package>
    
    # apply patch, change version, etc.
    
    dpkg-buildpackage <whatever>
    
    dpkg -i <rebuild-package.deb>


Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

Attachment: signature.asc
Description: PGP signature


Reply to: