代码拉取完成,页面将自动刷新
%define lifsea_release 2
%define debug_package %{nil}
%define product_family Lifsea OS
%define base_release_version 8
%define compat_release_version 8
#define beta Beta
%define dist .lifsea%{compat_release_version}
%define anolis_release_version 8
Name: lifsea-release
Version: %{base_release_version}
Release: %{lifsea_release}%{?dist}
Summary: %{product_family} %{base_release_version} release file
Group: System Environment/Base
License: GPLv2
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 = %{compat_release_version}
Provides: system-release = %{base_release_version}
Provides: system-release(releasever) = %{base_release_version}
Source0: EULA
Source1: GPL
Source2: 90-default.preset
Source3: 90-default-user.preset
Source4: 99-default-disable.preset
%description
%{product_family} %{base_release_version} release files
%prep
echo OK
%build
echo OK
%install
rm -rf %{buildroot}
# create /etc
mkdir -p %{buildroot}/etc
# create /etc/system-release
echo "%{product_family} release %{base_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="%{base_release_version}"
ID="lifsea"
ID_LIKE="rhel fedora centos"
VERSION_ID="%{base_release_version}"
PLATFORM_ID="platform:lifsea%{base_release_version}"
PRETTY_NAME="%{product_family} %{base_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 lifsea \m' >> %{buildroot}/etc/issue
cp %{buildroot}/etc/issue %{buildroot}/etc/issue.net
echo >> %{buildroot}/etc/issue
# set up the dist tag macros
install -d -m 755 %{buildroot}/etc/rpm
cat >> %{buildroot}/etc/rpm/macros.dist << EOF
# dist macros.
%%lifsea_ver %{base_release_version}
%%lifsea %{base_release_version}
%%lifsea%{base_release_version} 1
%%dist %dist
# For compatibility
%%rhel %{compat_release_version}
%%el%{compat_release_version} 1
%%anolis %{anolis_release_version}
%%an%{anolis_release_version} 1
EOF
# use unbranded docdir
mkdir -p -m 755 %{buildroot}/%{_docdir}/%{name}
install -m 644 %{SOURCE0} %{buildroot}/%{_docdir}/%{name}
install -m 644 %{SOURCE1} %{buildroot}/%{_docdir}/%{name}
# Default system wide
install -Dm0644 %{SOURCE2} -t %{buildroot}%{_prefix}/lib/systemd/system-preset/
install -Dm0644 %{SOURCE3} -t %{buildroot}%{_prefix}/lib/systemd/user-preset/
# The same file is installed in two places with identical contents
install -Dm0644 %{SOURCE4} -t %{buildroot}%{_prefix}/lib/systemd/system-preset/
install -Dm0644 %{SOURCE4} -t %{buildroot}%{_prefix}/lib/systemd/user-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
/etc/rpm/macros.dist
%{_docdir}/%{name}
%dir %{_prefix}/lib/systemd/user-preset/
%{_prefix}/lib/systemd/user-preset/90-default-user.preset
%{_prefix}/lib/systemd/user-preset/99-default-disable.preset
%dir %{_prefix}/lib/systemd/system-preset/
%{_prefix}/lib/systemd/system-preset/90-default.preset
%{_prefix}/lib/systemd/system-preset/99-default-disable.preset
%changelog
* Wed Mar 02 2022 Yuanhong Peng <[email protected]> - 8-2
- compat with anolis
* Mon Dec 27 2021 Yuanhong Peng <[email protected]> - 8-1
- Initial build for Lifsea OS
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。