From 58094e2efaf669d7cf5ebd0405217a610e6cc0da Mon Sep 17 00:00:00 2001 From: Rolf Leggewie Date: Thu, 15 May 2008 23:10:53 +0000 Subject: postfix: update to version 2.2.12 which is the latest to compile without any further changes. --- packages/postfix/files/install.patch | 63 +++++++++++++++++++ packages/postfix/files/makedefs.patch | 16 +++++ packages/postfix/postfix-2.0.20/install.patch | 63 ------------------- packages/postfix/postfix-2.0.20/makedefs.patch | 16 ----- packages/postfix/postfix-native_2.0.20.bb | 2 +- packages/postfix/postfix-native_2.2.12.bb | 10 ++++ packages/postfix/postfix.inc | 81 +++++++++++++++++++++++++ packages/postfix/postfix_2.0.20.bb | 83 +------------------------- packages/postfix/postfix_2.2.12.bb | 1 + 9 files changed, 174 insertions(+), 161 deletions(-) create mode 100644 packages/postfix/files/install.patch create mode 100644 packages/postfix/files/makedefs.patch delete mode 100644 packages/postfix/postfix-2.0.20/install.patch delete mode 100644 packages/postfix/postfix-2.0.20/makedefs.patch create mode 100644 packages/postfix/postfix-native_2.2.12.bb create mode 100644 packages/postfix/postfix.inc create mode 100644 packages/postfix/postfix_2.2.12.bb (limited to 'packages') diff --git a/packages/postfix/files/install.patch b/packages/postfix/files/install.patch new file mode 100644 index 0000000000..baffcce0e8 --- /dev/null +++ b/packages/postfix/files/install.patch @@ -0,0 +1,63 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- postfix-2.0.15/postfix-install~install.patch ++++ postfix-2.0.15/postfix-install +@@ -187,8 +187,8 @@ + exit 1 + } + +-test -x bin/postconf || { +- echo $0: Error: no bin/postconf file. Did you forget to run \"make\"? 1>&2 ++test -x $POSTCONF || { ++ echo $0: Error: no $POSTCONF file. Did you forget to run \"make\"? 1>&2 + exit 1 + } + +@@ -336,7 +336,7 @@ + + : ${install_root=/} + : ${tempdir=`pwd`} +-: ${config_directory=`bin/postconf -h -d config_directory`} ++: ${config_directory=`$POSTCONF -h -d config_directory`} + + # Find out the location of installed configuration files. + +@@ -399,7 +399,7 @@ + case "$junk" in + "") eval unset $name;; + esac +- eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -h $name\`} || ++ eval : \${$name=\`$POSTCONF -c $CONFIG_DIRECTORY -h $name\`} || + exit 1 + done + } +@@ -414,7 +414,7 @@ + case "$junk" in + "") eval unset $name;; + esac +- eval : \${$name=\`bin/postconf -d -h $name\`} || exit 1 ++ eval : \${$name=\`$POSTCONF -d -h $name\`} || exit 1 + done + + # Override settings manually. +@@ -521,6 +521,8 @@ + SAMPLE_DIRECTORY=$install_root$sample_directory + README_DIRECTORY=$install_root$readme_directory + ++test "x$POSTCONF" != "x" || POSTCONF="bin/postconf" ++ + # Avoid repeated tests for existence of these; default permissions suffice. + + test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1 +@@ -639,7 +641,7 @@ + # Postfix releases, and software should not suddenly be installed in + # the wrong place when Postfix is being upgraded. + +-bin/postconf -c $CONFIG_DIRECTORY -e \ ++$POSTCONF -c $CONFIG_DIRECTORY -e \ + "daemon_directory = $daemon_directory" \ + "command_directory = $command_directory" \ + "queue_directory = $queue_directory" \ diff --git a/packages/postfix/files/makedefs.patch b/packages/postfix/files/makedefs.patch new file mode 100644 index 0000000000..433b171e5a --- /dev/null +++ b/packages/postfix/files/makedefs.patch @@ -0,0 +1,16 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- postfix-2.0.15/makedefs~makedefs ++++ postfix-2.0.15/makedefs +@@ -189,7 +189,7 @@ + echo "No include file found." 1>&2 + echo "Install the appropriate db*-devel package first." 1>&2 + echo "See the RELEASE_NOTES file for more information." 1>&2 +- exit 1 ++ #exit 1 + fi + # GDBM locks the DBM .pag file after open. This breaks postmap. + # if [ -f /usr/include/gdbm-ndbm.h ] diff --git a/packages/postfix/postfix-2.0.20/install.patch b/packages/postfix/postfix-2.0.20/install.patch deleted file mode 100644 index baffcce0e8..0000000000 --- a/packages/postfix/postfix-2.0.20/install.patch +++ /dev/null @@ -1,63 +0,0 @@ - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- postfix-2.0.15/postfix-install~install.patch -+++ postfix-2.0.15/postfix-install -@@ -187,8 +187,8 @@ - exit 1 - } - --test -x bin/postconf || { -- echo $0: Error: no bin/postconf file. Did you forget to run \"make\"? 1>&2 -+test -x $POSTCONF || { -+ echo $0: Error: no $POSTCONF file. Did you forget to run \"make\"? 1>&2 - exit 1 - } - -@@ -336,7 +336,7 @@ - - : ${install_root=/} - : ${tempdir=`pwd`} --: ${config_directory=`bin/postconf -h -d config_directory`} -+: ${config_directory=`$POSTCONF -h -d config_directory`} - - # Find out the location of installed configuration files. - -@@ -399,7 +399,7 @@ - case "$junk" in - "") eval unset $name;; - esac -- eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -h $name\`} || -+ eval : \${$name=\`$POSTCONF -c $CONFIG_DIRECTORY -h $name\`} || - exit 1 - done - } -@@ -414,7 +414,7 @@ - case "$junk" in - "") eval unset $name;; - esac -- eval : \${$name=\`bin/postconf -d -h $name\`} || exit 1 -+ eval : \${$name=\`$POSTCONF -d -h $name\`} || exit 1 - done - - # Override settings manually. -@@ -521,6 +521,8 @@ - SAMPLE_DIRECTORY=$install_root$sample_directory - README_DIRECTORY=$install_root$readme_directory - -+test "x$POSTCONF" != "x" || POSTCONF="bin/postconf" -+ - # Avoid repeated tests for existence of these; default permissions suffice. - - test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1 -@@ -639,7 +641,7 @@ - # Postfix releases, and software should not suddenly be installed in - # the wrong place when Postfix is being upgraded. - --bin/postconf -c $CONFIG_DIRECTORY -e \ -+$POSTCONF -c $CONFIG_DIRECTORY -e \ - "daemon_directory = $daemon_directory" \ - "command_directory = $command_directory" \ - "queue_directory = $queue_directory" \ diff --git a/packages/postfix/postfix-2.0.20/makedefs.patch b/packages/postfix/postfix-2.0.20/makedefs.patch deleted file mode 100644 index 433b171e5a..0000000000 --- a/packages/postfix/postfix-2.0.20/makedefs.patch +++ /dev/null @@ -1,16 +0,0 @@ - -# -# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher -# - ---- postfix-2.0.15/makedefs~makedefs -+++ postfix-2.0.15/makedefs -@@ -189,7 +189,7 @@ - echo "No include file found." 1>&2 - echo "Install the appropriate db*-devel package first." 1>&2 - echo "See the RELEASE_NOTES file for more information." 1>&2 -- exit 1 -+ #exit 1 - fi - # GDBM locks the DBM .pag file after open. This breaks postmap. - # if [ -f /usr/include/gdbm-ndbm.h ] diff --git a/packages/postfix/postfix-native_2.0.20.bb b/packages/postfix/postfix-native_2.0.20.bb index 0ba8c493ff..66ff65de4c 100644 --- a/packages/postfix/postfix-native_2.0.20.bb +++ b/packages/postfix/postfix-native_2.0.20.bb @@ -1,5 +1,5 @@ -SECTION = "console/network" require postfix_${PV}.bb + inherit native FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/postfix-${PV}" DEPENDS = "virtual/db-native libpcre-native" diff --git a/packages/postfix/postfix-native_2.2.12.bb b/packages/postfix/postfix-native_2.2.12.bb new file mode 100644 index 0000000000..66ff65de4c --- /dev/null +++ b/packages/postfix/postfix-native_2.2.12.bb @@ -0,0 +1,10 @@ +require postfix_${PV}.bb + +inherit native +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/postfix-${PV}" +DEPENDS = "virtual/db-native libpcre-native" +export DIRS = "src/util src/global src/postconf" + +do_stage () { + install -m 0755 src/postconf/postconf ${STAGING_BINDIR}/ +} diff --git a/packages/postfix/postfix.inc b/packages/postfix/postfix.inc new file mode 100644 index 0000000000..0371f62957 --- /dev/null +++ b/packages/postfix/postfix.inc @@ -0,0 +1,81 @@ +SECTION = "console/network" +DEPENDS = "virtual/db libpcre postfix-native" +LICENSE = "IPL" + +SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ + file://${FILESDIR}/makedefs.patch;patch=1 \ + file://${FILESDIR}/install.patch;patch=1 \ + file://main.cf_2.0 \ + file://volatiles \ + file://postfix \ + file://internal_recipient \ + " + +S = "${WORKDIR}/postfix-${PV}" + +inherit update-rc.d + +INITSCRIPT_NAME = "postfix" +INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ." + +#FIXME: this is broken because the native build won't work on systems where +# native bdb does not require libpthread. ARM doesn't require libpthread +# because it uses an assembler mutex implementation. +LIBBDB_EXTRA = "-lpthread" +LIBBDB_EXTRA_arm = "" +LIBBDB_EXTRA_armeb = "" + +export SYSLIBS = "-lpcre -ldb ${LIBBDB_EXTRA} -lnsl -lresolv ${LDFLAGS}" +export EXPORT = "AUXLIBS='-lpcre' CCARGS='-DHAS_PCRE ${CFLAGS}' OPT='' DEBUG='-g'" +export CC_append = " -DHAS_PCRE ${CFLAGS}" +export EXTRA_OEMAKE = "-e" +export POSTCONF = "${STAGING_BINDIR_NATIVE}/postconf" + +do_compile () { + unset CFLAGS CPPFLAGS CXXFLAGS + oe_runmake makefiles + oe_runmake +} + +do_install () { + sh ./postfix-install 'install_root=${D}' -non-interactive + rm -rf ${D}${localstatedir}/spool/postfix + mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf + install -d ${D}${localstatedir}/tmp + install -d ${D}${sysconfdir}/default/volatiles + install -d ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/main.cf_2.0 ${D}${localstatedir}/tmp/main_cf.sh + install -m 644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/01_postfix + install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix + install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient + mv ${D}${sbindir}/sendmail ${D}${sbindir}/sendmail.${PN} +} + +pkg_postinst () { + update-alternatives --install ${sbindir}/sendmail sendmail sendmail.${PN} 40 + grep postfix /etc/group || addgroup postfix + grep postdrop /etc/group || addgroup postdrop + grep vmail /etc/group || addgroup vmail + grep postfix /etc/passwd || adduser --disabled-password --home=/var/spool/postfix --ingroup postfix -g "Postfix" postfix + grep vmail /etc/passwd || adduser --disabled-password --home=/var/spool/vmail --ingroup vmail -g "Postfix" vmail + chgrp postdrop /usr/sbin/postqueue + chgrp postdrop /usr/sbin/postdrop + chmod g+s /usr/sbin/postqueue + chmod g+s /usr/sbin/postdrop + /var/tmp/main_cf.sh >/etc/postfix/main.cf + rm -f /var/tmp/main_cf.sh + chmod 644 /etc/postfix/main.cf + [ -d /var/spool/postfix ] && rmdir /var/spool/postfix + /etc/init.d/populate-volatile.sh update + touch /etc/aliases + newaliases +} + +pkg_postrm () { + update-alternatives --remove sendmail sendmail.${PN} +} + +# Exclude .debug directories from the main package +FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \ + ${libexecdir}/postfix/*" +FILES_${PN}-dbg += "${libexecdir}/postfix/.debug" diff --git a/packages/postfix/postfix_2.0.20.bb b/packages/postfix/postfix_2.0.20.bb index 44e1515f1c..8cafc344f2 100644 --- a/packages/postfix/postfix_2.0.20.bb +++ b/packages/postfix/postfix_2.0.20.bb @@ -1,82 +1,3 @@ -SECTION = "console/network" -DEPENDS = "virtual/db libpcre postfix-native" -LICENSE = "IPL" -PR = "r12" +require postfix.inc -SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ - file://${FILESDIR}/makedefs.patch;patch=1 \ - file://${FILESDIR}/install.patch;patch=1 \ - file://main.cf_2.0 \ - file://volatiles \ - file://postfix \ - file://internal_recipient \ - " - -S = "${WORKDIR}/postfix-${PV}" - -inherit update-rc.d - -INITSCRIPT_NAME = "postfix" -INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ." - -#FIXME: this is broken because the native build won't work on systems where -# native bdb does not require libpthread. ARM doesn't require libpthread -# because it uses an assembler mutex implementation. -LIBBDB_EXTRA = "-lpthread" -LIBBDB_EXTRA_arm = "" -LIBBDB_EXTRA_armeb = "" - -export SYSLIBS = "-lpcre -ldb ${LIBBDB_EXTRA} -lnsl -lresolv ${LDFLAGS}" -export EXPORT = "AUXLIBS='-lpcre' CCARGS='-DHAS_PCRE ${CFLAGS}' OPT='' DEBUG='-g'" -export CC_append = " -DHAS_PCRE ${CFLAGS}" -export EXTRA_OEMAKE = "-e" -export POSTCONF = "${STAGING_BINDIR_NATIVE}/postconf" - -do_compile () { - unset CFLAGS CPPFLAGS CXXFLAGS - oe_runmake makefiles - oe_runmake -} - -do_install () { - sh ./postfix-install 'install_root=${D}' -non-interactive - rm -rf ${D}${localstatedir}/spool/postfix - mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf - install -d ${D}${localstatedir}/tmp - install -d ${D}${sysconfdir}/default/volatiles - install -d ${D}${sysconfdir}/init.d - install -m 755 ${WORKDIR}/main.cf_2.0 ${D}${localstatedir}/tmp/main_cf.sh - install -m 644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/01_postfix - install -m 755 ${WORKDIR}/postfix ${D}${sysconfdir}/init.d/postfix - install -m 644 ${WORKDIR}/internal_recipient ${D}${sysconfdir}/postfix/internal_recipient - mv ${D}${sbindir}/sendmail ${D}${sbindir}/sendmail.${PN} -} - -pkg_postinst () { - update-alternatives --install ${sbindir}/sendmail sendmail sendmail.${PN} 40 - grep postfix /etc/group || addgroup postfix - grep postdrop /etc/group || addgroup postdrop - grep vmail /etc/group || addgroup vmail - grep postfix /etc/passwd || adduser --disabled-password --home=/var/spool/postfix --ingroup postfix -g "Postfix" postfix - grep vmail /etc/passwd || adduser --disabled-password --home=/var/spool/vmail --ingroup vmail -g "Postfix" vmail - chgrp postdrop /usr/sbin/postqueue - chgrp postdrop /usr/sbin/postdrop - chmod g+s /usr/sbin/postqueue - chmod g+s /usr/sbin/postdrop - /var/tmp/main_cf.sh >/etc/postfix/main.cf - rm -f /var/tmp/main_cf.sh - chmod 644 /etc/postfix/main.cf - [ -d /var/spool/postfix ] && rmdir /var/spool/postfix - /etc/init.d/populate-volatile.sh update - touch /etc/aliases - newaliases -} - -pkg_postrm () { - update-alternatives --remove sendmail sendmail.${PN} -} - -# Exclude .debug directories from the main package -FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \ - ${libexecdir}/postfix/*" -FILES_${PN}-dbg += "${libexecdir}/postfix/.debug" +PR = "r13" diff --git a/packages/postfix/postfix_2.2.12.bb b/packages/postfix/postfix_2.2.12.bb new file mode 100644 index 0000000000..3f1039a83d --- /dev/null +++ b/packages/postfix/postfix_2.2.12.bb @@ -0,0 +1 @@ +require postfix.inc -- cgit v1.2.3