init utshell for openEuler-23.09
This commit is contained in:
parent
8c0e2b2e85
commit
e18592a0f0
BIN
utshell-0.4.tar.gz
Normal file
BIN
utshell-0.4.tar.gz
Normal file
Binary file not shown.
188
utshell.spec
Normal file
188
utshell.spec
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
#% define beta_tag rc2
|
||||||
|
%define patchleveltag .30411
|
||||||
|
%define baseversion 0.4
|
||||||
|
%bcond_with tests
|
||||||
|
|
||||||
|
Version: %{baseversion}%{patchleveltag}
|
||||||
|
Name: utshell
|
||||||
|
Summary: The utshell respect Bash
|
||||||
|
Release: 1%{?dist}.4
|
||||||
|
License: GPLv3+
|
||||||
|
Source0: utshell-%{baseversion}.tar.gz
|
||||||
|
|
||||||
|
# Official upstream patches
|
||||||
|
# Patches are converted to apply with '-p1'
|
||||||
|
|
||||||
|
# Other patches
|
||||||
|
# We don't want to add '/etc:/usr/etc' in standard utils path.
|
||||||
|
|
||||||
|
BuildRequires: gcc, cargo, rust
|
||||||
|
BuildRequires: texinfo bison
|
||||||
|
BuildRequires: ncurses-devel
|
||||||
|
BuildRequires: autoconf, gettext
|
||||||
|
BuildRequires: make
|
||||||
|
Requires: filesystem >= 3
|
||||||
|
#Provides: /bin/sh
|
||||||
|
Provides: /bin/utshell
|
||||||
|
|
||||||
|
ExclusiveArch: x86_64 aarch64 arm
|
||||||
|
%description
|
||||||
|
The GNU Bourne Again shell (Bash) is a shell or command language
|
||||||
|
interpreter that is compatible with the Bourne shell (sh). Bash
|
||||||
|
incorporates useful features from the Korn shell (ksh) and the C shell
|
||||||
|
(csh). Most sh scripts can be run by utshell without modification.
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{baseversion} -p1
|
||||||
|
|
||||||
|
# echo %{version} > _distribution
|
||||||
|
# echo %{release} > _patchlevel
|
||||||
|
|
||||||
|
# force refreshing the generated files
|
||||||
|
# rm y.tab.*
|
||||||
|
|
||||||
|
%build
|
||||||
|
autoconf
|
||||||
|
%configure --with-bash-malloc=no --with-afs
|
||||||
|
|
||||||
|
# Recycles pids is neccessary. When utshell 's last fork's pid was X
|
||||||
|
# and new fork's pid is also X, utshell has to wait for this same pid.
|
||||||
|
# Without Recycles pids utshell will not wait.
|
||||||
|
MFLAGS="CPPFLAGS=-D_GNU_SOURCE -DRECYCLES_PIDS -DDEFAULT_PATH_VALUE='\"/usr/local/bin:/usr/bin\"' `getconf LFS_CFLAGS`"
|
||||||
|
|
||||||
|
# work around missing deps in Makefiles
|
||||||
|
make "$MFLAGS" version.h
|
||||||
|
make "$MFLAGS" %{?_smp_mflags} -C builtins
|
||||||
|
make "$MFLAGS" %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
if [ -e autoconf ]; then
|
||||||
|
# Yuck. We're using autoconf 2.1x.
|
||||||
|
export PATH=.:$PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
%make_install install-headers
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}/%{_sysconfdir}
|
||||||
|
mkdir -p %{buildroot}/%{_datadir}/utshell/resources/{zh-CN,en-US,zh-HK}
|
||||||
|
rm -f %{buildroot}%{_infodir}/dir
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/skel
|
||||||
|
LONG_BIT=$(getconf LONG_BIT)
|
||||||
|
mv %{buildroot}%{_bindir}/utshellbug \
|
||||||
|
%{buildroot}%{_bindir}/utshellbug-"${LONG_BIT}"
|
||||||
|
ln -s utshellbug-"${LONG_BIT}" %{buildroot}%{_bindir}/utshellbug
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
|
%check
|
||||||
|
make check
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# post is in lua so that we can run it without any external deps. Helps
|
||||||
|
# for bootstrapping a new install.
|
||||||
|
# Jesse Keating 2009-01-29 (code from Ignacio Vazquez-Abrams)
|
||||||
|
# Roman Rakus 2011-11-07 (code from Sergey Romanov) #740611
|
||||||
|
%post -p <lua>
|
||||||
|
nl = '\n'
|
||||||
|
sh = '/bin/sh'..nl
|
||||||
|
utshell = '/bin/utshell'..nl
|
||||||
|
f = io.open('/etc/shells', 'a+')
|
||||||
|
if f then
|
||||||
|
local shells = nl..f:read('*all')..nl
|
||||||
|
if not shells:find(nl..sh) then f:write(sh) end
|
||||||
|
if not shells:find(nl..utshell) then f:write(utshell) end
|
||||||
|
f:close()
|
||||||
|
end
|
||||||
|
|
||||||
|
%postun -p <lua>
|
||||||
|
-- Run it only if we are uninstalling
|
||||||
|
if arg[2] == 0
|
||||||
|
then
|
||||||
|
t={}
|
||||||
|
for line in io.lines("/etc/shells")
|
||||||
|
do
|
||||||
|
if line ~= "/bin/utshell" and line ~= "/bin/sh"
|
||||||
|
then
|
||||||
|
table.insert(t,line)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
f = io.open("/etc/shells", "w+")
|
||||||
|
for n,line in pairs(t)
|
||||||
|
do
|
||||||
|
f:write(line.."\n")
|
||||||
|
end
|
||||||
|
f:close()
|
||||||
|
end
|
||||||
|
|
||||||
|
%files
|
||||||
|
#config(noreplace) /etc/skel/.b*
|
||||||
|
/usr/share/locale/*/LC_MESSAGES/utshell.mo
|
||||||
|
%{_bindir}/utshell
|
||||||
|
%license COPYING
|
||||||
|
%attr(0755,root,root) %{_bindir}/utshellbug[-.]*
|
||||||
|
%{_bindir}/utshellbug
|
||||||
|
%{_datadir}/utshell/resources/en-US/message.ftl
|
||||||
|
%{_datadir}/utshell/resources/zh-CN/message.ftl
|
||||||
|
%{_datadir}/utshell/resources/zh-HK/message.ftl
|
||||||
|
%{_libdir}/pkgconfig/utshell.pc
|
||||||
|
%{_includedir}/%{name}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Apr 11 2023 Zhanghuanhuan<zhanghuanhuan@uniontech.com> - 0.4.30411-0
|
||||||
|
- fix:193533 utshell环境,Ctrl+D退出会话时,提示exit_builtin(刘彤)
|
||||||
|
- fix:193535 history -p mount和用例中预期不符(刘彤)
|
||||||
|
- fix:193581 utshell环境,未执行kill -CONT 恢复进程时,执行ctrl+C无法结束wait -f 进程(刘彤)
|
||||||
|
- fix:193557 declare 命令变量输出异常,和用例中预期不一致(张欢欢)
|
||||||
|
|
||||||
|
* Tue Mar 21 2023 Zhanghuanhuan<zhanghuanhuan@uniontech.com> - 0.4.30321-0
|
||||||
|
- fix : solve translation err (bugid :191483)
|
||||||
|
|
||||||
|
* Thu Mar 16 2023 Liutong<liutonga@uniontech.com> - 0.4.30316-0
|
||||||
|
- fix translation issue
|
||||||
|
|
||||||
|
* Tue Nov 01 2022 Liutong<liutonga@uniontech.com> - 0.4.14-0
|
||||||
|
- fix enable bug
|
||||||
|
|
||||||
|
* Tue Nov 01 2022 Liutong<liutonga@uniontech.com> - 0.4.13-0
|
||||||
|
- fix mem error, and modify mo
|
||||||
|
|
||||||
|
* Thu Oct 13 2022 Liutong<liutonga@uniontech.com> - 0.4.12-0
|
||||||
|
- change vendor, add po.
|
||||||
|
|
||||||
|
* Wed Oct 12 2022 Liutong<liutonga@uniontech.com> - 0.4.10-0
|
||||||
|
- add CARGO_HOME=${HOME}/.cargo
|
||||||
|
|
||||||
|
* Mon Oct 10 2022 Liutong<liutonga@uniontech.com> - 0.4.9-0
|
||||||
|
- rename project rash to utshell
|
||||||
|
|
||||||
|
* Sun Oct 9 2022 Zhanghuanhuan <zhanghuanhuan@uniontech.com> - 0.4.8-0
|
||||||
|
- fix: declare command issue and history command issue
|
||||||
|
|
||||||
|
* Thu Sep 29 2022 Wangmeng <wangmengc@uniontech.com> - 0.4.7-0
|
||||||
|
- fix: add help translation for all commands.
|
||||||
|
|
||||||
|
* Wed Sep 28 2022 Liutong <liutonga@uniontech.com> - 0.4.6-0
|
||||||
|
- fix: disown -r issue.
|
||||||
|
|
||||||
|
* Wed Sep 28 2022 Liutong <liutonga@uniontech.com> - 0.4.5-0
|
||||||
|
- fix: alias translation-core.
|
||||||
|
|
||||||
|
* Tue Sep 27 2022 Liutong <liutonga@uniontech.com> - 0.4.3-4
|
||||||
|
- fix: translation.
|
||||||
|
- fix: coredump in continue.
|
||||||
|
- fix: umask fmt error.
|
||||||
|
- fix: disown issue.
|
||||||
|
|
||||||
|
* Mon Sep 26 2022 Liutong <liutonga@uniontech.com> - 0.4.3-0
|
||||||
|
- add translation frame
|
||||||
|
|
||||||
|
* Mon Sep 19 2022 Liutong <liutonga@uniontech.com> - 0.4.2-0
|
||||||
|
- add loongarch64 arch and remove debug msg
|
||||||
|
|
||||||
|
* Wed Aug 31 2022 Liutong <liutonga@uniontech.com> - 0.4.1-0
|
||||||
|
- modify spec remove /usr/bin
|
||||||
|
|
||||||
|
* Fri Aug 26 2022 Zhanghuanhuan <zhanghuanhuan@uniontech.com> - 0.4.0-0
|
||||||
|
- build rash on aarch_64
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user