:: Re: [DNG] Installing local .deb fil…
Página Principal
Delete this message
Reply to this message
Autor: Ralph Ronnquist
Data:  
Para: dng
Assunto: Re: [DNG] Installing local .deb files with dependencies
On Thu, Jul 27, 2023 at 02:09:23PM +0200, tito via Dng wrote:
> On Thu, 27 Jul 2023 21:43:27 +1000
> Ralph Ronnquist <rrq@???> wrote:
>
> > On Thu, Jul 27, 2023 at 01:14:23PM +0200, Antony Stone wrote:
> > > Hi.
> > >
> > > I'm playing with FreeSwitch and trying to get it to do something it currently
> > > doesn't, therefore I need to modify the source code and recompile.
> > >
> > > I've downloaded the source Debian package and I can build it (so far without
> > > modifications, just to check I'm building something that works the same as the
> > > standard release).
> > >
> > > However, this then results in 347 .deb binary packages being left in a
> > > directory on my local machine.
> > >
> > > Looking on a machine where I've done a "standard" installation of the binary
> > > package/s, I find that around 120 have been installed (based on the
> > > dependencies starting from the "freeswitch-meta-all" package, which is what I
> > > told apt to do).
> > >
> > > So, to install the .deb files I now have on my local machine, "dpkg -i" will
> > > install whatever I tell it to, with no consideration about dependencies.
> > >
> > > "apt" will install packages with their dependencies but (as far as I know) not
> > > from files on the local machine - only from some properly-structured repository
> > > listed in sources.list
> > >
> > > So, does anyone know what tool I can use to install "freeswitch-meta-all" and
> > > its required dependencies, when those .debs now exist in a directory on my
> > > local machine?
> > >
> > >
> > > Thanks,
> >
> > Slightly more verbose: use a soruces.list line like:
> >
> > deb [trusted=yes] file:/home/ralph/src/devuan/builds ./
> >
> > You then need to ha a "Packages.gz" file in that directory with the
> > control blocks for each of the .deb packages; something like the
> > following:
> > ----------
> > for P in *.deb ; do
> > ar p $P control.tar.xz | tar xOJf - ./control
> > echo
> > done | gzip > Packages.gz
> > ----------
> >
> > Ralph.
> >
> > >
> > >
> > > Antony.
> > >
> > > --
> > > My life is going completely according to plan.
> > >
> > > I do sometimes wish it had been *my* plan, though.
> > >
> > >                                                    Please reply to the list;
> > >                                                          please *don't* CC me.
> > > _______________________________________________
> > > Dng mailing list
> > > Dng@???
> > > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> > _______________________________________________
> > Dng mailing list
> > Dng@???
> > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

>
> Hi,
> I use this script.
>
> Hope it helps.
>
> Ciao,
> Tito
>
> #!/bin/sh
> cd /YOURDIR
> rm -fr Release
> rm -fr Packages
> dpkg-scanpackages --hash sha256 --arch amd64 -m . > Packages
> apt-ftparchive release . > Release
> rm -fr Release.gpg
> gpg --default-key YOURKEY --digest-algo SHA256 --armor --output Release.gpg --detach-sign Release
> rm -fr InRelease
> gpg --default-key YOURKEY --digest-algo SHA256 --clearsign --output InRelease Release
> # To sign debs
> #dpkg-sig -k YOURKEY --sign repo *.deb
> # To check
> #dpkg-sig -c *.deb
> # to serve with apache
> #chown -R www-data.www-data .
> _______________________________________________


Yes, dpkg-scanpackages is better; for one thing it works :)

But for a local debug "repo" it may be better to avoid generating the
Release and InRelease files as otherwise you also need to register
your repo key. Without those, apt is happy enough to use the Packages
file.

Of course if you publish your .deb the Release and InRelease files
as well as the key would be needed.

Ralph.

> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng