Bug 227231 - databases/mysql80-server: Adapt ${name}_limits to the new resource limiting mechanics for services
Summary: databases/mysql80-server: Adapt ${name}_limits to the new resource limiting m...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mahdi Mokhtari
URL:
Keywords: regression
Depends on:
Blocks: 227205
  Show dependency treegraph
 
Reported: 2018-04-03 01:03 UTC by Mateusz Piotrowski
Modified: 2018-04-11 00:32 UTC (History)
0 users

See Also:
mmokhi: maintainer-feedback+
mmokhi: maintainer-feedback+


Attachments
Patch adding support for the new ${name}_limits mechanics (databases/mysql80-server) (2.79 KB, patch)
2018-04-03 01:03 UTC, Mateusz Piotrowski
no flags Details | Diff
Patch adding support for the new ${name}_limits mechanics (databases/mysql80-server, revision: 1) (2.79 KB, patch)
2018-04-04 18:23 UTC, Mateusz Piotrowski
0mp: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Piotrowski freebsd_committer 2018-04-03 01:03:36 UTC
Created attachment 192147 [details]
Patch adding support for the new ${name}_limits mechanics (databases/mysql80-server)

Thanks to the recent change to rc.subr(8) it is no longer necessary to
define a resource limiting logic in service scripts. limits(1) is now run
by default and its configuration is handled via the "${name}_limits"
variable.

Unfortunately, there is a collision of variable names. The service
scripts are broken on FreeBSD version with that new change (12.0-CURRENT,
11-STABLE and soon 11.2-RELEASE). It has been reported and diagnosed here.[2]

I'm submitting a patch fixing the service script for this port. A similar patch
has already been accepted by a maintainer of another database port.[2]

This port was previously fixed to unbreak the service on newer systems. The submitted patch removes support for the old behavior from newer systems. 


The patch preserves the old behavior on the systems without the
modification.

It would be great if you could review the patch and test it. :)

[1]: https://svnweb.freebsd.org/base?view=revision&revision=r328331
[2]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226907
Comment 1 Mahdi Mokhtari freebsd_committer freebsd_triage 2018-04-03 06:10:09 UTC
Hi,
Thanks for nice work, reduced for me A LOT :D
I'll test it and feedback to you by evening (my local time ``:D).

[yeah the post is just copy-pasted of what I have written for 56 and 57 except the estimated time``;D]
Comment 2 Mateusz Piotrowski freebsd_committer 2018-04-04 18:23:21 UTC
Created attachment 192232 [details]
Patch adding support for the new ${name}_limits mechanics (databases/mysql80-server, revision: 1)

The previous patch would fail to trigger the new ${name}_limits semantics for __FreeBSD_version 1101514. The new patch fixes it (thanks to mmokhi@).
Comment 3 commit-hook freebsd_committer 2018-04-04 21:01:55 UTC
A commit references this bug:

Author: mmokhi
Date: Wed Apr  4 21:01:29 UTC 2018
New revision: 466508
URL: https://svnweb.freebsd.org/changeset/ports/466508

Log:
  databases/mysql80-server: Adapt ${name}_limits to the new mechanism
  Regarding to the changes to rc.subr(8) it is no longer necessary to
  define a resource limiting logic in service scripts.
  limits(1) is now run by default and its configuration is handled
  via the "${name}_limits" variable.
  This however causes collision of variable names and also is not
  compatible with the old mechanism.
  This fixes the rc-script of mysql80 for the bases with both
  old and new mechanism.
  (This is port of the r466505 [and r466506])

  PR:		227231
  Submitted by:	0mp
  Reported by:	0mp
  Sponsored by:	Netzkommune GmbH

Changes:
  head/databases/mysql80-server/Makefile
  head/databases/mysql80-server/files/mysql-server.in
Comment 4 Mahdi Mokhtari freebsd_committer freebsd_triage 2018-04-04 21:02:53 UTC
Committed.
Thanks a lot for your help :)