Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jun 2018 11:21:39 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Ed Schouten <ed@nuxi.nl>
Cc:        hackers@freebsd.org, Dave Cottlehuber <dch@skunkwerks.at>
Subject:   Re: Cleanest way of merging back changes to syslogd(8)?
Message-ID:  <AFD47305-EA3F-4E31-A3D5-DC6C10EBBB77@FreeBSD.org>
In-Reply-To: <CABh_MKkFCgMEQzGWmXb9=Dr_93V%2BTx6yvtOD-i1%2BzhrktnSS3Q@mail.gmail.com>
References:  <CABh_MKkFCgMEQzGWmXb9=Dr_93V%2BTx6yvtOD-i1%2BzhrktnSS3Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <ed@nuxi.nl> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AFD47305-EA3F-4E31-A3D5-DC6C10EBBB77>