integ/base/lshell/centos/meta_patches/spec-include-TiS-changes.patch
Scott Little 49a7df7cb9 Shorten "addons/wr-cgcs/layers/cgcs" to just "stx"
Part of the project to remove cgcs references.
Replace and shorten the path the needlessly long and
complex "addons/wr-cgcs/layers/cgcs" path with just "stx".

This update just fixes up paths found in scripts, comments
and config files.

Depends-On: https://review.openstack.org/579954
Depends-On: https://review.openstack.org/579957
Depends-On: https://review.openstack.org/580170
Depends-On: https://review.openstack.org/579963
Change-Id: I6dd6111c49c2591d186b4174216cba44a9d512fb
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-07-04 10:46:49 -04:00

88 lines
2.8 KiB
Diff

lshell.spec: to include Titanium Cloud changes
To include the Titanium Cloud specific changes from:
stx/stx-integ/base/lshell
diff -u b/SPECS/lshell.spec b/SPECS/lshell.spec
--- b/SPECS/lshell.spec
+++ b/SPECS/lshell.spec
@@ -1,3 +1,5 @@
+%define WRSROOT_P cBglipPpsKwBQ
+
Name: lshell
Version: 0.9.16
Release: 5%{?dist}
@@ -6,6 +8,15 @@
License: GPLv3+
URL: https://github.com/ghantoos/lshell
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Source1: cgcs_cli
+Source2: lshell.conf
+Source3: wrs.sudo
+Source4: lshell_env_setup
+Patch1: lshell_cgcs.patch
+Patch2: lshell-source-support.patch
+Patch3: lshell-prompt-change-support.patch
+Patch4: lshell-newline-escape-character-support.patch
+Patch5: lshell-shell-escape-check.patch
BuildArch: noarch
BuildRequires: python2-devel
@@ -20,6 +31,11 @@
%setup -q
#Fix permission
chmod -x CHANGES
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
%build
%{__python2} setup.py build
@@ -27,10 +43,25 @@
%install
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
# Doc files at the wrong place
-rm %{buildroot}%{_defaultdocdir}/lshell/{CHANGES,COPYING,README}
+rm -f %{buildroot}%{_defaultdocdir}/lshell/{CHANGES,COPYING,README}
+mkdir -p ${RPM_BUILD_ROOT}/usr/local/bin
+install -m 755 ${RPM_SOURCE_DIR}/cgcs_cli ${RPM_BUILD_ROOT}/usr/local/bin/cgcs_cli
+install -m 755 ${RPM_SOURCE_DIR}/lshell_env_setup ${RPM_BUILD_ROOT}/usr/local/bin/lshell_env_setup
+install -d ${RPM_BUILD_ROOT}/etc
+install -m 644 ${RPM_SOURCE_DIR}/lshell.conf ${RPM_BUILD_ROOT}/etc/lshell.conf
+install -d ${RPM_BUILD_ROOT}/etc/sudoers.d
+cp ${RPM_SOURCE_DIR}/wrs.sudo wrs.sudo
+echo 'Defaults passprompt="Password: "' >> wrs.sudo
+install -m 440 wrs.sudo ${RPM_BUILD_ROOT}/etc/sudoers.d/wrs
%pre
getent group lshell >/dev/null || groupadd -r lshell
+getent group wrs >/dev/null || groupadd -r wrs
+getent group wrs_protected >/dev/null || groupadd -f -g 345 wrs_protected
+getent passwd wrsroot > /dev/null || \
+useradd -m -g wrs -G root,wrs_protected \
+ -d /home/wrsroot -p %{WRSROOT_P} \
+ -s /bin/sh wrsroot 2> /dev/null || :
%post
grep -q '^%{_bindir}/%{name}$' %{_sysconfdir}/shells || \
@@ -42,13 +73,13 @@
fi
%files
-%doc CHANGES COPYING README
-%{_mandir}/man*/*.*
%{_bindir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}.conf
-%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
+%config(noreplace) %{_sysconfdir}/sudoers.d/wrs
%{python_sitelib}/lshell/
%{python_sitelib}/%{name}*.egg-info
+/usr/local/bin/cgcs_cli
+/usr/local/bin/lshell_env_setup
%changelog
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.16-5