On Fri, Aug 17, 2018 at 07:33:02PM +0100, Ian Jackson wrote: > Adrian Bunk writes ("Bug#904302: Why outlawing vendor-specific patch series > would be a bad idea"): > > The main misconception is that there would always be *the* source. > > > > Steps you might have before the compilation starts: > > 1. dpkg unpacks upstream sources > > 2. dpkg applies patches > > 3. debian/rules unpacks upstream tarballs as part of the build > > 4. debian/rules applies patches based on distribution > > 5. debian/rules applies patches based on release > > 6. debian/rules applies patches based on architecture > > I disagree that (4) should ever be relevant. There should never be > any patchese applied conditionally based on dpkg-vendor, for the > reasons I explained very recently in response to the liferea example./ > > We don't ever do (5), do we ? Please tell me we don't. We can have > different source code in our different releases.
For packages like src:firefox-esr the same source code might be maintained to support releases ranging from oldoldstable to unstable - 52.8.0esr-1~deb7u1 is a security update for wheezy that is technically a backport of a package in buster/sid. I do not know whether firefox-esr does patching based on release right now, but this is a case where one package is being used to provide security support for up to 4 different Debian releases at the same time. I would also not be surprised if some package would do different patching based on release for easy rebuilding in stable-backports, this would sound like a natural solution to me. > I can see that (6) might be needed in some exceptional cases but > normally there is a better way. As I said, src:gcc-8 does all of steps 3-6. Much of the relevant code is in https://sources.debian.org/src/gcc-8/8.2.0-4/debian/rules.patch/ Things are even more interesting due to this being a debian/ shared between Debian and Ubuntu which are using different upstream sources.[1] > Ian. cu Adrian [1] GFDL -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed