%global commit 08efe60feceea8c81f9571c666880ff1e1c2e3ff %global up greetd %global username greetd %global selinuxtype targeted # The release profile has no debug info, so there is nothing for a debuginfo package %global debug_package %{nil} Name: greetd Version: 0.10.3 Release: 2%{?dist} Summary: A generic greeter daemon License: GPL-3.0-only AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND MIT AND Unlicense URL: https://kl.wtf/projects/greetd # Tarball of the upstream release tag with the crates vendored, produced by scripts/make-srpm.sh Source0: %{up}-%{commit}.tar.gz Source100: %{name}.fc Source101: %{name}.pam Source102: %{name}-greeter.pam Source103: %{name}.sysusers Source104: %{name}.tmpfiles Provides: service(graphical-login) = greetd BuildRequires: cargo BuildRequires: rust BuildRequires: make BuildRequires: scdoc >= 1.10 BuildRequires: sed BuildRequires: systemd-rpm-macros BuildRequires: selinux-policy-devel BuildRequires: pam-devel Requires: (%{name}-selinux = %{version}-%{release} if selinux-policy-%{selinuxtype}) %description greetd is a minimal and flexible login manager daemon that makes no assumptions about what you want to launch. %package fakegreet Summary: Test utility for greeter development %description fakegreet fakegreet is a test utility that allows launching greeters without greetd daemon. %package selinux Summary: SELinux policy for %{name} BuildArch: noarch Requires: selinux-policy-%{selinuxtype} Requires(post): selinux-policy-%{selinuxtype} %{?selinux_requires} %description selinux Custom SELinux policy module for %{name} %prep %autosetup -n %{up}-%{commit} sed -i 's/"greeter"/"%{username}"/' config.toml %build export CARGO_HOME=$PWD/.cargo-home cargo build --release --offline -p greetd -p agreety -p fakegreet %make_build -C man mkdir selinux pushd selinux echo 'policy_module(%{name},1.0)' >%{name}.te cp %{SOURCE100} %{name}.fc make -f %{_datadir}/selinux/devel/Makefile %{name}.pp bzip2 -9 %{name}.pp popd %install for name in greetd agreety fakegreet; do install -D -m755 -vp target/release/$name %{buildroot}%{_bindir}/$name done %make_install PREFIX=%{_prefix} -C man install -D -m644 -vp greetd.service %{buildroot}%{_unitdir}/%{name}.service install -D -m644 -vp config.toml %{buildroot}%{_sysconfdir}/%{name}/config.toml install -D -m644 -vp %{SOURCE101} %{buildroot}%{_prefix}/lib/pam.d/%{name} install -D -m644 -vp %{SOURCE102} %{buildroot}%{_prefix}/lib/pam.d/%{name}-greeter install -D -m644 -vp %{SOURCE103} %{buildroot}%{_sysusersdir}/%{name}.conf install -D -m644 -vp %{SOURCE104} %{buildroot}%{_tmpfilesdir}/%{name}.conf install -d -m750 -vp %{buildroot}%{_sharedstatedir}/%{name} install -D -m 0644 -vp selinux/%{name}.pp.bz2 \ %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2 %post %systemd_post %{name}.service XDG_CONFIG_DIR=%{_sharedstatedir}/%{name}/.config if [ ! -d $XDG_CONFIG_DIR/systemd ]; then mkdir -p $XDG_CONFIG_DIR/systemd/user ln -sf /dev/null $XDG_CONFIG_DIR/systemd/user/xdg-desktop-portal.service chown -R %{username}:%{username} $XDG_CONFIG_DIR fi exit 0 %preun %systemd_preun %{name}.service %postun %systemd_postun %{name}.service %pre selinux %selinux_relabel_pre -s %{selinuxtype} %post selinux %selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2 %selinux_relabel_post -s %{selinuxtype} %postun selinux if [ $1 -eq 0 ]; then %selinux_modules_uninstall -s %{selinuxtype} %{name} %selinux_relabel_post -s %{selinuxtype} fi %files %license LICENSE %doc README.md %attr(-,%{username},%{username}) %dir %{_sharedstatedir}/%{name} %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/config.toml %{_prefix}/lib/pam.d/%{name} %{_prefix}/lib/pam.d/%{name}-greeter %{_bindir}/%{name} %{_bindir}/agreety %{_mandir}/man1/agreety.1* %{_mandir}/man1/greetd.1* %{_mandir}/man5/greetd.5* %{_mandir}/man7/greetd-ipc.7* %{_sysusersdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf %{_unitdir}/%{name}.service %files fakegreet %license LICENSE %{_bindir}/fakegreet %files selinux %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.* %changelog * Tue Nov 03 2026 c0mpile - %{version}-1 - Build Fedora's packaging for EL10 from the upstream release tag, with vendored crates