AlmaLinux release files
rpm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

231 lines
7.6 KiB

1 year ago
6 months ago
1 year ago
1 year ago
6 months ago
1 year ago
1 year ago
6 months ago
1 year ago
6 months ago
1 year ago
1 year ago
6 months ago
6 months ago
6 months ago
1 year ago
1 year ago
  1. %define debug_package %{nil}
  2. %define product_family AlmaLinux
  3. %define release_name Sky Tiger
  4. %define contentdir almalinux
  5. %define infra_var stock
  6. %define base_release_version 8
  7. %define full_release_version 8.6
  8. %define dist_release_version 8
  9. %define upstream_rel_long 8.6-0.1
  10. %define upstream_rel 8.6
  11. %define almalinux_rel 0.1
  12. %define dist .el%{dist_release_version}
  13. # The anaconda scripts in %%{_libexecdir} can create false requirements
  14. %global __requires_exclude_from %{_libexecdir}
  15. Name: almalinux-release
  16. Version: %{upstream_rel}
  17. Release: %{almalinux_rel}%{?dist}
  18. Summary: %{product_family} release file
  19. Group: System Environment/Base
  20. License: GPLv2
  21. Provides: almalinux-release = %{version}-%{release}
  22. Provides: centos-release = %{version}-%{release}
  23. Provides: almalinux-release(upstream) = %{upstream_rel}
  24. Provides: centos-release(upstream) = %{upstream_rel}
  25. Provides: redhat-release = %{upstream_rel_long}
  26. Provides: system-release = %{upstream_rel_long}
  27. Provides: system-release(releasever) = %{base_release_version}
  28. Provides: base-module(platform:el%{base_release_version})
  29. Provides: almalinux-release-eula
  30. Provides: centos-release-eula
  31. Provides: redhat-release-eula
  32. Source1: 85-display-manager.preset
  33. Source2: 90-default.preset
  34. Source3: 99-default-disable.preset
  35. Source10: RPM-GPG-KEY-AlmaLinux
  36. ##Source100: rootfs-expand
  37. Source200: EULA
  38. Source201: GPL
  39. ##Source202: Contributors
  40. Source300: almalinux.repo
  41. Source301: almalinux-ha.repo
  42. Source302: almalinux-powertools.repo
  43. Source303: almalinux-resilientstorage.repo
  44. Source304: almalinux-plus.repo
  45. # Only for x86_64
  46. Source305: almalinux-rt.repo
  47. Source306: almalinux-nfv.repo
  48. %description
  49. %{product_family} release files
  50. %prep
  51. echo OK
  52. %build
  53. echo OK
  54. %install
  55. rm -rf %{buildroot}
  56. # create skeleton
  57. mkdir -p %{buildroot}/etc
  58. mkdir -p %{buildroot}%{_prefix}/lib
  59. # create /etc/system-release and /etc/redhat-release
  60. echo "%{product_family} release %{full_release_version}%{?beta: %{beta}} (%{release_name})" > %{buildroot}/etc/almalinux-release
  61. echo "Derived from Red Hat Enterprise Linux %{upstream_rel} (Source)" > %{buildroot}/etc/almalinux-release-upstream
  62. ln -s almalinux-release %{buildroot}/etc/system-release
  63. ln -s almalinux-release %{buildroot}/etc/redhat-release
  64. ln -s almalinux-release %{buildroot}/etc/centos-release
  65. # Create the os-release file
  66. cat << EOF >>%{buildroot}%{_prefix}/lib/os-release
  67. NAME="%{product_family}"
  68. VERSION="%{full_release_version} (%{release_name})"
  69. ID="almalinux"
  70. ID_LIKE="rhel centos fedora"
  71. VERSION_ID="%{full_release_version}"
  72. PLATFORM_ID="platform:el%{base_release_version}"
  73. PRETTY_NAME="%{product_family} %{full_release_version}%{?beta: %{beta}} (%{release_name})"
  74. ANSI_COLOR="0;34"
  75. CPE_NAME="cpe:/o:almalinux:almalinux:%{base_release_version}::baseos"
  76. HOME_URL="https://almalinux.org/"
  77. DOCUMENTATION_URL="https://wiki.almalinux.org/"
  78. BUG_REPORT_URL="https://bugs.almalinux.org/"
  79. ALMALINUX_MANTISBT_PROJECT="AlmaLinux-%{base_release_version}"
  80. ALMALINUX_MANTISBT_PROJECT_VERSION="%{full_release_version}"
  81. EOF
  82. # Create the symlink for /etc/os-release
  83. ln -s ../usr/lib/os-release %{buildroot}%{_sysconfdir}/os-release
  84. # write cpe to /etc/system-release-cpe
  85. echo "cpe:/o:almalinux:almalinux:%{base_release_version}::baseos" | tr [A-Z] [a-z] > %{buildroot}/etc/system-release-cpe
  86. # create /etc/issue and /etc/issue.net
  87. echo '\S' > %{buildroot}/etc/issue
  88. echo 'Kernel \r on an \m' >> %{buildroot}/etc/issue
  89. cp %{buildroot}/etc/issue %{buildroot}/etc/issue.net
  90. echo >> %{buildroot}/etc/issue
  91. # copy GPG keys
  92. mkdir -p -m 755 %{buildroot}/etc/pki/rpm-gpg
  93. install -m 644 %{SOURCE10} %{buildroot}/etc/pki/rpm-gpg
  94. # copy yum repos
  95. mkdir -p -m 755 %{buildroot}/etc/yum.repos.d
  96. install -m 644 %{SOURCE300} %{buildroot}/etc/yum.repos.d
  97. install -m 644 %{SOURCE301} %{buildroot}/etc/yum.repos.d
  98. install -m 644 %{SOURCE302} %{buildroot}/etc/yum.repos.d
  99. install -m 644 %{SOURCE303} %{buildroot}/etc/yum.repos.d
  100. install -m 644 %{SOURCE304} %{buildroot}/etc/yum.repos.d
  101. # RT and NFV are only for x86_64
  102. %ifarch x86_64
  103. install -m 644 %{SOURCE305} %{buildroot}/etc/yum.repos.d
  104. install -m 644 %{SOURCE306} %{buildroot}/etc/yum.repos.d
  105. %endif
  106. mkdir -p -m 755 %{buildroot}/etc/dnf/vars
  107. echo "%{infra_var}" > %{buildroot}/etc/dnf/vars/infra
  108. echo "%{contentdir}" >%{buildroot}/etc/dnf/vars/contentdir
  109. # set up the dist tag macros
  110. install -d -m 755 %{buildroot}/etc/rpm
  111. cat >> %{buildroot}/etc/rpm/macros.dist << EOF
  112. # dist macros.
  113. %%almalinux_ver %{base_release_version}
  114. %%almalinux %{base_release_version}
  115. %%centos_ver %{base_release_version}
  116. %%centos %{base_release_version}
  117. %%rhel %{base_release_version}
  118. %%dist .el%{base_release_version}
  119. %%el%{base_release_version} 1
  120. EOF
  121. # use unbranded datadir
  122. mkdir -p -m 755 %{buildroot}/%{_datadir}/almalinux-release
  123. ln -s almalinux-release %{buildroot}/%{_datadir}/redhat-release
  124. install -m 644 %{SOURCE200} %{buildroot}/%{_datadir}/almalinux-release
  125. # use unbranded docdir
  126. mkdir -p -m 755 %{buildroot}/%{_docdir}/almalinux-release
  127. ln -s almalinux-release %{buildroot}/%{_docdir}/redhat-release
  128. install -m 644 %{SOURCE201} %{buildroot}/%{_docdir}/almalinux-release
  129. # copy systemd presets
  130. mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system-preset/
  131. install -m 0644 %{SOURCE1} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
  132. install -m 0644 %{SOURCE2} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
  133. install -m 0644 %{SOURCE3} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
  134. %clean
  135. rm -rf %{buildroot}
  136. %files
  137. %defattr(0644,root,root,0755)
  138. /etc/redhat-release
  139. /etc/system-release
  140. /etc/centos-release
  141. ##/etc/centos-release-upstream
  142. /etc/almalinux-release
  143. /etc/almalinux-release-upstream
  144. /etc/dnf/
  145. /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
  146. %config(noreplace) /etc/yum.repos.d/almalinux.repo
  147. %config(noreplace) /etc/yum.repos.d/almalinux-ha.repo
  148. %config(noreplace) /etc/yum.repos.d/almalinux-powertools.repo
  149. %config(noreplace) /etc/yum.repos.d/almalinux-resilientstorage.repo
  150. %config(noreplace) /etc/yum.repos.d/almalinux-plus.repo
  151. %ifarch x86_64
  152. %config(noreplace) /etc/yum.repos.d/almalinux-rt.repo
  153. %config(noreplace) /etc/yum.repos.d/almalinux-nfv.repo
  154. %endif
  155. %config(noreplace) /etc/os-release
  156. %config /etc/system-release-cpe
  157. %config(noreplace) /etc/issue
  158. %config(noreplace) /etc/issue.net
  159. /etc/rpm/macros.dist
  160. %{_docdir}/redhat-release
  161. %{_docdir}/almalinux-release/*
  162. %{_datadir}/redhat-release
  163. %{_datadir}/almalinux-release/*
  164. %{_prefix}/lib/os-release
  165. %{_prefix}/lib/systemd/system-preset/*
  166. %changelog
  167. * Tue May 10 2022 Andrew Lukoshko <alukoshko@almalinux.org> - 8.6-0.1
  168. - 8.6 stable release
  169. * Thu Mar 31 2022 Andrew Lukoshko <alukoshko@almalinux.org> - 8.6-0.0
  170. - 8.6 beta release
  171. - Add RT and NFV repos for x86_64
  172. * Tue Dec 28 2021 Andrew Lukoshko <alukoshko@almalinux.org> - 8.5-1.1
  173. - Add RS repo
  174. * Thu Oct 07 2021 Andrew Lukoshko <alukoshko@almalinux.org> - 8.5-1
  175. - 8.5 beta release
  176. * Thu Jul 29 2021 Andrew Lukoshko <alukoshko@almalinux.org> - 8.4-3
  177. - disable fastestmirror dnf plugin for all repos
  178. * Thu May 20 2021 Andrew Lukoshko <alukoshko@almalinux.org> - 8.4-2
  179. - 8.4 stable release
  180. - Disable PowerTools repo by default and move it to separate file
  181. * Fri Apr 16 2021 Andrew Lukoshko <alukoshko@almalinux.org> - 8.4-1
  182. - 8.4 beta release
  183. * Wed Mar 24 2021 Andrei Lukoshko <alukoshko@almalinux.org> - 8.3-4
  184. - 8.3 stable release
  185. * Wed Feb 10 2021 Andrei Lukoshko <alukoshko@cloudlinux.com> - 8.3-3
  186. - Switch repos to mirrorlists and enable fastestmirror plugin
  187. - Use full release version for ALMALINUX_MANTISBT_PROJECT_VERSION
  188. - Add HighAvailability repo
  189. * Wed Jan 27 2021 Anatholy Scryabin <ascryabin@cloudlinux.com> - 8.3-2
  190. - Initial build for AlmaLinux