Compare commits

..

No commits in common. "rawhide" and "f29" have entirely different histories.

12 changed files with 907 additions and 839 deletions

57
.gitignore vendored
View file

@ -1,4 +1,3 @@
/ignition-40c0b57.tar.gz
/ignition-7610725.tar.gz
/ignition-dracut-d664657.tar.gz
/ignition-cc7ebe0.tar.gz
@ -21,59 +20,3 @@
/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
/ignition-2.26.0.tar.gz
/ignition-2.27.0.tar.gz
/ignition-edge-6be7c94.tar.gz
/ignition-edge-b6c8245.tar.gz

View file

@ -0,0 +1,77 @@
From 5d57d6107a56fecfe9b6c8bb1a06f2dd1889a7e0 Mon Sep 17 00:00:00 2001
From: Benjamin Gilbert <bgilbert@redhat.com>
Date: Wed, 27 Mar 2019 17:29:15 -0400
Subject: [PATCH] stages/files: fix unit relabeling to exclude DestDir
Non-runtime units and dropins need to be relabeled relative to DestDir,
since relabeling happens in the real root.
e42ecb08f9b5 addressed this for files.
---
internal/exec/stages/files/units.go | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/internal/exec/stages/files/units.go b/internal/exec/stages/files/units.go
index 98c0797..c73141c 100644
--- a/internal/exec/stages/files/units.go
+++ b/internal/exec/stages/files/units.go
@@ -15,7 +15,9 @@
package files
import (
+ "fmt"
"path/filepath"
+ "strings"
"github.com/coreos/ignition/config/v3_0/types"
"github.com/coreos/ignition/internal/distro"
@@ -85,6 +87,14 @@ func (s *stage) writeSystemdUnit(unit types.Unit, runtime bool) error {
s.Logger.Crit("error converting systemd dropin: %v", err)
return err
}
+ relabelPath := f.Node.Path
+ if !runtime {
+ // trim off prefix since this needs to be relative to the sysroot
+ if !strings.HasPrefix(f.Node.Path, s.DestDir) {
+ panic(fmt.Sprintf("Dropin path %s isn't under prefix %s", f.Node.Path, s.DestDir))
+ }
+ relabelPath = f.Node.Path[len(s.DestDir):]
+ }
if err := s.Logger.LogOp(
func() error { return u.PerformFetch(f) },
"writing systemd drop-in %q at %q", dropin.Name, f.Node.Path,
@@ -92,7 +102,7 @@ func (s *stage) writeSystemdUnit(unit types.Unit, runtime bool) error {
return err
}
if !relabeledDropinDir {
- s.relabel(filepath.Dir("/" + f.Node.Path))
+ s.relabel(filepath.Dir(relabelPath))
relabeledDropinDir = true
}
}
@@ -106,13 +116,21 @@ func (s *stage) writeSystemdUnit(unit types.Unit, runtime bool) error {
s.Logger.Crit("error converting unit: %v", err)
return err
}
+ relabelPath := f.Node.Path
+ if !runtime {
+ // trim off prefix since this needs to be relative to the sysroot
+ if !strings.HasPrefix(f.Node.Path, s.DestDir) {
+ panic(fmt.Sprintf("Unit path %s isn't under prefix %s", f.Node.Path, s.DestDir))
+ }
+ relabelPath = f.Node.Path[len(s.DestDir):]
+ }
if err := s.Logger.LogOp(
func() error { return u.PerformFetch(f) },
"writing unit %q at %q", unit.Name, f.Node.Path,
); err != nil {
return err
}
- s.relabel("/" + f.Node.Path)
+ s.relabel(relabelPath)
return nil
}, "processing unit %q", unit.Name)
--
2.20.1

View file

@ -1 +0,0 @@
AuthorizedKeysFile=.ssh/authorized_keys .ssh/authorized_keys.d/*

3
download-ignition-dracut.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
set -xeuo pipefail
rpmspec -P ignition.spec | grep 'Source1:' | tr -s ' ' | cut -d ' ' -f 2 | xargs wget

3
download-ignition.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
set -xeuo pipefail
rpmspec -P ignition.spec | grep 'Source0:' | tr -s ' ' | cut -d ' ' -f 2 | xargs wget

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/bin/python3
'''
Tiny dumb script that generates virtual bundled `Provides` from a repo that
@ -51,7 +51,7 @@ def go_mod_tag_to_rpm_provides_version(tag):
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)
m = re.match("(.*)-([0-9]{14})-([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

View file

@ -1,20 +0,0 @@
# 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")
# "transpiler" is the correct term for what butane does
addFilter("butane.*: E: spelling-error.*transpiler")
# -redistributable packages have binaries but are noarch by design,
# and don't need docs since they aren't user-facing
addFilter("butane-redistributable.noarch: E: arch-independent-package-contains-binary-or-object")
addFilter("butane-redistributable.noarch: W: no-documentation")

File diff suppressed because it is too large Load diff

348
ignition.spec.orig Normal file
View file

@ -0,0 +1,348 @@
# 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 Normal file
View file

@ -0,0 +1,61 @@
#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 go-mods-to-bundled-provides.py to
# the ignition source folder and then running it. 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

View file

@ -1,5 +0,0 @@
---
debuginfo:
ignore:
- /usr/share/ignition/ignition-validate-*-unknown-linux-gnu-static

View file

@ -1,2 +1,2 @@
SHA512 (ignition-2.27.0.tar.gz) = 7f1ad2da57a196ba0d01b7f2f886f1484edb1f48b8f295f1ad9a4ef9ba2801f0d9d3e9701ec266b4a2446bbf182c50c6733b5ca069ac0c749d77ed342d6a6a9e
SHA512 (ignition-edge-b6c8245.tar.gz) = fb823a7c87c7014fcb38566fcd41b11bd38ff27e1ca2bfe6b76111bbabab0d917bc7ba56af450eab434d1907a056b0b1a0fcd6d29e456a4ba2985ddf74efb155
SHA512 (ignition-dracut-85f2e65.tar.gz) = b3bbfcc79c26154466cc472eab84b46b90d1847156616e3b2f85e5144b45836eb263f5e3d659ad590a43f949bad38f3760114c9f556274a76a7abf46e976a294
SHA512 (ignition-906cf04.tar.gz) = df203ac05a06089b9b5db52627e139c8a0a5b54e60fc67a4d6eeac869a5170ae710f5e7fa3a92ccea8e440a1b1d88da6202d7d4910572d0e747b0cce695eaa60