mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-21 17:11:45 +00:00
Upgrade conserver to 8.2.1 version
- Deprecated the patch for sslauthority. - Leverage sslcacertificatefile configuration from upstream. - Apply init script patches from old version. - Changelog and package information for this new version on rhels and ubuntu systems. implement-feature: #18
This commit is contained in:
parent
01bd7d96ff
commit
df41b32ae4
@ -2,32 +2,34 @@ To make the conserver-xcat rpm, run:
|
||||
|
||||
./bldconserver.pl
|
||||
|
||||
To update the initscript.patch or initscript1.patch:
|
||||
The original patches like initscript.patch and initscript1.patch have been
|
||||
replaced with initscript_8.2.1.patch, please follow the steps below to create
|
||||
patch for init script.
|
||||
|
||||
1. Copy conserver-8.1.16.tar.gz to a directory, say /root/conserverstar
|
||||
1. Copy conserver-8.2.1.tar.gz to a directory, say /root/conserverstart
|
||||
mkdir /root/conservertar
|
||||
cp conserver-8.1.16.tar.gz /root/conserverstar
|
||||
cp conserver-8.2.1.tar.gz /root/conserverstart
|
||||
|
||||
2. Copy the initscript.patch or initscript1.patch to the same directory
|
||||
cp initscript.patch /root/conserverstar
|
||||
2. Copy the initscript_8.2.1.patch to the same directory
|
||||
cp initscript_8.2.1.patch /root/conserverstart
|
||||
|
||||
3. Uncompress the conserver-8.1.16.tar.gz into two copies:
|
||||
tar zxvf conserver-8.1.16.tar.gz
|
||||
mv conserver-8.1.16 conserver-8.1.16-diffinit
|
||||
tar zxvf conserver-8.1.16.tar.gz
|
||||
3. Uncompress the conserver-8.2.1.tar.gz into two copies:
|
||||
tar zxvf conserver-8.2.1.tar.gz
|
||||
mv conserver-8.2.1 conserver-8.2.1-diffinit
|
||||
tar zxvf conserver-8.2.1.tar.gz
|
||||
|
||||
4. Patch the conserver.init with the original patch copied from SVN repository
|
||||
4. Patch the conserver.init with the original patch copied from Git repository
|
||||
cd /root/conservertar
|
||||
cat initscript.patch | /usr/bin/patch -s -p1 --fuzz=0
|
||||
select conserver-8.1.16-diffinit/contrib/redhat-rpm/conserver.init as the file to patch
|
||||
cat initscript_8.2.1.patch | /usr/bin/patch -s -p1 --fuzz=0
|
||||
select conserver-8.2.1-diffinit/contrib/redhat-rpm/conserver.init as the file to patch
|
||||
|
||||
5. Update the conserver-8.1.16-diffinit/contrib/redhat-rpm/conserver.init with whatever changes that are needed
|
||||
5. Update the conserver-8.2.1-diffinit/contrib/redhat-rpm/conserver.init with whatever changes that are needed
|
||||
|
||||
6. Generate the new patch:
|
||||
cd /root/conserverstart
|
||||
diff -ruN conserver-8.1.16/contrib/redhat-rpm/conserver.init conserver-8.1.16-diffinit/contrib/redhat-rpm/conserver.init > initscript.patch
|
||||
diff -ruN conserver-8.2.1/contrib/redhat-rpm/conserver.init conserver-8.2.1-diffinit/contrib/redhat-rpm/conserver.init > initscript_8.2.1.patch
|
||||
|
||||
7. Copy the new patch to the xcat-dep SVN repository and checkin
|
||||
cp initscript.patch ~/xcat/xcat-dep/trunk/conserver/
|
||||
cd ~/xcat/xcat-dep/trunk/conserver/
|
||||
svn commit -m "blah blah blah"
|
||||
7. Copy the new patch to the xcat-dep Git repository and checkin
|
||||
cp initscript_8.2.1.patch ~/xcat/xcat-dep/conserver/
|
||||
cd ~/xcat/xcat-dep/conserver/
|
||||
git commit -m "blah blah blah"
|
||||
|
@ -35,12 +35,9 @@ print "The build env is: $os-$arch\n";
|
||||
# check the source files
|
||||
my $pwd = `pwd`;
|
||||
chomp($pwd);
|
||||
if ( (! -f "$pwd/conserver-8.1.16.tar.gz")
|
||||
if ( (! -f "$pwd/conserver-8.2.1.tar.gz")
|
||||
|| (! -f "$pwd/conserver.spec")
|
||||
|| (! -f "$pwd/certificate-auth.patch")
|
||||
|| (! -f "$pwd/initscript.patch")
|
||||
|| (! -f "$pwd/initscript1.patch")
|
||||
|| (! -f "$pwd/segfault-sslopt.patch")) {
|
||||
|| (! -f "$pwd/initscript_8.2.1.patch")) {
|
||||
print "missed some necessary files for building.\n";
|
||||
exit 1;
|
||||
}
|
||||
@ -54,10 +51,10 @@ if ($os eq "rh5") {
|
||||
$blddir = "/usr/src/packages";
|
||||
}
|
||||
|
||||
#&runcmd("mkdir -p $blddir/SOURCES");
|
||||
#&runcmd("mkdir -p $blddir/SPECS");
|
||||
#&runcmd("mkdir -p $blddir/BUILD");
|
||||
#&runcmd("mkdir -p $blddir/RPMS");
|
||||
&runcmd("mkdir -p $blddir/SOURCES");
|
||||
&runcmd("mkdir -p $blddir/SPECS");
|
||||
&runcmd("mkdir -p $blddir/BUILD");
|
||||
&runcmd("mkdir -p $blddir/RPMS");
|
||||
|
||||
# clean the env
|
||||
$cmd = "rm -rf $blddir/SOURCES/conserver*";
|
||||
@ -70,7 +67,7 @@ $cmd = "rm -rf $blddir/RPMS/$arch/conserver*";
|
||||
&runcmd($cmd);
|
||||
|
||||
# copy the build files
|
||||
$cmd = "cp -rf ./conserver-8.1.16.tar.gz $blddir/SOURCES/";
|
||||
$cmd = "cp -rf ./conserver-8.2.1.tar.gz $blddir/SOURCES/";
|
||||
&runcmd($cmd);
|
||||
|
||||
$cmd = "cp -rf ./*.patch $blddir/SOURCES/";
|
||||
@ -82,7 +79,7 @@ $cmd = "cp -rf ./conserver.spec $blddir/SPECS/";
|
||||
$cmd = "rpmbuild -bb $blddir/SPECS/conserver.spec";
|
||||
&runcmd($cmd);
|
||||
|
||||
my $objrpm = "$blddir/RPMS/$arch/conserver-xcat-8.1.16-10.$arch.rpm";
|
||||
my $objrpm = "$blddir/RPMS/$arch/conserver-xcat-8.2.1-1.$arch.rpm";
|
||||
my $dstdir = "/tmp/build/$os/$arch";
|
||||
|
||||
# check the build result
|
||||
|
BIN
conserver/conserver-8.2.1.tar.gz
Normal file
BIN
conserver/conserver-8.2.1.tar.gz
Normal file
Binary file not shown.
@ -4,14 +4,14 @@
|
||||
#
|
||||
|
||||
%define pkg conserver
|
||||
%define ver 8.1.16
|
||||
%define ver 8.2.1
|
||||
|
||||
# define the name of the machine on which the main conserver
|
||||
# daemon will be running if you don't want to use the default
|
||||
# hostname (console)
|
||||
%define master console
|
||||
|
||||
%define distver 10
|
||||
%define distver 1
|
||||
|
||||
Summary: Serial console server daemon/client
|
||||
Name: %{pkg}-xcat
|
||||
@ -21,10 +21,7 @@ License: BSD
|
||||
Group: System Environment/Daemons
|
||||
URL: http://www.conserver.com/
|
||||
Source: http://www.conserver.com/%{pkg}-%{ver}.tar.gz
|
||||
Patch: certificate-auth.patch
|
||||
Patch1: initscript.patch
|
||||
Patch2: initscript1.patch
|
||||
Patch3: segfault-sslopt.patch
|
||||
Patch: initscript_8.2.1.patch
|
||||
BuildRoot: %{_tmppath}/%{pkg}-buildroot
|
||||
BuildRequires: openssl-devel
|
||||
Prefix: %{_prefix}
|
||||
@ -43,9 +40,6 @@ bells and whistles to accentuate that basic functionality.
|
||||
%{__rm} -rf %{buildroot}
|
||||
%setup -n %{pkg}-%{ver}
|
||||
%patch -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
|
||||
%build
|
||||
|
@ -1,3 +1,9 @@
|
||||
conserver-xcat (8.2.1-1) unstable; urgency=low
|
||||
|
||||
* Upgrade to 8.2.1 version
|
||||
|
||||
-- chenglch <chenglch@cn.ibm.com> Wed, 07 Jun 2017 18:05:49 -0500
|
||||
|
||||
conserver-xcat (8.1.16-3) unstable; urgency=low
|
||||
|
||||
* Changed to conserver-xcat package
|
||||
|
1
conserver/debian/patches/initscript_8.2.1.patch
Symbolic link
1
conserver/debian/patches/initscript_8.2.1.patch
Symbolic link
@ -0,0 +1 @@
|
||||
../../initscript_8.2.1.patch
|
@ -1,4 +1 @@
|
||||
certificate-auth.patch
|
||||
initscript.patch
|
||||
initscript1.patch
|
||||
segfault-sslopt.patch
|
||||
initscript_8.2.1.patch
|
161
conserver/initscript_8.2.1.patch
Normal file
161
conserver/initscript_8.2.1.patch
Normal file
@ -0,0 +1,161 @@
|
||||
--- conserver-8.2.1_orig/contrib/redhat-rpm/conserver.init 2009-10-08 06:59:58.000000000 +0800
|
||||
+++ conserver-8.2.1/contrib/redhat-rpm/conserver.init 2017-06-07 15:35:57.000000000 +0800
|
||||
@@ -7,66 +7,115 @@
|
||||
# config: /etc/conserver.cf
|
||||
#
|
||||
|
||||
-DAEMON=/usr/sbin/conserver
|
||||
+### BEGIN INIT INFO
|
||||
+# Provides: conserver
|
||||
+# Required-Start:
|
||||
+# Required-Stop:
|
||||
+# Default-Start: 2 3 4 5
|
||||
+# Default-stop:
|
||||
+# Short-Description: conserver
|
||||
+# Description: Console server
|
||||
+### END INIT INFO
|
||||
|
||||
-# Source function library.
|
||||
-. /etc/rc.d/init.d/functions
|
||||
-
|
||||
-# Source networking configuration.
|
||||
-. /etc/sysconfig/network
|
||||
+RHPassed()
|
||||
+{
|
||||
+ passed
|
||||
+ echo
|
||||
+}
|
||||
+RHSuccess()
|
||||
+{
|
||||
+ success
|
||||
+ echo
|
||||
+}
|
||||
+RHFailure()
|
||||
+{
|
||||
+ failure
|
||||
+ echo
|
||||
+}
|
||||
+MStatus()
|
||||
+{
|
||||
+ ps ax|grep -v grep|grep /usr/sbin/conserver >& /dev/null
|
||||
+ if [ "$?" = "0" ]; then
|
||||
+ RVAL=0
|
||||
+ echo "conserver is running"
|
||||
+ else
|
||||
+ RVAL=3
|
||||
+ echo "consever is not running"
|
||||
+ fi
|
||||
+ return $RVAL
|
||||
+}
|
||||
|
||||
-# Source defaults
|
||||
-. /etc/default/conserver
|
||||
|
||||
-# Check that networking is up.
|
||||
-[ ${NETWORKING} = "no" ] && exit 0
|
||||
+# Source function library.
|
||||
+if [ -f /etc/rc.d/init.d/functions ]; then
|
||||
+ . /etc/rc.d/init.d/functions
|
||||
+ DAEMON=daemon
|
||||
+ SUCCESS=RHSuccess
|
||||
+ FAILURE=RHFailure
|
||||
+ PASSED=RHPassed
|
||||
+ STATUS=status
|
||||
+elif [ -f /lib/lsb/init-functions ]; then
|
||||
+ . /lib/lsb/init-functions
|
||||
+ DAEMON=start_daemon
|
||||
+ SUCCESS=log_success_msg
|
||||
+ FAILURE=log_failure_msg
|
||||
+ PASSED=log_warning_msg
|
||||
+ STATUS=MStatus
|
||||
+else
|
||||
+ echo "Error, not RedHat and not lsb, do not know how to run this platform"
|
||||
+fi
|
||||
|
||||
# make sure conserver is installed and executable
|
||||
-[ -x $DAEMON ] || exit 1
|
||||
+[ -x /usr/sbin/conserver ] || exit 1
|
||||
|
||||
|
||||
-start()
|
||||
-{
|
||||
- echo -n "Starting conserver: "
|
||||
- daemon --user "${RUNAS-}" $DAEMON ${OPTIONS--d}
|
||||
- RETVAL=$?
|
||||
- [ "$RETVAL" = 0 ] && touch /var/lock/subsys/conserver
|
||||
- echo
|
||||
-}
|
||||
-
|
||||
-stop()
|
||||
-{
|
||||
- echo -n "Shutting down conserver: "
|
||||
- killproc conserver
|
||||
- RETVAL=$?
|
||||
- [ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/conserver
|
||||
- echo
|
||||
-}
|
||||
-
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
- start
|
||||
+ echo -n "Starting conserver: "
|
||||
+ $DAEMON /usr/sbin/conserver -o -O1 -d
|
||||
+ touch /var/lock/subsys/conserver
|
||||
+ $STATUS conserver >& /dev/null
|
||||
+ if [ "$?" != "0" ]; then
|
||||
+ $FAILURE
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ $SUCCESS
|
||||
;;
|
||||
stop)
|
||||
- stop
|
||||
+ $STATUS conserver >& /dev/null
|
||||
+ if [ "$?" != "0" ]; then
|
||||
+ echo -n "conserver not running, not stopping "
|
||||
+ $PASSED
|
||||
+ exit 0
|
||||
+ fi
|
||||
+ echo -n "Shutting down conserver: "
|
||||
+ killproc conserver
|
||||
+ rm -f /var/lock/subsys/conserver
|
||||
+ $STATUS conserver >& /dev/null
|
||||
+ if [ "$?" == "0" ]; then
|
||||
+ $FAILURE
|
||||
+ exit 1
|
||||
+ fi
|
||||
+ $SUCCESS
|
||||
;;
|
||||
status)
|
||||
- status conserver
|
||||
+ $STATUS conserver
|
||||
+ exit $?
|
||||
;;
|
||||
restart)
|
||||
- stop
|
||||
- start
|
||||
- ;;
|
||||
- reload)
|
||||
- echo -n "Reloading conserver: "
|
||||
- killproc conserver -HUP
|
||||
- RETVAL=$?
|
||||
- echo
|
||||
+ $STATUS conserver >& /dev/null
|
||||
+ if [ "$?" != "0" ]; then
|
||||
+ exec $0 start
|
||||
+ else
|
||||
+ echo -n "Restarting conserver: "
|
||||
+ killproc conserver -HUP
|
||||
+ fi
|
||||
+ $SUCCESS
|
||||
;;
|
||||
*)
|
||||
- echo "Usage: conserver {start|stop|restart|reload|status}"
|
||||
- RETVAL=1
|
||||
+ echo "Usage: conserver {start|stop|restart|status}"
|
||||
+ exit 1
|
||||
esac
|
||||
|
||||
-exit $RETVAL
|
||||
+exit 0
|
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
tar xvfz conserver-8.1.16.tar.gz
|
||||
cd conserver-8.1.16
|
||||
tar xvfz conserver-8.2.1.tar.gz
|
||||
cd conserver-8.2.1
|
||||
cp -rL ../debian .
|
||||
dpkg-buildpackage -uc -us
|
||||
cd -
|
||||
rm -rf conserver-8.1.16
|
||||
rm -rf conserver-8.2.1
|
||||
|
Loading…
Reference in New Issue
Block a user