Accepting request 1008562 from Virtualization:WSL

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1008562
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/patterns-wsl?expand=0&rev=3
This commit is contained in:
Richard Brown 2022-10-07 23:23:46 +00:00 committed by Git OBS Bridge
commit 2687cfb964
2 changed files with 48 additions and 6 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Sep 29 15:39:56 UTC 2022 - Scott Bradnick <scott.bradnick@suse.com>
- Adding a patterns-wsl-systemd <-> wsl_systemd pattern to setup 2 things:
* /sbin/init -> /usr/lib/systemd/systemd symlink (if it doesn't exist)
* backup an existing /etc/wsl.conf ; drop in new /etc/wsl.conf with
boot.systemd=true entry.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Feb 22 19:18:54 UTC 2022 - Scott Bradnick <scott.bradnick@suse.com> - 20220222 Tue Feb 22 19:18:54 UTC 2022 - Scott Bradnick <scott.bradnick@suse.com> - 20220222

View File

@ -17,23 +17,22 @@
Name: patterns-wsl Name: patterns-wsl
Version: 20220222 Version: 20220929
Release: 0 Release: 0
Summary: Recommended packages for Windows Subsystem for Linux, WSL, WSLg Summary: Recommended packages for Windows Subsystem for Linux, WSL, WSLg
License: MIT License: MIT
Group: Metapackages Group: Metapackages
#URL: https://github.com/openSUSE/patterns
URL: https://github.com/sbradnick/patterns URL: https://github.com/sbradnick/patterns
BuildRequires: patterns-rpm-macros BuildRequires: patterns-rpm-macros
#BuildArch: noarch
%description %description
This is an internal package that is used to create the patterns as part This is an internal package that is used to create the patterns as part
of the installation source setup. Installation of this package does of the installation source setup. Installation of this package does
not make sense. not make sense.
# ----
# -----
%package base %package base
%pattern_development %pattern_development
Summary: Base WSL packages Summary: Base WSL packages
@ -53,7 +52,7 @@ This package contains the wsl_base pattern: recommended tools,libraries for usin
%dir /usr/share/doc/packages/patterns %dir /usr/share/doc/packages/patterns
/usr/share/doc/packages/patterns/wsl_base.txt /usr/share/doc/packages/patterns/wsl_base.txt
# ----- # ----
%package gui %package gui
%pattern_development %pattern_development
@ -77,7 +76,40 @@ This package contains the wsl_gui pattern: recommended tools,libraries for using
%dir /usr/share/doc/packages/patterns %dir /usr/share/doc/packages/patterns
/usr/share/doc/packages/patterns/wsl_gui.txt /usr/share/doc/packages/patterns/wsl_gui.txt
# ----- # ----
%package systemd
%pattern_development
Summary: WSL systemd setup
Group: Metapackages
Provides: pattern() = wsl_systemd
Provides: pattern-icon() = wsl
Provides: pattern-order() = 3420
Provides: pattern-visible()
%description systemd
This package contains the wsl_systemd pattern: provides /etc/wsl.conf and /sbin/init symlink where required.
#%%if 0%%{?suse_version} == 1500
#%%endif
%post systemd
if [[ ! -L /sbin/init ]];
then
%{_bindir}/echo "ADDING /sbin/init -> /usr/lib/systemd/systemd SYMLINK."
%{_bindir}/ln -s %{_systemd_util_dir}/systemd /sbin/init
if [[ -e /etc/wsl.conf ]];
then
cp /etc/wsl.conf /etc/wsl.conf.$(date +%s)
fi
%{_bindir}/echo "ADDING /etc/wsl.conf ..."
%{_bindir}/echo -e "# added by wsl_systemd pattern\n[boot]\nsystemd=true\n# END: wsl_systemd pattern edit" > %{_sysconfdir}/wsl.conf
fi
%files systemd
%dir /usr/share/doc/packages/patterns
/usr/share/doc/packages/patterns/wsl_systemd.txt
# ----
%prep %prep
@ -88,5 +120,7 @@ mkdir -p %{buildroot}/usr/share/doc/packages/patterns/
echo 'This file marks the pattern wsl_base to be installed.' > %{buildroot}/usr/share/doc/packages/patterns/wsl_base.txt echo 'This file marks the pattern wsl_base to be installed.' > %{buildroot}/usr/share/doc/packages/patterns/wsl_base.txt
mkdir -p %{buildroot}/usr/share/doc/packages/patterns/ mkdir -p %{buildroot}/usr/share/doc/packages/patterns/
echo 'This file marks the pattern wsl_gui to be installed.' > %{buildroot}/usr/share/doc/packages/patterns/wsl_gui.txt echo 'This file marks the pattern wsl_gui to be installed.' > %{buildroot}/usr/share/doc/packages/patterns/wsl_gui.txt
mkdir -p %{buildroot}/usr/share/doc/packages/patterns/
echo 'This file marks the pattern wsl_systemd to be installed.' > %{buildroot}/usr/share/doc/packages/patterns/wsl_systemd.txt
%changelog %changelog