-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Mdev 5536 systemd socket activation notification #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
02b6457
63d2b93
ebb3153
3c9c925
04f52db
2f140dc
8c607c2
d0619cd
db1910a
44d739c
eab0481
24c5344
f7aad0b
39549e8
bdb1870
a73d3e2
58e4690
b481e4f
9ab56fa
91b0bc8
85b9e87
246362e
615c804
b499e19
2bfe611
4e351f1
af012a5
e65f3d6
2a2c21b
9b2a1a1
b7c1c8b
1466c20
9fb0b91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -180,6 +180,9 @@ install: build | |
| install -m 0644 $(builddir)/Docs/INFO_SRC $(TMP)/usr/share/doc/mariadb-server-10.0/INFO_SRC | ||
| install -m 0644 $(builddir)/Docs/INFO_BIN $(TMP)/usr/share/doc/mariadb-server-10.0/INFO_BIN | ||
|
|
||
| # systemd helpers | ||
| install -m 0755 support-files/mariadb-systemd-start $(TMP)/usr/bin/ | ||
|
|
||
| # mariadb-test | ||
| mv $(TMP)/usr/mysql-test $(TMP)/usr/share/mysql | ||
|
|
||
|
|
@@ -216,7 +219,9 @@ binary-indep: build install | |
| dh_installexamples -i | ||
| dh_installmenu -i | ||
| dh_installlogrotate -i | ||
| dh_systemd_enable -i support-files/mariadb.service support-files/mariadb.socket | ||
| dh_installinit -i | ||
| dh_systemd_start -i --restart-after-upgrade mariadb.socket | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this require systemd? dh_systemd_enable does not, according to its man page.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure. I'm assuming the abstraction is on the debian end. Just following the rules: https://wiki.debian.org/systemd/Packaging |
||
| dh_installcron -i | ||
| dh_installman -i | ||
| dh_installinfo -i | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
|
|
||
| #ifndef _my_sdnotify_h | ||
| #define _my_sdnotify_h | ||
|
|
||
| #ifdef HAVE_SYSTEMD | ||
| #include <systemd/sd-daemon.h> | ||
|
|
||
| #else | ||
|
|
||
| #define sd_listen_fds(X) 0 | ||
|
|
||
| #define sd_notify(X, Y, Z) | ||
| static int sd_notifyf(int unset_environment, const char *format, ...) {} | ||
|
|
||
| #endif | ||
|
|
||
| #endif /* _my_sdnotify_h */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Used to generate a mariadb.service file based on the curent mysql/maridb settings | ||
| # | ||
| # This is to assist distro maintainers in migrating to systemd service definations from | ||
| # a user mysqld_safe settings in the my.cnf files. | ||
| # | ||
| # Redirect output to user directory like /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf | ||
|
|
||
| tz_old=$TZ | ||
|
|
||
| . /usr/bin/mysqld_safe --simulate | ||
|
|
||
| echo "# converted using $0" | ||
| echo "#" | ||
| echo | ||
|
|
||
| echo '[Service]' | ||
|
|
||
| echo | ||
|
|
||
|
|
||
| if [[ ( "$user" != "root" && "$user" != "mysql" ) || "${SET_USER}" == 1 ]]; then | ||
| echo User=$user | ||
| fi | ||
|
|
||
|
|
||
| [ -n "${open_files}" ] && echo LimitNOFILE=$open_files | ||
| [ -n "${core_file_size}" ] && echo LimitCore=$core_file_size | ||
| [ "${niceness}" -gt 0 ] && echo Nice=$niceness | ||
| [ "${TZ}" != "${tz_old}" ] && echo Environment=\"TZ=${TZ}\" | ||
|
|
||
| if [ -n "$mysqld_ld_preload" ]; then | ||
| new_text="$mysqld_ld_preload" | ||
| [ -n "$LD_PRELOAD" ] && new_text="$new_text $LD_PRELOAD" | ||
| echo Environment=\"LD_PRELOAD=`shell_quote_string "$new_text"`\" | ||
| fi | ||
|
|
||
| if [ -n "$mysqld_ld_library_path" ]; then | ||
| new_text="$mysqld_ld_library_path" | ||
| [ -n "$LD_LIBRARY_PATH" ] && new_text="$new_text:$LD_LIBRARY_PATH" | ||
| echo Environment=\"LD_LIBRARY_PATH=`shell_quote_string "$new_text"`\" | ||
| fi | ||
|
|
||
| if [ $want_syslog -eq 1 ]; then | ||
| echo StandardError=syslog | ||
| echo SyslogFacility=daemon | ||
| echo SyslogLevel=error | ||
| echo SyslogLevelPrefix=${syslog_tag_mysqld} | ||
| fi | ||
|
|
||
| if [ "${flush_caches}" -gt 0 ]; then | ||
| echo ExecStartPre=sync | ||
| echo ExecStartPre=sysctl -q -w vm.drop_caches=3 | ||
| fi | ||
|
|
||
| if [ "${numa_interleave}" -gt 0 ]; then | ||
| echo | ||
| echo ExecStart=numactl --interleave=all ${cmd} '${OPTIONS}' | ||
| echo | ||
| fi | ||
|
|
||
| [ -n "${CRASH_SCRIPT}" ] && echo FailureAction=${CRASH_SCRIPT} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd think that rpm scriptlets would need the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added to support-files/mysql.spec.sh