From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32317 invoked by alias); 9 Mar 2016 22:30:20 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 32164 invoked by uid 89); 9 Mar 2016 22:30:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=transmitted, nscd, haveselinux, have-selinux X-HELO: smtp.gentoo.org Date: Wed, 09 Mar 2016 22:30:00 -0000 From: Mike Frysinger To: libc-alpha@sourceware.org Subject: Re: [PATCH] nscd_stat.c: make the build reproducible Message-ID: <20160309223006.GA6588@vapier.lan> Mail-Followup-To: libc-alpha@sourceware.org References: <1457456791-17402-1-git-send-email-aurelien@aurel32.net> <20160308233738.GP6588@vapier.lan> <20160309075403.GA2444@aurel32.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="RdFV+w+cvF4K0RSy" Content-Disposition: inline In-Reply-To: <20160309075403.GA2444@aurel32.net> X-SW-Source: 2016-03/txt/msg00275.txt.bz2 --RdFV+w+cvF4K0RSy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1326 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=3Ddate-time. In addition anoth= er > > > build of the same file a bit later does not necessary imply a change > > > in the format. > > >=20 > > > 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. > >=20 > > this doesn't take into consideration the HAVE_SELINUX knob ... >=20 > 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 --RdFV+w+cvF4K0RSy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJW4KPuAAoJEEFjO5/oN/WBGsIQAKlQ2AqbkgBw68csuGvTvboM sr8dAecZvBPO/xpPJLNyNYxrt4i/g06VPXlSb0EY2WxAk3EwdBP855ipTICHsORy SCW98ChEl+RUSEYvLuCV70sPTIvDpz2F9R5TtSnRb/eXMc03pONjGIlreX2ukeiz ZUN6oJOme0dltOxF8QK2bbSoTigorgytzlPkPNl2+/sCU54yYnV7po8Vm4Z0ZhlO MVoVwId8j8tq/gbcuuQnYO3wdHLfr/pN8SsmZFqstkdMNs3nK/1RBQWzrwhSJhyb CW6c78QdM+5E5F3nhtiWBEFf/zYuw8wU9w9F0X2xkxvjbAVXCh77IJaKVDWGGZ1w 3X6VenEiMMro3cX2NZBrZkhrnOQioNxvOQNQbUyHS9IlZCH+oZKzLL/WyYHf5akN lzHgzV0tx8V1XxYxve0B4EFnmY/4+x3dROhbuMNeuYgGBI3DWoGdNlFOdC9qk4Me G2SxTtZxxq/DS5nBU8IIMjkzGTZkAjV/4LhCOqONKpqB7i2sBqKzDC75AFoHVrc4 RLf6ruI33MCFzxrPovI9WdniERQtZB81gcqtKdvCk61Kf3KFXrW+ndsUbLFurjXv kto8olp1xXiG34PYn1+x9QK8HktfwolPe1fT3wW1EdCKLlpYbKLenUEBxI/HfYI7 h8u1jBFgbm67thg/8tU+ =D54o -----END PGP SIGNATURE----- --RdFV+w+cvF4K0RSy--