netdata-repo.spec 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. %{?rhel:%global centos_ver %rhel}
  2. Name: netdata-repo
  3. Version: 2
  4. Release: 2
  5. Summary: Netdata stable repositories configuration.
  6. Group: System Environment/Base
  7. License: GPLv2
  8. Source0: netdata.repo.fedora
  9. Source1: netdata-edge.repo.fedora
  10. Source2: netdata.repo.suse
  11. Source3: netdata-edge.repo.suse
  12. Source4: netdata.repo.centos
  13. Source5: netdata-edge.repo.centos
  14. Source6: netdata.repo.ol
  15. Source7: netdata-edge.repo.ol
  16. Source8: netdata.repo.al
  17. Source9: netdata-edge.repo.al
  18. BuildArch: noarch
  19. %if 0%{?centos_ver} && 0%{?centos_ver} < 8
  20. Requires: yum-plugin-priorities
  21. %endif
  22. %if 0%{?centos_ver} && 0%{!?amazon_linux:1} && 0%{!?oraclelinux:1}
  23. Requires: epel-release
  24. %endif
  25. # Overlapping file installs
  26. Conflicts: netdata-repo-edge
  27. %description
  28. This package contains the official Netdata package repository configuration for stable versions of Netdata.
  29. %prep
  30. %setup -q -c -T
  31. %if 0%{?fedora}
  32. install -pm 644 %{SOURCE0} ./netdata.repo
  33. install -pm 644 %{SOURCE1} ./netdata-edge.repo
  34. %endif
  35. %if 0%{?suse_version}
  36. install -pm 644 %{SOURCE2} ./netdata.repo
  37. install -pm 644 %{SOURCE3} ./netdata-edge.repo
  38. %endif
  39. %if 0%{?centos_ver}
  40. # Amazon Linux 2 looks like CentOS, but with extra macros.
  41. %if 0%{?amzn2}
  42. install -pm 644 %{SOURCE8} ./netdata.repo
  43. install -pm 644 %{SOURCE9} ./netdata-edge.repo
  44. %else
  45. install -pm 644 %{SOURCE4} ./netdata.repo
  46. install -pm 644 %{SOURCE5} ./netdata-edge.repo
  47. %endif
  48. %endif
  49. %if 0%{?oraclelinux}
  50. install -pm 644 %{SOURCE6} ./netdata.repo
  51. install -pm 644 %{SOURCE7} ./netdata-edge.repo
  52. %endif
  53. %build
  54. true
  55. %install
  56. rm -rf $RPM_BUILD_ROOT
  57. %if 0%{?suse_version}
  58. install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d
  59. install -pm 644 netdata.repo $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d
  60. install -pm 644 netdata-edge.repo $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d
  61. %else
  62. install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
  63. install -pm 644 netdata.repo $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
  64. install -pm 644 netdata-edge.repo $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
  65. %endif
  66. %clean
  67. rm -rf $RPM_BUILD_ROOT
  68. %files
  69. %if 0%{?suse_version}
  70. %attr(644,root,root) /etc/zypp/repos.d/netdata.repo
  71. %else
  72. %attr(644,root,root) /etc/yum.repos.d/netdata.repo
  73. %endif
  74. %package edge
  75. Summary: Netdata nightly repositories configuration.
  76. Group: System Environment/Base
  77. # Overlapping file installs
  78. Conflicts: netdata-repo
  79. %description edge
  80. This package contains the official Netdata package repository configuration for nightly versions of Netdata.
  81. %files edge
  82. %if 0%{?suse_version}
  83. %attr(644,root,root) /etc/zypp/repos.d/netdata-edge.repo
  84. %else
  85. %attr(644,root,root) /etc/yum.repos.d/netdata-edge.repo
  86. %endif
  87. %changelog
  88. * Mon Nov 13 2023 Austin Hemmelgarn <austin@netdata.cloud> 2-2
  89. - Add EPEL requirement for RHEL packages.
  90. * Wed Dec 7 2022 Austin Hemmelgarn <austin@netdata.cloud> 2-1
  91. - Switch to new hosting at repo.netdata.cloud.
  92. * Mon Jun 6 2022 Austin Hemmelgarn <austin@netdata.cloud> 1-2
  93. - Bump release to keep in sync with DEB package.
  94. * Mon Jun 14 2021 Austin Hemmelgarn <austin@netdata.cloud> 1-1
  95. - Initial revision