diff --git a/community-mysql-file-contents.patch b/community-mysql-file-contents.patch index d1ca18e..0b1a552 100644 --- a/community-mysql-file-contents.patch +++ b/community-mysql-file-contents.patch @@ -1,3 +1,11 @@ +Upstream chooses to install INFO_SRC and INFO_BIN into the docs dir, which +breaks at least two packaging commandments, so we put them into $libdir +instead. That means we have to hack the file_contents regression test +to know about this. + +Recommendation they change is at http://bugs.mysql.com/bug.php?id=61425 + + diff -up mysql-5.6.15/mysql-test/t/file_contents.test.p19 mysql-5.6.15/mysql-test/t/file_contents.test --- mysql-5.6.15/mysql-test/t/file_contents.test.p19 2013-12-09 18:44:48.425892516 +0100 +++ mysql-5.6.15/mysql-test/t/file_contents.test 2013-12-09 18:48:02.247150032 +0100 diff --git a/community-mysql-netdevname.patch b/community-mysql-netdevname.patch deleted file mode 100644 index 1cdd9f7..0000000 --- a/community-mysql-netdevname.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -up mysql-5.6.10/mysys/my_gethwaddr.c.orig mysql-5.6.10/mysys/my_gethwaddr.c ---- mysql-5.6.10/mysys/my_gethwaddr.c.orig 2013-01-22 17:54:49.000000000 +0100 -+++ mysql-5.6.10/mysys/my_gethwaddr.c 2013-02-19 15:19:48.632960900 +0100 -@@ -68,27 +68,47 @@ err: - #include - #include - -+#define MAX_IFS 64 -+ - my_bool my_gethwaddr(uchar *to) - { - int fd, res= 1; - struct ifreq ifr; - char zero_array[ETHER_ADDR_LEN] = {0}; -+ struct ifconf ifc; -+ struct ifreq ifs[MAX_IFS], *ifri, *ifend; - - fd = socket(AF_INET, SOCK_DGRAM, 0); - if (fd < 0) - goto err; - -- memset(&ifr, 0, sizeof(ifr)); -- strnmov(ifr.ifr_name, "eth0", sizeof(ifr.ifr_name) - 1); -+ ifc.ifc_len = sizeof(ifs); -+ ifc.ifc_req = ifs; -+ if (ioctl(fd, SIOCGIFCONF, &ifc) < 0) -+ { -+ close(fd); -+ goto err; -+ } - -- do -+ memcpy(to, zero_array, ETHER_ADDR_LEN); -+ -+ ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq)); -+ for (ifri = ifc.ifc_req; ifri < ifend; ifri++) - { -- if (ioctl(fd, SIOCGIFHWADDR, &ifr) >= 0) -+ if (ifri->ifr_addr.sa_family == AF_INET) - { -- memcpy(to, &ifr.ifr_hwaddr.sa_data, ETHER_ADDR_LEN); -- res= memcmp(to, zero_array, ETHER_ADDR_LEN) ? 0 : 1; -+ memset(&ifr, 0, sizeof(ifr)); -+ strncpy(ifr.ifr_name, ifri->ifr_name, sizeof(ifr.ifr_name)); -+ -+ /* Get HW address */ -+ if (ioctl(fd, SIOCGIFHWADDR, &ifr) >= 0) -+ { -+ memcpy(to, &ifr.ifr_hwaddr.sa_data, ETHER_ADDR_LEN); -+ if (!(res= memcmp(to, zero_array, ETHER_ADDR_LEN) ? 0 : 1)) -+ break; -+ } - } -- } while (res && (errno == 0 || errno == ENODEV) && ifr.ifr_name[3]++ < '6'); -+ } - - close(fd); - err: diff --git a/community-mysql.spec b/community-mysql.spec index 02085f2..c6aa185 100644 --- a/community-mysql.spec +++ b/community-mysql.spec @@ -14,7 +14,7 @@ Name: community-mysql Version: 5.6.15 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MySQL client programs and shared libraries Group: Applications/Databases URL: http://www.mysql.com @@ -234,7 +234,7 @@ the MySQL sources. %prep -%setup -q -n mysql-%{version} +%setup -q %patch2 -p1 %patch3 -p1 %patch4 -p1 @@ -401,8 +401,7 @@ touch %{buildroot}/var/log/mysqld.log mkdir -p %{buildroot}/var/run/mysqld install -p -m 0755 -d %{buildroot}/var/lib/mysql -mkdir -p %{buildroot}/etc -install -p -m 0644 %{SOURCE3} %{buildroot}/etc/my.cnf +install -D -p -m 0644 %{SOURCE3} %{buildroot}/etc/my.cnf # install systemd unit files and scripts for handling server startup mkdir -p %{buildroot}%{_unitdir} @@ -514,7 +513,8 @@ mkdir %{buildroot}%{_sysconfdir}/my.cnf.d --mem --parallel=auto --force --retry=0 \ --skip-test-list=rh-skipped-tests.list \ --mysqld=--binlog-format=mixed \ - --suite-timeout=720 --testcase-timeout=30 + --suite-timeout=720 --testcase-timeout=30 \ + --clean-vardir rm -rf var/* popd %endif @@ -594,7 +594,7 @@ fi %doc README COPYING README.mysql-license # although the default my.cnf contains only server settings, we put it in the # libs package because it can be used for client settings too. -%config(noreplace) /etc/my.cnf +%config(noreplace) %{_sysconfdir}/my.cnf %dir %{_libdir}/mysql %{_libdir}/mysql/libmysqlclient.so.* %config(noreplace) /etc/ld.so.conf.d/* @@ -741,6 +741,9 @@ fi %{_mandir}/man1/mysql_client_test.1* %changelog +* Mon Dec 16 2013 Honza Horak 5.6.15-2 +- Some spec file clean-up based on Bjorn Munch's suggestions + * Mon Dec 9 2013 Honza Horak 5.6.15-1 - Update to MySQL 5.6.15, for various fixes described at https://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-15.html