5 ms·
As a gentoo user, this postinstall behavior on debian/fedora/etc was rather shocking to me when I first encountered it. With gentoo portage, either when initial
by throwdbaaway 5y ago
As a gentoo user, this postinstall behavior on debian/fedora/etc was rather shocking to me when I first encountered it. With gentoo portage, either when initially installing a package or when upgrading it, nothing under /var/lib is created or modified, and the process itself is never automagically started or stopped. The postinstall behavior actually feels like a regression toward windows-style installer.
The cassandra debian package is a good example. If I let the postinstall script runs, then it will use the default config to start a single-node cassandra cluster, creating a bunch of stuffs under /var/lib/cassandra, which then need to be removed first if I want to build a proper image from the disk. Doing the removal as part of the automation feels too risky to me, as it may only take one typo to accidentally delete /var/lib/cassandra in production. Instead, I usually just put a policy-rc.d script to disable all postinstall scripts from running.
- oshiar53-0 5y agoIt's worth noting that Fedora/RHEL's postinstall is generally less intrusive than Debain's, though. For instance it doesn't just automatically create databases or starts/enables services.
- marcosdumay 5y agoPeople expect `apt install package` to leave the package installed and running. That expectation does change from one distro to another. Slackware was one that wouldn't even create a start script for a deamon.
- chousuke 5y agoDebian also has debconf, which attempts to be a universal configuration management system, so it'll generate and re-generate configuration files from templates. Unfortunately, in my experience it gets in my way more often than it helps since I usually have separate automation that configures the software anyway. I use Debian-based systems pretty rarely, so I still haven't figured out how you actually make dpkg regenerate your configuration files properly if you use automation to change a debconf selection and need to reconfigure a package. dpkg-reconfigure seems not to do what I want and just restores the previous value (or prompts interactively, which is not useful) for some reason.