sys-auth/realmd: Update to 0.17.0

This seems to be still unpackaged by gentoo, so refresh it on our own
then and do some maintainance work on it:

- Update to the recent EAPI, replacing autotools-utils with autotools,
  and systemd_get_unitdir with systemd_get_systemunitdir.

- Add a patch from upstream fixing the pkg-config detection, so our
  hack during configure phase is not necessary any more.

- Patch the configure script to put the D-Bus policy files in
  /usr/share instead of /etc. This removes a need for a hack in the
  install step.

This is to get rid of EAPI 5 in the package.
This commit is contained in:
Krzesimir Nowak 2021-09-21 15:09:46 +02:00
parent 85ad6e9aec
commit 61ee954e86
5 changed files with 73 additions and 42 deletions

View File

@ -1 +1 @@
DIST realmd-0.16.2.tar.gz 461698 SHA256 abcdcd48c46bddd5b5f3716fd036f7436f2df1796c2e3bf345ae92a9a76801f2 SHA512 ff59825a4ddbf291dcc5c941266b48b784f98565c075dadada9305983e7a1dce21acd72c3f75495ec2b1f19884e7c46929a78cc364450316a4c0876186bd596a
DIST realmd-0.17.0.tar.gz 357385 BLAKE2B 3fc6e17478d9a97ea20413139a5652853dd61ba1159ee86e868981de471d52fd03cd1e0f2d691aa63294651aa762f639bedb3f8957fdb538fe8e6186c442233d SHA512 19d51e387664bbdad333998eda266362beb61477b82230ec5467f9b945f6a1fbeb508bffebf3317ba0e1417363e6dd486384002b5a819c2befcd7ef351a99742

View File

@ -1,26 +0,0 @@
From 618abb3f1336283e56571e76be405f41b7cdf7bc Mon Sep 17 00:00:00 2001
From: David Michael <david.michael@coreos.com>
Date: Sun, 11 Dec 2016 13:13:15 -0800
Subject: [PATCH] configure: Find a host-prefixed krb5-config when
cross-compiling
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 5c0a8e7..e335247 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,7 +163,7 @@ if test "$KRB5_CFLAGS" != ""; then
KRB5_PASSED_CFLAGS=$KRB5_CFLAGS
fi
-AC_PATH_PROG(KRB5_CONFIG, krb5-config)
+AC_PATH_TOOL(KRB5_CONFIG, krb5-config)
AC_MSG_CHECKING(for working krb5-config)
if test -x "$KRB5_CONFIG"; then
KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
--
2.7.4

View File

@ -0,0 +1,25 @@
From 38e59a8fb27abc8878e2a66f9a8766d53b1a9613 Mon Sep 17 00:00:00 2001
From: Krzesimir Nowak <knowak@microsoft.com>
Date: Tue, 21 Sep 2021 13:55:36 +0200
Subject: [PATCH] Put D-Bus policy files in /usr/share
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index ea51f92..194d3e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,7 +233,7 @@ AC_SUBST(LDAP_CFLAGS)
DBUS_SERVICES_DIR="${datadir}/dbus-1/system-services"
AC_SUBST(DBUS_SERVICES_DIR)
-DBUS_POLICY_DIR="${sysconfdir}/dbus-1/system.d"
+DBUS_POLICY_DIR="${datadir}/dbus-1/system.d"
AC_SUBST(DBUS_POLICY_DIR)
POLKIT_ACTION_DIR="${datadir}/polkit-1/actions"
--
2.31.1

View File

@ -0,0 +1,30 @@
From 78e79dfd01ea0983b6c5f5e0afc1394bfed8af2e Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Mon, 16 Aug 2021 17:45:11 +0200
Subject: [PATCH] Use target arch pkg-config to fix cross compilation
Consider $ac_tool_prefix when searching for pkg-config.
Bug-Debian: https://bugs.debian.org/862213
Fixes: #35
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 4dac5a9..ea51f92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,7 +78,7 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
IT_PROG_INTLTOOL($INTLTOOL_REQ)
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+PKG_PROG_PKG_CONFIG
GETTEXT_PACKAGE=realmd
AC_SUBST([GETTEXT_PACKAGE])
--
GitLab

View File

@ -1,16 +1,13 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
EAPI=7
AUTOTOOLS_AUTORECONF=1
inherit autotools-utils systemd
inherit autotools systemd
DESCRIPTION="DBus service for configuring kerberos and other online identities"
HOMEPAGE="http://cgit.freedesktop.org/realmd/realmd/"
SRC_URI="http://www.freedesktop.org/software/realmd/releases/${P}.tar.gz"
SRC_URI="https://gitlab.freedesktop.org/realmd/realmd/-/archive/${PV}/${P}.tar.gz"
LICENSE="LGPL-2+"
SLOT="0"
@ -28,23 +25,28 @@ RDEPEND="${DEPEND}"
# The daemon is installed to a private dir under /usr/lib, similar to systemd.
QA_MULTILIB_PATHS="usr/lib/realmd/realmd"
PATCHES=(
"${FILESDIR}/${PN}-0.17.0-use-target-arch-pkg-config-to-fix-cross-compilation.patch"
"${FILESDIR}/${PN}-0.17.0-put-d-bus-policy-files-in-usr-share.patch"
)
src_prepare() {
sed -e '/gentoo-release/s/dnl/ /g' -i configure.ac
default
epatch "${FILESDIR}"/realmd-0.16.3-fix-krb5-config.patch
autotools-utils_src_prepare
eautoreconf
}
src_configure() {
PKG_CONFIG=/usr/bin/${CHOST}-pkg-config autotools-utils_src_configure \
$(use_with systemd systemd-journal) \
--with-systemd-unit-dir=$(systemd_get_unitdir) \
--with-distro=defaults \
local myconf=(
$(use_with systemd systemd-journal)
--with-systemd-unit-dir=$(systemd_get_systemunitdir)
--with-distro=defaults
--disable-doc
)
econf "${myconf[@]}"
}
src_install() {
systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/${PN}.conf"
autotools-utils_src_install DBUS_POLICY_DIR=/usr/share/dbus-1/system.d
default
}