Re: -ffile-prefix-map option and reproducibility
I'm end up with following thing:
Hovewer, "execute_before_dh_builddeb" recipe is for information only
(to be viewed by human) and "execute_before_dh_install" recipe is for
ср, 8 февр. 2023 г. в 13:39, Guillem Jover <email@example.com>:
> On Tue, 2023-02-07 at 20:00:06 +0100, Sven Joachim wrote:
> > On 2023-02-07 17:50 +0100, Guillem Jover wrote:
> > > On Tue, 2023-02-07 at 16:41:47 +0100, Stéphane Glondu wrote:
> > >> I suspect this was added to improve reproducibility. Ironically, it makes
> > >> packages that capture this variable non reproducible, since the build path
> > >> seems to be randomized (has it always been the case? since when?). It is the
> > >> case of OCaml (see #1030785), and seemingly of R as well (found by grepping
> > >> in my /etc). I wouldn't be surprised other packages are affected as well.
> > >
> > > AFAIR this was considered at the time, yes. If the flag is effectively
> > > not fixing anything for the set of packages involved, and is in fact
> > > actually making them unreproducible when they would not then, you can
> > > disable the fixfilepath feature in the reproducible build flags area,
> > > via DEB_BUILD_MAINT_OPTIONS.
> > This does not help for packages which capture all build flags and store
> > them in some file in the package (as is the case here). With
> > DEB_BUILD_MAINT_OPTIONS=reproducible=-fixfilepath, dpkg-buildflags falls
> > back to "-fdebug-prefix-map=<BUILDDIR>=.", and you have the same
> > problem. If you disable that as well via
> > DEB_BUILD_MAINT_OPTIONS=reproducible=-fixfilepath,-fixdebugpath, the
> > -dbgsym packages will most likely end up unreproducible.
> Ah, you are absolutely right. I don't think the case of these flags
> making the build unreproducible and the package not generating any
> debug objects are going to be common at all. I considered mentioning
> fixing the build to stop capturing, but felt it might be more effort
> than requested. :) Should probably have mentioned anyway, as was done
> elsewhere in the thread.
> In any case I'm thinking to add something like the attached to the man
> page to try to clarify this.