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