Hi, I'm attempting to package realmd program. However, there seems to be an issue as it does not support GuixSD. Therefore I created a patch.
When I specify the patch the hunk fails as the configure.ac file is read-only. I tried to use snippets but they seem to be applied after the patch therefore don't work. Is there a way how to patch a read-only files? I got the idea from this thread [1]. Below is the package definition and patch. [1] https://lists.gnu.org/archive/html/help-guix/2020-01/msg00063.html realmd.scm ------------------------------------------------------------------------------------- (define-module (realmd) #:use-module (guix packages) #:use-module (gnu packages) #:use-module (gnu packages image) #:use-module (gnu packages glib) #:use-module (gnu packages autotools) #:use-module (gnu packages pkg-config) #:use-module (gnu packages polkit) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module ((guix licenses) #:prefix license:)) (define-public realmd (package (name "realmd") (version "0.17.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/freedesktop/realmd") (commit version))) (file-name (git-file-name name version)) (modules '((guix build utils))) (snippet '(begin (delete-file "configure.ac") ;(make-file-writable "configure.ac") #t)) (patches '("realmd-guixsd-support.patch")) (sha256 (base32 "1c6q2a86kk2f1akzc36nh52hfwsmmc0mbp6ayyjxj4zsyk9zx5bf")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("autoconf" ,autoconf) ("intltool" ,intltool) ("automake" ,automake))) (inputs `(("glib" ,glib) ("polkit" ,polkit))) (synopsis "DBus service for configuring kerberos and other online identities") (description "Dbus system service that manages discovery and enrollment in realms/domains like Active Directory or IPA.") (home-page "https://www.freedesktop.org/software/realmd/") (license license:lgpl2.1))) ------------------------------------------------------------------------------ realmd-guixsd-support.patch ([PATCH] Add GuixSD support) ------------------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 4dac5a9..9e818d6 100644 --- a/configure.ac +++ b/configure.ac @@ -38,6 +38,7 @@ if test -z $DISTRO; then AC_CHECK_FILE(/etc/redhat-release, [DISTRO="redhat"]) AC_CHECK_FILE(/etc/debian_version, [DISTRO="debian"]) AC_CHECK_FILE(/etc/SuSE-release, [DISTRO="suse"]) + AC_CHECK_FILE(/gnu/store, [DISTRO="guixsd"]) # Not customized for these yet dnl AC_CHECK_FILE(/etc/gentoo-release, [DISTRO="gentoo"]) @@ -103,51 +104,6 @@ PKG_CHECK_MODULES(POLKIT, polkit-gobject-1) AC_SUBST(POLKIT_CFLAGS) AC_SUBST(POLKIT_LIBS) -# -------------------------------------------------------------------- -# systemd - -AC_MSG_CHECKING([systemd unit directory]) -AC_ARG_WITH(systemd-unit-dir, - AS_HELP_STRING([--with-systemd-unit-dir], - [Directory to install systemd service file])) - -if test "$with_systemd_unit_dir" = "" -o "$with_systemd_unit_dir" = "yes"; then - with_systemd_unit_dir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) - if test "$with_systemd_unit_dir" = ""; then - AC_MSG_ERROR(["Couldn't find systemd system unit directory"]) - fi - -elif test "$with_systemd_unit_dir" = "no"; then - with_systemd_unit_dir="" - -fi - -SYSTEMD_UNIT_DIR="$with_systemd_unit_dir" -AC_SUBST(SYSTEMD_UNIT_DIR) -AM_CONDITIONAL(WITH_SYSTEMD, [test -n "$with_systemd_unit_dir"]) - -dbus_systemd_service="" -if test -n "$with_systemd_unit_dir"; then - dbus_systemd_service="SystemdService=realmd.service" -fi -AC_SUBST(dbus_systemd_service) - -AC_MSG_RESULT($with_systemd_unit_dir) - -AC_ARG_WITH(systemd-journal, - AS_HELP_STRING([--with-systemd-journal], - [Use systemd's journal for logging])) - -if test "$with_systemd_journal" != "no"; then - AC_DEFINE_UNQUOTED(WITH_JOURNAL, 1, [Use systemd's journal]) - PKG_CHECK_MODULES(SYSTEMD_JOURNAL, [libsystemd],, - [PKG_CHECK_MODULES(SYSTEMD_JOURNAL, [libsystemd-journal])]) - with_systemd_journal="yes" -fi - -AC_SUBST(SYSTEMD_JOURNAL_CFLAGS) -AC_SUBST(SYSTEMD_JOURNAL_LIBS) - # ------------------------------------------------------------------- # resolv diff --git a/service/realmd-guixsd.conf b/service/realmd-guixsd.conf new file mode 100644 index 0000000..ac4b436 --- /dev/null +++ b/service/realmd-guixsd.conf @@ -0,0 +1,42 @@ +# Default values for realmd +[service] +debug = no +automatic-install = yes + +[paths] +net = /usr/bin/net +winbindd = /usr/sbin/winbindd +smb.conf = /etc/smb.conf +sssd.conf = /etc/sssd/sssd.conf +adcli = /usr/sbin/adcli +ipa-client-install = /usr/sbin/ipa-client-install +pam_winbind.conf = /etc/security/pam_winbind.conf +krb5.conf = /etc/krb5.conf + +[active-directory] +default-client = sssd +os-name = +os-version = + +[providers] +sssd = yes +samba = yes +example = no + +[samba-packages] + +[winbind-packages] + +[sssd-packages] + +[adcli-packages] + +[commands] + +[users] +default-shell = /bin/bash +default-home = /home/%U@%D + +[example.com] +example-administrator = Administrator +example-password = bureaucracy -- 2.32.0
