diff --git a/10027-fix-compilation-without-utmp.patch b/10027-fix-compilation-without-utmp.patch new file mode 100644 index 0000000000000000000000000000000000000000..4526be32ed57162b06911219f96a0452ca4063d8 --- /dev/null +++ b/10027-fix-compilation-without-utmp.patch @@ -0,0 +1,24 @@ +From 813c9418ca8f6eabd179feace3f115b874e6a1a6 Mon Sep 17 00:00:00 2001 +From: Steven Allen +Date: Wed, 7 Nov 2018 07:44:36 -0800 +Subject: [PATCH] fix compilation without utmp + +--- + src/login/logind-core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/login/logind-core.c b/src/login/logind-core.c +index abe6eec..519abf5 100644 +--- a/src/login/logind-core.c ++++ b/src/login/logind-core.c +@@ -779,7 +779,7 @@ int manager_read_utmp(Manager *m) { + endutxent(); + return r; + #else +- return 0 ++ return 0; + #endif + } + +-- +2.39.3 diff --git a/91000-analyze-show-information-from-hostnamed-in-plot-even.patch b/91000-analyze-show-information-from-hostnamed-in-plot-even.patch new file mode 100644 index 0000000000000000000000000000000000000000..272abeca53af5615e73f8b6184e952c6f7c36e22 --- /dev/null +++ b/91000-analyze-show-information-from-hostnamed-in-plot-even.patch @@ -0,0 +1,101 @@ +From af0841e9fc99fbab958a53fc43424ada6b9a19ad Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Sun, 22 Jul 2018 14:33:31 +0900 +Subject: [PATCH] analyze: show information from hostnamed in plot even when + user mode + +(cherry-picked from upstream 4f481d76fcbb72fc91789a464cd2b75f0bd47e20) + +This will resolve the following issue after systemd-hostnamed is +disabled: + +``` +[root@localhost ~]# systemd-analyze plot +Failed to get host information from systemd: The name org.freedesktop.hostname1 was not provided by any .service files +``` + +Signed-off-by: Yuanhong Peng +--- + src/analyze/analyze.c | 28 ++++++++++++++++++++-------- + 1 file changed, 20 insertions(+), 8 deletions(-) + +diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c +index c30a133..1ae096d 100644 +--- a/src/analyze/analyze.c ++++ b/src/analyze/analyze.c +@@ -448,6 +448,7 @@ static int acquire_host_info(sd_bus *bus, struct host_info **hi) { + }; + + _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; ++ _cleanup_(sd_bus_flush_close_unrefp) sd_bus *system_bus = NULL; + _cleanup_(free_host_infop) struct host_info *host; + int r; + +@@ -455,7 +456,15 @@ static int acquire_host_info(sd_bus *bus, struct host_info **hi) { + if (!host) + return log_oom(); + +- r = bus_map_all_properties(bus, ++ if (arg_scope != UNIT_FILE_SYSTEM) { ++ r = bus_connect_transport(arg_transport, arg_host, false, &system_bus); ++ if (r < 0) { ++ log_debug_errno(r, "Failed to connect to system bus, ignoring: %m"); ++ goto manager; ++ } ++ } ++ ++ r = bus_map_all_properties(system_bus ?: bus, + "org.freedesktop.hostname1", + "/org/freedesktop/hostname1", + hostname_map, +@@ -463,9 +472,12 @@ static int acquire_host_info(sd_bus *bus, struct host_info **hi) { + &error, + NULL, + host); +- if (r < 0) +- log_debug_errno(r, "Failed to get host information from systemd-hostnamed: %s", bus_error_message(&error, r)); ++ if (r < 0) { ++ log_debug_errno(r, "Failed to get host information from systemd-hostnamed, ignoring: %s", bus_error_message(&error, r)); ++ sd_bus_error_free(&error); ++ } + ++manager: + r = bus_map_all_properties(bus, + "org.freedesktop.systemd1", + "/org/freedesktop/systemd1", +@@ -584,12 +596,12 @@ static int analyze_plot(int argc, char *argv[], void *userdata) { + _cleanup_(free_host_infop) struct host_info *host = NULL; + _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL; + _cleanup_(unit_times_freep) struct unit_times *times = NULL; ++ _cleanup_free_ char *pretty_times = NULL; ++ bool use_full_bus = arg_scope == UNIT_FILE_SYSTEM; + struct boot_times *boot; ++ struct unit_times *u; + int n, m = 1, y = 0, r; +- bool use_full_bus = true; + double width; +- _cleanup_free_ char *pretty_times = NULL; +- struct unit_times *u; + + r = acquire_bus(&bus, &use_full_bus); + if (r < 0) +@@ -603,7 +615,7 @@ static int analyze_plot(int argc, char *argv[], void *userdata) { + if (n < 0) + return n; + +- if (use_full_bus) { ++ if (use_full_bus || arg_scope != UNIT_FILE_SYSTEM) { + n = acquire_host_info(bus, &host); + if (n < 0) + return n; +@@ -705,7 +717,7 @@ static int analyze_plot(int argc, char *argv[], void *userdata) { + + svg("\n"); + svg("%s", pretty_times); +- if (use_full_bus) ++ if (host) + svg("%s %s (%s %s %s) %s %s", + isempty(host->os_pretty_name) ? "Linux" : host->os_pretty_name, + strempty(host->hostname), +-- +2.18.1 \ No newline at end of file diff --git a/92000-meson-Make-logind-a-requirement-of-user-runtime-dir.patch b/92000-meson-Make-logind-a-requirement-of-user-runtime-dir.patch new file mode 100644 index 0000000000000000000000000000000000000000..16bea35ef4e80bd93cd6a3b642f02b7a5ad3eec7 --- /dev/null +++ b/92000-meson-Make-logind-a-requirement-of-user-runtime-dir.patch @@ -0,0 +1,44 @@ +From b7da107bc80d65ebf6a1e6838f780f756f2fb25c Mon Sep 17 00:00:00 2001 +From: Yuanhong Peng +Date: Fri, 26 Feb 2021 19:20:48 +0800 +Subject: [PATCH] meson: Make logind a requirement of user-runtime-dir + +Partly cherry-picked from upstream 07ee5adb. Since we don't +enable logind in LifseaOS, this is the simplest way to cut +off the user-runtime-dir binary and service file. + +Signed-off-by: Yuanhong Peng +--- + meson.build | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/meson.build b/meson.build +index cf6990a..fd47e75 100644 +--- a/meson.build ++++ b/meson.build +@@ -1735,15 +1735,15 @@ if conf.get('ENABLE_LOGIND') == 1 + test_dlopen, + args : [pam_systemd.full_path()]) # path to dlopen must include a slash + endif +-endif + +-executable('systemd-user-runtime-dir', +- user_runtime_dir_sources, +- include_directories : includes, +- link_with : [libshared, liblogind_core], +- install_rpath : rootlibexecdir, +- install : true, +- install_dir : rootlibexecdir) ++ executable('systemd-user-runtime-dir', ++ user_runtime_dir_sources, ++ include_directories : includes, ++ link_with : [libshared, liblogind_core], ++ install_rpath : rootlibexecdir, ++ install : true, ++ install_dir : rootlibexecdir) ++endif + + if conf.get('HAVE_PAM') == 1 + executable('systemd-user-sessions', +-- +2.18.1 \ No newline at end of file diff --git a/92001-shared-Remove-dependency-of-libcryptsetup-if-HAVE_LI.patch b/92001-shared-Remove-dependency-of-libcryptsetup-if-HAVE_LI.patch new file mode 100644 index 0000000000000000000000000000000000000000..433c6119d72be50f2c98b31146afbf0791034dae --- /dev/null +++ b/92001-shared-Remove-dependency-of-libcryptsetup-if-HAVE_LI.patch @@ -0,0 +1,40 @@ +From afaeb794b5ecf2772765f4a92e92f9be831ef1ea Mon Sep 17 00:00:00 2001 +From: Yuanhong Peng +Date: Fri, 26 Mar 2021 10:37:15 +0800 +Subject: [PATCH] shared: Remove dependency of libcryptsetup if + HAVE_LIBCRYPTSETUP is not defined + +We do not enable libcryptsetup in configuration, so this dependency is +fake. Remove dependency of libcryptsetup will reduce more than ten +dependencies of libsystemd-shared-239.so. + +Signed-off-by: Yuanhong Peng +--- + src/shared/meson.build | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/shared/meson.build b/src/shared/meson.build +index d0a1bba..e492ce9 100644 +--- a/src/shared/meson.build ++++ b/src/shared/meson.build +@@ -131,7 +131,6 @@ libshared_deps = [threads, + librt, + libcap, + libacl, +- libcryptsetup, + libgcrypt, + libiptc, + libseccomp, +@@ -141,6 +140,10 @@ libshared_deps = [threads, + liblz4, + libblkid] + ++if conf.get('HAVE_LIBCRYPTSETUP') == 1 ++ libshared_deps += [libcryptsetup] ++endif ++ + libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir()) + + libshared_static = static_library( +-- +2.18.1 \ No newline at end of file diff --git a/92002-Do-not-remove-cgroup-path-which-not-created-by-syst.patch b/92002-Do-not-remove-cgroup-path-which-not-created-by-syst.patch new file mode 100644 index 0000000000000000000000000000000000000000..aec1813c0913bb2bea20471124bda0b97a69c310 --- /dev/null +++ b/92002-Do-not-remove-cgroup-path-which-not-created-by-syst.patch @@ -0,0 +1,31 @@ +From 327dab8117c7b478a928387b4384ae7815ad4f06 Mon Sep 17 00:00:00 2001 +From: Yuanhong Peng +Date: Wed, 22 Nov 2023 17:03:33 +0800 +Subject: [PATCH] Do not remove cgroup path which not created by systemd + +It's a workaround for #52520469 + +Details in https://issues.redhat.com/browse/RHEL-16781 + +Signed-off-by: Yuanhong Peng +--- + src/basic/cgroup-util.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c +index 14abe6e..5c87a7a 100644 +--- a/src/basic/cgroup-util.c ++++ b/src/basic/cgroup-util.c +@@ -719,6 +719,10 @@ static int trim_cb(const char *path, const struct stat *sb, int typeflag, struct + if (ftwbuf->level < 1) + return 0; + ++ // workaround: do not remove cgroup path which not created by systemd ++ if (!strstr(path, ".slice/") && !strstr(path, ".service/")) ++ return 0; ++ + (void) rmdir(path); + return 0; + } +-- +2.39.3 \ No newline at end of file diff --git a/systemd.spec b/systemd.spec index b937b145f59bf42ebcb5fddfa8b7a54e9accd9a5..0ef8e1c585ad13e98ab3d7ceb605ccf44ac61ad1 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.2 +%define anolis_release .0.3 #global gitcommit 10e465b5321bd53c1fc59ffab27e724535c6bc0f %{?gitcommit:%global gitcommitshort %(c=%{gitcommit}; echo ${c:0:7})} @@ -14,7 +14,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 239 -Release: 78%{anolis_release}%{?dist} +Release: 78%{anolis_release}%{?dist}%{?lifsea_dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -41,7 +41,9 @@ Source8: systemd-journal-gatewayd.xml Source9: 20-yama-ptrace.conf Source10: systemd-udev-trigger-no-reload.conf Source11: 20-grubby.install +%if ! %{defined lifsea_dist} Source12: systemd-user +%endif Source13: rc.local %if 0 @@ -1057,12 +1059,21 @@ Patch10023: 10023-fileio-beef-up-READ_FULL_FILE_CONNECT_SOCKET-to-all.patch Patch10024: 10024-fileio-teach-read_full_file_full-to-read-from-offse.patch Patch10025: 10025-cryptsetup-port-cryptsetup-s-main-key-file-logic-ov.patch Patch10026: 10026-umount-check-LO_FLAGS_AUTOCLEAR-after-LOOP_CLR_FD-cl.patch +Patch10027: 10027-fix-compilation-without-utmp.patch Patch20001: 20001-hwdb-parse_hwdb_dot_py.patch Patch20002: 20002-cgroup-do-not-refresh-cgroup-devices-config-when-dae.patch Patch20003: 20003-core-introduce-cgroup-full-delegation-for-compabilit.patch Patch20004: 20004-Update-vendor-ids-for-ieisystem-0750.patch +# lifsea only patch +%if %{defined lifsea_dist} +Patch91000: 91000-analyze-show-information-from-hostnamed-in-plot-even.patch +Patch92000: 92000-meson-Make-logind-a-requirement-of-user-runtime-dir.patch +Patch92001: 92001-shared-Remove-dependency-of-libcryptsetup-if-HAVE_LI.patch +Patch92002: 92002-Do-not-remove-cgroup-path-which-not-created-by-syst.patch +%endif + %ifarch %{ix86} x86_64 aarch64 %global have_gnu_efi 1 %endif @@ -1071,7 +1082,8 @@ BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libcap-devel BuildRequires: libmount-devel -BuildRequires: pam-devel +%{!?lifsea_dist:BuildRequires: pam-devel} +%{?lifsea_dist:BuildRequires: acl} BuildRequires: libselinux-devel BuildRequires: audit-libs-devel BuildRequires: cryptsetup-devel @@ -1112,15 +1124,19 @@ BuildRequires: gettext Requires(post): coreutils Requires(post): sed -Requires(post): acl +%{!?lifsea_dist:Requires(post): acl} Requires(post): grep # systemd-machine-id-setup requires libssl Requires(post): openssl-libs Requires(pre): coreutils Requires(pre): /usr/bin/getent Requires(pre): /usr/sbin/groupadd +%if ! %{defined lifsea_dist} Requires: dbus >= 1.9.18 Requires: %{name}-pam = %{version}-%{release} +%else +Recommends: dbus >= 1.9.18 +%endif Requires: %{name}-libs = %{version}-%{release} Recommends: diffutils Requires: util-linux @@ -1164,9 +1180,11 @@ Obsoletes: libudev < 183 Obsoletes: systemd < 185-4 Conflicts: systemd < 185-4 Obsoletes: systemd-compat-libs < 230 +%if ! %{defined lifsea_dist} Obsoletes: nss-myhostname < 0.4 Provides: nss-myhostname = 0.4 Provides: nss-myhostname%{_isa} = 0.4 +%endif Requires(post): coreutils Requires(post): sed Requires(post): grep @@ -1175,12 +1193,14 @@ Requires(post): /usr/bin/getent %description libs Libraries for systemd and udev. +%if ! %{defined lifsea_dist} %package pam Summary: systemd PAM module Requires: %{name} = %{version}-%{release} %description pam Systemd PAM module registers the session with systemd-logind. +%endif %package devel Summary: Development headers for systemd @@ -1189,8 +1209,10 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} Provides: libudev-devel = %{version} Provides: libudev-devel%{_isa} = %{version} Obsoletes: libudev-devel < 183 +%if ! %{defined lifsea_dist} # Fake dependency to make sure systemd-pam is pulled into multilib (#1414153) Requires: %{name}-pam = %{version}-%{release} +%endif %description devel Development headers and auxiliary files for developing applications linking @@ -1265,8 +1287,15 @@ License: LGPLv2+ "Installed tests" that are usually run as part of the build system. They can be useful to test systemd internals. +# To avoid users installing the LifseaOS package in other os +%define common_pre_scripts() \ +if ! grep -q 'ID="lifsea"' /etc/os-release; then \ + echo "This package is only for LifseaOS!" \ + exit 1 \ +fi + %prep -%autosetup %{?gitcommit:-n %{name}-%{gitcommit}} -S git_am +%autosetup %{?gitcommit:-n %{name}-%{gitcommit}}%{?lifsea_dist: -n %{name}-%{version}} -S git_am %build %define ntpvendor %(source /etc/os-release; echo ${ID}) @@ -1279,35 +1308,34 @@ CONFIGURE_OPTS=( -Ddns-servers='' -Ddev-kvm-mode=0666 -Dkmod=true - -Dxkbcommon=true + -Dxkbcommon=%{!?lifsea_dist:true}%{?lifsea_dist:false} -Dblkid=true -Dseccomp=true -Dima=true -Dselinux=true -Dapparmor=false - -Dpolkit=true - -Dxz=true - -Dzlib=true - -Dbzip2=true - -Dlz4=true - -Dpam=true + -Dpolkit=%{!?lifsea_dist:true}%{?lifsea_dist:false} + -Dxz=%{!?lifsea_dist:true}%{?lifsea_dist:false} + -Dzlib=%{!?lifsea_dist:true}%{?lifsea_dist:false} + -Dbzip2=%{!?lifsea_dist:true}%{?lifsea_dist:false} + -Dlz4=%{!?lifsea_dist:true}%{?lifsea_dist:false} + -Dpam=%{!?lifsea_dist:true}%{?lifsea_dist:false} -Dacl=true - -Dsmack=true + -Dsmack=%{!?lifsea_dist:true}%{?lifsea_dist:false} -Dgcrypt=true - -Daudit=true - -Delfutils=true - -Dlibcryptsetup=true - -Delfutils=true + -Daudit=%{!?lifsea_dist:true}%{?lifsea_dist:false} + -Delfutils=%{!?lifsea_dist:true}%{?lifsea_dist:false} + -Dlibcryptsetup=%{!?lifsea_dist:true}%{?lifsea_dist:false} -Dqrencode=false - -Dgnutls=true - -Dmicrohttpd=true - -Dlibidn2=true + -Dgnutls=%{!?lifsea_dist:true}%{?lifsea_dist:false} + -Dmicrohttpd=%{!?lifsea_dist:true}%{?lifsea_dist:false} + -Dlibidn2=%{!?lifsea_dist:true}%{?lifsea_dist:false} -Dlibiptc=false - -Dlibcurl=true - -Defi=true - -Dgnu-efi=%{?have_gnu_efi:true}%{?!have_gnu_efi:false} - -Dtpm=true - -Dhwdb=true + -Dlibcurl=%{!?lifsea_dist:true}%{?lifsea_dist:false} + -Defi=%{!?lifsea_dist:true}%{?lifsea_dist:false} + %{!?lifsea_dist:-Dgnu-efi=%{?have_gnu_efi:true}%{?!have_gnu_efi:false}} + -Dtpm=%{!?lifsea_dist:true}%{?lifsea_dist:false} + -Dhwdb=%{!?lifsea_dist:true}%{?lifsea_dist:false} -Dsysusers=true -Ddefault-kill-user-processes=false -Dtests=unsafe @@ -1323,6 +1351,36 @@ CONFIGURE_OPTS=( -Dtimesyncd=false -Ddefault-hierarchy=legacy -Dversion-tag=%{version}-%{release} + %if %{defined lifsea_dist} + # remove many useless tools + -Dtimedated=true + -Dman=false + -Dhtml=false + -Dzshcompletiondir=no + -Dbashcompletiondir=no + -Dlogind=false + -Dcoredump=false + -Dbacklight=false + -Dbinfmt=false + -Dimportd=false + -Dhibernate=false + -Dportabled=false + -Dquotacheck=false + -Drfkill=false + -Dvconsole=false + -Dhostnamed=true + -Dlocaled=false + -Dfirstboot=false + -Denvironment-d=false + -Dutmp=false + -Didn=false + -Dlibidn=false + -Dpcre2=false + -Dgcrypt=false + -Dnss-myhostname=false + -Dnss-resolve=false + -Dnss-systemd=false + %endif ) # Don't ship /var/log/README. The relationship between journal and syslog should be documented @@ -1379,7 +1437,7 @@ mkdir -p %{buildroot}%{pkgdir}/user-generators # Create new-style configuration files so that we can ghost-own them touch %{buildroot}%{_sysconfdir}/hostname touch %{buildroot}%{_sysconfdir}/vconsole.conf -touch %{buildroot}%{_sysconfdir}/locale.conf +%{!?lifsea_dist:touch %{buildroot}%{_sysconfdir}/locale.conf} touch %{buildroot}%{_sysconfdir}/machine-id touch %{buildroot}%{_sysconfdir}/machine-info touch %{buildroot}%{_sysconfdir}/localtime @@ -1394,7 +1452,7 @@ mkdir -p %{buildroot}%{pkgdir}/system-sleep/ mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight -mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/rfkill +%{!?lifsea_dist:mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/rfkill} mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/linger mkdir -p %{buildroot}%{_localstatedir}/lib/private mkdir -p %{buildroot}%{_localstatedir}/log/private @@ -1417,8 +1475,10 @@ install -Dm0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/dnf/protected.d/systemd.co install -Dm0644 -t %{buildroot}/usr/lib/firewalld/services/ %{SOURCE7} %{SOURCE8} +%if ! %{defined lifsea_dist} # Restore systemd-user pam config from before "removal of Fedora-specific bits" install -Dm0644 -t %{buildroot}/etc/pam.d/ %{SOURCE12} +%endif # Install additional docs # https://bugzilla.redhat.com/show_bug.cgi?id=1234951 @@ -1456,7 +1516,9 @@ python3 %{SOURCE2} %buildroot </dev/null || groupadd -r -g 11 cdrom &>/dev/null || : getent group utmp &>/dev/null || groupadd -r -g 22 utmp &>/dev/null || : getent group tape &>/dev/null || groupadd -r -g 33 tape &>/dev/null || : @@ -1496,8 +1580,10 @@ getent group kvm &>/dev/null || groupadd -r -g 36 kvm &>/dev/null || : getent group render &>/dev/null || groupadd -r render &>/dev/null || : getent group systemd-journal &>/dev/null || groupadd -r -g 190 systemd-journal 2>&1 || : +%if ! %{defined lifsea_dist} getent group systemd-coredump &>/dev/null || groupadd -r systemd-coredump 2>&1 || : getent passwd systemd-coredump &>/dev/null || useradd -r -l -g systemd-coredump -d / -s /sbin/nologin -c "systemd Core Dumper" systemd-coredump &>/dev/null || : +%endif getent group systemd-resolve &>/dev/null || groupadd -r -g 193 systemd-resolve 2>&1 || : getent passwd systemd-resolve &>/dev/null || useradd -r -u 193 -l -g systemd-resolve -d / -s /sbin/nologin -c "systemd Resolver" systemd-resolve &>/dev/null || : @@ -1512,8 +1598,10 @@ systemd-tmpfiles --create &>/dev/null || : chgrp systemd-journal /run/log/journal/ /run/log/journal/`cat /etc/machine-id 2>/dev/null` /var/log/journal/ /var/log/journal/`cat /etc/machine-id 2>/dev/null` &>/dev/null || : chmod g+s /run/log/journal/ /run/log/journal/`cat /etc/machine-id 2>/dev/null` /var/log/journal/ /var/log/journal/`cat /etc/machine-id 2>/dev/null` &>/dev/null || : +%if ! %{defined lifsea_dist} # Apply ACL to the journal directory setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/ &>/dev/null || : +%endif # Stop-gap until rsyslog.rpm does this on its own. (This is supposed # to fail when the link already exists) @@ -1558,6 +1646,7 @@ fi %post libs %{?ldconfig} +%if ! %{defined lifsea_dist} function mod_nss() { if [ $1 -eq 1 ] && [ -f "$2" ]; then # sed-fu to add myhostname to hosts line (only once, on install) @@ -1586,6 +1675,7 @@ else # possible future authselect configuration mod_nss $1 "/etc/authselect/user-nsswitch.conf" fi +%endif # check if nobody or nfsnobody is defined export SYSTEMD_NSS_BYPASS_SYNTHETIC=1 @@ -1627,6 +1717,9 @@ grep -q -E '^KEYMAP="?fi-latin[19]"?' /etc/vconsole.conf 2>/dev/null && %systemd_postun_with_restart systemd-udevd.service %pre journal-remote +%if %{defined lifsea_dist} +%{common_pre_scripts} +%endif getent group systemd-journal-remote &>/dev/null || groupadd -r systemd-journal-remote 2>&1 || : getent passwd systemd-journal-remote &>/dev/null || useradd -r -l -g systemd-journal-remote -d %{_localstatedir}/log/journal/remote -s /sbin/nologin -c "Journal Remote" systemd-journal-remote &>/dev/null || : @@ -1675,11 +1768,17 @@ fi %ghost %dir %attr(0755,-,-) /etc/systemd/system/system-update.target.wants %ghost %dir %attr(0755,-,-) /etc/systemd/system/timers.target.wants %ghost %dir %attr(0755,-,-) /var/lib/rpm-state/systemd +%if %{defined lifsea_dist} +%exclude %{_prefix}/lib/tmpfiles.d/systemd-nologin.conf +%exclude %{_datarootdir}/polkit-1 +%endif %files libs -f .file-list-libs %license LICENSE.LGPL2.1 +%if ! %{defined lifsea_dist} %files pam -f .file-list-pam +%endif %files devel -f .file-list-devel @@ -1692,6 +1791,29 @@ fi %files tests -f .file-list-tests %changelog +* Thu Feb 29 2024 yuanhui - 239-78.0.3 +- LifseaOS: Add back hostnamectl +- LifseaOS: Add back timedatectl +- LifseaOS: shared: Remove dependency of libcryptsetup if HAVE_LIBCRYPTSETUP is not defined +- LifseaOS: analyze: show information from hostnamed in plot even when user mode +- LifseaOS: configure: Disable smack +- LifseaOS: Remove nss module provided by systemd +- LifseaOS: configure: Remove multiple non-essential features +- LifseaOS: configure: Disable firstboot +- LifseaOS: Remove user-runtime-dir binary and service file +- LifseaOS: Remove the dependency of acl package +- LifseaOS: Remove locale and hostname related tools +- LifseaOS: Remove multiple unnecessary modules +- LifseaOS: Remove compression algorithm +- LifseaOS: Remove many tools of little use +- LifseaOS: Remove coredump tools +- LifseaOS: configure: Disable cryptsetup +- LifseaOS: configure: Disable polkit +- LifseaOS: configure: Disable logind +- LifseaOS: Remove systemd-pam module +- LifseaOS: configure: Remove manpage and bash/zsh completion +- LifseaOS: cgroup: Do not remove cgroup path which not created by systemd + * Wed Jan 31 2024 wangkaiyuan - 239-78.0.2 - Update vendor ids for ieisystem 0750