Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Thomas Orgis (4ef68319f8ba8d84fd560de80ecb652dbb4548b1)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Thomas Orgis <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Thomas Orgis (4ef68319f8ba8d84fd560de80ecb652dbb4548b1)
  • Date: Mon, 31 Aug 2020 15:55:13 +0000

GIT changes to master grimoire by Thomas Orgis <sobukus AT sourcemage.org>:

devel/valgrind/12_drop-MPI-1-support.patch | 66 ++
devel/valgrind/DEPENDS | 1
devel/valgrind/DETAILS | 7
devel/valgrind/HISTORY | 6
devel/valgrind/PRE_BUILD | 2
devel/valgrind/glibc.patch | 37 -
devel/valgrind/valgrind-3.11.0-boost.patch | 21
disk/btrfs-progs/DEPENDS | 2
disk/btrfs-progs/HISTORY | 5
disk/btrfs-progs/REPAIR^73b448c95efd25a5bd451c6afa0f3332^DEPENDS | 34 +
utils/installwatch/0001-fix-signatures.patch | 54 -
utils/installwatch/DETAILS | 2
utils/installwatch/HISTORY | 9
utils/installwatch/PRE_BUILD | 6
utils/installwatch/installwatch-glibc-2.13.patch | 22
utils/installwatch/installwatch-relpath.patch | 15
utils/installwatch/ld_preload.patch | 16
utils/installwatch/patches/0001-ld_preload.patch | 16
utils/installwatch/patches/0002-glibc-2.13.patch | 22
utils/installwatch/patches/0003-installwatch-relpath.patch | 15
utils/installwatch/patches/0004-fix-signatures.patch | 54 +
utils/installwatch/patches/0005-result-unint.patch | 11
utils/installwatch/patches/0006-writeonly.patch | 308
++++++++++
23 files changed, 553 insertions(+), 178 deletions(-)

New commits:
commit 4ef68319f8ba8d84fd560de80ecb652dbb4548b1
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

btrfstools: drop obsolete setuptools sub-dependency

commit aa3e642c625b992595910aafa8ca2a3850682be0
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

valgrind: version 3.16.1

commit f9349ce4743d31082f18b193174d35089fce69b3
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

installwatch: only wrap potential write operations

Installing rust got installwatch into a deadlock because of jemalloc
calling
readlink(), which was wrapperd by installwatch, which in turn caused
memory
allocation calls within jemalloc.

For tracking installed files, wrapping only functions that create/change
file
systems does make sense, doesn't it?

commit 8cc151f1b9e686fb96b375815f4a34d0fbf2fe9a
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

valgrind: fix build with MPI, make it also optional

diff --git a/devel/valgrind/12_drop-MPI-1-support.patch
b/devel/valgrind/12_drop-MPI-1-support.patch
new file mode 100644
index 0000000..0fedae9
--- /dev/null
+++ b/devel/valgrind/12_drop-MPI-1-support.patch
@@ -0,0 +1,66 @@
+From a3262243ca01f7cfe3ae86b168d5b3a7e5d1cbc0 Mon Sep 17 00:00:00 2001
+From: Balint Reczey <balint.reczey AT canonical.com>
+Date: Thu, 28 Nov 2019 19:31:12 +0100
+Subject: [PATCH] Drop MPI 1 support
+
+Signed-off-by: Balint Reczey <balint.reczey AT canonical.com>
+---
+ mpi/libmpiwrap.c | 16 ++--------------
+ 1 file changed, 2 insertions(+), 14 deletions(-)
+
+diff --git a/mpi/libmpiwrap.c b/mpi/libmpiwrap.c
+index 488bb13fd..a740ea562 100644
+--- a/mpi/libmpiwrap.c
++++ b/mpi/libmpiwrap.c
+@@ -278,8 +278,6 @@ static void showTy ( FILE* f, MPI_Datatype ty )
+ else if (ty == MPI_LONG_INT) fprintf(f,"LONG_INT");
+ else if (ty == MPI_SHORT_INT) fprintf(f,"SHORT_INT");
+ else if (ty == MPI_2INT) fprintf(f,"2INT");
+- else if (ty == MPI_UB) fprintf(f,"UB");
+- else if (ty == MPI_LB) fprintf(f,"LB");
+ # if defined(MPI_WCHAR)
+ else if (ty == MPI_WCHAR) fprintf(f,"WCHAR");
+ # endif
+@@ -350,20 +348,11 @@ static void showCombiner ( FILE* f, int combiner )
+ # endif
+ case MPI_COMBINER_CONTIGUOUS: fprintf(f, "CONTIGUOUS"); break;
+ case MPI_COMBINER_VECTOR: fprintf(f, "VECTOR"); break;
+-#if defined(MPI_COMBINER_HVECTOR_INTEGER)
+- case MPI_COMBINER_HVECTOR_INTEGER: fprintf(f, "HVECTOR_INTEGER");
break;
+-# endif
+ case MPI_COMBINER_HVECTOR: fprintf(f, "HVECTOR"); break;
+ case MPI_COMBINER_INDEXED: fprintf(f, "INDEXED"); break;
+-#if defined(MPI_COMBINER_HINDEXED_INTEGER)
+- case MPI_COMBINER_HINDEXED_INTEGER: fprintf(f, "HINDEXED_INTEGER");
break;
+-# endif
+ case MPI_COMBINER_HINDEXED: fprintf(f, "HINDEXED"); break;
+ #if defined(MPI_COMBINER_INDEXED_BLOCK)
+ case MPI_COMBINER_INDEXED_BLOCK: fprintf(f, "INDEXED_BLOCK"); break;
+-# endif
+-#if defined(MPI_COMBINER_STRUCT_INTEGER)
+- case MPI_COMBINER_STRUCT_INTEGER: fprintf(f, "STRUCT_INTEGER"); break;
+ # endif
+ case MPI_COMBINER_STRUCT: fprintf(f, "STRUCT"); break;
+ #if defined(MPI_COMBINER_SUBARRAY)
+@@ -458,8 +447,9 @@ Bool isMSI ( MPI_Status* status )
+ static long extentOfTy ( MPI_Datatype ty )
+ {
+ int r;
++ MPI_Aint lb;
+ MPI_Aint n;
+- r = PMPI_Type_extent(ty, &n);
++ r = MPI_Type_get_extent(ty, &lb, &n);
+ assert(r == MPI_SUCCESS);
+ return (long)n;
+ }
+@@ -733,8 +723,6 @@ void walk_type ( void(*f)(void*,long), char* base,
MPI_Datatype ty )
+ f(base + offsetof(Ty,loc), sizeof(int));
+ return;
+ }
+- if (ty == MPI_LB || ty == MPI_UB)
+- return; /* have zero size, so nothing needs to be done */
+ goto unhandled;
+ /*NOTREACHED*/
+ }
+--
+2.17.1
diff --git a/devel/valgrind/DEPENDS b/devel/valgrind/DEPENDS
index a9d2477..a7d0ee0 100755
--- a/devel/valgrind/DEPENDS
+++ b/devel/valgrind/DEPENDS
@@ -1,6 +1,7 @@
depends glibc &&

optional_depends boost "" "" "boost support" &&
+optional_depends openmpi "--with-mpicc=mpicc" "--without-mpicc" "MPI
support" &&
if [[ $VALGRIND_BRANCH == scm ]]
then
depends automake &&
diff --git a/devel/valgrind/DETAILS b/devel/valgrind/DETAILS
index 8d84215..cce905b 100755
--- a/devel/valgrind/DETAILS
+++ b/devel/valgrind/DETAILS
@@ -9,13 +9,12 @@ then
SOURCE_IGNORE=volatile
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-svn"
else
- VERSION=3.11.0
- PATCHLEVEL=1
+ VERSION=3.16.1
# Upstream offers an MD5 hash. Could use that for UPSTREAM_HASH.
# But MD5 is so broken that I'd rather not use it.
-
SOURCE_HASH=sha512:a25f97fa80aef4ad1e86b303886cd7a97aac248820a4c24e3d3dc26567dd7d2d86db237866468fd43885a9fb8534cb0a8e301a3c752fffbc231a2842272999da
+
SOURCE_HASH=sha512:2a4173efe1b6facdd2f5c5ee8ed006704168eba1813736fccc8191d60363afd96197512cf42037e65f18d4ddd49adc74a54c47210df216fba3c46bf68ef0f950
SOURCE=$SPELL-$VERSION.tar.bz2
- SOURCE_URL[0]=http://valgrind.org/downloads/$SOURCE
+ SOURCE_URL[0]=https://sourceware.org/pub/valgrind/$SOURCE
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
fi
LICENSE[0]=GPL
diff --git a/devel/valgrind/HISTORY b/devel/valgrind/HISTORY
index ed552fa..d3ea5cd 100644
--- a/devel/valgrind/HISTORY
+++ b/devel/valgrind/HISTORY
@@ -1,3 +1,9 @@
+2020-08-31 Thomas Orgis <sobukus AT sourcemage.org>
+ * DETAILS: version 3.16.1
+ * glibc.patch, valgrind-3.11.0-boost.patch: removed
+ * 12_drop-MPI-1-support.patch, PRE_BUILD: import Debian patch to kill
MPI-1
+ usage (fails to build otherwise)
+
2016-03-20 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS: PATCHLEVEL=1
* DEPENDS: added glibc
diff --git a/devel/valgrind/PRE_BUILD b/devel/valgrind/PRE_BUILD
index ee83bc3..645b8e4 100755
--- a/devel/valgrind/PRE_BUILD
+++ b/devel/valgrind/PRE_BUILD
@@ -1,7 +1,7 @@
default_pre_build &&
cd "$SOURCE_DIRECTORY" &&

-patch -p1 < "$SCRIPT_DIRECTORY/valgrind-3.11.0-boost.patch" &&
+patch -p1 < "$SCRIPT_DIRECTORY/12_drop-MPI-1-support.patch" &&

if [[ $VALGRIND_BRANCH == "scm" ]]; then
NOCONFIGURE=Y ./autogen.sh
diff --git a/devel/valgrind/glibc.patch b/devel/valgrind/glibc.patch
deleted file mode 100644
index 8b902dd..0000000
--- a/devel/valgrind/glibc.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Backport of glibc 2.19 and 2.20 and 2.21 support.
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton AT intel.com>
-
-diff --git a/configure.ac b/configure.ac
-index 229ab98..1c18108 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -918,6 +918,27 @@ case "${GLIBC_VERSION}" in
- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- ;;
-+ 2.19)
-+ AC_MSG_RESULT(2.19 family)
-+ AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x])
-+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp
${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+ ;;
-+ 2.20)
-+ AC_MSG_RESULT(2.20 family)
-+ AC_DEFINE([GLIBC_2_20], 1, [Define to 1 if you're using glibc 2.20.x])
-+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp
${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+ ;;
-+ 2.21)
-+ AC_MSG_RESULT(2.21 family)
-+ AC_DEFINE([GLIBC_2_21], 1, [Define to 1 if you're using glibc 2.21.x])
-+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp
${DEFAULT_SUPP}"
-+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+ ;;
- darwin)
- AC_MSG_RESULT(Darwin)
- AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/devel/valgrind/valgrind-3.11.0-boost.patch
b/devel/valgrind/valgrind-3.11.0-boost.patch
deleted file mode 100644
index ca9bc47..0000000
--- a/devel/valgrind/valgrind-3.11.0-boost.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -ru valgrind-3.11.0.orig/configure.ac valgrind-3.11.0/configure.ac
---- valgrind-3.11.0.orig/configure.ac 2015-09-22 22:26:31.000000000 +0200
-+++ valgrind-3.11.0/configure.ac 2016-02-07 09:44:39.568960224 +0100
-@@ -3715,7 +3715,7 @@
- safe_CXXFLAGS=$CXXFLAGS
- CXXFLAGS="$mflag_primary"
- safe_LIBS="$LIBS"
--LIBS="-lboost_thread-mt -lboost_system-mt $LIBS"
-+LIBS="-lboost_thread -lboost_system $LIBS"
-
- AC_LINK_IFELSE([AC_LANG_SOURCE([
- #include <boost/thread.hpp>
-@@ -3730,7 +3730,7 @@
- [
- ac_have_boost_1_35=yes
- AC_SUBST([BOOST_CFLAGS], [])
--AC_SUBST([BOOST_LIBS], ["-lboost_thread-mt -lboost_system-mt"])
-+AC_SUBST([BOOST_LIBS], ["-lboost_thread -lboost_system"])
- AC_MSG_RESULT([yes])
- ], [
- ac_have_boost_1_35=no
diff --git a/disk/btrfs-progs/DEPENDS b/disk/btrfs-progs/DEPENDS
index cb441b7..e4f0af5 100755
--- a/disk/btrfs-progs/DEPENDS
+++ b/disk/btrfs-progs/DEPENDS
@@ -2,7 +2,7 @@ depends zlib &&
depends util-linux &&
depends lzo &&

-depends -sub PYTHON3 setuptools &&
+depends setuptools &&

optional_depends acl \
"--enable-convert" \
diff --git a/disk/btrfs-progs/HISTORY b/disk/btrfs-progs/HISTORY
index b4a77b7..c86431c 100644
--- a/disk/btrfs-progs/HISTORY
+++ b/disk/btrfs-progs/HISTORY
@@ -1,3 +1,8 @@
+2020-08-30 Thomas Orgis <sobukus AT sourcemage.org>
+ * DEPENDS: Drop sub broken dependency on setuptools,
+ add REPAIR file to facilitate update of setuptools with
+ btrfs-progs installed.
+
2020-07-04 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* DETAILS: version 5.7

diff --git a/disk/btrfs-progs/REPAIR^73b448c95efd25a5bd451c6afa0f3332^DEPENDS
b/disk/btrfs-progs/REPAIR^73b448c95efd25a5bd451c6afa0f3332^DEPENDS
new file mode 100755
index 0000000..e4f0af5
--- /dev/null
+++ b/disk/btrfs-progs/REPAIR^73b448c95efd25a5bd451c6afa0f3332^DEPENDS
@@ -0,0 +1,34 @@
+depends zlib &&
+depends util-linux &&
+depends lzo &&
+
+depends setuptools &&
+
+optional_depends acl \
+ "--enable-convert" \
+ "--disable-convert" \
+ "for btrfs-convert utility" &&
+
+if is_depends_enabled $SPELL acl; then
+ depends e2fsprogs
+fi &&
+
+optional_depends xmlto \
+ "--enable-documentation" \
+ "--disable-documentation" \
+ "to build documentation" &&
+
+if is_depends_enabled $SPELL xmlto; then
+ depends asciidoc
+fi &&
+
+if [[ "$BTRFS_PROGS_BRANCH" == scm ]]; then
+ depends autoconf &&
+ depends automake &&
+ depends git
+fi &&
+
+optional_depends zstd \
+ "--enable-zstd" \
+ "--disable-zstd" \
+ "for zstd compression"
diff --git a/utils/installwatch/0001-fix-signatures.patch
b/utils/installwatch/0001-fix-signatures.patch
deleted file mode 100644
index 314d2e9..0000000
--- a/utils/installwatch/0001-fix-signatures.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 610312e2fc22108d3401f91c4e2ade653ada0596 Mon Sep 17 00:00:00 2001
-From: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
-Date: Mon, 25 Mar 2013 13:42:19 +0100
-Subject: [PATCH 1/2] fix signatures
-
----
- installwatch.c | 13 -------------
- 1 file changed, 13 deletions(-)
-
-diff --git a/installwatch.c b/installwatch.c
-index 8004b5b..e67f511 100644
---- a/installwatch.c
-+++ b/installwatch.c
-@@ -2956,13 +2956,8 @@ struct dirent *readdir(DIR *dir) {
- return result;
- }
-
--#if (GLIBC_MINOR <= 4)
--int readlink(const char *path,char *buf,size_t bufsiz) {
-- int result;
--#else
- ssize_t readlink(const char *path,char *buf,size_t bufsiz) {
- ssize_t result;
--#endif
- instw_t instw;
- int status;
-
-@@ -3097,11 +3092,7 @@ int rmdir(const char *pathname) {
-
- int scandir( const char *dir,struct dirent ***namelist,
- int (*select)(const struct dirent *),
--#if (GLIBC_MINOR >= 10)
- int (*compar)(const struct dirent **,const struct dirent **)
) {
--#else
-- int (*compar)(const void *,const void *) ) {
--#endif
- int result;
-
- if (!libc_handle)
-@@ -3713,11 +3704,7 @@ struct dirent64 *readdir64(DIR *dir) {
-
- int scandir64( const char *dir,struct dirent64 ***namelist,
- int (*select)(const struct dirent64 *),
--#if (GLIBC_MINOR >= 10)
- int (*compar)(const struct dirent64 **,const struct dirent64
**) ) {
--#else
-- int (*compar)(const void *,const void *) ) {
--#endif
- int result;
-
- if (!libc_handle)
---
-1.8.1.2
-
diff --git a/utils/installwatch/DETAILS b/utils/installwatch/DETAILS
index d5aec02..9ff2ae2 100755
--- a/utils/installwatch/DETAILS
+++ b/utils/installwatch/DETAILS
@@ -1,6 +1,6 @@
SPELL=installwatch
VERSION=2010-12-12
- PATCHLEVEL=2
+ PATCHLEVEL=3
SOURCE=$SPELL-$VERSION.tar.bz2

SOURCE_HASH=sha512:eda74e4a8b1707b7b5992e222baa8873b6248c0c9ef4475c521bef4dc3ba5374713ba09fc0acdaa369c67930865924994f4c15deb7b6b0e39cce5eeb6d24e50f
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL"
diff --git a/utils/installwatch/HISTORY b/utils/installwatch/HISTORY
index bd75cc4..7018964 100644
--- a/utils/installwatch/HISTORY
+++ b/utils/installwatch/HISTORY
@@ -1,4 +1,11 @@
-2019-01-19 Treeve Jelbert <treeve AT sourcemage.org>
+2020-08-31 Thomas Orgis <sobukus AT sourcemage.org>
+ * PRE_BUILD, patches/: use apply_patch_dir
+ * patches/0005-result-unint.patch: Fix warning.
+ * patches/0006-writeonly.patch: Avoid deadlock in
+ rust install by not wrapping read-only functions.
+ * DETAILS: ++PATCHLEVEL
+
+2019-01-19 Treeve Jelbert <treeve AT sourcemage.org>
* DEPENDS: delete gnupg

2013-03-25 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
diff --git a/utils/installwatch/PRE_BUILD b/utils/installwatch/PRE_BUILD
index abfb23a..a5cb00b 100755
--- a/utils/installwatch/PRE_BUILD
+++ b/utils/installwatch/PRE_BUILD
@@ -1,13 +1,9 @@
default_pre_build &&
cd $SOURCE_DIRECTORY &&

-patch Makefile < $SPELL_DIRECTORY/ld_preload.patch &&
-patch -p 1 < $SPELL_DIRECTORY/installwatch-glibc-2.13.patch &&
-patch -p 1 < $SPELL_DIRECTORY/installwatch-relpath.patch &&
+apply_patch_dir patches &&
sed -i "s:PREFIX=/usr/local:PREFIX=/usr:" Makefile &&

-patch -p1 < $SPELL_DIRECTORY/0001-fix-signatures.patch &&
-
# due to the compatibility with stable sorcery
sed -i "s,INSTW_LOGFILE,INSTALLWATCHFILE,g" installwatch* &&
sed -i "/log.*access/ d" installwatch.c
diff --git a/utils/installwatch/installwatch-glibc-2.13.patch
b/utils/installwatch/installwatch-glibc-2.13.patch
deleted file mode 100644
index 68c2e9c..0000000
--- a/utils/installwatch/installwatch-glibc-2.13.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -Naur installwatch.ori//create-localdecls installwatch/create-localdecls
---- installwatch.ori//create-localdecls 2011-02-05 12:46:19.000000000
+0100
-+++ installwatch/create-localdecls 2011-02-05 12:50:10.000000000 +0100
-@@ -105,6 +105,18 @@
- 12)
- echo '#define GLIBC_MINOR 12' >> $OUTFILE
- SUBVERSION='glibc-2.12' ;;
-+ 13)
-+ echo '#define GLIBC_MINOR 13' >> $OUTFILE
-+ SUBVERSION='glibc-2.13' ;;
-+ 14)
-+ echo '#define GLIBC_MINOR 14' >> $OUTFILE
-+ SUBVERSION='glibc-2.14' ;;
-+ 15)
-+ echo '#define GLIBC_MINOR 15' >> $OUTFILE
-+ SUBVERSION='glibc-2.15' ;;
-+ 16)
-+ echo '#define GLIBC_MINOR 16' >> $OUTFILE
-+ SUBVERSION='glibc-2.16' ;;
- *)
- echo 'Treated as glibc >= 2.1 (finger crossed)'
- echo '#define GLIBC_MINOR 1' >> $OUTFILE
diff --git a/utils/installwatch/installwatch-relpath.patch
b/utils/installwatch/installwatch-relpath.patch
deleted file mode 100644
index b0f4d11..0000000
--- a/utils/installwatch/installwatch-relpath.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -Naur installwatch.orig/installwatch.c installwatch/installwatch.c
---- installwatch.orig/installwatch.c 2010-02-14 04:19:42.000000000 +0100
-+++ installwatch/installwatch.c 2011-08-28 20:44:02.000000000 +0200
-@@ -1711,9 +1711,9 @@
- snprintf(proc_path, PROC_PATH_LEN, "/proc/self/fd/%d", dirfd);
- if(true_stat(proc_path, &s) == -1)
- goto out;
-- if(!(newpath = malloc(s.st_size+strlen(relpath)+2)))
-+ if(!(newpath = malloc(PATH_MAX+strlen(relpath)+2)))
- goto out;
-- if((l = true_readlink(proc_path, newpath, s.st_size)) == -1)
-+ if((l = true_readlink(proc_path, newpath, PATH_MAX)) == -1)
- goto free_out;
- newpath[l] = '/';
- strcpy(newpath + l + 1, relpath);
diff --git a/utils/installwatch/ld_preload.patch
b/utils/installwatch/ld_preload.patch
deleted file mode 100644
index ae706dd..0000000
--- a/utils/installwatch/ld_preload.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- Makefile.ori 2010-02-03 16:59:10.000000000 +0100
-+++ Makefile 2010-02-03 18:02:11.000000000 +0100
-@@ -27,11 +27,8 @@
- install: all
- mkdir -p $(LIBDIR)
- mkdir -p $(BINDIR)
-- if [ -r $(LIBDIR)/installwatch.so ]; then \
-- rm -f $(LIBDIR)/installwatch.so; \
-- fi
-- install installwatch.so $(LIBDIR)
--
-+ cp installwatch.so $(LIBDIR)/installwatch.so.new
-+ mv $(LIBDIR)/installwatch.so.new $(LIBDIR)/installwatch.so
- sed -e "s|#PREFIX#|$(PREFIX)|" < installwatch > $(BINDIR)/installwatch
- chmod 755 $(BINDIR)/installwatch
-
diff --git a/utils/installwatch/patches/0001-ld_preload.patch
b/utils/installwatch/patches/0001-ld_preload.patch
new file mode 100644
index 0000000..e564273
--- /dev/null
+++ b/utils/installwatch/patches/0001-ld_preload.patch
@@ -0,0 +1,16 @@
+--- a/Makefile.ori 2010-02-03 16:59:10.000000000 +0100
++++ b/Makefile 2010-02-03 18:02:11.000000000 +0100
+@@ -27,11 +27,8 @@
+ install: all
+ mkdir -p $(LIBDIR)
+ mkdir -p $(BINDIR)
+- if [ -r $(LIBDIR)/installwatch.so ]; then \
+- rm -f $(LIBDIR)/installwatch.so; \
+- fi
+- install installwatch.so $(LIBDIR)
+-
++ cp installwatch.so $(LIBDIR)/installwatch.so.new
++ mv $(LIBDIR)/installwatch.so.new $(LIBDIR)/installwatch.so
+ sed -e "s|#PREFIX#|$(PREFIX)|" < installwatch > $(BINDIR)/installwatch
+ chmod 755 $(BINDIR)/installwatch
+
diff --git a/utils/installwatch/patches/0002-glibc-2.13.patch
b/utils/installwatch/patches/0002-glibc-2.13.patch
new file mode 100644
index 0000000..68c2e9c
--- /dev/null
+++ b/utils/installwatch/patches/0002-glibc-2.13.patch
@@ -0,0 +1,22 @@
+diff -Naur installwatch.ori//create-localdecls installwatch/create-localdecls
+--- installwatch.ori//create-localdecls 2011-02-05 12:46:19.000000000
+0100
++++ installwatch/create-localdecls 2011-02-05 12:50:10.000000000 +0100
+@@ -105,6 +105,18 @@
+ 12)
+ echo '#define GLIBC_MINOR 12' >> $OUTFILE
+ SUBVERSION='glibc-2.12' ;;
++ 13)
++ echo '#define GLIBC_MINOR 13' >> $OUTFILE
++ SUBVERSION='glibc-2.13' ;;
++ 14)
++ echo '#define GLIBC_MINOR 14' >> $OUTFILE
++ SUBVERSION='glibc-2.14' ;;
++ 15)
++ echo '#define GLIBC_MINOR 15' >> $OUTFILE
++ SUBVERSION='glibc-2.15' ;;
++ 16)
++ echo '#define GLIBC_MINOR 16' >> $OUTFILE
++ SUBVERSION='glibc-2.16' ;;
+ *)
+ echo 'Treated as glibc >= 2.1 (finger crossed)'
+ echo '#define GLIBC_MINOR 1' >> $OUTFILE
diff --git a/utils/installwatch/patches/0003-installwatch-relpath.patch
b/utils/installwatch/patches/0003-installwatch-relpath.patch
new file mode 100644
index 0000000..b0f4d11
--- /dev/null
+++ b/utils/installwatch/patches/0003-installwatch-relpath.patch
@@ -0,0 +1,15 @@
+diff -Naur installwatch.orig/installwatch.c installwatch/installwatch.c
+--- installwatch.orig/installwatch.c 2010-02-14 04:19:42.000000000 +0100
++++ installwatch/installwatch.c 2011-08-28 20:44:02.000000000 +0200
+@@ -1711,9 +1711,9 @@
+ snprintf(proc_path, PROC_PATH_LEN, "/proc/self/fd/%d", dirfd);
+ if(true_stat(proc_path, &s) == -1)
+ goto out;
+- if(!(newpath = malloc(s.st_size+strlen(relpath)+2)))
++ if(!(newpath = malloc(PATH_MAX+strlen(relpath)+2)))
+ goto out;
+- if((l = true_readlink(proc_path, newpath, s.st_size)) == -1)
++ if((l = true_readlink(proc_path, newpath, PATH_MAX)) == -1)
+ goto free_out;
+ newpath[l] = '/';
+ strcpy(newpath + l + 1, relpath);
diff --git a/utils/installwatch/patches/0004-fix-signatures.patch
b/utils/installwatch/patches/0004-fix-signatures.patch
new file mode 100644
index 0000000..314d2e9
--- /dev/null
+++ b/utils/installwatch/patches/0004-fix-signatures.patch
@@ -0,0 +1,54 @@
+From 610312e2fc22108d3401f91c4e2ade653ada0596 Mon Sep 17 00:00:00 2001
+From: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+Date: Mon, 25 Mar 2013 13:42:19 +0100
+Subject: [PATCH 1/2] fix signatures
+
+---
+ installwatch.c | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+diff --git a/installwatch.c b/installwatch.c
+index 8004b5b..e67f511 100644
+--- a/installwatch.c
++++ b/installwatch.c
+@@ -2956,13 +2956,8 @@ struct dirent *readdir(DIR *dir) {
+ return result;
+ }
+
+-#if (GLIBC_MINOR <= 4)
+-int readlink(const char *path,char *buf,size_t bufsiz) {
+- int result;
+-#else
+ ssize_t readlink(const char *path,char *buf,size_t bufsiz) {
+ ssize_t result;
+-#endif
+ instw_t instw;
+ int status;
+
+@@ -3097,11 +3092,7 @@ int rmdir(const char *pathname) {
+
+ int scandir( const char *dir,struct dirent ***namelist,
+ int (*select)(const struct dirent *),
+-#if (GLIBC_MINOR >= 10)
+ int (*compar)(const struct dirent **,const struct dirent **)
) {
+-#else
+- int (*compar)(const void *,const void *) ) {
+-#endif
+ int result;
+
+ if (!libc_handle)
+@@ -3713,11 +3704,7 @@ struct dirent64 *readdir64(DIR *dir) {
+
+ int scandir64( const char *dir,struct dirent64 ***namelist,
+ int (*select)(const struct dirent64 *),
+-#if (GLIBC_MINOR >= 10)
+ int (*compar)(const struct dirent64 **,const struct dirent64
**) ) {
+-#else
+- int (*compar)(const void *,const void *) ) {
+-#endif
+ int result;
+
+ if (!libc_handle)
+--
+1.8.1.2
+
diff --git a/utils/installwatch/patches/0005-result-unint.patch
b/utils/installwatch/patches/0005-result-unint.patch
new file mode 100644
index 0000000..c00c6b3
--- /dev/null
+++ b/utils/installwatch/patches/0005-result-unint.patch
@@ -0,0 +1,11 @@
+--- a/installwatch.c.orig 2020-08-31 16:54:02.719111959 +0200
++++ b/installwatch.c 2020-08-31 17:23:50.271277254 +0200
+@@ -2545,7 +2566,7 @@
+ }
+
+ FILE *fopen(const char *pathname, const char *mode) {
+- FILE *result;
++ FILE *result = NULL;
+ instw_t instw;
+ int status=0;
+
diff --git a/utils/installwatch/patches/0006-writeonly.patch
b/utils/installwatch/patches/0006-writeonly.patch
new file mode 100644
index 0000000..cd42e31
--- /dev/null
+++ b/utils/installwatch/patches/0006-writeonly.patch
@@ -0,0 +1,308 @@
+--- installwatch/installwatch.c.orig 2020-08-31 17:39:50.800366075 +0200
++++ installwatch/installwatch.c 2020-08-31 17:40:57.441372237 +0200
+@@ -59,6 +59,11 @@
+
+ #define DEBUG 1
+
++/* Intercept only operations that are (potentially) making changes
++ to the file system. This is to avoid interference and a resulting
++ deadlock with jemalloc, which calls readlink() on initialization. */
++#define INSTALLWATCH_WRITEONLY
++
+ #define LOGLEVEL (LOG_USER | LOG_INFO | LOG_PID)
+ #define BUFSIZE 1024
+
+@@ -273,7 +278,9 @@
+ static int make_path(const char *);
+ static int copy_path(const char *,const char *);
+ static inline int path_excluded(const char *);
++#ifndef INSTALLWATCH_WRITEONLY
+ static int unlink_recursive(const char *);
++#endif
+
+ int expand_path(string_t **,const char *,const char *);
+ int parse_suffix(char *,char *,const char *);
+@@ -283,12 +290,14 @@
+ /* single method used to minimize excessive returns */
+ #define finalize(code) {rcod=code;goto finalize;}
+
++#ifndef INSTALLWATCH_WRITEONLY
+ #if DEBUG
+ static int __instw_printdirent(struct dirent*);
+ #if(GLIBC_MINOR >= 1)
+ static int __instw_printdirent64(struct dirent64*);
+ #endif
+ #endif
++#endif
+
+ #ifdef DEBUG
+ static int instw_print(instw_t *);
+@@ -308,8 +317,10 @@
+ #endif
+ static int instw_getstatus(instw_t *,int *);
+ static int instw_apply(instw_t *);
++#ifndef INSTALLWATCH_WRITEONLY
+ static int instw_filldirls(instw_t *);
+ static int instw_makedirls(instw_t *);
++#endif
+
+ static int backup(const char *);
+
+@@ -843,6 +854,7 @@
+ return result;
+ }
+
++#ifndef INSTALLWATCH_WRITEONLY
+ /*
+ * procedure = / rc:=unlink_recursive(truepath) /
+ *
+@@ -914,6 +926,7 @@
+
+ return rcod;
+ }
++#endif
+
+ /*
+ * procedure = / rc:=expand_path(&list,prefix,suffix) /
+@@ -1031,6 +1044,7 @@
+ *
*****************************************************************************
+ */
+
++#ifndef INSTALLWATCH_WRITEONLY
+ static int __instw_printdirent(struct dirent *entry) {
+
+ if(entry!=NULL) {
+@@ -1054,7 +1068,9 @@
+
+ return 0;
+ }
++#endif
+
++#ifndef INSTALLWATCH_WRITEONLY
+ static int __instw_printdirent64(struct dirent64 *entry) {
+
+ if(entry!=NULL) {
+@@ -1078,6 +1094,7 @@
+
+ return 0;
+ }
++#endif
+
+ /*
+ *
*****************************************************************************
+@@ -1905,6 +1922,7 @@
+ return rcod;
+ }
+
++#ifndef INSTALLWATCH_WRITEONLY
+ /*
+ * procedure = / rc:=instw_filldirls(instw) /
+ *
+@@ -2105,7 +2123,9 @@
+
+ return rcod;
+ }
++#endif
+
++#ifndef INSTALLWATCH_WRITEONLY
+ /*
+ * procedure = / rc:=instw_makedirls(instw) /
+ *
+@@ -2186,6 +2206,7 @@
+
+ return rcod;
+ }
++#endif
+
+ /*
+ *
+@@ -2615,6 +2636,7 @@
+ return result;
+ }
+
++#ifndef INSTALLWATCH_WRITEONLY
+ char *getcwd(char *buffer,size_t size) {
+ char wpath[PATH_MAX+1];
+ char *result;
+@@ -2678,6 +2700,7 @@
+
+ return result;
+ }
++#endif
+
+ int lchown(const char *path, uid_t owner, gid_t group) {
+ /* Linux specific? */
+@@ -2894,6 +2917,7 @@
+ return result;
+ }
+
++#ifndef INSTALLWATCH_WRITEONLY
+ /*
+ *
+ */
+@@ -2929,7 +2953,9 @@
+
+ return result;
+ }
++#endif
+
++#ifndef INSTALLWATCH_WRITEONLY
+ struct dirent *readdir(DIR *dir) {
+ struct dirent *result;
+
+@@ -2955,7 +2981,9 @@
+
+ return result;
+ }
++#endif
+
++#ifndef INSTALLWATCH_WRITEONLY
+ ssize_t readlink(const char *path,char *buf,size_t bufsiz) {
+ ssize_t result;
+ instw_t instw;
+@@ -2992,7 +3020,9 @@
+
+ return result;
+ }
++#endif
+
++#ifndef INSTALLWATCH_WRITEONLY
+ char *realpath(const char *file_name,char *resolved_name) {
+ char *result;
+
+@@ -3010,6 +3040,7 @@
+
+ return result;
+ }
++#endif
+
+ int rename(const char *oldpath, const char *newpath) {
+ int result;
+@@ -3090,6 +3121,7 @@
+ return result;
+ }
+
++#ifndef INSTALLWATCH_WRITEONLY
+ int scandir( const char *dir,struct dirent ***namelist,
+ int (*select)(const struct dirent *),
+ int (*compar)(const struct dirent **,const struct dirent **)
) {
+@@ -3113,7 +3145,9 @@
+
+ return result;
+ }
++#endif
+
++#ifndef INSTALLWATCH_WRITEONLY
+ int __xstat(int version,const char *pathname,struct stat *info) {
+ int result;
+ instw_t instw;
+@@ -3155,7 +3189,9 @@
+
+ return result;
+ }
++#endif
+
++#ifndef INSTALLWATCH_WRITEONLY
+ int __lxstat(int version,const char *pathname,struct stat *info) {
+ int result;
+ instw_t instw;
+@@ -3197,6 +3233,7 @@
+
+ return result;
+ }
++#endif
+
+ int symlink(const char *pathname, const char *slink) {
+ int result;
+@@ -3676,6 +3713,7 @@
+ return result;
+ }
+
++#ifndef INSTALLWATCH_WRITEONLY
+ struct dirent64 *readdir64(DIR *dir) {
+ struct dirent64 *result;
+
+@@ -3701,7 +3739,9 @@
+
+ return result;
+ }
++#endif
+
++#ifndef INSTALLWATCH_WRITEONLY
+ int scandir64( const char *dir,struct dirent64 ***namelist,
+ int (*select)(const struct dirent64 *),
+ int (*compar)(const struct dirent64 **,const struct dirent64
**) ) {
+@@ -3725,7 +3765,9 @@
+
+ return result;
+ }
++#endif
+
++#ifndef INSTALLWATCH_WRITEONLY
+ int __xstat64(int version,const char *pathname,struct stat64 *info) {
+ int result;
+ instw_t instw;
+@@ -3764,7 +3806,9 @@
+
+ return result;
+ }
++#endif
+
++#ifndef INSTALLWATCH_WRITEONLY
+ int __lxstat64(int version,const char *pathname,struct stat64 *info) {
+ int result;
+ instw_t instw;
+@@ -3803,6 +3847,7 @@
+
+ return result;
+ }
++#endif
+
+ int truncate64(const char *path, __off64_t length) {
+ int result;
+@@ -4026,7 +4071,7 @@
+ return result;
+ }
+
+-
++#ifndef INSTALLWATCH_WRITEONLY
+ int __fxstatat (int version, int dirfd, const char *path, struct stat *s,
int flags) {
+
+ int result;
+@@ -4099,7 +4144,9 @@
+
+ return result;
+ }
++#endif
+
++#ifndef INSTALLWATCH_WRITEONLY
+ int __fxstatat64 (int version, int dirfd, const char *path, struct stat64
*s, int flags) {
+
+ int result;
+@@ -4171,7 +4218,7 @@
+ return result;
+
+ }
+-
++#endif
+
+ int linkat (int olddirfd, const char *oldpath,
+ int newdirfd, const char *newpath, int flags) {
+@@ -4277,7 +4324,7 @@
+ return result;
+ }
+
+-
++#ifndef INSTALLWATCH_WRITEONLY
+ READLINKAT_T readlinkat (int dirfd, const char *path,
+ char *buf, size_t bufsiz) {
+
+@@ -4320,7 +4367,7 @@
+
+ return result;
+ }
+-
++#endif
+
+ int __xmknodat (int version, int dirfd,const char *path,mode_t mode,dev_t
*dev) {
+



  • [SM-Commit] GIT changes to master grimoire by Thomas Orgis (4ef68319f8ba8d84fd560de80ecb652dbb4548b1), Thomas Orgis, 08/31/2020

Archive powered by MHonArc 2.6.24.

Top of Page