Noticed when installing mediawiki in a clean 3alpha2 No apache installed. Seems like a missing require. 1/36: libphp5_common5 ############################################# 2/36: t1lib-config ############################################# 3/36: libt1lib5 ############################################# 4/36: php-session ########################################warning: user apache does not exist - using root warning: group apache does not exist - using root #####
Summary: php-session - user:group apache does not exist => php-session - user:group apache does not exist - using root
Preparing... ############################################# 33/36: apache ############################################# 34/36: php-gd-bundled ############################################# 35/36: mediawiki ############################################# 36/36: apache-mod_php #############################################
CC: (none) => oliver.bgrSee Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=7295
Seems like a missing Requires(pre). Will look into it.
It doesn't need a Requires(pre) because there's not a %pre script. It does need a Requires: webserver-base, as that package provides the apache user.
CC: (none) => luigiwalser
Iirc using "Requires" does not help, because it could mean, the required package is installed in the same transacton or before. But if it is installed in the same transaction, it could still be installed after the package in question. Using "Requires(pre) does make sure, that it is installed before the package in question. See http://www.rpm.org/wiki/PackagerDocs/Dependencies
According to Jeff Johnson, the creator of RPM, this is a common misconception. If one package requires another, the required one should be installed first. The only reason it might not is if there is a dependency loop. There used to be a PreReq tag which meant to install one package before another, but that isn't used anymore. Requires(pre) is not a replacement for that, it is solely meant for if a package has a %pre script that needs another package to be present.
If Jeff says so... Even if I don't know, if that's true for the orignal rpm as well or just for his rpm5 fork. I submitted a new php package with the requires changed.
(In reply to comment #6) > If Jeff says so... > Even if I don't know, if that's true for the orignal rpm as well or just for > his rpm5 fork. Also true for rpm4. > I submitted a new php package with the requires changed. Thanks. Now that I look at the spec I notice a similar issue with php-fpm, but it has the wrong solution for it. It is adding and deleting the apache user with %post and %preun scriplets, but it should not be doing that. It should require webserver-base as well. Could you make this change too? If you do, could you do me a favor and also add this to php-cli: Provides: /usr/bin/php This is needed to fix Bug 6534 in Cauldron (already fixed in mga2). Thanks!
Will do...
Status: NEW => RESOLVEDResolution: (none) => FIXED