This repository has been archived by the owner on Jan 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
WIP: Split into subpackages #12
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fs-base | ||
fs-maipo | ||
fs-ootpa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
all: fs-maipo fs-ootpa | ||
|
||
fs-base: | ||
./build-base.sh | ||
|
||
fs-maipo: fs-base | ||
./build-maipo.sh | ||
|
||
fs-ootpa: fs-base | ||
./build-ootpa.sh | ||
|
||
clean: | ||
rm fs-{base,maipo,ootpa} -rf | ||
|
||
install: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#!/usr/bin/bash | ||
set -xeuo pipefail | ||
srcdir=$(cd $(dirname $0) && pwd) | ||
rm fs-base fs-base.tmp -rf | ||
mkdir -p fs-base.tmp | ||
cd fs-base.tmp | ||
|
||
base_release_version=7 | ||
|
||
mkdir -m 0755 -p usr/lib | ||
# create os-release | ||
cat << EOF >> usr/lib/os-release | ||
ID="rhcos" | ||
ID_LIKE="rhel fedora" | ||
ANSI_COLOR="0;31" | ||
HOME_URL="https://www.redhat.com/" | ||
BUG_REPORT_URL="https://bugzilla.redhat.com/" | ||
EOF | ||
mkdir -m 0755 -p etc | ||
ln -s ../usr/lib/os-release etc/os-release | ||
|
||
# create /etc/issue and /etc/issue.net | ||
cat > usr/lib/issue <<'EOF' | ||
\S \S{VERSION_ID} | ||
EOF | ||
ln -sr usr/lib/issue etc/issue | ||
ln -sr usr/lib/issue etc/issue.net | ||
|
||
# combine GPG keys | ||
mkdir -p -m 755 etc/pki/rpm-gpg | ||
cat ${srcdir}/RPM-GPG-KEY-redhat-release-2 ${srcdir}/RPM-GPG-KEY-redhat-auxiliary > etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release | ||
cat ${srcdir}/RPM-GPG-KEY-redhat-beta-2 ${srcdir}/RPM-GPG-KEY-redhat-legacy-beta > etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta | ||
|
||
# copy GPG keys into the libostree keyring | ||
mkdir -p -m 755 usr/share/ostree/trusted.gpg.d | ||
for file in etc/pki/rpm-gpg/RPM-GPG-KEY* ; do | ||
gpg --dearmor < $file > usr/share/ostree/trusted.gpg.d/$(basename ${file}).gpg | ||
done | ||
|
||
# setup default PATH; pathmunge() will add the supplied value to the PATH | ||
# if it does not already exist | ||
# https://github.com/openshift/os/issues/191 | ||
mkdir -p -m 755 etc/profile.d | ||
cat > etc/profile.d/path.sh <<EOF | ||
pathmunge /bin | ||
pathmunge /sbin | ||
pathmunge /usr/bin | ||
pathmunge /usr/sbin | ||
pathmunge /usr/local/bin | ||
pathmunge /usr/local/sbin | ||
EOF | ||
|
||
# set up the dist tag macros | ||
install -d -m 755 etc/rpm | ||
cat >> etc/rpm/macros.dist << EOF | ||
# dist macros. | ||
|
||
%%rhel ${base_release_version} | ||
%%dist %dist | ||
%%el${base_release_version} 1 | ||
EOF | ||
|
||
# use unbranded datadir | ||
mkdir -p -m 755 usr/share/redhat-release | ||
install -m 644 ${srcdir}/EULA usr/share/redhat-release | ||
|
||
# use unbranded docdir | ||
mkdir -p -m 755 usr/share/doc/redhat-release | ||
install -m 644 ${srcdir}/GPL usr/share/doc/redhat-release | ||
|
||
# copy systemd presets | ||
mkdir -p usr/lib/systemd/system-preset/ | ||
for x in ${srcdir}/*.preset; do install -m 0644 ${x} usr/lib/systemd/system-preset/; done | ||
|
||
# copy systemd units | ||
mkdir -p usr/lib/systemd/system/ | ||
for x in ${srcdir}/*.service; do install -m 0644 ${x} usr/lib/systemd/system/; done | ||
|
||
# https://bugzilla.redhat.com/show_bug.cgi?id=1204194 | ||
mkdir -p etc/systemd/system | ||
ln -s /dev/null etc/systemd/system/brandbot.path | ||
|
||
cd .. | ||
mv fs-base.tmp fs-base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/bash | ||
set -xeuo pipefail | ||
srcdir=$(cd $(dirname $0) && pwd) | ||
rm fs-maipo{,.tmp} -rf | ||
cp -a --reflink=auto fs-base fs-maipo.tmp | ||
cd fs-maipo.tmp | ||
|
||
# create os-release | ||
cat << EOF >> usr/lib/os-release | ||
NAME="Red Hat CoreOS (Maipo)" | ||
VERSION_ID="47" | ||
EOF | ||
|
||
# let systemd handle core dumps on maipo | ||
# https://bugzilla.redhat.com/show_bug.cgi?id=1191045 | ||
mkdir -p usr/lib/sysctl.d/ | ||
install -m 0644 ${srcdir}/49-coredump.conf usr/lib/sysctl.d/ | ||
|
||
cd .. | ||
mv fs-maipo{.tmp,} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/bash | ||
set -xeuo pipefail | ||
srcdir=$(cd $(dirname $0) && pwd) | ||
rm fs-ootpa{,.tmp} -rf | ||
cp -a --reflink=auto fs-base fs-ootpa.tmp | ||
cd fs-ootpa.tmp | ||
|
||
# create os-release | ||
cat << EOF >> usr/lib/os-release | ||
NAME="Red Hat CoreOS (Ootpa)" | ||
VERSION_ID="48" | ||
EOF | ||
|
||
cd .. | ||
mv fs-ootpa{.tmp,} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This package was forked from fedora-release into redhat-release-server into | ||
# redhat-release-atomic-host, then into redhat-release-coreos. | ||
# Be sure to look at changes upstream! | ||
|
||
%define debug_package %{nil} | ||
# Fake this out; we need at least 7, since e.g. systemd has a dependency | ||
# on system-release > 7.2, etc. | ||
%define os_version 7.99 | ||
%define dist .el%{version} | ||
|
||
Name: redhat-release-coreos-maipo | ||
Version: 47 | ||
Release: 0%{?dist} | ||
Summary: %{product_family}%{?variant_titlecase: %{variant_titlecase}} release file | ||
Group: System Environment/Base | ||
License: GPLv2 | ||
Provides: redhat-release = %{os_version}-%{release} | ||
Provides: system-release = %{os_version}-%{release} | ||
# We need to use Server, since there's no RPM content set for anything else | ||
Provides: system-release(releasever) = %{base_release_version}Server | ||
# This doesn't exist today, I committed the data to git | ||
Source0: redhat-release-%{variant_lowercase}-%{base_release_version}-4.tar.gz | ||
|
||
%description | ||
%{summary} | ||
|
||
%prep | ||
%setup -q -n redhat-release-%{base_release_version} | ||
|
||
%build | ||
make fs-maipo | ||
|
||
%install | ||
rm -rf %{buildroot} | ||
cp -a --reflink=auto fs-maipo %{buildroot} | ||
|
||
(cd %{buildroot} && find . -maxdepth 1 -type d | sed -e 's,^.,/,') > files.list | ||
|
||
%files -f files.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This package was forked from fedora-release into redhat-release-server into | ||
# redhat-release-atomic-host, then into redhat-release-coreos. | ||
# Be sure to look at changes upstream! | ||
|
||
%define debug_package %{nil} | ||
# Fake this out; we also use 8 here, matching the maipo's use of 7. | ||
%define os_version 8.99 | ||
%define dist .el%{version} | ||
|
||
Name: redhat-release-coreos-ootpa | ||
Version: 48 | ||
Release: 0%{?dist} | ||
Summary: %{product_family}%{?variant_titlecase: %{variant_titlecase}} release file | ||
Group: System Environment/Base | ||
License: GPLv2 | ||
Provides: redhat-release = %{os_version}-%{release} | ||
Provides: system-release = %{os_version}-%{release} | ||
# We need to use Server, since there's no RPM content set for anything else | ||
Provides: system-release(releasever) = %{base_release_version}Server | ||
# This doesn't exist today, I committed the data to git | ||
Source0: redhat-release-%{variant_lowercase}-%{base_release_version}-4.tar.gz | ||
|
||
%description | ||
%{summary} | ||
|
||
%prep | ||
%setup -q -n redhat-release-%{base_release_version} | ||
|
||
%build | ||
make fs-ootpa | ||
|
||
%install | ||
rm -rf %{buildroot} | ||
cp -a --reflink=auto fs-ootpa %{buildroot} | ||
|
||
(cd %{buildroot} && find . -maxdepth 1 -type d | sed -e 's,^.,/,') > files.list | ||
|
||
%files -f files.list |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heck, we could collapse this into a single spec and just use the
%rhel
macro from our buildroot, right?