8 Star 2 Fork 17

src-anolis-os/anolis-release

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
anolis-release.spec 7.72 KB
Copy Edit Raw Blame History
geliwei authored 2022-03-11 15:22 . repo: add anolis Experimental repo
%define anolis_release 15
%define debug_package %{nil}
%define product_family Anolis OS
%define base_release_version 8
%define full_release_version 8.2
%define compat_release_version 8
%define beta Beta
%define dist .an%{base_release_version}
Name: anolis-release
Version: %{full_release_version}
Release: %{anolis_release}%{?dist}
Summary: %{product_family} %{base_release_version} release file
Group: System Environment/Base
License: MulanPSLv2
Obsoletes: rawhide-release redhat-release-as redhat-release-es redhat-release-ws redhat-release-de comps rpmdb-redhat fedora-release redhat-release centos-release
Provides: redhat-release = %{full_release_version}
Provides: centos-release = %{full_release_version}
Provides: system-release = %{version}-%{release}
Provides: system-release(releasever) = %{base_release_version}
Requires: anolis-gpg-keys = %{version}-%{release}
Requires: anolis-repos >= %{version}-%{release}
Source0: EULA
Source1: MulanPSL
Source2: RPM-GPG-KEY-ANOLIS
Source10: 85-display-manager.preset
Source11: 90-default.preset
Source12: 99-default-disable.preset
Source100: AnolisOS-BaseOS.repo
Source101: AnolisOS-AppStream.repo
Source102: AnolisOS-PowerTools.repo
Source103: AnolisOS-Plus.repo
Source104: AnolisOS-DDE.repo
Source105: AnolisOS-Source.repo
Source106: AnolisOS-Debuginfo.repo
Source107: AnolisOS-HighAvailability.repo
Source108: AnolisOS-Extras.repo
Source109: AnolisOS-Experimental.repo
%description
%{product_family} %{base_release_version} release files
%package -n anolis-repos
Summary: %{product_family} package repositories
Group: System Environment/Base
Provides: anolis-repos(%{base_release_version}) = %{full_release_version}
Requires: system-release = %{full_release_version}
Requires: anolis-gpg-keys = %{version}-%{release}
%description -n anolis-repos
%{product_family} package repository files for yum and dnf
%package -n anolis-gpg-keys
Summary: %{product_family} RPM keys
Group: System Environment/Base
BuildArch: noarch
%description -n anolis-gpg-keys
%{product_family} RPM signature keys
%prep
echo OK
%build
echo OK
%install
rm -rf %{buildroot}
# create /etc
mkdir -p %{buildroot}/etc
# create /etc/system-release
echo "%{product_family} release %{full_release_version}" > %{buildroot}/etc/%{name}
ln -s %{name} %{buildroot}/etc/system-release
ln -s %{name} %{buildroot}/etc/redhat-release
# create /etc/os-release
cat << EOF >>%{buildroot}/etc/os-release
NAME="%{product_family}"
VERSION="%{full_release_version}"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="%{full_release_version}"
PLATFORM_ID="platform:an%{base_release_version}"
PRETTY_NAME="%{product_family} %{full_release_version}"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
EOF
# write cpe to /etc/system/release-cpe
# create /etc/issue and /etc/issue.net
echo '\S' > %{buildroot}/etc/issue
echo 'Kernel \r on an \m' >> %{buildroot}/etc/issue
cp %{buildroot}/etc/issue %{buildroot}/etc/issue.net
echo >> %{buildroot}/etc/issue
# copy GPG keys
mkdir -p -m 755 %{buildroot}/etc/pki/rpm-gpg
install -m 644 %{SOURCE2} %{buildroot}/etc/pki/rpm-gpg
# copy yum repos
mkdir -p -m 755 %{buildroot}/etc/yum.repos.d
install -m 644 %{SOURCE100} %{buildroot}/etc/yum.repos.d
install -m 644 %{SOURCE101} %{buildroot}/etc/yum.repos.d
install -m 644 %{SOURCE102} %{buildroot}/etc/yum.repos.d
install -m 644 %{SOURCE103} %{buildroot}/etc/yum.repos.d
install -m 644 %{SOURCE104} %{buildroot}/etc/yum.repos.d
install -m 644 %{SOURCE105} %{buildroot}/etc/yum.repos.d
install -m 644 %{SOURCE106} %{buildroot}/etc/yum.repos.d
install -m 644 %{SOURCE107} %{buildroot}/etc/yum.repos.d
install -m 644 %{SOURCE108} %{buildroot}/etc/yum.repos.d
install -m 644 %{SOURCE109} %{buildroot}/etc/yum.repos.d
# Edit the yum repo url to point to the distro's RPMs repo.
sed -i 's/\$releasever/%{full_release_version}/g' %{buildroot}/etc/yum.repos.d/AnolisOS-BaseOS.repo
sed -i 's/\$releasever/%{full_release_version}/g' %{buildroot}/etc/yum.repos.d/AnolisOS-AppStream.repo
sed -i 's/\$releasever/%{full_release_version}/g' %{buildroot}/etc/yum.repos.d/AnolisOS-PowerTools.repo
sed -i 's/\$releasever/%{full_release_version}/g' %{buildroot}/etc/yum.repos.d/AnolisOS-Plus.repo
sed -i 's/\$releasever/%{full_release_version}/g' %{buildroot}/etc/yum.repos.d/AnolisOS-DDE.repo
sed -i 's/\$releasever/%{full_release_version}/g' %{buildroot}/etc/yum.repos.d/AnolisOS-Source.repo
sed -i 's/\$releasever/%{full_release_version}/g' %{buildroot}/etc/yum.repos.d/AnolisOS-Debuginfo.repo
sed -i 's/\$releasever/%{full_release_version}/g' %{buildroot}/etc/yum.repos.d/AnolisOS-HighAvailability.repo
sed -i 's/\$releasever/%{full_release_version}/g' %{buildroot}/etc/yum.repos.d/AnolisOS-Extras.repo
sed -i 's/\$releasever/%{full_release_version}/g' %{buildroot}/etc/yum.repos.d/AnolisOS-Experimental.repo
# set up the dist tag macros
install -d -m 755 %{buildroot}/etc/rpm
cat >> %{buildroot}/etc/rpm/macros.dist << EOF
# dist macros.
%%anolis_ver %{base_release_version}
%%anolis %{base_release_version}
%%anolis%{base_release_version} 1
%%dist %dist
# For compatibility
%%rhel %{compat_release_version}
%%el%{compat_release_version} 1
EOF
# use unbranded datadir
mkdir -p -m 755 %{buildroot}/%{_datadir}/%{name}
install -m 644 %{SOURCE0} %{buildroot}/%{_datadir}/%{name}
# use unbranded docdir
mkdir -p -m 755 %{buildroot}/%{_docdir}/%{name}
install -m 644 %{SOURCE1} %{buildroot}/%{_docdir}/%{name}
# copy systemd presets
mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system-preset/
install -m 0644 %{SOURCE10} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
install -m 0644 %{SOURCE11} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
install -m 0644 %{SOURCE12} %{buildroot}/%{_prefix}/lib/systemd/system-preset/
%clean
rm -rf %{buildroot}
%files
%defattr(0644,root,root,0755)
/etc/system-release
/etc/redhat-release
/etc/%{name}
%config(noreplace) /etc/os-release
%config(noreplace) /etc/issue
%config(noreplace) /etc/issue.net
%{_prefix}/lib/systemd/system-preset/*
/etc/rpm/macros.dist
%{_docdir}/%{name}
%{_datadir}/%{name}
%files -n anolis-repos
%config(noreplace) /etc/yum.repos.d/*
%files -n anolis-gpg-keys
/etc/pki/rpm-gpg/
%changelog
* Wed Mar 16 2022 Liwei Ge <geliwei@openanolis.org> - 8.4-15
- Add Experimental repo
* Mon Oct 11 2021 Liwei Ge <geliwei@openanolis.org> - 8.4-14
- Update license to MulanPSLv2
- Add Extras repo
* Mon Aug 9 2021 Liwei Ge <geliwei@openanolis.org> - 8.2-13
- Disable audit by default
* Fri Jul 23 2021 Liwei Ge <geliwei@openanolis.org> - 8.2-12
- Provides centos-release
- Yum repo url to point to distro's RPMs repo rather than composed from var releasever
- Remove duplicate RPMS repo
- Add HighAvailability repo
* Wed Jul 21 2021 yangxiaoxuan <yangxiaoxuan@openanolis.org> - 8.2-11
- add Debug and Source repo file
* Wed Jun 03 2021 yangxiaoxuan <yangxiaoxuan@openanolis.org> - 8.2-10
- Modify the mirror url of the repo file
* Wed May 19 2021 Hang Zhao <1209176326@qq.com> - 8.2-9
- Update openanolis url
- Add DDE repo
* Fri Apr 16 2021 Liwei Ge <geliwei@openanolis.org> - 8.2-8
- Add Plus repo
- Fix location of EULA
* Thu Apr 8 2021 Liwei Ge <geliwei@openanolis.org> - 8.2-7
- Update system-release pattern
* Tue Mar 30 2021 mahailiang <mahailiang@openanolis.org> - 8.2-6
- update preset files
* Tue Mar 16 2021 Liwei Ge <geliwei@openanolis.org> - 8.2-5
- Add PowerTools repo
* Fri Mar 5 2021 Liwei Ge <geliwei@openanolis.org> - 8.2-4
- Update EULA for Anolis OS
* Thu Mar 4 2021 Liwei Ge <geliwei@openanolis.org> - 8.2-3
- Fix repo url
* Wed Mar 3 2021 Liwei Ge <geliwei@openanolis.org> - 8.2-2
- Update repo url and add public key
* Tue Jan 19 2021 Liwei Ge <geliwei@openanolis.org> - 8.2-1
- Init version of anolis-release
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/anolis-release.git
git@gitee.com:src-anolis-os/anolis-release.git
src-anolis-os
anolis-release
anolis-release
a8.2

Search