|
|
baf7e10 |
# Original spec file as generated by:
|
|
|
baf7e10 |
# gofed repo2spec --detect github.com/coreos/ignition --commit f7079129b8651ac51dba14c3af65692bb413c1dd --with-extra --with-build -f
|
|
|
baf7e10 |
# With:
|
|
|
baf7e10 |
# gofed/gofed:v1.0.1 docker image
|
|
|
333e3ff |
|
|
|
333e3ff |
|
|
|
333e3ff |
# If any of the following macros should be set otherwise,
|
|
|
333e3ff |
# you can wrap any of them with the following conditions:
|
|
|
333e3ff |
# - %%if 0%%{centos} == 7
|
|
|
333e3ff |
# - %%if 0%%{?rhel} == 7
|
|
|
333e3ff |
# - %%if 0%%{?fedora} == 23
|
|
|
333e3ff |
# Or just test for particular distribution:
|
|
|
333e3ff |
# - %%if 0%%{centos}
|
|
|
333e3ff |
# - %%if 0%%{?rhel}
|
|
|
333e3ff |
# - %%if 0%%{?fedora}
|
|
|
333e3ff |
#
|
|
|
333e3ff |
# Be aware, on centos, both %%rhel and %%centos are set. If you want to test
|
|
|
333e3ff |
# rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0 condition.
|
|
|
333e3ff |
# (Don't forget to replace double percentage symbol with single one in order to apply a condition)
|
|
|
333e3ff |
|
|
|
333e3ff |
# Not all devel deps exist in Fedora so you can't install the devel rpm
|
|
|
333e3ff |
# so we need to build without devel for now
|
|
|
333e3ff |
# Generate devel rpm
|
|
|
333e3ff |
%global with_devel 0
|
|
|
333e3ff |
# Build project from bundled dependencies
|
|
|
333e3ff |
%global with_bundled 1
|
|
|
333e3ff |
# Build with debug info rpm
|
|
|
333e3ff |
%global with_debug 1
|
|
|
333e3ff |
# Run tests in check section
|
|
|
333e3ff |
%global with_check 1
|
|
|
333e3ff |
# Generate unit-test rpm
|
|
|
333e3ff |
%global with_unit_test 1
|
|
|
333e3ff |
|
|
|
333e3ff |
%if 0%{?with_debug}
|
|
|
333e3ff |
%global _dwz_low_mem_die_limit 0
|
|
|
333e3ff |
%else
|
|
|
333e3ff |
%global debug_package %{nil}
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
%if ! 0%{?gobuild:1}
|
|
|
333e3ff |
%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
Andrew Jeddeloh |
c14ed24 |
# macros for Ignition
|
|
|
333e3ff |
%global provider github
|
|
|
333e3ff |
%global provider_tld com
|
|
|
333e3ff |
%global project coreos
|
|
|
333e3ff |
%global repo ignition
|
|
|
333e3ff |
# https://github.com/coreos/ignition
|
|
|
333e3ff |
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
|
|
|
333e3ff |
%global import_path %{provider_prefix}
|
|
Andrew Jeddeloh |
c14ed24 |
%global commit f7079129b8651ac51dba14c3af65692bb413c1dd
|
|
|
333e3ff |
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
|
333e3ff |
# define ldflags, buildflags, testflags here. The ldflags were
|
|
|
333e3ff |
# taken from ./build. We will need to periodically check these
|
|
|
333e3ff |
# for consistency
|
|
|
333e3ff |
%global ldflags ' -X github.com/coreos/ignition/internal/version.Raw=%{version} '
|
|
|
333e3ff |
%global buildflags %nil
|
|
|
333e3ff |
%global testflags %nil
|
|
|
333e3ff |
|
|
|
44fe06b |
# macros for ignition-dracut
|
|
|
44fe06b |
%global dracutlibdir %{_prefix}/lib/dracut
|
|
|
44fe06b |
%global dracutprovider github
|
|
|
44fe06b |
%global dracutprovider_tld com
|
|
|
44fe06b |
%global dracutproject dustymabe
|
|
|
7b7c721 |
%global dracutrepo ignition-dracut
|
|
|
7b7c721 |
# https://github.com/dustymabe/ignition-dracut
|
|
|
6596f44 |
%global dracutprovider_prefix %{dracutprovider}.%{dracutprovider_tld}/%{dracutproject}/%{dracutrepo}
|
|
|
6596f44 |
%global dracutimport_path %{dracutprovider_prefix}
|
|
|
d2ffbc1 |
%global dracutcommit 56aa51440a5e234edfbfdfc8e7cb48cfbccea168
|
|
|
44fe06b |
%global dracutshortcommit %(c=%{dracutcommit}; echo ${c:0:7})
|
|
|
44fe06b |
|
|
|
44fe06b |
|
|
|
333e3ff |
Name: ignition
|
|
Andrew Jeddeloh |
c14ed24 |
Version: 0.28.0
|
|
Andrew Jeddeloh |
c14ed24 |
Release: 1.git%{shortcommit}%{?dist}
|
|
|
333e3ff |
Summary: First boot installer and configuration tool
|
|
|
333e3ff |
License: ASL 2.0
|
|
|
333e3ff |
URL: https://%{provider_prefix}
|
|
|
333e3ff |
Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
|
|
|
333e3ff |
|
|
|
333e3ff |
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
|
|
|
333e3ff |
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
|
|
|
333e3ff |
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
|
|
|
333e3ff |
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
|
|
333e3ff |
|
|
|
333e3ff |
# add non golang BuildRequires that weren't detected
|
|
|
333e3ff |
BuildRequires: libblkid-devel
|
|
|
333e3ff |
|
|
|
333e3ff |
# Main rpm package BuildRequires
|
|
|
333e3ff |
%if ! 0%{?with_bundled}
|
|
|
333e3ff |
# validate/main.go
|
|
|
333e3ff |
BuildRequires: golang(github.com/spf13/cobra)
|
|
Andrew Jeddeloh |
c14ed24 |
# Remaining dependencies not included in main packages (sorted)
|
|
|
333e3ff |
BuildRequires: golang(github.com/ajeddeloh/go-json)
|
|
|
333e3ff |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/awserr)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds)
|
|
|
333e3ff |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/ec2metadata)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/session)
|
|
|
333e3ff |
BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3/s3manager)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/coreos/go-semver/semver)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/coreos/go-systemd/dbus)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/coreos/go-systemd/unit)
|
|
|
c77c54b |
BuildRequires: golang(github.com/pborman/uuid)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/pin/tftp)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/sigma/vmw-guestinfo/rpcvmx)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/sigma/vmw-guestinfo/vmcheck)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/vincent-petithory/dataurl)
|
|
Andrew Jeddeloh |
c14ed24 |
BuildRequires: golang(github.com/vmware/vmw-ovflib)
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
Andrew Jeddeloh |
c14ed24 |
# Main package Provides (generated with parsedeps.go | sort)
|
|
|
333e3ff |
%if 0%{?with_bundled}
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awserr)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awsutil)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client/metadata)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/corehandlers)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/endpointcreds)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/stscreds)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/defaults)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/ec2metadata)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/endpoints)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/request)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/session)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/signer/v4)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/shareddefaults)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query/queryutil)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/rest)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/restxml)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3iface)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3manager)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/sts)) = %{version}-c861d27d0304a79f727e9a8a4e2ac1e74602fdc0
|
|
|
333e3ff |
Provides: bundled(golang(github.com/coreos/go-semver/semver)) = %{version}-294930c1e79c64e7dbe360054274fdad492c8cf5
|
|
|
333e3ff |
Provides: bundled(golang(github.com/coreos/go-systemd/dbus)) = %{version}-39ca1b05acc7ad1220e09f133283b8859a8b71ab
|
|
|
333e3ff |
Provides: bundled(golang(github.com/coreos/go-systemd/unit)) = %{version}-39ca1b05acc7ad1220e09f133283b8859a8b71ab
|
|
|
333e3ff |
Provides: bundled(golang(github.com/pin/tftp/netascii)) = %{version}-9ea92f6b1029bc1bf3072bba195c84bb9b0370e3
|
|
|
333e3ff |
Provides: bundled(golang(github.com/sigma/vmw-guestinfo/rpcvmx)) = %{version}-95dd4126d6e8b4ef1970b3f3fe2e8cdd470d2903
|
|
|
333e3ff |
Provides: bundled(golang(github.com/sigma/vmw-guestinfo/vmcheck)) = %{version}-95dd4126d6e8b4ef1970b3f3fe2e8cdd470d2903
|
|
|
333e3ff |
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/bdoor)) = %{version}-25eff159a728be87e103a0b8045e08273f4dbec4
|
|
|
333e3ff |
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/message)) = %{version}-25eff159a728be87e103a0b8045e08273f4dbec4
|
|
|
333e3ff |
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/rpcout)) = %{version}-25eff159a728be87e103a0b8045e08273f4dbec4
|
|
|
333e3ff |
Provides: bundled(golang(go4.org/errorutil)) = %{version}-03efcb870d84809319ea509714dd6d19a1498483
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
|
|
|
333e3ff |
%description
|
|
|
333e3ff |
Ignition is a utility used to manipulate systems during the initramfs.
|
|
|
333e3ff |
This includes partitioning disks, formatting partitions, writing files
|
|
|
333e3ff |
(regular files, systemd units, networkd units, etc.), and configuring
|
|
|
333e3ff |
users. On first boot, Ignition reads its configuration from a source
|
|
|
333e3ff |
of truth (remote URL, network metadata service, hypervisor bridge, etc.)
|
|
|
333e3ff |
and applies the configuration.
|
|
|
333e3ff |
|
|
|
333e3ff |
%{summary}
|
|
|
333e3ff |
|
|
|
44fe06b |
############## devel subpackage ##############
|
|
|
44fe06b |
|
|
|
333e3ff |
%if 0%{?with_devel}
|
|
|
333e3ff |
%package devel
|
|
|
333e3ff |
Summary: %{summary}
|
|
|
333e3ff |
BuildArch: noarch
|
|
|
333e3ff |
|
|
|
333e3ff |
# devel subpackage BuildRequires
|
|
|
333e3ff |
%if 0%{?with_check} && ! 0%{?with_bundled}
|
|
Andrew Jeddeloh |
c14ed24 |
# These buildrequires are only for our tests (check) (sorted)
|
|
|
333e3ff |
BuildRequires: golang(github.com/ajeddeloh/go-json)
|
|
|
333e3ff |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws)
|
|
|
333e3ff |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/awserr)
|
|
|
333e3ff |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials)
|
|
|
333e3ff |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds)
|
|
|
333e3ff |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/ec2metadata)
|
|
|
333e3ff |
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/session)
|
|
|
333e3ff |
BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3)
|
|
|
333e3ff |
BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3/s3manager)
|
|
|
333e3ff |
BuildRequires: golang(github.com/coreos/go-semver/semver)
|
|
|
333e3ff |
BuildRequires: golang(github.com/coreos/go-systemd/dbus)
|
|
|
333e3ff |
BuildRequires: golang(github.com/coreos/go-systemd/unit)
|
|
|
c77c54b |
BuildRequires: golang(github.com/pborman/uuid)
|
|
|
333e3ff |
BuildRequires: golang(github.com/pin/tftp)
|
|
|
333e3ff |
BuildRequires: golang(github.com/sigma/vmw-guestinfo/rpcvmx)
|
|
|
333e3ff |
BuildRequires: golang(github.com/sigma/vmw-guestinfo/vmcheck)
|
|
|
333e3ff |
BuildRequires: golang(github.com/vincent-petithory/dataurl)
|
|
|
333e3ff |
BuildRequires: golang(github.com/vmware/vmw-ovflib)
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
# devel subpackage Requires. This is basically the source code from
|
|
Andrew Jeddeloh |
c14ed24 |
# all of the libraries that ignition imports during build. (sorted)
|
|
|
333e3ff |
Requires: golang(github.com/ajeddeloh/go-json)
|
|
|
333e3ff |
Requires: golang(github.com/aws/aws-sdk-go/aws)
|
|
|
333e3ff |
Requires: golang(github.com/aws/aws-sdk-go/aws/awserr)
|
|
|
333e3ff |
Requires: golang(github.com/aws/aws-sdk-go/aws/credentials)
|
|
|
333e3ff |
Requires: golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds)
|
|
|
333e3ff |
Requires: golang(github.com/aws/aws-sdk-go/aws/ec2metadata)
|
|
|
333e3ff |
Requires: golang(github.com/aws/aws-sdk-go/aws/session)
|
|
|
333e3ff |
Requires: golang(github.com/aws/aws-sdk-go/service/s3)
|
|
|
333e3ff |
Requires: golang(github.com/aws/aws-sdk-go/service/s3/s3manager)
|
|
|
333e3ff |
Requires: golang(github.com/coreos/go-semver/semver)
|
|
|
333e3ff |
Requires: golang(github.com/coreos/go-systemd/dbus)
|
|
|
333e3ff |
Requires: golang(github.com/coreos/go-systemd/unit)
|
|
|
c77c54b |
Requires: golang(github.com/pborman/uuid)
|
|
|
333e3ff |
Requires: golang(github.com/pin/tftp)
|
|
|
333e3ff |
Requires: golang(github.com/sigma/vmw-guestinfo/rpcvmx)
|
|
|
333e3ff |
Requires: golang(github.com/sigma/vmw-guestinfo/vmcheck)
|
|
|
333e3ff |
Requires: golang(github.com/vincent-petithory/dataurl)
|
|
|
333e3ff |
Requires: golang(github.com/vmware/vmw-ovflib)
|
|
|
333e3ff |
|
|
Andrew Jeddeloh |
c14ed24 |
# devel subpackage Provides (sorted)
|
|
|
333e3ff |
Provides: golang(%{import_path}/config/shared/errors) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/config/shared/validations) = %{version}-%{release}
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: golang(%{import_path}/config/shared) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/config/util) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/config/v1/types) = %{version}-%{release}
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: golang(%{import_path}/config/v1) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/config/v2_0/types) = %{version}-%{release}
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: golang(%{import_path}/config/v2_0) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/config/v2_1/types) = %{version}-%{release}
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: golang(%{import_path}/config/v2_1) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/config/v2_2/types) = %{version}-%{release}
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: golang(%{import_path}/config/v2_2) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/config/v2_3_experimental/types) = %{version}-%{release}
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: golang(%{import_path}/config/v2_3_experimental) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/config/validate/astjson) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/config/validate/astnode) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/config/validate/report) = %{version}-%{release}
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: golang(%{import_path}/config/validate) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/negative/files) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/negative/filesystems) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/negative/general) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/negative/networkd) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/negative/partitions) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/negative/regression) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/negative/security) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/negative/timeouts) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/positive/files) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/positive/filesystems) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/positive/general) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/positive/networkd) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/positive/oem) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/positive/partitions) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/positive/passwd) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/positive/regression) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/positive/security) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/positive/systemd) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/positive/timeouts) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/register) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/registry) = %{version}-%{release}
|
|
|
333e3ff |
Provides: golang(%{import_path}/tests/types) = %{version}-%{release}
|
|
Andrew Jeddeloh |
c14ed24 |
Provides: golang(%{import_path}/tests) = %{version}-%{release}
|
|
|
333e3ff |
|
|
|
333e3ff |
%description devel
|
|
|
333e3ff |
%{summary}
|
|
|
333e3ff |
|
|
|
333e3ff |
This package contains library source intended for
|
|
|
333e3ff |
building other packages which use import path with
|
|
|
333e3ff |
%{import_path} prefix.
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
44fe06b |
############## unit-test-devel subpackage ##############
|
|
|
333e3ff |
%if 0%{?with_unit_test} && 0%{?with_devel}
|
|
|
333e3ff |
%package unit-test-devel
|
|
|
333e3ff |
Summary: Unit tests for %{name} package
|
|
|
333e3ff |
%if 0%{?with_check}
|
|
|
333e3ff |
#Here comes all BuildRequires: PACKAGE the unit tests
|
|
|
333e3ff |
#in %%check section need for running
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
# test subpackage tests code from devel subpackage
|
|
|
333e3ff |
Requires: %{name}-devel = %{version}-%{release}
|
|
|
333e3ff |
|
|
|
333e3ff |
%if 0%{?with_check} && ! 0%{?with_bundled}
|
|
|
333e3ff |
BuildRequires: golang(github.com/stretchr/testify/assert)
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
Requires: golang(github.com/stretchr/testify/assert)
|
|
|
333e3ff |
|
|
|
333e3ff |
%description unit-test-devel
|
|
|
333e3ff |
%{summary}
|
|
|
333e3ff |
|
|
|
333e3ff |
This package contains unit tests for project
|
|
|
333e3ff |
providing packages with %{import_path} prefix.
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
44fe06b |
|
|
|
44fe06b |
############## dracut subpackage ##############
|
|
|
44fe06b |
%package dracut
|
|
|
44fe06b |
|
|
|
44fe06b |
Summary: Dracut modules for ignition
|
|
|
44fe06b |
License: BSD
|
|
|
44fe06b |
URL: https://%{dracutprovider_prefix}
|
|
|
b24ebe9 |
Source1: https://%{dracutprovider_prefix}/archive/%{dracutcommit}/%{dracutrepo}-%{dracutshortcommit}.tar.gz
|
|
|
63ee52d |
Requires: %{name} = %{version}-%{release}
|
|
|
44fe06b |
Requires: dracut
|
|
|
44fe06b |
Requires: dracut-network
|
|
|
44fe06b |
BuildArchitectures: noarch
|
|
|
44fe06b |
|
|
|
44fe06b |
%description dracut
|
|
|
44fe06b |
Dracut modules for ignition to enable ignition services to run in the
|
|
|
44fe06b |
initramfs on boot.
|
|
|
44fe06b |
|
|
|
44fe06b |
%files dracut
|
|
|
44fe06b |
%doc README.md
|
|
|
44fe06b |
%license LICENSE
|
|
|
44fe06b |
%{dracutlibdir}/modules.d/30ignition
|
|
|
44fe06b |
%{dracutlibdir}/modules.d/99journald-conf
|
|
|
25ac30c |
%{_sysconfdir}/grub.d/*
|
|
|
25ac30c |
%{_prefix}/lib/systemd/system/*.service
|
|
|
44fe06b |
############## end dracut subpackage ##############
|
|
|
44fe06b |
|
|
|
333e3ff |
%prep
|
|
|
5ddad91 |
# setup command reference: http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html
|
|
|
44fe06b |
# unpack source0 and apply patches
|
|
|
5ddad91 |
%setup -T -b 0 -q -n %{repo}-%{commit}
|
|
|
5597ff7 |
|
|
|
44fe06b |
# unpack source1 (dracut modules)
|
|
|
44fe06b |
%setup -T -D -a 1 -q -n %{repo}-%{commit}
|
|
|
333e3ff |
|
|
|
333e3ff |
%build
|
|
|
333e3ff |
# Set up PWD as a proper import path for go
|
|
|
333e3ff |
mkdir -p src/%{provider}.%{provider_tld}/%{project}
|
|
|
333e3ff |
ln -s ../../../ src/%{import_path}
|
|
|
333e3ff |
|
|
|
333e3ff |
%if ! 0%{?with_bundled}
|
|
|
333e3ff |
export GOPATH=$(pwd):%{gopath}
|
|
|
333e3ff |
%else
|
|
|
333e3ff |
# No dependency directories so far
|
|
|
333e3ff |
export GOPATH=$(pwd):%{gopath}
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
export LDFLAGS=%{ldflags}
|
|
|
333e3ff |
# Tell ignition where to find chroot binary
|
|
|
333e3ff |
export LDFLAGS+=' -X github.com/coreos/ignition/internal/distro.chrootCmd=%{_sbindir}/chroot '
|
|
|
c77c54b |
# Enable SELinux relabeling
|
|
|
c77c54b |
export LDFLAGS+=' -X github.com/coreos/ignition/internal/distro.selinuxRelabel=true '
|
|
|
333e3ff |
|
|
|
333e3ff |
echo "Building ignition..."
|
|
|
333e3ff |
%gobuild -o ./ignition %{import_path}/internal
|
|
|
333e3ff |
|
|
|
333e3ff |
echo "Building ignition-validate..."
|
|
|
333e3ff |
%gobuild -o ./ignition-validate %{import_path}/validate
|
|
|
333e3ff |
|
|
|
333e3ff |
|
|
|
333e3ff |
%install
|
|
|
44fe06b |
# main package
|
|
|
333e3ff |
install -d -p %{buildroot}%{_bindir}
|
|
|
333e3ff |
install -p -m 0755 ./ignition %{buildroot}%{_bindir}
|
|
|
333e3ff |
install -p -m 0755 ./ignition-validate %{buildroot}%{_bindir}
|
|
|
44fe06b |
# dracut subpackage
|
|
|
44fe06b |
install -d -p %{buildroot}/%{dracutlibdir}/modules.d
|
|
|
ec59806 |
install -d -p %{buildroot}/%{_prefix}/lib/systemd/system
|
|
|
ec59806 |
install -d -p %{buildroot}/%{_sysconfdir}/grub.d
|
|
|
25ac30c |
cd %{dracutrepo}-%{dracutcommit}
|
|
|
25ac30c |
rm dracut/README.txt
|
|
|
25ac30c |
cp -r dracut/* %{buildroot}/%{dracutlibdir}/modules.d/
|
|
|
ec59806 |
install -m 0644 -t %{buildroot}/%{_prefix}/lib/systemd/system/ systemd/*
|
|
|
ec59806 |
install -m 0755 -t %{buildroot}/%{_sysconfdir}/grub.d/ grub/*
|
|
|
333e3ff |
|
|
|
333e3ff |
# source codes for building projects
|
|
|
333e3ff |
%if 0%{?with_devel}
|
|
|
333e3ff |
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
|
|
|
333e3ff |
echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list
|
|
|
333e3ff |
# find all *.go but no *_test.go files and generate devel.file-list
|
|
|
333e3ff |
for file in $(find . \( -iname "*.go" -or -iname "*.s" \) \! -iname "*_test.go" | grep -v "vendor") ; do
|
|
|
333e3ff |
dirprefix=$(dirname $file)
|
|
|
333e3ff |
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix
|
|
|
333e3ff |
cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
|
|
|
333e3ff |
echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
|
|
|
333e3ff |
|
|
|
333e3ff |
while [ "$dirprefix" != "." ]; do
|
|
|
333e3ff |
echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >> devel.file-list
|
|
|
333e3ff |
dirprefix=$(dirname $dirprefix)
|
|
|
333e3ff |
done
|
|
|
333e3ff |
done
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
# testing files for this project
|
|
|
333e3ff |
%if 0%{?with_unit_test} && 0%{?with_devel}
|
|
|
333e3ff |
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
|
|
|
333e3ff |
# find all *_test.go files and generate unit-test-devel.file-list
|
|
|
333e3ff |
for file in $(find . -iname "*_test.go" | grep -v "vendor") ; do
|
|
|
333e3ff |
dirprefix=$(dirname $file)
|
|
|
333e3ff |
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$dirprefix
|
|
|
333e3ff |
cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
|
|
|
333e3ff |
echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test-devel.file-list
|
|
|
333e3ff |
|
|
|
333e3ff |
while [ "$dirprefix" != "." ]; do
|
|
|
333e3ff |
echo "%%dir %%{gopath}/src/%%{import_path}/$dirprefix" >> devel.file-list
|
|
|
333e3ff |
dirprefix=$(dirname $dirprefix)
|
|
|
333e3ff |
done
|
|
|
333e3ff |
done
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
%if 0%{?with_devel}
|
|
|
333e3ff |
sort -u -o devel.file-list devel.file-list
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
%check
|
|
|
333e3ff |
%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel}
|
|
|
333e3ff |
%if ! 0%{?with_bundled}
|
|
|
333e3ff |
export GOPATH=%{buildroot}/%{gopath}:%{gopath}
|
|
|
333e3ff |
%else
|
|
|
333e3ff |
# Since we aren't packaging up the vendor directory we need to link
|
|
|
333e3ff |
# back to it somehow. Hack it up so that we can add the vendor
|
|
|
333e3ff |
# directory from BUILD dir as a gopath to be searched when executing
|
|
|
333e3ff |
# tests from the BUILDROOT dir.
|
|
|
333e3ff |
ln -s ./ ./vendor/src # ./vendor/src -> ./vendor
|
|
|
333e3ff |
|
|
|
333e3ff |
export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
%if ! 0%{?gotest:1}
|
|
|
333e3ff |
%global gotest go test
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
%gotest %{import_path}/config/v1
|
|
|
333e3ff |
%gotest %{import_path}/config/v1/types
|
|
|
333e3ff |
%gotest %{import_path}/config/v2_0
|
|
|
333e3ff |
%gotest %{import_path}/config/v2_0/types
|
|
|
333e3ff |
%gotest %{import_path}/config/v2_1
|
|
|
333e3ff |
%gotest %{import_path}/config/v2_1/types
|
|
|
333e3ff |
%gotest %{import_path}/config/v2_2
|
|
|
333e3ff |
%gotest %{import_path}/config/v2_2/types
|
|
|
333e3ff |
%gotest %{import_path}/config/v2_3_experimental
|
|
|
333e3ff |
%gotest %{import_path}/config/v2_3_experimental/types
|
|
|
333e3ff |
%gotest %{import_path}/config/validate
|
|
|
333e3ff |
%gotest %{import_path}/internal/config
|
|
|
333e3ff |
%gotest %{import_path}/internal/exec/stages/files
|
|
|
333e3ff |
%gotest %{import_path}/internal/exec/util
|
|
|
333e3ff |
%gotest %{import_path}/internal/registry
|
|
|
333e3ff |
%gotest %{import_path}/internal/util
|
|
|
333e3ff |
%gotest %{import_path}/tests
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
#define license tag if not already defined
|
|
|
333e3ff |
%{!?_licensedir:%global license %doc}
|
|
|
333e3ff |
|
|
|
333e3ff |
%files
|
|
|
333e3ff |
%license LICENSE
|
|
Andrew Jeddeloh |
c14ed24 |
%doc README.md code-of-conduct.md CONTRIBUTING.md doc/
|
|
|
333e3ff |
%{_bindir}/%{name}
|
|
|
333e3ff |
%{_bindir}/%{name}-validate
|
|
|
333e3ff |
|
|
|
333e3ff |
%if 0%{?with_devel}
|
|
|
333e3ff |
%files devel -f devel.file-list
|
|
|
333e3ff |
%license LICENSE
|
|
Andrew Jeddeloh |
c14ed24 |
%doc README.md code-of-conduct.md CONTRIBUTING.md
|
|
|
333e3ff |
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
%if 0%{?with_unit_test} && 0%{?with_devel}
|
|
|
333e3ff |
%files unit-test-devel -f unit-test-devel.file-list
|
|
|
333e3ff |
%license LICENSE
|
|
Andrew Jeddeloh |
c14ed24 |
%doc README.md code-of-conduct.md CONTRIBUTING.md
|
|
|
333e3ff |
%endif
|
|
|
333e3ff |
|
|
|
333e3ff |
%changelog
|
|
|
baf7e10 |
* Thu Aug 30 2018 Andrew Jeddeloh <andrewjeddeloh@redhat.com> - 0.28.0-1.gitf707912
|
|
Andrew Jeddeloh |
c14ed24 |
- New release 0.28.0
|
|
Andrew Jeddeloh |
c14ed24 |
|
|
|
d2ffbc1 |
* Fri Aug 17 2018 Dusty Mabe <dusty@dustymabe.com> - 0.27.0-3.gitcc7ebe0
|
|
|
d2ffbc1 |
- Bump to ignition-dracut 56aa514
|
|
|
d2ffbc1 |
|
|
|
5597ff7 |
* Wed Aug 15 2018 Jonathan Lebon <jonathan@jlebon.com> - 0.27.0-2.gitcc7ebe0
|
|
|
5597ff7 |
- Backport patch for /root relabeling
|
|
|
5597ff7 |
https://github.com/coreos/ignition/pull/613
|
|
|
5597ff7 |
|
|
|
c77c54b |
* Fri Aug 10 2018 Jonathan Lebon <jonathan@jlebon.com> - 0.27.0-1.gitcc7ebe0
|
|
|
c77c54b |
- New release 0.27.0
|
|
|
c77c54b |
|
|
|
ece2be4 |
* Sat Jul 21 2018 Dusty Mabe <dusty@dustymabe.com> - 0.26.0-0.6.git7610725
|
|
|
ece2be4 |
- Bump to ignition-dracut d664657
|
|
|
ece2be4 |
|
|
|
dc057e0 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-0.5.git7610725
|
|
|
dc057e0 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
dc057e0 |
|
|
|
ec59806 |
* Fri Jun 29 2018 Dusty Mabe <dusty@dustymabe.com> - 0.26.0-0.4.git7610725
|
|
|
ec59806 |
- Fix building on el7 (install -D not working)
|
|
|
ec59806 |
|
|
|
25ac30c |
* Fri Jun 29 2018 Dusty Mabe <dusty@dustymabe.com> - 0.26.0-0.3.git7610725
|
|
|
25ac30c |
- Bump to ignition-dracut 17a201b
|
|
|
25ac30c |
|
|
|
7fb31cc |
* Tue Jun 26 2018 Dusty Mabe <dusty@dustymabe.com> - 0.26.0-0.2.git7610725
|
|
|
7fb31cc |
- Rename dustymabe/bootengine upstrem to dustymabe/ignition-dracut
|
|
|
7fb31cc |
|
|
|
333e3ff |
* Thu Jun 21 2018 Dusty Mabe <dusty@dustymabe.com> - 0.26.0-0.1.git7610725
|
|
|
333e3ff |
- First package for Fedora
|
|
|
333e3ff |
|