diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2024-02-13 10:02:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 10:02:00 -0500 |
commit | 225566e1f6586b15d5824d0fe54efafc765cbb1c (patch) | |
tree | 28b21dbe61b1676f3c9b73514f934a77717776d6 /src | |
parent | 4527a13debf7ca4c6c193bf2e82351bf3e9e3ea8 (diff) | |
parent | 4959d9c251ce603b8e32e7532559ad2a7867b6ab (diff) | |
download | stasis-225566e1f6586b15d5824d0fe54efafc765cbb1c.tar.gz |
Merge pull request #2 from jhunkeler/compat
Compatibility changes
Diffstat (limited to 'src')
-rw-r--r-- | src/deliverable.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/deliverable.c b/src/deliverable.c index ca07286..3f0fd34 100644 --- a/src/deliverable.c +++ b/src/deliverable.c @@ -3,6 +3,10 @@ #include "omc.h" extern struct OMC_GLOBAL globals; +#if defined(OMC_OS_DARWIN) +extern char **environ; +#define __environ environ +#endif #define getter(XINI, SECTION_NAME, KEY, TYPE) \ { \ @@ -94,11 +98,13 @@ int delivery_init_tmpdir(struct Delivery *ctx) { goto l_delivery_init_tmpdir_fatal; } +#if defined(OMC_OS_LINUX) // If we can't execute programs, or write data to the file system at all, then die if ((st.f_flag & ST_NOEXEC) != 0) { msg(OMC_MSG_ERROR | OMC_MSG_L1, "%s is mounted with noexec\n", tmpdir); goto l_delivery_init_tmpdir_fatal; } +#endif if ((st.f_flag & ST_RDONLY) != 0) { msg(OMC_MSG_ERROR | OMC_MSG_L1, "%s is mounted read-only\n", tmpdir); goto l_delivery_init_tmpdir_fatal; @@ -353,6 +359,7 @@ int delivery_init(struct Delivery *ctx, struct INIFILE *ini, struct INIFILE *cfg ctx->meta.codename = NULL; } + /* if (!strcasecmp(ctx->meta.mission, "jwst")) { getter(ini, "meta", "version", INIVAL_TYPE_STR) conv_str(ctx, meta.version) @@ -360,6 +367,9 @@ int delivery_init(struct Delivery *ctx, struct INIFILE *ini, struct INIFILE *cfg } else { ctx->meta.version = NULL; } + */ + getter(ini, "meta", "version", INIVAL_TYPE_STR) + conv_str(ctx, meta.version) getter_required(ini, "meta", "name", INIVAL_TYPE_STR) conv_str(ctx, meta.name) @@ -1321,6 +1331,7 @@ void delivery_gather_tool_versions(struct Delivery *ctx) { } int delivery_init_artifactory(struct Delivery *ctx) { + int status = 0; char dest[PATH_MAX] = {0}; char filepath[PATH_MAX] = {0}; snprintf(dest, sizeof(dest) - 1, "%s/bin", ctx->storage.tools_dir); @@ -1331,7 +1342,6 @@ int delivery_init_artifactory(struct Delivery *ctx) { msg(OMC_MSG_L3, "Skipped download, %s already exists\n", filepath); goto delivery_init_artifactory_envsetup; } - int status = 0; msg(OMC_MSG_L3, "Downloading %s for %s %s\n", globals.jfrog.remote_filename, ctx->system.platform, ctx->system.arch); if ((status = artifactory_download_cli(dest, @@ -1539,4 +1549,4 @@ int delivery_mission_render_files(struct Delivery *ctx) { } return 0; -}
\ No newline at end of file +} |