This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] nscd_stat.c: make the build reproducible


On 09 Mar 2016 08:54, Aurelien Jarno wrote:
> On 2016-03-08 18:37, Mike Frysinger wrote:
> > On 08 Mar 2016 18:06, Aurelien Jarno wrote:
> > > nscd_stat.c uses the __DATE__ and __TIME__ macros to make sure the
> > > client and the server use the same format. This prevents reproducible
> > > builds and fails to build with -Werror=date-time. In addition another
> > > build of the same file a bit later does not necessary imply a change
> > > in the format.
> > > 
> > > Instead compute a checksum of the file in the Makefile and pass it to
> > > the preprocessor with the -D option. Use the md5sum command limited to
> > > 20 characters to avoid changing the structure size.
> > 
> > this doesn't take into consideration the HAVE_SELINUX knob ...
> 
> Correct. Back to the design board, I'll try to provide a new solution.
> Don't hesitate to tell if you have ideas.

mix in the value of $(have-selinux), and put a comment above the struct
saying that the Makefile needs to be updated whenever the struct changes.

although i think this also doesn't take into account other differences
(alignment/sizes).  this is a struct that is transmitted over the unix
socket ?  so if i launch a 32bit x86 app on a system with a 64bit x86_64
nscd, it won't work.

would it be so terrible to properly marshall this data ?
-mike

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]