Compare commits

30 Commits

Author SHA256 Message Date
d4800e90ef - version 1.8
- disable screen and colon command in example cscreenrc
- reduce the default nice level to 3 for entire screen session
- provide sol-via-impi.sh and sol-via-ssh.sh

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=49
2024-03-18 22:09:45 +00:00
a89b09eab4 - version 1.7
- screen uses select(2), which is limited to FD_SETSIZE open file descriptors

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=47
2024-03-14 19:06:32 +00:00
76cd0c9f04 A cscreen-1.6.tar.xz
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=45
2024-03-08 16:05:28 +00:00
f10bbfff84 - version 1.6
- Fix sysusers.d usage to make system-user-cscreen installable
- Remove pre-systemd support

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=44
2024-03-08 16:02:21 +00:00
1226f6524e - version 1.5
- Create system-user-cscreen
- add example for virsh console (bsc#1213936)

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=42
2024-02-05 22:49:18 +00:00
0cd93c2282 - version 1.4
- remove braces from rpm macros
- expand %name in rpm specfile for some files
- Include new tmpfile in files section

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=40
2022-03-09 14:33:27 +00:00
bbf1de33fa typo
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=39
2022-03-09 13:19:55 +00:00
916dfa917c -cscreen-1.2.tar.xz
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=38
2022-03-09 13:19:39 +00:00
1623b2e48f baserev update by copy to link target
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=37
2022-03-09 13:14:55 +00:00
c4873cc2bf - version 1.2
- fix default logtstamp string

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=35
2021-09-27 13:57:52 +00:00
a1f50628bb - version 1.1
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=33
2021-04-21 12:44:02 +00:00
2e76d383cd own entire _datadir
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=32
2021-04-21 12:16:37 +00:00
d5f93d529f - set hard status in cscreenrc example
- use wrapper script for shell/SHELL
- fix screen execution

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=31
2021-04-21 12:12:29 +00:00
49dbd6f67b - version 0.10
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=30
2021-04-20 13:58:43 +00:00
6958306b9d fix
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=29
2021-04-20 11:54:20 +00:00
8a420fdbca - start cscreen earlier by ordering it right after local-fs.target
- add zombie_timeout to default cscreenrc
- adjust Requires for scriptlets
- package cscreen-rpmlintrc
- Set LimitNOFILE= to compensate for lack of SCREEN_FILE_LIMIT
- use fillup and sysconfig only with sysv
- fillup file should be owned by root
- use DISABLE_RESTART_ON_UPDATE also with sysv
- %license macro does not work reliably in 13.2
- check if rpm macro has_systemd exists
- own suders.d if needed
- use name macro consistently
- remove Requires for apparently unused mailx

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=28
2021-04-20 11:51:05 +00:00
231fb084f5 - version 0.9
- use screen variable in cscreen script
- use SCREEN_OWNER in cscreen script
- use SCREENRC variable consistently
- use SCREEN_NAME variable consistently
- remove leading slash from sysv SCREEN_NAME
- move defscrollback to SCREEN_HISTORY
- Pass more characters to the remote system (bsc#1162835).
- Get rid of /etc/sudoers.d directory to avoid file conflicts at install time

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=27
2021-04-20 10:25:19 +00:00
ee2cb305d1 sync with github
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=25
2020-09-18 07:03:19 +00:00
a5a64c6694 service_del_postun_without_restart is new, stay compatible
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=24
2020-09-18 06:51:23 +00:00
cab2f2a8ec Accepting request 835137 from home:fbui:branches:systemsmanagement
- Make use of %service_del_postun_without_restart
  And stop using DISABLE_RESTART_ON_UPDATE as this interface is
  obsolete.

OBS-URL: https://build.opensuse.org/request/show/835137
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=23
2020-09-18 06:48:20 +00:00
bc16b82510 - version 0.8
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=21
2020-08-27 10:28:51 +00:00
6b143a3039 use git tag as rpm version number
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=20
2020-08-27 10:07:41 +00:00
1f8a4c8048 - Fix shell syntax in FORCE_UPDATE test
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=19
2020-08-27 09:57:59 +00:00
0061fee891 - add defattr
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=18
2020-08-26 16:22:01 +00:00
efa8583fbc - Wrap %license
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=17
2020-08-26 16:18:22 +00:00
8d2d7b9a5b - add BuildRoot
- Move lock file from /etc/cscreenrc_allow_update to /dev/shm/.cscreenrc_allow_update

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=16
2020-08-26 16:14:42 +00:00
7bc71f840c - Set DISABLE_RESTART_ON_UPDATE=yes
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=15
2020-08-25 10:44:46 +00:00
d039b7adde - carry permissions of sudoers.d content
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=14
2020-08-25 10:26:45 +00:00
e54b4753ec - Remove BuildRequires screen and sudo
- Add hint how to use SCREEN_OWNER with systemd
- Adjust default username in sysv rccscreen
- Adjust comment in cscreen to refer to default username
- mark sudoers as config to preserve local modifications
- Use correct user _cscreen for logrotate.conf
- Add execute permissions to /var/log/screen

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=13
2020-08-25 10:14:26 +00:00
b5b1190e71 Accepting request 828991 from home:olh:branches:systemsmanagement
- Adjust permissions for ~_cscreen

OBS-URL: https://build.opensuse.org/request/show/828991
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cscreen?expand=0&rev=11
2020-08-24 16:18:39 +00:00
6 changed files with 214 additions and 102 deletions

View File

@@ -1,9 +1,11 @@
<services>
<service mode="disabled" name="obs_scm">
<param name="url">git://github.com/openSUSE/cscreen.git</param>
<param name="url">https://github.com/openSUSE/cscreen.git</param>
<param name="scm">git</param>
<param name="revision">master</param>
<param name="versionformat">0.7</param>
<param name="revision">161c01c01ee4103fd5be1b31c211307e2a016092</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">[v]?([^\+]+)(.*)</param>
<param name="versionrewrite-replacement">\1</param>
<param name="extract">cscreen.spec</param>
<param name="extract">cscreen-rpmlintrc</param>
</service>

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3bbbf10a0d382b2d615d1a5f3df23b731a4014d42c3ebda57cfd76be50617ab6
size 18120

3
cscreen-1.8.tar.xz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3db67afcb718cd6aa2b3360f99a9de3c0a43944199597ba14db0902ea1339fb
size 7900

3
cscreen-rpmlintrc Normal file
View File

@@ -0,0 +1,3 @@
addFilter('suse-logrotate-user-writable-log-dir')
addFilter('non-conffile-in-etc')
addFilter('hidden-file-or-dir')

View File

@@ -1,3 +1,118 @@
-------------------------------------------------------------------
Mon Mar 18 18:18:18 UTC 2024 - olaf@aepfle.de
- version 1.8
- disable screen and colon command in example cscreenrc
- reduce the default nice level to 3 for entire screen session
- provide sol-via-impi.sh and sol-via-ssh.sh
-------------------------------------------------------------------
Thu Mar 14 14:14:14 UTC 2024 - olaf@aepfle.de
- version 1.7
- screen uses select(2), which is limited to FD_SETSIZE open file descriptors
-------------------------------------------------------------------
Fri Mar 8 16:00:49 UTC 2024 - olaf@aepfle.de
- version 1.6
- Fix sysusers.d usage to make system-user-cscreen installable
- Remove pre-systemd support
-------------------------------------------------------------------
Mon Feb 5 05:05:05 UTC 2024 - olaf@aepfle.de
- version 1.5
- Create system-user-cscreen
- add example for virsh console (bsc#1213936)
-------------------------------------------------------------------
Wed Mar 9 14:14:14 UTC 2022 - olaf@aepfle.de
- version 1.4
- remove braces from rpm macros
- expand %name in rpm specfile for some files
- Include new tmpfile in files section
-------------------------------------------------------------------
Wed Mar 9 13:13:13 UTC 2022 - olaf@aepfle.de
- version 1.3
- restrict usage of cscreen to a trusted set of users (bsc#1196451, CVE-2022-21946)
- remove usage of fixed path /tmp/cscreen.debug (bsc#1196446, CVE-2022-21945)
-------------------------------------------------------------------
Mon Sep 27 13:48:15 UTC 2021 - olaf@aepfle.de
- version 1.2
- fix default logtstamp string
-------------------------------------------------------------------
Wed Apr 21 12:13:14 UTC 2021 - olaf@aepfle.de
- version 1.1
- set hard status in cscreenrc example
- use wrapper script for shell/SHELL
- fix screen execution
-------------------------------------------------------------------
Tue Apr 20 10:20:30 UTC 2021 - olaf@aepfle.de
- version 1.0
- start cscreen earlier by ordering it right after local-fs.target
- add zombie_timeout to default cscreenrc
- adjust Requires for scriptlets
- package cscreen-rpmlintrc
- Set LimitNOFILE= to compensate for lack of SCREEN_FILE_LIMIT
- use fillup and sysconfig only with sysv
- fillup file should be owned by root
- use DISABLE_RESTART_ON_UPDATE also with sysv
- %license macro does not work reliably in 13.2
- check if rpm macro has_systemd exists
- own suders.d if needed
- use name macro consistently
- remove Requires for apparently unused mailx
- use screen variable in cscreen script
- use SCREEN_OWNER in cscreen script
- use SCREENRC variable consistently
- use SCREEN_NAME variable consistently
- remove leading slash from sysv SCREEN_NAME
- move defscrollback to SCREEN_HISTORY
- Pass more characters to the remote system (bsc#1162835).
- Get rid of /etc/sudoers.d directory to avoid file conflicts at install time
-------------------------------------------------------------------
Fri Sep 11 18:25:10 UTC 2020 - Franck Bui <fbui@suse.com>
- Make use of %service_del_postun_without_restart
And stop using DISABLE_RESTART_ON_UPDATE as this interface is
obsolete.
-------------------------------------------------------------------
Tue Aug 25 10:10:10 UTC 2020 - olaf@aepfle.de
- version 0.8
- Fix shell syntax in FORCE_UPDATE test
- add defattr
- Wrap %license
- add BuildRoot
- Move lock file from /etc/cscreenrc_allow_update to /dev/shm/.cscreenrc_allow_update
- Set DISABLE_RESTART_ON_UPDATE=yes
- carry permissions of sudoers.d content
- Remove BuildRequires screen and sudo
- Add hint how to use SCREEN_OWNER with systemd
- Adjust default username in sysv rccscreen
- Adjust comment in cscreen to refer to default username
- mark sudoers as config to preserve local modifications
- Use correct user _cscreen for logrotate.conf
- Add execute permissions to /var/log/screen
-------------------------------------------------------------------
Mon Aug 24 15:15:15 UTC 2020 - olaf@aepfle.de
- Adjust permissions for ~_cscreen
-------------------------------------------------------------------
Wed Jun 10 09:45:43 UTC 2020 - Thomas Renninger <trenn@suse.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package cscreen
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,142 +16,134 @@
#
%define GROUPNAME _cscreen
%define USERNAME _cscreen
%define HOMEDIR %{_localstatedir}/lib/cscreen
%if ! %{defined _fillupdir}
%define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif
%if 0%{?suse_version} > 1210
%define has_systemd 1
BuildRequires: pkgconfig(systemd)
%{?systemd_ordering}
%else
%define has_systemd 0
Requires(pre): %insserv_prereq
%endif
%define HOMEDIR %_localstatedir/lib/cscreen
Name: cscreen
Version: 0.7
Version: 1.8
Release: 0
Summary: Console screen
License: BSD-4-Clause
Group: System/Management
URL: https://github.com/openSUSE/cscreen
Source: %{name}-%{version}.tar.xz
BuildRequires: screen
Source: %name-%version.tar.xz
Source1: %name-rpmlintrc
BuildRequires: sudo
Recommends: logrotate
Requires: mailx
Requires: screen
Requires: sudo
Requires(postun): /usr/bin/rm
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: %fillup_prereq
PreReq: shadow
Requires(postun): coreutils
BuildRequires: pkgconfig(systemd)
BuildRequires: sysuser-tools
Requires(pre): system-user-%name = %version-%release
%{?systemd_ordering}
BuildArch: noarch
%description
This package allows to run multiple consoles in one 'screen' and
to start the screen automatically during boot.
%package -n system-user-%name
Summary: System user %USERNAME
%if 0%{?suse_version} > 1320
Requires(pre): group(dialout)
Requires(pre): group(tty)
%endif
%?sysusers_requires
%description -n system-user-%name
System user %USERNAME
%prep
%setup
%autosetup -p1
#
%build
#
%install
mkdir -p %{buildroot}/%{_sbindir}
> %name.files
if ! test -d %_sysconfdir/sudoers.d
then
echo '%%dir %_sysconfdir/sudoers.d' >> %name.files
fi
mkdir -p %buildroot/%_sbindir
%if %{?has_systemd}
install -Dm644 systemd/cscreen.service %{buildroot}/%{_unitdir}/%{name}d.service
pushd %{buildroot}/%{_sbindir}
ln -sf service %{buildroot}%{_sbindir}/rc%{name}d
install -Dm644 cscreen.service %buildroot/%_unitdir/cscreend.service
pushd %buildroot/%_sbindir
ln -sf service %buildroot%_sbindir/rccscreend
popd
%else
install -Dm755 systemd/cscreen.init %{buildroot}/%{_sysconfdir}/init.d/cscreend
pushd %{buildroot}/%{_sbindir}
ln -s %{_sysconfdir}/init.d/%{name}d rc%{name}d
popd
%endif
mkdir -vp %buildroot%_tmpfilesdir
tee %buildroot%_tmpfilesdir/%name.conf <<'_EOF_'
d %_rundir/%name 0750 %USERNAME %USERNAME -
_EOF_
suc='system-user-%name.conf'
tee "${suc}" <<'_EOC_'
u %USERNAME - "cscreen daemon user" %HOMEDIR /bin/bash
m %USERNAME dialout
m %USERNAME tty
_EOC_
mkdir -p '%buildroot%_sysusersdir'
cp -avLt "$_" "${suc}"
%sysusers_generate_pre "${suc}" system-user-%name
install -Dm640 configs/%{name}.config %{buildroot}/%{_sysconfdir}/%{name}rc
install -Dm644 configs/%{name}.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
install -Dm644 configs/%{name}.sudoers %{buildroot}%{_sysconfdir}/sudoers.d/cscreen
install -Dm644 configs/%{name}.sysconfig %{buildroot}/%{_fillupdir}/sysconfig.%{name}
install -Dm755 src/%{name} %{buildroot}/%{_bindir}/%{name}
install -Dm755 src/%{name}_update_config.sh %{buildroot}/%{_bindir}/cscreen_update_config.sh
mkdir -p %{buildroot}%{_localstatedir}/log/screen/old
mkdir -pm770 %{buildroot}/%{HOMEDIR}
mkdir -pm700 %{buildroot}/%{HOMEDIR}/.ssh
install -Dm640 configs/cscreen.config %buildroot/%_sysconfdir/cscreenrc
install -Dm644 configs/cscreen.logrotate %buildroot/%_sysconfdir/logrotate.d/%name
install -Dm644 configs/cscreen.sudoers %buildroot%_sysconfdir/sudoers.d/%name
install -Dm755 src/cscreen-shell %buildroot/%_datadir/%name/cscreen-shell
install -Dm555 src/sol-via-ipmi.sh %buildroot/%_datadir/%name/sol-via-ipmi.sh
install -Dm555 src/sol-via-ssh.sh %buildroot/%_datadir/%name/sol-via-ssh.sh
install -Dm755 src/cscreen %buildroot/%_bindir/%name
install -Dm755 src/cscreen_update_config.sh %buildroot/%_bindir/cscreen_update_config.sh
mkdir -p %buildroot%_localstatedir/log/screen/old
mkdir -pm700 %buildroot/%HOMEDIR
mkdir -pm700 %buildroot/%HOMEDIR/.ssh
%pre
%if %{?has_systemd}
%service_add_pre %{name}d.service
%endif
getent group %{GROUPNAME} >/dev/null || groupadd -r %{GROUPNAME}
if getent group tty >/dev/null;then
TTY_GROUP="-G tty"
if getent group dialout >/dev/null;then
TTY_GROUP="$TTY_GROUP,dialout"
fi
else
TTY_GROUP=""
echo "WARNING: Could not find tty group"
fi
getent passwd %{USERNAME} >/dev/null || \
useradd -r -g %{GROUPNAME} -d %{HOMEDIR} -s /bin/bash \
-c "cscreen daemon user" %{USERNAME} $TTY_GROUP
%service_add_pre cscreend.service
%post
%if %{?has_systemd}
%service_add_post %{name}d.service
%else
%{fillup_and_insserv %{name}d }
%endif
%fillup_only %{name}
%service_add_post cscreend.service
%tmpfiles_create %_tmpfilesdir/%name.conf
%preun
%if %{?has_systemd}
%service_del_preun %{name}d.service
%else
%stop_on_removal %{name}d
%endif
%service_del_preun cscreend.service
%postun
%if %{?has_systemd}
%service_del_postun %{name}d.service
%if %{defined service_del_postun_without_restart}
%service_del_postun_without_restart cscreend.service
%else
%restart_on_update %{name}d
%insserv_cleanup
DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun cscreend.service
%endif
if [ -d /run/uscreens/S-cscreen ];then
if [ -d %_rundir/uscreens/S-cscreen ];then
if [ "$1" = "0" ];then
# Only delete on uninstall
rm -rf /run/uscreens/S-cscreen
rm -rf %_rundir/uscreens/S-cscreen
fi
fi
%files
%doc docs/motd_example
%license License
%{_bindir}/%{name}
%{_bindir}/cscreen_update_config.sh
%if %{?has_systemd}
%{_unitdir}/cscreend.service
%else
%{_sysconfdir}/init.d/cscreend
%endif
%{_sbindir}/rc%{name}d
%pre -n system-user-%name -f system-user-%name.pre
%files -n system-user-%name
%_sysusersdir/*.conf
%{_sysconfdir}/sudoers.d/cscreen
%attr(644,%{USERNAME}, %{GROUPNAME}) %dir %{_localstatedir}/log/screen
%attr(644,%{USERNAME}, %{GROUPNAME}) %dir %{_localstatedir}/log/screen/old
%attr(644,%{USERNAME}, %{GROUPNAME}) %{_fillupdir}/sysconfig.%{name}
%attr(770,%{USERNAME}, %{GROUPNAME}) %dir %{HOMEDIR}
%attr(700,%{USERNAME}, %{GROUPNAME}) %dir %{HOMEDIR}/.ssh
%attr(644,%{USERNAME}, %{GROUPNAME}) %config(noreplace) %{_sysconfdir}/%{name}rc
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%files -f %name.files
%doc README.md
%doc docs/motd_example
%if 0%{?suse_version} > 1320
%license License
%endif
%_bindir/%name
%_bindir/cscreen_update_config.sh
%_datadir/%name
%_tmpfilesdir/%name.conf
%_unitdir/cscreend.service
%_sbindir/rccscreend
%attr(0640,root,root) %config %_sysconfdir/sudoers.d/%name
%attr(755,%{USERNAME}, %{USERNAME}) %dir %_localstatedir/log/screen
%attr(755,%{USERNAME}, %{USERNAME}) %dir %_localstatedir/log/screen/old
%attr(700,%{USERNAME}, %{USERNAME}) %dir %HOMEDIR
%attr(700,%{USERNAME}, %{USERNAME}) %dir %HOMEDIR/.ssh
%attr(644,%{USERNAME}, %{USERNAME}) %config(noreplace) %_sysconfdir/cscreenrc
%config(noreplace) %_sysconfdir/logrotate.d/%name
%changelog