Re: Issue with installing manually created Debian archive with APT

2021-08-01 Thread Hunter Wittenborn
> why are you attempting to create the .deb yourself, instead of using Debian 
> tooling. Can't you simply build dpkg under Arch and try to use it directly?



I *can* in fact already do that, as dpkg is already packaged and inside Arch 
Linux's repositories [1].



The reason I'm wanting to do it manually is that I'm appearing to get quite a 
bit of a speed gain from doing so. On relatively tiny packages, it doesn't make 
much of a difference, but as I'm creating more bulky-sized packages, the 
difference is appearing to make more and more of a difference.



It doesn't appear to be some kind of placebo effect either - running 'time dpkg 
-b package/' has always shown to be churning out a package slower than  'time 
/script.sh', where 'script.sh' would contain, again, the commands found in my 
project [2].



Lastly, to wrap it all up then: This isn't a problem with the available tools 
on any given distro, but rather a problem with speed that I'm wishing to solve 
(likewise by creating the package manually, but alas the size issue with APT is 
still cropping up).



[1]: https://archlinux.org/packages/community/x86_64/dpkg/

[2]: 
https://github.com/makedeb/makedeb/blob/alpha/src/functions/fakeroot_build.sh#L47-L53

Re: Issue with installing manually created Debian archive with APT

2021-08-01 Thread David Kalnischkies
On Sat, Jul 31, 2021 at 04:20:25PM -0500, Hunter Wittenborn wrote:
> When I try installing the packages my program builds (with 'apt install 
> ./debname.deb'), it works fine. But if I then try to reinstall the package 
> (with 'apt reinstall ./debname.deb'), this error keeps popping up for some 
> reason (the variables surrounded by '{}' represent values in a control file):
> 
> Repository is broken: {Package}:{Architecture} (= {Version}) has no Size 
> information
> 
> Is there anything I'm doing wrong when creating the .deb package […]

Maybe as dpkg does a bit more than just tar and stuff while building
packages, but no, this message is due to a bug of sorts in apt:
https://salsa.debian.org/apt-team/apt/-/merge_requests/177

The changes are already merged to main and should be in experimental,
which was also the only release pocket effected in Debian (well,
technically the misconception as such is a few years old, but the
code equally hiding and bringing it to light is not).

Not sure about the state in Ubuntu, but I guess its only their
development release und only until the next sync/upload.


You can btw use -o Acquire::AllowUnsizedPackages=1 to disable this check.
Or, simply don't try to reinstall packages for (probably) no reason…


Best regards

David Kalnischkies


signature.asc
Description: PGP signature


Re: Issue with installing manually created Debian archive with APT

2021-08-01 Thread Thomas Goirand
On 7/31/21 11:20 PM, Hunter Wittenborn wrote:
> I'm working on a project that [1] that aims to bring the PKGBUILD format
> used on Arch Linux to Debian. That's besides the point though, and it's
> mainly just to help showcase what I'm doing brought me to my current issue.
> 
> Anyway, part of the process that my program previously used is running
> 'dpkg -b' to build a directory layout into a .deb package. This always
> seemed to take forever though, and I've since gone with just creating
> the .deb package manually [2] with tar and ar.
> 
> When I try installing the packages my program builds (with 'apt install
> ./debname.deb'), it works fine. But if I then try to reinstall the
> package (with 'apt reinstall ./debname.deb'), this error keeps popping
> up for some reason (the variables surrounded by '{}' represent values in
> a control file):
> 
> Repository is broken: {Package}:{Architecture} (= {Version}) has no Size
> information
> 
> Is there anything I'm doing wrong when creating the .deb package (mainly
> concerned with link 2 where the actual package creation takes place)?
> I've tried looking at 'dpkg-deb/build.c' in dpkg's source code [3] to
> see what dpkg might be doing when building packages, but nothing I tried
> got me to any solution.

The question is: why are you attempting to create the .deb yourself,
instead of using Debian tooling. Can't you simply build dpkg under Arch
and try to use it directly?

Cheers,

Thomas Goirand (zigo)



Issue with installing manually created Debian archive with APT

2021-07-31 Thread Hunter Wittenborn
I'm working on a project that [1] that aims to bring the PKGBUILD format used 
on Arch Linux to Debian. That's besides the point though, and it's mainly just 
to help showcase what I'm doing brought me to my current issue.



Anyway, part of the process that my program previously used is running 'dpkg 
-b' to build a directory layout into a .deb package. This always seemed to take 
forever though, and I've since gone with just creating the .deb package 
manually [2] with tar and ar.



When I try installing the packages my program builds (with 'apt install 
./debname.deb'), it works fine. But if I then try to reinstall the package 
(with 'apt reinstall ./debname.deb'), this error keeps popping up for some 
reason (the variables surrounded by '{}' represent values in a control file):



Repository is broken: {Package}:{Architecture} (= {Version}) has no Size 
information



Is there anything I'm doing wrong when creating the .deb package (mainly 
concerned with link 2 where the actual package creation takes place)? I've 
tried looking at 'dpkg-deb/build.c' in dpkg's source code [3] to see what dpkg 
might be doing when building packages, but nothing I tried got me to any 
solution.



[1]: https://github.com/makedeb/makedeb

[2]: 
https://github.com/makedeb/makedeb/blob/alpha/src/functions/fakeroot_build.sh#L44-L53

[3]: 
https://salsa.debian.org/dpkg-team/dpkg/-/blob/main/dpkg-deb/build.c#L504-513

---

Hunter Wittenborn

https://www.hunterwittenborn.com

https://github.com/hwittenborn