Bug 134728 - Refactoring of the mail/postfix port to ease maintenance
Summary: Refactoring of the mail/postfix port to ease maintenance
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-19 22:30 UTC by Yarema
Modified: 2009-05-26 14:40 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (29.04 KB, patch)
2009-05-19 22:30 UTC, Yarema
no flags Details | Diff
postfix.diff (30.24 KB, patch)
2009-05-20 16:56 UTC, Yarema
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yarema 2009-05-19 22:30:01 UTC
This patch is mostly a refactoring of mail/postfix to make it simpler
to maintain and to bring it closer in line with hier(7).

Delete:	files/patch-conf::main.cf
	files/patch-conf::post-install
	files/patch-src::global::mail_params.h
	pkg-install
	pkg-message

Add:	files/pkg-install.in
	files/pkg-message.in

The deleted patch-* files are replaced with the ${REINPLACE} macro in
the Makefile which performs the same edits as the patch files did and
then some to bring the installed config and doc files closer to the
way things are actually installed.

The WITH_VDA section now uses ${PORTVERSION} instead of hardcoding.
And the VDA_README is now installed when appropriate.

The duplication of parameters to postfix-install in the do-install
target and to libexec/postfix/post-install in the pkg-install script
is replaced with compile time DEFs in the POSTFIX_CCARGS macro as per
section 4.4 of the INSTALL documentation.

Files previously installed in ${PREFIX}/etc/postfix/dist now go in
${EXAMPLESDIR} as per hier(7).

To install and test the attached diff:

cd /usr/ports/mail/postfix
patch -p1 < path_to_diff/postfix.diff
find . -type f \( -size 0c -o -name \*.orig \) -delete

How-To-Repeat: cd /usr/ports/mail/postfix && make install
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2009-05-19 22:30:12 UTC
Maintainer of mail/postfix,

Please note that PR ports/134728 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/134728

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2009-05-19 22:30:14 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Sahil Tandon 2009-05-20 04:45:14 UTC
The proposed changes are sound and in very quick tests, the port appears to
build OK.  However, there is a small error (output from the post-install
script) towards the end of the installation process:

...

Installed configuration examples in /usr/local/share/examples/postfix
/usr/local/libexec/postfix/post-install: Error: /postfix-files is not a file.

...

I won't have time to isolate the problem until this weekend, but just
pointing it out in case you have time later this week.

-- 
Sahil Tandon <sahil@tandon.net>
Comment 4 Sahil Tandon 2009-05-20 13:48:38 UTC
And while we're at it, might as well embed an update to 2.6.1  
(released late last night to fix file corruption in the Milter code)  
in your refactoring; then we needn't bump PORTREVISION.
Comment 5 Yarema 2009-05-20 16:23:47 UTC
Sahil Tandon wrote:
> The proposed changes are sound and in very quick tests, the port
> appears to build OK.  However, there is a small error (output from
> the post-install script) towards the end of the installation process:
>
> ...
>
> Installed configuration examples in /usr/local/share/examples/postfix
> /usr/local/libexec/postfix/post-install: Error: /postfix-files
> is not a file.
>
> ...
>
> I won't have time to isolate the problem until this weekend, but just
> pointing it out in case you have time later this week.

Sahil Tandon wrote:
> And while we're at it, might as well embed an update to 2.6.1
> (released late last night to fix file corruption in the Milter code)
> in your refactoring; then we needn't bump PORTREVISION.

Right on.  I updated my revision to 2.6.1 and looking into that error
you spotted.  It's being thrown by pkg-install when it runs:

/bin/sh ${PREFIX}/libexec/postfix/post-install tempdir=/tmp \
upgrade-package

-- 
Yarema
Comment 6 Yarema 2009-05-20 16:56:55 UTC
New diff attached.  Bumps the version to 2.6.1 and fixes the call to
post-install by specifying the daemon_directory parameter so that
$daemon_directory/postfix-files can be found.  Gets rid of the following:

/usr/local/libexec/postfix/post-install: Error: /postfix-files is not a
file.

-- 
Yarema
Comment 7 Sahil Tandon 2009-05-20 18:16:08 UTC
Thank you sir; the revised patch is approved!
>>
>>
>>
>>
Comment 8 Mark Linimon freebsd_committer freebsd_triage 2009-05-21 05:29:44 UTC
State Changed
From-To: feedback->open

revised patch has been approved by maintainer.
Comment 9 dfilter service freebsd_committer freebsd_triage 2009-05-26 14:36:17 UTC
netchild    2009-05-26 13:36:08 UTC

  FreeBSD ports repository

  Modified files:
    mail/postfix         Makefile distinfo pkg-plist 
    mail/postfix/files   patch-makedefs postfix.sh.in 
  Added files:
    mail/postfix/files   pkg-install.in pkg-message.in 
  Removed files:
    mail/postfix         pkg-install pkg-message 
    mail/postfix/files   patch-conf::main.cf 
                         patch-conf::post-install 
                         patch-src::global::mail_params.h 
  Log:
  - refactor the port to ease maintenance [1]
  - update to 2.6.1 [1]
  - remove IGNORE in the VDA case, the patch is available now [2]
  
  [2] is from me (compile tested), maintainer informed.
  
  PR:             134728 [1]
  Submitted by:   Yarema <yds@CoolRat.org> [1]
  Approved by:    maintainer [1]
  
  Revision  Changes    Path
  1.145     +72 -52    ports/mail/postfix/Makefile
  1.100     +6 -3      ports/mail/postfix/distinfo
  1.5       +0 -80     ports/mail/postfix/files/patch-conf::main.cf (dead)
  1.2       +0 -11     ports/mail/postfix/files/patch-conf::post-install (dead)
  1.7       +5 -7      ports/mail/postfix/files/patch-makedefs
  1.3       +0 -38     ports/mail/postfix/files/patch-src::global::mail_params.h (dead)
  1.1       +156 -0    ports/mail/postfix/files/pkg-install.in (new)
  1.1       +25 -0     ports/mail/postfix/files/pkg-message.in (new)
  1.7       +5 -5      ports/mail/postfix/files/postfix.sh.in
  1.28      +0 -167    ports/mail/postfix/pkg-install (dead)
  1.15      +0 -25     ports/mail/postfix/pkg-message (dead)
  1.28      +26 -36    ports/mail/postfix/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 10 Alexander Leidinger freebsd_committer freebsd_triage 2009-05-26 14:36:47 UTC
State Changed
From-To: open->closed

Patch committed (together with removing the IGNORE in the VDA case).