Compare commits
129 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c949917070 |
||
|
|
72b7782599 | ||
|
|
c968de9bf5 | ||
|
|
da6e188921 | ||
|
|
72fea80cc7 | ||
|
|
aeab9876fb | ||
|
|
14f8fd597a | ||
|
|
9f25eef1c8 | ||
|
|
9d428601e9 |
||
|
|
09c7f06575 |
||
|
|
5235d93136 | ||
|
|
8c802480f9 | ||
|
|
931d3944d9 | ||
|
|
8a3dc87da9 | ||
|
|
a295b467f5 | ||
|
|
a13fc83299 | ||
|
|
4b614e8a3d | ||
|
|
d185bf7111 | ||
|
|
7411ec9287 | ||
|
|
6a5b176f6c | ||
|
|
2a8319503b | ||
|
|
9041937edf |
||
|
|
dd57fc84af | ||
|
|
dc2702945e | ||
|
|
30fd6a24c3 | ||
|
|
7af239fc87 | ||
|
|
bffea01116 |
||
|
|
03bd1df840 |
||
|
|
6296657697 | ||
|
|
68751ea10a | ||
|
|
5ac6552b77 | ||
|
|
a14d6588b3 | ||
|
|
4e94fa6ca4 | ||
|
|
c4b231c156 | ||
|
|
8d182d2a72 | ||
|
|
bbbbdecd40 | ||
|
|
6b3027138f | ||
|
|
c3699d870c | ||
|
|
b20c1a4257 | ||
|
|
df664a9084 | ||
|
|
6d7106f64f | ||
|
|
d327075d15 | ||
|
|
cdc0d0ebec | ||
|
|
a637ff4bd8 | ||
|
|
03db1836f4 | ||
|
|
d1610f2785 | ||
|
|
9c0b6ff73c | ||
|
|
b614d9bb86 | ||
|
|
14ad4c5490 | ||
|
|
d9634e2f56 | ||
|
|
5873841bec | ||
|
|
de340079e8 | ||
|
|
7332568141 | ||
|
|
5b204a35e8 | ||
|
|
1821283d27 | ||
|
|
1ba00f299b | ||
|
|
a09afd03e2 | ||
|
|
34ba035802 | ||
|
|
28bc9afe30 | ||
|
|
6f840d29b8 | ||
|
|
20eb55a99e | ||
|
|
459a9ea0e0 | ||
|
|
b97215216d | ||
|
|
5da7358135 | ||
|
|
c67462bad1 | ||
|
|
eeb1bb62c6 | ||
|
|
03c2a3f05b | ||
|
|
57fc8be7c9 | ||
|
|
882b9d831a | ||
|
|
d2013a08cf | ||
|
|
3174eb4135 | ||
|
|
5a58c66355 | ||
|
|
053eaac99b | ||
|
|
0332d11d03 | ||
|
|
4a87958080 | ||
|
|
5b5a69d6bb | ||
|
|
f27cf37ade | ||
|
|
ec21a27d4c | ||
|
|
d194305bc2 | ||
|
|
6f5a0f935d | ||
|
|
a67d7056b8 | ||
|
|
2c158893d7 | ||
|
|
e0fdfe16ef | ||
|
|
0e08b0f288 | ||
|
|
fd1940c70e | ||
|
|
3fba3554ec | ||
|
|
b66caa20db | ||
|
|
64396e2988 | ||
|
|
64c18a989e | ||
|
|
480b997359 | ||
|
|
6dedd4b441 |
||
|
|
de97bc03b2 | ||
|
|
8010f80671 | ||
|
|
c6f0f376ed |
||
|
|
4307eea205 | ||
|
|
820aa5ae5f | ||
|
|
e279304633 | ||
|
|
6ab21c400a | ||
|
|
1b6d133ca1 | ||
|
|
1e620a001f | ||
|
|
12436a7180 | ||
|
|
895ede441f | ||
|
|
1017665935 |
||
|
|
367cb35982 | ||
|
|
6201cd37bf | ||
|
|
a995f0230b | ||
|
|
37b7c93f07 | ||
|
|
368a09bf73 | ||
|
|
3c5c0bc444 | ||
|
|
3c6023281c | ||
|
|
3b622206f6 | ||
|
|
eb718b540d | ||
|
|
a08755a3b9 | ||
|
|
f83f249db4 | ||
|
|
422cf8579b | ||
|
|
6ebb45a48e | ||
|
|
127a4b1ca3 | ||
|
|
a614d3e5a0 | ||
|
|
b3b10ac7e4 | ||
|
|
5048cceb49 | ||
|
|
cfcfe34c36 | ||
|
|
5df9bc031d | ||
|
|
e25383b0a1 | ||
|
|
cbc266db72 | ||
|
|
6e12473d8f | ||
|
|
25e842489a | ||
|
|
edf3b2635a | ||
|
|
0b9a765df3 | ||
|
|
d551c56f90 |
13 changed files with 816 additions and 1010 deletions
56
.gitignore
vendored
56
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
/ignition-40c0b57.tar.gz
|
||||
/ignition-7610725.tar.gz
|
||||
/ignition-dracut-d664657.tar.gz
|
||||
/ignition-cc7ebe0.tar.gz
|
||||
|
|
@ -17,3 +18,58 @@
|
|||
/ignition-f59a653.tar.gz
|
||||
/ignition-dracut-0d09097.tar.gz
|
||||
/ignition-dracut-73ec3fc.tar.gz
|
||||
/ignition-dracut-ec9a492.tar.gz
|
||||
/ignition-906cf04.tar.gz
|
||||
/ignition-dracut-85f2e65.tar.gz
|
||||
/ignition-910e6c6.tar.gz
|
||||
/ignition-dracut-df88988.tar.gz
|
||||
/ignition-0c1da80.tar.gz
|
||||
/ignition-e75cf24.tar.gz
|
||||
/ignition-dracut-343b886.tar.gz
|
||||
/ignition-dracut-d63f76f.tar.gz
|
||||
/ignition-641ec6a.tar.gz
|
||||
/ignition-dracut-3d08487.tar.gz
|
||||
/ignition-dracut-8bf2cbd.tar.gz
|
||||
/ignition-a8f91fa.tar.gz
|
||||
/ignition-dracut-736459e.tar.gz
|
||||
/ignition-dracut-14808e2.tar.gz
|
||||
/ignition-2d3ff58.tar.gz
|
||||
/ignition-dracut-f67d587.tar.gz
|
||||
/ignition-dracut-793d0ef.tar.gz
|
||||
/ignition-dracut-6136be3.tar.gz
|
||||
/ignition-dracut-390779d.tar.gz
|
||||
/ignition-ee616d5.tar.gz
|
||||
/ignition-dracut-7ff38d9.tar.gz
|
||||
/ignition-dracut-8f5d1ec.tar.gz
|
||||
/ignition-dracut-bdf0a65.tar.gz
|
||||
/ignition-d18bf90.tar.gz
|
||||
/ignition-dracut-e75fef0.tar.gz
|
||||
/ignition-5260a5b.tar.gz
|
||||
/ignition-dracut-6b1d128.tar.gz
|
||||
/ignition-0d6f3e5.tar.gz
|
||||
/ignition-947598e.tar.gz
|
||||
/ignition-5be43fd.tar.gz
|
||||
/ignition-db4d30d.tar.gz
|
||||
/ignition-c733d23.tar.gz
|
||||
/ignition-1d56dc8.tar.gz
|
||||
/ignition-2.9.0.tar.gz
|
||||
/ignition-2.10.1.tar.gz
|
||||
/ignition-2.11.0.tar.gz
|
||||
/ignition-2.12.0.tar.gz
|
||||
/ignition-2.13.0.tar.gz
|
||||
/ignition-2.14.0.tar.gz
|
||||
/ignition-2.15.0.tar.gz
|
||||
/ignition-edge-a3a8f0a.tar.gz
|
||||
/ignition-2.16.1.tar.gz
|
||||
/ignition-2.16.2.tar.gz
|
||||
/ignition-2.17.0.tar.gz
|
||||
/ignition-2.18.0.tar.gz
|
||||
/ignition-2.19.0.tar.gz
|
||||
/ignition-2.20.0.tar.gz
|
||||
/ignition-edge-a258749.tar.gz
|
||||
/ignition-2.21.0.tar.gz
|
||||
/ignition-2.22.0.tar.gz
|
||||
/ignition-2.23.0.tar.gz
|
||||
/ignition-2.24.0.tar.gz
|
||||
/ignition-2.25.0.tar.gz
|
||||
/ignition-2.25.1.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
From 6e7a0683788906bb7ae21a708d5519481d6d058f Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Lebon <jonathan@jlebon.com>
|
||||
Date: Wed, 20 Mar 2019 16:14:29 -0400
|
||||
Subject: [PATCH] stages/files: Also relabel subuid/subgid files
|
||||
|
||||
Those get touched by `useradd` and so we need relabeling if we added any
|
||||
users or groups.
|
||||
|
||||
Closes: #762
|
||||
---
|
||||
internal/exec/stages/files/passwd.go | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/internal/exec/stages/files/passwd.go b/internal/exec/stages/files/passwd.go
|
||||
index 1ae0f02..58fde2e 100644
|
||||
--- a/internal/exec/stages/files/passwd.go
|
||||
+++ b/internal/exec/stages/files/passwd.go
|
||||
@@ -38,6 +38,8 @@ func (s *stage) createPasswd(config types.Config) error {
|
||||
"/etc/group*",
|
||||
"/etc/shadow*",
|
||||
"/etc/gshadow*",
|
||||
+ "/etc/subuid*",
|
||||
+ "/etc/subgid*",
|
||||
"/etc/.pwd.lock",
|
||||
"/home",
|
||||
"/root",
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
From 41faa514b2598386c3a0c8a90ebd207e282cd1d5 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Nguyen <mnguyen@redhat.com>
|
||||
Date: Fri, 1 Mar 2019 12:10:47 -0500
|
||||
Subject: [PATCH] support coreos.config.* and ignition.config.*
|
||||
|
||||
This is backwards compatibility work for spec2x following the changes
|
||||
made in #663 to make options more distribution neutral.
|
||||
|
||||
ref: https://github.com/coreos/ignition/pull/663
|
||||
---
|
||||
internal/providers/cmdline/cmdline.go | 13 ++++++-------
|
||||
internal/providers/vmware/vmware_amd64.go | 20 ++++++++++++++++----
|
||||
2 files changed, 22 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/internal/providers/cmdline/cmdline.go b/internal/providers/cmdline/cmdline.go
|
||||
index 0bdba2d..1a393fb 100644
|
||||
--- a/internal/providers/cmdline/cmdline.go
|
||||
+++ b/internal/providers/cmdline/cmdline.go
|
||||
@@ -32,7 +32,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
- cmdlineUrlFlag = "coreos.config.url"
|
||||
+ cmdlineUrlFlagLegacy = "coreos.config.url"
|
||||
+ cmdlineUrlFlag = "ignition.config.url"
|
||||
)
|
||||
|
||||
func FetchConfig(f resource.Fetcher) (types.Config, report.Report, error) {
|
||||
@@ -83,12 +84,10 @@ func parseCmdline(cmdline []byte) (url string) {
|
||||
parts := strings.SplitN(strings.TrimSpace(arg), "=", 2)
|
||||
key := parts[0]
|
||||
|
||||
- if key != cmdlineUrlFlag {
|
||||
- continue
|
||||
- }
|
||||
-
|
||||
- if len(parts) == 2 {
|
||||
- url = parts[1]
|
||||
+ if key == cmdlineUrlFlagLegacy || key == cmdlineUrlFlag {
|
||||
+ if len(parts) == 2 {
|
||||
+ url = parts[1]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/internal/providers/vmware/vmware_amd64.go b/internal/providers/vmware/vmware_amd64.go
|
||||
index e26baf0..9c0ffc7 100644
|
||||
--- a/internal/providers/vmware/vmware_amd64.go
|
||||
+++ b/internal/providers/vmware/vmware_amd64.go
|
||||
@@ -54,6 +54,8 @@ func fetchRawConfig(f resource.Fetcher) (config, error) {
|
||||
|
||||
var ovfData string
|
||||
var ovfEncoding string
|
||||
+ var ovfDataKey string
|
||||
+ var ovfEncodingKey string
|
||||
|
||||
ovfEnv, err := info.String("ovfenv", "")
|
||||
if err != nil {
|
||||
@@ -65,17 +67,27 @@ func fetchRawConfig(f resource.Fetcher) (config, error) {
|
||||
f.Logger.Warning("failed to parse OVF environment: %v. Continuing...", err)
|
||||
}
|
||||
|
||||
- ovfData = env.Properties["guestinfo.coreos.config.data"]
|
||||
- ovfEncoding = env.Properties["guestinfo.coreos.config.data.encoding"]
|
||||
+ if _, ok := env.Properties["guestinfo.coreos.config.data"]; ok {
|
||||
+ ovfDataKey = "guestinfo.coreos.config.data"
|
||||
+ ovfEncodingKey = "guestinfo.coreos.config.data.encoding"
|
||||
+ } else if _, ok := env.Properties["guestinfo.ignition.config.data"]; ok {
|
||||
+ ovfDataKey = "guestinfo.ignition.config.data"
|
||||
+ ovfEncodingKey = "guestinfo.ignition.config.data.encoding"
|
||||
+ } else {
|
||||
+ f.Logger.Debug("failed to find guestinfo ignition properties")
|
||||
+ }
|
||||
+
|
||||
+ ovfData = env.Properties[ovfDataKey]
|
||||
+ ovfEncoding = env.Properties[ovfEncodingKey]
|
||||
}
|
||||
|
||||
- data, err := info.String("coreos.config.data", ovfData)
|
||||
+ data, err := info.String(ovfDataKey[len("guestinfo."):], ovfData)
|
||||
if err != nil {
|
||||
f.Logger.Debug("failed to fetch config: %v", err)
|
||||
return config{}, err
|
||||
}
|
||||
|
||||
- encoding, err := info.String("coreos.config.data.encoding", ovfEncoding)
|
||||
+ encoding, err := info.String(ovfEncodingKey[len("guestinfo."):], ovfEncoding)
|
||||
if err != nil {
|
||||
f.Logger.Debug("failed to fetch config encoding: %v", err)
|
||||
return config{}, err
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -xeuo pipefail
|
||||
rpmspec -P ignition.spec | grep 'Source1:' | tr -s ' ' | cut -d ' ' -f 2 | xargs wget
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -xeuo pipefail
|
||||
rpmspec -P ignition.spec | grep 'Source0:' | tr -s ' ' | cut -d ' ' -f 2 | xargs wget
|
||||
84
go-mods-to-bundled-provides.py
Executable file
84
go-mods-to-bundled-provides.py
Executable file
|
|
@ -0,0 +1,84 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
'''
|
||||
Tiny dumb script that generates virtual bundled `Provides` from a repo that
|
||||
uses go modules and vendoring.
|
||||
'''
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
|
||||
def main():
|
||||
repos = get_repos_from_go_mod()
|
||||
print_provides_from_modules_txt(repos)
|
||||
|
||||
|
||||
def get_repos_from_go_mod():
|
||||
repos = {}
|
||||
in_reqs = False
|
||||
for line in open('go.mod'):
|
||||
line = line.strip()
|
||||
if in_reqs and line.startswith(')'):
|
||||
break
|
||||
if not in_reqs:
|
||||
if line.startswith('require ('):
|
||||
in_reqs = True
|
||||
continue
|
||||
req = line.split()
|
||||
|
||||
repo = req[0]
|
||||
tag = req[1]
|
||||
|
||||
repos[repo] = go_mod_tag_to_rpm_provides_version(tag)
|
||||
|
||||
return repos
|
||||
|
||||
|
||||
def go_mod_tag_to_rpm_provides_version(tag):
|
||||
|
||||
# go.mod tags are either exact git tags, or may be "pseudo-versions". We
|
||||
# want to convert these tags to something resembling a version string that
|
||||
# RPM won't fail on. For more information, see
|
||||
# https://golang.org/cmd/go/#hdr-Pseudo_versions and following sections.
|
||||
|
||||
# trim off any +incompatible
|
||||
if tag.endswith('+incompatible'):
|
||||
tag = tag[:-len('+incompatible')]
|
||||
|
||||
# git tags are normally of the form v$VERSION
|
||||
if tag.startswith('v'):
|
||||
tag = tag[1:]
|
||||
|
||||
# is this a pseudo-version? e.g. v0.0.0-20181031085051-9002847aa142
|
||||
m = re.match("(.*)-([0-9.]+)-([a-f0-9]{12})", tag)
|
||||
if m:
|
||||
# rpm doesn't like multiple dashes in the version, so just merge the
|
||||
# timestamp and the commit checksum into the "release" field
|
||||
tag = f"{m.group(1)}-{m.group(2)}.git{m.group(3)}"
|
||||
|
||||
return tag
|
||||
|
||||
|
||||
def print_provides_from_modules_txt(repos):
|
||||
|
||||
for line in open('vendor/modules.txt'):
|
||||
if line.startswith('#'):
|
||||
continue
|
||||
gopkg = line.strip()
|
||||
repo = lookup_repo_for_pkg(repos, gopkg)
|
||||
if not repo:
|
||||
# must be a pkg for tests only; ignore
|
||||
continue
|
||||
tag = repos[repo]
|
||||
print(f"Provides: bundled(golang({gopkg})) = {tag}")
|
||||
|
||||
|
||||
def lookup_repo_for_pkg(repos, gopkg):
|
||||
for repo in repos:
|
||||
if gopkg.startswith(repo):
|
||||
return repo
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
12
ignition.rpmlintrc
Normal file
12
ignition.rpmlintrc
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Ignition sources have duplicate files because of how spec versioning is
|
||||
# implemented
|
||||
addFilter("ignition-debugsource.x86_64: E: files-duplicated-waste")
|
||||
|
||||
# -validate-redistributable is supposed to have binaries in it, and
|
||||
# doesn't really need docs since it isn't user-facing
|
||||
addFilter("ignition-validate-redistributable.noarch: E: arch-independent-package-contains-binary-or-object")
|
||||
addFilter("ignition-validate-redistributable.noarch: W: no-documentation")
|
||||
|
||||
# This is documented as optional
|
||||
# https://fedoraproject.org/wiki/Upgrade_paths_%E2%80%94_renaming_or_splitting_packages#Do_I_need_to_Provide_my_old_package_names.3F
|
||||
addFilter("ignition-validate-redistributable.noarch: W: obsolete-not-provided ignition-validate-nonlinux")
|
||||
1081
ignition.spec
1081
ignition.spec
File diff suppressed because it is too large
Load diff
|
|
@ -1,348 +0,0 @@
|
|||
# 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
|
||||
|
||||
|
||||
# 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)
|
||||
|
||||
# Generate devel rpm
|
||||
%global with_devel 1
|
||||
# Build project from bundled dependencies
|
||||
%global with_bundled 0
|
||||
# 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
|
||||
|
||||
%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}
|
||||
%global commit f7079129b8651ac51dba14c3af65692bb413c1dd
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
|
||||
Name: golang-%{provider}-%{project}-%{repo}
|
||||
Version: 0
|
||||
Release: 0.1.git%{shortcommit}%{?dist}
|
||||
Summary: !!!!FILL!!!!
|
||||
# Detected licences
|
||||
# - Unknown at 'LICENSE'
|
||||
License: !!!!FILL!!!!
|
||||
URL: https://%{provider_prefix}
|
||||
Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
|
||||
|
||||
# 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}
|
||||
|
||||
%if ! 0%{?with_bundled}
|
||||
# validate/main.go
|
||||
BuildRequires: golang(github.com/spf13/cobra)
|
||||
|
||||
# Remaining dependencies not included in main packages
|
||||
BuildRequires: golang(github.com/vmware/vmw-ovflib)
|
||||
BuildRequires: golang(github.com/coreos/go-systemd/unit)
|
||||
BuildRequires: golang(github.com/coreos/go-semver/semver)
|
||||
BuildRequires: golang(github.com/sigma/vmw-guestinfo/vmcheck)
|
||||
BuildRequires: golang(github.com/pin/tftp)
|
||||
BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3/s3manager)
|
||||
BuildRequires: golang(github.com/sigma/vmw-guestinfo/rpcvmx)
|
||||
BuildRequires: golang(github.com/coreos/go-systemd/dbus)
|
||||
BuildRequires: golang(github.com/aws/aws-sdk-go/service/s3)
|
||||
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/session)
|
||||
BuildRequires: golang(github.com/vincent-petithory/dataurl)
|
||||
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/awserr)
|
||||
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds)
|
||||
BuildRequires: golang(github.com/ajeddeloh/go-json)
|
||||
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/credentials)
|
||||
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/ec2metadata)
|
||||
BuildRequires: golang(github.com/pborman/uuid)
|
||||
BuildRequires: golang(github.com/aws/aws-sdk-go/aws)
|
||||
%endif
|
||||
|
||||
%description
|
||||
%{summary}
|
||||
|
||||
%if 0%{?with_devel}
|
||||
%package devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%if 0%{?with_check} && ! 0%{?with_bundled}
|
||||
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)
|
||||
BuildRequires: golang(github.com/pborman/uuid)
|
||||
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
|
||||
|
||||
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)
|
||||
Requires: golang(github.com/pborman/uuid)
|
||||
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)
|
||||
|
||||
Provides: golang(%{import_path}/config/shared) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/shared/errors) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/shared/validations) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/util) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/v1) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/v1/types) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/v2_0) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/v2_0/types) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/v2_1) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/v2_1/types) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/v2_2) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/v2_2/types) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/v2_3_experimental) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/v2_3_experimental/types) = %{version}-%{release}
|
||||
Provides: golang(%{import_path}/config/validate) = %{version}-%{release}
|
||||
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}
|
||||
Provides: golang(%{import_path}/tests) = %{version}-%{release}
|
||||
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}
|
||||
|
||||
%description devel
|
||||
%{summary}
|
||||
|
||||
This package contains library source intended for
|
||||
building other packages which use import path with
|
||||
%{import_path} prefix.
|
||||
%endif
|
||||
|
||||
%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
|
||||
|
||||
%prep
|
||||
%setup -q -n %{repo}-%{commit}
|
||||
|
||||
%build
|
||||
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
|
||||
|
||||
#%gobuild -o bin/internal %{import_path}/internal
|
||||
#%gobuild -o bin/internal/util/tools/docs %{import_path}/internal/util/tools/docs
|
||||
#%gobuild -o bin/tests/stubs/id-stub %{import_path}/tests/stubs/id-stub
|
||||
#%gobuild -o bin/tests/stubs/useradd-stub %{import_path}/tests/stubs/useradd-stub
|
||||
#%gobuild -o bin/tests/stubs/usermod-stub %{import_path}/tests/stubs/usermod-stub
|
||||
#%gobuild -o bin/validate %{import_path}/validate
|
||||
|
||||
%install
|
||||
install -d -p %{buildroot}%{_bindir}
|
||||
#install -p -m 0755 bin/internal %{buildroot}%{_bindir}
|
||||
#install -p -m 0755 bin/internal/util/tools/docs %{buildroot}%{_bindir}
|
||||
#install -p -m 0755 bin/tests/stubs/id-stub %{buildroot}%{_bindir}
|
||||
#install -p -m 0755 bin/tests/stubs/useradd-stub %{buildroot}%{_bindir}
|
||||
#install -p -m 0755 bin/tests/stubs/usermod-stub %{buildroot}%{_bindir}
|
||||
#install -p -m 0755 bin/validate %{buildroot}%{_bindir}
|
||||
|
||||
# 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
|
||||
%doc README.md code-of-conduct.md CONTRIBUTING.md
|
||||
#%{_bindir}/internal
|
||||
#%{_bindir}/internal/util/tools/docs
|
||||
#%{_bindir}/tests/stubs/id-stub
|
||||
#%{_bindir}/tests/stubs/useradd-stub
|
||||
#%{_bindir}/tests/stubs/usermod-stub
|
||||
#%{_bindir}/validate
|
||||
|
||||
%if 0%{?with_devel}
|
||||
%files devel -f devel.file-list
|
||||
%license LICENSE
|
||||
%doc README.md code-of-conduct.md CONTRIBUTING.md
|
||||
%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
|
||||
%doc README.md code-of-conduct.md CONTRIBUTING.md
|
||||
%endif
|
||||
|
||||
%changelog* Thu Aug 30 2018 root - 0-0.1.gitf707912
|
||||
- First package for Fedora
|
||||
|
||||
61
notes.txt
61
notes.txt
|
|
@ -1,61 +0,0 @@
|
|||
#grab gofed from https://github.com/gofed/gofed
|
||||
#follow instructions for install
|
||||
|
||||
#choose which version of the repo you want to build. For ignition it was 0.2.6 and the commit was 76107251acd117c6d3e5b4dae2b47f82f944984b
|
||||
|
||||
[vagrant@vanilla-f28 ~]$ gofed repo2spec --detect github.com/coreos/ignition --commit 76107251acd117c6d3e5b4dae2b47f82f944984b --with-extra --with-build -f
|
||||
Repo URL: github.com/coreos/ignition
|
||||
Commit: 76107251acd117c6d3e5b4dae2b47f82f944984b
|
||||
Name: golang-github-coreos-ignition
|
||||
|
||||
(1/4) Checking if the package already exists in PkgDB
|
||||
(2/4) Collecting data
|
||||
(3/4) Generating spec file
|
||||
(4/4) Discovering golang dependencies
|
||||
Discovering package dependencies
|
||||
Class: github.com/ajeddeloh/go-json (golang-github-ajeddeloh-go-json) PkgDB=False
|
||||
Class: github.com/aws/aws-sdk-go (golang-github-aws-aws-sdk-go) PkgDB=True
|
||||
Class: github.com/coreos/go-semver (golang-github-coreos-go-semver) PkgDB=True
|
||||
Class: github.com/coreos/go-systemd (golang-github-coreos-go-systemd) PkgDB=True
|
||||
Class: github.com/pin/tftp (golang-github-pin-tftp) PkgDB=False
|
||||
Class: github.com/sigma/vmw-guestinfo (golang-github-sigma-vmw-guestinfo) PkgDB=False
|
||||
Class: github.com/vincent-petithory/dataurl (golang-github-vincent-petithory-dataurl) PkgDB=False
|
||||
Class: github.com/vmware/vmw-ovflib (golang-github-vmware-vmw-ovflib) PkgDB=False
|
||||
|
||||
Discovering test dependencies
|
||||
Class: github.com/stretchr/testify (golang-github-stretchr-testify) PkgDB=True
|
||||
|
||||
Spec file golang-github-coreos-ignition.spec at /home/vagrant/golang-github-coreos-ignition
|
||||
|
||||
# spec file now at /home/vagrant/golang-github-coreos-ignition/golang-github-coreos-ignition.spec
|
||||
|
||||
# go through and fix things up - see diff
|
||||
|
||||
# generate bundled provides by copying/using parsedeps.go to the ignition
|
||||
# source folder and then running `go run parsedeps.go`. copy into spec file
|
||||
# should be done by gofed at some point - https://github.com/gofed/gofed/issues/42
|
||||
|
||||
# grab source tarball
|
||||
# rpmspec -P ignition.spec | grep Source0
|
||||
# pushd $HOME/rpmbuild/SOURCES/
|
||||
# curl -L -O $URL
|
||||
# popd
|
||||
|
||||
|
||||
# build RPM
|
||||
$ rpmbuild -ba ignition.spec
|
||||
|
||||
# find a srpm in `$HOME/rpmbuild/SRPMS`
|
||||
# find a RPM in `$HOME/rpmbuild/RPM/arch/`
|
||||
# see if the dependencies are proper
|
||||
|
||||
$ rpm -qpR $HOME/rpmbuild/RPMS/x86_64/ignition-0.26.0-0.1.git7610725.fc28.x86_64.rpm
|
||||
|
||||
|
||||
# setup to run koji, ref: https://fedoraproject.org/wiki/Using_the_Koji_build_system
|
||||
$ fedora-packager-setup
|
||||
$ kinit <username>@FEDORAPROJECT.ORG
|
||||
|
||||
|
||||
# to build it on koji run:
|
||||
$ koji build --scratch rawhide /path/to/srpm/ignition-0.26.0-0.1.git7610725.fc28.src.rpm
|
||||
47
parsedeps.go
47
parsedeps.go
|
|
@ -1,47 +0,0 @@
|
|||
// Helper for parsing glide.lock file and spitting out
|
||||
// bundled provides statements for an rpm spec file.
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"path"
|
||||
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
type Import struct {
|
||||
Name string
|
||||
Version string
|
||||
Subpackages []string
|
||||
}
|
||||
|
||||
type Glide struct {
|
||||
Hash string
|
||||
Updated string
|
||||
Imports []Import
|
||||
TestImports []Import
|
||||
}
|
||||
|
||||
func main() {
|
||||
yamlFile, err := ioutil.ReadFile("glide.lock")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
var glide Glide
|
||||
err = yaml.Unmarshal(yamlFile, &glide)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
for _, imp := range glide.Imports {
|
||||
// we need format like this:
|
||||
// Provides: bundled(golang(github.com/coreos/go-oidc/oauth2)) = %{version}-5cf2aa52da8c574d3aa4458f471ad6ae2240fe6b
|
||||
for _, subp := range imp.Subpackages {
|
||||
name := path.Join(imp.Name, subp)
|
||||
fmt.Printf("Provides: bundled(golang(%s)) = %s-%s\n", name, "%{version}", imp.Version)
|
||||
}
|
||||
}
|
||||
}
|
||||
5
rpminspect.yaml
Normal file
5
rpminspect.yaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
debuginfo:
|
||||
ignore:
|
||||
- /usr/share/ignition/ignition-validate-*-unknown-linux-gnu-static
|
||||
|
||||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (ignition-f59a653.tar.gz) = fd198a24536c037c27ab99546e94027b08c3634724324b972828ee48f8ab9e1ba4ec1bd49d6aba6337381754cb30025c5311ab85da17c645eb7503b62e9529ff
|
||||
SHA512 (ignition-dracut-73ec3fc.tar.gz) = 8583f9de45607c57dded4ece4b395e09a39b74b00da573e5915889025e577998239c16935159eb4651f5cbbeb42ae2e3562e826fef501cf9d8199e1faec212f0
|
||||
SHA512 (ignition-2.25.1.tar.gz) = 8ca2bd96cdff8986e09371a9357975883c655dc6c16eb481ffd2772de37515fe64060ca575b3e4ac25a626b4701c65e5f5a8707ff62f37791f65ec321f7bb3a6
|
||||
SHA512 (ignition-edge-a258749.tar.gz) = 0566807f7f4cbf9715566c8c39ba699df00f4ee5d579269c695a4af13d75a4e1f4639b54be85d0703373221d67a3ad0c532c0e075831316e3eed7a33cf316833
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue