realmd: init at 0.17.1

This commit is contained in:
Anthony Roussel 2024-04-06 14:25:52 +02:00
parent 5bcb08ea03
commit 9773be3a4e
No known key found for this signature in database
GPG key ID: 9DC4987B1A55E75E
2 changed files with 120 additions and 0 deletions

View file

@ -0,0 +1,80 @@
{
autoreconfHook,
fetchFromGitLab,
glib,
lib,
libkrb5,
nix-update-script,
openldap,
pkg-config,
polkit,
samba,
stdenv,
systemdLibs,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "realmd";
version = "0.17.1";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "realmd";
repo = "realmd";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-lmNlrXOOUSDk/8H/ge0IRA64bnau9nYUIkW6OyVxbBg=";
};
patches = [
# Remove unused tap driver/valgrind checks to make tests work
./remove-tap-driver.patch
];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
glib
libkrb5
openldap
polkit
samba
systemdLibs
];
configureFlags = [
"--sysconfdir=${placeholder "out"}/etc"
"--with-private-dir=${placeholder "out"}/lib/realmd"
"--with-systemd-unit-dir=${placeholder "out"}/lib/systemd/system"
# realmd doesn't fails without proper defaults and distro configuration files
# These settings will be overriden by the NixOS module
"--with-distro=redhat"
# Documentation is disabled
# We need to run gdbus-codegen & xmlto in **offline mode** to make it work
# See https://github.com/NixOS/nixpkgs/pull/301631
"--disable-doc"
];
hardeningDisable = [
# causes redefinition of _FORTIFY_SOURCE
"fortify3"
];
doCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://gitlab.freedesktop.org/realmd/realmd/-/blob/${finalAttrs.version}/NEWS";
description = "DBus service for configuring Kerberos and other online identities";
homepage = "https://gitlab.freedesktop.org/realmd/realmd";
license = lib.licenses.lgpl21Only;
mainProgram = "realm";
maintainers = [ lib.maintainers.anthonyroussel ];
platforms = lib.platforms.linux;
};
})

View file

@ -0,0 +1,40 @@
diff --git a/Makefile.am b/Makefile.am
index 1df20d1..b355d59 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -152,35 +152,6 @@ uninstall-doc:
@true
endif
-# ------------------------------------------------------------
-# Testing
-#
-
-LOG_DRIVER = $(top_srcdir)/build/tap-driver
-LOG_COMPILER = sh -c '"$$0" "$$@" --tap'
-
-VALGRIND_ARGS = --trace-children=no --quiet --error-exitcode=33 \
- --suppressions=valgrind-suppressions --gen-suppressions=all \
- --num-callers=16
-
-VALGRIND_SUPPRESSIONS = \
- build/glib.supp \
- $(NULL)
-
-valgrind-suppressions: $(VALGRIND_SUPPRESSIONS)
- $(AM_V_GEN) cat $^ > $@
-
-check-memory: valgrind-suppressions
- $(MAKE) LOG_FLAGS="-- libtool --mode=execute valgrind $(VALGRIND_ARGS)" \
- $(AM_MAKEFLAGS) check
-recheck-memory: valgrind-suppressions
- $(MAKE) LOG_FLAGS="-- libtool --mode=execute valgrind $(VALGRIND_ARGS)" \
- $(AM_MAKEFLAGS) recheck
-
-EXTRA_DIST += \
- $(LOG_DRIVER) \
- $(VALGRIND_SUPPRESSIONS) \
- $(NULL)
if WITH_COVERAGE
coverage: