Blob Blame Raw
%global dracutlibdir    %{_prefix}/lib/dracut

# https://github.com/coreos/coreos-installer
%global commit          20cdfff4aeebe413dd2c3d11f4714379ab7e0c40
%global shortcommit     %(c=%{commit}; echo ${c:0:7})

Name:      coreos-installer
Version:   0
Release:   6.git%{shortcommit}%{?dist}
Summary:   Installer for CoreOS style systems
License:   GPLv3
URL:       https://github.com/coreos/%{name}
Source0:   %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
BuildArch: noarch


# Keep this up to date with the list in module-setup.sh
# https://github.com/coreos/coreos-installer/blob/master/dracut-module/module-setup.sh
Requires: /usr/bin/awk
Requires: /usr/bin/curl
Requires: /usr/bin/dc
Requires: /usr/bin/dd
Requires: /usr/bin/gpg2
Requires: /usr/bin/grep
Requires: /usr/bin/lsblk
Requires: /usr/bin/ps
Requires: /usr/bin/sha256sum
Requires: /usr/bin/tail
Requires: /usr/bin/tr
Requires: /usr/bin/zcat
Requires: /usr/sbin/blockdev
Requires: /usr/sbin/wipefs


%description
This package contains the coreos-installer script used to install CoreOS 
disk images to bare metal machines.

%prep
%autosetup -n %{name}-%{commit} -p1

%build

%install
# main package
install -d -p %{buildroot}%{_libexecdir}
install -p -m 0755 ./coreos-installer %{buildroot}%{_libexecdir}
# dracut subpackage
install -d -p %{buildroot}/%{dracutlibdir}/modules.d
cp -r dracut/* %{buildroot}/%{dracutlibdir}/modules.d/


%files
%doc README.md
%license LICENSE
%{_libexecdir}/coreos-installer

############## dracut subpackage ##############
%package dracut

Summary:   Dracut modules for CoreOS Installer
License:   GPLv3
Requires:  %{name} = %{version}-%{release}
Requires:  dracut
Requires:  dracut-network

%description dracut
Dracut module that enables the CoreOS installer to run in the
initramfs on boot.

%files dracut
%doc README.md
%license LICENSE
%{dracutlibdir}/modules.d/30coreos-installer
%{dracutlibdir}/modules.d/99emergency-failure
############## end dracut subpackage ##############

%changelog
* Mon May 20 2019 Dusty Mabe <dusty@dustymabe.com> - 0-6.git20cdfff
- Bump to 20cdfff
    * f897ff0 README: add notes for CLI invocation
    * 3870e93 coreos-installer: clear the trap handler after umount
    * 4bc7da9 coreos-installer: move reboot logic to dracut service
    * efe979d coreos-installer: make sure we run as root
    * 666303d coreos-installer: verify boot partition device
    * 520ff67 coreos-installer: make new mount_boot_partition function
    * 4bc70c3 dracut: alphabetical sort of dracut dependencies
    * c4703a0 coreos-installer: add check for image download exit status
    * 33ba62e Use `dd conv=sparse`
    * e5d01c7 30coreos-installer: drop unused inst_modules
    * 7cba048 *: drop dialog

* Mon May 13 2019 Yu Qi Zhang <jerzhang@redhat.com> - 0-5.gitd3fc540
- Bump to gitd3fc540
    * Honor redirects via curl

* Thu Apr 11 2019 Jonathan Lebon <jonathan@jlebon.com> - 0-4.gitc5d98e3
- Bump to c5d98e3
    * Add coreos-installer.target and make default

* Mon Mar 25 2019 Dusty Mabe <dusty@dustymabe.com> - 0-3.git79f52ee
- Bump to 79f52ee
    * persist dracut networking kcmdline opts to firstboot
    * dracut: fix logic error in parse-coreos.sh

* Mon Feb 18 2019 Dusty Mabe <dusty@dustymabe.com> - 0-2.gitd983b20
- Bump to d983b20
    * installer: use ps instead of pidof

* Thu Feb 14 2019 Dusty Mabe <dusty@dustymabe.com> - 0-1.git081d4be
- Initial Commit