0

I used this recipe from DigitalOcean to install phpMyAdmin on a web server running Ubuntu 16.04 LTS.

However, the version of php-gettext that you get for Ubuntu 16.4 LTS by doing:

apt install php-gettext

is from 2010, and it uses some depreciated class contructors (as pointed out in this answer).

My question is: If I go ahead and apply the suggested edits, will it have any (harmful) side effects. For instance will me patching the code stop it from being upgraded when the fine people officially maintaining Ubuntu 16.04 gets around to fixing this?

Or can I go ahead and patch it, and when the official upgrade comes along, it will be automatically installed as normal when I do the apt upgrade?

Free Radical
  • 419
  • 1
  • 7
  • 20
  • I don't understand; why do you need to install `php-gettext`? It is also provided by `php7.0-common`, and if you installed PHP, you have the `php7.0-common` package and there's no point to installing the other package. – muru Aug 10 '17 at 09:00
  • @muru, I updated my question to explain why I installed `php-gettext` (i.e. the good people at DigitalOcean told me to do so to have *phpMyAdmin*). I am not an Ubuntu boffin - so I follow recipes from trusted sources when I install stuff. Also, I would like to know the answer to the general question: If I install *something* using `apt`, and then patch it - will *something* suffer from side-effects (such as no longer being automatically updated by the package manager when new versions of *something* is made officially available for upgrades)? – Free Radical Aug 10 '17 at 09:14

1 Answers1

1

You can go ahead and patch it manually, but when the php-gettext package gets updated for any reason whatsoever, your changes will be overwritten. Apt will ask about changes to configuration files, but it simply doesn't care about any other changes (and files in /usr typically won't be marked as configuration files).

So, no, it won't affect upgrades, but you'll need to be re-apply the changes when upgrading if the new version doesn't fix the problem.

muru
  • 193,181
  • 53
  • 473
  • 722
  • Thanks! I understand that my patches will be overwritten. I keep a copy of everything I patch in a git repo. This is both to keep of track of what I do, and do be able to reapply the patch if the official update is for fixing some other problem. – Free Radical Aug 10 '17 at 09:20