File opensuse-vsf-leap.spec of Package opensuse-vsf-leap

#
# spec file for package opensuse-vsf-leap
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           opensuse-vsf-leap
Version:        1.0
Release:        0
Summary:        Rollback some various changes to meaningful settings bevor Leap16
License:        GPL-3.0-or-later
#URL:
Source1:        cockpit.desktop
Source90:       README.md
Source99:       %{name}-rpmlintrc
BuildRequires:  sudo
BuildRequires:  zypper
BuildRequires:  pkgconfig(systemd)
Requires:       grub2-compat-ia32
Requires:       mc
Requires:       selinux-policy-targeted-gaming
Requires:       patterns-cockpit
BuildArch:      noarch

%description
This package attempts to restore the familiar and proven configurations
and other things from before Leap 16 as far as possible.
Among other things: The first user is no longer root, familiar root behavior,
reactivation of 32-bit and installation of necessary SELinux settings for Steam.
Further rollbacks may follow.

%prep
#%%setup -q
cp -a %{SOURCE90} .

%build
# nothing to build

%install
# Generate new/old rights
cat > default-user-rights << EOF
# This will aktivate and rollback to the default UserRights
# as we knew them until Leap 15.6.
Defaults        targetpw
ALL             ALL = (ALL) ALL
EOF
#install -dm 0750 %%{buildroot}%%{_sysconfdir}/sudoers.d
install -Dm 0644 default-user-rights %{buildroot}%{_sysconfdir}/sudoers.d/default-user-rights
# Install cockpit desktop file
install -Dm 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/cockpit.desktop

%post
systemctl enable --now cockpit.socket ||:
systemctl enable --now sshd ||:

%postun
systemctl disable --now cockpit.socket ||:

%files
#%%license add-license-file-here
%doc README.md
%config (noreplace) %{_sysconfdir}/sudoers.d/default-user-rights
%{_datadir}/applications/cockpit.desktop

%changelog
openSUSE Build Service is sponsored by