Skip to content

Commit 64cc76b

Browse files
committed
Followup fix for Bug#25088048 - ADDITIONAL ISSUES IN MYSQLD_SAFE
- Removed mysql.conf, mysqld.service and mysql-systemd-start from sles spec file (cherry picked from commit 35c1adc17c1a99b2c256d374500437a6ce21339e)
1 parent 2023551 commit 64cc76b

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

packaging/rpm-sles/mysql.spec.in

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
# Regression tests may take a long time, override the default to skip them
2525
%{!?runselftest:%global runselftest 0}
2626

27-
%{!?with_systemd: %global systemd 0}
2827
%{!?with_debuginfo: %global nodebuginfo 1}
2928
%{!?product_suffix: %global product_suffix community}
3029
%{!?feature_set: %global feature_set community}
@@ -69,9 +68,6 @@ Source0: https://cdn.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src
6968
URL: http://www.mysql.com/
7069
Packager: MySQL Release Engineering <[email protected]>
7170
Vendor: %{mysql_vendor}
72-
Source1: mysql-systemd-start
73-
Source2: mysqld.service
74-
Source3: mysql.conf
7571
Source4: my_config.h
7672
Source90: filter-provides.sh
7773
Source91: filter-requires.sh
@@ -81,9 +77,6 @@ BuildRequires: libaio-devel
8177
BuildRequires: ncurses-devel
8278
BuildRequires: openssl-devel
8379
BuildRequires: zlib-devel
84-
%if 0%{?systemd}
85-
BuildRequires: systemd
86-
%endif
8780
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
8881

8982
%if 0%{?rhel} > 6
@@ -141,15 +134,9 @@ Obsoletes: mariadb-server
141134
Obsoletes: mariadb-galera-server
142135
Provides: mysql = %{version}-%{release}
143136
Provides: mysql-tools = %{version}-%{release}
144-
%if 0%{?systemd}
145-
Requires(post): systemd
146-
Requires(preun): systemd
147-
Requires(postun): systemd
148-
%else
149137
PreReq: insserv
150138
PreReq: sed
151139
PreReq: pwdutils
152-
%endif
153140
Conflicts: otherproviders(mysql)
154141
Conflicts: otherproviders(mysql-debug)
155142
Conflicts: otherproviders(mysql-tools)
@@ -435,13 +422,7 @@ make DESTDIR=%{buildroot} install
435422
install -D -m 0644 $MBD/release/support-files/mysql-log-rotate %{buildroot}%{_sysconfdir}/logrotate.d/mysql
436423
install -D -m 0644 $MBD/release/packaging/rpm-sles/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
437424
install -d %{buildroot}%{_sysconfdir}/my.cnf.d
438-
%if 0%{?systemd}
439-
install -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/mysql-systemd-start
440-
install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/mysqld.service
441-
%else
442425
install -D -m 0755 $MBD/release/packaging/rpm-sles/mysql.init %{buildroot}%{_sysconfdir}/init.d/mysql
443-
%endif
444-
install -D -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/tmpfiles.d/mysql.conf
445426

446427
# Make library links
447428
install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d
@@ -461,9 +442,6 @@ rm -rf %{buildroot}%{_datadir}/mysql/mysql.server
461442
rm -rf %{buildroot}%{_datadir}/mysql/mysqld_multi.server
462443
rm -f %{buildroot}%{_datadir}/mysql/{ndb-config-2-node,config*}.ini
463444
rm -f %{buildroot}%{_datadir}/mysql/my-*.cnf
464-
%if 0%{?systemd}
465-
rm -rf %{buildroot}%{_sysconfdir}/init.d/mysql
466-
%endif
467445
rm -rf %{buildroot}%{_bindir}/mysql_embedded
468446
rm -rf %{buildroot}%{_bindir}/mysql_setpermission
469447
rm -rf %{buildroot}%{_mandir}/man1/mysql_setpermission.1*
@@ -496,31 +474,18 @@ datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n
496474
/bin/chmod 0755 "$datadir"
497475
/bin/touch /var/log/mysql/mysqld.log
498476
/bin/chown mysql:mysql /var/log/mysql/mysqld.log >/dev/null 2>&1 || :
499-
%if 0%{?systemd}
500-
%systemd_post mysqld.service
501-
/sbin/service mysqld enable >/dev/null 2>&1 || :
502-
%else
503477
/sbin/insserv /etc/init.d/mysql
504-
%endif
505478

506479
%preun server
507-
%if 0%{?systemd}
508-
%systemd_preun mysqld.service
509-
%else
510480
if [ "$1" -eq 0 ]; then
511481
/usr/sbin/rcmysql stop >/dev/null 2>&1 || :
512482
/sbin/insserv /etc/init.d
513483
fi
514-
%endif
515484

516485
%postun server
517-
%if 0%{?systemd}
518-
%systemd_postun_with_restart mysqld.service
519-
%else
520486
if [ $1 -ge 1 ]; then
521487
/usr/sbin/rcmysql condrestart >/dev/null 2>&1 || :
522488
fi
523-
%endif
524489

525490
%post libs -p /sbin/ldconfig
526491

@@ -596,9 +561,6 @@ fi
596561
%attr(755, root, root) %{_bindir}/replace
597562
%attr(755, root, root) %{_bindir}/resolve_stack_dump
598563
%attr(755, root, root) %{_bindir}/resolveip
599-
%if 0%{?systemd}
600-
%attr(755, root, root) %{_bindir}/mysql-systemd-start
601-
%endif
602564
%attr(755, root, root) %{_sbindir}/mysqld
603565
%attr(755, root, root) %{_sbindir}/mysqld-debug
604566
%attr(755, root, root) %{_sbindir}/rcmysql
@@ -629,12 +591,7 @@ fi
629591
%attr(644, root, root) %{_datadir}/mysql/mysql_test_data_timezone.sql
630592
%attr(644, root, root) %{_datadir}/mysql/mysql-log-rotate
631593
%attr(644, root, root) %{_datadir}/mysql/magic
632-
%attr(644, root, root) %{_prefix}/lib/tmpfiles.d/mysql.conf
633-
%if 0%{?systemd}
634-
%attr(644, root, root) %{_unitdir}/mysqld.service
635-
%else
636594
%attr(755, root, root) %{_sysconfdir}/init.d/mysql
637-
%endif
638595
%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql
639596
%dir %attr(755, mysql, mysql) /var/lib/mysql
640597
%dir %attr(755, mysql, mysql) /var/run/mysql

0 commit comments

Comments
 (0)