Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #228492

Re: Building my own packages

From Linux-Fan <Ma_Sys.ma@web.de>
Newsgroups linux.debian.user
Subject Re: Building my own packages
Date 2020-11-05 23:50 +0100
Message-ID <B7WeS-2iN-3@gated-at.bofh.it> (permalink)
References <B7s79-8u0-31@gated-at.bofh.it> <B7u8V-1hx-1@gated-at.bofh.it> <B7Fxn-8il-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Victor Sudakov writes:

> songbird wrote:

[...]

> > > Where can I learn to do a similar thing for Debian? I'd like to have my
> > > own package repository which:
> > >
> > > 1. Keeps my local patches and configure/build options.
> > > 2. Gets updated and recompiled when the main Debian repository gets  
> > > updated.
> > > 3. Can have a higher preference for my Debian systems than the default  
> > > Debian repositories.
> > >
> > > I know this can be done because I use some vendor repositories (zabbix,
> > > consul etc) but I need the tools and knowledge.
> > >
> > > What would you advise me to read?
> >
> >   there is a ton of information under:
> >
> >   https://www.debian.org/devel/
>
> 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..."

[...]

> > in the place and set up a watch on the repository to
> > see when changes happen.
>
> I have no doubt there are many such tricky things, that's why I'm
> looking for a tutorial.

[...]

Hello,

I am among those who have done something similar, although with slightly  
different focus:

 * For me, it is mostly not to change options of existing packages but rather
   to add some packages that are not there yet (at all)
 * Additionally, I store a lot of configuration
 * I only upgrade from upstream on rare occasions, thus I have not automated
   that part thoroughly. The commits from "Oct 27, 2020" here show
   how I did an upgrade: https://github.com/m7a/lp-cone/commits/master

For my use case, I combine the following tools:

 * debuild   (Debian package building)
 * reprepro  (Custom repository)
 * ant       (generic build tool)
 * Docker¹   (chroot-like environment)
 * git       (for storing metadata and my own source code)
 * Perl      (to tie it all together)

My idea is to have one git repository per package and inside that, the  
package's metadata is "wholly" described by a single `build.xml` file for `ant`.

Working on package is mostly done by modifying the files in the git  
repository and then tiggering automatic builds by committing the current  
state of work (no need to upload anything to a server, the system uses the  
local file system).

I am really unsure whether my approach is anywhere near what you need, but I  
have automated almost all of the actual packaging stuff including the  
creation of a repository, the invocation of Debian build tools, the  
synchronization with the repository, the creation of a clean build  
environment... so maybe it can serve as a "formal tutorial" i.e. some code  
to look at, that does all the necessary steps.

Beware that it is a simplified version of the story though -- the packages  
created by my system are not suited for inclusion in Debian as-is (still  
pondering how to achieve that one day...).

Here is the documentation of all components:

 * https://masysma.lima-city.de/32/masysmaci_main.xhtml
 * https://masysma.lima-city.de/32/masysmaci_build.xhtml
 * https://masysma.lima-city.de/32/masysmaci_pkgsync.xhtml
 * https://masysma.lima-city.de/11/maartifact.xhtml

This marks my second approach to automate the packaging. Before that, I used  
a script called `mdpc` (1.0) which I posted to this mailing list at the time it  
was written. Afterwards, it did not really change anymore... and it works  
until today “mostly” -- for instance, it is highly dependent on the host  
system and some of its functions have not been used for at least a year...:  
https://lists.debian.org/debian-user/2013/08/msg00042.html

¹) Debian package `docker.io`. Note: Docker is a good substitute for most  
chroot uses (and many VM uses, too), but it loses much of their  
lightweightness and running Docker as regular user is still experimental (I  
did not try it yet...). Additionally, it is one of the more complicated  
tools out there...

HTH
Linux-Fan

öö

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Building my own packages Victor Sudakov <vas@sibptus.ru> - 2020-11-04 15:40 +0100
  Re: Building my own packages Reco <recoverym4n@enotuniq.net> - 2020-11-04 16:40 +0100
    Re: Building my own packages Victor Sudakov <vas@sibptus.ru> - 2020-11-05 05:50 +0100
  Re: Building my own packages songbird <songbird@anthive.com> - 2020-11-04 17:50 +0100
    Re: Building my own packages Victor Sudakov <vas@sibptus.ru> - 2020-11-05 06:00 +0100
      Re: Building my own packages Linux-Fan <Ma_Sys.ma@web.de> - 2020-11-05 23:50 +0100
        Re: Building my own packages Victor Sudakov <vas@sibptus.ru> - 2020-11-11 06:20 +0100
          Re: Building my own packages Andrei POPESCU <andreimpopescu@gmail.com> - 2020-11-11 09:20 +0100
      Re: Building my own packages deloptes <deloptes@gmail.com> - 2020-11-06 08:40 +0100
        Re: Building my own packages Victor Sudakov <vas@sibptus.ru> - 2020-11-11 06:30 +0100
          Re: Building my own packages deloptes <deloptes@gmail.com> - 2020-11-11 08:00 +0100
          Re: Building my own packages Andrei POPESCU <andreimpopescu@gmail.com> - 2020-11-11 09:30 +0100
          Re: Building my own packages <tomas@tuxteam.de> - 2020-11-11 09:30 +0100
  Re: Building my own packages "Thomas Schmitt" <scdbackup@gmx.net> - 2020-11-04 19:00 +0100
    Re: Building my own packages Victor Sudakov <vas@sibptus.ru> - 2020-11-05 06:10 +0100
      Re: Building my own packages "Thomas Schmitt" <scdbackup@gmx.net> - 2020-11-05 08:30 +0100
  Re: Building my own packages <tomas@tuxteam.de> - 2020-11-04 22:30 +0100
    Re: Building my own packages Victor Sudakov <vas@sibptus.ru> - 2020-11-05 06:40 +0100
      Re: Building my own packages <tomas@tuxteam.de> - 2020-11-05 09:30 +0100
        Re: Building my own packages Victor Sudakov <vas@sibptus.ru> - 2020-11-05 17:00 +0100
          Re: Building my own packages <tomas@tuxteam.de> - 2020-11-05 17:20 +0100
            Re: Building my own packages Stefan Monnier <monnier@iro.umontreal.ca> - 2020-11-05 18:20 +0100
              Re: Building my own packages <tomas@tuxteam.de> - 2020-11-05 19:30 +0100
  Re: Building my own packages Alex Mestiashvili <amestia@rsh2.donotuse.de> - 2020-11-05 11:20 +0100

csiph-web