please stop touching an already installed main.cf with useless directory parameters ... thanks
You mean 'readme_directory' and 'html_directory' which get updated on version bumps?
i mean these: -readme_directory = /usr/share/doc/postfix-2.7.1/readme-sample_directory = /etc/postfix -sendmail_path = /usr/sbin/sendmail -html_directory = /usr/share/doc/postfix-2.7.1/html -setgid_group = postdrop -command_directory = /usr/sbin -manpage_directory = /usr/share/man -daemon_directory = //usr/lib64/postfix-newaliases_path = /usr/bin/newaliases -mailq_path = /usr/bin/mailq-queue_directory = /var/spool/postfix -mail_owner = postfix -data_directory = /var/lib/postfix
I've also wondered why every remerge feels the need to set such "default" settings (useless) in main.cf. Literally, it is redefining the defaults as seen by "postconf -d" - I've never understood why it does this.
Probably the easiest way would be to just check if main.cf exists in the filesystem and not install a new one in that case. Does anyone have a problem with that method or a different idea?
Fixed in 2.8.1 in CVS as per comment #4. If someone wants to come up with a better solution or patch to fix the issue, feel free to reopen.
Created attachment 264147 [details, diff] Stop postfix post-install to alter installed files The main.cf is not altered by the file installed by portage (managed with etc-update) but by the postfix post-install script that directly alter the file installed in /etc/postfix and not in ${D}etc/postfix... The patch attached seems to fix the issue by passing to the post-install script the path in ${D} I do not see side effects, but please recheck.
OK, I emerged 2.7.3, and found main.cf gone after the install (this is not a critical MTA host, and I can put the default main.cf in place, so I'm not really put out). I will attach the log.
Created attachment 265891 [details] Log of postfix upgrade on host #1, where main.cf dissappears
Ah, and it has happened on a second host of mine! Here's the ls: "dell-gx620 portage # ls /etc/postfix/ master.cf saslpass dell-gx620 portage # " Same on seocond host: "fuji ~ # ls /etc/postfix/ master.cf saslpass fuji ~ # " I have another Portage update in progress, on a backup "true" MTA. I'm backing up /etc/postfix for this one... I'll post a log for this, too.
Created attachment 265893 [details] Host #2 mail-mta:postfix-2.7.2:20110314-183745.log This shows the main.cf file being DELETED on unmerge or "previous" version.
Created attachment 265897 [details] Host #2 mail-mta:postfix-2.7.3:20110314-183454.log Log of install of 2.7.3
So, after closer inspection, the unmerge of 2.7.2 appears to delete main.cf. However, 2.7.3's ebuild, still seeing /etc/postfix/main.cf before 2.7.2 deletes it, doesn't install a default file. It would still be bad to install default over already configured file (without etc-update merging), but as it is, it instantly makes any postfix tasks fail. I send mails after completed emerge upgrades, so I saw the dreaded "send-mail: fatal: open /etc/postfix/main.cf: No such file or directory" and "Can't send mail: sendmail process failed with error code 75". So, this bug should be reopened.
(In reply to comment #12) > So, after closer inspection, the unmerge of 2.7.2 appears to delete main.cf. > However, 2.7.3's ebuild, still seeing /etc/postfix/main.cf before 2.7.2 deletes > it, doesn't install a default file. It would still be bad to install default > over already configured file (without etc-update merging), but as it is, it > instantly makes any postfix tasks fail. I send mails after completed emerge > upgrades, so I saw the dreaded "send-mail: fatal: open /etc/postfix/main.cf: No > such file or directory" and "Can't send mail: sendmail process failed with > error code 75". > > So, this bug should be reopened. Alright, I'll revert that change for 2.7.3 and look into this again when I have time.
(In reply to comment #12) > So, this bug should be reopened. Also, can you post your emerge --info? I can't reproduce this bug on a stable system when upgrading from 2.7.2 to 2.7.3. Thanks.
(In reply to comment #12) > So, after closer inspection, the unmerge of 2.7.2 appears to delete main.cf. > However, 2.7.3's ebuild, still seeing /etc/postfix/main.cf before 2.7.2 deletes > it, doesn't install a default file. This sounds like you may have something like CONFIG_PROTECT="-*" or CONFIG_PROTECT_MASK="/etc/postfix" set in your make.conf since with the default config file protection portage won't delete any files from a protected directory when a package is unmerged.
emerge --info's: http://paste.pocoo.org/show/353825/ http://paste.pocoo.org/show/353826/ Thanks!
This failed for me too: postfix-2.7.3 now won't work correctly, apparently because there's no main.cf to be found. This is on a fairly vanilla stable amd64 system, with an unmodified CONFIG_PROTECT_MASK, so this seems like a pretty bad bug.
(In reply to comment #17) > This failed for me too: postfix-2.7.3 now won't work correctly, apparently > because there's no main.cf to be found. This is on a fairly vanilla stable > amd64 system, with an unmodified CONFIG_PROTECT_MASK, so this seems like a > pretty bad bug. I already reverted the temporary fix I made which caused that problem so anyone syncing since a few hours ago shouldn't hit the issue. Also, I'm just guessing, but I think the difference may be that I was using an ~arch marked portage and didn't see any problems so perhaps CONFIG_PROTECT handling changed a bit between 2.1.9.25 and 2.1.9.42.
stable portage does NOT remove /etc/* stuff by default
I don't get why qa@ was added, the maintainer(s) clearly were active and fixed it quickly.
(In reply to comment #2) > i mean these: [...] from postfix-install: # Save the installation parameters to main.cf even when they haven't # changed from their current default. Defaults can change between # Postfix releases, and software should not suddenly be installed in # the wrong place when Postfix is being upgraded. bin/postconf -c $CONFIG_DIRECTORY -e \ "daemon_directory = $daemon_directory" \ "data_directory = $data_directory" \ "command_directory = $command_directory" \ "queue_directory = $queue_directory" \ "mail_owner = $mail_owner" \ "setgid_group = $setgid_group" \ "sendmail_path = $sendmail_path" \ "mailq_path = $mailq_path" \ "newaliases_path = $newaliases_path" \ "html_directory = $html_directory" \ "manpage_directory = $manpage_directory" \ "sample_directory = $sample_directory" \ "readme_directory = $readme_directory" \ || exit 1 Closing as invalid. Please reopen if you disagree.
I cannot reopen but sorry, I completely disagree... 1) From an admin sys point of view, silently altering configuration files into the root filesystem is simply a *HELL*. Configuration files are generally centralized (and backuped and/or versionned), at least by serious admin sys. Altering files silently is a nonsense and cannot be correctly managed, and will lead to unattended breakages and wrong re-deployments. 2) From a Gentoo point of view, this is illegal. Config files should not be altered inside root filesystem ! I can understand the postfix devs point of view, but for the gentoo package, the right way is: config file should be "fixed" *INSIDE ${D}* then managed with etc-update, but certainly not silently overwritten inside the root filesystem... This is the aim of the patch I posted some month ago, unless I did not see some side effects...
i completely agree with comment 22
Created attachment 272439 [details] postfix-2.8.2-r1.ebuild (In reply to comment #22) > 2) From a Gentoo point of view, this is illegal. Config files should not be > altered inside root filesystem ! I don't think anyone disputes this. Anyhow, please check the attached ebuild to see if it solves the problem.
Created attachment 272461 [details] postfix-2.8.2-r1.ebuild Please test this ebuild as well. It should work if I am reading it correctly and is somewhat less of a hack. Thanks.
(In reply to comment #25) > Created attachment 272461 [details] > postfix-2.8.2-r1.ebuild > > Please test this ebuild as well. It should work if I am reading it correctly > and is somewhat less of a hack. Thanks. Attach a diff please, thanks.
Created attachment 272669 [details, diff] Alternative 1
Created attachment 272671 [details, diff] Alternative 2 Prefer alt-2 if both of them work.
Are people still seeing this with the latest ~arch versions in the tree? On my machines, I haven't seen this problem since I added the doc and examples use flags and made a few other changes to the 2.8.1 and 2.7.3 ebuilds to try to alleviate the problem.
still an issue with both 2.7.4 and 2.8.3
(In reply to comment #30) > still an issue with both 2.7.4 and 2.8.3 Do you have the doc USE flag enabled?
(In reply to comment #31) > (In reply to comment #30) > > still an issue with both 2.7.4 and 2.8.3 > > Do you have the doc USE flag enabled? no: $ emerge --info Portage 2.2.0_alpha33 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.11.3-r0, 2.6.38-gentoo-r1 x86_64) ================================================================= System uname: Linux-2.6.38-gentoo-r1-x86_64-Intel-R-_Atom-TM-_CPU_D525_@_1.80GHz-with-gentoo-2.0.2 Timestamp of tree: Mon, 16 May 2011 06:15:01 +0000 app-shells/bash: 4.1_p9 dev-lang/python: 2.7.1-r1 dev-util/cmake: 2.8.4-r1 sys-apps/baselayout: 2.0.2 sys-apps/openrc: 0.8.2-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.65-r1 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.5 sys-devel/gcc-config: 1.4.1-r1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers) sys-libs/glibc: 2.11.3 Repositories: gentoo hollow betagarden Installed sets: ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=athlon64 -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--quiet-build --with-bdeps=y --binpkg-respect-use=y --rebuilt-binaries=n --keep-going --usepkg" FEATURES="assume-digests binpkg-logs buildpkg collision-protect distlocks ebuild-locks fixlafiles fixpackages news noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox" FFLAGS="" GENTOO_MIRRORS="ftp://ftp.spline.de/pub/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages/amd64" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/hollow /var/lib/layman/betagarden" SYNC="rsync://rsync.spline.de/gentoo-portage" USE="acl amd64 bash-completion berkdb bzip2 caps cli cracklib crypt cxx dri fontconfig fortran gdbm gpm gs iconv idn ipv6 jpeg mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl png pppd python readline session sse sse2 ssl svg sysfs tcpd tiff truetype unicode urandom vhosts vim-syntax xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
# stat /etc/postfix/main.cf File: `/etc/postfix/main.cf' Size: 26282 Blocks: 56 IO Block: 4096 regular file Device: 807h/2055d Inode: 466455 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2011-06-13 11:03:08.000000000 +0300 Modify: 2011-06-13 11:03:08.000000000 +0300 Change: 2011-06-13 11:03:15.000000000 +0300 Birth: - # emerge -va =mail-mta/postfix-2.8.3-r1 [...] # stat /etc/postfix/main.cf File: `/etc/postfix/main.cf' Size: 26282 Blocks: 56 IO Block: 4096 regular file Device: 807h/2055d Inode: 466455 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2011-06-13 11:03:08.000000000 +0300 Modify: 2011-06-13 11:03:08.000000000 +0300 Change: 2011-06-13 11:03:15.000000000 +0300 Birth: - which is the requested behavior if I am not mistaken. Can someone please check and confirm with postfix-2.8.3-r1? Thank you.
(In reply to comment #33) > which is the requested behavior if I am not mistaken. Can someone please check > and confirm with postfix-2.8.3-r1? Thank you. works, thanks a lot!
Great, confirmed too, works perfectly now. Thanks !
Thanks. Closing.