From cba728f142fc7fa7219d1be49c8cb4aada4309f3 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Thu, 6 Sep 2018 10:41:18 -0400 Subject: Stuff. --- Makefile.in | 7 +++++-- configure.ac | 11 +++++------ src/id.c | 4 +++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Makefile.in b/Makefile.in index 2e35bae..099a89a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -66,18 +66,21 @@ endif @mkdir -p $(@D) $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< -%: %.in Makefile +systemd/random-seed.service systemd/random-seed-save.service: Makefile @mkdir -p $(@D) sed -e 's|@sbindir[@]|$(sbindir)|g' \ -e 's|@default_seed_path_dir[@]|$(default_seed_path_dir)|g' \ $< > $@ +systemd/random-seed.service: systemd/random-seed.service.in +systemd/random-seed-save.service: systemd/random-seed-save.service.in + install: all install -D -m755 random-seed $(DESTDIR)$(sbindir)/random-seed install -D -m644 $(srcdir)/doc/random-seed.8 $(DESTDIR)$(mandir)/man8/random-seed.8 ifneq ($(systemdsystemunitdir),) install -D -m644 systemd/random-seed.service $(DESTDIR)$(systemdsystemunitdir)/random-seed.service - install -D -m644 $(srcdir)/systemd/random-seed-save.service $(DESTDIR)$(systemdsystemunitdir)/random-seed-save.service + install -D -m644 systemd/random-seed-save.service $(DESTDIR)$(systemdsystemunitdir)/random-seed-save.service install -D -m644 $(srcdir)/systemd/random-seed-save.timer $(DESTDIR)$(systemdsystemunitdir)/random-seed-save.timer endif diff --git a/configure.ac b/configure.ac index e3ceb75..b802932 100644 --- a/configure.ac +++ b/configure.ac @@ -10,8 +10,10 @@ AS_IF([test "$ac_cv_prog_cc_c99" = no], [ AC_MSG_ERROR([a C99 compatible compiler is required]) ]) +AX_GCC_FUNC_ATTRIBUTE(fallthrough) + AC_ARG_ENABLE(unity, - AC_HELP_STRING(--enable-unity, [enable unity build (similar to sqlite amalgamation) [yes]]), + AC_HELP_STRING(--enable-unity, [enable unity build (similar to sqlite amalgamation, increases performance) [yes]]), [enable_unity=$enableval], [enable_unity=yes] ) @@ -69,12 +71,11 @@ AS_IF([test "$with_util_linux" = yes], [ PKG_CHECK_VAR(SYSTEMDSYSTEMUNITDIR, systemd, systemdsystemunitdir) -machine_id_paths_default=/etc/machine-id:/var/lib/dbus/machine-id AC_ARG_VAR([MACHINE_ID_PATHS], - [manually specify machine-id location (colon separated list, values must not contain backslashes or quotes) [$machine_id_paths_default]] + [manually specify machine-id location (colon separated list, values must not contain backslashes or quotes) [/etc/machine-id:/var/lib/dbus/machine-id]] ) machine_id_paths_c=` - printf '%s\n' "${MACHINE_ID_PATHS-$machine_id_paths_default}" | + printf '%s\n' "${MACHINE_ID_PATHS-/etc/machine-id:/var/lib/dbus/machine-id}" | sed -e ' s/^/{"/ s/:/", "/g @@ -92,8 +93,6 @@ AC_DEFINE_UNQUOTED(DEFAULT_SEED_PATH, "$DEFAULT_SEED_PATH", [default seed path]) DEFAULT_SEED_PATH_DIR=${DEFAULT_SEED_PATH%/*} AC_SUBST(DEFAULT_SEED_PATH_DIR) -AX_GCC_FUNC_ATTRIBUTE(fallthrough) - AX_APPEND_FLAG(-D_GNU_SOURCE, CPPFLAGS) AX_APPEND_FLAG(-D_DEFAULT_SOURCE, CPPFLAGS) AX_APPEND_FLAG(-D_POSIX_C_SOURCE=200809L, CPPFLAGS) diff --git a/src/id.c b/src/id.c index 0a37ba5..9e5de8a 100644 --- a/src/id.c +++ b/src/id.c @@ -79,7 +79,9 @@ const char *get_drive_id(struct random_seed *rs) { #ifdef HAVE_UTIL_LINUX const char *get_fs_uuid_util_linux(struct random_seed *rs) { - return "fake uuid"; + (void)rs; + fputs("error: util linux not implemented\n", stderr); + return NULL; } #endif -- cgit v1.2.3-70-g09d2