已合并
Update to version 3.8.8 #52
Funda Wang创建于 2024年10月26日
Update to version 3.8.8 #52
已合并
从refs/pull/52/head合入到master
共 3 个文件变更+28-25
| @@ -4,6 +4,18 @@ After=syslog.target network.target | |||
| 4 | Conflicts=sendmail.service exim.service | 4 | Conflicts=sendmail.service exim.service |
| 5 | 5 | ||
| 6 | [Service] | 6 | [Service] |
| 7 | +# added automatically, for details please see | ||
| 8 | +# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort | ||
| 9 | +ProtectHome=false | ||
| 10 | +PrivateDevices=true | ||
| 11 | +ProtectHostname=true | ||
| 12 | +ProtectClock=true | ||
| 13 | +ProtectKernelTunables=true | ||
| 14 | +ProtectKernelModules=true | ||
| 15 | +ProtectKernelLogs=true | ||
| 16 | +ProtectControlGroups=true | ||
| 17 | +RestrictRealtime=true | ||
| 18 | +# end of automatic additions | ||
| 7 | Type=forking | 19 | Type=forking |
| 8 | PIDFile=/var/spool/postfix/pid/master.pid | 20 | PIDFile=/var/spool/postfix/pid/master.pid |
| 9 | EnvironmentFile=-/etc/sysconfig/network | 21 | EnvironmentFile=-/etc/sysconfig/network |
| @@ -22,11 +22,11 @@ | |||
| 22 | 22 | ||
| 23 | Name: postfix | 23 | Name: postfix |
| 24 | Summary: Postfix Mail Transport Agent | 24 | Summary: Postfix Mail Transport Agent |
| 25 | -Version: 3.8.4 | 25 | +Version: 3.8.8 |
| 26 | Release: 1 | 26 | Release: 1 |
| 27 | Epoch: 2 | 27 | Epoch: 2 |
| 28 | -URL: http://www.postfix.org | 28 | +URL: https://www.postfix.org |
| 29 | -License: (IPL-1.0 and GPLv2+) or (EPL-2.0 and GPLv2+) | 29 | +License: (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC |
| 30 | Source0: http://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz | 30 | Source0: http://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz |
| 31 | Source1: postfix-etc-init.d-postfix | 31 | Source1: postfix-etc-init.d-postfix |
| 32 | Source2: postfix.service | 32 | Source2: postfix.service |
| @@ -99,13 +99,13 @@ PostgreSQL maps with Postfix, you need this. | |||
| 99 | 99 | ||
| 100 | %prep | 100 | %prep |
| 101 | %setup -qn %{name}-%{version} | 101 | %setup -qn %{name}-%{version} |
| 102 | -%patch1 -p1 -b .config | 102 | +%patch -P1 -p1 -b .config |
| 103 | -%patch2 -p1 -b .files | 103 | +%patch -P2 -p1 -b .files |
| 104 | -%patch3 -p1 -b .alternatives | 104 | +%patch -P3 -p1 -b .alternatives |
| 105 | -%patch4 -p1 -b .large-fs | 105 | +%patch -P4 -p1 -b .large-fs |
| 106 | 106 | ||
| 107 | -%patch11 -p1 | 107 | +%patch -P11 -p1 |
| 108 | -%patch12 -p1 | 108 | +%patch -P12 -p1 |
| 109 | 109 | ||
| 110 | sed -i \ | 110 | sed -i \ |
| 111 | 's|^\(\s*#define\s\+DEF_SHLIB_DIR\s\+\)"/usr/lib/postfix"|\1"%{_libdir}/postfix"|' \ | 111 | 's|^\(\s*#define\s\+DEF_SHLIB_DIR\s\+\)"/usr/lib/postfix"|\1"%{_libdir}/postfix"|' \ |
| @@ -115,8 +115,8 @@ src/util/dict_db.c | |||
| 115 | 115 | ||
| 116 | gzip -dc %{SOURCE53} | tar xf - | 116 | gzip -dc %{SOURCE53} | tar xf - |
| 117 | pushd pflogsumm-1.1.5 | 117 | pushd pflogsumm-1.1.5 |
| 118 | -%patch5 -p1 -b .datecalc | 118 | +%patch -P5 -p1 -b .datecalc |
| 119 | -%patch6 -p1 -b .ipv6-warnings-fix | 119 | +%patch -P6 -p1 -b .ipv6-warnings-fix |
| 120 | popd | 120 | popd |
| 121 | 121 | ||
| 122 | sed -i makedefs -e '\@Linux\.@s|345|3456|' | 122 | sed -i makedefs -e '\@Linux\.@s|345|3456|' |
| @@ -172,8 +172,6 @@ make -f Makefile.init makefiles shared=yes dynamicmaps=yes \ | |||
| 172 | %make_build | 172 | %make_build |
| 173 | 173 | ||
| 174 | %install | 174 | %install |
| 175 | -mkdir -p %{buildroot} | ||
| 176 | - | ||
| 177 | for i in man1/mailq.1 man1/newaliases.1 man1/sendmail.1 man5/aliases.5 man8/smtpd.8; do | 175 | for i in man1/mailq.1 man1/newaliases.1 man1/sendmail.1 man5/aliases.5 man8/smtpd.8; do |
| 178 | dest=$(echo $i | sed 's|\.[1-9]$|.postfix\0|') | 176 | dest=$(echo $i | sed 's|\.[1-9]$|.postfix\0|') |
| 179 | mv man/$i man/$dest | 177 | mv man/$i man/$dest |
| @@ -312,9 +310,6 @@ chrpath -d %{buildroot}%{_sbindir}/postconf | |||
| 312 | chrpath -d %{buildroot}%{_sbindir}/postsuper | 310 | chrpath -d %{buildroot}%{_sbindir}/postsuper |
| 313 | chrpath -d %{buildroot}%{_sbindir}/postmulti | 311 | chrpath -d %{buildroot}%{_sbindir}/postmulti |
| 314 | 312 | ||
| 315 | -mkdir -p %{buildroot}/etc/ld.so.conf.d | ||
| 316 | -echo "%{_libdir}/postfix" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf | ||
X | |||
| 317 | - | ||
| 318 | function split_file | 313 | function split_file |
| 319 | { | 314 | { |
| 320 | grep "$1" "$3" >> "$3.d/$2" || : | 315 | grep "$1" "$3" >> "$3.d/$2" || : |
| @@ -335,7 +330,6 @@ popd | |||
| 335 | 330 | ||
| 336 | %post -e | 331 | %post -e |
| 337 | %systemd_post %{name}.service | 332 | %systemd_post %{name}.service |
| 338 | -/sbin/ldconfig | ||
| 339 | 333 | ||
| 340 | %{_sbindir}/postfix set-permissions upgrade-configuration \ | 334 | %{_sbindir}/postfix set-permissions upgrade-configuration \ |
| 341 | daemon_directory=%{postfix_daemon_dir} \ | 335 | daemon_directory=%{postfix_daemon_dir} \ |
| @@ -411,7 +405,6 @@ exit 0 | |||
| 411 | 405 | ||
| 412 | %postun | 406 | %postun |
| 413 | %systemd_postun_with_restart %{name}.service | 407 | %systemd_postun_with_restart %{name}.service |
| 414 | -/sbin/ldconfig | ||
| 415 | 408 | ||
| 416 | %post sysvinit | 409 | %post sysvinit |
| 417 | /sbin/chkconfig --add postfix >/dev/null 2>&1 ||: | 410 | /sbin/chkconfig --add postfix >/dev/null 2>&1 ||: |
| @@ -435,10 +428,8 @@ fi | |||
| 435 | /bin/systemctl try-restart postfix.service >/dev/null 2>&1 || : | 428 | /bin/systemctl try-restart postfix.service >/dev/null 2>&1 || : |
| 436 | 429 | ||
| 437 | %files | 430 | %files |
| 438 | -%defattr(-,root,root) | ||
| 439 | %config(noreplace) %{sasl_config_dir}/smtpd.conf | 431 | %config(noreplace) %{sasl_config_dir}/smtpd.conf |
| 440 | %config(noreplace) %{_sysconfdir}/pam.d/smtp.postfix | 432 | %config(noreplace) %{_sysconfdir}/pam.d/smtp.postfix |
| 441 | -%config(noreplace) /etc/ld.so.conf.d/* | ||
| 442 | %{_unitdir}/postfix.service | 433 | %{_unitdir}/postfix.service |
| 443 | %{postfix_doc_dir} | 434 | %{postfix_doc_dir} |
| 444 | %dir %attr(0700,postfix,root) %{postfix_queue_dir}/active | 435 | %dir %attr(0700,postfix,root) %{postfix_queue_dir}/active |
| @@ -519,24 +510,20 @@ fi | |||
| 519 | %exclude %{_mandir}/man5/*_table.5* | 510 | %exclude %{_mandir}/man5/*_table.5* |
| 520 | 511 | ||
| 521 | %files sysvinit | 512 | %files sysvinit |
| 522 | -%defattr(-,root,root) | ||
| 523 | %{_initrddir}/postfix | 513 | %{_initrddir}/postfix |
| 524 | 514 | ||
| 525 | %files perl-scripts | 515 | %files perl-scripts |
| 526 | -%defattr(-,root,root) | ||
| 527 | %{postfix_command_dir}/qshape | 516 | %{postfix_command_dir}/qshape |
| 528 | %{postfix_command_dir}/pflogsumm | 517 | %{postfix_command_dir}/pflogsumm |
| 529 | 518 | ||
| 530 | %files pgsql | 519 | %files pgsql |
| 531 | -%defattr(-,root,root) | ||
| 532 | %{postfix_config_dir}/dynamicmaps.cf.d/pgsql | 520 | %{postfix_config_dir}/dynamicmaps.cf.d/pgsql |
| 533 | %{postfix_config_dir}/postfix-files.d/pgsql | 521 | %{postfix_config_dir}/postfix-files.d/pgsql |
| 534 | %{postfix_shlib_dir}/postfix-pgsql.so | 522 | %{postfix_shlib_dir}/postfix-pgsql.so |
| 535 | 523 | ||
| 536 | %files help | 524 | %files help |
| 537 | -%defattr(-,root,root) | ||
| 538 | %{_mandir}/man1/qshape* | 525 | %{_mandir}/man1/qshape* |
| 539 | -%{_mandir}/man1/pflogsumm.1.gz | 526 | +%{_mandir}/man1/pflogsumm.1* |
| 540 | %{_mandir}/man1/post*.1* | 527 | %{_mandir}/man1/post*.1* |
| 541 | %{_mandir}/man1/smtp*.1* | 528 | %{_mandir}/man1/smtp*.1* |
| 542 | %{_mandir}/man1/*.postfix.1* | 529 | %{_mandir}/man1/*.postfix.1* |
| @@ -556,6 +543,10 @@ fi | |||
| 556 | %{postfix_doc_dir}/README_FILES/* | 543 | %{postfix_doc_dir}/README_FILES/* |
| 557 | 544 | ||
| 558 | %changelog | 545 | %changelog |
| 546 | +* Mon Feb 17 2025 Funda Wang <fundawang@yeah.net> - 2:3.8.8-1 | ||
| 547 | +- update to 3.8.8 | ||
| 548 | +- harden systemd service | ||
| 549 | + | ||
| 559 | * Tue Jan 02 2024 gaihuiying <eaglegai@163.com> - 2:3.8.4-1 | 550 | * Tue Jan 02 2024 gaihuiying <eaglegai@163.com> - 2:3.8.4-1 |
| 560 | - Type:requirements | 551 | - Type:requirements |
| 561 | - ID:NA | 552 | - ID:NA |
这里为什么移除了?现在会导致mailman3服务起不来 root@localhost ~]# /usr/sbin/postmap /var/lib/mailman3/data/postfix_lmtp /usr/sbin/postmap: error while loading shared libraries: libpostfix-global.so: cannot open shared object file: No such file or directory