Install php-inotify from the OS package where available#2828
Merged
Conversation
Ubuntu ships inotify as an OS package since 25.10 (php8.5-inotify on 26.04), so prefer that over building with PECL. On Ubuntu 24.04 the package doesn't exist, so keep the PECL path there, but install php-dev first - it was removed from the base installation in #2780, which made 'pecl install inotify' fail when enabling inotify for an SMB mount. No third-party repository (sury.org) is needed. Fixes #2827
6420b6f to
8df584b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2827
The SMB mount script builds the inotify PHP extension with PECL, but since #2780 removed
php-devfrom the base installation,pecl install inotifyfails on current systems - which is what the reporter of #2827 ran into (their workaround was adding the sury.org repository).There is no need for a third-party repository:
php8.5-inotifyon 26.04, which is what the VM currently installs). The script now prefers that when apt knows the package.php-devinstalled first so the build actually succeeds.Changes
apps/smbmount.sh: preferphp$PHPVER-inotifyfrom apt when available; otherwise installphp$PHPVER-devbefore building via PECL as before.The OS package ships its own
mods-available/inotify.ini, so the manual ini handling is only needed on the PECL path. Once 24.04 support is dropped, the PECL path can be removed entirely.