Diff elogind-252.9-r3 with a elogind-255.5-r2

/usr/portage/sys-auth/elogind/elogind-255.5-r2.ebuild 2025-07-29 16:22:17.384467959 +0300
1 1
# Copyright 1999-2025 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6 6
PYTHON_COMPAT=( python3_{10..13} )
7 7

  
8 8
if [[ ${PV} = *9999* ]]; then
9
	EGIT_BRANCH="v252-stable"
9
	EGIT_BRANCH="v255-stable"
10 10
	EGIT_REPO_URI="https://github.com/elogind/elogind.git"
11 11
	inherit git-r3
12 12
else
......
14 14
	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
15 15
fi
16 16

  
17
inherit linux-info meson pam python-any-r1 udev xdg-utils
17
inherit eapi9-ver linux-info meson pam python-any-r1 udev xdg-utils
18 18

  
19 19
DESCRIPTION="The systemd project's logind, extracted to a standalone package"
20 20
HOMEPAGE="https://github.com/elogind/elogind"
......
50 50
	policykit? ( sys-auth/polkit )
51 51
"
52 52

  
53
DOCS=( README.md)
53
DOCS=( README.md )
54 54

  
55 55
PATCHES=(
56
	"${FILESDIR}/${P}-nodocs.patch"
57
	"${FILESDIR}/${P}-musl-lfs.patch"
58
	"${FILESDIR}/${P}-musl-1.2.5.patch"
59
	"${FILESDIR}/${P}-py-exec.patch" # bug 933398
56
	# all downstream patches:
57
	"${FILESDIR}/${PN}-252.9-nodocs.patch"
58
	"${FILESDIR}/${P}-part-revert-header-cleanup.patch" # bug 939673
59
	# See also:
60
	# https://github.com/elogind/elogind/issues/285
61
	"${FILESDIR}/${P}-revert-s2idle.patch" # bug 939042
62
	# See also: https://github.com/systemd/systemd/issues/10103
63
	"${FILESDIR}/${P}-no-fchmod_and_chown-tty.patch" # thx to Devuan
60 64
)
61 65

  
62 66
python_check_deps() {
......
71 75
}
72 76

  
73 77
src_prepare() {
74
	if use elibc_musl; then
75
		# Some of musl-specific patches break build on the
76
		# glibc systems (like getdents), therefore those are
77
		# only used when the build is done for musl.
78
		PATCHES+=(
79
			"${FILESDIR}/${P}-musl-sigfillset.patch"
80
			"${FILESDIR}/${P}-musl-statx.patch"
81
			"${FILESDIR}/${P}-musl-rlim-max.patch"
82
			"${FILESDIR}/${P}-musl-getdents.patch"
83
			"${FILESDIR}/${P}-musl-gshadow.patch"
84
			"${FILESDIR}/${P}-musl-strerror_r.patch"
85
			"${FILESDIR}/${P}-musl-more-strerror_r.patch"
86
		)
87
	fi
88

  
89 78
	default
90 79
	xdg_environment_reset
80

  
81
	# don't cleanup /dev/shm/ on logout on logout
82
	# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=949698
83
	sed -e "s/#RemoveIPC=yes/RemoveIPC=no/" \
84
		-i src/login/logind.conf.in || die
91 85
}
92 86

  
93 87
src_configure() {
......
104 98
	local emesonargs=(
105 99
		-Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
106 100
		-Dhtmldir="${EPREFIX}/usr/share/doc/${PF}/html"
107
		-Dpamlibdir=$(getpam_mod_dir)
108 101
		-Dudevrulesdir="${EPREFIX}$(get_udevdir)"/rules.d
109
		--libdir="${EPREFIX}"/usr/$(get_libdir)
110
		-Drootlibdir="${EPREFIX}"/$(get_libdir)
111
		-Drootlibexecdir="${EPREFIX}"/$(get_libdir)/elogind
112
		-Drootprefix="${EPREFIX}/"
102
		--libexecdir="lib/elogind"
103
		--localstatedir="${EPREFIX}"/var
113 104
		-Dbashcompletiondir="${EPREFIX}/usr/share/bash-completion/completions"
114 105
		-Dman=auto
115
		-Dpolkit=$(usex policykit true false)
116 106
		-Dsmack=true
117 107
		-Dcgroup-controller=openrc
118 108
		-Ddefault-hierarchy=${cgroupmode}
119 109
		-Ddefault-kill-user-processes=false
120
		-Dacl=$(usex acl true false)
121
		-Daudit=$(usex audit true false)
122
		-Dhtml=$(usex doc auto false)
123
		-Dpam=$(usex pam true false)
124
		-Dselinux=$(usex selinux true false)
110
		-Dacl=$(usex acl enabled disabled)
111
		-Daudit=$(usex audit enabled disabled)
112
		-Dhtml=$(usex doc auto disabled)
113
		-Dpam=$(usex pam enabled disabled)
114
		-Dpamlibdir="$(getpam_mod_dir)"
115
		-Dselinux=$(usex selinux enabled disabled)
125 116
		-Dtests=$(usex test true false)
126 117
		-Dutmp=$(usex elibc_musl false true)
127 118
		-Dmode=release
119

  
120
		# Ensure consistency between merged-usr and split-usr (bug 945965)
121
		-Dhalt-path="${EPREFIX}/sbin/halt"
122
		-Dkexec-path="${EPREFIX}/usr/sbin/kexec"
123
		-Dnologin-path="${EPREFIX}/sbin/nologin"
124
		-Dpoweroff-path="${EPREFIX}/sbin/poweroff"
125
		-Dreboot-path="${EPREFIX}/sbin/reboot"
128 126
	)
129 127

  
130 128
	meson_src_configure
......
132 130

  
133 131
src_install() {
134 132
	meson_src_install
133
	keepdir /var/lib/elogind
135 134

  
136 135
	newinitd "${FILESDIR}"/${PN}.init-r1 ${PN}
137 136

  
138
	sed -e "s|@libdir@|$(get_libdir)|" "${FILESDIR}"/${PN}.conf.in > ${PN}.conf || die
139
	newconfd ${PN}.conf ${PN}
137
	newconfd "${FILESDIR}"/${PN}.conf ${PN}
140 138
}
141 139

  
142 140
pkg_postinst() {
......
174 172
		fi
175 173
	fi
176 174

  
177
	for version in ${REPLACING_VERSIONS}; do
178
		if ver_test "${version}" -lt 252.9; then
179
			elog "Starting with release 252.9 the sleep configuration is now done"
180
			elog "in the /etc/elogind/sleep.conf. Should you use non-default sleep"
181
			elog "configuration remember to migrate those to new configuration file."
182
		fi
183
	done
175
	if ver_replacing -lt 252.9; then
176
		elog "Starting with release 252.9 the sleep configuration is now done"
177
		elog "in the /etc/elogind/sleep.conf. Should you use non-default sleep"
178
		elog "configuration remember to migrate those to new configuration file."
179
	fi
180

  
181
	local file files
182
	# find custom hooks excluding known (nvidia-drivers, sys-power/tlp)
183
	if [[ -d "${EROOT}"/$(get_libdir)/elogind/system-sleep ]]; then
184
		readarray -t files < <(find "${EROOT}"/$(get_libdir)/elogind/system-sleep/ \
185
			-type f \( -not -iname ".keep_dir" -a \
186
				-not -iname "nvidia" -a \
187
				-not -iname "49-tlp-sleep" \) || die)
188
	fi
189
	if [[ ${#files[@]} -gt 0 ]]; then
190
		ewarn "*** Custom hooks in obsolete path detected ***"
191
		for file in "${files[@]}"; do
192
			ewarn "    ${file}"
193
		done
194
		ewarn "Move these custom hooks to ${EROOT}/etc/elogind/system-sleep/ instead."
195
	fi
184 196
}
185 197

  
186 198
pkg_postrm() {
Thank you!