Skip to content

Commit

Permalink
Add license info in each subpackage
Browse files Browse the repository at this point in the history
  • Loading branch information
bkandasa committed Oct 6, 2014
1 parent 0fc7b50 commit 632155e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
24 changes: 18 additions & 6 deletions packaging/rpm-oel/mysql.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ Obsoletes: mariadb-test
Provides: mysql-test = %{version}-%{release}
Provides: mysql-test%{?_isa} = %{version}-%{release}


%description test
This package contains the MySQL regression test suite for MySQL
database server.
Expand Down Expand Up @@ -564,6 +563,7 @@ make DESTDIR=%{buildroot} install
# Install logrotate and autostart
install -D -m 0644 $MBD/release/support-files/mysql-log-rotate %{buildroot}%{_sysconfdir}/logrotate.d/mysql
install -D -m 0644 $MBD/release/packaging/rpm-oel/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
install -d %{buildroot}%{_sysconfdir}/my.cnf.d
%if 0%{?systemd}
install -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/mysql-systemd-start
install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/mysqld.service
Expand All @@ -572,7 +572,7 @@ install -D -m 0755 $MBD/release/packaging/rpm-oel/mysql.init %{buildroot}%{_sysc
%endif
install -D -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/tmpfiles.d/mysql.conf

# Make library links
# Add libdir to linker
install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf

Expand Down Expand Up @@ -625,11 +625,11 @@ rm -r $(readlink var) var

%post server
datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p')
/bin/chmod 0755 "$datadir"
/bin/touch /var/log/mysqld.log
/bin/chmod 0755 "$datadir" >/dev/null 2>&1 || :
/bin/touch /var/log/mysqld.log >/dev/null 2>&1 || :
%if 0%{?systemd}
%systemd_post mysqld.service
/sbin/service mysqld enable >/dev/null 2>&1 || :
/usr/bin/systemctl enable mysqld >/dev/null 2>&1 || :
%else
/sbin/chkconfig --add mysqld
%endif
Expand Down Expand Up @@ -701,6 +701,7 @@ fi
%attr(644, root, root) %{_mandir}/man1/resolveip.1*

%config(noreplace) %{_sysconfdir}/my.cnf
%dir %{_sysconfdir}/my.cnf.d

%attr(755, root, root) %{_bindir}/innochecksum
%attr(755, root, root) %{_bindir}/my_print_defaults
Expand Down Expand Up @@ -767,7 +768,6 @@ fi
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/authentication_pam.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/thread_pool.so
%endif

%attr(644, root, root) %{_datadir}/mysql/fill_help_tables.sql
%attr(644, root, root) %{_datadir}/mysql/mysql_system_tables.sql
%attr(644, root, root) %{_datadir}/mysql/mysql_system_tables_data.sql
Expand All @@ -788,6 +788,7 @@ fi

%files common
%defattr(-, root, root, -)
%doc %{?license_files_server}
%{_datadir}/mysql/charsets/
%{_datadir}/mysql/errmsg-utf8.txt
%{_datadir}/mysql/czech/
Expand Down Expand Up @@ -816,6 +817,7 @@ fi

%files client
%defattr(-, root, root, -)
%doc %{?license_files_server}
%attr(755, root, root) %{_bindir}/msql2mysql
%attr(755, root, root) %{_bindir}/mysql
%attr(755, root, root) %{_bindir}/mysql_find_rows
Expand Down Expand Up @@ -848,6 +850,7 @@ fi

%files devel
%defattr(-, root, root, -)
%doc %{?license_files_server}
%attr(644, root, root) %{_mandir}/man1/comp_err.1*
%attr(644, root, root) %{_mandir}/man1/mysql_config.1*
%attr(755, root, root) %{_bindir}/mysql_config
Expand All @@ -862,6 +865,7 @@ fi

%files libs
%defattr(-, root, root, -)
%doc %{?license_files_server}
%dir %attr(755, root, root) %{_libdir}/mysql
%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
%{_libdir}/mysql/libmysqlclient.so.18*
Expand All @@ -870,6 +874,7 @@ fi
%if 0%{?compatlib}
%files libs-compat
%defattr(-, root, root, -)
%doc %{?license_files_server}
%dir %attr(755, root, root) %{_libdir}/mysql
%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
%{_libdir}/mysql/libmysqlclient.so.%{compatlib}
Expand All @@ -880,6 +885,7 @@ fi

%files test
%defattr(-, root, root, -)
%doc %{?license_files_server}
%attr(-, root, root) %{_datadir}/mysql-test
%attr(755, root, root) %{_bindir}/mysql_client_test
%attr(755, root, root) %{_bindir}/mysql_client_test_embedded
Expand All @@ -892,16 +898,19 @@ fi

%files bench
%defattr(-, root, root, -)
%doc %{?license_files_server}
%{_datadir}/sql-bench

%files embedded
%defattr(-, root, root, -)
%doc %{?license_files_server}
%dir %attr(755, root, root) %{_libdir}/mysql
%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
%attr(755, root, root) %{_libdir}/mysql/libmysqld.so.*

%files embedded-devel
%defattr(-, root, root, -)
%doc %{?license_files_server}
%attr(644, root, root) %{_libdir}/mysql/libmysqld.a
%attr(644, root, root) %{_libdir}/mysql/libmysqld-debug.a
%attr(755, root, root) %{_libdir}/mysql/libmysqld.so
Expand All @@ -913,6 +922,9 @@ fi
%endif

%changelog
* Mon Oct 06 2014 Balasubramanian Kandasamy <[email protected]> - 5.5.41-1
- Add license info in each subpackage

* Tue Jul 22 2014 Balasubramanian Kandasamy <[email protected]> - 5.5.39-5
- Provide mysql-compat-server dependencies

Expand Down
22 changes: 19 additions & 3 deletions support-files/mysql.spec.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -1055,7 +1055,6 @@ echo "=====" >> $STATUS_HISTORY

%files -n MySQL-server%{product_suffix} -f release/support-files/plugins.files
%defattr(-,root,root,0755)

%if %{defined license_files_server}
%doc %{license_files_server}
%endif
Expand Down Expand Up @@ -1142,8 +1141,10 @@ echo "=====" >> $STATUS_HISTORY

# ----------------------------------------------------------------------------
%files -n MySQL-client%{product_suffix}

%defattr(-, root, root, 0755)
%if %{defined license_files_server}
%doc %{license_files_server}
%endif
%attr(755, root, root) %{_bindir}/msql2mysql
%attr(755, root, root) %{_bindir}/mysql
%attr(755, root, root) %{_bindir}/mysql_find_rows
Expand Down Expand Up @@ -1175,6 +1176,9 @@ echo "=====" >> $STATUS_HISTORY
# ----------------------------------------------------------------------------
%files -n MySQL-devel%{product_suffix} -f optional-files-devel
%defattr(-, root, root, 0755)
%if %{defined license_files_server}
%doc %{license_files_server}
%endif
%doc %attr(644, root, man) %{_mandir}/man1/comp_err.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1*
%attr(755, root, root) %{_bindir}/mysql_config
Expand All @@ -1189,6 +1193,9 @@ echo "=====" >> $STATUS_HISTORY
# ----------------------------------------------------------------------------
%files -n MySQL-shared%{product_suffix}
%defattr(-, root, root, 0755)
%if %{defined license_files_server}
%doc %{license_files_server}
%endif
# Shared libraries (omit for architectures that don't support them)
%{_libdir}/libmysql*.so*

Expand All @@ -1201,6 +1208,9 @@ echo "=====" >> $STATUS_HISTORY
# ----------------------------------------------------------------------------
%files -n MySQL-test%{product_suffix}
%defattr(-, root, root, 0755)
%if %{defined license_files_server}
%doc %{license_files_server}
%endif
%attr(-, root, root) %{_datadir}/mysql-test
%attr(755, root, root) %{_bindir}/mysql_client_test
%attr(755, root, root) %{_bindir}/mysql_client_test_embedded
Expand All @@ -1214,6 +1224,9 @@ echo "=====" >> $STATUS_HISTORY
# ----------------------------------------------------------------------------
%files -n MySQL-embedded%{product_suffix}
%defattr(-, root, root, 0755)
%if %{defined license_files_server}
%doc %{license_files_server}
%endif
%attr(755, root, root) %{_bindir}/mysql_embedded
%attr(644, root, root) %{_libdir}/mysql/libmysqld.a
%attr(644, root, root) %{_libdir}/mysql/libmysqld-debug.a
Expand All @@ -1224,6 +1237,9 @@ echo "=====" >> $STATUS_HISTORY
# merging BK trees)
##############################################################################
%changelog
* Mon Oct 06 2014 Balasubramanian Kandasamy <[email protected]>
- Add license info in each subpackage

* Wed Jul 02 2014 Bjorn Munch <[email protected]>
- Disable dtrace unconditionally, breaks after we install Oracle dtrace

Expand Down

0 comments on commit 632155e

Please sign in to comment.