generated from smedev/Template-for-SMEServer-Core-upstream
* Thu Feb 13 2025 Jean-Philippe Pialasse <jpp@koozali.org> 4.43.1-6.sme
- first SME 11 import - update spec to build in koji - add bash completion - build debugsource
This commit is contained in:
parent
84d4f50915
commit
f857693cdc
BIN
vendor.tar.gz
(Stored with Git LFS)
Normal file
BIN
vendor.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
yq-4.43.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
yq-4.43.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
29
yq-go1_24-replace_error_creation.diff
Normal file
29
yq-go1_24-replace_error_creation.diff
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 6908161f1fb6713db8259909c606109770fe7673 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marco Vito Moscaritolo <mavimo@gmail.com>
|
||||||
|
Date: Mon, 11 Nov 2024 14:06:04 +0100
|
||||||
|
Subject: [PATCH] replace error creation
|
||||||
|
|
||||||
|
---
|
||||||
|
pkg/yqlib/operator_error.go | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/pkg/yqlib/operator_error.go b/pkg/yqlib/operator_error.go
|
||||||
|
index 1a2283de87..d6a2b67fed 100644
|
||||||
|
--- a/pkg/yqlib/operator_error.go
|
||||||
|
+++ b/pkg/yqlib/operator_error.go
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
package yqlib
|
||||||
|
|
||||||
|
import (
|
||||||
|
- "fmt"
|
||||||
|
+ "errors"
|
||||||
|
)
|
||||||
|
|
||||||
|
func errorOperator(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
|
||||||
|
@@ -16,5 +16,5 @@ func errorOperator(d *dataTreeNavigator, context Context, expressionNode *Expres
|
||||||
|
if rhs.MatchingNodes.Len() > 0 {
|
||||||
|
errorMessage = rhs.MatchingNodes.Front().Value.(*CandidateNode).Value
|
||||||
|
}
|
||||||
|
- return Context{}, fmt.Errorf(errorMessage)
|
||||||
|
+ return Context{}, errors.New(errorMessage)
|
||||||
|
}
|
101
yq.spec
101
yq.spec
@ -1,55 +1,74 @@
|
|||||||
%define name yq
|
%bcond_with check
|
||||||
%define version 1.0
|
|
||||||
%define release 1
|
|
||||||
Summary: This is what yq does.
|
|
||||||
Name: %{name}
|
|
||||||
Version: %{version}
|
|
||||||
Release: %{release}%{?dist}
|
|
||||||
Source: %{name}-%{version}.tar.gz
|
|
||||||
License: GNU GPL version 2
|
|
||||||
Group: SMEserver/addon
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-buildroot
|
|
||||||
Prefix: %{_prefix}
|
|
||||||
BuildArchitectures: noarch
|
|
||||||
BuildRequires: smeserver-devtools
|
|
||||||
Requires: smeserver-release >= 11.0
|
|
||||||
AutoReqProv: no
|
|
||||||
|
|
||||||
%description
|
%global golicenses LICENSE
|
||||||
Yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties
|
%global godocs examples CODE_OF_CONDUCT.md how-it-works.md project-\\\
|
||||||
processor.
|
words.txt release_instructions.txt CONTRIBUTING.md\\\
|
||||||
|
README.md release_notes.txt
|
||||||
|
|
||||||
%changelog
|
Name: yq
|
||||||
* Day MMMM DD YYYY <brianr@koozali.org> 1.0-1.sme
|
Version: 4.43.1
|
||||||
- Initial code - create RPM [SME:99999]
|
Release: 6%{dist}
|
||||||
|
Summary: Yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor
|
||||||
|
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/mikefarah/yq
|
||||||
|
Source0: https://github.com/mikefarah/yq/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
Source1: vendor.tar.gz
|
||||||
|
Patch1: https://github.com/mikefarah/yq/commit/6908161f1fb6713db8259909c606109770fe7673.patch#/yq-go1_24-replace_error_creation.diff
|
||||||
|
BuildRequires: go-srpm-macros, golang
|
||||||
|
|
||||||
|
%description
|
||||||
|
A lightweight and portable command-line YAML processor. yq uses jq like syntax
|
||||||
|
but works with yaml files as well as json. It doesn't yet support everything
|
||||||
|
jq does - but it does support the most common operations and functions, and more
|
||||||
|
is being added continuously.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
%setup -qa1
|
||||||
|
|
||||||
%setup -q
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
go build -buildmode=pie -mod=vendor -o bin/%{name} -ldflags=-compressdwarf=false
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
install -m 0755 -vd %{buildroot}%{_bindir}
|
||||||
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
|
install -D -m 0755 ./bin/%{name} "%{buildroot}/%{_bindir}/%{name}"
|
||||||
rm -f %{name}-%{version}-filelist
|
|
||||||
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
|
||||||
> %{name}-%{version}-filelist
|
|
||||||
#echo "%doc COPYING" >> %{name}-%{version}-filelist
|
|
||||||
#--dir <dir> 'attr(755,user,grp)' \
|
|
||||||
#--file <file> 'attr(755,root,root)' \
|
|
||||||
|
|
||||||
%clean
|
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions
|
||||||
cd ..
|
%{buildroot}/%{_bindir}/%{name} shell-completion bash > %{buildroot}%{_datadir}/bash-completion/completions/%{name}
|
||||||
rm -rf %{name}-%{version}
|
|
||||||
|
|
||||||
%pre
|
|
||||||
|
|
||||||
%preun
|
%if %{with check}
|
||||||
|
%check
|
||||||
|
%gocheck
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%doc examples CODE_OF_CONDUCT.md how-it-works.md project-words.txt
|
||||||
|
%doc release_instructions.txt CONTRIBUTING.md README.md release_notes.txt
|
||||||
|
%{_bindir}/yq
|
||||||
|
%{_datadir}/bash-completion/completions/%{name}
|
||||||
|
|
||||||
%postun
|
%changelog
|
||||||
#uninstall
|
* Thu Feb 13 2025 Jean-Philippe Pialasse <jpp@koozali.org> 4.43.1-6.sme
|
||||||
%files -f %{name}-%{version}-filelist
|
- first SME 11 import
|
||||||
%defattr(-,root,root)
|
- update spec to build in koji
|
||||||
|
- add bash completion
|
||||||
|
- build debugsource
|
||||||
|
|
||||||
|
* Sun Jan 26 2025 Michel Lind <salimma@fedoraproject.org> - 4.43.1-5
|
||||||
|
- Fix building with Go 1.24; Resolves: RHBZ#2341595
|
||||||
|
|
||||||
|
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.43.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.43.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Apr 23 2024 Michel Lind <salimma@fedoraproject.org> - 4.43.1-2
|
||||||
|
- Fix goipath and remove gopkg, thanks mikelo2
|
||||||
|
|
||||||
|
* Tue Apr 23 2024 Michel Lind <salimma@fedoraproject.org> - 4.43.1-1
|
||||||
|
- Initial package (rhbz#2276522)
|
||||||
|
## END: Generated by rpmautospec
|
||||||
|
Loading…
Reference in New Issue
Block a user