diff --git a/dot-bash_logout b/dot-bash_logout new file mode 100644 index 0000000000000000000000000000000000000000..af7c6fd8fd1d77b1081711bd0e497161446cc7d0 --- /dev/null +++ b/dot-bash_logout @@ -0,0 +1,2 @@ +# ~/.bash_logout + diff --git a/dot-bash_profile b/dot-bash_profile new file mode 100644 index 0000000000000000000000000000000000000000..3dc099a2fca9d416ca51d08daa53e945eab1c087 --- /dev/null +++ b/dot-bash_profile @@ -0,0 +1,12 @@ +# .bash_profile + +# Get the aliases and functions +if [ -f ~/.bashrc ]; then + . ~/.bashrc +fi + +# User specific environment and startup programs + +PATH=$PATH:$HOME/bin + +export PATH diff --git a/dot-bashrc b/dot-bashrc new file mode 100644 index 0000000000000000000000000000000000000000..6e6d1e1f17fedc3ab4f161dedb12a97b16c7c9e6 --- /dev/null +++ b/dot-bashrc @@ -0,0 +1,12 @@ +# .bashrc + +# User specific aliases and functions + +alias rm='rm -i' +alias cp='cp -i' +alias mv='mv -i' + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi diff --git a/dot-cshrc b/dot-cshrc new file mode 100644 index 0000000000000000000000000000000000000000..d087a907757a15428fadd223a0563f39fbb985e1 --- /dev/null +++ b/dot-cshrc @@ -0,0 +1,7 @@ +# .cshrc + +# User specific aliases and functions + +alias rm 'rm -i' +alias cp 'cp -i' +alias mv 'mv -i' diff --git a/dot-tcshrc b/dot-tcshrc new file mode 100644 index 0000000000000000000000000000000000000000..e68e89ef83f3dd60ca02bfa514cf4d74aba8e7bd --- /dev/null +++ b/dot-tcshrc @@ -0,0 +1,10 @@ +# .tcshrc + +# User specific aliases and functions + +alias rm 'rm -i' +alias cp 'cp -i' +alias mv 'mv -i' + +set prompt='[%n@%m %c]# ' + diff --git a/generic-release.spec b/generic-release.spec index 83af29ab82a8e12f21a603e1a790a2d09c14482b..6fec9a2de2c99734c8b5118c8cd16688a04da14e 100644 --- a/generic-release.spec +++ b/generic-release.spec @@ -5,7 +5,7 @@ %define dist_release_version 8 %define generic_version 20.03 %define generic_patch_level LTS -%define generic_release 37 +%define generic_release 38 %define builtin_release_version 1.0 %define current_arch %{_arch} @@ -27,6 +27,12 @@ Source1: 85-display-manager.preset Source2: 90-default.preset Source3: 99-default-disable.preset +Source4: dot-bashrc +Source5: dot-bash_profile +Source6: dot-bash_logout +Source7: dot-tcshrc +Source8: dot-cshrc + BuildRequires: python Requires: %{product_family}-repos Obsoletes: yum-utils yum-utils-help yum-utils-plugins @@ -34,14 +40,22 @@ Obsoletes: yum-utils yum-utils-help yum-utils-plugins %description %{product_family} release files -%package -n openEuler-performance +%package -n %{product_family}-performance Requires: coreutils systemd setup -Summary:performance script -%description -n openEuler-performance +Summary: performance script +%description -n %{product_family}-performance performance script +%package -n %{product_family}-rootfiles +Summary: Basic required files for the root user's account +BuildArch: noarch +Conflicts: rootfiles +%description -n %{product_family}-rootfiles +The rootfiles package contains basic required files that are placed +in the root user's account. These files are basically the same as +those in /etc/skel, which are placed in regular users' home directories. %prep %setup -q -n generic-release-%{builtin_release_version} @@ -109,10 +123,22 @@ install -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/systemd/system-preset/ install -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/systemd/system-preset/ install -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/systemd/system-preset/ -%clean -rm -rf $RPM_BUILD_ROOT +# set root's bash profile +mkdir -p %{buildroot}/root + +install -p -m 644 %{SOURCE0} %{buildroot}/root/.bashrc +install -p -m 644 %{SOURCE1} %{buildroot}/root/.bash_profile +install -p -m 644 %{SOURCE2} %{buildroot}/root/.bash_logout +install -p -m 644 %{SOURCE3} %{buildroot}/root/.tcshrc +install -p -m 644 %{SOURCE4} %{buildroot}/root/.cshrc +%posttrans -n %{product_family}-rootfiles +if [ $1 -eq 0 ] ; then + cp -ndr --preserve=ownership,timestamps /etc/skel/. /root/ || : +fi +%clean +rm -rf $RPM_BUILD_ROOT %files %defattr(0644,root,root,0755) @@ -131,11 +157,22 @@ rm -rf $RPM_BUILD_ROOT /var/lib/supportinfo /usr/share/eula/eula.* -%files -n openEuler-performance +%files -n %{product_family}-performance %defattr(0644,root,root,0755) /etc/profile.d/performance.sh +%files -n %{product_family}-rootfiles +%config(noreplace) /root/.bashrc +%config(noreplace) /root/.bash_profile +%config(noreplace) /root/.bash_logout +%config(noreplace) /root/.tcshrc +%config(noreplace) /root/.cshrc + %changelog +* Thu Jan 7 2020 shenyangyang - 1.0-38 +- add %{product_family}-rootfiles package that contains the basic + .bash* config for root user + * Mon May 18 2020 shenyangyang - 1.0-37 - add equal sign in color.sh