1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-15 13:35:53 +01:00

Replace GNUSTEP_USER_ROOT environment variable with WMAKER_USER_ROOT

As reported in Debian bug #922284 [1]:

    As evident from the prefix, GNUSTEP_USER_ROOT is a GNUstep variable and
    Window Maker should not set it.  Furthemore, it has been deprecated for
    12 years already.  As of gnustep-make/2.7.0-4 the GNUstep build system
    is configured in strict v2 mode which makes it impossible to compile
    GNUstep software.  In a terminal started from a Window Maker session:

    yavor@aneto:/tmp/gorm.app-1.2.24$ make
    This is gnustep-make 2.7.0. Type 'make print-gnustep-make-help' for help.
    Running in gnustep-make version 2 strict mode.
    rm -f InterfaceBuilder; \
    ln -s GormLib InterfaceBuilder
    /usr/share/GNUstep/Makefiles/config-noarch.make:121: *** GNUSTEP_USER_ROOT
    is obsolete.  Stop.

    It is also impossible to build gnustep-make from pristine upstream
    source:

    yavor@aneto:/tmp$ wget -q
      ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-2.7.0.tar.gz
    yavor@aneto:/tmp$ tar xzf gnustep-make-2.7.0.tar.gz
    yavor@aneto:/tmp$ cd gnustep-make-2.7.0/
    yavor@aneto:/tmp/gnustep-make-2.7.0$ ./configure
    ...
    yavor@aneto:/tmp/gnustep-make-2.7.0$ make
    config-noarch.make:121: *** GNUSTEP_USER_ROOT is obsolete.  Stop.

    Note that the majority of GNUstep users use Window Maker as their window
    manager and many of them build GNUstep software from source, mostly
    because of the GNUstep Objective-C runtime which depends on Clang
    (Debian packages use GCC and the GCC/GNU runtime).

Our solution is to replace the GNUSTEP_USER_ROOT environment variable with our
own environment variable, WMAKER_USER_ROOT.  This is documented in NEWS.

[1] https://bugs.debian.org/922284
This commit is contained in:
Doug Torrance
2019-02-15 18:49:49 -05:00
committed by Carlos R. Mafra
parent 1dace5699f
commit 738a78b3e2
36 changed files with 79 additions and 68 deletions

View File

@@ -388,8 +388,8 @@ msgid "Could not create component %s"
msgstr "Koe komponint %s net oanmeitsje"
#: ../../WINGs/userdefaults.c:72
msgid "variable GNUSTEP_USER_ROOT defined with invalid path, not used"
msgstr "fariabele GNUSTEP_USER_ROOT, definiearre mei ûnjildich paad, net brûkt"
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
msgstr "fariabele WMAKER_USER_ROOT, definiearre mei ûnjildich paad, net brûkt"
#. something happened with the file. just overwrite it
#: ../../WINGs/userdefaults.c:210 ../../WINGs/userdefaults.c:225

View File

@@ -197,8 +197,8 @@ msgid "Could not create component %s"
msgstr "Nem sikerült létrehozni a %s elemet"
#: ../../../wmaker-crm/WINGs/userdefaults.c:65
msgid "variable GNUSTEP_USER_ROOT defined with invalid path, not used"
msgstr "A GNUSTEP_USER_ROOT változó be van állítva, de rossz értékre. Nem használom"
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
msgstr "A WMAKER_USER_ROOT változó be van állítva, de rossz értékre. Nem használom"
#. something happened with the file. just overwrite it
#: ../../../wmaker-crm/WINGs/userdefaults.c:196

View File

@@ -389,9 +389,9 @@ msgid "Could not create component %s"
msgstr "Kon component %s niet aanmaken"
#: ../../WINGs/userdefaults.c:72
msgid "variable GNUSTEP_USER_ROOT defined with invalid path, not used"
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
msgstr ""
"variabele GNUSTEP_USER_ROOT, gedefinieerd met ongeldig pad, niet gebruikt"
"variabele WMAKER_USER_ROOT, gedefinieerd met ongeldig pad, niet gebruikt"
#. something happened with the file. just overwrite it
#: ../../WINGs/userdefaults.c:210 ../../WINGs/userdefaults.c:225

View File

@@ -1731,7 +1731,7 @@ Bool WMWritePropListToFile(WMPropList * plist, const char *path)
* file, and the last component is stripped off. the rest is the
* the hierarchy to be created.
*
* refuses to create anything outside $GNUSTEP_USER_ROOT
* refuses to create anything outside $WMAKER_USER_ROOT
*
* returns 1 on success, 0 on failure
*/
@@ -1742,7 +1742,7 @@ int wmkdirhier(const char *path)
size_t p, plen;
struct stat st;
/* Only create directories under $GNUSTEP_USER_ROOT */
/* Only create directories under $WMAKER_USER_ROOT */
if ((t = wusergnusteppath()) == NULL)
return 0;
if (strncmp(path, t, strlen(t)) != 0)
@@ -1823,7 +1823,7 @@ static int wrmdirhier_fn(const char *path, const struct stat *st,
/*
* remove a directory hierarchy
*
* refuses to remove anything outside $GNUSTEP_USER_ROOT
* refuses to remove anything outside $WMAKER_USER_ROOT
*
* returns 1 on success, 0 on failure
*
@@ -1837,7 +1837,7 @@ int wrmdirhier(const char *path)
int error;
const char *t;
/* Only remove directories under $GNUSTEP_USER_ROOT */
/* Only remove directories under $WMAKER_USER_ROOT */
if ((t = wusergnusteppath()) == NULL)
return EPERM;
if (strncmp(path, t, strlen(t)) != 0)

View File

@@ -59,9 +59,9 @@ const char *wusergnusteppath()
return path;
#ifdef HAVE_SECURE_GETENV
gspath = secure_getenv("GNUSTEP_USER_ROOT");
gspath = secure_getenv("WMAKER_USER_ROOT");
#else
gspath = getenv("GNUSTEP_USER_ROOT");
gspath = getenv("WMAKER_USER_ROOT");
#endif
if (gspath) {
gspath = wexpandpath(gspath);
@@ -69,7 +69,7 @@ const char *wusergnusteppath()
path = gspath;
return path;
}
wwarning(_("variable GNUSTEP_USER_ROOT defined with invalid path, not used"));
wwarning(_("variable WMAKER_USER_ROOT defined with invalid path, not used"));
}
h = wgethomedir();

View File

@@ -140,7 +140,7 @@ char *WMPathForResourceOfType(const char *resource, const char *ext)
* Paths are searched in this order:
* - resourcePath/ext
* - dirname(argv[0])/ext
* - GNUSTEP_USER_ROOT/Applications/ApplicationName.app/ext
* - WMAKER_USER_ROOT/Applications/ApplicationName.app/ext
* - ~/GNUstep/Applications/ApplicationName.app/ext
* - GNUSTEP_LOCAL_ROOT/Applications/ApplicationName.app/ext
* - /usr/local/GNUstep/Applications/ApplicationName.app/ext
@@ -175,7 +175,7 @@ char *WMPathForResourceOfType(const char *resource, const char *ext)
if (snprintf(appdir, slen, "Applications/%s.app", WMApplication.applicationName) >= slen)
goto out;
path = checkFile(getenv("GNUSTEP_USER_ROOT"), appdir, ext, resource);
path = checkFile(getenv("WMAKER_USER_ROOT"), appdir, ext, resource);
if (path)
goto out;