Projects
openEuler:24.03
zsh
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 15
View file
_service:tar_scm:zsh.spec
Changed
@@ -1,28 +1,41 @@ -%define _bindir /bin - Name: zsh Version: 5.9 -Release: 3 +Release: 4 Summary: A shell designed for interactive use License: MIT -URL: http://zsh.sourceforge.net +URL: https://zsh.sourceforge.net Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz # There are five startup files that zsh will read commands from # http://zsh.sourceforge.net/Intro/intro_3.html -Source1: zlogin -Source2: zlogout -Source3: zprofile -Source4: zshrc -Source5: zshenv +Source1: zlogin.rhs +Source2: zlogout.rhs +Source3: zprofile.rhs +Source4: zshrc.rhs +Source5: zshenv.rhs Source6: dotzshrc -Patch0: zsh-5.9-fix-egrep-test-error.patch +Source7: dotzprofile +# do not use egrep in tests to make them pass again +Patch1: 0001-zsh-5.9-do-not-use-egrep-in-tests.patch +# Upstream commit ab4d62eb975a4c4c51dd35822665050e2ddc6918 +Patch2: 0002-zsh-Use-int-main-in-test-c-codes.patch +# upstream commit a84fdd7c8f77935ecce99ff2b0bdba738821ed79 +Patch3: 0003-zsh-fix-module-loading-problem-with-full-RELRO.patch +# upstream commit 1b421e4978440234fb73117c8505dad1ccc68d46 +Patch4: 0004-zsh-enable-PCRE-locale-switching.patch +# upstream commit b62e911341c8ec7446378b477c47da4256053dc0 and 10bdbd8b5b0b43445aff23dcd412f25cf6aa328a +Patch5: 0005-zsh-port-to-pcre2.patch +# upstream commit ecd3f9c9506c7720dc6c0833dc5d5eb00e4459c4 +Patch6: 0006-zsh-support-texinfo-7.0.patch +# upstream commit 4c89849c98172c951a9def3690e8647dae76308f +Patch7: 0007-zsh-configure-c99.patch +# upstream commit d3edf318306e37d2d96c4e4ea442d10207722e94 +Patch8: 0008-zsh-deletefilelist-segfault.patch BuildRequires: autoconf coreutils gawk gdbm-devel libcap-devel make -BuildRequires: ncurses-devel pcre-devel sed texinfo hostname gcc +BuildRequires: ncurses-devel pcre2-devel sed texinfo hostname gcc -Requires(post): info grep -Requires(preun): info +Requires(post): grep Requires(postun): coreutils grep Provides: /bin/zsh @@ -36,8 +49,8 @@ Summary: zsh shell manual in html format BuildArch: noarch -Provides: zsh-html -Obsoletes: zsh-html +Provides: zsh-html = %{version}-%{release} +Obsoletes: zsh-html < %{version}-%{release} %description help This package contains the zsh manual in html format. @@ -51,36 +64,49 @@ %build %undefine _strict_symbol_defs_build -export LIBLDFLAGS='-z lazy -fstack-protector-strong' - -%configure --enable-etcdir=%{_sysconfdir} --with-tcsetpgrp --enable-maildir-support --enable-pcre +%configure \ + --enable-etcdir=%{_sysconfdir} \ + --with-tcsetpgrp \ + --enable-maildir-support \ + --enable-pcre make -C Src headers make -C Src -f Makemod zsh{path,xmod}s.h version.h %make_build all html %check -make check - -%install -%make_install install.info fndir=%{_datadir}/%{name}/%{version}/functions sitefndir=%{_datadir}/%{name}/site-functions \ - scriptdir=%{_datadir}/%{name}/%{version}/scripts sitescriptdir=%{_datadir}/%{name}/scripts \ - runhelpdir=%{_datadir}/%{name}/%{version}/help +# avoid unnecessary failure of the test-suite in case ${RPS1} is set +unset RPS1 -rm -f $RPM_BUILD_ROOT%{_bindir}/zsh-%{version} -rm -f $RPM_BUILD_ROOT%{_infodir}/dir +%make_build check -install -d ${RPM_BUILD_ROOT}%{_sysconfdir} -for i in %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5}; do - install -m 644 $i $RPM_BUILD_ROOT%{_sysconfdir}/"${i##*/}" +%install +%make_install install.info \ + fndir=%{_datadir}/%{name}/%{version}/functions \ + sitefndir=%{_datadir}/%{name}/site-functions \ + scriptdir=%{_datadir}/%{name}/%{version}/scripts \ + sitescriptdir=%{_datadir}/%{name}/scripts \ + runhelpdir=%{_datadir}/%{name}/%{version}/help + +rm -f %{buildroot}%{_bindir}/zsh-%{version} +rm -f %{buildroot}%{_infodir}/dir + +mkdir -p %{buildroot}%{_sysconfdir} +for i in %{S:1} %{S:2} %{S:3} %{S:4} %{S:5}; do + install -m 644 $i %{buildroot}%{_sysconfdir}/"$(basename $i .rhs)" done -install -d $RPM_BUILD_ROOT%{_sysconfdir}/skel -install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/skel/.zshrc - -for i in checkmail harden run-help zcalc zkbd test-repo-git-rebase-apply test-repo-git-rebase-merge; do - sed -i -e 's!/usr/local/bin/zsh!%{_bindir}/zsh!' $RPM_BUILD_ROOT%{_datadir}/zsh/%{version}/functions/$i - chmod +x $RPM_BUILD_ROOT%{_datadir}/zsh/%{version}/functions/$i +mkdir -p %{buildroot}%{_sysconfdir}/skel +install -m 644 %{S:6} %{buildroot}%{_sysconfdir}/skel/.zshrc +install -m 644 %{S:7} %{buildroot}%{_sysconfdir}/skel/.zprofile + +# This is just here to shut up rpmlint, and is very annoying. +# Note that we can't chmod everything as then rpmlint will complain about +# those without a she-bang line. +for i in checkmail harden run-help test-repo-git-rebase-{apply,merge} zcalc zkbd; do + sed -i -e 's!/usr/local/bin/zsh!%{_bindir}/zsh!' \ + %{buildroot}%{_datadir}/zsh/%{version}/functions/$i + chmod +x %{buildroot}%{_datadir}/zsh/%{version}/functions/$i done %post @@ -94,19 +120,6 @@ fi fi -if -f %{_infodir}/zsh.info.gz ; then -/sbin/install-info %{_infodir}/zsh.info.gz %{_infodir}/dir \ - --entry="* zsh: (zsh). An enhanced bourne shell." -fi - -%preun -if "$1" = 0 ; then - if -f %{_infodir}/zsh.info.gz ; then - /sbin/install-info --delete %{_infodir}/zsh.info.gz %{_infodir}/dir \ - --entry="* zsh: (zsh). An enhanced bourne shell." - fi -fi - %postun if "$1" = 0 && -f %{_sysconfdir}/shells ; then sed -i '\!^%{_bindir}/%{name}$!d' %{_sysconfdir}/shells @@ -114,14 +127,13 @@ fi %files -%doc README LICENCE Etc/* FEATURES MACHINES NEWS +%license LICENCE +%doc README Etc/* FEATURES MACHINES NEWS %attr(755,root,root) %{_bindir}/zsh - +%{_datadir}/zsh %{_libdir}/zsh - %config(noreplace) %{_sysconfdir}/skel/.z* %config(noreplace) %{_sysconfdir}/z* -%{_datadir}/zsh %files help %doc Doc/*.html @@ -129,6 +141,10 @@ %{_infodir}/* %changelog +* Mon Oct 07 2024 Funda Wang <fundawang@yeah.net> - 5.9-4 +- cleanup spec +- sync patches from fedora + * Mon Jan 30 2023 Cao Jingbo <caojb@chinatelecom.cn> - 5.9-3 - Fix when use grep 3.8 build error.
View file
_service:tar_scm:0001-zsh-5.9-do-not-use-egrep-in-tests.patch
Added
@@ -0,0 +1,178 @@ +From 6935aa4b515fe9b782507820c77ab681136470bc Mon Sep 17 00:00:00 2001 +From: Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> +Date: Thu, 15 Sep 2022 18:56:20 +0900 +Subject: PATCH 50629: do not use egrep in tests + +Upstream-commit: 4fc5dc0292acd77f17281f451774ba2ca4203026 +Signed-off-by: Kamil Dudka <kdudka@redhat.com> +--- + Test/D07multibyte.ztst | 16 ++-------------- + Test/E01options.ztst | 2 +- + Test/V07pcre.ztst | 16 ++-------------- + Test/X02zlevi.ztst | 11 +---------- + Test/X03zlebindkey.ztst | 11 +---------- + Test/Y01completion.ztst | 11 +---------- + Test/ztst.zsh | 15 +++++++++++++++ + 7 files changed, 23 insertions(+), 59 deletions(-) + +diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst +index e2e9a25..6909346 100644 +--- a/Test/D07multibyte.ztst ++++ b/Test/D07multibyte.ztst +@@ -1,19 +1,7 @@ + %prep + +-# Find a UTF-8 locale. +- setopt multibyte +-# Don't let LC_* override our choice of locale. +- unset -m LC_\* +- mb_ok= +- langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 +- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) +- for LANG in $langs; do +- if é = ? ; then +- mb_ok=1 +- break; +- fi +- done +- if -z $mb_ok ; then ++ LANG=$(ZTST_find_UTF8) ++ if -z $LANG ; then + ZTST_unimplemented="no UTF-8 locale or multibyte mode is not implemented" + else + print -u $ZTST_fd Testing multibyte with locale $LANG +diff --git a/Test/E01options.ztst b/Test/E01options.ztst +index 2acbfd3..d38fbed 100644 +--- a/Test/E01options.ztst ++++ b/Test/E01options.ztst +@@ -651,7 +651,7 @@ + >noktarg1 + >0 1 + +- showopt() { setopt | egrep 'localoptions|ksharrays'; } ++ showopt() { echo ${(FM)${(@f)"$(setopt)"}:#(localoptions|ksharrays)*} } + f1() { setopt localoptions ksharrays; showopt } + f2() { setopt ksharrays; showopt } + setopt kshoptionprint +diff --git a/Test/V07pcre.ztst b/Test/V07pcre.ztst +index c9c844d..ca13419 100644 +--- a/Test/V07pcre.ztst ++++ b/Test/V07pcre.ztst +@@ -6,20 +6,8 @@ + return 0 + fi + setopt rematch_pcre +-# Find a UTF-8 locale. +- setopt multibyte +-# Don't let LC_* override our choice of locale. +- unset -m LC_\* +- mb_ok= +- langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 +- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) +- for LANG in $langs; do +- if é = ? ; then +- mb_ok=1 +- break; +- fi +- done +- if -z $mb_ok ; then ++ LANG=$(ZTST_find_UTF8) ++ if -z $LANG ; then + ZTST_unimplemented="no UTF-8 locale or multibyte mode is not implemented" + else + print -u $ZTST_fd Testing PCRE multibyte with locale $LANG +diff --git a/Test/X02zlevi.ztst b/Test/X02zlevi.ztst +index 8146d67..203c13c 100644 +--- a/Test/X02zlevi.ztst ++++ b/Test/X02zlevi.ztst +@@ -1,16 +1,7 @@ + # Tests of the vi mode of ZLE + + %prep +- unset -m LC_\* +- ZSH_TEST_LANG= +- langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 +- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) +- for LANG in $langs; do +- if é = ? ; then +- ZSH_TEST_LANG=$LANG +- break; +- fi +- done ++ ZSH_TEST_LANG=$(ZTST_find_UTF8) + if ( zmodload zsh/zpty 2>/dev/null ); then + . $ZTST_srcdir/comptest + comptestinit -v -z $ZTST_testdir/../Src/zsh +diff --git a/Test/X03zlebindkey.ztst b/Test/X03zlebindkey.ztst +index 43692a8..5277332 100644 +--- a/Test/X03zlebindkey.ztst ++++ b/Test/X03zlebindkey.ztst +@@ -3,16 +3,7 @@ + # into bindings. The latter is particularly tricky with multibyte sequences. + + %prep +- unset -m LC_\* +- ZSH_TEST_LANG= +- langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 +- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) +- for LANG in $langs; do +- if é = ? ; then +- ZSH_TEST_LANG=$LANG +- break; +- fi +- done ++ ZSH_TEST_LANG=$(ZTST_find_UTF8) + if ( zmodload zsh/zpty 2>/dev/null ); then + . $ZTST_srcdir/comptest + comptestinit -z $ZTST_testdir/../Src/zsh +diff --git a/Test/Y01completion.ztst b/Test/Y01completion.ztst +index 6af0efc..f976f9f 100644 +--- a/Test/Y01completion.ztst ++++ b/Test/Y01completion.ztst +@@ -1,16 +1,7 @@ + # Tests for completion system. + + %prep +- unset -m LC_\* +- ZSH_TEST_LANG= +- langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 +- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) +- for LANG in $langs; do +- if é = ? ; then +- ZSH_TEST_LANG=$LANG +- break; +- fi +- done ++ ZSH_TEST_LANG=$(ZTST_find_UTF8) + if ( zmodload zsh/zpty 2>/dev/null ); then + . $ZTST_srcdir/comptest + mkdir comp.tmp +diff --git a/Test/ztst.zsh b/Test/ztst.zsh +index aca275c..d95b726 100755 +--- a/Test/ztst.zsh ++++ b/Test/ztst.zsh +@@ -37,6 +37,21 @@ emulate -R zsh + # LANG must be passed to child zsh. + export LANG + ++# find UTF-8 locale ++ZTST_find_UTF8 () { ++ setopt multibyte ++ # Don't let LC_* override our choice of locale. ++ unset -m LC_\* ++ local langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 ++ ${(M)$(locale -a 2>/dev/null):#*.(utf8|UTF-8)}) ++ for LANG in $langs; do ++ if é = ? ; then ++ echo $LANG ++ return ++ fi ++ done ++} ++ + # Don't propagate variables that are set by default in the shell. + typeset +x WORDCHARS + +-- +2.39.0 +
View file
_service:tar_scm:0002-zsh-Use-int-main-in-test-c-codes.patch
Added
@@ -0,0 +1,541 @@ +commit ab4d62eb975a4c4c51dd35822665050e2ddc6918 +Author: Nicholas Vinson <nvinson234@gmail.com> +Date: Wed Sep 21 09:22:11 2022 +0900 + + 50641: use 'int main()' in test C-codes in configure + +diff --git a/aczsh.m4 b/aczsh.m4 +index 1209ac614..b31236020 100644 +--- a/aczsh.m4 ++++ b/aczsh.m4 +@@ -44,6 +44,7 @@ AC_DEFUN(zsh_64_BIT_TYPE, + #include <sys/types.h> + #endif + ++int + main() + { + $1 foo = 0; +@@ -118,7 +119,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS + AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) && + AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then + AC_RUN_IFELSE(AC_LANG_SOURCE( +-#include <stdlib.h> + #ifdef HPUX10DYNAMIC + #include <dl.h> + #define RTLD_LAZY BIND_DEFERRED +@@ -146,29 +146,30 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + ++int + main() + { + void *handle1, *handle2; + void *(*zsh_getaddr1)(), *(*zsh_getaddr2)(); + void *sym1, *sym2; + handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle1) exit(1); ++ if(!handle1) return(1); + handle2 = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle2) exit(1); ++ if(!handle2) return(1); + zsh_getaddr1 = (void *(*)()) dlsym(handle1, "${us}zsh_getaddr1"); + zsh_getaddr2 = (void *(*)()) dlsym(handle2, "${us}zsh_getaddr2"); + sym1 = zsh_getaddr1(); + sym2 = zsh_getaddr2(); +- if(!sym1 || !sym2) exit(1); +- if(sym1 != sym2) exit(1); ++ if(!sym1 || !sym2) return(1); ++ if(sym1 != sym2) return(1); + dlclose(handle1); + handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle1) exit(1); ++ if(!handle1) return(1); + zsh_getaddr1 = (void *(*)()) dlsym(handle1, "${us}zsh_getaddr1"); + sym1 = zsh_getaddr1(); +- if(!sym1) exit(1); +- if(sym1 != sym2) exit(1); +- exit(0); ++ if(!sym1) return(1); ++ if(sym1 != sym2) return(1); ++ return(0); + } + ),zsh_cv_shared_$1=yes, + zsh_cv_shared_$1=no, +@@ -200,7 +201,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS + AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) && + AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then + AC_RUN_IFELSE(AC_LANG_SOURCE( +-#include <stdlib.h> + #ifdef HPUX10DYNAMIC + #include <dl.h> + #define RTLD_LAZY BIND_DEFERRED +@@ -228,19 +228,19 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + +- ++int + main() + { + void *handle1, *handle2; + int (*fred1)(), (*fred2)(); + handle1 = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle1) exit(1); ++ if(!handle1) return(1); + handle2 = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle2) exit(1); ++ if(!handle2) return(1); + fred1 = (int (*)()) dlsym(handle1, "${us}fred"); + fred2 = (int (*)()) dlsym(handle2, "${us}fred"); +- if(!fred1 || !fred2) exit(1); +- exit((*fred1)() != 42 || (*fred2)() != 69); ++ if(!fred1 || !fred2) return(1); ++ return((*fred1)() != 42 || (*fred2)() != 69); + } + ),zsh_cv_sys_dynamic_clash_ok=yes, + zsh_cv_sys_dynamic_clash_ok=no, +@@ -276,7 +276,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS + AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AS_MESSAGE_LOG_FD) && + AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o $LIBS 1>&AS_MESSAGE_LOG_FD); then + AC_RUN_IFELSE(AC_LANG_SOURCE( +-#include <stdlib.h> + #ifdef HPUX10DYNAMIC + #include <dl.h> + #define RTLD_LAZY BIND_DEFERRED +@@ -304,17 +303,18 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + ++int + main() + { + void *handle; + int (*barneysym)(); + handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle) exit(1); ++ if(!handle) return(1); + handle = dlopen("./conftest2.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle) exit(1); ++ if(!handle) return(1); + barneysym = (int (*)()) dlsym(handle, "${us}barney"); +- if(!barneysym) exit(1); +- exit((*barneysym)() != 69); ++ if(!barneysym) return(1); ++ return((*barneysym)() != 69); + } + ),zsh_cv_sys_dynamic_rtld_global=yes, + zsh_cv_sys_dynamic_rtld_global=no, +@@ -346,7 +346,6 @@ AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS conftest1.o $LIBS + save_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" + AC_RUN_IFELSE(AC_LANG_SOURCE( +-#include <stdlib.h> + #ifdef HPUX10DYNAMIC + #include <dl.h> + #define RTLD_LAZY BIND_DEFERRED +@@ -374,15 +373,16 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + ++int + main() + { + void *handle; + int (*barneysym)(); + handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle) exit(1); ++ if(!handle) return(1); + barneysym = (int (*)()) dlsym(handle, "${us}barney"); +- if(!barneysym) exit(1); +- exit((*barneysym)() != 69); ++ if(!barneysym) return(1); ++ return((*barneysym)() != 69); + } + + int fred () { return 42; } +@@ -420,7 +420,6 @@ elif + save_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS -s" + AC_RUN_IFELSE(AC_LANG_SOURCE( +-#include <stdlib.h> + #ifdef HPUX10DYNAMIC + #include <dl.h> + #define RTLD_LAZY BIND_DEFERRED +@@ -448,15 +447,16 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + ++int + main() + { + void *handle; + int (*barneysym)(); + handle = dlopen("./conftest1.$DL_EXT", RTLD_LAZY | RTLD_GLOBAL); +- if(!handle) exit(1); ++ if(!handle) return(1); + barneysym = (int (*)()) dlsym(handle, "${us}barney"); +- if(!barneysym) exit(1); +- exit((*barneysym)() != 69); ++ if(!barneysym) return(1); ++ return((*barneysym)() != 69); + } + + int fred () { return 42; } +@@ -488,7 +488,6 @@ echo 'int fred () { return 42; }' > conftest1.c + if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AS_MESSAGE_LOG_FD) && + AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS -s conftest1.o $LIBS 1>&AS_MESSAGE_LOG_FD); then + AC_RUN_IFELSE(AC_LANG_SOURCE( +-#include <stdlib.h> + #ifdef HPUX10DYNAMIC + #include <dl.h> + #define RTLD_LAZY BIND_DEFERRED +@@ -516,15 +515,16 @@ char *zsh_gl_sym_addr ; + #define RTLD_GLOBAL 0 + #endif + ++int + main()
View file
_service:tar_scm:0003-zsh-fix-module-loading-problem-with-full-RELRO.patch
Added
@@ -0,0 +1,69 @@ +From a84fdd7c8f77935ecce99ff2b0bdba738821ed79 Mon Sep 17 00:00:00 2001 +From: Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> +Date: Mon, 26 Jun 2023 17:13:04 +0900 +Subject: PATCH 51889: fix module loading problem with full RELRO + +If full RELRO (relocation read-only, one of the security enhancement +methods for ELF-based systems) is used when building zsh (as in binary +packages of most Linuxes), loading a module (e.g. zsh/zftp) fails unless +all the modules it depends on are already loaded. With this patch the +necessary modules are automatically loaded. + +Upstream-commit: a84fdd7c8f77935ecce99ff2b0bdba738821ed79 +Signed-off-by: Lukáš Zaoral <lzaoral@redhat.com> +--- + Src/Modules/zftp.c | 2 +- + Src/mkbltnmlst.sh | 24 ++++++++++++++++++++++++ + 2 files changed, 25 insertions(+), 1 deletion(-) + +diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c +index 49b3ffa89..47a5e9de9 100644 +--- a/Src/Modules/zftp.c ++++ b/Src/Modules/zftp.c +@@ -3172,7 +3172,7 @@ static struct features module_features = { + int + setup_(UNUSED(Module m)) + { +- return (require_module("zsh/net/tcp", NULL, 0) == 1); ++ return 0; + } + + /**/ +diff --git a/Src/mkbltnmlst.sh b/Src/mkbltnmlst.sh +index c4611d8b3..067ecdaf9 100644 +--- a/Src/mkbltnmlst.sh ++++ b/Src/mkbltnmlst.sh +@@ -76,6 +76,30 @@ for x_mod in $x_mods; do + test "x$linked" = xno && echo "#endif" + done + ++# if dynamic module 'mod' with load=no has moddeps in its .mdd, ++# then output add_dep(mod, dep) for each 'dep' in moddeps. ++dyn_mods="`grep ' link=dynamic .* load=no ' $CFMOD | \ ++ sed -e '/^#/d' -e 's/ .*/ /' -e 's/^name=/ /'`" ++ ++for mod in $dyn_mods; do ++ modfile="`grep '^name='$mod' ' $CFMOD | \ ++ sed -e 's/^.* modfile=//' -e 's/ .*//'`" ++ if test "x$modfile" = x; then ++ echo >&2 "WARNING: no name for \`$mod' in $CFMOD (ignored)" ++ continue ++ fi ++ unset moddeps ++ . $srcdir/../$modfile ++ if test -n "$moddeps"; then ++ echo '#ifdef DYNAMIC' ++ echo "/* non-linked-in known module \`$mod' */" ++ for dep in $moddeps; do ++ echo " add_dep(\"$mod\", \"$dep\");" ++ done ++ echo '#endif' ++ fi ++done ++ + echo + done_mods=" " + for bin_mod in $bin_mods; do +-- +2.41.0 +
View file
_service:tar_scm:0004-zsh-enable-PCRE-locale-switching.patch
Added
@@ -0,0 +1,64 @@ +From 1b421e4978440234fb73117c8505dad1ccc68d46 Mon Sep 17 00:00:00 2001 +From: Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> +Date: Mon, 26 Sep 2022 10:52:50 +0900 +Subject: PATCH 50658 + test: Enable to switch between C/UTF-8 locales in + PCRE + +--- + Src/Modules/pcre.c | 10 ++-------- + Test/V07pcre.ztst | 11 +++++++++++ + 2 files changed, 13 insertions(+), 8 deletions(-) + +diff --git a/Src/Modules/pcre.c b/Src/Modules/pcre.c +index 6289e003e..46875a59b 100644 +--- a/Src/Modules/pcre.c ++++ b/Src/Modules/pcre.c +@@ -47,8 +47,6 @@ zpcre_utf8_enabled(void) + #if defined(MULTIBYTE_SUPPORT) && defined(HAVE_NL_LANGINFO) && defined(CODESET) + static int have_utf8_pcre = -1; + +- /* value can toggle based on MULTIBYTE, so don't +- * be too eager with caching */ + if (have_utf8_pcre < -1) + return 0; + +@@ -56,15 +54,11 @@ zpcre_utf8_enabled(void) + return 0; + + if ((have_utf8_pcre == -1) && +- (!strcmp(nl_langinfo(CODESET), "UTF-8"))) { +- +- if (pcre_config(PCRE_CONFIG_UTF8, &have_utf8_pcre)) ++ (pcre_config(PCRE_CONFIG_UTF8, &have_utf8_pcre))) { + have_utf8_pcre = -2; /* erk, failed to ask */ + } + +- if (have_utf8_pcre < 0) +- return 0; +- return have_utf8_pcre; ++ return (have_utf8_pcre == 1) && (!strcmp(nl_langinfo(CODESET), "UTF-8")); + + #else + return 0; +diff --git a/Test/V07pcre.ztst b/Test/V07pcre.ztst +index ca13419e5..22a0b64c7 100644 +--- a/Test/V07pcre.ztst ++++ b/Test/V07pcre.ztst +@@ -162,3 +162,14 @@ + echo $match2 ) + 0:regression for segmentation fault, workers/38307 + >test ++ ++ LANG_SAVE=$LANG ++ é =~ '^.\z' ; echo $? ++ LANG=C ++ é =~ '^..\z' ; echo $? ++ LANG=$LANG_SAVE ++ é =~ '^.\z' ; echo $? ++0:swich between C/UTF-8 locales ++>0 ++>0 ++>0 +-- +2.41.0 +
View file
_service:tar_scm:0005-zsh-port-to-pcre2.patch
Added
@@ -0,0 +1,641 @@ +From b62e911341c8ec7446378b477c47da4256053dc0 Mon Sep 17 00:00:00 2001 +From: Oliver Kiddle <opk@zsh.org> +Date: Sat, 13 May 2023 00:53:32 +0200 +Subject: PATCH 51723: migrate pcre module to pcre2 + + Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com> +--- + Src/Modules/pcre.c | 223 ++++++++++++++++++--------------------------- + Test/V07pcre.ztst | 13 ++- + configure.ac | 20 ++-- + 3 files changed, 109 insertions(+), 149 deletions(-) + +diff --git a/Src/Modules/pcre.c b/Src/Modules/pcre.c +index 46875a59b..079ecc2c5 100644 +--- a/Src/Modules/pcre.c ++++ b/Src/Modules/pcre.c +@@ -34,11 +34,11 @@ + #define CPCRE_PLAIN 0 + + /**/ +-#if defined(HAVE_PCRE_COMPILE) && defined(HAVE_PCRE_EXEC) +-#include <pcre.h> ++#if defined(HAVE_PCRE2_COMPILE_8) && defined(HAVE_PCRE2_H) ++#define PCRE2_CODE_UNIT_WIDTH 8 ++#include <pcre2.h> + +-static pcre *pcre_pattern; +-static pcre_extra *pcre_hints; ++static pcre2_code *pcre_pattern; + + /**/ + static int +@@ -54,8 +54,8 @@ zpcre_utf8_enabled(void) + return 0; + + if ((have_utf8_pcre == -1) && +- (pcre_config(PCRE_CONFIG_UTF8, &have_utf8_pcre))) { +- have_utf8_pcre = -2; /* erk, failed to ask */ ++ (pcre2_config(PCRE2_CONFIG_UNICODE, &have_utf8_pcre))) { ++ have_utf8_pcre = -2; /* erk, failed to ask */ + } + + return (have_utf8_pcre == 1) && (!strcmp(nl_langinfo(CODESET), "UTF-8")); +@@ -69,115 +69,87 @@ zpcre_utf8_enabled(void) + static int + bin_pcre_compile(char *nam, char **args, Options ops, UNUSED(int func)) + { +- int pcre_opts = 0, pcre_errptr, target_len; +- const char *pcre_error; ++ uint32_t pcre_opts = 0; ++ int target_len; ++ int pcre_error; ++ PCRE2_SIZE pcre_offset; + char *target; + +- if(OPT_ISSET(ops,'a')) pcre_opts |= PCRE_ANCHORED; +- if(OPT_ISSET(ops,'i')) pcre_opts |= PCRE_CASELESS; +- if(OPT_ISSET(ops,'m')) pcre_opts |= PCRE_MULTILINE; +- if(OPT_ISSET(ops,'x')) pcre_opts |= PCRE_EXTENDED; +- if(OPT_ISSET(ops,'s')) pcre_opts |= PCRE_DOTALL; ++ if (OPT_ISSET(ops, 'a')) pcre_opts |= PCRE2_ANCHORED; ++ if (OPT_ISSET(ops, 'i')) pcre_opts |= PCRE2_CASELESS; ++ if (OPT_ISSET(ops, 'm')) pcre_opts |= PCRE2_MULTILINE; ++ if (OPT_ISSET(ops, 'x')) pcre_opts |= PCRE2_EXTENDED; ++ if (OPT_ISSET(ops, 's')) pcre_opts |= PCRE2_DOTALL; + + if (zpcre_utf8_enabled()) +- pcre_opts |= PCRE_UTF8; +- +-#ifdef HAVE_PCRE_STUDY +- if (pcre_hints) +-#ifdef PCRE_CONFIG_JIT +- pcre_free_study(pcre_hints); +-#else +- pcre_free(pcre_hints); +-#endif +- pcre_hints = NULL; +-#endif ++ pcre_opts |= PCRE2_UTF; + + if (pcre_pattern) +- pcre_free(pcre_pattern); ++ pcre2_code_free(pcre_pattern); + pcre_pattern = NULL; + + target = ztrdup(*args); + unmetafy(target, &target_len); + +- if ((int)strlen(target) != target_len) { +- zwarnnam(nam, "embedded NULs in PCRE pattern terminate pattern"); +- } +- +- pcre_pattern = pcre_compile(target, pcre_opts, &pcre_error, &pcre_errptr, NULL); ++ pcre_pattern = pcre2_compile((PCRE2_SPTR) target, (PCRE2_SIZE) target_len, ++ pcre_opts, &pcre_error, &pcre_offset, NULL); + + free(target); + + if (pcre_pattern == NULL) + { +- zwarnnam(nam, "error in regex: %s", pcre_error); ++ PCRE2_UCHAR buffer256; ++ pcre2_get_error_message(pcre_error, buffer, sizeof(buffer)); ++ zwarnnam(nam, "error in regex: %s", buffer); + return 1; + } + + return 0; + } + +-/**/ +-#ifdef HAVE_PCRE_STUDY +- + /**/ + static int + bin_pcre_study(char *nam, UNUSED(char **args), UNUSED(Options ops), UNUSED(int func)) + { +- const char *pcre_error; +- + if (pcre_pattern == NULL) + { + zwarnnam(nam, "no pattern has been compiled for study"); + return 1; + } +- +- if (pcre_hints) +-#ifdef PCRE_CONFIG_JIT +- pcre_free_study(pcre_hints); +-#else +- pcre_free(pcre_hints); +-#endif +- pcre_hints = NULL; + +- pcre_hints = pcre_study(pcre_pattern, 0, &pcre_error); +- if (pcre_error != NULL) +- { +- zwarnnam(nam, "error while studying regex: %s", pcre_error); +- return 1; ++ int jit = 0; ++ if (!pcre2_config(PCRE2_CONFIG_JIT, &jit) && jit) { ++ if (pcre2_jit_compile(pcre_pattern, PCRE2_JIT_COMPLETE) < 0) { ++ zwarnnam(nam, "error while studying regex"); ++ return 1; ++ } + } + + return 0; + } + +-/**/ +-#else /* !HAVE_PCRE_STUDY */ +- +-# define bin_pcre_study bin_notavail +- +-/**/ +-#endif /* !HAVE_PCRE_STUDY */ +- +-/**/ + static int +-zpcre_get_substrings(char *arg, int *ovec, int captured_count, char *matchvar, +- char *substravar, int want_offset_pair, int matchedinarr, +- int want_begin_end) ++zpcre_get_substrings(char *arg, pcre2_match_data *mdata, int captured_count, ++ char *matchvar, char *substravar, int want_offset_pair, ++ int matchedinarr, int want_begin_end) + { +- char **captures, *match_all, **matches; ++ PCRE2_SIZE *ovec; ++ char *match_all, **matches; + char offset_all50; + int capture_start = 1; + + if (matchedinarr) { +- /* bash-style captures0 entire-matched string in the array */ ++ /* bash-style ovec0 entire-matched string in the array */ + capture_start = 0; + } + +- /* captures0 will be entire matched string, 1 first substring */ +- if (!pcre_get_substring_list(arg, ovec, captured_count, (const char ***)&captures)) { +- int nelem = arrlen(captures)-1; ++ /* ovec0 will be entire matched string, 1 first substring */ ++ ovec = pcre2_get_ovector_pointer(mdata); ++ if (ovec) { ++ int nelem = captured_count - 1; + /* Set to the offsets of the complete match */ + if (want_offset_pair) { +- sprintf(offset_all, "%d %d", ovec0, ovec1); ++ sprintf(offset_all, "%ld %ld", ovec0, ovec1); + setsparam("ZPCRE_OP", ztrdup(offset_all)); + } + /* +@@ -186,7 +158,7 @@ zpcre_get_substrings(char *arg, int *ovec, int captured_count, char *matchvar, + * ovec is length 2*(1+capture_list_length) + */ + if (matchvar) { +- match_all = metafy(captures0, ovec1 - ovec0, META_DUP); ++ match_all = metafy(arg + ovec0, ovec1 - ovec0, META_DUP); + setsparam(matchvar, match_all);
View file
_service:tar_scm:0006-zsh-support-texinfo-7.0.patch
Added
@@ -0,0 +1,53 @@ +From ecd3f9c9506c7720dc6c0833dc5d5eb00e4459c4 Mon Sep 17 00:00:00 2001 +From: Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> +Date: Mon, 19 Jun 2023 11:19:25 +0900 +Subject: PATCH 51862: support texinfo-7.0 + +Upstream-commit: ecd3f9c9506c7720dc6c0833dc5d5eb00e4459c4 +Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com> +--- + Doc/Makefile.in | 3 ++- + configure.ac | 5 +++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/Doc/Makefile.in b/Doc/Makefile.in +index 136b080d6..dabe11fe3 100644 +--- a/Doc/Makefile.in ++++ b/Doc/Makefile.in +@@ -43,6 +43,7 @@ TEXI2DVI = @TEXI2DVI@ + DVIPS = dvips + TEXI2PDF = @TEXI2PDF@ + TEXI2HTML = @TEXI2HTML@ ++SET_TEXI2ANY_VAR = @SET_TEXI2ANY_VAR@ + PAPERSIZE = @PAPERSIZE@ + + .SUFFIXES: .yo .1 +@@ -266,7 +267,7 @@ texi2html.conf: $(sdir_top)/Config/version.mk + d=`echo $(VERSION_DATE)`; \ + v="<font size=\"-1\">Zsh version $(VERSION), released on $$d.</font>"; \ + case '$(TEXI2HTML)' in \ +- *texi2any*) echo "set_from_init_file('PRE_BODY_CLOSE','$$v');" ;; \ ++ *texi2any*) echo "$(SET_TEXI2ANY_VAR)('PRE_BODY_CLOSE','$$v');" ;; \ + *) echo "\$$PRE_BODY_CLOSE = '$$v';" ;; \ + esac > $@ + +diff --git a/configure.ac b/configure.ac +index 4710d1659..ba76f9a60 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -623,7 +623,12 @@ fi + + if test x"$TEXI2HTML" = xtexi2any; then + TEXI2HTML='texi2any -c TEXI2HTML=1' ++ case `texi2any --version 2>/dev/null | sed -e 's/^.*) *//' -e 1q` in ++ 1-6.*) SET_TEXI2ANY_VAR=set_from_init_file ;; ++ *) SET_TEXI2ANY_VAR=texinfo_set_from_init_file ;; ++ esac + fi ++AC_SUBST(SET_TEXI2ANY_VAR) + + case "$LC_PAPER" in + ??_US*) PAPERSIZE=us ;; +-- +2.42.0 +
View file
_service:tar_scm:0007-zsh-configure-c99.patch
Added
@@ -0,0 +1,44 @@ +Avoid incompatible pointer types in terminfo global variable checks. +Some compilers reject these incompatible pointer types, causing the +checks to always fail, when these variables are in fact available. + +Submitted upstream: <https://www.zsh.org/mla/workers/2023/msg01112.html> + +diff --git a/configure.ac b/configure.ac +index a58242f453b4a8f3..5534f42df14eb28c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1769,27 +1769,27 @@ if test x$zsh_cv_path_term_header != xnone; then + fi + + AC_MSG_CHECKING(if boolcodes is available) +- AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = boolcodes; puts(*test);),AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes,boolcodes=no) ++ AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = (char **)boolcodes; puts(*test);),AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes,boolcodes=no) + AC_MSG_RESULT($boolcodes) + + AC_MSG_CHECKING(if numcodes is available) +- AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = numcodes; puts(*test);),AC_DEFINE(HAVE_NUMCODES) numcodes=yes,numcodes=no) ++ AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = (char **)numcodes; puts(*test);),AC_DEFINE(HAVE_NUMCODES) numcodes=yes,numcodes=no) + AC_MSG_RESULT($numcodes) + + AC_MSG_CHECKING(if strcodes is available) +- AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = strcodes; puts(*test);),AC_DEFINE(HAVE_STRCODES) strcodes=yes,strcodes=no) ++ AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = (char **)strcodes; puts(*test);),AC_DEFINE(HAVE_STRCODES) strcodes=yes,strcodes=no) + AC_MSG_RESULT($strcodes) + + AC_MSG_CHECKING(if boolnames is available) +- AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = boolnames; puts(*test);),AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes,boolnames=no) ++ AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = (char **)boolnames; puts(*test);),AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes,boolnames=no) + AC_MSG_RESULT($boolnames) + + AC_MSG_CHECKING(if numnames is available) +- AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = numnames; puts(*test);),AC_DEFINE(HAVE_NUMNAMES) numnames=yes,numnames=no) ++ AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = (char **)numnames; puts(*test);),AC_DEFINE(HAVE_NUMNAMES) numnames=yes,numnames=no) + AC_MSG_RESULT($numnames) + + AC_MSG_CHECKING(if strnames is available) +- AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = strnames; puts(*test);),AC_DEFINE(HAVE_STRNAMES) strnames=yes,strnames=no) ++ AC_LINK_IFELSE(AC_LANG_PROGRAM($term_includes, char **test = (char **)strnames; puts(*test);),AC_DEFINE(HAVE_STRNAMES) strnames=yes,strnames=no) + AC_MSG_RESULT($strnames) + + dnl There are apparently defective terminal library headers on some
View file
_service:tar_scm:0008-zsh-deletefilelist-segfault.patch
Added
@@ -0,0 +1,42 @@ +From d3edf318306e37d2d96c4e4ea442d10207722e94 Mon Sep 17 00:00:00 2001 +From: Bart Schaefer <schaefer@zsh.org> +Date: Sun, 12 Feb 2023 09:52:39 -0800 +Subject: PATCH 51404: Nullify filelist after deleting (fix segfault) + +Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com> +Upstream-commit: d3edf318306e37d2d96c4e4ea442d10207722e94 +--- + Src/jobs.c | 8 ++++++-- + 1 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/Src/jobs.c b/Src/jobs.c +index 4863962b9..59ddd952e 100644 +--- a/Src/jobs.c ++++ b/Src/jobs.c +@@ -1372,8 +1372,10 @@ cleanfilelists(void) + + DPUTS(shell_exiting >= 0, "BUG: cleanfilelists() before exit"); + +- for (i = 1; i <= maxjob; i++) ++ for (i = 1; i <= maxjob; i++) { + deletefilelist(jobtabi.filelist, 0); ++ jobtabi.filelist = 0; ++ } + } + + /**/ +@@ -1531,8 +1533,10 @@ havefiles(void) + int i; + + for (i = 1; i <= maxjob; i++) +- if (jobtabi.stat && jobtabi.filelist) ++ if (jobtabi.stat && jobtabi.filelist && ++ peekfirst(jobtabi.filelist)) { + return 1; ++ } + return 0; + + } +-- +2.43.0 +
View file
_service:tar_scm:zsh-5.9-fix-egrep-test-error.patch
Deleted
@@ -1,72 +0,0 @@ -diff -Naur a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst ---- a/Test/D07multibyte.ztst 2022-05-08 14:18:22.000000000 +0800 -+++ b/Test/D07multibyte.ztst 2023-01-30 16:26:37.480018635 +0800 -@@ -6,7 +6,7 @@ - unset -m LC_\* - mb_ok= - langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 -- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) -+ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8')) - for LANG in $langs; do - if é = ? ; then - mb_ok=1 -diff -Naur a/Test/E01options.ztst b/Test/E01options.ztst ---- a/Test/E01options.ztst 2022-05-08 14:18:22.000000000 +0800 -+++ b/Test/E01options.ztst 2023-01-30 16:26:37.481018640 +0800 -@@ -651,7 +651,7 @@ - >noktarg1 - >0 1 - -- showopt() { setopt | egrep 'localoptions|ksharrays'; } -+ showopt() { setopt | grep -E 'localoptions|ksharrays'; } - f1() { setopt localoptions ksharrays; showopt } - f2() { setopt ksharrays; showopt } - setopt kshoptionprint -diff -Naur a/Test/V07pcre.ztst b/Test/V07pcre.ztst ---- a/Test/V07pcre.ztst 2022-05-08 14:18:22.000000000 +0800 -+++ b/Test/V07pcre.ztst 2023-01-30 16:26:37.488018676 +0800 -@@ -12,7 +12,7 @@ - unset -m LC_\* - mb_ok= - langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 -- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) -+ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8')) - for LANG in $langs; do - if é = ? ; then - mb_ok=1 -diff -Naur a/Test/X02zlevi.ztst b/Test/X02zlevi.ztst ---- a/Test/X02zlevi.ztst 2022-05-08 14:18:22.000000000 +0800 -+++ b/Test/X02zlevi.ztst 2023-01-30 16:26:37.492018696 +0800 -@@ -4,7 +4,7 @@ - unset -m LC_\* - ZSH_TEST_LANG= - langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 -- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) -+ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8')) - for LANG in $langs; do - if é = ? ; then - ZSH_TEST_LANG=$LANG -diff -Naur a/Test/X03zlebindkey.ztst b/Test/X03zlebindkey.ztst ---- a/Test/X03zlebindkey.ztst 2022-05-08 14:18:22.000000000 +0800 -+++ b/Test/X03zlebindkey.ztst 2023-01-30 16:26:37.492018696 +0800 -@@ -6,7 +6,7 @@ - unset -m LC_\* - ZSH_TEST_LANG= - langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 -- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) -+ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8')) - for LANG in $langs; do - if é = ? ; then - ZSH_TEST_LANG=$LANG -diff -Naur a/Test/Y01completion.ztst b/Test/Y01completion.ztst ---- a/Test/Y01completion.ztst 2022-05-08 14:18:22.000000000 +0800 -+++ b/Test/Y01completion.ztst 2023-01-30 16:26:37.493018701 +0800 -@@ -4,7 +4,7 @@ - unset -m LC_\* - ZSH_TEST_LANG= - langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8 -- $(locale -a 2>/dev/null | egrep 'utf8|UTF-8')) -+ $(locale -a 2>/dev/null | grep -E 'utf8|UTF-8')) - for LANG in $langs; do - if é = ? ; then - ZSH_TEST_LANG=$LANG
View file
_service:tar_scm:dotzprofile
Added
@@ -0,0 +1,12 @@ +# this file is installed as ~/.zprofile for newly created users + +# prepend ~/.local/bin and ~/bin to $PATH unless it is already there +if ! "$PATH" =~ "$HOME/bin" +then + PATH="$HOME/bin:$PATH" +fi +if ! "$PATH" =~ "$HOME/.local/bin:" +then + PATH="$HOME/.local/bin:$PATH" +fi +export PATH
View file
_service:tar_scm:dotzshrc
Changed
@@ -4,6 +4,31 @@ # functions, options, key bindings, etc. # -# Setup new style completion system. autoload -U compinit compinit + +#allow tab completion in the middle of a word +setopt COMPLETE_IN_WORD + +## keep background processes at full speed +#setopt NOBGNICE +## restart running processes on exit +#setopt HUP + +## history +#setopt APPEND_HISTORY +## for sharing history between zsh processes +#setopt INC_APPEND_HISTORY +#setopt SHARE_HISTORY + +## never ever beep ever +#setopt NO_BEEP + +## automatically decide when to page a list of completions +#LISTMAX=0 + +## disable mail checking +#MAILCHECK=0 + +# autoload -U colors +#colors
View file
_service:tar_scm:zlogin
Deleted
@@ -1,4 +0,0 @@ -# -# '.zlogin' is sourced in login shells. It should contain -# commands that should be executed only in login shells. -#
View file
_service:tar_scm:zlogin.rhs
Added
@@ -0,0 +1,8 @@ +# +# /etc/zlogin and .zlogin are sourced in login shells. It should +# contain commands that should be executed only in +# login shells. It should be used to set the terminal +# type and run a series of external commands (fortune, +# msgs, from, etc). +# +
View file
_service:tar_scm:zlogout
Deleted
@@ -1,5 +0,0 @@ -# -# '.zlogout' is sourced when login shells exit -# - -clear
View file
_service:tar_scm:zlogout.rhs
Added
@@ -0,0 +1,7 @@ +# +# +# /etc/zlogout and ~/.zlogout are run when an interactive session ends +# +# + +command -v clear &> /dev/null && clear
View file
_service:tar_scm:zprofile
Deleted
@@ -1,8 +0,0 @@ -# -# '.zlogout' is similar to `.zlogin', except that it is sourced before `.zshrc' -# - -PATH="$PATH:$HOME/bin" -export PATH - - -f /etc/profile && . /etc/profile
View file
_service:tar_scm:zprofile.rhs
Added
@@ -0,0 +1,19 @@ +# +# /etc/zprofile and ~/.zprofile are run for login shells +# + +_src_etc_profile() +{ + # Make /etc/profile happier, and have possible ~/.zshenv options like + # NOMATCH ignored. + # + emulate -L ksh + + # source profile + if -f /etc/profile ; then + source /etc/profile + fi +} +_src_etc_profile + +unset -f _src_etc_profile
View file
_service:tar_scm:zsh.yaml
Changed
@@ -1,4 +1,4 @@ version_control: git src_repo: "https://git.code.sf.net/p/zsh/code" tag_prefix: "^zsh-" -seperator: +separator:
View file
_service:tar_scm:zshenv
Deleted
@@ -1,7 +0,0 @@ -# -# `.zshenv' is sourced on all invocations of the shell, unless -# the -f option is set. It should contain commands to set the -# command search path, plus other important environment variables. -# `.zshenv' should not contain commands that produce output or -# assume the shell is attached to a tty. -#
View file
_service:tar_scm:zshenv.rhs
Added
@@ -0,0 +1,14 @@ +# /etc/zsh/zshenv: system-wide .zshenv file for zsh(1). +# +# This file is sourced on all invocations of the shell. +# If the -f flag is present or if the NO_RCS option is +# set within this file, all other initialization files +# are skipped. +# +# This file should contain commands to set the command +# search path, plus other important environment variables. +# This file should not contain commands that produce +# output or assume the shell is attached to a tty. +# +# Global Order: zshenv, zprofile, zshrc, zlogin +
View file
_service:tar_scm:zshrc
Deleted
@@ -1,19 +0,0 @@ -# -# `.zshrc' is sourced in interactive shells. It should contain -# commands to set up aliases, functions, options, key bindings, etc. -# - -# Some nice key bindings -#bindkey '^X^Z' universal-argument ' ' magic-space -#bindkey '^X^A' vi-find-prev-char-skip -#bindkey '^Xa' _expand_alias -#bindkey '^Z' accept-and-hold -#bindkey -s '\M-/' \\\\ -#bindkey -s '\M-=' \| - -# bindkey -v # vi key bindings - -bindkey -e # emacs key bindings -bindkey ' ' magic-space # also do history expansion on space -bindkey '^I' complete-word # complete on tab, leave expansion to _expand -
View file
_service:tar_scm:zshrc.rhs
Added
@@ -0,0 +1,50 @@ +# +# /etc/zshrc is sourced in interactive shells. It +# should contain commands to set up aliases, functions, +# options, key bindings, etc. +# + +## shell functions +#setenv() { export $1=$2 } # csh compatibility + +# Set prompts + "$PROMPT" = "%m%# " && PROMPT='%n@%m%~%# ' # default prompt +#RPROMPT=' %~' # prompt for right side of screen + +# bindkey -v # vi key bindings +# bindkey -e # emacs key bindings +bindkey ' ' magic-space # also do history expansion on space + +# Provide pathmunge for /etc/profile.d scripts +pathmunge() +{ + if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)" ; then + if "$2" = "after" ; then + PATH=$PATH:$1 + else + PATH=$1:$PATH + fi + fi +} + +_src_etc_profile_d() +{ + # Make the *.sh things happier, and have possible ~/.zshenv options like + # NOMATCH ignored. + emulate -L ksh + + + # from bashrc, with zsh fixes + if ! -o login ; then # We're not a login shell + for i in /etc/profile.d/*.sh; do + if -r "$i" ; then + . $i + fi + done + unset i + fi +} +_src_etc_profile_d + +unset -f pathmunge _src_etc_profile_d +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2