#7 Update dist macro considering bootstrapping.
Merged a year ago by kevin. Opened a year ago by jaruga.
rpms/ jaruga/fedora-release feature/dist-macro-bootstrap  into  master

file modified
+5 -2

@@ -11,7 +11,7 @@ 

  Summary:        Fedora release files

  Name:           fedora-release

  Version:        30

- Release:        0.3

+ Release:        0.4

  License:        MIT

  URL:            https://fedoraproject.org/

  

@@ -202,7 +202,7 @@ 

  # dist macros.

  

  %%fedora                %{dist_version}

- %%dist                %%{?distprefix}.fc%{dist_version}

+ %%dist                %%{?distprefix}.fc%{dist_version}%%{?with_bootstrap:~bootstrap}

  %%fc%{dist_version}                1

  EOF

  

@@ -347,6 +347,9 @@ 

  /usr/sbin/convert-to-edition

  

  %changelog

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

+ - Update dist macro to consider bootstrapping.

+ 

  * Sat Aug 18 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 30-0.3

  - Escape use of the distprefix macro, so it makes it into the macro

    file instead of being expanded in the spec.

Yeah, sorry, I should have made a comment before. #6 should be merged first, because it is certainly needed independently of whether this change is done.

@zbyszek Please go a head your PR at first. Then I will think a way to adapt my PR if it is still needed.

After your PR is merged, I am happy if you let me know.

Thats merged, can you check and close this or rebase it with whats needed left ?

rebased onto aee2fede333e2feef3d4f5cbb31460e2f55c1d97

a year ago

rebased onto 8b7476e

a year ago

@kevin I rebased. I think this modification is still necessary to consider bootstrapping package.

Because the point is

The bootstrapping package (ex. rubygem-rspec-core-3.7.0-2.the_prefix.fc30~bootstrap.noarch.rpm) has to be recognized as earlier package version than non-bootstrapping package by RPM. Below result by rpmdev-sort shows the order.

$ cat rpm_packages.txt
rubygem-rspec-core-3.7.0-2.the_prefix.fc30.noarch.rpm
rubygem-rspec-core-3.7.0-2.the_prefix.fc30~bootstrap.noarch.rpm

$ cat rpm_packages.txt | rpmdev-sort
rubygem-rspec-core-3.7.0-2.the_prefix.fc30~bootstrap.noarch.rpm <= The bootstrapping package is recognized as earlier version.
rubygem-rspec-core-3.7.0-2.the_prefix.fc30.noarch.rpm

It is also beneficial for people that the suffix string "~bootstrap" is hidden or capsulized in the common logic (fedora-release). It have to be "~bootstrap", not "-bootstrap".

I also show the result of my test on my mock environment on rawhide.

<mock-chroot> sh-4.4# cat /usr/lib/rpm/macros.d/macros.dist | grep %dist
%dist                %{?distprefix}.fc30%{?with_bootstrap:~bootstrap}
<mock-chroot> sh-4.4# rpm -D 'with_bootstrap 1' -E '%dist'
.fc30~bootstrap
<mock-chroot> sh-4.4# rpm -E '%dist'
.fc30

Seems reasonable to me...

Pull-Request has been merged by kevin

a year ago

Thank you for the merging! \o/