forked from cockpit/cockpit
Compare commits
1 Commits
update-349
...
micro-6.0
| Author | SHA256 | Date | |
|---|---|---|---|
|
7a8f537c80
|
@@ -1,12 +0,0 @@
|
||||
diff --git c/src/systemd/cockpit.socket.in w/src/systemd/cockpit.socket.in
|
||||
index de45b0dc9..a1dccef7f 100644
|
||||
--- c/src/systemd/cockpit.socket.in
|
||||
+++ w/src/systemd/cockpit.socket.in
|
||||
@@ -5,6 +5,7 @@ Wants=cockpit-issue.service
|
||||
|
||||
[Socket]
|
||||
ListenStream=9090
|
||||
+ExecStartPre=@libexecdir@/check_cockpit_users
|
||||
ExecStartPost=-@datadir@/@PACKAGE@/issue/update-issue '' localhost
|
||||
ExecStartPost=-/bin/ln -snf active.issue /run/cockpit/issue
|
||||
ExecStopPost=-/bin/ln -snf inactive.issue /run/cockpit/issue
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/bin/sh
|
||||
bad_users_groups=("cockpit-wsinstance-socket" "cockpit-session-socket")
|
||||
failed=false
|
||||
|
||||
for gu in "${bad_users_groups[@]}"; do
|
||||
grep -q "$gu" /etc/passwd
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "user ${gu} exists, cockpit will fail to start up if this user exists, please run userdel ${gu} to resolve this"
|
||||
failed=true
|
||||
fi
|
||||
|
||||
grep -q "$gu" /etc/group
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "group ${gu} exists, cockpit will fail to start up if this group exists, please run groupdel ${gu} to resolve this"
|
||||
failed=true
|
||||
fi
|
||||
done
|
||||
|
||||
grep -q cockpit-systemd-service /etc/passwd
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "user cockpit-systemd-service exists, cockpit will fail to start up if this group exists, please run userdel cockpit-systemd-service to resolve this"
|
||||
failed=true
|
||||
fi
|
||||
|
||||
if [ -f /etc/nsswitch.conf ]; then
|
||||
grep -Eq "passwd:.*systemd" /etc/nsswitch.conf
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "/etc/nsswitch.conf is out of date, please update it from /usr/etc/nsswitch.conf to use cockpit"
|
||||
failed=true
|
||||
fi
|
||||
fi
|
||||
|
||||
if $failed; then
|
||||
exit 1
|
||||
fi
|
||||
21
cockpit.spec
21
cockpit.spec
@@ -38,13 +38,8 @@
|
||||
|
||||
%define __lib lib
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%define pamconfdir %{_pam_vendordir}
|
||||
%define pamconfig tools/cockpit.suse.pam
|
||||
%else
|
||||
%define pamconfdir %{_sysconfdir}/pam.d
|
||||
%define pamconfig tools/cockpit.pam
|
||||
%endif
|
||||
|
||||
%if %{defined _pamdir}
|
||||
%define pamdir %{_pamdir}
|
||||
@@ -64,7 +59,6 @@ Source0: cockpit-%{version}.tar.gz
|
||||
Source2: cockpit-rpmlintrc
|
||||
Source3: cockpit-suse-theme.tar
|
||||
Source4: cockpit-no-pamoath.pam
|
||||
Source5: check_cockpit_users
|
||||
Source10: update_version.sh
|
||||
Source99: README.packaging
|
||||
Source98: package-lock.json
|
||||
@@ -86,7 +80,6 @@ Patch104: selinux_libdir.patch
|
||||
Patch105: fix-libexecdir.patch
|
||||
Patch106: packagekit-single-install.patch
|
||||
Patch109: 0008-pybridge-endian-flag.patch
|
||||
Patch110: add_preexec_cockpit.patch
|
||||
Patch111: 0001-cockpit-overview-support-SUSE_SUPPORT_PRODUCT-keys.patch
|
||||
Patch112: 0002-cockpit-kdump-support-SLE-micro-6.2.patch
|
||||
Patch113: 0003-branding-use-SUSE_SUPPORT_PRODUCT-and-SUSE_SUPPORT_P.patch
|
||||
@@ -236,6 +229,7 @@ BuildRequires: python3-pytest-timeout
|
||||
%patch -P 106 -p1
|
||||
%patch -P 109 -p1
|
||||
%patch -P 114 -p1
|
||||
%patch -P 108 -p1
|
||||
|
||||
# SLE Micro specific patches
|
||||
%if 0%{?is_smo}
|
||||
@@ -255,7 +249,6 @@ BuildRequires: python3-pytest-timeout
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} >= 1600
|
||||
%patch -P 110 -p1
|
||||
%if !0%{?is_opensuse}
|
||||
%patch -P 111 -p1
|
||||
%patch -P 112 -p1
|
||||
@@ -460,12 +453,6 @@ rm -f %{buildroot}%{_datadir}/pixmaps/cockpit-sosreport.png
|
||||
mkdir -p %{buildroot}%{_datadir}/cockpit/devel
|
||||
cp -a pkg/lib %{buildroot}%{_datadir}/cockpit/devel
|
||||
|
||||
# cockpit.socket preexec to ensure users are created as dynamic users
|
||||
|
||||
%if 0%{?suse_version} >= 1600
|
||||
install -D -m 755 %SOURCE5 %{buildroot}%{_libexecdir}/
|
||||
%endif
|
||||
|
||||
# -------------------------------------------------------------------------------
|
||||
# Sub-packages
|
||||
|
||||
@@ -581,9 +568,6 @@ Suggests: sssd-dbus
|
||||
%if 0%{?suse_version}
|
||||
Requires(pre): permissions
|
||||
Requires: distribution-logos
|
||||
%if 0%{?suse_version} > 1500
|
||||
Requires: pam_oath >= 2.6.11.12
|
||||
%endif
|
||||
Requires: wallpaper-branding
|
||||
%endif
|
||||
# for cockpit-desktop
|
||||
@@ -656,13 +640,11 @@ authentication via sssd/FreeIPA.
|
||||
%if 0%{?suse_version} == 1500
|
||||
%{?suse_version:%verify(not mode) }%attr(4750, root, cockpit-wsinstance-socket) %{_libexecdir}/cockpit-session
|
||||
%else
|
||||
%{_libexecdir}/check_cockpit_users
|
||||
%{_libexecdir}/cockpit-session
|
||||
%endif
|
||||
%{_datadir}/cockpit/branding
|
||||
|
||||
%pre ws
|
||||
%if 0%{?suse_version} == 1500
|
||||
# HACK: old RPM and even Fedora's current RPM don't properly support sysusers
|
||||
# https://github.com/rpm-software-management/rpm/issues/3073
|
||||
getent group cockpit-wsinstance-socket >/dev/null || groupadd -r cockpit-wsinstance-socket
|
||||
@@ -670,7 +652,6 @@ getent group cockpit-session-socket >/dev/null || groupadd -r cockpit-session-so
|
||||
getent passwd cockpit-wsinstance-socket >/dev/null || useradd -r -g cockpit-wsinstance-socket -d /nonexisting -s /sbin/nologin -c "User for cockpit-ws instances" cockpit-wsinstance-socket
|
||||
getent passwd cockpit-session-socket >/dev/null || useradd -r -g cockpit-session-socket -d /nonexisting -s /sbin/nologin -c "User for cockpit-session instances" cockpit-session-socket
|
||||
getent passwd cockpit-systemd-service >/dev/null || useradd -r -g cockpit-wsinstance-socket -d /nonexisting -s /sbin/nologin -c "User for cockpit.service" cockpit-systemd-service
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
# Prepare for migration to /usr/lib; save any old .rpmsave
|
||||
|
||||
Reference in New Issue
Block a user