Skip to content

Commit 5d76430

Browse files
Add yq package for work item 55989974 (#12997)
1 parent 7d2b180 commit 5d76430

File tree

5 files changed

+63
-1
lines changed

5 files changed

+63
-1
lines changed

LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSES-AND-NOTICES/SPECS/data/licenses.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,6 +2196,7 @@
21962196
"yp-tools",
21972197
"ypbind",
21982198
"ypserv",
2199+
"yq",
21992200
"z3",
22002201
"zenity",
22012202
"zerofree",

SPECS-EXTENDED/yq/yq.signatures.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Signatures": {
3+
"yq-4.45.1-vendor.tar.gz": "4c065b57dab5cf28aacc0b063f048c05b23cdfe506ce3eb4178fbd2577dae14f",
4+
"yq-4.45.1.tar.gz": "074a21a002c32a1db3850064ad1fc420083d037951c8102adecfea6c5fd96427"
5+
}
6+
}

SPECS-EXTENDED/yq/yq.spec

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Summary: Yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor
2+
Name: yq
3+
Version: 4.45.1
4+
Release: 1%{?dist}
5+
License: MIT
6+
Vendor: Microsoft Corporation
7+
Distribution: Azure Linux
8+
URL: https://github.com/mikefarah/yq
9+
Source: https://github.com/mikefarah/yq/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
10+
Source1: %{name}-%{version}-vendor.tar.gz
11+
BuildRequires: golang
12+
%global debug_package %{nil}
13+
%define our_gopath %{_topdir}/.gopath
14+
15+
%description
16+
yq is a lightweight and portable command-line YAML, JSON and XML processor. yq uses jq like syntax but works with yaml files as well as json, xml, properties, csv and tsv. It doesn't yet support everything jq does - but it does support the most common operations and functions, and more is being added continuously.
17+
18+
%prep
19+
%autosetup -p1 -n %{name}-%{version} -a1
20+
21+
%build
22+
export GOPATH=%{our_gopath}
23+
# No mod download use vendor cache locally
24+
export GOFLAGS="-buildmode=pie -trimpath -mod=vendor -modcacherw"
25+
go build -o bin/ --ldflags "-X main.GitCommit= -X main.GitDescribe= -w -s"
26+
27+
%install
28+
install -m 0755 -vd %{buildroot}%{_bindir}
29+
install -m 0755 -vp bin/* %{buildroot}%{_bindir}/
30+
31+
%check
32+
cp bin/yq .
33+
bash ./scripts/acceptance.sh
34+
35+
%files
36+
%license LICENSE
37+
%doc examples CODE_OF_CONDUCT.md how-it-works.md project-words.txt
38+
%doc release_instructions.txt CONTRIBUTING.md README.md release_notes.txt
39+
%{_bindir}/yq
40+
41+
%changelog
42+
* Mon Mar 17 2025 Sandeep Karambelkar <[email protected]> - 4.45.1-1
43+
- Initial Azure Linux import from Fedora 42 (license: MIT).
44+
- Upgraded version from 4.43 to 4.45.1
45+
- License verified

cgmanifest.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31134,6 +31134,16 @@
3113431134
}
3113531135
}
3113631136
},
31137+
{
31138+
"component": {
31139+
"type": "other",
31140+
"other": {
31141+
"name": "yq",
31142+
"version": "4.45.1",
31143+
"downloadUrl": "https://github.com/mikefarah/yq/archive/refs/tags/v4.45.1.tar.gz"
31144+
}
31145+
}
31146+
},
3113731147
{
3113831148
"component": {
3113931149
"type": "other",

0 commit comments

Comments
 (0)