Hi
I noticed that I have several patches in my Debian package that were (or
were forgotten to be) reported on the mysql list but still not in
upstream.
Maybe I can use this list to share these patches and get them
incorporated.
I attached them to this mail, each one is named according to it's
filename and has a little comment inside.
One of my biggest problems is still, that the source code from an
unpacked .tar.gz is different to one after a build and a make distclean.
Even worse it's undiffable as people fiddle around with symlinks.
I don't know about rpm but Debian distibures original upstreams and
diffs (with rules and postinst scripts).
bye,
-christian-
#
# Now it does a "make distclean" in libmysql_r, too.
#
--- mysql-dfsg-3.23.54a.orig/Makefile.in
+++ mysql-dfsg-3.23.54a/Makefile.in
@@ -198,7 +198,7 @@
SUBDIRS = include @docs_dirs@ @readline_dir@ \
@thread_dirs@ @sql_client_dirs@ \
@sql_server_dirs@ scripts tests man \
- @bench_dirs@ support-files os2
+ @bench_dirs@ support-files os2 libmysql_r
# Relink after clean
#
# Let "mutex/pthread" work on Alpha.
# From Christopher C. Chimelis <chris@stripped>
# (only the still necessary parts, see the bugs.debian.org for more)
#
diff -ruN mysql-3.23.31/bdb/dist/aclocal/mutex.m4 mysql-patched/bdb/dist/aclocal/mutex.m4
--- mysql-3.23.31/bdb/dist/aclocal/mutex.m4 Sun Feb 4 20:36:44 2001
+++ mysql-patched/bdb/dist/aclocal/mutex.m4 Sun Feb 4 13:43:38 2001
@@ -241,7 +241,7 @@
dnl Alpha/gcc: OSF/1
dnl The alpha/gcc code doesn't work as far as I know. There are
dnl two versions, both have problems. See Support Request #1583.
-if test "$db_cv_mutex" = DOESNT_WORK; then
+if test "$db_cv_mutex" = no; then
AC_TRY_RUN([main(){
#if defined(__alpha)
#if defined(__GNUC__)
diff -ruN mysql-3.23.31/bdb/dist/configure mysql-patched/bdb/dist/configure
--- mysql-3.23.31/bdb/dist/configure Sun Feb 4 20:36:44 2001
+++ mysql-patched/bdb/dist/configure Sun Feb 4 13:43:55 2001
@@ -4095,7 +4095,7 @@
rm -f conftest*
fi
-if test "$db_cv_mutex" = DOESNT_WORK; then
+if test "$db_cv_mutex" = no; then
if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling"
1>&2; exit 1; }
else
diff -ruN mysql-3.23.31/include/global.h mysql-patched/include/global.h
--- mysql-3.23.31/include/global.h Wed Jan 17 04:39:52 2001
+++ mysql-patched/include/global.h Sun Feb 4 13:44:08 2001
@@ -133,7 +133,7 @@
#endif
/* In Linux-alpha we have atomic.h if we are using gcc */
-#if defined(HAVE_LINUXTHREADS) && defined(__GNUC__) && defined(__alpha__)
&& (__GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95))
&& !defined(HAVE_ATOMIC_ADD)
+#if defined(HAVE_LINUXTHREADS) && (__GLIBC__ == 2) && (__GLIBC_MINOR__
< 2) && defined(__GNUC__) && defined(__alpha__) && (__GNUC__
> 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95)) &&
!defined(HAVE_ATOMIC_ADD)
#define HAVE_ATOMIC_ADD
#define HAVE_ATOMIC_SUB
#endif
diff -ruN mysql-3.23.31/include/my_global.h mysql-patched/include/my_global.h
--- mysql-3.23.31/include/my_global.h Wed Jan 17 04:41:11 2001
+++ mysql-patched/include/my_global.h Sun Feb 4 13:44:08 2001
@@ -128,7 +128,7 @@
#endif
/* egcs 1.1.2 has a problem with memcpy on Alpha */
-#if defined(__GNUC__) && defined(__alpha__) && ! (__GNUC__ > 2 ||
(__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
+#if defined(__GNUC__) && defined(__alpha__) && (__GLIBC__ == 2)
&& (__GLIBC_MINOR__ < 2) && ! (__GNUC__ > 2 || (__GNUC__ == 2
&& __GNUC_MINOR__ >= 95))
#define BAD_MEMCPY
#endif
#
# A hardcoded "rpath" is forbidden by the Debian policy.
#
--- tmp/ltconfig Tue Sep 18 22:08:54 2001
+++ mysql-patched/ltconfig Tue Sep 18 22:09:43 2001
@@ -3009,6 +3009,16 @@
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
+# Check if debuild is being run by the current shell. If it is then,
+# the DEB_BUILD_ARCH variable should be of non-zero length, indicating
+# that we are in the middle of a Debian package build (assuming the
+# user isn't doing anything strange with environment variables).
+if test -n "`dpkg-architecture -qDEB_BUILD_ARCH`" && ps | grep debuild | grep -v
grep > /dev/null; then
+ # Debian policy mandates that rpaths should not be encoded into a binary
+ # so it is overridden.
+ hardcode_libdir_flag_spec=" -D_DEBIAN_PATCHED_LIBTOOL_ "
+fi
+
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator=$hardcode_libdir_separator
#
# by Michael Fedrowitz <michael.fedrowitz@stripped>
#
--- orig/bdb/include/mutex.h.ch Sun May 13 17:20:40 2001
+++ mysql-patched/bdb/include/mutex.h Sun May 13 17:21:32 2001
@@ -327,7 +327,7 @@
*/
#define MUTEX_SET(tsl) ({ \
register tsl_t *__l = (tsl); \
- int __r; \
+ unsigned char __r; \
asm volatile("tas %1; \n \
seq %0" \
: "=dm" (__r), "=m" (*__l) \
#
# Simple nroff mistake.
#
--- /tmp/x 2002-09-29 19:33:47.000000000 +0200
+++ man/mysqldump.1 2002-09-29 19:33:41.000000000 +0200
@@ -126,7 +126,7 @@
Lock all tables for read.
.TP
.BR \-n | \-\-no\-create\-db
-'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;'
+\&'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;'
will not be put in the output. The above line will
be added otherwise, if
.BR \-\-databases
#
# Debian preferres to have the config files in /etc/mysql/
#
--- orig/mysys/default.c Sun May 13 16:40:06 2001
+++ mysql-patched/mysys/default.c Sun May 13 16:40:17 2001
@@ -48,7 +48,7 @@
#ifdef __WIN__
"C:/",
#else
-"/etc/",
+"/etc/mysql/",
#endif
#ifdef DATADIR
DATADIR,
#
# FHS
#
--- orig/scripts/mysql_install_db.sh Sun May 13 16:42:13 2001
+++ mysql-patched/scripts/mysql_install_db.sh Sun May 13 16:43:10 2001
@@ -83,7 +83,7 @@
bindir="$basedir/bin"
if test -x "$basedir/libexec/mysqld"
then
- execdir="$basedir/libexec"
+ execdir="$basedir/sbin"
elif test -x "@libexecdir@/mysqld"
then
execdir="@libexecdir@"
#
# This works with all shells.
#
--- old/scripts/mysqlaccess.sh.orig 2002-10-24 22:58:30.000000000 +0200
+++ new/scripts/mysqlaccess.sh 2002-10-24 23:00:42.000000000 +0200
@@ -13,7 +13,7 @@
$script = $1;
$script = 'MySQLAccess' unless $script;
$script_conf = "$script.conf";
- $script_log = "~/$script.log";
+ $script_log = $ENV{'HOME'}."/$script.log";
# ****************************
# information on MySQL
--- orig/scripts/mysqlbug.sh Sun Sep 9 17:24:52 2001
+++ mysql-patched/scripts/mysqlbug.sh Sun Sep 9 17:23:33 2001
@@ -132,7 +132,9 @@
then
if test -z "$EDITOR"
then
- EDIT=emacs
+ # EDIT=emacs
+ # in Debian, we have the sensible-editor symlink. -ch-
+ EDIT=sensible-editor
else
EDIT="$EDITOR"
fi
#
# For security reasons. This way all logs and databases are created
# world-nothing.
#
--- orig/scripts/safe_mysqld.sh Sun May 13 16:48:42 2001
+++ mysql-patched/scripts/safe_mysqld.sh Sun May 13 16:50:55 2001
@@ -12,6 +12,8 @@
trap '' 1 2 3 15 # we shouldn't let anyone kill us
+umask 007
+
defaults=
case "$1" in
--no-defaults|--defaults-file=*|--defaults-extra-file=*)
#
# Sparc patch for mutexes/pthreads.
# From Christopher C. Chimelis <chris@stripped>
# and Ben Collins <bcollins@stripped>
# See bugs.debian.org for the whole discussion.
#
diff -burN mysql-3.23.43/bdb/dist/aclocal/mutex.m4 mysql-patched/bdb/dist/aclocal/mutex.m4
--- mysql-3.23.43/bdb/dist/aclocal/mutex.m4 Sun Oct 7 04:51:48 2001
+++ mysql-patched/bdb/dist/aclocal/mutex.m4 Sun Oct 7 04:51:14 2001
@@ -279,7 +279,7 @@
dnl Sparc/gcc: SunOS, Solaris
dnl The sparc/gcc code doesn't always work, specifically, I've seen assembler
dnl failures from the stbar instruction on SunOS 4.1.4/sun4c and gcc 2.7.2.2.
-if test "$db_cv_mutex" = DOESNT_WORK; then
+if test "$db_cv_mutex" = no; then
AC_TRY_RUN([main(){
#if defined(__sparc__)
#if defined(__GNUC__)
diff -burN mysql-3.23.43/bdb/dist/configure mysql-patched/bdb/dist/configure
--- mysql-3.23.43/bdb/dist/configure Sun Oct 7 04:51:48 2001
+++ mysql-patched/bdb/dist/configure Sun Oct 7 04:50:16 2001
@@ -4176,7 +4176,7 @@
fi
-if test "$db_cv_mutex" = DOESNT_WORK; then
+if test "$db_cv_mutex" = no; then
if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling"
1>&2; exit 1; }
else