#19 Add fedora-release-coreos sub-package
Closed 5 years ago by mohanboddu. Opened 5 years ago by sinnykumari.
rpms/ sinnykumari/fedora-release master  into  master

Add fedora-release-coreos sub-package
Sinny Kumari • 5 years ago  
file modified
+19 -2
@@ -23,9 +23,9 @@ 

  enable_presets=0

  

  exit_usage() {

-     echo "Usage: convert-to-edition [options] -e cloud|non-edition|server|workstation"

+     echo "Usage: convert-to-edition [options] -e atomichost|cloud|coreos|non-edition|server|workstation"

      echo "    Options:"

-     echo "        -e: The edition to install (atomichost, cloud, non-edition, server or workstation)"

+     echo "        -e: The edition to install (atomichost, cloud, coreos, non-edition, server or workstation)"

      echo "        -i: Skip installing additional files and just update symlinks"

      echo "        -p: Also enable newly-added systemd presets"

      exit 1
@@ -90,6 +90,23 @@ 

      rm -f /usr/lib/systemd/system-preset/80-*.preset

      ;;

  

+   coreos)

+     if [ $do_installation -gt 0 ]; then

+         dnf install -y fedora-release-coreos

+     fi

+ 

+     echo "VARIANT_ID=coreos" > $VARIANT_FILE

+ 

+     # Ensure that the os-release file is pointing to the correct version

+     ln -sf ./os.release.d/os-release-coreos /usr/lib/os-release || :

+ 

+     # Ensure that the issue file is pointing to the correct version

+     ln -sf ./os.release.d/issue-fedora /usr/lib/issue

+ 

+     # Remove any presets from other Editions.

+     rm -f /usr/lib/systemd/system-preset/80-*.preset

+     ;;

+ 

    non-edition)

      echo "VARIANT_ID=nonproduct" > $VARIANT_FILE

  

file modified
+1
@@ -110,6 +110,7 @@ 

  local variants = {

    atomichost = {release = "atomichost", issue = "fedora", presets = false},

    cloud = {release = "cloud", issue = "fedora", presets = false},

+   coreos = {release = "coreos", issue = "fedora", presets = false},

    iot = {release = "iot", issue = "fedora", presets = true},

    nonproduct = {release = "fedora", issue = "fedora", presets = false},

    server = {release = "server", issue = "server", presets = true},

file modified
+33 -1
@@ -11,7 +11,7 @@ 

  Summary:        Fedora release files

  Name:           fedora-release

  Version:        30

- Release:        0.5

+ Release:        0.6

  License:        MIT

  URL:            https://fedoraproject.org/

  
@@ -65,6 +65,17 @@ 

  Provides a base package for Fedora Cloud-specific configuration files to

  depend on.

  

+ %package coreos

+ Summary:        Base package for Fedora CoreOS specific default configurations

+ Provides:       system-release-coreos

+ Provides:       system-release-coreos(%{version})

+ Provides:       system-release-coreos

+ Requires:       fedora-release = %{version}-%{release}

+ 

+ %description coreos

+ Provides a base package for Fedora CoreOS specific configuration files to

+ depend on.

+ 

  %package iot

  Summary:        Base package for Fedora IoT specific default configurations

  Provides:       system-release-iot
@@ -179,6 +190,13 @@ 

  echo "VARIANT_ID=cloud" >> %{buildroot}/usr/lib/os.release.d/os-release-cloud

  sed -i -e "s|(%{release_name})|(Cloud Edition)|g" %{buildroot}/usr/lib/os.release.d/os-release-cloud

  

+ # CoreOS

+ cp -p %{buildroot}/usr/lib/os.release.d/os-release-fedora \

+       %{buildroot}/usr/lib/os.release.d/os-release-coreos

+ echo "VARIANT=\"CoreOS\"" >> %{buildroot}/usr/lib/os.release.d/os-release-coreos

+ echo "VARIANT_ID=coreos" >> %{buildroot}/usr/lib/os.release.d/os-release-coreos

+ sed -i -e "s|(%{release_name})|(CoreOS)|g" %{buildroot}/usr/lib/os.release.d/os-release-coreos

+ 

  # IoT

  cp -p %{buildroot}/usr/lib/os.release.d/os-release-fedora \

        %{buildroot}/usr/lib/os.release.d/os-release-iot
@@ -293,6 +311,14 @@ 

  %include %{SOURCE4}

  uninstall_edition("cloud")

  

+ %post coreos -p <lua>

+ %include %{SOURCE4}

+ install_edition("coreos")

+ 

+ %preun coreos -p <lua>

+ %include %{SOURCE4}

+ uninstall_edition("coreos")

+ 

  %post iot -p <lua>

  %include %{SOURCE4}

  install_edition("iot")
@@ -358,6 +384,9 @@ 

  %files cloud

  %attr(0644,root,root) /usr/lib/os.release.d/os-release-cloud

  

+ %files coreos

+ %attr(0644,root,root) /usr/lib/os.release.d/os-release-coreos

+ 

  %files iot

  %attr(0644,root,root) /usr/lib/os.release.d/os-release-iot

  %ghost %{_prefix}/lib/systemd/system-preset/80-iot.preset
@@ -380,6 +409,9 @@ 

  /usr/sbin/convert-to-edition

  

  %changelog

+ * Fri Aug 24 2018 Sinny Kumari <sinnykumari@fedoraproject.org> - 30-0.6

+ - Add fedora-release-coreos sub-package

+ 

  * Thu Aug 23 2018 Peter Robinson <pbrobinson@fedoraproject.org> 30-0.5

  - Add Fedora IoT edition components

  

This commit is to create fedora-release-coreos sub-package
which will be used while building Fedora CoreOS. Fedora CoreOS
is going to be based on rpm-ostree.

Signed-off-by: Sinny Kumari sinny@redhat.com

i guess we should add atomichost and coreos to this line

rebased onto 5712f9d

5 years ago

Thanks Dusty for reviewing it. Fixed the required changes!

Why isn't this replacing/obsoleting the atomichost one?

@sinnykumari - we might need to rebase this after https://src.fedoraproject.org/rpms/fedora-release/pull-request/16 is merged

Okay! will keep it in mind.

Why isn't this replacing/obsoleting the atomichost one?

I don't understand, why do we need to replace/obsolete atomichost here? coreos and atomichost are separate sub-package with their own separate use-case.

To quote the Fedora CoreOS FAQ (https://coreos.fedoraproject.org/faq):100:

"Fedora CoreOS will also become the successor to Fedora Atomic Host. The current plan is for Fedora Atomic Host to have at least a 29 version and 6 months of lifecycle."

So if CoreOS is the successor to Atomic host it would make sense to me to kill off the atomichost option.

Also @mattdm has added coreos in his PR 20

To quote the Fedora CoreOS FAQ (https://coreos.fedoraproject.org/faq)💯
"Fedora CoreOS will also become the successor to Fedora Atomic Host. The current plan is for Fedora Atomic Host to have at least a 29 version and 6 months of lifecycle."
So if CoreOS is the successor to Atomic host it would make sense to me to kill off the atomichost option.

Yes, I agree with you about current plan which we have for AtomicHost release cycle. But, we can kill atomichost sub-package later on when we know for sure that we no longer need it.

Also @mattdm has added coreos in his PR 20

Hmm, I didn't know that @mattdm is already working on adding coreos. Since, PR#20 already covers the changes, maybe we can close this once #20 is merged.

@sinnykumari

Yes, I agree with you about current plan which we have for AtomicHost release cycle. But, we can kill atomichost sub-package later on when we know for sure that we no longer need it.

+1 let's remove it later. we'll want it at least for f29.

+1 let's remove it later. we'll want it at least for f29.

This is a pull request against master branch, which is now Fedora 30, I'm not questioning whether it stays around in F-29, anything to do with F-29 is irrelevant in this particular PR, just like it's too late for coreos to appear in F-29 and I'd be questioning adding aforementioned sub package to F-29.

We're talking about F-30 explicitly in this PR due to the branch the PR is against, is coresos going to obsolete and be a viable thing in F-30? I hope so, at which point this a perfect discussion point to have now we've branched.

This is a pull request against master branch, which is now Fedora 30, I'm not questioning whether it stays around in F-29, anything to do with F-29 is irrelevant in this particular PR, just like it's too late for coreos to appear in F-29 and I'd be questioning adding aforementioned sub package to F-29.

yes I understand that. Although I'm going to ask it be added to the f29 branch as well because we want to start building and playing with content in f29 too.

We're talking about F-30 explicitly in this PR due to the branch the PR is against, is coresos going to obsolete and be a viable thing in F-30? I hope so, at which point this a perfect discussion point to have now we've branched.

I hope so too. We'll remove the atomic host bits when that is true.

Pull-Request has been closed by mohanboddu

5 years ago