Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package helix for openSUSE:Factory checked in at 2023-03-06 18:56:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/helix (Old) and /work/SRC/openSUSE:Factory/.helix.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "helix" Mon Mar 6 18:56:30 2023 rev:11 rq:1069583 version:22.12 Changes: -------- --- /work/SRC/openSUSE:Factory/helix/helix.changes 2023-02-14 16:48:07.003397161 +0100 +++ /work/SRC/openSUSE:Factory/.helix.new.31432/helix.changes 2023-03-06 18:56:33.504973014 +0100 @@ -1,0 +2,18 @@ +Mon Mar 6 08:45:10 UTC 2023 - Andreas Schneider <a...@cryptomilk.org> + +- Changed runtime path to /usr/libexec/helix as it includes loadable shared + objects + * Added helix-runtime-path.patch +- Some spec file cleanup + +------------------------------------------------------------------- +Wed Mar 1 00:12:53 UTC 2023 - Soc Virnyl Estela <socvirnyl.est...@gmail.com> + +- Replace Suggests to Recommends. + +------------------------------------------------------------------- +Wed Mar 1 00:04:56 UTC 2023 - Soc Virnyl Estela <socvirnyl.est...@gmail.com> + +- Check desktop file + +------------------------------------------------------------------- New: ---- helix-runtime-path.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ helix.spec ++++++ --- /var/tmp/diff_new_pack.0teQnH/_old 2023-03-06 18:56:34.612978667 +0100 +++ /var/tmp/diff_new_pack.0teQnH/_new 2023-03-06 18:56:34.620978708 +0100 @@ -15,8 +15,12 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # +# Workaround for quilt to work +%if "x%{?rust_arches}" == "x" +%global rust_arches x86_64 +%endif -%global _helix_runtimedir %{_sharedstatedir}/%{name}/runtime +%global _helix_runtimedir %{_libdir}/%{name}/runtime Name: helix Version: 22.12 @@ -24,16 +28,19 @@ Summary: A post-modern modal text editor written in Rust License: (Apache-2.0 OR MIT) AND BSD-3-Clause AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT or Unlicense) AND (Zlib OR Apache-2.0 OR MIT) AND Apache-2.0 AND BSL-1.0 AND ISC AND MIT AND MPL-2.0+ AND Zlib AND MPL-2.0 URL: https://github.com/helix-editor/helix +# This tarball includes fetched grammars Source0: %{url}/releases/download/%{version}/%{name}-%{version}-source.tar.xz#/%{name}-%{version}.tar.xz Source1: vendor.tar.xz Source2: cargo_config Source3: README-suse-maint.md Source4: helix-rpmlintrc +Patch0: helix-runtime-path.patch BuildRequires: c++_compiler BuildRequires: c_compiler BuildRequires: cargo-packaging BuildRequires: hicolor-icon-theme -Suggests: %{name}-runtime +BuildRequires: update-desktop-files +Recommends: %{name}-runtime ExclusiveArch: %{rust_arches} %description @@ -67,19 +74,9 @@ %description zsh-completion Zsh command-line completion support for %{name}. -%prep -%autosetup -a1 -c -n %{name}-%{version} -mkdir -p .cargo -cp %{SOURCE2} .cargo/config.toml - -for shell in bash fish zsh -do - sed -i "s|\#\!\/usr\/bin\/env ${shell}||g" contrib/completion/hx.${shell} -done - %package runtime Summary: Runtime files for %{name} -Suggests: %{name} +Recommends: %{name} %description runtime Helix runtime files. Separated due to how huge the runtime files are. @@ -87,6 +84,17 @@ if there is no runtime present in the users config directory specifically `XDG_CONFIG_HOME/helix`. +%prep +%autosetup -a1 -p1 -c -n %{name}-%{version} +mkdir -p .cargo +cp %{SOURCE2} .cargo/config.toml + +# Replace RUNTIME dir +sed -e 's#@HELIX_RUNTIME_DIR@#%{_libdir}/%{name}#' -i helix-loader/src/lib.rs + +# Remove shell definitions +sed -e '/^\#\!\/usr\/bin\/env .*/d' -i contrib/completion/hx.* + %build export HELIX_DISABLE_AUTO_GRAMMAR_BUILD=true %{cargo_build} @@ -99,20 +107,19 @@ sed -i "s|hx|helix|g" contrib/Helix.desktop %install -mkdir -p %{buildroot}%{_libdir}/%{name} -mkdir -p %{buildroot}%{_helix_runtimedir} -install -m 0755 %{_builddir}/%{name}-%{version}/target/release/hx %{buildroot}%{_libdir}/%{name}/hx -cp -rv "runtime/queries" %{buildroot}%{_helix_runtimedir} -cp -rv "runtime/themes" %{buildroot}%{_helix_runtimedir} +install -d -m 0755 %{buildroot}%{_bindir} +install -m 0755 target/release/hx %{buildroot}%{_bindir}/%{name} + +install -d -m 0755 %{buildroot}%{_helix_runtimedir} +cp -av "runtime/queries" %{buildroot}%{_helix_runtimedir} +cp -av "runtime/themes" %{buildroot}%{_helix_runtimedir} find "%{_builddir}/%{name}-%{version}/runtime/grammars" -type f -name '*.so' -exec \ install --verbose -Dm 755 {} -t "%{buildroot}%{_helix_runtimedir}/grammars" \; install -Dm644 runtime/tutor -t %{buildroot}%{_helix_runtimedir} -ln -sv %{_helix_runtimedir} %{buildroot}%{_libdir}/%{name}/runtime -install -D -d -m 0755 %{buildroot}%{_bindir} -ln -sv %{_libdir}/%{name}/hx %{buildroot}%{_bindir}/%{name} # Desktop application file install -Dm644 -T %{_builddir}/%{name}-%{version}/contrib/Helix.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop +%suse_update_desktop_file %{name} # Icon install -Dm644 -T %{_builddir}/%{name}-%{version}/logo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg @@ -125,41 +132,30 @@ %files %license LICENSE %doc README.md CHANGELOG.md languages.toml docs/CONTRIBUTING.md docs/architecture.md docs/vision.md -%dir %{_libdir}/%{name} +%{_bindir}/%{name} # Desktop application file %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_datadir}/applications/* -# hx symlinked as helix -%{_bindir}/%{name} - -# The real hx binary -%{_libdir}/%{name}/hx +%dir %{_libdir}/helix # Tutor +%dir %{_helix_runtimedir} %{_helix_runtimedir}/tutor %files runtime # Runtimes and runtime files -%dir %{_sharedstatedir}/%{name} -%dir %{_helix_runtimedir} -%dir %{_helix_runtimedir}/queries -%dir %{_helix_runtimedir}/themes -%dir %{_helix_runtimedir}/grammars - # Grammars +%dir %{_helix_runtimedir}/grammars %{_helix_runtimedir}/grammars/* - # Queries +%dir %{_helix_runtimedir}/queries %{_helix_runtimedir}/queries/* - # Themes +%dir %{_helix_runtimedir}/themes %{_helix_runtimedir}/themes/* -# Symlinked runtime directory -%{_libdir}/%{name}/runtime - %files bash-completion %{_datadir}/bash-completion/* ++++++ helix-runtime-path.patch ++++++ Index: helix-22.12/helix-loader/src/lib.rs =================================================================== --- helix-22.12.orig/helix-loader/src/lib.rs 2023-03-06 10:51:51.196485557 +0100 +++ helix-22.12/helix-loader/src/lib.rs 2023-03-06 10:52:38.460917379 +0100 @@ -41,6 +41,11 @@ pub fn runtime_dir() -> PathBuf { return conf_dir; } + let rt_dir = std::path::PathBuf::from("@HELIX_RUNTIME_DIR@").join(RT_DIR); + if rt_dir.exists() { + return rt_dir; + } + // fallback to location of the executable being run // canonicalize the path in case the executable is symlinked std::env::current_exe()