tech-toolchain archive

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

Re: Reproducible build (a.k.a deterministic build)



On Tue, Feb 17, 2009 at 04:12:30PM -0500, Perry E. Metzger wrote:
> 
> Masao Uebayashi <uebayasi%gmail.com@localhost> writes:
> > What I've changed:
> >
> > - Hack cpp(1) to strip __FILE__'s prefix.
> >   - At the moment, hint prefix is given to cpp(1) via environment.
> 
> Probably a flag to cpp would be best in a final version, along with
> appropriate use of the flag in build.sh.

Ideally it should be something like the -S engine in pax, I think.

> > - Hack g++(1) to strip file prefix which is used in mangled absolute path.
> >   - Using environment too.
> >   - perry@ said this can be avoided by not passing ${TOP} as build seed.
> >     I've not checked that.
> 
> Right now we include the full path via a rule in sys.mk -- we can fix
> sys.mk to strip ${TOP} off if it is set.

Do we? The only case that isn't normalised right now is ${.TARGET}, so
do we have cases where a full path name is used as target?

> > - Remove debug build (${CC} -g) which embeds source paths into objects.
> 
> Hrm. I think we really want to keep debugging libraries -- we can
> perhaps replace the prefix with /usr/src somehow.

That would defeat the purpose of the debug libraries. I think Uebayashi-san
was more referring to the stray CFLAGS+=-g that crept into various
Makefiles.

> > The list of ${DESTDIR} files that are not identical:
> >
> > - ./METALOG*
> > - ./etc/mtree/sets.*
> > - ./etc/release
> > - ./usr/include/krb5/*.h
> > - ./usr/libdata/lint/llib-lpam.ln
> > - ./usr/share/info/*.info
> > - ./var/db/libc.tags
> 
> We can probably fix these, too, of course.

METALOG is not part of the output, but used to generate the mtree sets.
"Fixing" those has the big disadvantage that you can't check for touched
files any longer as the timestamps won't match. I would keep
/etc/release in the current form as well.

info pages might be as simple as the attached patch.

I don't see anything obvious for the few krb5/*.h files I looked at.
Any diff?

Lint: same applies to llib-liscsi.ln

./var/db/libc.targs again would partially defeat the purpose.

Joerg
Index: makeinfo.c
===================================================================
RCS file: /home/joerg/repo/netbsd/src/gnu/dist/texinfo/makeinfo/makeinfo.c,v
retrieving revision 1.14
diff -u -p -r1.14 makeinfo.c
--- makeinfo.c  2 Sep 2008 08:00:24 -0000       1.14
+++ makeinfo.c  18 Feb 2009 08:00:37 -0000
@@ -1670,11 +1670,6 @@ convert_from_loaded_file (char *name)
         line_number++;
   }
 
-  /* html fixxme: should output this as trailer on first page.  */
-  if (!no_headers && !html && !xml)
-    add_word_args (_("This is %s, produced by makeinfo version %s from %s.\n"),
-                   output_filename, VERSION, input_filename);
-
   close_paragraph ();
 
   if (xml && !docbook)


Home | Main Index | Thread Index | Old Index