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

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

Expand Messages
  • Reindl Harald
    ... what exactly did you not understand in based on ? ... you missed COMPLETLY what i saied ... and what do you believe does my own build? the point is that
    Message 1 of 20 , Apr 6, 2013
      Am 06.04.2013 20:25, schrieb ixloran@...:
      > On Sat, Apr 6, 2013, at 10:59 AM, Reindl Harald wrote:
      >> and why do you not build a package based on your distros one?
      >
      > Because
      >
      > (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"?

      > (2) I've had enough of being told "go talk to the distro" by the broader
      > Postfix community, and the #irc folks specifically.

      you missed COMPLETLY what i saied

      > If I build it cleanly, from upstream, and according to the Postfix docs,
      > and ONLY the Postfix docs, then I can minimize, if not avoid, both
      > problems

      and what do you believe does my own build?

      the point is that it is a very dirty style to use a system
      with a apckage manager and blindly make && make install away
      from package managmement

      your whole problems with uid/gid would not be present if
      you would not refuse to learn how this all is done in
      your distribution and this does NOT mean mangle anything
      in postfix at all
    • ixloran@...
      Huh? ... Well there s ONE thing you said that makes some sense ...
      Message 2 of 20 , Apr 6, 2013
        Huh?

        On Sat, Apr 6, 2013, at 11:38 AM, Reindl Harald wrote:
        > you missed COMPLETLY what i saied

        Well there's ONE thing you said that makes some sense ...
      • ixloran@...
        Hi Viktor, ... works great! patch -p1
        Message 3 of 20 , Apr 6, 2013
          Hi Viktor,

          On Sat, Apr 6, 2013, at 10:58 AM, Viktor Dukhovni wrote:
          > You can either create a "postdrop" group, or with the patch re-use the
          > existing "maildrop" group, which makes it easier to transition between
          > the system and your custom Postfix, since file permissions will be the
          > same. I recommend the latter:
          >
          > CCARGS='... -DDEF_SGID_GROUP=\"maildrop\"'

          works great!

          patch -p1 < /usr/local/src/postfix.patch
          make tidy
          export CCARGS=' ... -DDEF_SGID_GROUP=\"maildrop\"'
          make -f Makefile.init makefiles
          make

          then wrapping it all up with a 'non-interactive' `make upgrade`

          checkinstall -R --fstrans=no --nodoc --pkgname="postfix-local"
          --pkgversion="2.10.0" make upgrade
          rpm -qlp postfix-local-2.10.0-1.x86_64.rpm

          looks exactly like I compile-time configured it:

          http://pastebin.com/XJBa5QJn

          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?

          thanks!
        • Viktor Dukhovni
          ... 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. Yes, there are
          Message 4 of 20 , Apr 6, 2013
            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.
            Yes, there are benefits in deploying software as a "package", but
            also drawbacks (the package manager may replace it with an upgrade,
            ...) that one needs to learn how to work around.

            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:

            #! /bin/sh
            DEST=/usr/local/postfix/2.10.0
            CCARGS='-DUSE_TLS' # + other features
            AUXLIBS="-lssl -lcrypto" # + other libraries
            while read -r name val
            do
            CCARGS="$CCARGS $(printf -- '-D%s=\\"%s\\"' $name $val)"
            done <<EOF
            DEF_COMMAND_DIR $DEST/sbin
            DEF_CONFIG_DIR $DEST/etc
            DEF_DAEMON_DIR $DEST/libexec
            DEF_MAILQ_PATH $DEST/sbin/mailq
            DEF_HTML_DIR $DEST/html
            DEF_MANPAGE_DIR $DEST/man
            DEF_NEWALIAS_PATH $DEST/sbin/newaliases
            DEF_README_DIR $DEST/readme
            DEF_SENDMAIL_PATH $DEST/sbin/sendmail
            DEF_SGID_GROUP maildrop
            EOF
            make -f Makefile.init "CCARGS=$CCARGS" "AUXLIBS=$AUXLIBS" makefiles
            make

            --
            Viktor.
          • Viktor Dukhovni
            ... 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. There
            Message 5 of 20 , Apr 6, 2013
              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.

              There are various ways to handle the internals and apply the right
              defaults to MacOSX, so the implementation details may be slightly
              different, but this won't change the behaviour you see.

              --
              Viktor.
            • ixloran@...
              ... Thanks. I ll keep an eye on the Changelogs.
              Message 6 of 20 , Apr 6, 2013
                On Sat, Apr 6, 2013, at 12:27 PM, Viktor Dukhovni 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.
                >
                > There are various ways to handle the internals and apply the right
                > defaults to MacOSX, so the implementation details may be slightly
                > different, but this won't change the behaviour you see.

                Thanks. I'll keep an eye on the Changelogs.
              • 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 7 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 8 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 9 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 10 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 11 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 12 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 13 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.
                            »
                            «