-
Notifications
You must be signed in to change notification settings - Fork 50
CFLAGS for downstream #56
Comments
While I can sympathize with the sentiment, I think it would be dangerous for us to be adding these as a blanket at this level. In my mind, if the Debian project feels that these are the appropriate defaults for all compilation within a Debian environment, then they ought to adjust GCC's defaults directly to match these values (or petition GCC upstream to do so). |
I don't believe that's wise. I'd prefer a compiler which behaved consistently with expectations, at least as best as that can be met. I'd suggest adding these flags to the next release of Debian's Docker image, rather than current (i.e. not to debian:jessie). If you're inclined to upgrade to a new version of Debian for your Docker base image without testing, you deserve what you get; I will agree that adding them to a current release and suddenly changing a lot of stuff that's built The considerations are thus, to my senses:
I feel these are appropriate defaults for compilation within downstream Docker images based on Debian. Debian's own packages are built with these flags, as per
In essence, I am only suggesting building with similar compilation flags, although mine are different. The most conservative would be I'd shy away from -g, -O2, and so forth in an upstream distro base image. |
This repository is now deprecated in favor of https://github.com/debuerreotype/docker-debian-artifacts, which builds reproducible Debian rootfs tarballs using https://github.com/debuerreotype/debuerreotype. 👍 |
As per docker-library/php#272
Would it make more sense to drop that into the Debian Dockerfile, so as to immediately apply to all downstream images using compiled-from-source automake code?
This is a rather complex question. In general, it's well-understood that the stack smash protector, position-independent executable, and linker optimization flags do not break anything; most distributions use them as standard in all packages now. On the other hand, a change at the level of the base Docker image would hit everything at once, potentially causing confusion when a rebuild fails.
Technically, the risk is near-zero (approximately nothing should break, and anything that does break is easily-fixed by the maintainers); the risk of not putting SSP and PIE CFLAGS into the environment is loads of vulnerable applications on Docker hub with no mitigation. That risk is, of course, not Debian's concern per-se.
The effort to get downstream applications vendors to update their containers is as big as every single application; while the effort to fix broken applications is as big as only those which break, adding lines to unset CFLAGS and LDFLAGS in the environment. Efficient.
The text was updated successfully, but these errors were encountered: