Initialize for aaa_base

This commit is contained in:
zyppe 2024-02-04 20:35:55 +08:00
commit 126711f772
52 changed files with 9450 additions and 0 deletions

1
.aaa_base.metadata Normal file
View file

@ -0,0 +1 @@
ddb4b4967959a266ae52463c3fea2efc02af3b249a01c6b48ec45e4d5f8ffe38 aaa_base-84.87+git20180409.04c9dae.tar.xz

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
aaa_base-84.87+git20180409.04c9dae.tar.xz

15
README.packaging.txt Normal file
View file

@ -0,0 +1,15 @@
This package should use just the content of the git tree. If you need
to make changes, you have the following options:
* Make them in git and update the package from git (you can send merge
request if you don't have write access)
* Create a patch, add the patch to the package and let one of the
aaa_base packagers commit it for you
The online repository is at:
http://github.com/openSUSE/aaa_base
For building the package from git run the service directly:
osc service disabledrun
Note that aaa_base.spec and aaa_base.changes are not part of the git
repo.

66
aaa_base-rpmlintrc Normal file
View file

@ -0,0 +1,66 @@
# it's just a README....
addFilter("non-remote_fs-dependency.*/etc/init.d/README")
addFilter("init-script-non-executable.*/etc/init.d/README")
addFilter("no-status-entry.*/etc/init.d/README")
addFilter("non-executable-script.*/sbin/init.d.README")
addFilter("non-executable-in-bin.*/sbin/init.d.README")
addFilter("script-without-shebang.*/sbin/init.d.README")
# contains just functions - executable bit is not needed
addFilter("non-executable-script.*/lib/YaST/SuSEconfig.functions")
# random don't need $remote-fs
addFilter("non-remote_fs-dependency.*/etc/init.d/random")
# if this script is triggered, remote-fs is not important
addFilter("non-remote_fs-dependency.*/etc/init.d/powerfail")
# single user mode is without remote connection
addFilter("non-remote_fs-dependency.*/etc/init.d/single")
# no comment
addFilter("non-remote_fs-dependency.*/etc/init.d/halt")
# this script is only for runlevel changes
addFilter("non-remote_fs-dependency.*/etc/init.d/rc")
# perhaps should be configurable later...
addFilter("non-etc-or-var-file-marked-as-conffile.*/sbin/quick_halt")
# confirmed - but standard
addFilter("non-root-group-log-file /var/log/wtmp utmp")
# the following init script don't need to be reloaded -
# even after an update
addFilter("no-reload-entry.*/etc/init.d/README")
addFilter("no-reload-entry.*/etc/init.d/boot.swap")
addFilter("no-reload-entry.*/etc/init.d/boot.proc")
addFilter("no-reload-entry.*/etc/init.d/random")
addFilter("no-reload-entry.*/etc/init.d/boot.ipconfig")
addFilter("no-reload-entry.*/etc/init.d/boot.rootfsck")
addFilter("no-reload-entry.*/etc/init.d/powerfail")
addFilter("no-reload-entry.*/etc/init.d/single")
addFilter("no-reload-entry.*/etc/init.d/boot.cleanup")
addFilter("no-reload-entry.*/etc/init.d/halt")
addFilter("no-reload-entry.*/etc/init.d/boot.ldconfig")
addFilter("no-reload-entry.*/etc/init.d/boot")
addFilter("no-reload-entry.*/etc/init.d/boot.klog")
addFilter("no-reload-entry.*/etc/init.d/rc")
addFilter("no-reload-entry.*/etc/init.d/boot.clock")
addFilter("no-reload-entry.*/etc/init.d/boot.localnet")
addFilter("no-reload-entry.*/etc/init.d/boot.localfs")
# the following init scripts don't need to be stopped -
# even after an update
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/skeleton.compat")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/README")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/boot.swap")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/boot.proc")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/random")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/boot.ipconfig")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/boot.rootfsck")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/powerfail")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/single")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/boot.cleanup")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/skeleton")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/halt")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/boot.ldconfig")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/boot")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/boot.klog")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/rc")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/boot.clock")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/boot.localnet")
addFilter("init-script-without-%stop_on_removal-preun.*/etc/init.d/boot.localfs")
# aaa_base requires net-tools
addFilter("dangling-symlink.*/usr/lib/restricted/bin/hostname.*/bin/hostname")

6393
aaa_base.changes Normal file

File diff suppressed because it is too large Load diff

305
aaa_base.spec Normal file
View file

@ -0,0 +1,305 @@
#
# spec file for package aaa_base
#
# Copyright (c) 2022-2023 ZhuningOS
#
# icecream 0
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
Name: aaa_base
Version: 84.87+git20180409.04c9dae
Release: 150300.10.9.1
Url: https://github.com/openSUSE/aaa_base
Provides: aaa_skel = %{version}-%{release}
Provides: bin
Provides: bootutls
Provides: etc
Provides: skeleng
Provides: skelger
Obsoletes: aaa_skel < %{version}
# do not require systemd - aaa_base is in the build environment and we don't want
# to pull in tons of dependencies
Conflicts: sysvinit-init
Requires: /bin/login
Requires: /bin/mktemp
Requires: /usr/bin/find
Requires: /usr/bin/tput
Requires: /usr/bin/xargs
Requires: cpio
Requires: distribution-release
Requires: filesystem
# for symlink check to /bin/hostname
BuildRequires: net-tools
BuildRequires: xz
Recommends: logrotate netcfg udev net-tools aaa_base-extras
PreReq: /usr/bin/sed /usr/bin/grep /bin/mv /bin/cat /bin/ls /bin/date
Requires(post): fillup
Summary: openSUSE Base Package
License: GPL-2.0+
Group: System/Fhs
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# run osc service dr to recreate
Source: aaa_base-%{version}.tar.xz
#
# Read README.packaging.txt before making any changes to this
# package
#
Source1: README.packaging.txt
Source99: aaa_base-rpmlintrc
Patch1: git-01-61c106aac03930e03935172eaf94d92c02a343bd.patch
Patch2: git-02-4e5fe2a6ec5690b51a369d2134a1119962438fd1.patch
Patch3: git-03-00d332a443062395957f422c89eaed9d0979ec00.patch
Patch4: git-04-b66cf03e673e84902ce0330f88f84f4fbdc8c9e9.patch
Patch5: git-05-ae2a49183ba0ad9dff6b8c1efd4de076bd34ab0f.patch
Patch6: git-06-8640f848c6677f1149b9765a8c86135956604007.patch
Patch7: git-07-82a17f1689e8957635c8ccaae7c9b3bff7f94d49.patch
Patch8: git-08-9875dffab3ddda0c3e8399f935f059246c961f2a.patch
Patch9: git-09-c6cd010dd8b6efddd71c30f00a923d8f2537584c.patch
Patch10: git-10-43091e644ff54997468a215b891dcaa75173f133.patch
Patch11: git-11-b20083a930f766939f47dddc66d089c9fee5d38a.patch
Patch12: git-12-80d14205f913cc67a98c562f988ea700a56c369b.patch
Patch14: git-14-12023f2e8aae5b2ac3a895301945566b9f5eb9c3.patch
Patch15: git-15-27e2c6180a45cca63d71ffa5de7b32dec749d2cd.patch
Patch16: git-16-ed897a1090cafb678f75dbed8802bd671d3c1921.patch
Patch17: git-17-fe967bddbd74af9aba435900878397c0c7ea0b0b.patch
Patch18: git-18-bb11f02d5dd940803c08d25b0cfd3650d9de7d41.patch
Patch19: git-19-1149066a54a372b30b7cbd79cd222e11d96dc984.patch
Patch20: git-20-6452441f2054b4b290c089ce6269889993b95fc1.patch
Patch21: git-21-0064ecd132c30a939125acbc5b9a1c7bcd180fa0.patch
Patch22: git-22-f5e90d70d119b6aa12d019947029f9337aec378d.patch
Patch23: git-23-8f1fe28287466235ade9c62fa5995eba9e642660.patch
Patch24: git-24-2de52ae391e2963eb1913183a6b0530c7e781b55.patch
Patch25: git-25-287cf7cb851c0636fa46a610015d2d22ad36acea.patch
Patch26: git-26-0c2f2340cc6ebb51f20b36e550adc517a6b2ae42.patch
Patch27: git-27-abf7927eebbd4d7f47a362d49ae7856520682c49.patch
Patch28: git-28-3351bcc9613ba022503103e7e4ffd01e7bd8e0fd.patch
Patch29: git-29-5220a5f6ba250503ccda326e65ca069d245a5ebe.patch
Patch30: git-30-b9dd70f33a124556f16dbbafc89585a82218ad61.patch
Patch31: git-31-52dc403d54f2c926ee5cc892d1a8a830a45d7412.patch
Patch32: git-32-0ee79834ea9ebf6573a7b903f374c21e53a56c14.patch
Patch33: git-33-d12420cc66e6d26a9dff6c0e86e00de232151c82.patch
Patch34: git-34-9a1bc15517d6da56d75182338c0f1bc4518b2b75.patch
Patch35: git-35-91f496b1f65af29832192bad949685a7bc25da0a.patch
Patch36: git-36-16d1cb895c2742e96a56af98111f8281bedd3188.patch
Patch37: git-37-dfc5b8af96bec249e44a83d573af1f95a661a85c.patch
Patch38: git-38-4c0060639f6fa854830a708a823976772afe7764.patch
Patch39: git-39-df622b89bc92fd882a6715c5743095528a643546.patch
Patch40: git-40-d004657a244d75b372a107c4f6097b42ba1992d5.patch
Patch41: git-41-f00ca2600331602241954533a1b1610d1da57edf.patch
Patch42: git-42-f39a8d18719c3b34373e0e36098f0f404121b5c5.patch
Patch43: git-43-14003c19eaa863ae9d80a0ebb9b5cab6273a5a9e.patch
Patch44: git-44-425f3e9b44ba9ead865d70ff6690d5f2869442dc.patch
Patch45: git-45-bf0a31597d0ed3562bfc5e6be0ade2fe5dc1f7a1.patch
Patch46: git-46-78b2a0b29381c16bec6b2a8fc7eabaa9925782d7.patch
Patch47: git-47-056fc66c699a8544c7692a03c905fca568f5390b.patch
%description
This package installs several important configuration files and central scripts.
%package extras
Summary: SUSE Linux Base Package (recommended part)
Group: System/Fhs
Requires: %{name} = %{version}
Requires(post): fillup
Provides: aaa_base:/etc/DIR_COLORS
%description extras
The parts of aaa_base that should be installed by default but are not
strictly required to run a system. (Shell aliases, bash completions
and convenience hacks).
%package malloccheck
Summary: SUSE Linux Base Package (malloc checking)
Group: System/Fhs
Requires: %{name} = %{version}
%description malloccheck
This package sets environment variables that enable stricter
malloc checks to catch potential heap corruptions. It's not
installed by default as it may degrade performance.
%package wsl
Summary: SUSE Linux Base Package (Windows Subsystem for Linux)
Group: System/Fhs
Requires: %{name} = %{version}
%description wsl
This package includes some special settings needed on Windows Subsystem
for Linux. It should only be installed on WSL and not on regular Linux
systems.
%prep
%setup -q
%autopatch -p1
%build
make CFLAGS="$RPM_OPT_FLAGS" CC="%{__cc}" %{?_smp_mflags}
if test -d patches/$RPM_ARCH; then
pushd files
for file in ../patches/$RPM_ARCH/*; do
patch -p0 --input=$file
done
find -name "*.orig" | xargs -r rm
popd
fi
%install
#
make DESTDIR=$RPM_BUILD_ROOT install
#
mkdir -p %{buildroot}/etc/sysctl.d
case "$RPM_ARCH" in
s390*) ;;
*) rm -f %{buildroot}/usr/lib/sysctl.d/50-default-s390.conf ;;
esac
#
# make sure it does not creep in again
test -d $RPM_BUILD_ROOT/root/.gnupg && exit 1
mkdir -p $RPM_BUILD_ROOT/etc/init.d
for i in boot.local after.local halt.local ; do
echo "#!bin/bash" > $RPM_BUILD_ROOT/etc/init.d/$i
chmod 755 $RPM_BUILD_ROOT/etc/init.d/$i
done
#
install -d -m 755 %buildroot/usr/lib/initscripts/legacy-actions
# keep as ghost for migration
touch %buildroot/etc/inittab
# Backup directories
install -d -m 755 %{buildroot}/var/adm/backup/{rpmdb,sysconfig}
mkdir -p %{buildroot}%{_fillupdir}
%if "%{_fillupdir}" != "/var/adm/fillup-templates"
for f in %{buildroot}/var/adm/fillup-templates/* ; do
test -e "$f" || continue
mv $f %{buildroot}%{_fillupdir}/
done
rm -vrf %{buildroot}/var/adm/fillup-templates
%endif
%if "%{_fillupdir}" != "/usr/share/fillup-templates"
for f in %{buildroot}/usr/share/fillup-templates/* ; do
test -e "$f" || continue
mv $f %{buildroot}%{_fillupdir}/
done
rm -vrf %{buildroot}/usr/share/fillup-templates
%endif
%pre -f aaa_base.pre
%post -f aaa_base.post
%pre extras
%service_add_pre backup-rpmdb.service backup-rpmdb.timer backup-sysconfig.service backup-sysconfig.timer check-battery.service check-battery.timer
%post extras
%fillup_only -n backup
%service_add_post backup-rpmdb.service backup-rpmdb.timer backup-sysconfig.service backup-sysconfig.timer check-battery.service check-battery.timer
%preun extras
%service_del_preun backup-rpmdb.service backup-rpmdb.timer backup-sysconfig.service backup-sysconfig.timer check-battery.service check-battery.timer
%postun extras
%service_del_postun backup-rpmdb.service backup-rpmdb.timer backup-sysconfig.service backup-sysconfig.timer check-battery.service check-battery.timer
%files
%defattr(-,root,root)
%license COPYING
%config(noreplace) %ghost /etc/sysctl.conf
%config /etc/bash.bashrc
%config /etc/csh.cshrc
%config /etc/csh.login
%config /etc/inputrc
%config /etc/inputrc.keys
%config /etc/mime.types
%config /etc/profile
%config /etc/profile.d/alljava.csh
%config /etc/profile.d/alljava.sh
%config /etc/profile.d/csh.ssh
%config /etc/profile.d/lang.csh
%config /etc/profile.d/lang.sh
%config /etc/profile.d/profile.csh
%config /etc/profile.d/profile.sh
%config /etc/profile.d/sh.ssh
%config /etc/profile.d/xdg-environment.csh
%config /etc/profile.d/xdg-environment.sh
%config /etc/rc.splash
%config /etc/rc.status
%config /etc/shells
%config /etc/ttytype
%ghost /etc/init.d/boot.local
%ghost /etc/init.d/after.local
%ghost /etc/init.d/halt.local
%ghost %config /etc/inittab
# don't forget to also change aaa_base.post, boot.cleanup
# and /etc/permissions!
%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog
/etc/hushlogins
/usr/bin/chkconfig
/sbin/chkconfig
/usr/bin/get_kernel_version
/sbin/refresh_initrd
/usr/sbin/refresh_initrd
/sbin/service
/usr/sbin/service
/sbin/smart_agetty
/usr/sbin/smart_agetty
/usr/bin/filesize
/usr/bin/mkinfodir
/usr/bin/old
/usr/bin/rpmlocate
/usr/bin/safe-rm
/usr/bin/safe-rmdir
%dir /usr/lib/base-scripts
/usr/lib/base-scripts/convert_sysctl
/usr/lib/restricted/bin/hostname
/usr/sbin/sysconf_addword
/usr/share/man/man1/smart_agetty.1*
/usr/share/man/man5/defaultdomain.5*
/usr/share/man/man8/chkconfig.8*
/usr/share/man/man8/safe-rm.8*
/usr/share/man/man8/safe-rmdir.8*
/usr/share/man/man8/service.8*
/usr/lib/sysctl.d/*.conf
%dir /usr/lib/initscripts
%dir /usr/lib/initscripts/legacy-actions
%{_fillupdir}/sysconfig.language
%{_fillupdir}/sysconfig.proxy
%{_fillupdir}/sysconfig.windowmanager
%files extras
%defattr(-,root,root)
%config(noreplace) /etc/DIR_COLORS
/etc/skel/.emacs
/etc/skel/.inputrc
%config /etc/profile.d/complete.bash
%config /etc/profile.d/alias.ash
/etc/profile.d/alias.bash
/etc/profile.d/alias.tcsh
/etc/profile.d/ls.tcsh
/etc/profile.d/ls.bash
/etc/profile.d/ls.zsh
/usr/lib/base-scripts/backup-rpmdb
/usr/lib/base-scripts/backup-sysconfig
/usr/lib/base-scripts/check-battery
/usr/lib/systemd/system/*
/usr/share/man/man8/resolv+.8*
/var/adm/backup/rpmdb
/var/adm/backup/sysconfig
%{_fillupdir}/sysconfig.backup
%files malloccheck
%defattr(-,root,root)
%config /etc/profile.d/malloc-debug.sh
%config /etc/profile.d/malloc-debug.csh
%files wsl
%defattr(-,root,root)
%config /etc/profile.d/wsl.csh
%config /etc/profile.d/wsl.sh
%changelog

View file

@ -0,0 +1,24 @@
commit 61c106aac03930e03935172eaf94d92c02a343bd
Author: Trucido <leetminiwheat@gmail.com>
Date: Sat May 26 11:02:04 2018 -0400
bashrc: Change =~ test to globs. Fixes mkshrc.
mksh shares bash.bashrc and [[ $TERM =~ xterm* ]] causes syntax error on Leap15 and TW;
mksh: /etc/mkshrc[140]: syntax error: unexpected operator/operand '=~'
Unless this fuzzy equal plus glob has another purpose, I see no reason to use it. All shells that share this file seem to support double globs in a dual bracket test
diff --git a/files/etc/bash.bashrc b/files/etc/bash.bashrc
index d4828f2..e064262 100644
--- a/files/etc/bash.bashrc
+++ b/files/etc/bash.bashrc
@@ -137,7 +137,7 @@ case "$-" in
# addition needs to have "%w" in the "tabs" setting, ymmv for
# other console emulators.
#
- if [[ $TERM =~ xterm* ]] ; then
+ if [[ $TERM = *xterm* ]] ; then
_tsl=$(echo -en '\e]2;')
_isl=$(echo -en '\e]1;')
_fsl=$(echo -en '\007')

View file

@ -0,0 +1,44 @@
commit 4e5fe2a6ec5690b51a369d2134a1119962438fd1
Author: Werner Fink <werner@suse.de>
Date: Tue Sep 4 12:22:09 2018 +0200
Avoid `ls' command in alljava shell scriptlets
with this the error messageses for not existing directories
are gone even for (t)csh. Also the `-I' option had never
worked as expected due missed shell patterns.
Signed-off-by: Werner Fink <werner@suse.de>
diff --git a/files/etc/profile.d/alljava.csh b/files/etc/profile.d/alljava.csh
index d2d2378..602ee72 100644
--- a/files/etc/profile.d/alljava.csh
+++ b/files/etc/profile.d/alljava.csh
@@ -13,7 +13,9 @@ foreach JDIR ( "/usr/lib64/jvm" "/usr/lib/jvm" "/usr/java/latest" "/usr/java" )
if ( ! -d $JDIR ) continue
- foreach JPATH ( $JDIR $JDIR/java `ls -I 'java' -I 'jre' -d $JDIR/*` $JDIR/jre )
+ foreach JPATH ( $JDIR $JDIR/java $JDIR/java-[a-z]* $JDIR/java-[0-9]* $JDIR/jre $JDIR/jre-[a-z]* $JDIR/jre-[0-9]* )
+
+ if ( ! -d $JPATH ) continue
if ( ! -x $JPATH/bin/java ) continue
diff --git a/files/etc/profile.d/alljava.sh b/files/etc/profile.d/alljava.sh
index 8c92a3f..8a2062a 100644
--- a/files/etc/profile.d/alljava.sh
+++ b/files/etc/profile.d/alljava.sh
@@ -15,7 +15,11 @@ for JDIR in /usr/lib64/jvm /usr/lib/jvm /usr/java/latest /usr/java; do
continue
fi
- for JPATH in $JDIR $JDIR/java `ls -I 'java' -I 'jre' -d $JDIR/* 2>/dev/null` $JDIR/jre; do
+ for JPATH in $JDIR $JDIR/java $JDIR/java-[a-z]* $JDIR/java-[0-9]* $JDIR/jre $JDIR/jre-[a-z]* $JDIR/jre-[0-9]*; do
+
+ if ! test -d $JPATH; then
+ continue
+ fi
if ! test -x $JPATH/bin/java; then
continue

View file

@ -0,0 +1,40 @@
commit 00d332a443062395957f422c89eaed9d0979ec00
Author: Ruediger Oertel <ro@suse.de>
Date: Thu Mar 7 11:57:12 2019 +0100
update logic for JRE_HOME env variable (bsc#1128246)
diff --git a/files/etc/profile.d/alljava.csh b/files/etc/profile.d/alljava.csh
index 602ee72..53f1c4f 100644
--- a/files/etc/profile.d/alljava.csh
+++ b/files/etc/profile.d/alljava.csh
@@ -30,7 +30,11 @@ foreach JDIR ( "/usr/lib64/jvm" "/usr/lib/jvm" "/usr/java/latest" "/usr/java" )
setenv JRE_HOME $JPATH
breaksw
default:
- setenv JRE_HOME $JPATH/jre
+ if ( -x $JPATH/jre/bin/java ) then
+ setenv JRE_HOME $JPATH/jre
+ else
+ setenv JRE_HOME $JPATH
+ endif
# it is development kit=20
if ( -x $JPATH/bin/javac ) then
setenv JDK_HOME $JPATH
diff --git a/files/etc/profile.d/alljava.sh b/files/etc/profile.d/alljava.sh
index 8a2062a..6caf082 100644
--- a/files/etc/profile.d/alljava.sh
+++ b/files/etc/profile.d/alljava.sh
@@ -37,7 +37,11 @@ for JDIR in /usr/lib64/jvm /usr/lib/jvm /usr/java/latest /usr/java; do
;;
*)
- [ -z "$JRE_HOME" ] && export JRE_HOME=$JPATH/jre
+ if [ -x $JPATH/jre/bin/java ] ; then
+ [ -z "$JRE_HOME" ] && export JRE_HOME=$JPATH/jre
+ else
+ [ -z "$JRE_HOME" ] && export JRE_HOME=$JPATH
+ fi
# it is development kit
if [ -x $JPATH/bin/javac ] ; then
export JDK_HOME=$JPATH

View file

@ -0,0 +1,50 @@
commit b66cf03e673e84902ce0330f88f84f4fbdc8c9e9
Author: Werner Fink <werner@suse.de>
Date: Wed Jan 9 11:25:34 2019 +0100
Restore old position of ssh/sudo source of profile
for bug bsc#1118364 but hopefully do not reintroduce bug boo#1088524
Signed-off-by: Werner Fink <werner@suse.de>
diff --git a/files/etc/bash.bashrc b/files/etc/bash.bashrc
index b779297..07ac4a4 100644
--- a/files/etc/bash.bashrc
+++ b/files/etc/bash.bashrc
@@ -334,6 +334,20 @@ if test -r /etc/profile.d/vte.sh -a ! -k /etc/profile.d/vte.sh; then
. /etc/profile.d/vte.sh
fi
+if test "$_is_save" = "unset" ; then
+ #
+ # Just in case the user excutes a command with ssh or sudo
+ #
+ if test \( -n "$SSH_CONNECTION" -o -n "$SUDO_COMMAND" \) -a -z "$PROFILEREAD" -a "$noprofile" != true ; then
+ _is_save="$is"
+ _SOURCED_FOR_SSH=true
+ . /etc/profile > /dev/null 2>&1
+ unset _SOURCED_FOR_SSH
+ is="$_is_save"
+ _is_save=unset
+ fi
+fi
+
#
# Set GPG_TTY for curses pinentry
# (see man gpg-agent and bnc#619295)
@@ -356,14 +370,6 @@ esac
test -s /etc/sh.shrc.local && . /etc/sh.shrc.local
if test "$_is_save" = "unset" ; then
- #
- # Just in case the user excutes a command with ssh or sudo
- #
- if test \( -n "$SSH_CONNECTION" -o -n "$SUDO_COMMAND" \) -a -z "$PROFILEREAD" -a "$noprofile" != true ; then
- _SOURCED_FOR_SSH=true
- . /etc/profile > /dev/null 2>&1
- unset _SOURCED_FOR_SSH
- fi
unset is _is_save
fi

View file

@ -0,0 +1,32 @@
commit ae2a49183ba0ad9dff6b8c1efd4de076bd34ab0f
Author: Werner Fink <werner@suse.de>
Date: Thu Apr 4 14:58:23 2019 +0200
/etc/profile does not work in AppArmor-confined containers (bsc#1096191)
Signed-off-by: Werner Fink <werner@suse.de>
diff --git a/files/etc/bash.bashrc b/files/etc/bash.bashrc
index 07ac4a4..85be9f6 100644
--- a/files/etc/bash.bashrc
+++ b/files/etc/bash.bashrc
@@ -17,6 +17,7 @@ if test -z "$is" ; then
if ! is=$(readlink /proc/$$/exe 2>/dev/null) ; then
case "$0" in
*pcksh) is=ksh ;;
+ *bash) is=bash ;;
*) is=sh ;;
esac
fi
diff --git a/files/etc/profile b/files/etc/profile
index 59b2443..1bbffdc 100644
--- a/files/etc/profile
+++ b/files/etc/profile
@@ -14,6 +14,7 @@ if test -f /proc/mounts ; then
if ! is=$(readlink /proc/$$/exe 2>/dev/null) ; then
case "$0" in
*pcksh) is=ksh ;;
+ *bash) is=bash ;;
*) is=sh ;;
esac
fi

View file

@ -0,0 +1,47 @@
commit 8640f848c6677f1149b9765a8c86135956604007
Author: Michal Koutný <mkoutny@suse.com>
Date: Thu Jul 18 12:30:33 2019 +0200
Make systemd detection cgroup oblivious (bsc#1140647)
systemd can work in three exclusive cgroup modes: legacy, hybrid and
unified. The mode affects where and what cgroup hierarchies are mounted.
Do not rely on that and detect running systemd as systemd itself does it
(src/libsystemd/sd-daemon/sd-daemon.c, function sd_booted).
diff --git a/files/usr/bin/chkconfig b/files/usr/bin/chkconfig
index 99d0bb7..e4391f7 100755
--- a/files/usr/bin/chkconfig
+++ b/files/usr/bin/chkconfig
@@ -461,16 +461,8 @@ sub readable {
# check if systemd is active
#
sub is_systemd_active {
- my $cgroup_dev;
- my $systemd_dev;
- my $st;
-
use File::stat;
- $st = lstat("/sys/fs/cgroup") or return 0;
- $cgroup_dev = $st->dev;
- $st = lstat("/sys/fs/cgroup/systemd") or return 0;
- $systemd_dev = $st->dev;
- return 0 if ($cgroup_dev == $systemd_dev);
+ lstat("/run/systemd/system") or return 0;
-e $systemd_binary_path or return 0;
return 1;
}
diff --git a/files/usr/sbin/service b/files/usr/sbin/service
index 83e5352..24cc6cc 100755
--- a/files/usr/sbin/service
+++ b/files/usr/sbin/service
@@ -7,7 +7,7 @@ VERSION="18.02.16"
sd_booted()
{
- test -d /sys/fs/cgroup/systemd/
+ test -e /run/systemd/system/
}
#

View file

@ -0,0 +1,19 @@
commit 82a17f1689e8957635c8ccaae7c9b3bff7f94d49
Author: Ruediger Oertel <ro@suse.de>
Date: Thu Aug 22 15:42:09 2019 +0200
add sysctl.d/51-network.conf to tighten network security a bit
see also boo#1146866
diff --git a/files/usr/lib/sysctl.d/51-network.conf b/files/usr/lib/sysctl.d/51-network.conf
new file mode 100644
index 0000000..a450e58
--- /dev/null
+++ b/files/usr/lib/sysctl.d/51-network.conf
@@ -0,0 +1,6 @@
+net.ipv4.conf.all.accept_redirects = 0
+net.ipv4.conf.default.accept_redirects = 0
+net.ipv4.conf.all.accept_source_route = 0
+net.ipv4.conf.default.accept_source_route = 0
+net.ipv6.conf.all.accept_redirects = 0
+net.ipv6.conf.default.accept_redirects = 0

View file

@ -0,0 +1,67 @@
commit 9875dffab3ddda0c3e8399f935f059246c961f2a
Author: Thomas Renninger <trenn@suse.com>
Date: Wed Oct 2 17:05:27 2019 +0200
Add s390x compressed kernel support
and fix a tiny typo in make clean
diff --git a/Makefile b/Makefile
index e4bede1..e992da0 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ install: all
install -m755 get_kernel_version $(DESTDIR)/usr/bin
clean:
- rm -f $(sbin_PROGRAMS)
+ rm -f $(bin_PROGRAMS)
mimetypes:
if test -d Apache/apache2; then (cd Apache/apache2 && osc up); else osc co Apache/apache2; fi
diff --git a/get_kernel_version.c b/get_kernel_version.c
index db52159..569b67c 100644
--- a/get_kernel_version.c
+++ b/get_kernel_version.c
@@ -170,6 +170,41 @@ main (int argc, char *argv[])
}
}
}
+ if(!found) {
+ /* Compressed S390x kernel */
+ /* Compare with vanilla kernel git commit 6abe28197024f */
+ if(
+ !fseek(fp, 0x10008, SEEK_SET) &&
+ fread(buffer, 1, 6, fp) == 6 &&
+ buffer[0] == 'S' && buffer[1] == '3' &&
+ buffer[2] == '9' && buffer[3] == '0' &&
+ buffer[4] == 'E' && buffer[5] == 'P' &&
+ !fseek(fp, 0x10428, SEEK_SET) &&
+ fread(buffer, 1, 8, fp) == 8
+ ) {
+ unsigned long long version_string_offset =
+ ((unsigned char *) buffer)[7] +
+ (((unsigned char *) buffer)[6] << 8) +
+ (((unsigned char *) buffer)[5] << 16) +
+ (((unsigned char *) buffer)[4] << 24) +
+ ((unsigned long long) ((unsigned char *) buffer)[3] << 32) +
+ ((unsigned long long) ((unsigned char *) buffer)[2] << 40) +
+ ((unsigned long long) ((unsigned char *) buffer)[1] << 48) +
+ ((unsigned long long) ((unsigned char *) buffer)[0] << 56);
+ if(
+ !fseek(fp, version_string_offset, SEEK_SET) &&
+ fread(buffer, 1, MAX_VERSION_LENGTH, fp) == MAX_VERSION_LENGTH
+ ) {
+ char *s = buffer;
+
+ for(s[MAX_VERSION_LENGTH] = 0; *s; s++) if(*s == ' ') { *s = 0; break; }
+ if(*buffer) {
+ found = 1;
+ printf("%s\n", buffer);
+ }
+ }
+ }
+ }
if (command[0] != '\0')
pclose (fp);

View file

@ -0,0 +1,23 @@
commit c6cd010dd8b6efddd71c30f00a923d8f2537584c
Author: Jan Kardell <jan.kardell@telliq.com>
Date: Sun Mar 10 00:25:07 2019 +0100
Fix LC_NAME and LC_ADDRESS in sh.ssh
There was a missing space between LC_NAME and LC_ADDRESS,
thus it became LC_NAMELC_ADDRESS.
Nobody noticed for at least 5 years, so it can't be that important.
diff --git a/files/etc/profile.d/sh.ssh b/files/etc/profile.d/sh.ssh
index cc1b818..11c32ed 100644
--- a/files/etc/profile.d/sh.ssh
+++ b/files/etc/profile.d/sh.ssh
@@ -7,7 +7,7 @@
test_lc()
{
for lc in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE \
- LC_MONETARY LC_MESSAGES LC_PAPER LC_NAMELC_ADDRESS \
+ LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS \
LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL
do
eval val="\$$lc"

View file

@ -0,0 +1,23 @@
commit 43091e644ff54997468a215b891dcaa75173f133
Author: Trucido <leetminiwheat@gmail.com>
Date: Thu May 10 01:22:21 2018 -0400
fix string test to arithmetic test in /etc/profile.d/wsl.sh
= test operator compares literal string "0000" whereas -eq compares integer value which works with shells that truncate the umask (such as zsh which is sometimes set to 000 instead of 022). This is the least invasive change I could think of that solves this issue, since it will match 0, 00, 000, and 0000.
Also, the wsl.csh should probably also be changed to use (`umask` <= 0) or equivalent, but csh seems to strip all leading zeros anyways so is not needed.
diff --git a/files/etc/profile.d/wsl.sh b/files/etc/profile.d/wsl.sh
index 13bff3a..0503a18 100644
--- a/files/etc/profile.d/wsl.sh
+++ b/files/etc/profile.d/wsl.sh
@@ -7,7 +7,7 @@ if test -n "$IS_WSL" ; then
if test -n "$ORIG_PATH" ; then
PATH=$ORIG_PATH:$PATH
fi
- if test $(umask) = 0000; then
+ if test $(umask) -eq 0; then
UMASK_LOGIN_DEFS=$(sed -ne 's/^UMASK[[:space:]]*//p' /etc/login.defs)
test "$UMASK_LOGIN_DEFS" && umask "$UMASK_LOGIN_DEFS"
unset UMASK_LOGIN_DEFS

View file

@ -0,0 +1,30 @@
commit b20083a930f766939f47dddc66d089c9fee5d38a
Author: Ruediger Oertel <ro@suse.de>
Date: Thu Oct 10 15:28:04 2019 +0200
check if variables can be set before modifying them
to avoid warnings on login with a restricted shell
(bsc#1138869)
diff --git a/files/etc/bash.bashrc b/files/etc/bash.bashrc
index 85be9f6..36f7db5 100644
--- a/files/etc/bash.bashrc
+++ b/files/etc/bash.bashrc
@@ -8,9 +8,14 @@
#
# Check which shell is reading this file
-#
-noprofile=false
-restricted=false
+# check if variables are read-only before setting them
+# for example in a restricted shell
+if unset noprofile 2>/dev/null ; then
+ noprofile=false
+fi
+if unset restricted 2>/dev/null ; then
+ restricted=false
+fi
: ${_is_save:=unset}
if test -z "$is" ; then
if test -f /proc/mounts ; then

View file

@ -0,0 +1,20 @@
commit 80d14205f913cc67a98c562f988ea700a56c369b
Author: Ruediger Oertel <ro@suse.de>
Date: Wed Oct 16 17:02:39 2019 +0200
service: check if there is a second argument before using it
(bsc#1051143)
diff --git a/files/usr/sbin/service b/files/usr/sbin/service
index 24cc6cc..7ee2dd3 100755
--- a/files/usr/sbin/service
+++ b/files/usr/sbin/service
@@ -103,7 +103,7 @@ exec_rc ()
fi
echo "$1 is neither service nor target!?" >&2
return "1"
- elif [ -x "$actiondir/$1/$2" ]; then
+ elif [ -n "$2" -a -x "$actiondir/$1/$2" ]; then
rc="$actiondir/$1/$2"
shift 2
elif [ ${0##*/} = service ] ; then

View file

@ -0,0 +1,20 @@
commit 12023f2e8aae5b2ac3a895301945566b9f5eb9c3
Author: Ruediger Oertel <ro@suse.de>
Date: Thu Jan 16 11:11:13 2020 +0100
drop dev.cdrom.autoclose = 0 from sysctl config (bsc#1160970)
diff --git a/files/usr/lib/sysctl.d/50-default.conf b/files/usr/lib/sysctl.d/50-default.conf
index da1a451..1527edb 100644
--- a/files/usr/lib/sysctl.d/50-default.conf
+++ b/files/usr/lib/sysctl.d/50-default.conf
@@ -45,9 +45,6 @@ fs.inotify.max_user_watches = 65536
# default 184 = 128+32+16+8
kernel.sysrq = 184
-# Disable auto-closing of cd tray bnc#659153
-dev.cdrom.autoclose = 0
-
# enable hard- and symlink protection (bnc#821585)
fs.protected_hardlinks = 1
fs.protected_symlinks = 1

View file

@ -0,0 +1,19 @@
commit 27e2c6180a45cca63d71ffa5de7b32dec749d2cd
Author: Ruediger Oertel <ro@suse.de>
Date: Fri Feb 7 15:14:37 2020 +0100
change rp_filter to 2 to follow the current default (bsc#1160735)
diff --git a/files/usr/lib/sysctl.d/50-default.conf b/files/usr/lib/sysctl.d/50-default.conf
index 1527edb..4e931ec 100644
--- a/files/usr/lib/sysctl.d/50-default.conf
+++ b/files/usr/lib/sysctl.d/50-default.conf
@@ -6,7 +6,7 @@
net.ipv4.icmp_echo_ignore_broadcasts = 1
# enable route verification on all interfaces
-net.ipv4.conf.all.rp_filter = 1
+net.ipv4.conf.all.rp_filter = 2
# avoid deleting secondary IPs on deleting the primary IP
net.ipv4.conf.default.promote_secondaries = 1

View file

@ -0,0 +1,24 @@
commit ed897a1090cafb678f75dbed8802bd671d3c1921
Author: Ruediger Oertel <ro@suse.de>
Date: Thu Feb 6 11:20:51 2020 +0100
get_kernel_version: fix for current kernel on s390x (from azouhr)
keep on searching if only the string "version:" is found but the
next char is a null.
diff --git a/get_kernel_version.c b/get_kernel_version.c
index 569b67c..236b749 100644
--- a/get_kernel_version.c
+++ b/get_kernel_version.c
@@ -99,7 +99,9 @@ main (int argc, char *argv[])
buffer[i+6] == 'v' && buffer[i+7] == 'e' &&
buffer[i+8] == 'r' && buffer[i+9] == 's' &&
buffer[i+10] == 'i' && buffer[i+11] == 'o' &&
- buffer[i+12] == 'n' && buffer[i+13] == ' ')
+ buffer[i+12] == 'n' && buffer[i+13] == ' ' &&
+ /* current s390 images have that string without version: */
+ buffer[i+14] != 0)
{
int j = i+14;
int number_dots = 0;

View file

@ -0,0 +1,57 @@
commit fe967bddbd74af9aba435900878397c0c7ea0b0b
Author: Ruediger Oertel <ro@suse.de>
Date: Mon Feb 24 11:00:39 2020 +0100
added "-h"/"--help" to "old" command (from Bernhard Lang)
diff --git a/files/usr/bin/old b/files/usr/bin/old
index ef2e2b7..5c55aa4 100755
--- a/files/usr/bin/old
+++ b/files/usr/bin/old
@@ -5,22 +5,33 @@
#
# Copyright (c) 1996-2002 SuSE Linux AG, Nuernberg, Germany.
#
-# please send bugfixes or comments to http://www.suse.de/feedback.
+# Contributor Bernard Lang
#
+# please send bugfixes or comments to
+# https://github.com/openSUSE/aaa_base/issues
#
# usage - tell user to use program
#
+# Trick : put a nonexistant file name as first argument if you are worried
+# about the possibility of files called -h or --help
+#
usage() {
echo usage: "$0" file\|dir [file\|dir ...]
}
-
if [ $# -eq 0 ] ; then
usage
exit
fi
+if [ "$1" = "-h" -o "$1" = "--help" ] ; then
+ echo 'Renames file or directory <name> given in argument list to <name>-<date>[<num>]'
+ echo 'adding when necessary a suffix number <num> to avoid already used names.'
+ usage
+ exit
+fi
+
DATESTRING=`date +"%Y%m%d"`
for i in "$@" ; do
@@ -33,6 +44,10 @@ for i in "$@" ; do
let NUMBER=$NUMBER+1
done
echo moving "$i" to "$NEWNAME"
+ if [ "${i:0:1}" = "-" ] ; then
+ i="./$i"
+ NEWNAME="./$NEWNAME"
+ fi
mv "$i" "$NEWNAME"
else
echo "$i" does not exist.

View file

@ -0,0 +1,47 @@
commit bb11f02d5dd940803c08d25b0cfd3650d9de7d41
Author: Ruediger Oertel <ro@suse.de>
Date: Mon Feb 24 11:03:43 2020 +0100
change feedback url from http://www.suse.de/feedback to
https://github.com/openSUSE/aaa_base/issues
diff --git a/files/etc/inputrc b/files/etc/inputrc
index 74ebb48..df9a2a1 100644
--- a/files/etc/inputrc
+++ b/files/etc/inputrc
@@ -6,7 +6,7 @@
## Copyright: 2007 SuSE LINUX Products GmbH, Nuernberg, Germany.
##
## Author: Werner Fink
-## Please send feedback to http://www.suse.de/feedback
+## Please send feedback to https://github.com/openSUSE/aaa_base/issues
##
################################################################################
#
diff --git a/files/etc/inputrc.keys b/files/etc/inputrc.keys
index 6dee148..93067f8 100644
--- a/files/etc/inputrc.keys
+++ b/files/etc/inputrc.keys
@@ -4,7 +4,7 @@
## Copyright: 2017 SUSE Linux GmbH, Nürnberg, Germany.
##
## Author: Werner Fink
-## Please send feedback to http://www.suse.de/feedback
+## Please send feedback to https://github.com/openSUSE/aaa_base/issues
##
################################################################################
#
diff --git a/files/usr/share/man/man5/defaultdomain.5 b/files/usr/share/man/man5/defaultdomain.5
index 6a902a7..724e06b 100644
--- a/files/usr/share/man/man5/defaultdomain.5
+++ b/files/usr/share/man/man5/defaultdomain.5
@@ -1,6 +1,7 @@
.\" Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany.
.\"
-.\" Author: Thorsten Kukuk (http://www.suse.de/feedback)
+.\" Author: Thorsten Kukuk
+.\" (https://github.com/openSUSE/aaa_base/issues)
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License

View file

@ -0,0 +1,50 @@
From 1149066a54a372b30b7cbd79cd222e11d96dc984 Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Mon, 25 Nov 2019 09:21:42 +0100
Subject: [PATCH] Not all XTerm based emulators do have an terminfo entry
Signed-off-by: Werner Fink <werner@suse.de>
---
files/etc/bash.bashrc | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git files/etc/bash.bashrc files/etc/bash.bashrc
index 36f7db5..e963d7c 100644
--- a/files/etc/bash.bashrc
+++ b/files/etc/bash.bashrc
@@ -136,14 +136,19 @@ case "$-" in
#
# Set xterm prompt with short path (last 18 characters)
#
- if path tput hs 2>/dev/null || path tput -T $TERM+sl hs 2>/dev/null ; then
+ if path tput hs 2>/dev/null || path tput -T $TERM+sl hs 2>/dev/null || \
+ path tput -T ${TERM%%[.-]*}+sl hs 2>/dev/null || \
+ [[ $TERM = *xterm* || $TERM = *gnome* || $TERM = *konsole* || $TERM = *xfce* ]]
+ then
#
# Mirror prompt in terminal "status line", which for graphical
# terminals usually is the window title. KDE konsole in
# addition needs to have "%w" in the "tabs" setting, ymmv for
# other console emulators.
#
- if [[ $TERM = *xterm* ]] ; then
+ if [[ $TERM = *xterm* || $TERM = *gnome* || $TERM = *konsole* || $TERM = *xfce* ]]
+ then
+ # https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Miscellaneous
_tsl=$(echo -en '\e]2;')
_isl=$(echo -en '\e]1;')
_fsl=$(echo -en '\007')
@@ -151,6 +156,10 @@ case "$-" in
_tsl=$(path tput -T $TERM+sl tsl 2>/dev/null)
_isl=''
_fsl=$(path tput -T $TERM+sl fsl 2>/dev/null)
+ elif path tput -T ${TERM%%[.-]*}+sl tsl 2>/dev/null ; then
+ _tsl=$(path tput -T $TERM+sl tsl 2>/dev/null)
+ _isl=''
+ _fsl=$(path tput -T $TERM+sl fsl 2>/dev/null)
else
_tsl=$(path tput tsl 2>/dev/null)
_isl=''
--
2.25.0

View file

@ -0,0 +1,35 @@
From 6452441f2054b4b290c089ce6269889993b95fc1 Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Thu, 7 May 2020 10:20:27 +0200
Subject: [PATCH] Better support of Midnight Commander (bsc#1170527)
Signed-off-by: Werner Fink <werner@suse.de>
---
files/etc/csh.cshrc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git files/etc/csh.cshrc files/etc/csh.cshrc
index d25cf42..c976e03 100644
--- a/files/etc/csh.cshrc
+++ b/files/etc/csh.cshrc
@@ -50,7 +50,7 @@ unset id
# Avoid trouble with Emacs shell mode
#
if ($?EMACS) then
- setenv LS_OPTIONS '-N --color=none -T 0';
+ setenv LS_OPTIONS '-N --color=none -T 0'
endif
#
@@ -61,7 +61,7 @@ if (! ${?prompt}) goto done
#
# Avoid trouble with Emacs shell mode
#
-if ($?EMACS) then
+if ($?EMACS || $?MC_SID) then
path tset -I -Q
path stty cooked pass8 dec nl -echo
endif
--
2.25.0

View file

@ -0,0 +1,19 @@
From 0064ecd132c30a939125acbc5b9a1c7bcd180fa0 Mon Sep 17 00:00:00 2001
From: Olaf Hering <olaf@aepfle.de>
Date: Mon, 29 Jun 2020 09:22:17 +0200
Subject: [PATCH] add screen.xterm-256color to DIR_COLORS
Signed-off-by: Olaf Hering <olaf@aepfle.de>
diff --git a/files/etc/DIR_COLORS b/files/etc/DIR_COLORS
index 742631c..d8866f7 100644
--- a/files/etc/DIR_COLORS
+++ b/files/etc/DIR_COLORS
@@ -36,6 +36,7 @@ TERM rxvt-unicode
TERM screen
TERM screen-w
TERM screen-256color
+TERM screen.xterm-256color
TERM vt100
TERM vt102
TERM xterm

View file

@ -0,0 +1,22 @@
From f5e90d70d119b6aa12d019947029f9337aec378d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Wed, 8 Jul 2020 11:57:32 +0200
Subject: [PATCH] check for Packages.db and use this instead of Packages
if it exists since rpm has switched the database format
diff --git a/files/usr/lib/base-scripts/backup-rpmdb b/files/usr/lib/base-scripts/backup-rpmdb
index a0425c4..423b703 100755
--- a/files/usr/lib/base-scripts/backup-rpmdb
+++ b/files/usr/lib/base-scripts/backup-rpmdb
@@ -27,7 +27,9 @@ fi
#
#
PACKAGEDBFILE=packages.rpm
-if test -e ${RPMDB_PATH}/Packages ; then
+if test -e ${RPMDB_PATH}/Packages.db ; then
+ PACKAGEDBFILE=Packages.db
+elif test -e ${RPMDB_PATH}/Packages ; then
PACKAGEDBFILE=Packages
fi
#

View file

@ -0,0 +1,137 @@
From 8f1fe28287466235ade9c62fa5995eba9e642660 Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Tue, 4 Aug 2020 12:13:10 +0200
Subject: [PATCH] Rename path() to _path() to avoid using a general name.
Signed-off-by: Werner Fink <werner@suse.de>
diff --git a/files/etc/bash.bashrc b/files/etc/bash.bashrc
index ff5a58e..4cf98ba 100644
--- a/files/etc/bash.bashrc
+++ b/files/etc/bash.bashrc
@@ -73,7 +73,7 @@ fi
#
# Call common progams from /bin or /usr/bin only
#
-path ()
+_path ()
{
if test -x /usr/bin/$1 ; then
${1+"/usr/bin/$@"}
@@ -86,8 +86,8 @@ path ()
#
# ksh/ash sometimes do not know
#
-test -z "$UID" && readonly UID=`path id -ur 2> /dev/null`
-test -z "$EUID" && readonly EUID=`path id -u 2> /dev/null`
+test -z "$UID" && readonly UID=`_path id -ur 2> /dev/null`
+test -z "$EUID" && readonly EUID=`_path id -u 2> /dev/null`
test -s /etc/profile.d/ls.bash && . /etc/profile.d/ls.bash
@@ -99,8 +99,8 @@ fi
# Avoid trouble with Emacs shell mode
#
if test "$EMACS" = "t" ; then
- path tset -I -Q
- path stty cooked pass8 dec nl -echo
+ _path tset -I -Q
+ _path stty cooked pass8 dec nl -echo
fi
#
@@ -140,8 +140,8 @@ case "$-" in
#
# Set xterm prompt with short path (last 18 characters)
#
- if path tput hs 2>/dev/null || path tput -T $TERM+sl hs 2>/dev/null || \
- path tput -T ${TERM%%[.-]*}+sl hs 2>/dev/null || \
+ if _path tput hs 2>/dev/null || _path tput -T $TERM+sl hs 2>/dev/null || \
+ _path tput -T ${TERM%%[.-]*}+sl hs 2>/dev/null || \
[[ $TERM = *xterm* || $TERM = *gnome* || $TERM = *konsole* || $TERM = *xfce* ]]
then
#
@@ -156,18 +156,18 @@ case "$-" in
_tsl=$(echo -en '\e]2;')
_isl=$(echo -en '\e]1;')
_fsl=$(echo -en '\007')
- elif path tput -T $TERM+sl tsl 2>/dev/null ; then
- _tsl=$(path tput -T $TERM+sl tsl 2>/dev/null)
+ elif _path tput -T $TERM+sl tsl 2>/dev/null ; then
+ _tsl=$(_path tput -T $TERM+sl tsl 2>/dev/null)
_isl=''
- _fsl=$(path tput -T $TERM+sl fsl 2>/dev/null)
- elif path tput -T ${TERM%%[.-]*}+sl tsl 2>/dev/null ; then
- _tsl=$(path tput -T $TERM+sl tsl 2>/dev/null)
+ _fsl=$(_path tput -T $TERM+sl fsl 2>/dev/null)
+ elif _path tput -T ${TERM%%[.-]*}+sl tsl 2>/dev/null ; then
+ _tsl=$(_path tput -T $TERM+sl tsl 2>/dev/null)
_isl=''
- _fsl=$(path tput -T $TERM+sl fsl 2>/dev/null)
+ _fsl=$(_path tput -T $TERM+sl fsl 2>/dev/null)
else
- _tsl=$(path tput tsl 2>/dev/null)
+ _tsl=$(_path tput tsl 2>/dev/null)
_isl=''
- _fsl=$(path tput fsl 2>/dev/null)
+ _fsl=$(_path tput fsl 2>/dev/null)
fi
_sc=$(tput sc 2>/dev/null)
_rc=$(tput rc 2>/dev/null)
@@ -199,8 +199,8 @@ case "$-" in
# Other prompting for root
if test "$UID" -eq 0 ; then
if test -n "$TERM" -a -t ; then
- _bred="$(path tput bold 2> /dev/null; path tput setaf 1 2> /dev/null)"
- _sgr0="$(path tput sgr0 2> /dev/null)"
+ _bred="$(_path tput bold 2> /dev/null; _path tput setaf 1 2> /dev/null)"
+ _sgr0="$(_path tput sgr0 2> /dev/null)"
fi
# Colored root prompt (see bugzilla #144620)
if test -n "$_bred" -a -n "$_sgr0" ; then
diff --git a/files/etc/profile b/files/etc/profile
index 42e12be..7e92102 100644
--- a/files/etc/profile
+++ b/files/etc/profile
@@ -64,7 +64,7 @@ fi
#
# Call common progams from /bin or /usr/bin only
#
-path ()
+_path ()
{
command -p ${1+"$@"}
}
@@ -72,7 +72,7 @@ path ()
#
# Initialize terminal
#
-tty=`path tty 2> /dev/null`
+tty=`_path tty 2> /dev/null`
test $? -ne 0 && tty=""
if test -O "$tty" -a -n "$PS1"; then
test -z "${TERM}" && { TERM=linux; export TERM; }
@@ -84,8 +84,8 @@ if test -O "$tty" -a -n "$PS1"; then
esac
# Do not change settings on local line if connected to remote
if test -z "$SSH_TTY" -a "${TERM}" != "dumb" ; then
- path stty sane cr0 pass8 dec
- path tset -I -Q
+ _path stty sane cr0 pass8 dec
+ _path tset -I -Q
fi
fi
unset TERMCAP
@@ -116,9 +116,9 @@ fi
#
# ksh/ash sometimes do not know
#
-test -z "$UID" && readonly UID=`path id -ur 2> /dev/null`
-test -z "$EUID" && readonly EUID=`path id -u 2> /dev/null`
-test -z "$USER" && USER=`path id -un 2> /dev/null`
+test -z "$UID" && readonly UID=`_path id -ur 2> /dev/null`
+test -z "$EUID" && readonly EUID=`_path id -u 2> /dev/null`
+test -z "$USER" && USER=`_path id -un 2> /dev/null`
test -z "$MAIL" && MAIL=/var/spool/mail/$USER
if test -x /bin/uname ; then
test -z "$HOST" && HOST=`/bin/uname -n`

View file

@ -0,0 +1,18 @@
From 2de52ae391e2963eb1913183a6b0530c7e781b55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Tue, 18 Aug 2020 10:34:31 +0200
Subject: [PATCH] DIR_COLORS add TERM rxvt-unicode-256color (bug#1006973)
diff --git a/files/etc/DIR_COLORS b/files/etc/DIR_COLORS
index d8866f7..d1609a1 100644
--- a/files/etc/DIR_COLORS
+++ b/files/etc/DIR_COLORS
@@ -33,6 +33,7 @@ TERM gnome
TERM mach-color
TERM rxvt
TERM rxvt-unicode
+TERM rxvt-unicode-256color
TERM screen
TERM screen-w
TERM screen-256color

View file

@ -0,0 +1,48 @@
From 287cf7cb851c0636fa46a610015d2d22ad36acea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Tue, 18 Aug 2020 10:36:02 +0200
Subject: [PATCH] sort TERM entries in etc/DIR_COLORS
diff --git a/files/etc/DIR_COLORS b/files/etc/DIR_COLORS
index d1609a1..e58e74e 100644
--- a/files/etc/DIR_COLORS
+++ b/files/etc/DIR_COLORS
@@ -16,9 +16,6 @@ COLOR tty
OPTIONS -F -T 0
# Below, there should be one TERM entry for each termtype that is colorizable
-TERM linux
-TERM linux-c
-TERM console
TERM con132x25
TERM con132x30
TERM con132x43
@@ -29,21 +26,24 @@ TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
+TERM console
TERM gnome
+TERM iterm
+TERM linux
+TERM linux-c
TERM mach-color
TERM rxvt
TERM rxvt-unicode
TERM rxvt-unicode-256color
TERM screen
-TERM screen-w
TERM screen-256color
+TERM screen-w
TERM screen.xterm-256color
TERM vt100
TERM vt102
TERM xterm
-TERM xterm-debian
TERM xterm-256color
-TERM iterm
+TERM xterm-debian
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1

View file

@ -0,0 +1,68 @@
From 0c2f2340cc6ebb51f20b36e550adc517a6b2ae42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Tue, 18 Aug 2020 10:38:21 +0200
Subject: [PATCH] DIR_COLORS: merge TERM entries with list from (bug#1006973)
diff --git a/files/etc/DIR_COLORS b/files/etc/DIR_COLORS
index e58e74e..d9f8053 100644
--- a/files/etc/DIR_COLORS
+++ b/files/etc/DIR_COLORS
@@ -16,6 +16,8 @@ COLOR tty
OPTIONS -F -T 0
# Below, there should be one TERM entry for each termtype that is colorizable
+TERM ansi
+TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
@@ -26,24 +28,48 @@ TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
+TERM cons25
TERM console
+TERM cygwin
+TERM dtterm
+TERM Eterm
+TERM eterm-color
TERM gnome
+TERM gnome-256color
TERM iterm
+TERM jfbterm
+TERM konsole
+TERM kterm
TERM linux
TERM linux-c
TERM mach-color
+TERM mlterm
+TERM putty
TERM rxvt
+TERM rxvt-256color
+TERM rxvt-cygwin
+TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM rxvt-unicode-256color
+TERM rxvt-unicode256
TERM screen
TERM screen-256color
+TERM screen-256color-bce
+TERM screen-bce
TERM screen-w
TERM screen.xterm-256color
+TERM screen.linux
+TERM screen.rxvt
+TERM terminator
TERM vt100
TERM vt102
TERM xterm
+TERM xterm-16color
TERM xterm-256color
+TERM xterm-88color
+TERM xterm-color
TERM xterm-debian
+TERM xterm-kitty
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1

View file

@ -0,0 +1,19 @@
From abf7927eebbd4d7f47a362d49ae7856520682c49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Tue, 18 Aug 2020 11:13:28 +0200
Subject: [PATCH] refresh_initrd call modprobe as /sbin/modprobe (bug#1011548)
diff --git a/files/usr/sbin/refresh_initrd b/files/usr/sbin/refresh_initrd
index d3e7170..fd3c518 100755
--- a/files/usr/sbin/refresh_initrd
+++ b/files/usr/sbin/refresh_initrd
@@ -27,7 +27,7 @@ unset modules module modconfs modconf
test "$refresh" = yes || exit 0
-modprobe dm_mod --quiet &> /dev/null || true
+/sbin/modprobe dm_mod --quiet &> /dev/null || true
line=on
test -e /proc/splash && read line < /proc/splash

View file

@ -0,0 +1,28 @@
From 3351bcc9613ba022503103e7e4ffd01e7bd8e0fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Tue, 18 Aug 2020 11:57:16 +0200
Subject: [PATCH] etc/profile add some missing ;; in case esac statements
diff --git a/files/etc/profile b/files/etc/profile
index 7e92102..7edc50b 100644
--- a/files/etc/profile
+++ b/files/etc/profile
@@ -80,7 +80,7 @@ if test -O "$tty" -a -n "$PS1"; then
test "${TERM}" = "ibm327x" && { TERM=dumb; export TERM; }
case "$TERM" in
screen.*)
- test -e /usr/share/terminfo/s/${TERM} || { TERM=screen; export TERM; }
+ test -e /usr/share/terminfo/s/${TERM} || { TERM=screen; export TERM; } ;;
esac
# Do not change settings on local line if connected to remote
if test -z "$SSH_TTY" -a "${TERM}" != "dumb" ; then
@@ -384,7 +384,7 @@ case "$-" in
echo "Directory: $PWD"
# Last but not least
date
- fi
+ fi ;;
esac
unset ORIG_PATH
unset is

View file

@ -0,0 +1,40 @@
From 5220a5f6ba250503ccda326e65ca069d245a5ebe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Tue, 18 Aug 2020 12:07:50 +0200
Subject: [PATCH] profile and csh.login: on s390x set TERM to dumb on serial
console
for sclp_line0 and ttyS0 console (bug#1153946)
diff --git a/files/etc/csh.login b/files/etc/csh.login
index 4fb476a..59ab8eb 100644
--- a/files/etc/csh.login
+++ b/files/etc/csh.login
@@ -26,6 +26,11 @@ if ( -o /dev/$tty && -c /dev/$tty && ${?prompt} ) then
if ( ! ${?TERM} ) setenv TERM linux
if ( "$TERM" == "unknown" ) setenv TERM linux
if ( "$TERM" == "ibm327x" ) setenv TERM dumb
+ if ( `uname -m` == "s390x" ) then
+ if ( "$tty" == "/dev/sclp_line0" || "$tty" == "/dev/ttyS0" ) ; then
+ if ( "$TERM" == "vt220" ) setenv TERM dumb
+ endif
+ endif
if ( $TERM =~ screen.* && ! -e /usr/share/terminfo/s/$TERM) setenv TERM screen
if ( ! ${?SSH_TTY} && "$TERM" != "dumb" ) then
path stty sane cr0 pass8 dec
diff --git a/files/etc/profile b/files/etc/profile
index 7edc50b..f621efe 100644
--- a/files/etc/profile
+++ b/files/etc/profile
@@ -78,6 +78,11 @@ if test -O "$tty" -a -n "$PS1"; then
test -z "${TERM}" && { TERM=linux; export TERM; }
test "${TERM}" = "unknown" && { TERM=linux; export TERM; }
test "${TERM}" = "ibm327x" && { TERM=dumb; export TERM; }
+ if test "$(uname -m)" = "s390x" ; then
+ if test "$tty" = "/dev/sclp_line0" -o "$tty" = "/dev/ttyS0" ; then
+ test "${TERM}" = "vt220" && { TERM=dumb; export TERM; }
+ fi
+ fi
case "$TERM" in
screen.*)
test -e /usr/share/terminfo/s/${TERM} || { TERM=screen; export TERM; } ;;

View file

@ -0,0 +1,26 @@
From b9dd70f33a124556f16dbbafc89585a82218ad61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Tue, 18 Aug 2020 14:56:16 +0200
Subject: [PATCH] backup-rpmdb: exit if zypp.pid is there and running
diff --git a/files/usr/lib/base-scripts/backup-rpmdb b/files/usr/lib/base-scripts/backup-rpmdb
index 423b703..ad10bcc 100755
--- a/files/usr/lib/base-scripts/backup-rpmdb
+++ b/files/usr/lib/base-scripts/backup-rpmdb
@@ -16,6 +16,15 @@ umask 022
PATH=/sbin:/bin:/usr/sbin:/usr/bin
export PATH
+if [ -s /var/run/zypp.pid ] ; then
+ ZYPP_PID=$(cat /var/run/zypp.pid)
+ if [ -e /proc/$ZYPP_PID ] ; then
+ echo "zypp seems to be running with pid $ZYPP_PID"
+ echo "exiting backup-rpmdb gracefully"
+ exit 0
+ fi
+fi
+
RPMDB_PATH="/usr/lib/sysimage/rpm"
#

View file

@ -0,0 +1,19 @@
From 52dc403d54f2c926ee5cc892d1a8a830a45d7412 Mon Sep 17 00:00:00 2001
From: Ruediger Oertel <ro@suse.de>
Date: Mon, 14 Oct 2019 17:59:14 +0200
Subject: [PATCH] also add color alias for ip command, jira#sle-9880,
bsc#1153943
diff --git a/files/etc/profile.d/alias.bash b/files/etc/profile.d/alias.bash
index b180c66..38c8635 100644
--- a/files/etc/profile.d/alias.bash
+++ b/files/etc/profile.d/alias.bash
@@ -27,6 +27,7 @@ alias rd=rmdir
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
+alias ip='ip --color=auto'
alias md='mkdir -p'
if test "$is" = "bash" -a ! -x /bin/which -a ! -x /usr/bin/which ; then
#

View file

@ -0,0 +1,22 @@
From 0ee79834ea9ebf6573a7b903f374c21e53a56c14 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Wed, 9 Sep 2020 16:55:48 +0200
Subject: [PATCH] alias.bash check if ip command knows color=auto
(jsc#SLE-7679)
diff --git a/files/etc/profile.d/alias.bash b/files/etc/profile.d/alias.bash
index 25072cc..b5599e2 100644
--- a/files/etc/profile.d/alias.bash
+++ b/files/etc/profile.d/alias.bash
@@ -27,7 +27,9 @@ alias rd=rmdir
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
-alias ip='ip --color=auto'
+if ip --color=auto -V > /dev/null 2>/dev/null ; then
+ alias ip='ip --color=auto'
+fi
alias md='mkdir -p'
if test "$is" = "bash" -a ! -x /bin/which -a ! -x /usr/bin/which ; then
#

View file

@ -0,0 +1,20 @@
From d12420cc66e6d26a9dff6c0e86e00de232151c82 Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Wed, 4 Nov 2020 10:09:03 +0100
Subject: [PATCH] Avoid semicolon within (t)csh login script on S/390
Signed-off-by: Werner Fink <werner@suse.de>
diff --git a/files/etc/csh.login b/files/etc/csh.login
index 59ab8eb..87b4d72 100644
--- a/files/etc/csh.login
+++ b/files/etc/csh.login
@@ -27,7 +27,7 @@ if ( -o /dev/$tty && -c /dev/$tty && ${?prompt} ) then
if ( "$TERM" == "unknown" ) setenv TERM linux
if ( "$TERM" == "ibm327x" ) setenv TERM dumb
if ( `uname -m` == "s390x" ) then
- if ( "$tty" == "/dev/sclp_line0" || "$tty" == "/dev/ttyS0" ) ; then
+ if ( "$tty" == "/dev/sclp_line0" || "$tty" == "/dev/ttyS0" ) then
if ( "$TERM" == "vt220" ) setenv TERM dumb
endif
endif

View file

@ -0,0 +1,43 @@
From 9a1bc15517d6da56d75182338c0f1bc4518b2b75 Mon Sep 17 00:00:00 2001
From: Matthias Gerstner <matthias.gerstner@suse.de>
Date: Fri, 31 Jul 2020 12:07:56 +0200
Subject: [PATCH] sysctl.d/50-default.conf: allow everybody to create
IPPROTO_ICMP sockets (bsc#1174504)
This will allows us to remove capability bits from `/usr/bin/ping` and
`/usr/sbin/pfing`. Furthermore other programs like `traceroute -I` start
working for regular users.
The ping_group_range allows to further limit the group IDs that are
allowed to use these sockets. It is difficult to find a sensible
limitation on a generic level, however. Daemons might just as well want
to send out pings as interactive users. Therefore all groups are allowed
by this configuration change.
The maximum group ID seems to be (2**31)-1, contrary to what a suggested
documentation snippet says, that never made into upstream [1].
[1]: https://lkml.org/lkml/2011/5/18/305
---
files/usr/lib/sysctl.d/50-default.conf | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/files/usr/lib/sysctl.d/50-default.conf b/files/usr/lib/sysctl.d/50-default.conf
index 4e931ec..2ab1019 100644
--- a/files/usr/lib/sysctl.d/50-default.conf
+++ b/files/usr/lib/sysctl.d/50-default.conf
@@ -23,6 +23,14 @@ net.ipv4.conf.all.promote_secondaries = 1
# (bsc#678066,bsc#752842,bsc#988023,bsc#990838)
net.ipv6.conf.default.use_tempaddr = 1
+# allow all groups in the system to create IP sockets with
+# protocol == IPPROTO_ICMP. This makes it possible to use programs like ping
+# and fping to run without special permissions from capabilities or set*id
+# bits (bsc#1174504).
+# this only allows users to handle ICMP ECHO REQUESTs and REPLYs, nothing
+# else.
+net.ipv4.ping_group_range = "0 2147483647"
+
# increase the number of possible inotify(7) watches
fs.inotify.max_user_watches = 65536

View file

@ -0,0 +1,28 @@
From 91f496b1f65af29832192bad949685a7bc25da0a Mon Sep 17 00:00:00 2001
From: Matthias Gerstner <matthias.gerstner@suse.de>
Date: Wed, 16 Sep 2020 09:19:39 +0200
Subject: [PATCH] sysctl.d/50-default.conf: fix ping_group_range syntax error
It turns out that sysctl passes on quotes to the proc pseudo file, so
remove them to fix this error:
```
sysctl: setting key "net.ipv4.ping_group_range": Invalid argument
```
---
files/usr/lib/sysctl.d/50-default.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/files/usr/lib/sysctl.d/50-default.conf b/files/usr/lib/sysctl.d/50-default.conf
index 2ab1019..51bece2 100644
--- a/files/usr/lib/sysctl.d/50-default.conf
+++ b/files/usr/lib/sysctl.d/50-default.conf
@@ -29,7 +29,7 @@ net.ipv6.conf.default.use_tempaddr = 1
# bits (bsc#1174504).
# this only allows users to handle ICMP ECHO REQUESTs and REPLYs, nothing
# else.
-net.ipv4.ping_group_range = "0 2147483647"
+net.ipv4.ping_group_range = 0 2147483647
# increase the number of possible inotify(7) watches
fs.inotify.max_user_watches = 65536

View file

@ -0,0 +1,26 @@
diff --git a/files/etc/csh.login b/files/etc/csh.login
index 9016aae..998d011 100644
--- a/files/etc/csh.login
+++ b/files/etc/csh.login
@@ -110,7 +110,7 @@ set _hpath
set _spath
set _upath=( /usr/local/bin /usr/bin /bin )
if ( "$HOME" != "/" ) then
- foreach _d (${HOME}/bin/${CPU} ${HOME}/bin)
+ foreach _d (${HOME}/bin/${CPU} ${HOME}/bin ${HOME}/.local/bin/${CPU} ${HOME}/.local/bin)
if ( -d $_d ) set _hpath=( $_d $_hpath )
end
endif
diff --git a/files/etc/profile b/files/etc/profile
index e6c42ce..d392c60 100644
--- a/files/etc/profile
+++ b/files/etc/profile
@@ -163,7 +163,7 @@ ORIG_PATH=$PATH
if test -z "$PROFILEREAD" ; then
PATH=/usr/local/bin:/usr/bin:/bin
if test "$HOME" != "/" ; then
- for dir in $HOME/bin/$CPU $HOME/bin ; do
+ for dir in $HOME/bin/$CPU $HOME/bin $HOME/.local/bin/$CPU $HOME/.local/bin ; do
test -d $dir && PATH=$dir:$PATH
done
fi

View file

@ -0,0 +1,54 @@
commit dfc5b8af96bec249e44a83d573af1f95a661a85c
Author: Michal Suchanek <msuchanek@suse.de>
Date: Thu Feb 27 12:53:05 2020 +0100
get_kernel_version: support xz compressed kernel (boo#1162581).
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
diff --git a/get_kernel_version.c b/get_kernel_version.c
index 236b749..c042487 100644
--- a/get_kernel_version.c
+++ b/get_kernel_version.c
@@ -47,7 +47,8 @@ main (int argc, char *argv[])
/* check if file exist and is compressed */
{
- unsigned char buf [2];
+#define DETECT_SIZE 6
+ unsigned char buf [DETECT_SIZE];
int fd = open (argv[1], O_RDONLY | O_CLOEXEC);
if (fd == -1)
{
@@ -55,16 +56,30 @@ main (int argc, char *argv[])
return 1;
}
- if (read (fd, buf, 2) != 2)
+ if (read (fd, buf, DETECT_SIZE) != DETECT_SIZE)
{
fprintf (stderr, "Short read\n");
close (fd);
return 1;
}
+ /* \xFD7zXZ\x00 */
+ if ((buf [0] == 0xfd) &&
+ (buf [1] == '7') &&
+ (buf [2] == 'z') &&
+ (buf [3] == 'X') &&
+ (buf [4] == 'Z') &&
+ (buf [5] == 0))
+ {
+ snprintf (command, sizeof (command), "/usr/bin/xz -dc %s 2>/dev/null", argv[1]);
+ }
+
if (buf [0] == 037 && (buf [1] == 0213 || buf [1] == 0236))
{
snprintf (command, sizeof (command), "/bin/gzip -dc %s 2>/dev/null", argv[1]);
+ }
+
+ if (*command) {
fp = popen (command, "re");
if (fp == NULL)
{

View file

@ -0,0 +1,18 @@
commit 4c0060639f6fa854830a708a823976772afe7764
Author: Lukas Lansky <lukas.lansky@suse.com>
Date: Tue Mar 2 20:40:05 2021 +0100
Fixing possible resource leak. Found by running ccpcheck on the source code.
diff --git a/get_kernel_version.c b/get_kernel_version.c
index c042487..12e713a 100644
--- a/get_kernel_version.c
+++ b/get_kernel_version.c
@@ -84,6 +84,7 @@ main (int argc, char *argv[])
if (fp == NULL)
{
fprintf (stderr, "%s: faild\n", command);
+ close (fd);
return 1;
}
}

View file

@ -0,0 +1,19 @@
commit df622b89bc92fd882a6715c5743095528a643546
Author: Berthold Gunreben <azouhr@gmail.com>
Date: Mon Mar 8 11:57:14 2021 +0100
excluding new kernel string in version search
diff --git a/get_kernel_version.c b/get_kernel_version.c
index c042487..a04571f 100644
--- a/get_kernel_version.c
+++ b/get_kernel_version.c
@@ -116,7 +116,7 @@ main (int argc, char *argv[])
buffer[i+10] == 'i' && buffer[i+11] == 'o' &&
buffer[i+12] == 'n' && buffer[i+13] == ' ' &&
/* current s390 images have that string without version: */
- buffer[i+14] != 0)
+ buffer[i+14] != 0 && buffer[i+17] != 0)
{
int j = i+14;
int number_dots = 0;

View file

@ -0,0 +1,13 @@
diff --git a/files/usr/lib/sysctl.d/50-default.conf b/files/usr/lib/sysctl.d/50-default.conf
index 8a797a7..d0307b6 100644
--- a/files/usr/lib/sysctl.d/50-default.conf
+++ b/files/usr/lib/sysctl.d/50-default.conf
@@ -29,7 +29,7 @@ net.ipv6.conf.default.use_tempaddr = 1
# bits (bsc#1174504).
# this only allows users to handle ICMP ECHO REQUESTs and REPLYs, nothing
# else.
-net.ipv4.ping_group_range = 0 2147483647
+-net.ipv4.ping_group_range = 0 2147483647
# increase the number of possible inotify(7) watches
fs.inotify.max_user_watches = 65536

View file

@ -0,0 +1,205 @@
From f00ca2600331602241954533a1b1610d1da57edf Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Wed, 7 Nov 2018 11:21:06 +0100
Subject: [PATCH] Readline: Use overwrite-mode on Insert key
as well as in vi-command mode switch to vi-insert mode and
in vi-insert use vi-replace similar to emacs overwrite-mode.
Suggested by Xose Vazquez Perez
Signed-off-by: Werner Fink <werner@suse.de>
---
files/etc/inputrc.keys | 90 +++++++++++++++++++++++++++++++++---------
1 file changed, 72 insertions(+), 18 deletions(-)
diff --git files/etc/inputrc.keys files/etc/inputrc.keys
index c23e43a..894d843 100644
--- a/files/etc/inputrc.keys
+++ b/files/etc/inputrc.keys
@@ -11,19 +11,30 @@
# Common standard keypad and cursor
#
"\e[1~": beginning-of-line
-"\e[2~": yank
+set editing-mode vi
+ set keymap vi-insert
+ "\e[2~": vi-replace
+ "\M-[2~": vi-replace
+ "\2332~": vi-replace
+ set keymap vi-command
+ "\e[2~": vi-editing-mode
+ "\M-[2~": vi-editing-mode
+ "\2332~": vi-editing-mode
+set editing-mode emacs
+ set keymap emacs
+ "\e[2~": overwrite-mode
+ "\M-[2~": overwrite-mode
+ "\2332~": overwrite-mode
"\e[3~": delete-char
"\e[4~": end-of-line
"\e[5~": history-search-backward
"\e[6~": history-search-forward
"\M-[1~": beginning-of-line
-"\M-[2~": yank
"\M-[3~": delete-char
"\M-[4~": end-of-line
"\M-[5~": history-search-backward
"\M-[6~": history-search-forward
"\2331~": beginning-of-line
-"\2332~": yank
"\2333~": delete-char
"\2334~": end-of-line
"\2335~": history-search-backward
@@ -73,31 +84,50 @@
"\C-\M-[B": next-history
"\C-^[[D": backward-char
$if term=xterm
-"\e[2;2~": yank
+set editing-mode vi
+ set keymap vi-insert
+ "\e[2;2~": vi-replace
+ "\e[2;3~": vi-replace
+ "\e[2;4~": vi-replace
+ "\e[2;5~": vi-replace
+ "\e[2;6~": vi-replace
+ "\e[2;7~": vi-replace
+ "\e[2;8~": vi-replace
+ set keymap vi-command
+ "\e[2;2~": vi-editing-mode
+ "\e[2;3~": vi-editing-mode
+ "\e[2;4~": vi-editing-mode
+ "\e[2;5~": vi-editing-mode
+ "\e[2;6~": vi-editing-mode
+ "\e[2;7~": vi-editing-mode
+ "\e[2;8~": vi-editing-mode
+set editing-mode emacs
+ set keymap emacs
+ "\e[2;2~": overwrite-mode
+ "\e[2;3~": overwrite-mode
+ "\e[2;4~": overwrite-mode
+ "\e[2;5~": overwrite-mode
+ "\e[2;6~": overwrite-mode
+ "\e[2;7~": overwrite-mode
+ "\e[2;8~": overwrite-mode
"\e[3;2~": delete-char
"\e[5;2~": history-search-backward
"\e[6;2~": history-search-forward
-"\e[2;3~": yank
"\e[3;3~": delete-char
"\e[5;3~": history-search-backward
"\e[6;3~": history-search-forward
-"\e[2;4~": yank
"\e[3;4~": delete-char
"\e[5;4~": history-search-backward
"\e[6;4~": history-search-forward
-"\e[2;5~": yank
"\e[3;5~": delete-char
"\e[5;5~": history-search-backward
"\e[6;5~": history-search-forward
-"\e[2;6~": yank
"\e[3;6~": delete-char
"\e[5;6~": history-search-backward
"\e[6;6~": history-search-forward
-"\e[2;7~": yank
"\e[3;7~": delete-char
"\e[5;7~": history-search-backward
"\e[6;7~": history-search-forward
-"\e[2;8~": yank
"\e[3;8~": delete-char
"\e[5;8~": history-search-backward
"\e[6;8~": history-search-forward
@@ -198,7 +228,7 @@ $endif
"\C-H": backward-delete-char
$if term=xterm
"\e\303\277": backward-delete-word
-"\eÿ" backward-delete-word
+"\eÿ": backward-delete-word
$endif
#
# Home and End
@@ -733,7 +763,23 @@ $if term=rxvt-unicode
"\e\eOl": delete-char
"\e\eOM": accept-line
"\e\eOn": delete-char
-"\e\eOp": yank
+set editing-mode vi
+ set keymap vi-insert
+ "\e\eOp": vi-replace
+ "\e[2^": vi-replace
+ "\e[2$": vi-replace
+ "\e\e[2$": vi-replace
+ set keymap vi-command
+ "\e\eOp": vi-editing-mode
+ "\e[2^": vi-editing-mode
+ "\e[2$": vi-editing-mode
+ "\e\e[2$": vi-editing-mode
+set editing-mode emacs
+ set keymap emacs
+ "\e\eOp": overwrite-mode
+ "\e[2^": overwrite-mode
+ "\e[2$": overwrite-mode
+ "\e\e[2$": overwrite-mode
"\e\eOq": end-of-line
"\e\eOr": down-history
"\e\eOs": history-search-forward
@@ -755,19 +801,16 @@ $if term=rxvt-unicode
"\e\e[D": backward-word
"\e\e[A": history-search-backward
"\e\e[B": history-search-forward
-"\e[2^": yank
"\e[3^": delete-char
"\e[5^": history-search-backward
"\e[6^": history-search-forward
"\e[7^": beginning-of-line
"\e[8^": end-of-line
-"\e[2$": yank
"\e[3$": delete-char
"\e[5$": history-search-backward
"\e[6$": history-search-forward
"\e[7$": beginning-of-line
"\e[8$": end-of-line
-"\e\e[2$": yank
"\e\e[3$": delete-char
"\e\e[5$": history-search-backward
"\e\e[6$": history-search-forward
@@ -787,7 +830,20 @@ $if term=screen
"\e[1;2B": down-history
"\e[1;2H": beginning-of-line
"\e[1;2F": end-of-line
-"\e[2;2~": yank
+set editing-mode vi
+ set keymap vi-insert
+ "\e[2;2~": vi-replace
+ "\e[2;5~": vi-replace
+ "\e[2;3~": vi-replace
+ set keymap vi-command
+ "\e[2;2~": vi-editing-mode
+ "\e[2;5~": vi-editing-mode
+ "\e[2;3~": vi-editing-mode
+set editing-mode emacs
+ set keymap emacs
+ "\e[2;2~": overwrite-mode
+ "\e[2;5~": overwrite-mode
+ "\e[2;3~": overwrite-mode
"\e[3;2~": delete-char
"\e[5;2~": history-search-backward
"\e[6;2~": history-search-forward
@@ -797,7 +853,6 @@ $if term=screen
"\e[1;5B": down-history
"\e[1;5H": beginning-of-line
"\e[1;5F": end-of-line
-"\e[2;5~": yank
"\e[3;5~": delete-char
"\e[5;5~": history-search-backward
"\e[6;5~": history-search-forward
@@ -807,7 +862,6 @@ $if term=screen
"\e[1;3B": down-history
"\e[1;3H": beginning-of-line
"\e[1;3F": end-of-line
-"\e[2;3~": yank
"\e[3;3~": delete-char
"\e[5;3~": history-search-backward
"\e[6;3~": history-search-forward
--
2.26.2

View file

@ -0,0 +1,174 @@
From f39a8d18719c3b34373e0e36098f0f404121b5c5 Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Wed, 7 Nov 2018 12:30:02 +0100
Subject: [PATCH] Readline: Do not miss common mappings for vi
Signed-off-by: Werner Fink <werner@suse.de>
---
files/etc/inputrc.keys | 80 +++++++++++++++++++++++++++---------------
1 file changed, 51 insertions(+), 29 deletions(-)
diff --git files/etc/inputrc.keys files/etc/inputrc.keys
index 894d843..1e3269a 100644
--- a/files/etc/inputrc.keys
+++ b/files/etc/inputrc.keys
@@ -11,20 +11,25 @@
# Common standard keypad and cursor
#
"\e[1~": beginning-of-line
+$if mode=emacs
+# Note that this file is included for vi-command, vi-insert, and
+# emacs mapping, therefore do switch within the last $include as
+# otherwise the vi modes do miss the common mappings.
set editing-mode vi
- set keymap vi-insert
- "\e[2~": vi-replace
- "\M-[2~": vi-replace
- "\2332~": vi-replace
- set keymap vi-command
+ set keymap vi-command
"\e[2~": vi-editing-mode
"\M-[2~": vi-editing-mode
"\2332~": vi-editing-mode
+ set keymap vi-insert
+ "\e[2~": vi-replace
+ "\M-[2~": vi-replace
+ "\2332~": vi-replace
set editing-mode emacs
- set keymap emacs
+ set keymap emacs
"\e[2~": overwrite-mode
"\M-[2~": overwrite-mode
"\2332~": overwrite-mode
+$endif
"\e[3~": delete-char
"\e[4~": end-of-line
"\e[5~": history-search-backward
@@ -84,16 +89,12 @@ set editing-mode emacs
"\C-\M-[B": next-history
"\C-^[[D": backward-char
$if term=xterm
+$if mode=emacs
+# Note that this file is included for vi-command, vi-insert, and
+# emacs mapping, therefore do switch within the last $include as
+# otherwise the vi modes do miss the common mappings.
set editing-mode vi
- set keymap vi-insert
- "\e[2;2~": vi-replace
- "\e[2;3~": vi-replace
- "\e[2;4~": vi-replace
- "\e[2;5~": vi-replace
- "\e[2;6~": vi-replace
- "\e[2;7~": vi-replace
- "\e[2;8~": vi-replace
- set keymap vi-command
+ set keymap vi-command
"\e[2;2~": vi-editing-mode
"\e[2;3~": vi-editing-mode
"\e[2;4~": vi-editing-mode
@@ -101,8 +102,16 @@ set editing-mode vi
"\e[2;6~": vi-editing-mode
"\e[2;7~": vi-editing-mode
"\e[2;8~": vi-editing-mode
+ set keymap vi-insert
+ "\e[2;2~": vi-replace
+ "\e[2;3~": vi-replace
+ "\e[2;4~": vi-replace
+ "\e[2;5~": vi-replace
+ "\e[2;6~": vi-replace
+ "\e[2;7~": vi-replace
+ "\e[2;8~": vi-replace
set editing-mode emacs
- set keymap emacs
+ set keymap emacs
"\e[2;2~": overwrite-mode
"\e[2;3~": overwrite-mode
"\e[2;4~": overwrite-mode
@@ -110,6 +119,7 @@ set editing-mode emacs
"\e[2;6~": overwrite-mode
"\e[2;7~": overwrite-mode
"\e[2;8~": overwrite-mode
+$endif
"\e[3;2~": delete-char
"\e[5;2~": history-search-backward
"\e[6;2~": history-search-forward
@@ -245,6 +255,8 @@ $if term=xterm
"\2174~": set-mark
"\217H": beginning-of-line
"\217F": end-of-line
+"\233H": beginning-of-line
+"\233F": end-of-line
"\e[1;2H": beginning-of-line
"\e[1;2F": end-of-line
"\e[1;3H": beginning-of-line
@@ -763,23 +775,28 @@ $if term=rxvt-unicode
"\e\eOl": delete-char
"\e\eOM": accept-line
"\e\eOn": delete-char
+$if mode=emacs
+# Note that this file is included for vi-command, vi-insert, and
+# emacs mapping, therefore do switch within the last $include as
+# otherwise the vi modes do miss the common mappings.
set editing-mode vi
- set keymap vi-insert
- "\e\eOp": vi-replace
- "\e[2^": vi-replace
- "\e[2$": vi-replace
- "\e\e[2$": vi-replace
- set keymap vi-command
+ set keymap vi-command
"\e\eOp": vi-editing-mode
"\e[2^": vi-editing-mode
"\e[2$": vi-editing-mode
"\e\e[2$": vi-editing-mode
+ set keymap vi-insert
+ "\e\eOp": vi-replace
+ "\e[2^": vi-replace
+ "\e[2$": vi-replace
+ "\e\e[2$": vi-replace
set editing-mode emacs
- set keymap emacs
+ set keymap emacs
"\e\eOp": overwrite-mode
"\e[2^": overwrite-mode
"\e[2$": overwrite-mode
"\e\e[2$": overwrite-mode
+$endif
"\e\eOq": end-of-line
"\e\eOr": down-history
"\e\eOs": history-search-forward
@@ -830,20 +847,25 @@ $if term=screen
"\e[1;2B": down-history
"\e[1;2H": beginning-of-line
"\e[1;2F": end-of-line
+$if mode=emacs
+# Note that this file is included for vi-command, vi-insert, and
+# emacs mapping, therefore do switch within the last $include as
+# otherwise the vi modes do miss the common mappings.
set editing-mode vi
- set keymap vi-insert
- "\e[2;2~": vi-replace
- "\e[2;5~": vi-replace
- "\e[2;3~": vi-replace
- set keymap vi-command
+ set keymap vi-command
"\e[2;2~": vi-editing-mode
"\e[2;5~": vi-editing-mode
"\e[2;3~": vi-editing-mode
+ set keymap vi-insert
+ "\e[2;2~": vi-replace
+ "\e[2;5~": vi-replace
+ "\e[2;3~": vi-replace
set editing-mode emacs
- set keymap emacs
+ set keymap emacs
"\e[2;2~": overwrite-mode
"\e[2;5~": overwrite-mode
"\e[2;3~": overwrite-mode
+$endif
"\e[3;2~": delete-char
"\e[5;2~": history-search-backward
"\e[6;2~": history-search-forward
--
2.26.2

View file

@ -0,0 +1,149 @@
From 14003c19eaa863ae9d80a0ebb9b5cab6273a5a9e Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Thu, 17 Oct 2019 06:59:18 +0200
Subject: [PATCH] Use official key binding functions in inputrc
that is replace up-history with previous-history, down-history with
next-history and backward-delete-word with backward-kill-word
(bsc#1084934). Add some missed key escape sequences for urxvt-unicode
terminal as well (boo#1007715).
Signed-off-by: Werner Fink <werner@suse.de>
---
files/etc/inputrc | 32 ++++++++++++++++----------------
files/etc/inputrc.keys | 24 ++++++++++++++----------
2 files changed, 30 insertions(+), 26 deletions(-)
diff --git files/etc/inputrc files/etc/inputrc
index eefdcda..74ebb48 100644
--- a/files/etc/inputrc
+++ b/files/etc/inputrc
@@ -54,40 +54,40 @@ $include /etc/inputrc.keys
$if term=xterm
"\e\eOD": backward-word
"\e\eOC": forward-word
-"\e\eOA": up-history
-"\e\eOB": down-history
+"\e\eOA": previous-history
+"\e\eOB": next-history
"\C-\eOD": backward-char
"\C-\eOC": forward-char
-"\C-\eOA": up-history
-"\C-\eOB": down-history
+"\C-\eOA": previous-history
+"\C-\eOB": next-history
"\M-\eOD": backward-word
"\M-\eOC": forward-word
-"\M-\eOA": up-history
-"\M-\eOB": down-history
+"\M-\eOA": previous-history
+"\M-\eOB": next-history
"\C-\M-OD": backward-char
"\C-\M-OC": forward-char
-"\C-\M-OA": up-history
-"\C-\M-OB": down-history
+"\C-\M-OA": previous-history
+"\C-\M-OB": next-history
$endif
#
# Standard cursor
#
"\e\e[D": backward-word
"\e\e[C": forward-word
-"\e\e[A": up-history
-"\e\e[B": down-history
+"\e\e[A": previous-history
+"\e\e[B": next-history
"\C-\e[D": backward-char
"\C-\e[C": forward-char
-"\C-\e[A": up-history
-"\C-\e[B": down-history
+"\C-\e[A": previous-history
+"\C-\e[B": next-history
"\M-\e[D": backward-word
"\M-\e[C": forward-word
-"\M-\e[A": up-history
-"\M-\e[B": down-history
+"\M-\e[A": previous-history
+"\M-\e[B": next-history
"\C-\M-[D": backward-char
"\C-\M-[C": forward-char
-"\C-\M-[A": up-history
-"\C-\M-[B": down-history
+"\C-\M-[A": previous-history
+"\C-\M-[B": next-history
$endif
#
# end
diff --git files/etc/inputrc.keys files/etc/inputrc.keys
index 1e3269a..04f1659 100644
--- a/files/etc/inputrc.keys
+++ b/files/etc/inputrc.keys
@@ -237,8 +237,8 @@ $endif
"\C-?": backward-delete-char
"\C-H": backward-delete-char
$if term=xterm
-"\e\303\277": backward-delete-word
-"\eÿ": backward-delete-word
+"\e\303\277": backward-kill-word
+"\eÿ": backward-kill-word
$endif
#
# Home and End
@@ -798,14 +798,18 @@ set editing-mode emacs
"\e\e[2$": overwrite-mode
$endif
"\e\eOq": end-of-line
-"\e\eOr": down-history
+"\e\eOr": next-history
"\e\eOs": history-search-forward
"\e\eOt": backward-char
"\e\eOu": re-read-init-file
"\e\eOv": forward-char
"\e\eOw": beginning-of-line
-"\e\eOx": up-history
+"\e\eOx": previous-history
"\e\eOy": history-search-backward
+"\eOc": forward-word
+"\eOd": backward-word
+"\eOa": history-search-backward
+"\eOb": history-search-forward
"\e[c": forward-word
"\e[d": backward-word
"\e[a": history-search-backward
@@ -843,8 +847,8 @@ $endif
$if term=screen
"\e[1;2D": backward-word
"\e[1;2C": forward-word
-"\e[1;2A": up-history
-"\e[1;2B": down-history
+"\e[1;2A": previous-history
+"\e[1;2B": next-history
"\e[1;2H": beginning-of-line
"\e[1;2F": end-of-line
$if mode=emacs
@@ -871,8 +875,8 @@ $endif
"\e[6;2~": history-search-forward
"\e[1;5D": backward-word
"\e[1;5C": forward-word
-"\e[1;5A": up-history
-"\e[1;5B": down-history
+"\e[1;5A": previous-history
+"\e[1;5B": next-history
"\e[1;5H": beginning-of-line
"\e[1;5F": end-of-line
"\e[3;5~": delete-char
@@ -880,8 +884,8 @@ $endif
"\e[6;5~": history-search-forward
"\e[1;3D": backward-word
"\e[1;3C": forward-word
-"\e[1;3A": up-history
-"\e[1;3B": down-history
+"\e[1;3A": previous-history
+"\e[1;3B": next-history
"\e[1;3H": beginning-of-line
"\e[1;3F": end-of-line
"\e[3;3~": delete-char
--
2.26.2

View file

@ -0,0 +1,570 @@
From ba286f5ea7666971887f42189cda2c667f3a8203 Mon Sep 17 00:00:00 2001
From: Koichi Murase <myoga.murase@gmail.com>
Date: Sun, 21 Feb 2021 22:57:46 +0900
Subject: [PATCH 1/2] Fix keyseq specifications in /etc/inputrc{,.keys}
---
files/etc/inputrc | 48 ++++++++++++++++++------------------
files/etc/inputrc.keys | 56 ++++++++++++------------------------------
2 files changed, 40 insertions(+), 64 deletions(-)
diff --git files/etc/inputrc files/etc/inputrc
index df9a2a1..cd0e0c0 100644
--- a/files/etc/inputrc
+++ b/files/etc/inputrc
@@ -56,18 +56,18 @@ $if term=xterm
"\e\eOC": forward-word
"\e\eOA": previous-history
"\e\eOB": next-history
-"\C-\eOD": backward-char
-"\C-\eOC": forward-char
-"\C-\eOA": previous-history
-"\C-\eOB": next-history
-"\M-\eOD": backward-word
-"\M-\eOC": forward-word
-"\M-\eOA": previous-history
-"\M-\eOB": next-history
-"\C-\M-OD": backward-char
-"\C-\M-OC": forward-char
-"\C-\M-OA": previous-history
-"\C-\M-OB": next-history
+"\eOD": backward-char
+"\eOC": forward-char
+"\eOA": previous-history
+"\eOB": next-history
+"\e\217D": backward-word
+"\e\217C": forward-word
+"\e\217A": previous-history
+"\e\217B": next-history
+"\217D": backward-char
+"\217C": forward-char
+"\217A": previous-history
+"\217B": next-history
$endif
#
# Standard cursor
@@ -76,18 +76,18 @@ $endif
"\e\e[C": forward-word
"\e\e[A": previous-history
"\e\e[B": next-history
-"\C-\e[D": backward-char
-"\C-\e[C": forward-char
-"\C-\e[A": previous-history
-"\C-\e[B": next-history
-"\M-\e[D": backward-word
-"\M-\e[C": forward-word
-"\M-\e[A": previous-history
-"\M-\e[B": next-history
-"\C-\M-[D": backward-char
-"\C-\M-[C": forward-char
-"\C-\M-[A": previous-history
-"\C-\M-[B": next-history
+"\e[D": backward-char
+"\e[C": forward-char
+"\e[A": previous-history
+"\e[B": next-history
+"\e\233D": backward-word
+"\e\233C": forward-word
+"\e\233A": previous-history
+"\e\233B": next-history
+"\233D": backward-char
+"\233C": forward-char
+"\233A": previous-history
+"\233B": next-history
$endif
#
# end
diff --git files/etc/inputrc.keys files/etc/inputrc.keys
index 93067f8..819463e 100644
--- a/files/etc/inputrc.keys
+++ b/files/etc/inputrc.keys
@@ -18,76 +18,52 @@ $if mode=emacs
set editing-mode vi
set keymap vi-command
"\e[2~": vi-editing-mode
- "\M-[2~": vi-editing-mode
"\2332~": vi-editing-mode
set keymap vi-insert
"\e[2~": vi-replace
- "\M-[2~": vi-replace
"\2332~": vi-replace
set editing-mode emacs
set keymap emacs
"\e[2~": overwrite-mode
- "\M-[2~": overwrite-mode
"\2332~": overwrite-mode
$endif
"\e[3~": delete-char
"\e[4~": end-of-line
"\e[5~": history-search-backward
"\e[6~": history-search-forward
-"\M-[1~": beginning-of-line
-"\M-[3~": delete-char
-"\M-[4~": end-of-line
-"\M-[5~": history-search-backward
-"\M-[6~": history-search-forward
"\2331~": beginning-of-line
"\2333~": delete-char
"\2334~": end-of-line
"\2335~": history-search-backward
"\2336~": history-search-forward
#
-# Cursor keys
-#
-"\e[C": forward-char
-"\e[D": backward-char
-"\e[A": previous-history
-"\e[B": next-history
-"\217C": forward-char
-"\217D": backward-char
-"\217A": previous-history
-"\217B": next-history
-"\233C": forward-char
-"\233D": backward-char
-"\233A": previous-history
-"\233B": next-history
-#
# Cursor keys in keypad mode
#
-"\C-[OD": backward-char
-"\C-[OC": forward-char
-"\C-[OA": previous-history
-"\C-[OB": next-history
+"\eOD": backward-char
+"\eOC": forward-char
+"\eOA": previous-history
+"\eOB": next-history
#
# Cursor keys in ANSI mode
#
-"\C-[[D": backward-char
-"\C-[[C": forward-char
-"\C-[[A": previous-history
-"\C-[[B": next-history
+"\e[D": backward-char
+"\e[C": forward-char
+"\e[A": previous-history
+"\e[B": next-history
#
# Cursor keys in 8 bit keypad mode
#
-"\C-\M-OD": backward-char
-"\C-\M-OC": forward-char
-"\C-\M-OA": previous-history
-"\C-\M-OB": next-history
+"\217D": backward-char
+"\217C": forward-char
+"\217A": previous-history
+"\217B": next-history
#
# Cursor keys in 8 bit ANSI mode
#
-"\C-\M-[D": backward-char
-"\C-\M-[C": forward-char
-"\C-\M-[A": previous-history
-"\C-\M-[B": next-history
-"\C-^[[D": backward-char
+"\233D": backward-char
+"\233C": forward-char
+"\233A": previous-history
+"\233B": next-history
$if term=xterm
$if mode=emacs
# Note that this file is included for vi-command, vi-insert, and
--
2.26.2
From ad4f96971956574db9b00c08e9b10093eeb22338 Mon Sep 17 00:00:00 2001
From: Koichi Murase <myoga.murase@gmail.com>
Date: Sun, 21 Feb 2021 23:58:31 +0900
Subject: [PATCH 2/2] Comment out 8-bit C1 conflicting with UTF-8 in
/etc/inputrc
---
files/etc/inputrc | 34 +++---
files/etc/inputrc.keys | 240 ++++++++++++++++++++++-------------------
2 files changed, 145 insertions(+), 129 deletions(-)
diff --git files/etc/inputrc files/etc/inputrc
index cd0e0c0..0b210ad 100644
--- a/files/etc/inputrc
+++ b/files/etc/inputrc
@@ -60,14 +60,15 @@ $if term=xterm
"\eOC": forward-char
"\eOA": previous-history
"\eOB": next-history
-"\e\217D": backward-word
-"\e\217C": forward-word
-"\e\217A": previous-history
-"\e\217B": next-history
-"\217D": backward-char
-"\217C": forward-char
-"\217A": previous-history
-"\217B": next-history
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\e\217D": backward-word
+# "\e\217C": forward-word
+# "\e\217A": previous-history
+# "\e\217B": next-history
+# "\217D": backward-char
+# "\217C": forward-char
+# "\217A": previous-history
+# "\217B": next-history
$endif
#
# Standard cursor
@@ -80,14 +81,15 @@ $endif
"\e[C": forward-char
"\e[A": previous-history
"\e[B": next-history
-"\e\233D": backward-word
-"\e\233C": forward-word
-"\e\233A": previous-history
-"\e\233B": next-history
-"\233D": backward-char
-"\233C": forward-char
-"\233A": previous-history
-"\233B": next-history
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\e\233D": backward-word
+# "\e\233C": forward-word
+# "\e\233A": previous-history
+# "\e\233B": next-history
+# "\233D": backward-char
+# "\233C": forward-char
+# "\233A": previous-history
+# "\233B": next-history
$endif
#
# end
diff --git files/etc/inputrc.keys files/etc/inputrc.keys
index 819463e..0ab1f98 100644
--- a/files/etc/inputrc.keys
+++ b/files/etc/inputrc.keys
@@ -18,24 +18,28 @@ $if mode=emacs
set editing-mode vi
set keymap vi-command
"\e[2~": vi-editing-mode
- "\2332~": vi-editing-mode
+ # [Note: raw C1 chars conflicts with UTF-8]
+ # "\2332~": vi-editing-mode
set keymap vi-insert
"\e[2~": vi-replace
- "\2332~": vi-replace
+ # [Note: raw C1 chars conflicts with UTF-8]
+ # "\2332~": vi-replace
set editing-mode emacs
set keymap emacs
"\e[2~": overwrite-mode
- "\2332~": overwrite-mode
+ # [Note: raw C1 chars conflicts with UTF-8]
+ # "\2332~": overwrite-mode
$endif
"\e[3~": delete-char
"\e[4~": end-of-line
"\e[5~": history-search-backward
"\e[6~": history-search-forward
-"\2331~": beginning-of-line
-"\2333~": delete-char
-"\2334~": end-of-line
-"\2335~": history-search-backward
-"\2336~": history-search-forward
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\2331~": beginning-of-line
+# "\2333~": delete-char
+# "\2334~": end-of-line
+# "\2335~": history-search-backward
+# "\2336~": history-search-forward
#
# Cursor keys in keypad mode
#
@@ -53,17 +57,19 @@ $endif
#
# Cursor keys in 8 bit keypad mode
#
-"\217D": backward-char
-"\217C": forward-char
-"\217A": previous-history
-"\217B": next-history
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\217D": backward-char
+# "\217C": forward-char
+# "\217A": previous-history
+# "\217B": next-history
#
# Cursor keys in 8 bit ANSI mode
#
-"\233D": backward-char
-"\233C": forward-char
-"\233A": previous-history
-"\233B": next-history
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\233D": backward-char
+# "\233C": forward-char
+# "\233A": previous-history
+# "\233B": next-history
$if term=xterm
$if mode=emacs
# Note that this file is included for vi-command, vi-insert, and
@@ -163,41 +169,42 @@ $if term=xterm
"\e[1;8D": backward-word
"\e[1;8A": history-search-backward
"\e[1;8B": history-search-forward
-"\2332C": forward-word
-"\2332D": backward-word
-"\2332A": history-search-backward
-"\2332B": history-search-forward
-"\2331;2C": forward-word
-"\2331;2D": backward-word
-"\2331;2A": history-search-backward
-"\2331;2B": history-search-forward
-"\2331;3C": forward-word
-"\2331;3D": backward-word
-"\2331;3A": history-search-backward
-"\2331;3B": history-search-forward
-"\2331;4C": forward-word
-"\2331;4D": backward-word
-"\2331;4A": history-search-backward
-"\2331;4B": history-search-forward
-"\2335C": forward-word
-"\2335D": backward-word
-"\2335A": history-search-backward
-"\2335B": history-search-forward
-"\2331;5C": forward-word
-"\2331;5D": backward-word
-"\2331;5A": history-search-backward
-"\2331;5B": history-search-forward
-"\2331;6C": forward-word
-"\2331;6D": backward-word
-"\2331;6A": history-search-backward
-"\2331;6B": history-search-forward
-"\2331;7C": forward-word
-"\2331;7D": backward-word
-"\2331;7A": history-search-backward
-"\2331;7B": history-search-forward
-"\2331;8C": forward-word
-"\2331;8D": backward-word
-"\2331;8A": history-search-backward
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\2332C": forward-word
+# "\2332D": backward-word
+# "\2332A": history-search-backward
+# "\2332B": history-search-forward
+# "\2331;2C": forward-word
+# "\2331;2D": backward-word
+# "\2331;2A": history-search-backward
+# "\2331;2B": history-search-forward
+# "\2331;3C": forward-word
+# "\2331;3D": backward-word
+# "\2331;3A": history-search-backward
+# "\2331;3B": history-search-forward
+# "\2331;4C": forward-word
+# "\2331;4D": backward-word
+# "\2331;4A": history-search-backward
+# "\2331;4B": history-search-forward
+# "\2335C": forward-word
+# "\2335D": backward-word
+# "\2335A": history-search-backward
+# "\2335B": history-search-forward
+# "\2331;5C": forward-word
+# "\2331;5D": backward-word
+# "\2331;5A": history-search-backward
+# "\2331;5B": history-search-forward
+# "\2331;6C": forward-word
+# "\2331;6D": backward-word
+# "\2331;6A": history-search-backward
+# "\2331;6B": history-search-forward
+# "\2331;7C": forward-word
+# "\2331;7D": backward-word
+# "\2331;7A": history-search-backward
+# "\2331;7B": history-search-forward
+# "\2331;8C": forward-word
+# "\2331;8D": backward-word
+# "\2331;8A": history-search-backward
$else
"\e[G": re-read-init-file
$endif
@@ -227,12 +234,13 @@ $if term=xterm
"\e[4~": set-mark
"\e[H": beginning-of-line
"\e[F": end-of-line
-"\2171~": history-search-backward
-"\2174~": set-mark
-"\217H": beginning-of-line
-"\217F": end-of-line
-"\233H": beginning-of-line
-"\233F": end-of-line
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\2171~": history-search-backward
+# "\2174~": set-mark
+# "\217H": beginning-of-line
+# "\217F": end-of-line
+# "\233H": beginning-of-line
+# "\233F": end-of-line
"\e[1;2H": beginning-of-line
"\e[1;2F": end-of-line
"\e[1;3H": beginning-of-line
@@ -247,20 +255,21 @@ $if term=xterm
"\e[1;7F": end-of-line
"\e[1;8H": beginning-of-line
"\e[1;8F": end-of-line
-"\2331;2H": beginning-of-line
-"\2331;2F": end-of-line
-"\2331;3H": beginning-of-line
-"\2331;3F": end-of-line
-"\2331;4H": beginning-of-line
-"\2331;4F": end-of-line
-"\2331;5H": beginning-of-line
-"\2331;5F": end-of-line
-"\2331;6H": beginning-of-line
-"\2331;6F": end-of-line
-"\2331;7H": beginning-of-line
-"\2331;7F": end-of-line
-"\2331;8H": beginning-of-line
-"\2331;8F": end-of-line
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\2331;2H": beginning-of-line
+# "\2331;2F": end-of-line
+# "\2331;3H": beginning-of-line
+# "\2331;3F": end-of-line
+# "\2331;4H": beginning-of-line
+# "\2331;4F": end-of-line
+# "\2331;5H": beginning-of-line
+# "\2331;5F": end-of-line
+# "\2331;6H": beginning-of-line
+# "\2331;6F": end-of-line
+# "\2331;7H": beginning-of-line
+# "\2331;7F": end-of-line
+# "\2331;8H": beginning-of-line
+# "\2331;8F": end-of-line
"\e[2H": beginning-of-line
"\e[2F": end-of-line
"\e[5H": beginning-of-line
@@ -294,7 +303,8 @@ $if term=xterm
"\eOA": previous-history
"\eOB": next-history
"\eOE": re-read-init-file
-"\217E": re-read-init-file
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\217E": re-read-init-file
"\eO2D": backward-word
"\eO2C": forward-word
"\eO2A": history-search-backward
@@ -385,10 +395,11 @@ $if term=xterm
"\eO1;8Q": undo
"\eO1;8R": ""
"\eO1;8S": kill-line
-"\217P": "\e"
-"\217Q": undo
-"\217R": ""
-"\217S": kill-line
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\217P": "\e"
+# "\217Q": undo
+# "\217R": ""
+# "\217S": kill-line
$endif
$if term=gnome
# or gnome terminal F1 - F4
@@ -418,7 +429,8 @@ $else
"\e[13~": ""
"\e[14~": kill-line
"\e[15~": ""
-"\23315~": ""
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\23315~": ""
$endif
"\e[17~": ""
"\e[18~": ""
@@ -439,23 +451,24 @@ $endif
"\e[34~": ""
"\e[35~": ""
"\e[36~": ""
-"\23317~": ""
-"\23318~": ""
-"\23319~": ""
-"\23320~": ""
-"\23321~": ""
-"\23323~": ""
-"\23324~": ""
-"\23325~": ""
-"\23326~": ""
-"\23328~": ""
-"\23329~": ""
-"\23331~": ""
-"\23332~": ""
-"\23333~": ""
-"\23334~": ""
-"\23335~": ""
-"\23336~": ""
+# [Note: raw C1 chars conflicts with UTF-8]
+# "\23317~": ""
+# "\23318~": ""
+# "\23319~": ""
+# "\23320~": ""
+# "\23321~": ""
+# "\23323~": ""
+# "\23324~": ""
+# "\23325~": ""
+# "\23326~": ""
+# "\23328~": ""
+# "\23329~": ""
+# "\23331~": ""
+# "\23332~": ""
+# "\23333~": ""
+# "\23334~": ""
+# "\23335~": ""
+# "\23336~": ""
$if term=xterm
"\e[1;2P": ""
"\e[1;2Q": ""
@@ -567,25 +580,26 @@ $if term=xterm
"\eOw": "7"
"\eOx": "8"
"\eOy": "9"
-# Operators
-"\217o": "/"
-"\217j": "*"
-"\217m": "-"
-"\217k": "+"
-"\217l": ","
-"\217M": accept-line
-"\217n": "."
-# Numbers
-"\217p": "0"
-"\217q": "1"
-"\217r": "2"
-"\217s": "3"
-"\217t": "4"
-"\217u": "5"
-"\217v": "6"
-"\217w": "7"
-"\217x": "8"
-"\217y": "9"
+# [Note: raw C1 chars conflicts with UTF-8]
+# # Operators
+# "\217o": "/"
+# "\217j": "*"
+# "\217m": "-"
+# "\217k": "+"
+# "\217l": ","
+# "\217M": accept-line
+# "\217n": "."
+# # Numbers
+# "\217p": "0"
+# "\217q": "1"
+# "\217r": "2"
+# "\217s": "3"
+# "\217t": "4"
+# "\217u": "5"
+# "\217v": "6"
+# "\217w": "7"
+# "\217x": "8"
+# "\217y": "9"
$endif
#
$if term=kterm
--
2.26.2

View file

@ -0,0 +1,27 @@
From bf0a31597d0ed3562bfc5e6be0ade2fe5dc1f7a1 Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Thu, 17 Oct 2019 07:19:47 +0200
Subject: [PATCH] Use short TERM name rxvt for rxvt-unicode and
rxvt-unicode-256-color
Signed-off-by: Werner Fink <werner@suse.de>
---
files/etc/inputrc.keys | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git files/etc/inputrc.keys files/etc/inputrc.keys
index 04f1659..6dee148 100644
--- a/files/etc/inputrc.keys
+++ b/files/etc/inputrc.keys
@@ -726,7 +726,7 @@ $if term=mlterm
"\e[24;8~": ""
$endif
#
-$if term=rxvt-unicode
+$if term=rxvt
"\e[23$": ""
"\e[24$": ""
"\e[11^": ""
--
2.26.2

View file

@ -0,0 +1,50 @@
From 78b2a0b29381c16bec6b2a8fc7eabaa9925782d7 Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Wed, 18 May 2022 09:05:45 +0200
Subject: [PATCH] The wrapper rootsh is not a restricted shell
Signed-off-by: Werner Fink <werner@suse.de>
---
files/etc/bash.bashrc | 1 +
1 file changed, 1 insertion(+)
diff --git files/etc/bash.bashrc files/etc/bash.bashrc
index 0cb1ef3..4378a74 100644
--- a/files/etc/bash.bashrc
+++ b/files/etc/bash.bashrc
@@ -56,6 +56,7 @@ if test -z "$is" ; then
#
for a in $SHELL ; do
case "$a" in
+ */rootsh) ;;
*/r*sh)
readonly restricted=true ;;
-r*|-[!-]r*|-[!-][!-]r*)
--
2.26.2
From dc83f4e9c91007d96df2047e44ae3baba102fcfb Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Wed, 18 May 2022 09:18:50 +0200
Subject: [PATCH] Also in /etc/profile, rootsh is not restricted
Signed-off-by: Werner Fink <werner@suse.de>
---
files/etc/profile | 1 +
1 file changed, 1 insertion(+)
diff --git files/etc/profile files/etc/profile
index d392c60..2456ed0 100644
--- a/files/etc/profile
+++ b/files/etc/profile
@@ -48,6 +48,7 @@ if test -f /proc/mounts ; then
#
for a in $SHELL ; do
case "$a" in
+ */rootsh) ;;
*/r*sh)
readonly restricted=true ;;
-r*|-[!-]r*|-[!-][!-]r*)
--
2.26.2

View file

@ -0,0 +1,136 @@
From 056fc66c699a8544c7692a03c905fca568f5390b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Mon, 6 Nov 2023 12:01:16 +0100
Subject: [PATCH] patch alljava.sh and alljava.csh, use the links from update
alternatives
fix the issues from bsc#1107342 and bsc#1215434
diff --git a/files/etc/profile.d/alljava.csh b/files/etc/profile.d/alljava.csh
index 297303c..8c7601a 100644
--- a/files/etc/profile.d/alljava.csh
+++ b/files/etc/profile.d/alljava.csh
@@ -9,39 +9,18 @@
# JDK_HOME, SDK_HOME
#
-foreach JDIR ( "/usr/lib64/jvm" "/usr/lib/jvm" "/usr/java/latest" "/usr/java" )
+if ( -l /etc/alternatives/java ) then
+ set ALTERNATIVES_JAVA_LINK=`realpath /etc/alternatives/java`
+ setenv JRE_HOME $ALTERNATIVES_JAVA_LINK:h:h
+ unset ALTERNATIVES_JAVA_LINK
+endif
+
+if ( -l /etc/alternatives/javac ) then
+ set ALTERNATIVES_JAVAC_LINK=`realpath /etc/alternatives/javac`
+ setenv JAVA_HOME $ALTERNATIVES_JAVAC_LINK:h:h
+ setenv JAVA_HOME $JAVA_HOME/bin
+ setenv JDK_HOME $JAVA_HOME
+ setenv SDK_HOME $JAVA_HOME
+ unset ALTERNATIVES_JAVAC_LINK
+endif
- if ( ! -d $JDIR ) continue
-
- foreach JPATH ( $JDIR $JDIR/java $JDIR/java-[a-z]* $JDIR/java-[0-9]* $JDIR/jre $JDIR/jre-[a-z]* $JDIR/jre-[0-9]* )
-
- if ( ! -d $JPATH ) continue
-
- if ( ! -x $JPATH/bin/java ) continue
-
- setenv JAVA_BINDIR $JPATH/bin
- setenv JAVA_ROOT $JPATH
- setenv JAVA_HOME $JPATH
- unset JDK_HOME
- unset SDK_HOME
-
- switch ( $JPATH )
- case *jre*:
- setenv JRE_HOME $JPATH
- breaksw
- default:
- if ( -x $JPATH/jre/bin/java ) then
- setenv JRE_HOME $JPATH/jre
- else
- setenv JRE_HOME $JPATH
- endif
- # it is development kit=20
- if ( -x $JPATH/bin/javac ) then
- setenv JDK_HOME $JPATH
- setenv SDK_HOME $JPATH
- endif
- endsw
- end
- unset JPATH
-end
-unset JDIR
diff --git a/files/etc/profile.d/alljava.sh b/files/etc/profile.d/alljava.sh
index 3ce34de..78fabee 100644
--- a/files/etc/profile.d/alljava.sh
+++ b/files/etc/profile.d/alljava.sh
@@ -9,51 +9,18 @@
# JDK_HOME, SDK_HOME
#
-for JDIR in /usr/lib64/jvm /usr/lib/jvm /usr/java/latest /usr/java; do
+if test -L /etc/alternatives/java; then
+ ALTERNATIVES_JAVA_LINK=`realpath /etc/alternatives/java`
+ export JRE_HOME=${ALTERNATIVES_JAVA_LINK/\/bin\/java}
+ unset ALTERNATIVES_JAVA_LINK
+fi
+
+if test -L /etc/alternatives/javac; then
+ ALTERNATIVES_JAVAC_LINK=`realpath /etc/alternatives/javac`
+ export JAVA_HOME=${ALTERNATIVES_JAVAC_LINK/\/bin\/javac}
+ export JAVA_BINDIR=$JAVA_HOME/bin
+ export JDK_HOME=$JAVA_HOME
+ export SDK_HOME=$JAVA_HOME
+ unset ALTERNATIVES_JAVAC_LINK
+fi
- if ! test -d $JDIR; then
- continue
- fi
-
- for JPATH in $JDIR $JDIR/java $JDIR/java-[a-z]* $JDIR/java-[0-9]* $JDIR/jre $JDIR/jre-[a-z]* $JDIR/jre-[0-9]*; do
-
- if ! test -d $JPATH; then
- continue
- fi
-
- if ! test -x $JPATH/bin/java; then
- continue
- fi
-
- export JAVA_BINDIR=$JPATH/bin
- export JAVA_ROOT=$JPATH
- export JAVA_HOME=$JPATH
- unset JDK_HOME
- unset SDK_HOME
-
- case "$JPATH" in
- *jre*)
- [ -z "$JRE_HOME" ] && export JRE_HOME=$JPATH
- ;;
-
- *)
- if [ -x $JPATH/jre/bin/java ] ; then
- [ -z "$JRE_HOME" ] && export JRE_HOME=$JPATH/jre
- else
- [ -z "$JRE_HOME" ] && export JRE_HOME=$JPATH
- fi
- # it is development kit
- if [ -x $JPATH/bin/javac ] ; then
- export JDK_HOME=$JPATH
- export SDK_HOME=$JPATH
- unset JPATH
- break 2; # we found a JRE + SDK -- don't look any further
- fi
- ;;
- esac
-
- done
- unset JPATH
-
-done
-unset JDIR