The package rpms/greetd.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/greetd.git/commit/?id=c4dabb9e1db....
Change:
+ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit 40337dbd80d0418426a6b5c04a280425b81c2539
Author: Aleksei Bavshin <alebastr(a)fedoraproject.org>
Date: Tue May 3 06:23:39 2022 -0700
Add a full license breakdown
diff --git a/LICENSE.dependencies b/LICENSE.dependencies
new file mode 100644
index 0000000..d20c0ac
--- /dev/null
+++ b/LICENSE.dependencies
@@ -0,0 +1,35 @@
+ASL 2.0 or Boost: rust-ryu 1.0.9
+ASL 2.0 or MIT: rust-autocfg 1.1.0
+ASL 2.0 or MIT: rust-pin-project-lite 0.2.8
+ASL 2.0 or MIT: rust-signal-hook-registry 1.4.0
+ASL 2.0: rust-rpassword 5.0.1
+GPLv3: rust-greetd_ipc 0.8.0
+MIT or ASL 2.0: rust-async-trait 0.1.53
+MIT or ASL 2.0: rust-bitflags 1.3.2
+MIT or ASL 2.0: rust-cfg-if 1.0.0
+MIT or ASL 2.0: rust-getopts 0.2.21
+MIT or ASL 2.0: rust-itoa 1.0.1
+MIT or ASL 2.0: rust-libc 0.2.121
+MIT or ASL 2.0: rust-log 0.4.16
+MIT or ASL 2.0: rust-once_cell 1.10.0
+MIT or ASL 2.0: rust-pam-sys 0.5.6
+MIT or ASL 2.0: rust-proc-macro2 1.0.36
+MIT or ASL 2.0: rust-quote 1.0.17
+MIT or ASL 2.0: rust-serde 1.0.136
+MIT or ASL 2.0: rust-serde_derive 1.0.136
+MIT or ASL 2.0: rust-serde_json 1.0.79
+MIT or ASL 2.0: rust-socket2 0.4.4
+MIT or ASL 2.0: rust-syn 1.0.90
+MIT or ASL 2.0: rust-thiserror 1.0.30
+MIT or ASL 2.0: rust-thiserror-impl 1.0.30
+MIT or ASL 2.0: rust-unicode-width 0.1.9
+MIT or ASL 2.0: rust-unicode-xid 0.2.2
+MIT: rust-bytes 1.1.0
+MIT: rust-memoffset 0.6.5
+MIT: rust-mio 0.8.2
+MIT: rust-nix0.20 0.20.2
+MIT: rust-tokio 1.17.0
+MIT: rust-tokio-macros 1.7.0
+MIT: rust-users 0.11.0
+Unlicense or MIT: rust-memchr 2.4.1
+Unlicense: rust-enquote 1.1.0
diff --git a/greetd.spec b/greetd.spec
index b55fac1..1873d0a 100644
--- a/greetd.spec
+++ b/greetd.spec
@@ -19,6 +19,7 @@ Summary: A generic greeter daemon
# MIT or ASL 2.0
# Unlicense
# Unlicense or MIT
+# See LICENSE.dependencies for a full list of buildroot crates and licenses
License: GPLv3 and ASL 2.0 and MIT and Unlicense
URL:
https://kl.wtf/projects/greetd
Source0: %{forgeurl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
@@ -32,6 +33,8 @@ Source101: %{name}.pam
Source102: %{name}-greeter.pam
# User definition
Source103: %{name}.sysusers
+# Full list of buildroot crates and dependencies
+Source104: LICENSE.dependencies
# Update dependencies and unbundle greetd_ipc crate.
Patch0: greetd-fix-metadata.diff
@@ -84,6 +87,7 @@ Custom SELinux policy module for %{name}
%prep
%autosetup -p1
%cargo_prep
+cp %{SOURCE104} .
# patch greetd daemon user
sed -i 's/"greeter"/"%{username}"/' config.toml
# replace README with a better documentation file
@@ -177,6 +181,7 @@ fi
%files
%license LICENSE
+%license LICENSE.dependencies
%doc README.md
%attr(-,%{username},%{username}) %dir %{_sharedstatedir}/%{name}
%dir %{_sysconfdir}/%{name}
@@ -194,6 +199,7 @@ fi
%files fakegreet
%license LICENSE
+%license LICENSE.dependencies
%{_bindir}/fakegreet
%if %{with selinux}
commit c4dabb9e1db33e59c67c6f3856f74e990c82b28a
Author: Aleksei Bavshin <alebastr(a)fedoraproject.org>
Date: Tue May 3 05:26:46 2022 -0700
Initial import (#2052407)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fea10ae
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/results_*/
+/x86_64
+*.src.rpm
+/greetd-0.8.0.tar.gz
+/greetd-docs-a00d582a.md
diff --git a/greetd-fix-metadata.diff b/greetd-fix-metadata.diff
new file mode 100644
index 0000000..bdc9fe5
--- /dev/null
+++ b/greetd-fix-metadata.diff
@@ -0,0 +1,53 @@
+diff -rup greetd-0.8.0.orig/agreety/Cargo.toml greetd-0.8.0/agreety/Cargo.toml
+--- greetd-0.8.0.orig/agreety/Cargo.toml 2021-09-10 04:00:36.053783328 +0000
++++ greetd-0.8.0/agreety/Cargo.toml 2021-09-10 04:01:27.687850289 +0000
+@@ -8,9 +8,9 @@ homepage = "https://kl.wtf/projects/agre
+ repository = "https://git.sr.ht/~kennylevinsen/greetd/"
+
+ [dependencies]
+-greetd_ipc = { path = "../greetd_ipc", features = ["sync-codec"]}
++greetd_ipc = { version = "0.8.0", features = ["sync-codec"]}
+ inish = { path = "../inish"}
+ rpassword = "5.0"
+ getopts = "0.2"
+ enquote = "1.0.3"
+-nix = "0.19"
++nix = "0.20"
+diff -rup greetd-0.8.0.orig/Cargo.toml greetd-0.8.0/Cargo.toml
+--- greetd-0.8.0.orig/Cargo.toml 2021-09-10 04:00:36.053783328 +0000
++++ greetd-0.8.0/Cargo.toml 2021-09-10 04:00:48.617044265 +0000
+@@ -9,4 +9,4 @@ incremental = false
+ codegen-units = 1
+
+ [workspace]
+-members = ["inish", "greetd_ipc", "greetd",
"agreety", "fakegreet"]
++members = ["inish", "greetd", "agreety",
"fakegreet"]
+diff -rup greetd-0.8.0.orig/fakegreet/Cargo.toml greetd-0.8.0/fakegreet/Cargo.toml
+--- greetd-0.8.0.orig/fakegreet/Cargo.toml 2021-09-10 04:00:36.053783328 +0000
++++ greetd-0.8.0/fakegreet/Cargo.toml 2021-09-10 04:00:48.618044285 +0000
+@@ -9,6 +9,6 @@ repository = "https://git.sr.ht/~kennyle
+
+ [dependencies]
+ serde = { version = "1.0", features = ["derive"] }
+-greetd_ipc = { path = "../greetd_ipc", features = ["tokio-codec"] }
++greetd_ipc = { version = "0.8.0", features = ["tokio-codec"] }
+ tokio = { version = "1.0", features = ["process"] }
+ thiserror = "1.0"
+diff -rup greetd-0.8.0.orig/greetd/Cargo.toml greetd-0.8.0/greetd/Cargo.toml
+--- greetd-0.8.0.orig/greetd/Cargo.toml 2021-09-10 04:00:36.053783328 +0000
++++ greetd-0.8.0/greetd/Cargo.toml 2021-09-10 04:01:46.484237044 +0000
+@@ -11,12 +11,12 @@ repository = "https://git.sr.ht/~kennyle
+ debug = []
+
+ [dependencies]
+-nix = "0.19"
++nix = "0.20"
+ pam-sys = "0.5.6"
+ users = "0.11.0"
+ serde = { version = "1.0", features = ["derive"] }
+ serde_json = "1.0"
+-greetd_ipc = { path = "../greetd_ipc", features = ["tokio-codec"] }
++greetd_ipc = { version = "0.8.0", features = ["tokio-codec"] }
+ inish = { path = "../inish" }
+ libc = "0.2"
+ tokio = { version = "1.0", features = ["net", "sync",
"macros", "signal", "rt", "io-util",
"time"] }
diff --git a/greetd-greeter.pam b/greetd-greeter.pam
new file mode 100644
index 0000000..71a4fb6
--- /dev/null
+++ b/greetd-greeter.pam
@@ -0,0 +1,17 @@
+#%PAM-1.0
+
+# Load environment from /etc/environment and ~/.pam_environment
+auth required pam_env.so
+
+# Always let the greeter start without authentication
+auth required pam_permit.so
+
+# No action required for account management
+account required pam_permit.so
+
+# Can't change password
+password required pam_deny.so
+
+# Setup session
+session required pam_unix.so
+session optional pam_systemd.so
diff --git a/greetd-rhbz1891682.patch b/greetd-rhbz1891682.patch
new file mode 100644
index 0000000..7f11605
--- /dev/null
+++ b/greetd-rhbz1891682.patch
@@ -0,0 +1,13 @@
+diff --git a/greetd/src/session/worker.rs b/greetd/src/session/worker.rs
+index 8b87ac8..00e44bb 100644
+--- a/greetd/src/session/worker.rs
++++ b/greetd/src/session/worker.rs
+@@ -211,7 +211,7 @@ fn worker(sock: &UnixDatagram) -> Result<(), Error> {
+ let cusername = CString::new(username)?;
+ let command = if source_profile {
+ format!(
+- "[ -f /etc/profile ] && . /etc/profile; [ -f $HOME/.profile ]
&& . $HOME/.profile; exec {}",
++ "unset BASH_VERSION; [ -f /etc/profile ] && . /etc/profile; [
-f $HOME/.profile ] && . $HOME/.profile; exec {}",
+ cmd.join(" ")
+ )
+ } else {
diff --git a/greetd.fc b/greetd.fc
new file mode 100644
index 0000000..6ccab51
--- /dev/null
+++ b/greetd.fc
@@ -0,0 +1,7 @@
+# SELinux file labels for greetd
+# vim: ts=8 noet
+/etc/greetd(/.*)? gen_context(system_u:object_r:xdm_etc_t,s0)
+/usr/bin/greetd -- gen_context(system_u:object_r:xdm_exec_t,s0)
+/var/lib/greetd(/.*)? gen_context(system_u:object_r:xdm_var_lib_t,s0)
+/var/run/greetd[^/]*\.sock -s gen_context(system_u:object_r:xdm_var_run_t,s0)
+/var/run/greetd\.run -- gen_context(system_u:object_r:xdm_var_run_t,s0)
diff --git a/greetd.pam b/greetd.pam
new file mode 100644
index 0000000..52df2fe
--- /dev/null
+++ b/greetd.pam
@@ -0,0 +1,23 @@
+#%PAM-1.0
+auth substack system-auth
+-auth optional pam_gnome_keyring.so
+-auth optional pam_kwallet5.so
+-auth optional pam_kwallet.so
+auth include postlogin
+
+account required pam_sepermit.so
+account required pam_nologin.so
+account include system-auth
+
+password include system-auth
+
+session required pam_selinux.so close
+session required pam_loginuid.so
+session required pam_selinux.so open
+session optional pam_keyinit.so force revoke
+session required pam_namespace.so
+session include system-auth
+-session optional pam_gnome_keyring.so auto_start
+-session optional pam_kwallet5.so auto_start
+-session optional pam_kwallet.so auto_start
+session include postlogin
diff --git a/greetd.spec b/greetd.spec
new file mode 100644
index 0000000..b55fac1
--- /dev/null
+++ b/greetd.spec
@@ -0,0 +1,207 @@
+%global doc_commit a00d582a
+%global username greetd
+%global selinuxtype targeted
+%global forgeurl
https://git.sr.ht/~kennylevinsen/greetd
+
+%bcond_without selinux
+
+Name: greetd
+Version: 0.8.0
+Release: 1%{?dist}
+Summary: A generic greeter daemon
+
+# Upstream license specification: GPL-3.0
+# ASL 2.0
+# ASL 2.0 or Boost
+# ASL 2.0 or MIT
+# GPLv3
+# MIT
+# MIT or ASL 2.0
+# Unlicense
+# Unlicense or MIT
+License: GPLv3 and ASL 2.0 and MIT and Unlicense
+URL:
https://kl.wtf/projects/greetd
+Source0: %{forgeurl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+# Better offline documentation file
+Source1:
%{forgeurl}-docs/blob/%{doc_commit}/index.md#/%{name}-docs-%{doc_commit}.md
+
+# SELinux file labels
+Source100: %{name}.fc
+# Pam configs for greeter and user sessions
+Source101: %{name}.pam
+Source102: %{name}-greeter.pam
+# User definition
+Source103: %{name}.sysusers
+
+# Update dependencies and unbundle greetd_ipc crate.
+Patch0: greetd-fix-metadata.diff
+# Fix unexpected sourcing of bashrc from /etc/profile
+Patch1: greetd-rhbz1891682.patch
+
+Provides: service(graphical-login) = greetd
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: make
+BuildRequires: rust-packaging
+BuildRequires: scdoc >= 1.10
+BuildRequires: sed
+BuildRequires: systemd-rpm-macros
+
+%if %{with selinux}
+# This ensures that the *-selinux package and all it’s dependencies are not pulled
+# into containers and other systems that do not use SELinux
+Requires: (%{name}-selinux = %{version}-%{release} if
selinux-policy-%{selinuxtype})
+%endif
+
+%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.
+
+
+%if %{with selinux}
+# SELinux subpackage
+%package selinux
+Summary: %{name} SELinux policy
+BuildArch: noarch
+Requires: selinux-policy-%{selinuxtype}
+Requires(post): selinux-policy-%{selinuxtype}
+BuildRequires: selinux-policy-devel
+%{?selinux_requires}
+
+%description selinux
+Custom SELinux policy module for %{name}
+%endif
+
+%prep
+%autosetup -p1
+%cargo_prep
+# patch greetd daemon user
+sed -i 's/"greeter"/"%{username}"/' config.toml
+# replace README with a better documentation file
+cp %{SOURCE1} README.md
+
+
+%generate_buildrequires
+# HACK
+for dir in inish greetd agreety fakegreet; do
+ cd $dir
+ sed -i.br -e '/path/d' Cargo.toml
+ %cargo_generate_buildrequires
+ mv -f Cargo.toml{.br,}
+ cd - >/dev/null
+done
+
+
+%build
+%cargo_build
+%make_build -C man
+
+%if %{with selinux}
+# SELinux policy
+mkdir selinux
+pushd selinux
+# generate the type enforcement file as it has no other content
+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
+%endif
+
+
+%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}%{_sysconfdir}/pam.d/%{name}
+install -D -m644 -vp %{SOURCE102} %{buildroot}%{_sysconfdir}/pam.d/%{name}-greeter
+install -D -m644 -vp %{SOURCE103} %{buildroot}%{_sysusersdir}/%{name}.conf
+install -d -m750 -vp %{buildroot}%{_sharedstatedir}/%{name}
+
+
+%if %{with selinux}
+install -D -m 0644 -vp selinux/%{name}.pp.bz2 \
+ %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
+%endif
+
+
+%pre
+%sysusers_create_compat %{SOURCE103}
+
+%post
+%systemd_post %{name}.service
+# block unwanted systemd user services for greetd user
+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
+
+%if %{with selinux}
+%pre selinux
+# SELinux contexts are saved so that only affected files can be
+# relabeled after the policy module installation
+%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
+%endif
+
+
+%files
+%license LICENSE
+%doc README.md
+%attr(-,%{username},%{username}) %dir %{_sharedstatedir}/%{name}
+%dir %{_sysconfdir}/%{name}
+%config(noreplace) %{_sysconfdir}/%{name}/config.toml
+%config(noreplace) %{_sysconfdir}/pam.d/%{name}
+%config(noreplace) %{_sysconfdir}/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
+%{_unitdir}/%{name}.service
+
+%files fakegreet
+%license LICENSE
+%{_bindir}/fakegreet
+
+%if %{with selinux}
+%files selinux
+%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.*
+%ghost %verify(not md5 size mtime)
%{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name}
+%endif
+
+%changelog
+* Tue May 03 2022 Aleksei Bavshin <alebastr(a)fedoraproject.org> - 0.8.0-1
+- Initial import (#2052407)
diff --git a/greetd.sysusers b/greetd.sysusers
new file mode 100644
index 0000000..1022001
--- /dev/null
+++ b/greetd.sysusers
@@ -0,0 +1,2 @@
+#Type Name ID GECOS Home directory Shell
+u greetd - "greetd daemon" /var/lib/greetd /sbin/nologin
diff --git a/sources b/sources
new file mode 100644
index 0000000..66e6ab1
--- /dev/null
+++ b/sources
@@ -0,0 +1,2 @@
+SHA512 (greetd-0.8.0.tar.gz) =
40f007e38ca41faac97b3faba60e49d524c9e3afb4b594fcbc04a129701fa6177a915b2998e61f0ca615f4c8bd3078ef9fbd562c8fb72298f5605efd75a3f370
+SHA512 (greetd-docs-a00d582a.md) =
3535e6efd396d5e8c48476ef0bdf9f8b200dcfb516571e433bfb6baee4035ea360589e0b5bbbda8f303fa6185d22585133555e9064cbf3920834ae227dc4b186