Skip to content

Commit

Permalink
generator: "uninline" generator_open_unit_file and generator_add_symlink
Browse files Browse the repository at this point in the history
Inlining of these functions changed ABI of libsystemd-shared which
causes issue on update when generators packaged in systemd-udev
subpackage fail to execute because of ABI change. systemd and the
library are already updated while systemd-udev subpackage is not and
hence old generators can't be started when systemd is reexecuting
due to internal library incompatibility.

rhel-only: bugfix

Resolves: RHEL-33436
  • Loading branch information
msekletar authored and github-actions[bot] committed Jul 17, 2024
1 parent d7dcbf9 commit 52aaecf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 8 additions & 0 deletions src/shared/generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ int generator_open_unit_file_full(
return 0;
}

int generator_open_unit_file(const char *dest, const char *source, const char *name, FILE **ret_file) {
return generator_open_unit_file_full(dest, source, name, ret_file, NULL);
}

int generator_add_symlink_full(
const char *dir,
const char *dst,
Expand Down Expand Up @@ -125,6 +129,10 @@ int generator_add_symlink_full(
return 0;
}

int generator_add_symlink(const char *dir, const char *dst, const char *dep_type, const char *src) {
return generator_add_symlink_full(dir, dst, dep_type, src, NULL);
}

static int generator_add_ordering(
const char *dir,
const char *src,
Expand Down
10 changes: 2 additions & 8 deletions src/shared/generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@
#include "main-func.h"

int generator_open_unit_file_full(const char *dest, const char *source, const char *name, FILE **ret_file, char **ret_temp_path);

static inline int generator_open_unit_file(const char *dest, const char *source, const char *name, FILE **ret_file) {
return generator_open_unit_file_full(dest, source, name, ret_file, NULL);
}
int generator_open_unit_file(const char *dest, const char *source, const char *name, FILE **ret_file);

int generator_add_symlink_full(const char *dir, const char *dst, const char *dep_type, const char *src, const char *instance);

static inline int generator_add_symlink(const char *dir, const char *dst, const char *dep_type, const char *src) {
return generator_add_symlink_full(dir, dst, dep_type, src, NULL);
}
int generator_add_symlink(const char *dir, const char *dst, const char *dep_type, const char *src);

int generator_write_fsck_deps(
FILE *f,
Expand Down

0 comments on commit 52aaecf

Please sign in to comment.