Loading ...
Sorry, an error occurred while loading the content.
 

Re: misunderstanding INSTALL "vs" compile-time config ? (and MacOSX patch)

Expand Messages
  • Reindl Harald
    ... that s right but I m no longer intersted in someone s downstream idea in context of build your OWN package is in fact the wrong answer
    Message 1 of 20 , Apr 6, 2013
      Am 06.04.2013 21:22, schrieb Viktor Dukhovni:
      > On Sat, Apr 06, 2013 at 08:38:41PM +0200, Reindl Harald wrote:
      >
      >>> (1) I'm no longer intersted in someone's 'downstream idea' of what
      >>> version and how I should configure, build & use postfix
      >>
      >> what exactly did you not understand in "based on"?
      >
      > No need to hammer your point in. There's more than one way to skin
      > this cat. The OP will use whatever is most comfortable for him

      that's right

      but "I'm no longer intersted in someone's downstream idea" in
      context of "build your OWN package" is in fact the wrong answer
    • Reindl Harald
      ... adn exatcly that DOES NOT WORK because the package manager ignores the stuff in /usr/local and you hardly can remove MTA dependencies at all which means
      Message 2 of 20 , Apr 6, 2013
        Am 06.04.2013 21:22, schrieb Viktor Dukhovni:
        > Since the OP is installing into /usr/local, a non-packaged version
        > is fine. I would go further and install into:
        >
        > /usr/local/postfix/${version}/{etc,sbin,libexec,man,html}/
        >
        > with "sendmail", "mailq" and "newaliases" in
        >
        > /usr/local/postfix/${version}/sbin/
        >
        > and symlinks from /usr/sbin, /usr/bin to the right version. This
        > makes it easy to switch between versions and delete stale files.
        > For example to build with TLS support

        adn exatcly that DOES NOT WORK because the package manager ignores
        the stuff in /usr/local and you hardly can remove MTA dependencies
        at all which means every OS update may randomly overwrite your
        /usr/sbin/sendmail symlink

        been there, done that, stopped to mangle this way by learning
      • Wietse Venema
        ... No override is needed. You can trivially set these at installation time: # make install mail_owner=foo setgid_group=bar ... # make upgrade mail_owner=foo
        Message 3 of 20 , Apr 6, 2013
          Viktor Dukhovni:
          > On Sat, Apr 06, 2013 at 12:17:53PM -0700, ixloran@... wrote:
          >
          > > Will your patch be added to main source tree at any time, or is it
          > > something I'll need to tweak/modify & apply when I upgrade?
          >
          > My best guess is that Wietse will likely adopt something functionally
          > equivalent wrt the compile-time override for DEF_MAIL_OWNER and
          > DEF_SGID_GROUP.

          No override is needed.

          You can trivially set these at installation time:

          # make install mail_owner=foo setgid_group=bar ...
          # make upgrade mail_owner=foo setgid_group=bar ...

          You can even change mail_owner or setgid_group after Postfix
          is already installed:

          # postfix set-permissions mail_owner=foo setgid_group=bar ...

          This *is* documented.

          Wietse
        • Wietse Venema
          ... Also (since this thread mentioned installable packages): make package mail_owner=foo setgid_group=bar ... All the above work even without pre-existing
          Message 4 of 20 , Apr 6, 2013
            Wietse Venema:
            > Viktor Dukhovni:
            > > On Sat, Apr 06, 2013 at 12:17:53PM -0700, ixloran@... wrote:
            > >
            > > > Will your patch be added to main source tree at any time, or is it
            > > > something I'll need to tweak/modify & apply when I upgrade?
            > >
            > > My best guess is that Wietse will likely adopt something functionally
            > > equivalent wrt the compile-time override for DEF_MAIL_OWNER and
            > > DEF_SGID_GROUP.
            >
            > No override is needed.
            >
            > You can trivially set these at installation time:
            >
            > # make install mail_owner=foo setgid_group=bar ...
            > # make upgrade mail_owner=foo setgid_group=bar ...

            Also (since this thread mentioned installable packages):

            make package mail_owner=foo setgid_group=bar ...

            All the above work even without pre-existing main.cf file.

            > You can even change mail_owner or setgid_group after Postfix
            > is already installed:
            >
            > # postfix set-permissions mail_owner=foo setgid_group=bar ...
            >
            > This *is* documented.

            This, of course does require a pre-existing main.cf file.

            The only build-time parameter override that's needed is for
            config_directory. All other parameters can be specified at
            /upgrade/package time. They are configurable for a reason.

            Wietse
          • Viktor Dukhovni
            ... Yes, this is an option. It applies to all parameters other than config_directory , and yet we have compile-time overrides for most installation parameters
            Message 5 of 20 , Apr 6, 2013
              On Sat, Apr 06, 2013 at 04:30:59PM -0400, Wietse Venema wrote:

              > > My best guess is that Wietse will likely adopt something functionally
              > > equivalent wrt the compile-time override for DEF_MAIL_OWNER and
              > > DEF_SGID_GROUP.
              >
              > No override is needed.
              >
              > You can trivially set these at installation time:
              >
              > # make install mail_owner=foo setgid_group=bar ...
              > # make upgrade mail_owner=foo setgid_group=bar ...

              Yes, this is an option.

              It applies to all parameters other than "config_directory", and yet
              we have compile-time overrides for most installation parameters to
              enable more natural defaults. The "mail_owner" and "setgid_group"
              installation parameters are included in the list of parameters
              explicitly defined in the target main.cf by "postfix-install". When
              I build a test version to run out of /var/tmp/postfix, creat an
              empty main.cf file and run "make upgrade" I get:

              /var/tmp/postfix/etc/main.cf:
              readme_directory = /var/tmp/postfix/readme
              sample_directory = /var/tmp/postfix/etc
              sendmail_path = /var/tmp/postfix/sbin/sendmail
              html_directory = /var/tmp/postfix/html
              setgid_group = _postdrop
              command_directory = /var/tmp/postfix/sbin
              manpage_directory = /var/tmp/postfix/man
              daemon_directory = /var/tmp/postfix/libexec
              newaliases_path = /var/tmp/postfix/sbin/newaliases
              mailq_path = /var/tmp/postfix/sbin/mailq
              queue_directory = /var/spool/postfix
              mail_owner = _postfix
              data_directory = /var/lib/postfix

              in which all the installation parameters aside from mail_owner and
              setgid_group allow compile-time overrides.

              I think it would be more consistent to also allow mail_owner and
              setgid_group to have appropriate compile-time defaults for the
              target platform whether installing locally, or building packages.

              That said, the OP can of course make do with run-time overrides
              if that's the only choice.

              --
              Viktor.
            • Viktor Dukhovni
              ... This is not a big deal either way. I neglected to mention upthread that when I did install multiple versions of Postfix each rooted in their own tree
              Message 6 of 20 , Apr 6, 2013
                On Sat, Apr 06, 2013 at 09:01:54PM +0000, Viktor Dukhovni wrote:

                > I think it would be more consistent to also allow mail_owner and
                > setgid_group to have appropriate compile-time defaults for the
                > target platform whether installing locally, or building packages.
                >
                > That said, the OP can of course make do with run-time overrides
                > if that's the only choice.

                This is not a big deal either way. I neglected to mention upthread
                that when I did install multiple versions of Postfix each rooted
                in their own tree (often in AFS) the compile-time config_directory
                was in /etc/postfix not the version-specific directory:

                -DDEF_CONFIG_DIR=\"/etc/postfix\"

                There was however also a version-specific .../etc/ directory in
                AFS, which contained stock files created by the package installer
                (so I also used command-line overrides:

                postfix-install \
                config_directory=/some/afs/path/etc \
                queue_directory=/some/afs/path/spool \
                data_directory=/some/afs/path/data ...

                when installing into AFS, since that was not an installation onto
                the specific system from which I happened to push content into AFS).

                This was not the typical Postfix via O/S packages use-case, rather
                Postfix was delivered once into AFS for use by thousands of systems,
                and a boot-time shell-script would select the correct version for
                a given machine, and build a suitable main.cf/master.cf, ...

                --
                Viktor.
              • Wietse Venema
                ... Perhaps some feel that the ./configure approach of customizing settings at build time is more natural than customizing them at or after installation
                Message 7 of 20 , Apr 6, 2013
                  Viktor Dukhovni:
                  > On Sat, Apr 06, 2013 at 04:30:59PM -0400, Wietse Venema wrote:
                  >
                  > > > My best guess is that Wietse will likely adopt something functionally
                  > > > equivalent wrt the compile-time override for DEF_MAIL_OWNER and
                  > > > DEF_SGID_GROUP.
                  > >
                  > > No override is needed.
                  > >
                  > > You can trivially set these at installation time:
                  > >
                  > > # make install mail_owner=foo setgid_group=bar ...
                  > > # make upgrade mail_owner=foo setgid_group=bar ...
                  >
                  > Yes, this is an option.
                  >
                  > It applies to all parameters other than "config_directory", and yet
                  > we have compile-time overrides for most installation parameters to
                  > enable more natural defaults. The "mail_owner" and "setgid_group"
                  > installation parameters are included in the list of parameters
                  > explicitly defined in the target main.cf by "postfix-install". When

                  Perhaps some feel that the ./configure approach of customizing
                  settings at build time is more "natural" than customizing them
                  at or after installation time. I am not convinced that the latter
                  is an inferior approach that one has to "make do" with.

                  I'm sure that there are more worthy Postfix topics to bitch about.

                  Wietse

                  > I build a test version to run out of /var/tmp/postfix, creat an
                  > empty main.cf file and run "make upgrade" I get:
                  >
                  > /var/tmp/postfix/etc/main.cf:
                  > readme_directory = /var/tmp/postfix/readme
                  > sample_directory = /var/tmp/postfix/etc
                  > sendmail_path = /var/tmp/postfix/sbin/sendmail
                  > html_directory = /var/tmp/postfix/html
                  > setgid_group = _postdrop
                  > command_directory = /var/tmp/postfix/sbin
                  > manpage_directory = /var/tmp/postfix/man
                  > daemon_directory = /var/tmp/postfix/libexec
                  > newaliases_path = /var/tmp/postfix/sbin/newaliases
                  > mailq_path = /var/tmp/postfix/sbin/mailq
                  > queue_directory = /var/spool/postfix
                  > mail_owner = _postfix
                  > data_directory = /var/lib/postfix
                  >
                  > in which all the installation parameters aside from mail_owner and
                  > setgid_group allow compile-time overrides.
                  >
                  > I think it would be more consistent to also allow mail_owner and
                  > setgid_group to have appropriate compile-time defaults for the
                  > target platform whether installing locally, or building packages.
                  >
                  > That said, the OP can of course make do with run-time overrides
                  > if that's the only choice.
                  >
                  > --
                  > Viktor.
                  >
                Your message has been successfully submitted and would be delivered to recipients shortly.