Browse Source

add HP-UX 10.20 support to OpenPKG bootstrap

Ralf S. Engelschall 24 years ago
parent
commit
e9b24d9cfa

+ 8 - 0
openpkg/openpkg.boot

@@ -141,6 +141,14 @@ case $platform in
                ;;
        esac
        ;;
+    *-hpux* )
+       support=maybe
+       case $platform in
+           *-hpux10.20 )
+               support=yes
+               ;;
+       esac
+       ;;
 esac
 case $support in
     yes   ) support="Congratulations: fully supported" ;;

+ 38 - 3
openpkg/openpkg.spec

@@ -269,7 +269,7 @@ Provides:     OpenPKG
   
     #   bootstrap GNU make tool
     ( cd make-%{V_make}
-      CC="${l_cc}" ./configure --disable-nls
+      CC="${l_cc}" ./configure --disable-nls --disable-largefile
       ${l_make}
       (mv make ..; ${l_make} clean || true; mv ../make .)
     )
@@ -803,6 +803,11 @@ Provides:     OpenPKG
                     entry="${user}:*:${ugid}:${ugid}:${realname}:${prefix}:${shell}"
                     update="(PATH=\$PATH:/usr/sbin; mkpasswd /etc/passwd)"
                     ;;
+                HP-UX/* )
+                    file=/etc/passwd
+                    entry="${user}:*:${ugid}:${ugid}:${realname}:${prefix}:${shell}"
+                    update=":"
+                    ;;
             esac
             cp $file $file.old
             (grep -v '^+:' $file.old; echo $entry; grep '^+:' $file.old) >$file
@@ -974,6 +979,27 @@ Provides:     OpenPKG
                     )
                 fi
                 ;;
+            HP-UX/* )
+                if [ ! -f /sbin/init.d/${name} ]; then
+                    #   install transfer script
+                    (   echo "#!/bin/sh"
+                        echo "#"
+                        echo "# ${name} -- startup/shutdown transfer script for ${prefix} OpenPKG hierarchy"
+                        echo "#"
+                        echo "[ ! -f ${prefix}/etc/rc ] && exit 0"
+                        echo "case \$1 in"
+                        echo "    start ) exec ${prefix}/etc/rc all start ;;"
+                        echo "    stop  ) exec ${prefix}/etc/rc all stop  ;;"
+                        echo "esac"
+                    ) >/sbin/init.d/${name}
+                    chmod 755 /sbin/init.d/${name}
+                    #   create corresponding symbolic links
+                    ( cd /sbin
+                      ln -s ../init.d/${name} rc2.d/S900${name}
+                      ln -s ../init.d/${name} rc1.d/K100${name}
+                    )
+                fi
+                ;;
         esac
     fi
 
@@ -997,7 +1023,7 @@ Provides:     OpenPKG
                     ) >>/etc/crontab
                 fi
                 ;;
-            SunOS/5.* | OSF1/V5.* | NetBSD/* )
+            SunOS/5.* | OSF1/V5.* | NetBSD/* | HP-UX/* )
                 exists=`crontab -l | grep "$prefix/etc/rc"`
                 if [ ".$exists" = . ]; then
                     EDITOR=/tmp/vipw.$$
@@ -1100,6 +1126,10 @@ Provides:     OpenPKG
                     grep -v "^${user}:" /etc/passwd.bak >/etc/passwd
                     (PATH="$PATH:/usr/sbin"; mkpasswd /etc/passwd)
                     ;;
+                HP-UX/* )
+                    cp /etc/passwd /etc/passwd.bak
+                    grep -v "^${user}:" /etc/passwd.bak >/etc/passwd
+                    ;;
             esac
             cp /etc/group /etc/group.bak
             grep -v "^${user}:" /etc/group.bak >/etc/group
@@ -1163,6 +1193,11 @@ Provides:     OpenPKG
                 rm -f /sbin/rc3.d/S99${name} >/dev/null 2>&1
                 rm -f /sbin/rc0.d/K00${name} >/dev/null 2>&1
                 ;;
+            HP-UX/* )
+                rm -f /sbin/init.d/${name} >/dev/null 2>&1
+                rm -f /etc/rc2.d/S900${name} >/dev/null 2>&1
+                rm -f /etc/rc1.d/K100${name} >/dev/null 2>&1
+                ;;
         esac
     fi
 
@@ -1182,7 +1217,7 @@ Provides:     OpenPKG
                     >/etc/crontab 
                 fi
                 ;;
-            SunOS/5.* | OSF1/V5.* | NetBSD/* )
+            SunOS/5.* | OSF1/V5.* | NetBSD/* | HP-UX/* )
                 EDITOR=/tmp/vipw.$$
                 VISUAL="$EDITOR"
                 export EDITOR

+ 1 - 1
openpkg/rpm-4.0.2.patch.bugfix

@@ -9,7 +9,7 @@
 ##  'patch' tool to upgrade those files. Each patch snippet is annotated
 ##  with a short description.
 ##
-##  Created on: 21-Sep-2001
+##  Created on: 22-Sep-2001
 ##
 
 +---------------------------------------------------------------------------

+ 13 - 10
openpkg/rpm-4.0.2.patch.feature

@@ -9,7 +9,7 @@
 ##  'patch' tool to upgrade those files. Each patch snippet is annotated
 ##  with a short description.
 ##
-##  Created on: 21-Sep-2001
+##  Created on: 22-Sep-2001
 ##
 
 +---------------------------------------------------------------------------
@@ -186,32 +186,35 @@ Index: build/parseScript.c
 +---------------------------------------------------------------------------
 Index: lib/rpmrc.c
 --- lib/rpmrc.c	2001/03/13 12:55:25	1.1.1.20
-+++ lib/rpmrc.c	2001/06/25 19:35:42	1.2
-@@ -931,6 +931,23 @@
++++ lib/rpmrc.c	2001/09/22 14:03:55
+@@ -931,6 +931,26 @@
      if (!gotDefaults) {
  	uname(&un);
  
 +#ifdef OPENPKG
 +        {
 +            char *cp;
++            char *cpR;
 +            int n;
-+            if ((n = strspn(un.release, "0123456789.")) > 0) {
++            cpR = un.release;
++            if ((n = strcspn(cpR, "0123456789")) > 0)
++                cpR += n;
++            if ((n = strspn(cpR, "0123456789.")) > 0) {
 +                /* terminate after "N.N.N...." prefix */
-+                un.release[n] = '\0';
++                cpR[n] = '\0';
 +                /* shorten to "N.N" if longer */
-+                if ((cp = strchr(un.release, '.')) != NULL) {
-+                    if ((cp = strchr(cp+1, '.')) != NULL) {
++                if ((cp = strchr(cpR, '.')) != NULL) {
++                    if ((cp = strchr(cp+1, '.')) != NULL)
 +                        *cp = '\0';
-+                    }
 +                }
-+                strcat(un.sysname, un.release);
++                strcat(un.sysname, cpR);
 +            }
 +        }
 +#else /* OPENPKG */
  #if !defined(__linux__)
  #ifdef SNI
  	/* USUALLY un.sysname on sinix does start with the word "SINIX"
-@@ -1114,6 +1131,7 @@
+@@ -1114,6 +1134,7 @@
  		un.machine[1] = class;
  	}
  #	endif

+ 1 - 1
openpkg/rpm-4.0.2.patch.porting

@@ -9,7 +9,7 @@
 ##  'patch' tool to upgrade those files. Each patch snippet is annotated
 ##  with a short description.
 ##
-##  Created on: 21-Sep-2001
+##  Created on: 22-Sep-2001
 ##
 
 +---------------------------------------------------------------------------

+ 1 - 1
openpkg/rpm-4.0.2.patch.regen

@@ -9,7 +9,7 @@
 ##  'patch' tool to upgrade those files. Each patch snippet is annotated
 ##  with a short description.
 ##
-##  Created on: 21-Sep-2001
+##  Created on: 22-Sep-2001
 ##
 
 +---------------------------------------------------------------------------

+ 142 - 0
openpkg/rpmrc

@@ -0,0 +1,142 @@
+##
+##  @l_prefix@/etc/rpm/rpmrc -- RPM configuration for @l_prefix@ hierarchy
+##  Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
+##  Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
+##
+##  The purpose of this configuration file is to override the
+##  "macrofiles" directive in the default RPM configuration in order
+##  to direct RPM to the special macro definitions for the @l_prefix@
+##  hierarchy.
+##
+
+#
+#   Macro Sets
+#
+
+macrofiles: @l_prefix@/lib/rpm/macros:@l_prefix@/etc/rpm/rpmmacros:~/.rpmmacros
+
+#
+#   CPU Architectures
+#
+
+#   Intel
+buildarchtranslate: i386:       ix86
+buildarchtranslate: i486:       ix86
+buildarchtranslate: i586:       ix86
+buildarchtranslate: i686:       ix86
+buildarchtranslate: athlon:     ix86
+buildarchtranslate: i86pc:      ix86
+buildarchtranslate: ia64:       ia64
+arch_canon:         ix86:       ix86 1
+arch_canon:         ia64:       ia64 9
+arch_compat:        i386:       ix86 noarch
+arch_compat:        i486:       ix86 noarch
+arch_compat:        i586:       ix86 noarch
+arch_compat:        i686:       ix86 noarch
+arch_compat:        athlon:     ix86 noarch
+arch_compat:        i86pc:      ix86 noarch
+arch_compat:        ia64:       ia64 ix86 noarch
+
+#   Alpha
+buildarchtranslate: alphaev5:   alpha
+buildarchtranslate: alphaev56:  alpha
+buildarchtranslate: alphapca56: alpha
+buildarchtranslate: alphaev6:   alpha
+buildarchtranslate: alphaev67:  alpha
+arch_canon:         alpha:      alpha 2
+arch_compat:        alphaev5:   alpha noarch
+arch_compat:        alphaev56:  alpha noarch
+arch_compat:        alphapca56: alpha noarch
+arch_compat:        alphaev6:   alpha noarch
+arch_compat:        alphaev67:  alpha noarch
+
+#   SPARC
+buildarchtranslate: sun4c:      sparc
+buildarchtranslate: sun4d:      sparc
+buildarchtranslate: sun4m:      sparc
+buildarchtranslate: sun4u:      sparc64
+arch_canon:         sparc:      sparc   3
+arch_canon:         sparc64:    sparc64 3
+arch_compat:        sun4c:      sparc   noarch
+arch_compat:        sun4d:      sparc   noarch
+arch_compat:        sun4m:      sparc   noarch
+arch_compat:        sun4u:      sparc64 sparc noarch
+
+#   PA-RISC
+buildarchtranslate: 9000/778:   hppa
+arch_canon:         hppa:       hppa    4
+arch_compat:        9000/778:   hppa    noarch
+
+#
+#   Operating Systems
+#
+
+#   Linux
+buildostranslate:   Linux2.0:   linux2.0
+buildostranslate:   Linux2.2:   linux2.2
+buildostranslate:   Linux2.4:   linux2.4
+os_canon:           linux2.0:   linux2.0 1
+os_canon:           linux2.2:   linux2.2 1
+os_canon:           linux2.4:   linux2.4 1
+os_compat:          Linux2.0:   linux2.0
+os_compat:          Linux2.2:   linux2.2 linux2.0 
+os_compat:          Linux2.4:   linux2.4 linux2.2 linux2.0 
+
+#   Solaris
+buildostranslate:   SunOS5.0:   solaris2.0
+buildostranslate:   SunOS5.1:   solaris2.1
+buildostranslate:   SunOS5.2:   solaris2.2
+buildostranslate:   SunOS5.3:   solaris2.3
+buildostranslate:   SunOS5.4:   solaris2.4
+buildostranslate:   SunOS5.5:   solaris2.5
+buildostranslate:   SunOS5.6:   solaris2.6
+buildostranslate:   SunOS5.7:   solaris2.7
+buildostranslate:   SunOS5.8:   solaris2.8
+os_canon:           solaris2.0: solaris2.0 3
+os_canon:           solaris2.1: solaris2.1 3
+os_canon:           solaris2.2: solaris2.2 3
+os_canon:           solaris2.3: solaris2.3 3
+os_canon:           solaris2.4: solaris2.4 3
+os_canon:           solaris2.5: solaris2.5 3
+os_canon:           solaris2.6: solaris2.6 3
+os_canon:           solaris2.7: solaris2.7 3
+os_canon:           solaris2.8: solaris2.8 3
+os_compat:          SunOS5.0:   solaris2.0
+os_compat:          SunOS5.1:   solaris2.1 solaris2.0
+os_compat:          SunOS5.2:   solaris2.2 solaris2.1 solaris2.0
+os_compat:          SunOS5.3:   solaris2.3 solaris2.2 solaris2.1 solaris2.0
+os_compat:          SunOS5.4:   solaris2.4 solaris2.3 solaris2.2 solaris2.1 solaris2.0
+os_compat:          SunOS5.5:   solaris2.5 solaris2.4 solaris2.3 solaris2.2 solaris2.1 solaris2.0
+os_compat:          SunOS5.6:   solaris2.6 solaris2.5 solaris2.4 solaris2.3 solaris2.2 solaris2.1 solaris2.0
+os_compat:          SunOS5.7:   solaris2.7 solaris2.6 solaris2.5 solaris2.4 solaris2.3 solaris2.2 solaris2.1 solaris2.0
+os_compat:          SunOS5.8:   solaris2.8 solaris2.7 solaris2.6 solaris2.5 solaris2.4 solaris2.3 solaris2.2 solaris2.1 solaris2.0
+
+#   FreeBSD
+buildostranslate:   FreeBSD4.0: freebsd4.0
+buildostranslate:   FreeBSD4.1: freebsd4.1
+buildostranslate:   FreeBSD4.2: freebsd4.2
+buildostranslate:   FreeBSD4.3: freebsd4.3
+buildostranslate:   FreeBSD5.0: freebsd5.0
+os_canon:           freebsd4.0: freebsd4.0 8
+os_canon:           freebsd4.1: freebsd4.1 8
+os_canon:           freebsd4.2: freebsd4.2 8
+os_canon:           freebsd4.3: freebsd4.3 8
+os_compat:          FreeBSD4.0: freebsd4.0 linux2.0 linux2.2
+os_compat:          FreeBSD4.1: freebsd4.1 freebsd4.0 linux2.0 linux2.2
+os_compat:          FreeBSD4.2: freebsd4.2 freebsd4.1 freebsd4.0 linux2.0 linux2.2
+os_compat:          FreeBSD4.3: freebsd4.3 freebsd4.2 freebsd4.1 freebsd4.0 linux2.0 linux2.2
+os_compat:          FreeBSD5.0: freebsd5.0 freebsd4.3 freebsd4.2 freebsd4.1 freebsd4.0 linux2.0 linux2.2
+
+#   Tru64
+buildostranslate:   OSF1V5.0:   osf5.0
+buildostranslate:   OSF1V5.1:   osf5.1
+os_canon:           osf5.0:     osf5.0 9
+os_canon:           osf5.1:     osf5.1 9
+os_compat:          OSF1V5.0:   osf5.0
+os_compat:          OSF1V5.1:   osf5.0 osf5.1
+
+#   HP-UX
+buildostranslate:   hp-ux10.20: hpux10.20
+os_canon:           hpux10.20:  hpux10.20 10
+os_compat:          hp-ux10.20: hpux10.20
+

File diff suppressed because it is too large
+ 1054 - 0
openpkg/rpmtool