diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-05-10 15:31:06 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-05-10 15:38:16 -0400 |
| commit | 3f10306c6ac67eaccbc11b22eed26f6ce2725bfe (patch) | |
| tree | 948538817d51203173c824c62e90fbe378752080 /src/lib/delivery | |
| parent | dfc38629724eb4f6718cb73ff3de108871e377bd (diff) | |
| download | stasis-3f10306c6ac67eaccbc11b22eed26f6ce2725bfe.tar.gz | |
Update SYS* macro calls
Diffstat (limited to 'src/lib/delivery')
| -rw-r--r-- | src/lib/delivery/delivery.c | 12 | ||||
| -rw-r--r-- | src/lib/delivery/delivery_artifactory.c | 10 | ||||
| -rw-r--r-- | src/lib/delivery/delivery_build.c | 52 | ||||
| -rw-r--r-- | src/lib/delivery/delivery_conda.c | 2 | ||||
| -rw-r--r-- | src/lib/delivery/delivery_export.c | 6 | ||||
| -rw-r--r-- | src/lib/delivery/delivery_init.c | 28 | ||||
| -rw-r--r-- | src/lib/delivery/delivery_install.c | 30 | ||||
| -rw-r--r-- | src/lib/delivery/delivery_populate.c | 18 | ||||
| -rw-r--r-- | src/lib/delivery/delivery_postprocess.c | 20 | ||||
| -rw-r--r-- | src/lib/delivery/delivery_test.c | 2 |
10 files changed, 90 insertions, 90 deletions
diff --git a/src/lib/delivery/delivery.c b/src/lib/delivery/delivery.c index f9711f4..644c0fb 100644 --- a/src/lib/delivery/delivery.c +++ b/src/lib/delivery/delivery.c @@ -63,20 +63,20 @@ struct Delivery *delivery_duplicate(const struct Delivery *ctx) { memcpy(&result->rules.content, &ctx->rules.content, sizeof(ctx->rules.content)); if (ctx->rules._handle) { - SYSDEBUG("%s", "duplicating INIFILE handle - BEGIN"); + SYSDEBUG("duplicating INIFILE handle - BEGIN"); result->rules._handle = malloc(sizeof(*result->rules._handle)); if (!result->rules._handle) { - SYSERROR("%s", "unable to allocate space for INIFILE handle"); + SYSERROR("unable to allocate space for INIFILE handle"); return NULL; } result->rules._handle->section = malloc(ctx->rules._handle->section_count * sizeof(**ctx->rules._handle->section)); if (!result->rules._handle->section) { guard_free(result->rules._handle); - SYSERROR("%s", "unable to allocate space for INIFILE section"); + SYSERROR("unable to allocate space for INIFILE section"); return NULL; } memcpy(result->rules._handle, &ctx->rules._handle, sizeof(*ctx->rules._handle)); - SYSDEBUG("%s", "duplicating INIFILE handle - END"); + SYSDEBUG("duplicating INIFILE handle - END"); } // Runtime @@ -112,7 +112,7 @@ struct Delivery *delivery_duplicate(const struct Delivery *ctx) { if (ctx->system.platform) { result->system.platform = malloc(DELIVERY_PLATFORM_MAX * sizeof(*result->system.platform)); if (!result->system.platform) { - SYSERROR("%s", "unable to allocate space for system platform array"); + SYSERROR("unable to allocate space for system platform array"); return NULL; } for (size_t i = 0; i < DELIVERY_PLATFORM_MAX; i++) { @@ -365,7 +365,7 @@ void delivery_defer_packages(struct Delivery *ctx, int type) { deferred = ctx->conda.pip_packages_defer; strncpy(mode, "pip", sizeof(mode) - 1); } else { - SYSERROR("BUG: type %d does not map to a supported package manager!\n", type); + SYSERROR("BUG: type %d does not map to a supported package manager!", type); exit(1); } mode[sizeof(mode) - 1] = '\0'; diff --git a/src/lib/delivery/delivery_artifactory.c b/src/lib/delivery/delivery_artifactory.c index 1e93fd5..0926d9c 100644 --- a/src/lib/delivery/delivery_artifactory.c +++ b/src/lib/delivery/delivery_artifactory.c @@ -5,7 +5,7 @@ int delivery_init_artifactory(struct Delivery *ctx) { char dest[PATH_MAX] = {0}; char filepath[PATH_MAX] = {0}; - SYSDEBUG("%s", "Initializing artifactory tools"); + SYSDEBUG("Initializing artifactory tools"); snprintf(dest, sizeof(dest), "%s/bin", ctx->storage.tools_dir); SYSDEBUG("dest=%s", dest); snprintf(filepath, sizeof(dest), "%s/bin/jf", ctx->storage.tools_dir); @@ -17,7 +17,7 @@ int delivery_init_artifactory(struct Delivery *ctx) { goto delivery_init_artifactory_envsetup; } - SYSDEBUG("%s", "Assign platform"); + SYSDEBUG("Assign platform"); char *platform = ctx->system.platform[DELIVERY_PLATFORM]; msg(STASIS_MSG_L3, "Downloading %s for %s %s\n", globals.jfrog.remote_filename, platform, ctx->system.arch); if ((status = artifactory_download_cli(dest, @@ -200,7 +200,7 @@ int delivery_series_sync(struct Delivery *ctx) { char *r_fmt = strdup(ctx->rules.release_fmt); if (!r_fmt) { - SYSERROR("%s", "Unable to allocate bytes for release format string"); + SYSERROR("Unable to allocate bytes for release format string"); return -1; } @@ -228,7 +228,7 @@ int delivery_series_sync(struct Delivery *ctx) { ctx->meta.mission, ctx->info.build_name, release_pattern) < 0) { - SYSERROR("%s", "Unable to allocate bytes for remote directory path"); + SYSERROR("Unable to allocate bytes for remote directory path"); guard_free(release_pattern); return -1; } @@ -236,7 +236,7 @@ int delivery_series_sync(struct Delivery *ctx) { char *dest_dir = NULL; if (asprintf(&dest_dir, "%s/{1}", ctx->storage.output_dir) < 0) { - SYSERROR("%s", "Unable to allocate bytes for destination directory path"); + SYSERROR("Unable to allocate bytes for destination directory path"); return -1; } diff --git a/src/lib/delivery/delivery_build.c b/src/lib/delivery/delivery_build.c index ad0b702..3eb2714 100644 --- a/src/lib/delivery/delivery_build.c +++ b/src/lib/delivery/delivery_build.c @@ -185,17 +185,17 @@ int manylinux_exec(const char *image, const char *script, const char *copy_to_co // setup if (get_random_bytes(suffix, sizeof(suffix))) { - SYSERROR("%s", "unable to acquire value from random generator"); + SYSERROR("unable to acquire value from random generator"); goto manylinux_fail; } if (asprintf(&container_name, "manylinux_build_%d_%zd_%s", uid, time(NULL), suffix) < 0) { - SYSERROR("%s", "unable to allocate memory for container name"); + SYSERROR("unable to allocate memory for container name"); goto manylinux_fail; } if (asprintf(&args, "--name %s -w /build -v %s:/build", container_name, container_name) < 0) { - SYSERROR("%s", "unable to allocate memory for docker arguments"); + SYSERROR("unable to allocate memory for docker arguments"); goto manylinux_fail; } @@ -205,77 +205,77 @@ int manylinux_exec(const char *image, const char *script, const char *copy_to_co } if (asprintf(&nop_create_command, "run --name nop_%s -v %s:/build busybox", container_name, container_name) < 0) { - SYSERROR("%s", "unable to allocate memory for nop container command"); + SYSERROR("unable to allocate memory for nop container command"); goto manylinux_fail; } if (asprintf(&source_copy_command, "cp %s nop_%s:/build", copy_to_container_dir, container_name) < 0) { - SYSERROR("%s", "unable to allocate memory for source copy command"); + SYSERROR("unable to allocate memory for source copy command"); goto manylinux_fail; } if (asprintf(&nop_rm_command, "rm nop_%s", container_name) < 0) { - SYSERROR("%s", "unable to allocate memory for nop container command"); + SYSERROR("unable to allocate memory for nop container command"); goto manylinux_fail; } if (asprintf(&wheel_paths_filename, "%s/wheel_paths_%s.txt", globals.tmpdir, container_name) < 0) { - SYSERROR("%s", "unable to allocate memory for wheel paths file name"); + SYSERROR("unable to allocate memory for wheel paths file name"); goto manylinux_fail; } if (asprintf(&find_command, "run --rm -t -v %s:/build busybox sh -c 'find %s -name \"*.whl\"' > %s", container_name, copy_from_container_dir, wheel_paths_filename) < 0) { - SYSERROR("%s", "unable to allocate memory for find command"); + SYSERROR("unable to allocate memory for find command"); goto manylinux_fail; } // execute if (docker_exec(nop_create_command, 0)) { - SYSERROR("%s", "docker nop container creation failed"); + SYSERROR("docker nop container creation failed"); goto manylinux_fail; } if (docker_exec(source_copy_command, 0)) { - SYSERROR("%s", "docker source copy operation failed"); + SYSERROR("docker source copy operation failed"); goto manylinux_fail; } if (docker_exec(nop_rm_command, STASIS_DOCKER_QUIET)) { - SYSERROR("%s", "docker nop container removal failed"); + SYSERROR("docker nop container removal failed"); goto manylinux_fail; } if (docker_script(image, args, (char *) script, 0)) { - SYSERROR("%s", "manylinux execution failed"); + SYSERROR("manylinux execution failed"); goto manylinux_fail; } if (docker_exec(find_command, 0)) { - SYSERROR("%s", "docker find command failed"); + SYSERROR("docker find command failed"); goto manylinux_fail; } struct StrList *wheel_paths = strlist_init(); if (!wheel_paths) { - SYSERROR("%s", "wheel_paths not initialized"); + SYSERROR("wheel_paths not initialized"); goto manylinux_fail; } if (strlist_append_file(wheel_paths, wheel_paths_filename, read_without_line_endings)) { - SYSERROR("%s", "wheel_paths append failed"); + SYSERROR("wheel_paths append failed"); goto manylinux_fail; } for (size_t i = 0; i < strlist_count(wheel_paths); i++) { const char *item = strlist_item(wheel_paths, i); if (asprintf(©_command, "cp %s:%s %s", container_name, item, copy_to_host_dir) < 0) { - SYSERROR("%s", "unable to allocate memory for docker copy command"); + SYSERROR("unable to allocate memory for docker copy command"); goto manylinux_fail; } if (docker_exec(copy_command, 0)) { - SYSERROR("%s", "docker copy operation failed"); + SYSERROR("docker copy operation failed"); goto manylinux_fail; } guard_free(copy_command); @@ -293,21 +293,21 @@ int manylinux_exec(const char *image, const char *script, const char *copy_to_co // Keep going on failure unless memory related. // We don't want build debris everywhere. if (asprintf(&rm_command, "rm %s", container_name) < 0) { - SYSERROR("%s", "unable to allocate memory for rm command"); + SYSERROR("unable to allocate memory for rm command"); goto late_fail; } if (docker_exec(rm_command, STASIS_DOCKER_QUIET)) { - SYSERROR("%s", "docker container removal operation failed"); + SYSERROR("docker container removal operation failed"); } if (asprintf(&volume_rm_command, "volume rm -f %s", container_name) < 0) { - SYSERROR("%s", "unable to allocate memory for docker volume removal command"); + SYSERROR("unable to allocate memory for docker volume removal command"); goto late_fail; } if (docker_exec(volume_rm_command, STASIS_DOCKER_QUIET)) { - SYSERROR("%s", "docker volume removal operation failed"); + SYSERROR("docker volume removal operation failed"); } } @@ -331,7 +331,7 @@ int delivery_build_wheels_manylinux(struct Delivery *ctx, const char *outdir) { const char *manylinux_image = globals.wheel_builder_manylinux_image; if (!manylinux_image) { - SYSERROR("%s", "manylinux_image not initialized"); + SYSERROR("manylinux_image not initialized"); return -1; } @@ -349,7 +349,7 @@ int delivery_build_wheels_manylinux(struct Delivery *ctx, const char *outdir) { char *script = NULL; if (asprintf(&script, script_fmt, meta->python, meta->python) < 0) { - SYSERROR("%s", "unable to allocate memory for build script"); + SYSERROR("unable to allocate memory for build script"); return -1; } manylinux_build_status = manylinux_exec( @@ -410,7 +410,7 @@ struct StrList *delivery_build_wheels(struct Delivery *ctx) { snprintf(srcdir, sizeof(srcdir), "%s/%s", ctx->storage.build_sources_dir, ctx->tests->test[i]->name); if (git_clone(&proc, ctx->tests->test[i]->repository, srcdir, ctx->tests->test[i]->version)) { - SYSERROR("Unable to checkout tag '%s' for package '%s' from repository '%s'\n", + SYSERROR("Unable to checkout tag '%s' for package '%s' from repository '%s'", ctx->tests->test[i]->version, ctx->tests->test[i]->name, ctx->tests->test[i]->repository); return NULL; } @@ -464,13 +464,13 @@ struct StrList *delivery_build_wheels(struct Delivery *ctx) { } else if (use_builder_build || use_builder_cibuildwheel) { if (use_builder_build) { if (asprintf(&cmd, "-m build -w -o %s", outdir) < 0) { - SYSERROR("%s", "Unable to allocate memory for build command"); + SYSERROR("Unable to allocate memory for build command"); return NULL; } } else if (use_builder_cibuildwheel) { if (asprintf(&cmd, "-m cibuildwheel --output-dir %s --only cp%s-manylinux_%s", outdir, ctx->meta.python_compact, ctx->system.arch) < 0) { - SYSERROR("%s", "Unable to allocate memory for cibuildwheel command"); + SYSERROR("Unable to allocate memory for cibuildwheel command"); return NULL; } } diff --git a/src/lib/delivery/delivery_conda.c b/src/lib/delivery/delivery_conda.c index 6002dd0..6e96d56 100644 --- a/src/lib/delivery/delivery_conda.c +++ b/src/lib/delivery/delivery_conda.c @@ -46,7 +46,7 @@ int delivery_get_conda_installer(struct Delivery *ctx, char *installer_url) { long fetch_status = download(installer_url, script_path, &errmsg); if (HTTP_ERROR(fetch_status) || fetch_status < 0) { // download failed - SYSERROR("download failed: %s: %s\n", errmsg, installer_url); + SYSERROR("download failed: %s: %s", errmsg, installer_url); guard_free(errmsg); return -1; } diff --git a/src/lib/delivery/delivery_export.c b/src/lib/delivery/delivery_export.c index 9a0fb01..a973875 100644 --- a/src/lib/delivery/delivery_export.c +++ b/src/lib/delivery/delivery_export.c @@ -7,7 +7,7 @@ static void delivery_export_configuration(const struct Delivery *ctx) { SYSDEBUG("Entering configuration directory: %s", ctx->storage.delivery_dir); if (!pushd(ctx->storage.cfgdump_dir)) { char filename[PATH_MAX] = {0}; - SYSDEBUG("%s", "Populating filename"); + SYSDEBUG("Populating filename"); snprintf(filename, sizeof(filename), "%s.ini", ctx->info.release_name); SYSDEBUG("filename: %s", filename); @@ -23,9 +23,9 @@ static void delivery_export_configuration(const struct Delivery *ctx) { fclose(spec); SYSDEBUG("%s: closing", filename); - SYSDEBUG("%s", "Zeroing filename"); + SYSDEBUG("Zeroing filename"); memset(filename, 0, sizeof(filename)); - SYSDEBUG("%s", "Populating rendered filename"); + SYSDEBUG("Populating rendered filename"); snprintf(filename, sizeof(filename), "%s-rendered.ini", ctx->info.release_name); SYSDEBUG("filename: %s", filename); diff --git a/src/lib/delivery/delivery_init.c b/src/lib/delivery/delivery_init.c index 47a8f2b..8e673ff 100644 --- a/src/lib/delivery/delivery_init.c +++ b/src/lib/delivery/delivery_init.c @@ -24,13 +24,13 @@ int delivery_init_tmpdir(struct Delivery *ctx) { tmpdir = strdup(x); if (!tmpdir) { // memory error - SYSERROR("%s", "unable to allocate tmpdir"); + SYSERROR("unable to allocate tmpdir"); goto l_delivery_init_tmpdir_fatal; } } else { tmpdir = strdup("/tmp/stasis"); if (!tmpdir) { - SYSERROR("%s", "unable to allocate tmpdir"); + SYSERROR("unable to allocate tmpdir"); goto l_delivery_init_tmpdir_fatal; } //need_setenv = 1; @@ -39,7 +39,7 @@ int delivery_init_tmpdir(struct Delivery *ctx) { if (!ctx->storage.tmpdir) { ctx->storage.tmpdir = strdup(tmpdir); if (!ctx->storage.tmpdir) { - SYSERROR("%s", "unable to allocate ctx->storage.tmpdir"); + SYSERROR("unable to allocate ctx->storage.tmpdir"); goto l_delivery_init_tmpdir_fatal; } } else { @@ -47,7 +47,7 @@ int delivery_init_tmpdir(struct Delivery *ctx) { guard_free(tmpdir); tmpdir = strdup(ctx->storage.tmpdir); if (!tmpdir) { - SYSERROR("%s", "unable to allocate tmpdir"); + SYSERROR("unable to allocate tmpdir"); goto l_delivery_init_tmpdir_fatal; } } @@ -85,7 +85,7 @@ int delivery_init_tmpdir(struct Delivery *ctx) { if (!globals.tmpdir || strcmp(globals.tmpdir, ctx->storage.tmpdir) != 0) { globals.tmpdir = strdup(tmpdir); if (!globals.tmpdir) { - SYSERROR("%s", "unable to allocate globals.tmpdir"); + SYSERROR("unable to allocate globals.tmpdir"); goto l_delivery_init_tmpdir_fatal; } } @@ -93,7 +93,7 @@ int delivery_init_tmpdir(struct Delivery *ctx) { if (!ctx->storage.tmpdir) { ctx->storage.tmpdir = strdup(globals.tmpdir); if (!ctx->storage.tmpdir) { - SYSERROR("%s", "unable to allocate globals.tmpdir"); + SYSERROR("unable to allocate globals.tmpdir"); goto l_delivery_init_tmpdir_fatal; } } @@ -185,7 +185,7 @@ void delivery_init_dirs_stage1(struct Delivery *ctx) { } int delivery_init_platform(struct Delivery *ctx) { - SYSDEBUG("%s", "Setting architecture"); + SYSDEBUG("Setting architecture"); char archsuffix[20]; struct utsname uts; if (uname(&uts)) { @@ -195,7 +195,7 @@ int delivery_init_platform(struct Delivery *ctx) { ctx->system.platform = calloc(DELIVERY_PLATFORM_MAX + 1, sizeof(*ctx->system.platform)); if (!ctx->system.platform) { - SYSERROR("Unable to allocate %d records for platform array\n", DELIVERY_PLATFORM_MAX); + SYSERROR("Unable to allocate %d records for platform array", DELIVERY_PLATFORM_MAX); return -1; } for (size_t i = 0; i < DELIVERY_PLATFORM_MAX; i++) { @@ -215,7 +215,7 @@ int delivery_init_platform(struct Delivery *ctx) { } archsuffix[sizeof(archsuffix) - 1] = '\0'; - SYSDEBUG("%s", "Setting platform"); + SYSDEBUG("Setting platform"); strncpy(ctx->system.platform[DELIVERY_PLATFORM], uts.sysname, DELIVERY_PLATFORM_MAXLEN - 1); if (!strcmp(ctx->system.platform[DELIVERY_PLATFORM], "Darwin")) { snprintf(ctx->system.platform[DELIVERY_PLATFORM_CONDA_SUBDIR], DELIVERY_PLATFORM_MAXLEN, "osx-%s", archsuffix); @@ -346,22 +346,22 @@ int bootstrap_build_info(struct Delivery *ctx) { local._stasis_ini_fp.delivery = ini_open(ctx->_stasis_ini_fp.delivery_path); if (delivery_init_platform(&local)) { - SYSDEBUG("%s", "delivery_init_platform failed"); + SYSDEBUG("delivery_init_platform failed"); delivery_free(&local); return -1; } if (populate_delivery_cfg(&local, INI_READ_RENDER)) { - SYSDEBUG("%s", "populate_delivery_cfg failed"); + SYSDEBUG("populate_delivery_cfg failed"); delivery_free(&local); return -1; } if (populate_delivery_ini(&local, INI_READ_RENDER)) { - SYSDEBUG("%s", "populate_delivery_ini failed"); + SYSDEBUG("populate_delivery_ini failed"); delivery_free(&local); return -1; } if (populate_info(&local)) { - SYSDEBUG("%s", "populate_info failed"); + SYSDEBUG("populate_info failed"); delivery_free(&local); return -1; } @@ -379,7 +379,7 @@ int bootstrap_build_info(struct Delivery *ctx) { memcpy(ctx->info.time_info, local.info.time_info, sizeof(*local.info.time_info)); ctx->info.time_now = local.info.time_now; ctx->info.time_str_epoch = strdup(local.info.time_str_epoch); - SYSDEBUG("%s", "delivery_free local resources"); + SYSDEBUG("delivery_free local resources"); delivery_free(&local); return 0; } diff --git a/src/lib/delivery/delivery_install.c b/src/lib/delivery/delivery_install.c index c073b5c..6a6b746 100644 --- a/src/lib/delivery/delivery_install.c +++ b/src/lib/delivery/delivery_install.c @@ -143,11 +143,11 @@ int delivery_conda_enforce_package_version(struct Delivery *ctx, const char *env int status = 0; if (isempty((char *) env_name)) { - SYSERROR("%s", "environment name cannot be NULL or empty"); + SYSERROR("environment name cannot be NULL or empty"); return -1; } if (isempty((char *) name)) { - SYSERROR("%s", "name cannot be NULL or empty"); + SYSERROR("name cannot be NULL or empty"); return -1; } @@ -164,14 +164,14 @@ int delivery_conda_enforce_package_version(struct Delivery *ctx, const char *env struct StrList *lines = strlist_init(); if (!lines) { - SYSERROR("%s", "unable to allocate memory for installed package list"); + SYSERROR("unable to allocate memory for installed package list"); guard_free(output); status = -1; goto cleanup; } if (strlist_append_tokenize(lines, output, LINE_SEP)) { - SYSERROR("%s", "unable to tokenize installed package list"); + SYSERROR("unable to tokenize installed package list"); guard_free(output); strlist_free(&lines); status = -1; @@ -181,7 +181,7 @@ int delivery_conda_enforce_package_version(struct Delivery *ctx, const char *env for (size_t i = 0; i < strlist_count(lines); i++) { char *line = strlist_item(lines, i); if (!line) { - SYSERROR("%s", "line is NULL"); + SYSERROR("line is NULL"); status = -1; goto cleanup; } @@ -193,20 +193,20 @@ int delivery_conda_enforce_package_version(struct Delivery *ctx, const char *env struct StrList *tokens = strlist_init(); if (!tokens) { - SYSERROR("%s", "unable to allocate memory for tokenized installed package list"); + SYSERROR("unable to allocate memory for tokenized installed package list"); status = -1; goto cleanup; } if (strlist_append_tokenize(tokens, line, " ")) { - SYSERROR("%s", "unable to tokenize installed package list"); + SYSERROR("unable to tokenize installed package list"); status = -1; goto cleanup; } const char *installed_version = strlist_item(tokens, 1); if (!installed_version) { - SYSERROR("%s", "not enough data in line (name and version not found)"); + SYSERROR("not enough data in line (name and version not found)"); guard_strlist_free(&tokens); status = -1; goto cleanup; @@ -215,7 +215,7 @@ int delivery_conda_enforce_package_version(struct Delivery *ctx, const char *env if (strstr(line, name)) { spec_installed = strdup(installed_version); if (!spec_installed) { - SYSERROR("%s", "unable to allocated memory for installed package version"); + SYSERROR("unable to allocated memory for installed package version"); guard_strlist_free(&tokens); status = -1; goto cleanup; @@ -242,7 +242,7 @@ int delivery_conda_enforce_package_version(struct Delivery *ctx, const char *env spec_request = strdup(spec_tmp); if (!spec_request) { - SYSERROR("%s", "unable to allocate memory for conda package spec request"); + SYSERROR("unable to allocate memory for conda package spec request"); status = -1; goto cleanup; } @@ -321,7 +321,7 @@ int delivery_purge_packages(struct Delivery *ctx, const char *env_name, int use_ char *package = strlist_item(list, i); char *command = NULL; if (asprintf(&command, "%s '%s'", subcommand, package) < 0) { - SYSERROR("%s", "Unable to allocate bytes for removal command"); + SYSERROR("Unable to allocate bytes for removal command"); status = -1; break; } @@ -389,7 +389,7 @@ int delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, cha size_t args_alloc_len = STASIS_BUFSIZ; char *args = calloc(args_alloc_len + 1, sizeof(*args)); if (!args) { - SYSERROR("%s", "Unable to allocate bytes for command arguments"); + SYSERROR("Unable to allocate bytes for command arguments"); return -1; } @@ -407,7 +407,7 @@ int delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, cha if (!strcmp(info->version, "HEAD") || is_git_sha(info->version)) { struct StrList *tag_data = strlist_init(); if (!tag_data) { - SYSERROR("%s", "Unable to allocate memory for tag data\n"); + SYSERROR("Unable to allocate memory for tag data"); guard_free(args); return -1; } @@ -432,7 +432,7 @@ int delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, cha NULL}, WHEEL_MATCH_ANY); if (!whl && errno) { // error - SYSERROR("Unable to read Python wheel info: %s\n", strerror(errno)); + SYSERROR("Unable to read Python wheel info: %s", strerror(errno)); exit(1); } else if (!whl) { // not found @@ -505,7 +505,7 @@ int delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, cha } char *command = NULL; if (asprintf(&command, "%s %s", command_base, args) < 0) { - SYSERROR("%s", "Unable to allocate bytes for command\n"); + SYSERROR("Unable to allocate bytes for command"); guard_free(args); return -1; } diff --git a/src/lib/delivery/delivery_populate.c b/src/lib/delivery/delivery_populate.c index 3ce29e9..546ce3b 100644 --- a/src/lib/delivery/delivery_populate.c +++ b/src/lib/delivery/delivery_populate.c @@ -55,7 +55,7 @@ int populate_info(struct Delivery *ctx) { int populate_delivery_cfg(struct Delivery *ctx, int render_mode) { struct INIFILE *cfg = ctx->_stasis_ini_fp.cfg; if (!cfg) { - SYSDEBUG("%s", "cfg is NULL"); + SYSDEBUG("cfg is NULL"); return -1; } int err = 0; @@ -92,7 +92,7 @@ int populate_delivery_cfg(struct Delivery *ctx, int render_mode) { msg(STASIS_MSG_WARN, "wheel_builder is undefined. Falling back to system toolchain: 'build'.\n"); globals.wheel_builder = strdup("build"); if (!globals.wheel_builder) { - SYSERROR("%s", "unable to allocate memory for default wheel_builder value"); + SYSERROR("unable to allocate memory for default wheel_builder value"); return -1; } } @@ -104,14 +104,14 @@ int populate_delivery_cfg(struct Delivery *ctx, int render_mode) { } if (err && globals.wheel_builder && strcmp(globals.wheel_builder, "manylinux") == 0) { - SYSERROR("%s", "default:wheel_builder is set to 'manylinux', however default:wheel_builder_manylinux_image is not configured"); + SYSERROR("default:wheel_builder is set to 'manylinux', however default:wheel_builder_manylinux_image is not configured"); return -1; } if (strcmp(globals.wheel_builder, "manylinux") == 0) { char *manifest_inspect_cmd = NULL; if (asprintf(&manifest_inspect_cmd, "manifest inspect '%s'", globals.wheel_builder_manylinux_image) < 0) { - SYSERROR("%s", "unable to allocate memory for docker command"); + SYSERROR("unable to allocate memory for docker command"); guard_free(manifest_inspect_cmd); return -1; } @@ -285,7 +285,7 @@ int populate_delivery_ini(struct Delivery *ctx, int render_mode) { union INIVal val; struct Test *test = test_init(); if (!test) { - SYSERROR("%s", "unable to allocate memory for test structure"); + SYSERROR("unable to allocate memory for test structure"); return -1; } @@ -383,7 +383,7 @@ int populate_mission_ini(struct Delivery **ctx, int render_mode) { globals.sysconfdir, "mission", (*ctx)->meta.mission, (*ctx)->meta.mission); } - SYSDEBUG("Reading mission configuration: %s\n", missionfile); + SYSDEBUG("Reading mission configuration: %s", missionfile); (*ctx)->_stasis_ini_fp.mission = ini_open(missionfile); struct INIFILE *ini = (*ctx)->_stasis_ini_fp.mission; if (!ini) { @@ -404,7 +404,7 @@ int populate_mission_ini(struct Delivery **ctx, int render_mode) { void validate_delivery_ini(struct INIFILE *ini) { if (!ini) { - SYSERROR("%s", "INIFILE is NULL!"); + SYSERROR("INIFILE is NULL!"); exit(1); } if (ini_section_search(&ini, INI_SEARCH_EXACT, "meta")) { @@ -414,7 +414,7 @@ void validate_delivery_ini(struct INIFILE *ini) { ini_has_key_required(ini, "meta", "mission"); ini_has_key_required(ini, "meta", "python"); } else { - SYSERROR("%s", "[meta] configuration section is required"); + SYSERROR("[meta] configuration section is required"); exit(1); } @@ -424,7 +424,7 @@ void validate_delivery_ini(struct INIFILE *ini) { ini_has_key_required(ini, "conda", "installer_platform"); ini_has_key_required(ini, "conda", "installer_arch"); } else { - SYSERROR("%s", "[conda] configuration section is required"); + SYSERROR("[conda] configuration section is required"); exit(1); } diff --git a/src/lib/delivery/delivery_postprocess.c b/src/lib/delivery/delivery_postprocess.c index 6937c90..0f7d948 100644 --- a/src/lib/delivery/delivery_postprocess.c +++ b/src/lib/delivery/delivery_postprocess.c @@ -74,7 +74,7 @@ void delivery_rewrite_spec(struct Delivery *ctx, char *filename, unsigned stage) FILE *tp = NULL; if (stage == DELIVERY_REWRITE_SPEC_STAGE_1) { - SYSDEBUG("%s", "Entering stage 1"); + SYSDEBUG("Entering stage 1"); header = delivery_get_release_header(ctx); SYSDEBUG("Release header:\n%s", header); if (!header) { @@ -143,38 +143,38 @@ void delivery_rewrite_spec(struct Delivery *ctx, char *filename, unsigned stage) remove(tempfile); guard_free(tempfile); } else if (globals.enable_rewrite_spec_stage_2 && stage == DELIVERY_REWRITE_SPEC_STAGE_2) { - SYSDEBUG("%s", "Entering stage 2"); + SYSDEBUG("Entering stage 2"); char output[PATH_MAX] = {0}; // Replace "local" channel with the staging URL if (ctx->storage.conda_staging_url) { - SYSDEBUG("%s", "Will replace conda channel with staging area url"); + SYSDEBUG("Will replace conda channel with staging area url"); file_replace_text(filename, "@CONDA_CHANNEL@", ctx->storage.conda_staging_url, 0); } else if (globals.jfrog.repo) { - SYSDEBUG("%s", "Will replace conda channel with artifactory repo packages/conda url"); + SYSDEBUG("Will replace conda channel with artifactory repo packages/conda url"); snprintf(output, sizeof(output), "%s/%s/%s/%s/packages/conda", globals.jfrog.url, globals.jfrog.repo, ctx->meta.mission, ctx->info.build_name); file_replace_text(filename, "@CONDA_CHANNEL@", output, 0); } else { - SYSDEBUG("%s", "Will replace conda channel with local conda artifact directory"); + SYSDEBUG("Will replace conda channel with local conda artifact directory"); msg(STASIS_MSG_WARN, "conda_staging_dir is not configured. Using fallback: '%s'\n", ctx->storage.conda_artifact_dir); file_replace_text(filename, "@CONDA_CHANNEL@", ctx->storage.conda_artifact_dir, 0); } if (ctx->storage.wheel_staging_url) { - SYSDEBUG("%s", "Will replace pip arguments with wheel staging url"); + SYSDEBUG("Will replace pip arguments with wheel staging url"); snprintf(output, sizeof(output), "--extra-index-url %s/%s/%s/packages/wheels", ctx->storage.wheel_staging_url, ctx->meta.mission, ctx->info.build_name); file_replace_text(filename, "@PIP_ARGUMENTS@", ctx->storage.wheel_staging_url, 0); } else if (globals.enable_artifactory && globals.jfrog.url && globals.jfrog.repo) { - SYSDEBUG("%s", "Will replace pip arguments with artifactory repo packages/wheel url"); + SYSDEBUG("Will replace pip arguments with artifactory repo packages/wheel url"); snprintf(output, sizeof(output), "--extra-index-url %s/%s/%s/%s/packages/wheels", globals.jfrog.url, globals.jfrog.repo, ctx->meta.mission, ctx->info.build_name); file_replace_text(filename, "@PIP_ARGUMENTS@", output, 0); } else { - SYSDEBUG("%s", "Will replace pip arguments with local wheel artifact directory"); + SYSDEBUG("Will replace pip arguments with local wheel artifact directory"); msg(STASIS_MSG_WARN, "wheel_staging_dir is not configured. Using fallback: '%s'\n", ctx->storage.wheel_artifact_dir); snprintf(output, sizeof(output), "--extra-index-url file://%s", ctx->storage.wheel_artifact_dir); file_replace_text(filename, "@PIP_ARGUMENTS@", output, 0); } } - SYSDEBUG("%s", "Rewriting finished"); + SYSDEBUG("Rewriting finished"); } int delivery_copy_conda_artifacts(struct Delivery *ctx) { @@ -284,6 +284,6 @@ int delivery_index_wheel_artifacts(struct Delivery *ctx) { } closedir(dp); fclose(top_fp); - SYSDEBUG("%s", "Wheel indexing complete"); + SYSDEBUG("Wheel indexing complete"); return 0; } diff --git a/src/lib/delivery/delivery_test.c b/src/lib/delivery/delivery_test.c index 119fe95..732ec2b 100644 --- a/src/lib/delivery/delivery_test.c +++ b/src/lib/delivery/delivery_test.c @@ -319,7 +319,7 @@ void delivery_tests_run(struct Delivery *ctx) { guard_free(cmd); popd(); } else { - SYSERROR("Failed to change directory: %s\n", destdir); + SYSERROR("Failed to change directory: %s", destdir); exit(1); } } |
