forked from microsoft/azurelinux-tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
os-subrelease.spec
45 lines (36 loc) · 1.15 KB
/
os-subrelease.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# os-subrelease data:
%global _builder_name My Builder Name
%global _id my-product-id
%global _version_id my-version-id
%global _name My Product Name
%global _version %{_version_id}
Summary: Product OS Subrelease Information
Name: os-subrelease
Version: 1.0
Release: 1%{?dist}
License: Apache License
Group: System Environment/Base
URL: https://my-company-or-product-url
Vendor: My Company Name
Distribution: Mariner
BuildArch: noarch
%description
This package creates a sample os subrelease file: /etc/os-subrelease. Replace contents as needed for your CBL-Mariner based product information
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/etc
cat > %{buildroot}/etc/os-subrelease << EOF
BUILDER_NAME=%{_builder_name}
BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
ID=%{_id}
VERSION_ID=%{_version_id}
NAME="%{_name}"
VERSION="%{_version}"
EOF
%clean
rm -rf $RPM_BUILD_ROOT
%files
%config(noreplace) /etc/os-subrelease
%changelog
* Thu Mar 26 2020 Jon Slobodzian <[email protected]> 1.0-1
- Replace this changelog entry for your specific needs