diff --git a/utshell-0.4.tar.gz b/utshell-0.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..5a70021d3e998f235594b864b50732084c5bdbde Binary files /dev/null and b/utshell-0.4.tar.gz differ diff --git a/utshell.spec b/utshell.spec new file mode 100644 index 0000000000000000000000000000000000000000..5a248b58d8ff29d4c3e8f6e31ac0f4a5fb0a5d3b --- /dev/null +++ b/utshell.spec @@ -0,0 +1,186 @@ +#% define beta_tag rc2 +%define patchleveltag .30411 +%define baseversion 0.4 +%bcond_with tests + +Version: 0.4.30411 +Name: utshell +Summary: The utshell respect Bash +Release: 0%{?dist}.01 +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 +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 +-- 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 - 0.4.30411-0.01 +- 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 - 0.4.30321 +- fix : solve translation err (bugid :191483) + +* Thu Mar 16 2023 Liutong - 0.4.30316 +- fix translation issue + +* Tue Nov 01 2022 Liutong - 0.4.14 +- fix enable bug + +* Tue Nov 01 2022 Liutong - 0.4.13 +- fix mem error, and modify mo + +* Thu Oct 13 2022 Liutong - 0.4.12 +- change vendor, add po. + +* Wed Oct 12 2022 Liutong - 0.4.10 +- add CARGO_HOME=${HOME}/.cargo + +* Mon Oct 10 2022 Liutong - 0.4.9 +- rename project rash to utshell + +* Sun Oct 9 2022 Zhanghuanhuan - 0.4.8 +- fix: declare command issue and history command issue + +* Thu Sep 29 2022 Wangmeng - 0.4.7 +- fix: add help translation for all commands. + +* Wed Sep 28 2022 Liutong - 0.4.6 +- fix: disown -r issue. + +* Wed Sep 28 2022 Liutong - 0.4.5 +- fix: alias translation-core. + +* Tue Sep 27 2022 Liutong - 0.4.3 +- fix: translation. +- fix: coredump in continue. +- fix: umask fmt error. +- fix: disown issue. +- add translation frame + +* Mon Sep 19 2022 Liutong - 0.4.2 +- add loongarch64 arch and remove debug msg + +* Wed Aug 31 2022 Liutong - 0.4.1 +- modify spec remove /usr/bin + +* Fri Aug 26 2022 Zhanghuanhuan - 0.4.0 +- build rash on aarch_64 +