From owner-svn-src-stable@freebsd.org Thu Aug 6 18:13:46 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4AD1B3A8244; Thu, 6 Aug 2020 18:13:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BMxSp12Ghz4QZp; Thu, 6 Aug 2020 18:13:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 08171B045; Thu, 6 Aug 2020 18:13:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 076IDjI5021512; Thu, 6 Aug 2020 18:13:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 076IDjdu021510; Thu, 6 Aug 2020 18:13:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202008061813.076IDjdu021510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 6 Aug 2020 18:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r363973 - in stable/12: etc etc/mail usr.sbin/mailwrapper X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/12: etc etc/mail usr.sbin/mailwrapper X-SVN-Commit-Revision: 363973 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2020 18:13:46 -0000 Author: kevans Date: Thu Aug 6 18:13:45 2020 New Revision: 363973 URL: https://svnweb.freebsd.org/changeset/base/363973 Log: MFC r361720, r362787: Simplify mailer.conf installation r361720: pkgbase: resolve mailer.conf conflict WITHOUT_SENDMAIL When WITHOUT_SENDMAIL is set, we end up with two different mailer.conf that conflict, and hilarity ensues. There's currently three different places that we might install mailer.conf: - ^/etc/Makefile (package=runtime, contingent on MK_MAIL != no) - ^/libexec/dma/dmagent/Makefile (package=dma, contingent on MK_SENDMAIL != no) - ^/usr.sbin/mailwrapper/Makefile (package=utilities, contingent on not-installed) The mailwrapper installation will effectively never happen because the ^/etc one will first. This patch simplifies the whole situation; remove the ^/etc/Makefile version and install it primarily in mailwrapper if MK_MAILWRAPPER != "no". The scenarios covered in mailwrapper are: - sendmail(8) is installed, dma(8) may or may not be installed - neither sendmail(8) nor dma(8) is installed In the first scenario, sendmail(8) is dominant so we can go ahead and install the version in ^/etc/mail. In the unlisted scenario, sendmail(8) is not installed but dma(8) is, we'll let ^/libexec/dma/dmagent do the installation. In the second listed scenario, we still want to install an example mailer.conf so just install the base sendmail(8) version. r362787: mailwrapper: switch mailer.conf to CONFS This matches what was already being done in dma(8), and should again make this merge with etcupdate/mergemaster. Modified: stable/12/etc/Makefile stable/12/etc/mail/mailer.conf stable/12/usr.sbin/mailwrapper/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/etc/Makefile ============================================================================== --- stable/12/etc/Makefile Thu Aug 6 17:49:19 2020 (r363972) +++ stable/12/etc/Makefile Thu Aug 6 18:13:45 2020 (r363973) @@ -25,11 +25,10 @@ BIN1= \ BIN1+= rc.sendmail .endif -.if ${MK_SENDMAIL} == "no" -ETCMAIL=mailer.conf aliases -.else -ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \ - mailertable.sample aliases +ETCMAIL=aliases +.if ${MK_SENDMAIL} != "no" +ETCMAIL+=Makefile README access.sample virtusertable.sample \ + mailertable.sample .endif # Special top level files for FreeBSD Modified: stable/12/etc/mail/mailer.conf ============================================================================== --- stable/12/etc/mail/mailer.conf Thu Aug 6 17:49:19 2020 (r363972) +++ stable/12/etc/mail/mailer.conf Thu Aug 6 18:13:45 2020 (r363973) @@ -2,6 +2,9 @@ # # Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail # +# If dma(8) is installed, an example mailer.conf that uses dma(8) instead can +# can be found in /usr/share/examples/dma. +# sendmail /usr/libexec/sendmail/sendmail mailq /usr/libexec/sendmail/sendmail newaliases /usr/libexec/sendmail/sendmail Modified: stable/12/usr.sbin/mailwrapper/Makefile ============================================================================== --- stable/12/usr.sbin/mailwrapper/Makefile Thu Aug 6 17:49:19 2020 (r363972) +++ stable/12/usr.sbin/mailwrapper/Makefile Thu Aug 6 18:13:45 2020 (r363973) @@ -26,10 +26,14 @@ SYMLINKS+= ..${BINDIR}/mailwrapper /bin/rmail .endif .if ${MK_MAILWRAPPER} != "no" -.if !exists(${DESTDIR}/etc/mail/mailer.conf) -FILES= ${SRCTOP}/etc/mail/mailer.conf -FILESDIR= /etc/mail -FILESMODE= 644 +# We install here if either sendmail(8) is enabled, or dma(8) isn't. In the +# latter scenario, we take care of the possibility that neither sendmail(8) nor +# dma(8) are installed and simply provide a default that can be changed for an +# alternative in ports. +.if ${MK_SENDMAIL} != "no" || ${MK_DMAGENT} == "no" +CONFS= ${SRCTOP}/etc/mail/mailer.conf +CONFSDIR= /etc/mail +CONFSMODE= 644 .endif .endif