Activity log for bug #1996524

Date Who What changed Old value New value Message
2022-11-14 16:06:24 Kucher Dominik bug added bug
2023-03-27 10:29:45 Miriam España Acebal postfix: assignee Miriam España Acebal (mirespace)
2023-03-27 10:29:48 Miriam España Acebal postfix: status New In Progress
2023-03-27 10:31:44 Miriam España Acebal bug task added postfix (Ubuntu)
2023-03-27 10:31:50 Miriam España Acebal postfix: assignee Miriam España Acebal (mirespace)
2023-03-27 10:31:53 Miriam España Acebal postfix: status In Progress New
2023-03-27 10:32:08 Miriam España Acebal nominated for series Ubuntu Jammy
2023-03-27 10:32:08 Miriam España Acebal bug task added postfix (Ubuntu Jammy)
2023-03-27 10:32:08 Miriam España Acebal nominated for series Ubuntu Kinetic
2023-03-27 10:32:08 Miriam España Acebal bug task added postfix (Ubuntu Kinetic)
2023-03-27 10:32:14 Miriam España Acebal postfix (Ubuntu Jammy): assignee Miriam España Acebal (mirespace)
2023-03-27 10:32:17 Miriam España Acebal postfix (Ubuntu Kinetic): assignee Miriam España Acebal (mirespace)
2023-03-27 10:32:25 Miriam España Acebal postfix (Ubuntu Jammy): status New In Progress
2023-03-27 10:32:33 Miriam España Acebal postfix (Ubuntu Kinetic): status New In Progress
2023-03-27 11:57:46 Miriam España Acebal description It is not possible to build Postfix on a Linux 6 system! Build-Error: ATTENTION: Unknown system type: Linux 6.0.5-200.fc36.x86_64 I tried to build a patch but it returns a different error: /usr/bin/strip: /home/builduser/rpmbuild/BUILDROOT/postfix-3.7.3-1.0.fc36.20221114.dk.sandybridge.x86_64/usr/libexec/postfix/lmtp[.interp]: file truncated Patch1: --- postfix-3.7.3/makedefs-orig 2022-01-23 21:53:41.000000000 +0100 +++ postfix-3.7.3/makedefs 2022-11-14 16:37:44.188079241 +0100 @@ -627,7 +627,7 @@ : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"} : ${PLUGIN_LD="${CC-gcc} -shared"} ;; - Linux.[345].*) SYSTYPE=LINUX$RELEASE_MAJOR + Linux.[3456].*) SYSTYPE=LINUX$RELEASE_MAJOR case "$CCARGS" in *-DNO_DB*) ;; *-DHAS_DB*) ;; Patch2: --- postfix-3.7.3/src/util/sys_defs-original.h 2021-12-05 19:59:27.000000000 +0100 +++ postfix-3.7.3/src/util/sys_defs.h 2022-11-14 16:52:11.199899453 +0100 @@ -751,7 +751,7 @@ /* * LINUX. */ -#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) +#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) || defined(LINUX6) #define SUPPORTED #define UINT32_TYPE unsigned int #define UINT16_TYPE unsigned short SPEC-File: Version: 3.7.3 # command 'rpmbuild -bb postfix.spec --with production' will tune for current hardware while default stays 'sandybridge' %if %{?_with_production:1}%{!?_with_production:0} %global rpmsuffix native %global build_native_release 1 %global optflags $(sed "s/sandybridge/native/g" <<< "%{optflags}") %else %global rpmsuffix sandybridge %global build_native_release 0 %endif %define postfix_uid 89 %define postfix_user postfix %define postfix_gid 89 %define postfix_group postfix %define maildrop_group postdrop %define maildrop_gid 90 %define postfix_config_dir %{_sysconfdir}/postfix %define postfix_daemon_dir %{_libexecdir}/postfix %define postfix_command_dir %{_sbindir} %define postfix_queue_dir %{_var}/spool/postfix %define postfix_data_dir %{_var}/lib/postfix %define postfix_doc_dir %{_docdir}/%{name}-%{version} %define postfix_sample_dir %{postfix_doc_dir}/samples %define postfix_readme_dir %{postfix_doc_dir}/README_FILES %define pflogsumm_ver 1.1.5 Name: postfix Summary: Postfix Mail Transport Agent Release: 1.%{build_native_release}%{?dist}.%{rpmsuffix} Epoch: 2 Group: System Environment/Daemons URL: http://www.postfix.org License: IBM Requires: shadow-utils, systemd-units Requires(post): shadow-utils, systemd-units Requires(pre): shadow-utils, systemd-units Requires(preun): shadow-utils, systemd-units Requires(postun): shadow-utils, systemd-units Provides: MTA smtpd smtpdaemon server(smtp) Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz Source53: http://jimsun.linxnet.com/downloads/pflogsumm-%{pflogsumm_ver}.tar.gz Source101: postfix-pam.conf Source500: postfix.service Patch0: postfix-linux-6.patch Patch1: postfix-linux-sys-6.patch BuildRequires: pkgconfig, zlib-devel, mysql-devel, cyrus-sasl-devel, pcre-devel, openssl-devel, systemd-units, libdb-devel, perl-generators, pkgconfig, libicu-devel, libnsl2-devel, gcc, m4 Provides: postfix-perl-scripts Provides: postfix-pflogsumm = %{epoch}:%{version}-%{release} %description Postfix is a Mail Transport Agent, supporting SMTP AUTH and TLS %package manpages Summary: Postfix manuals Group: Applications/System %description manpages %prep %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 gzip -dc %{SOURCE53} | tar xf - pushd pflogsumm-%{pflogsumm_ver} popd for f in README_FILES/TLS_{LEGACY_,}README TLS_ACKNOWLEDGEMENTS; do iconv -f iso8859-1 -t utf8 -o ${f}{_,} && touch -r ${f}{,_} && mv -f ${f}{_,} done %build CCARGS=-fPIC AUXLIBS= CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir}/pcre" AUXLIBS="${AUXLIBS} -lpcre" CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir}/mysql" AUXLIBS="${AUXLIBS} -L%{_libdir}/mysql -lmysqlclient -lm" CCARGS="${CCARGS} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I%{_includedir}/sasl" AUXLIBS="${AUXLIBS} -L%{_libdir}/sasl2 -lsasl2" CCARGS="${CCARGS} -DUSE_TLS -I/usr/include/openssl" AUXLIBS="${AUXLIBS} -lssl -lcrypto" CCARGS="${CCARGS} -DDEF_CONFIG_DIR=\\\"%{postfix_config_dir}\\\"" CCARGS="${CCARGS} $(getconf LFS_CFLAGS)" AUXLIBS="${AUXLIBS} -pie -Wl,-z,relro" %{__make} %{?_smp_mflags} -f Makefile.init makefiles CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" DEBUG="" OPT="%{optflags} -Wno-comment" %{__make} %{?_smp_mflags} CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" DEBUG="" OPT="%{optflags} -Wno-comment" %install sh postfix-install -non-interactive install_root=%{buildroot} config_directory=%{postfix_config_dir} daemon_directory=%{postfix_daemon_dir} command_directory=%{postfix_command_dir} queue_directory=%{postfix_queue_dir} data_directory=%{postfix_data_dir} sendmail_path=%{postfix_command_dir}/sendmail newaliases_path=%{_bindir}/newaliases mailq_path=%{_bindir}/mailq mail_owner=%{postfix_user} setgid_group=%{maildrop_group} sample_directory=%{postfix_sample_dir} readme_directory=%{postfix_readme_dir} || exit 1 install -c auxiliary/rmail/rmail %{buildroot}%{_bindir}/rmail for i in active bounce corrupt defer deferred flush incoming private saved maildrop public pid saved trace; do mkdir -p %{buildroot}%{postfix_queue_dir}/$i done mkdir -p %{buildroot}%{_sysconfdir}/pam.d install -m 644 %{SOURCE101} %{buildroot}%{_sysconfdir}/pam.d/smtp.postfix mkdir -p %{buildroot}%{postfix_doc_dir} mkdir -p %{buildroot}%{postfix_doc_dir}/examples{,/chroot-setup} cp -pr examples/{qmail-local,smtpd-policy} %{buildroot}%{postfix_doc_dir}/examples cp -p examples/chroot-setup/LINUX2 %{buildroot}%{postfix_doc_dir}/examples/chroot-setup mv %{buildroot}/etc/postfix/bounce.cf.default %{buildroot}%{postfix_doc_dir} mv %{buildroot}/etc/postfix/main.cf.default %{buildroot}%{postfix_doc_dir} mv %{buildroot}/etc/postfix/makedefs.out %{buildroot}%{postfix_doc_dir} rm -f %{buildroot}%{postfix_config_dir}/{TLS_,}LICENSE find %{buildroot}%{postfix_doc_dir} -type f | xargs chmod 644 find %{buildroot}%{postfix_doc_dir} -type d | xargs chmod 755 #move man folder to the correct folder mv %{buildroot}/usr/local/man/ %{buildroot}/usr/share/man/ #install plogsumm install -c -m 644 pflogsumm-%{pflogsumm_ver}/pflogsumm-faq.txt %{buildroot}%{postfix_doc_dir}/pflogsumm-faq.txt install -c -m 644 pflogsumm-%{pflogsumm_ver}/pflogsumm.1 %{buildroot}%{_mandir}/man1/pflogsumm.1 install -c pflogsumm-%{pflogsumm_ver}/pflogsumm.pl %{buildroot}%{postfix_command_dir}/pflogsumm mantools/srctoman - auxiliary/qshape/qshape.pl > qshape.1 install -c qshape.1 %{buildroot}%{_mandir}/man1/qshape.1 install -c auxiliary/qshape/qshape.pl %{buildroot}%{postfix_command_dir}/qshape mkdir -p %{buildroot}/%{_unitdir}/ install -m 0644 %{SOURCE500} %{buildroot}/%{_unitdir}/ rm -f %{buildroot}%{postfix_config_dir}/aliases rm -f %{buildroot}%{_sysconfdir}/pam.d/smtp rm -f %{buildroot}%{_sysconfdir}/postfix/main.cf.proto rm -f %{buildroot}%{_sysconfdir}/postfix/master.cf.proto #move files to the correct folder mv %{buildroot}%{_sysconfdir}/postfix/main.cf %{buildroot}%{postfix_daemon_dir}/main.cf mv %{buildroot}%{_sysconfdir}/postfix/master.cf %{buildroot}%{postfix_daemon_dir}/master.cf mv %{buildroot}%{_sysconfdir}/postfix/postfix-files %{buildroot}%{postfix_daemon_dir}/postfix-files cat %{buildroot}%{postfix_daemon_dir}/postfix-files %post /usr/bin/systemctl --system daemon-reload 2> /dev/null > /dev/null %{_sbindir}/postfix set-permissions upgrade-configuration daemon_directory=%{postfix_daemon_dir} command_directory=%{postfix_command_dir} mail_owner=%{postfix_user} setgid_group=%{maildrop_group} manpage_directory=%{_mandir} sample_directory=%{postfix_sample_dir} readme_directory=%{postfix_readme_dir} &> /dev/null %{_bindir}/unlink /etc/alternatives/mta 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-aliasesman 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-mailq 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-mailqman 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-newaliases 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-newaliasesman 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-pam 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-rmail 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-sendmail 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-sendmailman 2> /dev/null exit 0 %pre %{_sbindir}/groupadd -g %{maildrop_gid} -r %{maildrop_group} 2>/dev/null %{_sbindir}/groupadd -g %{postfix_gid} -r %{postfix_group} 2>/dev/null %{_sbindir}/groupadd -g 12 -r mail 2>/dev/null %{_sbindir}/useradd -d %{postfix_queue_dir} -s /sbin/nologin -g %{postfix_group} -G mail -M -r -u %{postfix_uid} %{postfix_user} 2>/dev/null %{postfix_user} 2> /dev/null exit 0 %preun if [ "$1" == 0 ]; then /usr/bin/systemctl --no-reload disable postfix.service 2> /dev/null > /dev/null /usr/bin/systemctl stop postfix.service 2> /dev/null > /dev/null fi exit 0 %files %defattr(-, root, root) %attr(0644, root, root) %{_unitdir}/postfix.service %dir %attr(0755, root, root) %{postfix_config_dir} %dir %attr(0755, root, root) %{postfix_daemon_dir} %dir %attr(0755, root, root) %{postfix_queue_dir} %dir %attr(0755, root, root) %{postfix_queue_dir}/pid %dir %attr(0700, %{postfix_user}, root) %{postfix_data_dir} %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/active %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/bounce %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/corrupt %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/defer %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/deferred %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/flush %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/hold %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/incoming %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/saved %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/trace %dir %attr(0730, %{postfix_user}, %{maildrop_group}) %{postfix_queue_dir}/maildrop %dir %attr(0710, %{postfix_user}, %{maildrop_group}) %{postfix_queue_dir}/public %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/private %attr(2755, root, %{maildrop_group}) %{postfix_command_dir}/postdrop %attr(2755, root, %{maildrop_group}) %{postfix_command_dir}/postqueue %attr(0755, root, root) %{postfix_command_dir}/sendmail %attr(0755, root, root) %{postfix_command_dir}/postalias %attr(0755, root, root) %{postfix_command_dir}/postcat %attr(0755, root, root) %{postfix_command_dir}/postconf %attr(0755, root, root) %{postfix_command_dir}/postfix %attr(0755, root, root) %{postfix_command_dir}/postkick %attr(0755, root, root) %{postfix_command_dir}/postlock %attr(0755, root, root) %{postfix_command_dir}/postlog %attr(0755, root, root) %{postfix_command_dir}/postmap %attr(0755, root, root) %{postfix_command_dir}/postmulti %attr(0755, root, root) %{postfix_command_dir}/postsuper %attr(0755, root, root) %{postfix_command_dir}/qshape %attr(0755, root, root) %{postfix_command_dir}/pflogsumm %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/access %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/canonical %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/generic %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/header_checks %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/relocated %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/transport %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/virtual %attr(0755, root, root) %{postfix_daemon_dir}/[^mp]* %attr(0644, root, root) %{postfix_daemon_dir}/main.cf %attr(0644, root, root) %{postfix_daemon_dir}/master.cf %attr(0755, root, root) %{postfix_daemon_dir}/master %attr(0755, root, root) %{postfix_daemon_dir}/pickup %attr(0755, root, root) %{postfix_daemon_dir}/pipe %attr(0755, root, root) %{postfix_daemon_dir}/post-install %attr(0644, root, root) %{postfix_daemon_dir}/postfix-files %attr(0755, root, root) %{postfix_daemon_dir}/postfix-script %attr(0755, root, root) %{postfix_daemon_dir}/postfix-wrapper %attr(0755, root, root) %{postfix_daemon_dir}/postmulti-script %attr(0755, root, root) %{postfix_daemon_dir}/postscreen %attr(0755, root, root) %{postfix_daemon_dir}/proxymap %attr(0755, root, root) %{postfix_daemon_dir}/postfix-tls-script %attr(0755, root, root) %{_bindir}/mailq %attr(0755, root, root) %{_bindir}/newaliases %attr(0755, root, root) %{_bindir}/rmail %config(noreplace) %{_sysconfdir}/pam.d/smtp.postfix /usr/libexec/postfix/postlogd %files manpages %defattr(-, root, root) %{postfix_doc_dir} %attr(0644, root, root) %{_mandir}/man1/* %attr(0644, root, root) %{_mandir}/man5/* %attr(0644, root, root) %{_mandir}/man8/* [ Impact ] Users that upgrade their kernel to version 6.0 and have ad-hoc changes to postfix package cannot build it. [ Test Plan ] First, we prepare a Kinetic VM with availability to load with a kernel upgrade: #0. Setting the VM # lxc init --vm ubuntu-daily:kinetic KLINUX6 # lxc config set KLINUX6 -c security.secureboot=false # lxc start KLINUX6 # lxc shell KLINUX6 # apt update && apt upgrade -y #1.Preps for upgrading kernel and getting tools to build postfix #1.1. Checking we are in LINUX5 # uname -r # this has to return LINUX5 Kernel (5.15.0-60-generic ) #1.2. Installing mainline # add-apt-repository ppa:cappelikan/ppa -y # apt update # apt install mainline -y #1.3 Upgrading kernel # mainline --check # mainline --install-latest # shutdown -r now #1.4 After rebooting, checking kernel version (6.2.8) # uname -r #1.5 installing necessary packages for building postfix # apt install ubuntu-dev-tools libdb5.3-dev -y #2. BAD CASE #2.1. Downloading actual postfix's source code in Kinetic # pull-lp-source postfix kinetic # cd postfix-3.6.4 #2.2. Generating Makefile (and see expected error) # /usr/bin/make -f Makefile.in MAKELEVEL= Makefiles (echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp ATTENTION: ATTENTION: Unknown system type: Linux 6.0.0-060000-generic ATTENTION: make: *** [Makefile.in:34: Makefiles] Error 1 #3.GOOD CASE #3.1 Getting the source code (assuming it is in -proposed) with the fix submitted here # mkdir proposed # cd proposed # pull-lp-source postfix kinetic --security # cd postfix-3.6.4 #3.2 Generating Makefile (process finishes OK) # /usr/bin/make -f Makefile.in MAKELEVEL= Makefiles (echo "# Do not edit -- this file documents how Postfix was built for your machine."; /bin/sh makedefs) >makedefs.tmp set +e; if cmp makedefs.tmp conf/makedefs.out; then rm makedefs.tmp; \ else mv makedefs.tmp conf/makedefs.out; fi >/dev/null 2>/dev/null set -e; for i in src/util src/global src/dns src/tls src/xsasl src/master src/milter src/postfix src/fsstone src/smtpstone src/sendmail src/error src/pickup src/cleanup src/smtpd src/local src/trivial-rewrite src/qmgr src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop src/postkick src/postlock src/postlog src/postmap src/postqueue src/postsuper src/qmqpd src/spawn src/flush src/verify rmail src/virtual src/proxymap src/anvil src/scache src/discard src/tlsmgr src/postmulti src/postscreen src/dnsblog src/tlsproxy src/posttls-finger src/postlogd; do \ (set -e; echo "[$i]"; cd $i; rm -f Makefile; \ /usr/bin/make -f Makefile.in Makefile MAKELEVEL=) || exit 1; \ done [src/util] cat ../../conf/makedefs.out Makefile.in >Makefile [src/global] cat ../../conf/makedefs.out Makefile.in >Makefile [src/dns] cat ../../conf/makedefs.out Makefile.in >Makefile [src/tls] [...] [src/postlogd] cat ../../conf/makedefs.out Makefile.in >Makefile [ Where problems could occur ] This fix is part of a stable microrelase. As indicated in the PostfixUpdates MRE exception "Upstream has tight requirements for what goes into stable microreleases, QAs them with regression tests, and has a good history of not breaking anything", which doesn't imply risk-free. In particular, the fix submitted here adds portability to the postfix package. It doesn't break Ubuntu CI builds and the danger could come from upgrading the kernel itself (that's a risk on the user side, as it is LINUX5 by default -not LINUX6-). The autopkgtest tests checked the relationships with the versions of the available dependencies and other package-specific issues which is probably what we should focus on to mitigate possible regression scenarios. [ Other Info ] It's true that the default kernel in Jammy and Kinetic is not 6.0, but as the upgrade can be done in a kind of supported way through mainline tool, it's worth adding this fix for these advanced users. Also, doing this fix because it was part of the latest stable microrelease in the 3.6 band for postfix, and an MRE with it was correctly rejected due to functional regression due to another fix not related to this. [ Original Report ] ------------------------------------------------------------- It is not possible to build Postfix on a Linux 6 system! Build-Error: ATTENTION: Unknown system type: Linux 6.0.5-200.fc36.x86_64 I tried to build a patch but it returns a different error: /usr/bin/strip: /home/builduser/rpmbuild/BUILDROOT/postfix-3.7.3-1.0.fc36.20221114.dk.sandybridge.x86_64/usr/libexec/postfix/lmtp[.interp]: file truncated Patch1: --- postfix-3.7.3/makedefs-orig 2022-01-23 21:53:41.000000000 +0100 +++ postfix-3.7.3/makedefs 2022-11-14 16:37:44.188079241 +0100 @@ -627,7 +627,7 @@                 : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}                 : ${PLUGIN_LD="${CC-gcc} -shared"}                 ;; - Linux.[345].*) SYSTYPE=LINUX$RELEASE_MAJOR + Linux.[3456].*) SYSTYPE=LINUX$RELEASE_MAJOR                 case "$CCARGS" in                  *-DNO_DB*) ;;                  *-DHAS_DB*) ;; Patch2: --- postfix-3.7.3/src/util/sys_defs-original.h 2021-12-05 19:59:27.000000000 +0100 +++ postfix-3.7.3/src/util/sys_defs.h 2022-11-14 16:52:11.199899453 +0100 @@ -751,7 +751,7 @@   /*    * LINUX.    */ -#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) +#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) || defined(LINUX6)  #define SUPPORTED  #define UINT32_TYPE unsigned int  #define UINT16_TYPE unsigned short SPEC-File: Version: 3.7.3 # command 'rpmbuild -bb postfix.spec --with production' will tune for current hardware while default stays 'sandybridge' %if %{?_with_production:1}%{!?_with_production:0} %global rpmsuffix native %global build_native_release 1 %global optflags $(sed "s/sandybridge/native/g" <<< "%{optflags}") %else %global rpmsuffix sandybridge %global build_native_release 0 %endif %define postfix_uid 89 %define postfix_user postfix %define postfix_gid 89 %define postfix_group postfix %define maildrop_group postdrop %define maildrop_gid 90 %define postfix_config_dir %{_sysconfdir}/postfix %define postfix_daemon_dir %{_libexecdir}/postfix %define postfix_command_dir %{_sbindir} %define postfix_queue_dir %{_var}/spool/postfix %define postfix_data_dir %{_var}/lib/postfix %define postfix_doc_dir %{_docdir}/%{name}-%{version} %define postfix_sample_dir %{postfix_doc_dir}/samples %define postfix_readme_dir %{postfix_doc_dir}/README_FILES %define pflogsumm_ver 1.1.5 Name: postfix Summary: Postfix Mail Transport Agent Release: 1.%{build_native_release}%{?dist}.%{rpmsuffix} Epoch: 2 Group: System Environment/Daemons URL: http://www.postfix.org License: IBM Requires: shadow-utils, systemd-units Requires(post): shadow-utils, systemd-units Requires(pre): shadow-utils, systemd-units Requires(preun): shadow-utils, systemd-units Requires(postun): shadow-utils, systemd-units Provides: MTA smtpd smtpdaemon server(smtp) Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz Source53: http://jimsun.linxnet.com/downloads/pflogsumm-%{pflogsumm_ver}.tar.gz Source101: postfix-pam.conf Source500: postfix.service Patch0: postfix-linux-6.patch Patch1: postfix-linux-sys-6.patch BuildRequires: pkgconfig, zlib-devel, mysql-devel, cyrus-sasl-devel, pcre-devel, openssl-devel, systemd-units, libdb-devel, perl-generators, pkgconfig, libicu-devel, libnsl2-devel, gcc, m4 Provides: postfix-perl-scripts Provides: postfix-pflogsumm = %{epoch}:%{version}-%{release} %description Postfix is a Mail Transport Agent, supporting SMTP AUTH and TLS %package manpages Summary: Postfix manuals Group: Applications/System %description manpages %prep %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 gzip -dc %{SOURCE53} | tar xf - pushd pflogsumm-%{pflogsumm_ver} popd for f in README_FILES/TLS_{LEGACY_,}README TLS_ACKNOWLEDGEMENTS; do  iconv -f iso8859-1 -t utf8 -o ${f}{_,} &&  touch -r ${f}{,_} && mv -f ${f}{_,} done %build CCARGS=-fPIC AUXLIBS= CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir}/pcre" AUXLIBS="${AUXLIBS} -lpcre" CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir}/mysql" AUXLIBS="${AUXLIBS} -L%{_libdir}/mysql -lmysqlclient -lm" CCARGS="${CCARGS} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I%{_includedir}/sasl" AUXLIBS="${AUXLIBS} -L%{_libdir}/sasl2 -lsasl2" CCARGS="${CCARGS} -DUSE_TLS -I/usr/include/openssl" AUXLIBS="${AUXLIBS} -lssl -lcrypto" CCARGS="${CCARGS} -DDEF_CONFIG_DIR=\\\"%{postfix_config_dir}\\\"" CCARGS="${CCARGS} $(getconf LFS_CFLAGS)" AUXLIBS="${AUXLIBS} -pie -Wl,-z,relro" %{__make} %{?_smp_mflags} -f Makefile.init makefiles CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" DEBUG="" OPT="%{optflags} -Wno-comment" %{__make} %{?_smp_mflags} CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" DEBUG="" OPT="%{optflags} -Wno-comment" %install sh postfix-install -non-interactive install_root=%{buildroot} config_directory=%{postfix_config_dir} daemon_directory=%{postfix_daemon_dir} command_directory=%{postfix_command_dir} queue_directory=%{postfix_queue_dir} data_directory=%{postfix_data_dir} sendmail_path=%{postfix_command_dir}/sendmail newaliases_path=%{_bindir}/newaliases mailq_path=%{_bindir}/mailq mail_owner=%{postfix_user} setgid_group=%{maildrop_group} sample_directory=%{postfix_sample_dir} readme_directory=%{postfix_readme_dir} || exit 1 install -c auxiliary/rmail/rmail %{buildroot}%{_bindir}/rmail for i in active bounce corrupt defer deferred flush incoming private saved maildrop public pid saved trace; do  mkdir -p %{buildroot}%{postfix_queue_dir}/$i done mkdir -p %{buildroot}%{_sysconfdir}/pam.d install -m 644 %{SOURCE101} %{buildroot}%{_sysconfdir}/pam.d/smtp.postfix mkdir -p %{buildroot}%{postfix_doc_dir} mkdir -p %{buildroot}%{postfix_doc_dir}/examples{,/chroot-setup} cp -pr examples/{qmail-local,smtpd-policy} %{buildroot}%{postfix_doc_dir}/examples cp -p examples/chroot-setup/LINUX2 %{buildroot}%{postfix_doc_dir}/examples/chroot-setup mv %{buildroot}/etc/postfix/bounce.cf.default %{buildroot}%{postfix_doc_dir} mv %{buildroot}/etc/postfix/main.cf.default %{buildroot}%{postfix_doc_dir} mv %{buildroot}/etc/postfix/makedefs.out %{buildroot}%{postfix_doc_dir} rm -f %{buildroot}%{postfix_config_dir}/{TLS_,}LICENSE find %{buildroot}%{postfix_doc_dir} -type f | xargs chmod 644 find %{buildroot}%{postfix_doc_dir} -type d | xargs chmod 755 #move man folder to the correct folder mv %{buildroot}/usr/local/man/ %{buildroot}/usr/share/man/ #install plogsumm install -c -m 644 pflogsumm-%{pflogsumm_ver}/pflogsumm-faq.txt %{buildroot}%{postfix_doc_dir}/pflogsumm-faq.txt install -c -m 644 pflogsumm-%{pflogsumm_ver}/pflogsumm.1 %{buildroot}%{_mandir}/man1/pflogsumm.1 install -c pflogsumm-%{pflogsumm_ver}/pflogsumm.pl %{buildroot}%{postfix_command_dir}/pflogsumm mantools/srctoman - auxiliary/qshape/qshape.pl > qshape.1 install -c qshape.1 %{buildroot}%{_mandir}/man1/qshape.1 install -c auxiliary/qshape/qshape.pl %{buildroot}%{postfix_command_dir}/qshape mkdir -p %{buildroot}/%{_unitdir}/ install -m 0644 %{SOURCE500} %{buildroot}/%{_unitdir}/ rm -f %{buildroot}%{postfix_config_dir}/aliases rm -f %{buildroot}%{_sysconfdir}/pam.d/smtp rm -f %{buildroot}%{_sysconfdir}/postfix/main.cf.proto rm -f %{buildroot}%{_sysconfdir}/postfix/master.cf.proto #move files to the correct folder mv %{buildroot}%{_sysconfdir}/postfix/main.cf %{buildroot}%{postfix_daemon_dir}/main.cf mv %{buildroot}%{_sysconfdir}/postfix/master.cf %{buildroot}%{postfix_daemon_dir}/master.cf mv %{buildroot}%{_sysconfdir}/postfix/postfix-files %{buildroot}%{postfix_daemon_dir}/postfix-files cat %{buildroot}%{postfix_daemon_dir}/postfix-files %post /usr/bin/systemctl --system daemon-reload 2> /dev/null > /dev/null %{_sbindir}/postfix set-permissions upgrade-configuration daemon_directory=%{postfix_daemon_dir} command_directory=%{postfix_command_dir} mail_owner=%{postfix_user} setgid_group=%{maildrop_group} manpage_directory=%{_mandir} sample_directory=%{postfix_sample_dir} readme_directory=%{postfix_readme_dir} &> /dev/null %{_bindir}/unlink /etc/alternatives/mta 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-aliasesman 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-mailq 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-mailqman 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-newaliases 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-newaliasesman 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-pam 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-rmail 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-sendmail 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-sendmailman 2> /dev/null exit 0 %pre %{_sbindir}/groupadd -g %{maildrop_gid} -r %{maildrop_group} 2>/dev/null %{_sbindir}/groupadd -g %{postfix_gid} -r %{postfix_group} 2>/dev/null %{_sbindir}/groupadd -g 12 -r mail 2>/dev/null %{_sbindir}/useradd -d %{postfix_queue_dir} -s /sbin/nologin -g %{postfix_group} -G mail -M -r -u %{postfix_uid} %{postfix_user} 2>/dev/null %{postfix_user} 2> /dev/null exit 0 %preun if [ "$1" == 0 ]; then  /usr/bin/systemctl --no-reload disable postfix.service 2> /dev/null > /dev/null  /usr/bin/systemctl stop postfix.service 2> /dev/null > /dev/null fi exit 0 %files %defattr(-, root, root) %attr(0644, root, root) %{_unitdir}/postfix.service %dir %attr(0755, root, root) %{postfix_config_dir} %dir %attr(0755, root, root) %{postfix_daemon_dir} %dir %attr(0755, root, root) %{postfix_queue_dir} %dir %attr(0755, root, root) %{postfix_queue_dir}/pid %dir %attr(0700, %{postfix_user}, root) %{postfix_data_dir} %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/active %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/bounce %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/corrupt %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/defer %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/deferred %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/flush %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/hold %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/incoming %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/saved %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/trace %dir %attr(0730, %{postfix_user}, %{maildrop_group}) %{postfix_queue_dir}/maildrop %dir %attr(0710, %{postfix_user}, %{maildrop_group}) %{postfix_queue_dir}/public %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/private %attr(2755, root, %{maildrop_group}) %{postfix_command_dir}/postdrop %attr(2755, root, %{maildrop_group}) %{postfix_command_dir}/postqueue %attr(0755, root, root) %{postfix_command_dir}/sendmail %attr(0755, root, root) %{postfix_command_dir}/postalias %attr(0755, root, root) %{postfix_command_dir}/postcat %attr(0755, root, root) %{postfix_command_dir}/postconf %attr(0755, root, root) %{postfix_command_dir}/postfix %attr(0755, root, root) %{postfix_command_dir}/postkick %attr(0755, root, root) %{postfix_command_dir}/postlock %attr(0755, root, root) %{postfix_command_dir}/postlog %attr(0755, root, root) %{postfix_command_dir}/postmap %attr(0755, root, root) %{postfix_command_dir}/postmulti %attr(0755, root, root) %{postfix_command_dir}/postsuper %attr(0755, root, root) %{postfix_command_dir}/qshape %attr(0755, root, root) %{postfix_command_dir}/pflogsumm %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/access %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/canonical %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/generic %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/header_checks %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/relocated %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/transport %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/virtual %attr(0755, root, root) %{postfix_daemon_dir}/[^mp]* %attr(0644, root, root) %{postfix_daemon_dir}/main.cf %attr(0644, root, root) %{postfix_daemon_dir}/master.cf %attr(0755, root, root) %{postfix_daemon_dir}/master %attr(0755, root, root) %{postfix_daemon_dir}/pickup %attr(0755, root, root) %{postfix_daemon_dir}/pipe %attr(0755, root, root) %{postfix_daemon_dir}/post-install %attr(0644, root, root) %{postfix_daemon_dir}/postfix-files %attr(0755, root, root) %{postfix_daemon_dir}/postfix-script %attr(0755, root, root) %{postfix_daemon_dir}/postfix-wrapper %attr(0755, root, root) %{postfix_daemon_dir}/postmulti-script %attr(0755, root, root) %{postfix_daemon_dir}/postscreen %attr(0755, root, root) %{postfix_daemon_dir}/proxymap %attr(0755, root, root) %{postfix_daemon_dir}/postfix-tls-script %attr(0755, root, root) %{_bindir}/mailq %attr(0755, root, root) %{_bindir}/newaliases %attr(0755, root, root) %{_bindir}/rmail %config(noreplace) %{_sysconfdir}/pam.d/smtp.postfix /usr/libexec/postfix/postlogd %files manpages %defattr(-, root, root) %{postfix_doc_dir} %attr(0644, root, root) %{_mandir}/man1/* %attr(0644, root, root) %{_mandir}/man5/* %attr(0644, root, root) %{_mandir}/man8/*
2023-03-28 10:51:26 Miriam España Acebal merge proposal linked https://code.launchpad.net/~mirespace/ubuntu/+source/postfix/+git/postfix/+merge/439804
2023-03-28 10:53:25 Miriam España Acebal merge proposal linked https://code.launchpad.net/~mirespace/ubuntu/+source/postfix/+git/postfix/+merge/439810
2023-04-12 06:01:49 Chris Halse Rogers postfix (Ubuntu Kinetic): status In Progress Fix Committed
2023-04-12 06:01:51 Chris Halse Rogers bug added subscriber Ubuntu Stable Release Updates Team
2023-04-12 06:01:54 Chris Halse Rogers bug added subscriber SRU Verification
2023-04-12 06:02:00 Chris Halse Rogers tags verification-needed verification-needed-kinetic
2023-04-12 06:16:37 Chris Halse Rogers postfix (Ubuntu Jammy): status In Progress Fix Committed
2023-04-12 06:16:46 Chris Halse Rogers tags verification-needed verification-needed-kinetic verification-needed verification-needed-jammy verification-needed-kinetic
2023-04-12 13:37:55 Andreas Hasenack postfix (Ubuntu): status New Fix Released
2023-04-12 13:40:03 Andreas Hasenack postfix: status New Fix Released
2023-04-19 10:14:41 Miriam España Acebal tags verification-needed verification-needed-jammy verification-needed-kinetic verification-done-kinetic verification-needed verification-needed-jammy
2023-04-19 11:31:16 Miriam España Acebal tags verification-done-kinetic verification-needed verification-needed-jammy verification-done verification-done-jammy verification-needed-kinetic
2023-04-19 11:33:04 Miriam España Acebal tags verification-done verification-done-jammy verification-needed-kinetic verification-done verification-done-jammy verification-done-kinetic
2023-04-19 14:56:06 Launchpad Janitor postfix (Ubuntu Kinetic): status Fix Committed Fix Released
2023-04-19 14:56:12 Robie Basak removed subscriber Ubuntu Stable Release Updates Team
2023-04-19 14:56:18 Launchpad Janitor postfix (Ubuntu Jammy): status Fix Committed Fix Released