diff --git a/.gitignore b/.gitignore index 6d9fa13..d1969b6 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ lxdm-0.2.0.tar.gz /lxdm-0.5.3-D20160103gitc6836939.tar.bz2 /lxdm-0.5.3-D20160321git72812894.tar.bz2 /lxdm-0.5.3-D20161111gita548c73e.tar.bz2 +/lxdm-0.5.3-D20220831git2d4ba970.tar.bz2 diff --git a/create-tarball-from-git.sh b/create-tarball-from-git.sh index d2cf409..845a4c2 100644 --- a/create-tarball-from-git.sh +++ b/create-tarball-from-git.sh @@ -8,9 +8,10 @@ CURRENTDIR=$(pwd) TMPDIR=$(mktemp -d /var/tmp/lxdm-XXXXXX) pushd $TMPDIR -GITSCM=git://git.lxde.org/lxde/lxdm.git +#GITSCM=git://git.lxde.org/lxde/lxdm.git +GITSCM=https://git.code.sf.net/p/lxdm/code -git clone $GITSCM +git clone $GITSCM lxdm pushd lxdm COMMIT=$(git log | head -n 1 | sed -e 's|^.*[ \t]||') diff --git a/lxdm-0.5.3-path-usrmove.patch b/lxdm-0.5.3-path-usrmove.patch new file mode 100644 index 0000000..635aa27 --- /dev/null +++ b/lxdm-0.5.3-path-usrmove.patch @@ -0,0 +1,11 @@ +--- lxdm-0.5.3-D20220831git2d4ba970/src/lxdm.c.usrmove 2022-09-11 14:38:34.000000000 +0900 ++++ lxdm-0.5.3-D20220831git2d4ba970/src/lxdm.c 2024-08-26 05:36:58.788395189 +0900 +@@ -1482,7 +1482,7 @@ void lxdm_do_login(struct passwd *pw, ch + if( G_UNLIKELY(path) && path[0] ) /* if PATH is specified in config file */ + env=g_environ_setenv(env, "PATH", path, TRUE); /* override current $PATH with config value */ + else /* don't use the global env, they are bad for user */ +- env=g_environ_setenv(env, "PATH", "/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin", TRUE); /* set proper default */ ++ env=g_environ_setenv(env, "PATH", "/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin", TRUE); /* set proper default */ + g_free(path); + /* optionally override $LANG, $LC_MESSAGES, and $LANGUAGE */ + if( lang && lang[0] ) diff --git a/lxdm.spec b/lxdm.spec index 8a986de..ea4d43c 100644 --- a/lxdm.spec +++ b/lxdm.spec @@ -5,22 +5,39 @@ %global git_snapshot 1 %if 0%{?git_snapshot} -%global git_rev a548c73e35d62ec334df5cd3a491ee409d0067bd -%global git_date 20161111 +%global git_rev 2d4ba970e9bf97ec7d9c2730c940cabc58c54d27 +%global git_date 20220831 %global git_short %(echo %{git_rev} | cut -c-8) -%global git_version D%{git_date}git%{git_short} +%global git_version %{git_date}git%{git_short} %endif +%global main_version 0.5.3 +%global use_lxdm_user 0 +%if 0%{?fedora} >= 42 +%global use_lxdm_user 1 +%endif + +%if %{use_lxdm_user} +%global tempfiles_user lxdm +%else +%global tempfiles_user root +%endif + + Name: lxdm -Version: 0.5.3 -Release: 17%{?git_version:.%{?git_version}}%{?dist} +Version: %{main_version}%{?git_version:^%{?git_version}} +Release: 13%{?dist} Summary: Lightweight X11 Display Manager -License: GPLv2+ and LGPLv2+ +# src/*.c GPL-3.0-or-later +# src/gdm/ GPL-2.0-or-later AND LGPL-2.1-or-later +# src/greeter.c GPL-2.0-or-later +# SPDX confirmed +License: GPL-3.0-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later URL: http://lxde.org %if 0%{?git_snapshot} -Source0: %{name}-%{version}-%{?git_version}.tar.bz2 +Source0: %{name}-%{main_version}-D%{?git_version}.tar.bz2 %else Source0: http://downloads.sourceforge.net/sourceforge/lxdm/%{name}-%{version}.tar.xz %endif @@ -29,7 +46,11 @@ Source0: http://downloads.sourceforge.net/sourceforge/lxdm/%{name}-%{vers Source1: lxdm.service Source2: lxdm.preset +# The default contents of /var/lib/lxdm/lxdm.conf (c.f. lxdm.c:lxdm_save_login) +Source5: lxdm_conf_login + # Fedora pam setting +# F-39: remove pam_console.so (bug 1822227, bug 2166692) Source10: pam.lxdm # Shell script to create tarball from git scm @@ -42,9 +63,12 @@ Source100: create-tarball-from-git.sh # Distro artwork, start on vt1 Patch50: lxdm-0.4.1-config.patch Patch60: lxdm-0.5.1-ssh-agent-on-start.patch +# Remove /bin, /sbin from PATH with usrmove +Patch61: lxdm-0.5.3-path-usrmove.patch -BuildRequires: pkgconfig(gtk+-2.0) >= 2.12.0 +BuildRequires: make +BuildRequires: pkgconfig(gtk+-3.0) >= 3.4.0 BuildRequires: pkgconfig(iso-codes) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(glib-2.0) @@ -59,14 +83,26 @@ Requires: pam Requires: /sbin/shutdown Requires: desktop-backgrounds-compat Requires: %{_bindir}/ssh-agent +# Loading jpegxl format img requires the below +%if 0%{?fedora} >= 42 +%if 0%{?fedora} >= 43 +Requires: gdk-pixbuf2%{?_isa} >= 2.44 +%else +Requires: jxl-pixbuf-loader%{?_isa} +%endif +%endif # needed for anaconda to boot into runlevel 5 after install Provides: service(graphical-login) = lxdm -%if 0%{?fedora} >= 18 BuildRequires: systemd Requires(post): systemd Requires(preun): systemd Requires(postun): systemd + +%if %{use_lxdm_user} +%if 0%{?fedora} <= 43 +Requires(pre): shadow-utils +%endif %endif @@ -77,28 +113,48 @@ KDM in LXDE distros. It's still in very early stage of development. %prep -%setup -q %{?git_version:-n %{name}-%{version}-%{?git_version}} +%setup -q %{?git_version:-n %{name}-%{main_version}-D%{?git_version}} -%patch50 -p1 -b .config -%patch60 -p1 -b .ssh_agent +%patch -P50 -p1 -b .config +%patch -P60 -p1 -b .ssh_agent +%patch -P61 -p1 -b .usemove +# Reset X after logout (bug 1269917) sed -i.reset data/lxdm.conf.in \ -e '\@reset@s|^.*$|reset=1|' +# Fedora 42 changed default background file format +%if 0%{?fedora} >= 42 +sed -i.f42 data/lxdm.conf.in \ + -e '\@bg=@s|default.png|default.jxl|' +%endif -install -cpm 644 %{SOURCE10} pam/lxdm +install -cpm 644 \ + %{SOURCE10} \ + pam/lxdm cat << EOF > tempfiles.lxdm.conf -d /run/%{name} 0755 root root +d /run/%{name} 0755 %{tempfiles_user} %{tempfiles_user} +d %{_localstatedir}/lib/%{name} 0755 %{tempfiles_user} %{tempfiles_user} EOF %build +# Add ACLOCAL_PATH for gettext 0.25 (ref: bug 2366708) +export ACLOCAL_PATH=%{_datadir}/gettext/m4/ %{?git_version:sh autogen.sh} %configure \ + --enable-gtk3 \ --disable-silent-rules \ --disable-consolekit \ %{nil} make %{?_smp_mflags} +%if %{use_lxdm_user} +cat > %{name}.sysusers.conf <= 15 install -Dpm 644 tempfiles.lxdm.conf %{buildroot}%{_prefix}/lib/tmpfiles.d/lxdm.conf -%endif -%if 0%{?fedora} >= 18 install -Dpm 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service install -m644 -p -D %{SOURCE2} %{buildroot}%{_unitdir}-preset/83-fedora-lxdm.preset +%if %{use_lxdm_user} +install -Dpm 644 %{name}.sysusers.conf %{buildroot}%{_sysusersdir}/%{name}.conf %endif +%pre +%if %{use_lxdm_user} +%if 0%{?fedora} <= 43 +getent group %{tempfiles_user} &>/dev/null || \ + %{_sbindir}/groupadd -r %{tempfiles_user} +getent passwd %{tempfiles_user} &> /dev/null || \ + %{_sbindir}/useradd \ + -c 'LXDM daemon' \ + -g %{tempfiles_user} \ + -d %{_localstatedir}/lib/%{name} \ + -r \ + -s /sbin/nologin \ + %{tempfiles_user} 2>/dev/null +%endif +%endif +exit 0 -%if 0%{?fedora} >= 18 %post %systemd_post %{name}.service - %preun %systemd_preun %{name}.service - %postun -%if 0%{?fedora} >= 31 %systemd_postun %{name}.service -%else -%systemd_postun -%endif -%endif %files -f %{name}.lang # FIXME add ChangeLog and NEWS if not empty -%doc AUTHORS COPYING README TODO gpl-2.0.txt lgpl-2.1.txt +%doc AUTHORS +%license COPYING +%doc README TODO +%license gpl-2.0.txt +%license lgpl-2.1.txt + %dir %{_sysconfdir}/%{name} %ghost %config(noreplace,missingok) %{_sysconfdir}/%{name}/xinitrc %config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/Xsession @@ -149,8 +217,11 @@ install -m644 -p -D %{SOURCE2} %{buildroot}%{_unitdir}-preset/83-fedora-lxdm.pre %config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PreLogin %config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PreReboot %config(noreplace) %attr(755,root,root) %{_sysconfdir}/%{name}/PreShutdown -%config %{_sysconfdir}/%{name}/lxdm.conf +%config %attr(640,%{tempfiles_user},%{tempfiles_user}) %{_sysconfdir}/%{name}/lxdm.conf %config(noreplace) %{_sysconfdir}/pam.d/%{name} +%if %{use_lxdm_user} +%{_sysusersdir}/%{name}.conf +%endif %{_bindir}/%{name}-config %{_sbindir}/%{name} @@ -159,24 +230,98 @@ install -m644 -p -D %{SOURCE2} %{buildroot}%{_unitdir}-preset/83-fedora-lxdm.pre %{_libexecdir}/lxdm-greeter-gdk %{_libexecdir}/lxdm-numlock %{_libexecdir}/lxdm-session -%{_datadir}/%{name}/ -%if 0%{?fedora} >= 15 -%config(noreplace) %{_prefix}/lib/tmpfiles.d/lxdm.conf -%endif +%dir %{_datadir}/%{name}/ +%{_datadir}/%{name}/config.ui +%{_datadir}/%{name}/lxdm.glade +%{_datadir}/%{name}/themes/ + +%{_tmpfilesdir}/lxdm.conf +%dir %attr(-,%{tempfiles_user},%{tempfiles_user}) /run/%{name} -%if 0%{?fedora} >= 18 %{_unitdir}/lxdm.service %{_unitdir}-preset/83-fedora-lxdm.preset -%endif -%ghost %dir /run/%{name} - -%dir %{_localstatedir}/lib/%{name} -%ghost %{_localstatedir}/lib/%{name}.conf +%dir %attr(-,%{tempfiles_user},%{tempfiles_user}) %{_localstatedir}/lib/%{name} +%config(noreplace) %verify(not md5 size mtime) %attr(-,%{tempfiles_user},%{tempfiles_user}) %{_localstatedir}/lib/%{name}/%{name}.conf %changelog +* Fri Sep 12 2025 Mamoru TASAKA - 0.5.3^20220831git2d4ba970-13 +- F-43+: update loader dependency for gdk-pixbuf2 changes + +* Thu Jul 24 2025 Fedora Release Engineering - 0.5.3^20220831git2d4ba970-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Mon May 26 2025 Mamoru TASAKA - 0.5.3^20220831git2d4ba970-11 +- Add ACLOCAL_PATH for gettext 0.25 (ref: bug 2366708) + +* Fri Mar 07 2025 Mamoru TASAKA - 0.5.3^20220831git2d4ba970-10 +- F42+: Add old style pre scriptlet for LXDM user creation so as to make it work + when upgrading from F41 + +* Mon Feb 17 2025 Mamoru TASAKA - 0.5.3^20220831git2d4ba970-9 +- F42+: Create lxdm user for greeter process, and make lxdm user own needed directories + +* Fri Feb 14 2025 Mamoru TASAKA - 0.5.3^20220831git2d4ba970-8 +- F42 switches default background from png to jxl +- Require jpegxl gdk-pixbuf loader + +* Fri Jan 17 2025 Fedora Release Engineering - 0.5.3^20220831git2d4ba970-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Sun Aug 25 2024 Mamoru TASAKA - 0.5.3^20220831git2d4ba970-5 +- Remove deprecated PATH with usrmove (bug 2276996) + +* Thu Jul 18 2024 Fedora Release Engineering - 0.5.3^20220831git2d4ba970-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 0.5.3^20220831git2d4ba970-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 0.5.3^20220831git2d4ba970-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Dec 15 2023 Mamoru TASAKA - 0.5.3^20220831git2d4ba970-1 +- LXDM migration +- Change EVR scheme to use hat + +* Thu Jul 20 2023 Fedora Release Engineering - 0.5.3-27.D20220831git2d4ba970 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Mar 2 2023 Mamoru TASAKA - 0.5.3-26.D20220831git2d4ba970 +- F-39 (and above): remove pam_console.so (bug 1822227, bug 2166692) + +* Wed Feb 15 2023 Mamoru TASAKA - 0.5.3-25.D20220831git2d4ba970 +- F-38 is using default.png, not .webp, reflect this + +* Thu Jan 19 2023 Fedora Release Engineering - 0.5.3-24.D20220831git2d4ba970 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Sep 29 2022 Mamoru TASAKA - 0.5.3-23.D20220831git2d4ba970 +- Update for tmpfiles.d guideline - config file is not %%config +- Fix up %%{_localstatedir}/lib/%%{name}/%%{name}.conf entry + and mark as %%config, not %%ghost, install default file +- More verbose entry under %%{_datadir}/%%{name}/ +- F-37: update default background image +- F-37: loading webp img requires webp-pixbuf-loader + +* Sun Sep 11 2022 Mamoru TASAKA - 0.5.3-22.D20220831git2d4ba970 +- Update to the latest git (20220831) +- Switch to GTK3 + +* Thu Jul 21 2022 Fedora Release Engineering - 0.5.3-21.D20161111gita548c73e +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 0.5.3-20.D20161111gita548c73e +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 0.5.3-19.D20161111gita548c73e +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 0.5.3-18.D20161111gita548c73e +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Aug 12 2020 Mamoru TASAKA - 0.5.3-17.D20161111gita548c73e - Use /run instead of %%_localstatedir/run (bug 1775734) diff --git a/lxdm_conf_login b/lxdm_conf_login new file mode 100644 index 0000000..81dc83d --- /dev/null +++ b/lxdm_conf_login @@ -0,0 +1,3 @@ +[base] +last_session=__default__ +last_lang= diff --git a/pam.lxdm b/pam.lxdm index 7bbc7fe..e7950be 100644 --- a/pam.lxdm +++ b/pam.lxdm @@ -10,7 +10,6 @@ account include system-auth password include system-auth session required pam_selinux.so close session required pam_loginuid.so -session optional pam_console.so session required pam_selinux.so open session optional pam_keyinit.so force revoke session required pam_namespace.so diff --git a/sources b/sources index a5a6bb8..9fc3b55 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bdfad162a2512ee837a297bd970cd16d lxdm-0.5.3-D20161111gita548c73e.tar.bz2 +SHA512 (lxdm-0.5.3-D20220831git2d4ba970.tar.bz2) = 61f4b3e33959a8de9f06926c677e2a8b4cd2a23df156e23fc2c0feb49dd8758887c43f44682fd15f2a98c6a554061b3dd2f94a78731c4b239cae342dbef4f9b3