From owner-freebsd-hackers@freebsd.org Wed Jun 6 09:21:51 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 704E3FEE4CF for ; Wed, 6 Jun 2018 09:21:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 097216BEAE for ; Wed, 6 Jun 2018 09:21:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id C1AC3FEE4CE; Wed, 6 Jun 2018 09:21:50 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C404FEE4CD for ; Wed, 6 Jun 2018 09:21:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07F0C6BEAB for ; Wed, 6 Jun 2018 09:21:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [10.10.154.196] (unknown [185.93.6.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 7F35843EB7; Wed, 6 Jun 2018 11:21:48 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_99A4AD14-D128-49F2-AB15-B200EA4D5128"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: Cleanest way of merging back changes to syslogd(8)? Date: Wed, 6 Jun 2018 11:21:39 +0200 In-Reply-To: Cc: hackers@freebsd.org, Dave Cottlehuber To: Ed Schouten References: X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2018 09:21:51 -0000 --Apple-Mail=_99A4AD14-D128-49F2-AB15-B200EA4D5128 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 6 Jun 2018, at 10:48, Ed Schouten wrote: >=20 > Some time ago, Dave (cc) asked me whether I'd be interested in merging > back the RFC 5424 / ISO 8601 message format changes I made to > syslogd(8) to stable/11. Now that stable/11 is open again, I thought > I'd go and take a look at doing this. >=20 > It turns out that merging these changes back is quite challenging. The > copy of syslogd(8) in HEAD has diverged very strongly over the last > couple of years. There have also been some direct commits to > stable/11, so it seems to be (practically) impossible to come up with > an invocation of 'svn merge' that does what I expect it would. >=20 > Because of this, I am considering syncing syslogd(8) between stable/11 > and HEAD entirely. More concrete, I want to do this: >=20 > stable-11 $ cp ../head/usr.sbin/syslogd/* usr.sbin/syslogd/ > stable-11 $ svn revert usr.sbin/syslogd/Makefile.depend > stable-11 $ svn commit >=20 > My question is, what's the right way of doing this with SVN (e.g., > w.r.t. mergeinfo)? Try: svn merge --accept=3Dtheirs-full ^/head/usr.sbin/syslogd = usr.sbin/syslogd which will "overwrite-merge" everything from head's version of syslogd into stable/11's version of it. After that, I am left with the following diff: --- head/usr.sbin/syslogd/syslogd.c 2018-05-13 15:36:09.124043000 = +0000 +++ stable-11/usr.sbin/syslogd/syslogd.c 2018-06-06 = 09:15:14.398673000 +0000 @@ -744,7 +744,7 @@ main(int argc, char *argv[]) fdsrmax =3D sl->sl_socket; } fdsr =3D (fd_set *)calloc(howmany(fdsrmax+1, NFDBITS), - sizeof(*fdsr)); + sizeof(fd_mask)); if (fdsr =3D=3D NULL) errx(1, "calloc fd_set"); @@ -763,7 +763,7 @@ main(int argc, char *argv[]) } bzero(fdsr, howmany(fdsrmax+1, NFDBITS) * - sizeof(*fdsr)); + sizeof(fd_mask)); STAILQ_FOREACH(sl, &shead, next) { if (sl->sl_socket !=3D -1 && sl->sl_recv !=3D = NULL) For some reason, the MFC of r332877 (in r333356) gets overwritten. I guess there is nothing to do but manually correct that again. Oh, and if you want to commit this, you'll have to attempt to defeat the rather silly pre-commit scripts that want to limit subversion merge information. The svn:mergeinfo property on the usr.sbin/syslogd directory will have to be moved to the root of the stable/11 tree, I'm not sure off the top of my head how that should be done. -Dimitry --Apple-Mail=_99A4AD14-D128-49F2-AB15-B200EA4D5128 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWxenowAKCRCwXqMKLiCW o3tZAJ9yXg+D/8ukFoMVepnDdHXaMACr5ACg91NdIX4fQXPUr1nkpT7AK9L0MZc= =2hYO -----END PGP SIGNATURE----- --Apple-Mail=_99A4AD14-D128-49F2-AB15-B200EA4D5128--