lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master c4749b3 1/2: Work around an autotools anomaly


From: Greg Chicares
Subject: [lmi-commits] [lmi] master c4749b3 1/2: Work around an autotools anomaly
Date: Wed, 13 May 2020 18:22:28 -0400 (EDT)

branch: master
commit c4749b3eb611bb7a45b39fa822570a6395f6aa16
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Work around an autotools anomaly
    
    With autotools, 'make install' doesn't respect group permissions.
    See, e.g.:
      https://lists.gnu.org/archive/html/automake/2019-01/msg00000.html
---
 install_libxml2_libxslt.make | 20 ++++++++++++++++++--
 install_wx.sh                |  8 ++++++++
 install_wxpdfdoc.sh          |  7 +++++++
 3 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/install_libxml2_libxslt.make b/install_libxml2_libxslt.make
index 288f085..ea5f561 100644
--- a/install_libxml2_libxslt.make
+++ b/install_libxml2_libxslt.make
@@ -136,6 +136,7 @@ $(libxslt_version)_options := \
 
 # Utilities 
####################################################################
 
+CHMOD  := chmod
 ECHO   := echo
 GREP   := grep
 MD5SUM := md5sum
@@ -188,6 +189,10 @@ TARFLAGS := --keep-old-files
          $(ECHO) "$($@-md5) *$@" | $(MD5SUM) --check
        $(TAR) --extract $(TARFLAGS) --directory=$(build_dir) 
--file=$(cache_dir)/$@
 
+# autotools: 'make install' doesn't respect group permissions--see:
+#   https://lists.gnu.org/archive/html/automake/2019-01/msg00000.html
+# After the 'chmod' calls, the 'find' command should find nothing.
+#
 # Someday it may be necessary to add a line like this to the recipe:
 #   export lt_cv_to_tool_file_cmd=func_convert_file_cygwin_to_w32
 # but that's not necessary for now. See:
@@ -200,8 +205,19 @@ $(libraries):
          && export PATH="$(mingw_bin_dir):${PATH}" \
          && PKG_CONFIG_PATH="$(exec_prefix)/lib/pkgconfig" \
            $($@_overrides) ./configure $($@_options) \
-         && $(MAKE) \
-         && $(MAKE) install \
+         && $(MAKE) && $(MAKE) install
+       -$(CHMOD) -R g=u $(build_dir)
+       -$(CHMOD) -R g=u $(prefix)/include/libexslt
+       -$(CHMOD) -R g=u $(prefix)/include/libxml2
+       -$(CHMOD) -R g=u $(prefix)/include/libxslt
+       -$(CHMOD) -R g=u $(prefix)/share/doc/libxml2-*
+       -$(CHMOD) -R g=u $(prefix)/share/doc/libxslt-*
+       -$(CHMOD) -R g=u $(prefix)/share/gtk-doc/html/libxml2
+       -$(CHMOD) -R g=u $(exec_prefix)/bin
+       -$(CHMOD) -R g=u $(exec_prefix)/lib
+       -$(CHMOD) -R g=u $(prefix)/share/aclocal
+       -$(CHMOD) -R g=u $(prefix)/share/man
+       find $(prefix) -perm -200 \! -perm -020
 
 # Nonchalantly remove pkgconfig and cmake subdirectories, even though
 # other libraries might someday write files in them, because lmi never
diff --git a/install_wx.sh b/install_wx.sh
index a10eb21..9668af3 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -154,5 +154,13 @@ cd "$build_dir"
 "$proxy_wx_dir"/configure $config_options CFLAGS="$wx_cc_flags" 
CXXFLAGS="$wx_cxx_flags"
 $MAKE
 $MAKE install
+# autotools: 'make install' doesn't respect group permissions--see:
+#   https://lists.gnu.org/archive/html/automake/2019-01/msg00000.html
+chmod -R g=u "$prefix"/include/wx*
+chmod -R g=u "$exec_prefix"/lib/wx*
+chmod -R g=u "$exec_prefix"/lib/libwx*
+chmod -R g=u "$prefix"/share
+# This should find zero files:
+find "$prefix" -perm -200 \! -perm -020
 
 exit 0
diff --git a/install_wxpdfdoc.sh b/install_wxpdfdoc.sh
index 9f49d7c..90416b6 100755
--- a/install_wxpdfdoc.sh
+++ b/install_wxpdfdoc.sh
@@ -120,5 +120,12 @@ cd "$build_dir"
 "$proxy_wxpdfdoc_dir"/configure $config_options CFLAGS="$wxpdfdoc_cc_flags" 
CXXFLAGS="$wxpdfdoc_cxx_flags"
 $MAKE
 $MAKE install
+# autotools: 'make install' doesn't respect group permissions--see:
+#   https://lists.gnu.org/archive/html/automake/2019-01/msg00000.html
+chmod -R g=u "$prefix"/include/wx*
+chmod -R g=u "$exec_prefix"/bin
+chmod -R g=u "$exec_prefix"/lib
+# This should find zero files:
+find "$prefix" -perm -200 \! -perm -020
 
 exit 0



reply via email to

[Prev in Thread] Current Thread [Next in Thread]