#14 Add fedora-release-iot edition pieces
Merged 5 years ago by mohanboddu. Opened 5 years ago by pbrobinson.
rpms/ pbrobinson/fedora-release iot-objective  into  master

file added
+3
@@ -0,0 +1,3 @@ 

+ #

+ # Fedora IoT

+ #

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

  local variants = {

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

    cloud = {release = "cloud", 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},

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

file modified
+38 -2
@@ -11,7 +11,7 @@ 

  Summary:        Fedora release files

  Name:           fedora-release

  Version:        30

- Release:        0.4

+ Release:        0.5

  License:        MIT

  URL:            https://fedoraproject.org/

  
@@ -28,6 +28,7 @@ 

  Source15:       80-workstation.preset

  Source16:       org.gnome.shell.gschema.override

  Source17:       org.projectatomic.rpmostree1.rules

+ Source18:       80-iot.preset

  

  Obsoletes:      redhat-release

  Provides:       redhat-release
@@ -64,6 +65,17 @@ 

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

  depend on.

  

+ %package iot

+ Summary:        Base package for Fedora IoT specific default configurations

+ Provides:       system-release-iot

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

+ Provides:       system-release-product

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

+ 

+ %description iot

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

+ depend on as well as IoT system defaults.

+ 

  %package server

  Summary:        Base package for Fedora Server-specific default configurations

  Provides:       system-release-server
@@ -167,6 +179,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

  

+ # IoT

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

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

+ echo "VARIANT=\"IoT Edition\"" >> %{buildroot}/usr/lib/os.release.d/os-release-iot

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

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

+ 

  # Server

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

        %{buildroot}/usr/lib/os.release.d/os-release-server
@@ -217,6 +236,9 @@ 

  install -Dm0644 %{SOURCE12} -t %{buildroot}/usr/lib/systemd/user-preset/

  install -Dm0644 %{SOURCE13} -t %{buildroot}%{_prefix}/lib/systemd/system-preset/

  

+ # Fedora IoT

+ install -Dm0644 %{SOURCE18} -t %{buildroot}%{_prefix}/lib/os.release.d/presets/

+ 

  # Fedora Server

  install -Dm0644 %{SOURCE14} -t %{buildroot}%{_prefix}/lib/os.release.d/presets/

  # Fedora Workstation
@@ -271,6 +293,14 @@ 

  %include %{SOURCE4}

  uninstall_edition("cloud")

  

+ %post iot -p <lua>

+ %include %{SOURCE4}

+ install_edition("iot")

+ 

+ %preun iot -p <lua>

+ %include %{SOURCE4}

+ uninstall_edition("iot")

+ 

  %post server -p <lua>

  %include %{SOURCE4}

  install_edition("server")
@@ -325,10 +355,13 @@ 

  %files atomichost

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

  

- 

  %files cloud

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

  

+ %files iot

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

+ %ghost %{_prefix}/lib/systemd/system-preset/80-iot.preset

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

  

  %files server

  %attr(0644,root,root) /usr/lib/os.release.d/os-release-server
@@ -347,6 +380,9 @@ 

  /usr/sbin/convert-to-edition

  

  %changelog

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

+ - Add Fedora IoT edition components

+ 

  * Mon Aug 20 2018 Jun Aruga <jaruga@redhat.com> - 30-0.4

  - Update dist macro to consider bootstrapping.

  

This adds the fedora-release-iot package for the Fedora IoT edition.
Note we don't add the option in the convert-to-edition script because
as IoT is purely rpm-ostree based we can't covert to IoT edition in
the traditional manner. We don't yet tweak presets but this is something
we intend to do moving forward.

Signed-off-by: Peter Robinson pbrobinson@fedoraproject.org

We'd want iot = here probably.

rebased onto a60dc1f43091672d47c20a46aed60e8442d57b74

5 years ago

You probably want to add -D, so install -Dm0644, so it creates the directory.
Or you can just add an mkdir -p above it to create the target dir.

yes, and I have some other minor adjuistments

Please don't use $RPM_BUILDROOT, use %buildroot instead.

/cc @ngompa, @zyga you probably want something similar for snaps

rebased onto 27c0f7d2eb32d55939a5c8e1c53014795697e697

5 years ago

@zbyszek yes, it's known and already fixed.

/cc @ngompa, @zyga you probably want something similar for snaps

Probably best based on cloud one, mattdm and I can probably handle that as part of his feature to split out all the spins if you ask nicely ;-)

Yeah, I need to file some paperwork but I think we generally want fedora-snappy or fedora-core-snappy @ngompa (I think plain fedora-snappy is OK)

@zyga this PR isn't the place to discuss this but it has to be fedora-release-<COMPONENT> so probably fedora-release-snappy. but please take this discussion to the correct place, a random PR is not that place.

You created 80-iot.presets but then instruct convert-to-edition.lua not to use it. One of these two things is wrong. I see that the presets are currently empty, but I'm guessing you plan to update it eventually, so I'd probably make this presets = true here.

rebased onto 7730363

5 years ago

Good catch @sgallagh that's fixed, and correct, the plan is to add to and adjust this shortly as things settle hence the reason I added it even though it's still currently empty.

Any further updates needed?

Any further updates needed?

It looks good to me. I'm working on a couple of changes to convert-to-edition.lua (dropping the support for /etc/issue since we're replacing that with the much improved /etc/issue.d approach instead), but I'll make that change atop this once it's merged.

tl;dr: Looks good to me, go ahead and merge it @mohanboddu

Pull-Request has been merged by mohanboddu

5 years ago