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

Re: Bug#1064346: Source is missing errors on HTML source files



On 2024-02-22 11:37 +0530, Shriram Ravindranathan wrote:
> Thank you Bastien,
> I tried doing this but it appears that the scripts to build these example
> files all depend on having the highlight binary itself installed on the
> machine. I am unsure whether it is okay to have the package depend on itself
> for building.

Packages that use themselves to build are problematic for bootstrapping and cross-building. 

When cross-building you can't (usually) run the binaries just built
because they are the wrong architecture.

When bootstrapping packages that depend on themselves cause dependency
loops which are a pain (we can't build foo because we don't have foo
yet). We have 'build profiles' (older name 'staged builds') to deal
with this. i.e you define a minimum 'stage1' build profile which does
not have the circular dependency (and the normal build which does) so
the building of the final version can be automated.

The choices here are to
1) use the binary just build during the build
2) have a self dependency and use a packaged binary

1) Is simple but prevents the package cross-building. Usually the best
thing to do is just skip that part if cross-building (you can live without the examples)
Just ensure that the build doesn't fail due to missing files.

2) Works for cross-building (by the magic of multiarch) but you should
add a stage notation so it can easily be built for new architectures,
which is a bit of a faff.

In case '2' you have to worry about version skew. How much does it
matter if examples/whatever are built with the previous/an older
version of the package? Case '1' avoids this. This is very specific to
the package in question: sometimes it needs to be exactly the same,
sometimes a version from a decade ago will be just fine. This is the
main reason people usually pick option '1'.

https://wiki.debian.org/BuildProfileSpec
https://wiki.debian.org/DebianBootstrap
https://wiki.debian.org/CrossBuildPackagingGuidelines

All the above is quite a lot to take in, and you don't need to worry
too much, but it is a good idea to at least have this stuff in the
back of your mind when packaging. Ideally this would all work
correctly on the whole archive, and packagers are the ones best-placed
to stick in the necessary runes.

Wookey
-- 
Principal hats:  Debian, Wookware, ARM
http://wookware.org/

Attachment: signature.asc
Description: PGP signature


Reply to: