update shells/sash to 3.5; from maintainer Wilbern Cobb <vedge@csoft.org>
This commit is contained in:
parent
d9a1fcdded
commit
5e8437204b
@ -1,11 +1,11 @@
|
|||||||
# $OpenBSD: Makefile,v 1.3 2001/07/25 16:31:14 lebel Exp $
|
# $OpenBSD: Makefile,v 1.4 2002/03/13 13:26:59 lebel Exp $
|
||||||
|
|
||||||
COMMENT= "stand-alone shell with built-in commands"
|
COMMENT= "stand-alone shell with built-in commands"
|
||||||
|
|
||||||
VER= 3.4
|
VERSION= 3.5
|
||||||
DISTNAME= sash-${VER}
|
DISTNAME= sash-${VERSION}
|
||||||
CATEGORIES= shells
|
CATEGORIES= shells
|
||||||
NEED_VERSION= 1.402
|
NEED_VERSION= 1.509
|
||||||
HOMEPAGE= http://www.canb.auug.org.au/~dbell/
|
HOMEPAGE= http://www.canb.auug.org.au/~dbell/
|
||||||
|
|
||||||
PERMIT_PACKAGE_CDROM= Yes
|
PERMIT_PACKAGE_CDROM= Yes
|
||||||
@ -15,14 +15,14 @@ PERMIT_DISTFILES_FTP= Yes
|
|||||||
|
|
||||||
MAINTAINER= Wilbern Cobb <cobb@vedge.com.ar>
|
MAINTAINER= Wilbern Cobb <cobb@vedge.com.ar>
|
||||||
|
|
||||||
MASTER_SITES= http://www.canb.auug.org.au/~dbell/programs/
|
MASTER_SITES= http://www.canb.auug.org.au/~dbell/programs/ \
|
||||||
|
http://mirror.csoft.org/sash/ \
|
||||||
|
ftp://vedge.com.ar/pub/mirror/sash
|
||||||
|
|
||||||
DOCS= README
|
ALL_TARGET= sash
|
||||||
|
|
||||||
do-install:
|
do-install:
|
||||||
cd ${WRKSRC} && ${INSTALL_PROGRAM} sash ${PREFIX}/bin
|
cd ${WRKSRC} && ${INSTALL_PROGRAM} sash ${PREFIX}/bin
|
||||||
cd ${WRKSRC} && ${INSTALL_MAN} sash.1 ${PREFIX}/man/man1
|
cd ${WRKSRC} && ${INSTALL_MAN} sash.1 ${PREFIX}/man/man1
|
||||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/sash
|
|
||||||
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/sash
|
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
MD5 (sash-3.4.tar.gz) = 9c631eb171371b69276ff6692100beb6
|
MD5 (sash-3.5.tar.gz) = 8de625cd380fd35064f1d59b2dff48c9
|
||||||
RMD160 (sash-3.4.tar.gz) = dc879f76f20d36096922725a21da9f1659691799
|
RMD160 (sash-3.5.tar.gz) = 135eb0e6d798801d8d26489ffa6fd61e3c64ecc7
|
||||||
SHA1 (sash-3.4.tar.gz) = 19150eaa7a18cf37def3398ae7a6e55bf37f42c9
|
SHA1 (sash-3.5.tar.gz) = 118b521ae5d83d5aa63ce6c8d4a444be5ce7ca25
|
||||||
|
@ -1,25 +1,33 @@
|
|||||||
$OpenBSD: patch-Makefile,v 1.1.1.1 2001/07/06 13:33:48 lebel Exp $
|
$OpenBSD: patch-Makefile,v 1.2 2002/03/13 13:26:59 lebel Exp $
|
||||||
--- Makefile.orig Sat Sep 25 01:21:34 1999
|
--- Makefile.orig Fri Mar 8 07:29:53 2002
|
||||||
+++ Makefile Fri Jul 6 09:21:42 2001
|
+++ Makefile Wed Mar 13 06:44:16 2002
|
||||||
@@ -5,11 +5,11 @@
|
@@ -7,14 +7,16 @@
|
||||||
# The HAVE_EXT2 definition adds the -chattr and -lsattr comamnds.
|
# The MOUNT_TYPE definition sets the default file system type for -mount.
|
||||||
#
|
#
|
||||||
|
HAVE_GZIP = 1
|
||||||
|
-HAVE_LINUX_ATTR = 1
|
||||||
|
-HAVE_LINUX_MOUNT = 1
|
||||||
|
-MOUNT_TYPE = '"ext3"'
|
||||||
|
+HAVE_LINUX_ATTR = 0
|
||||||
|
+HAVE_LINUX_MOUNT = 0
|
||||||
|
+HAVE_BSD_MOUNT = 1
|
||||||
|
+MOUNT_TYPE = '"ffs"'
|
||||||
|
|
||||||
|
-CFLAGS = -O3 -Wall -Wmissing-prototypes \
|
||||||
|
+CFLAGS += \
|
||||||
|
-DHAVE_GZIP=$(HAVE_GZIP) \
|
||||||
|
-DHAVE_LINUX_ATTR=$(HAVE_LINUX_ATTR) \
|
||||||
|
-DHAVE_LINUX_MOUNT=$(HAVE_LINUX_MOUNT) \
|
||||||
|
+ -DHAVE_BSD_MOUNT=$(HAVE_BSD_MOUNT) \
|
||||||
|
-DMOUNT_TYPE=$(MOUNT_TYPE)
|
||||||
|
|
||||||
-CFLAGS = -O3 -Wall -Wmissing-prototypes -DHAVE_GZIP -DHAVE_EXT2
|
|
||||||
+CFLAGS += -DHAVE_GZIP
|
|
||||||
+# CFLAGS += -DHAVE_EXT2
|
|
||||||
LDFLAGS = -static -s
|
LDFLAGS = -static -s
|
||||||
LIBS = -lz
|
@@ -30,7 +32,7 @@ OBJS = sash.o cmds.o cmd_dd.o cmd_ed.o c
|
||||||
|
|
||||||
-
|
|
||||||
BINDIR = /bin
|
|
||||||
MANDIR = /usr/man/man1
|
|
||||||
|
|
||||||
@@ -17,6 +17,7 @@ MANDIR = /usr/man/man1
|
|
||||||
OBJS = sash.o cmds.o cmd_dd.o cmd_ed.o cmd_grep.o cmd_ls.o cmd_tar.o \
|
|
||||||
cmd_gzip.o cmd_find.o cmd_file.o cmd_chattr.o cmd_ar.o utils.o
|
|
||||||
|
|
||||||
+all: sash
|
|
||||||
|
|
||||||
sash: $(OBJS)
|
sash: $(OBJS)
|
||||||
$(CC) $(LDFLAGS) -o sash $(OBJS) $(LIBS)
|
- $(CC) $(LDFLAGS) -o sash $(OBJS) $(LIBS)
|
||||||
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -o sash $(OBJS) $(LIBS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(OBJS) sash
|
||||||
|
@ -1,49 +1,30 @@
|
|||||||
$OpenBSD: patch-cmds_c,v 1.1.1.1 2001/07/06 13:33:48 lebel Exp $
|
$OpenBSD: patch-cmds_c,v 1.2 2002/03/13 13:26:59 lebel Exp $
|
||||||
--- cmds.c.orig Thu Jun 3 17:42:17 1999
|
--- cmds.c.orig Fri Mar 8 03:27:36 2002
|
||||||
+++ cmds.c Fri Jul 6 09:21:42 2001
|
+++ cmds.c Wed Mar 13 06:53:25 2002
|
||||||
@@ -10,14 +10,20 @@
|
@@ -10,7 +10,9 @@
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
-#include <sys/mount.h>
|
+#if HAVE_BSD_MOUNT
|
||||||
|
#include <sys/mount.h>
|
||||||
|
+#endif
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#include <utime.h>
|
@@ -21,7 +23,6 @@
|
||||||
#include <errno.h>
|
|
||||||
+
|
|
||||||
+#ifdef __Linux__
|
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
+#endif
|
#endif
|
||||||
|
|
||||||
+#ifdef __OpenBSD__
|
|
||||||
+#include <sys/param.h>
|
|
||||||
+#endif
|
|
||||||
+#include <sys/mount.h>
|
|
||||||
|
|
||||||
|
-
|
||||||
void
|
void
|
||||||
do_echo(int argc, const char ** argv)
|
do_echo(int argc, const char ** argv)
|
||||||
@@ -511,8 +517,15 @@ do_mount(int argc, const char ** argv)
|
|
||||||
|
|
||||||
argc--;
|
|
||||||
argv++;
|
|
||||||
+
|
|
||||||
+#ifdef __OpenBSD__
|
|
||||||
+ type = "ffs";
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#ifdef __Linux__
|
|
||||||
type = "ext2";
|
|
||||||
flags = MS_MGC_VAL;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
while ((argc > 0) && (**argv == '-'))
|
|
||||||
{
|
{
|
||||||
@@ -533,6 +546,21 @@ do_mount(int argc, const char ** argv)
|
@@ -550,8 +551,19 @@ do_mount(int argc, const char ** argv)
|
||||||
argc--;
|
case 'm':
|
||||||
|
flags |= MS_REMOUNT;
|
||||||
break;
|
break;
|
||||||
|
-#endif
|
||||||
+#ifdef __OpenBSD__
|
+#elif HAVE_BSD_MOUNT
|
||||||
+ case 'r':
|
+ case 'r':
|
||||||
+ flags |= MNT_RDONLY;
|
+ flags |= MNT_RDONLY;
|
||||||
+ break;
|
+ break;
|
||||||
@ -51,30 +32,26 @@ $OpenBSD: patch-cmds_c,v 1.1.1.1 2001/07/06 13:33:48 lebel Exp $
|
|||||||
+ case 's':
|
+ case 's':
|
||||||
+ flags |= MNT_NOSUID;
|
+ flags |= MNT_NOSUID;
|
||||||
+ break;
|
+ break;
|
||||||
+
|
|
||||||
+ case 'e':
|
+ case 'e':
|
||||||
+ flags |= MNT_NOEXEC;
|
+ flags |= MNT_NOEXEC;
|
||||||
+ break;
|
+ break;
|
||||||
+#endif
|
+#endif
|
||||||
+
|
|
||||||
+#ifdef __Linux__
|
|
||||||
case 'r':
|
|
||||||
flags |= MS_RDONLY;
|
|
||||||
break;
|
|
||||||
@@ -540,6 +568,7 @@ do_mount(int argc, const char ** argv)
|
|
||||||
case 'm':
|
|
||||||
flags |= MS_REMOUNT;
|
|
||||||
break;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Unknown option\n");
|
fprintf(stderr, "Unknown option\n");
|
||||||
@@ -555,16 +584,85 @@ do_mount(int argc, const char ** argv)
|
|
||||||
|
@@ -566,16 +578,83 @@ do_mount(int argc, const char ** argv)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
+#ifdef __OpenBSD__
|
- if (mount(argv[0], argv[1], type, flags, 0) < 0)
|
||||||
|
- perror("mount failed");
|
||||||
|
+#if HAVE_LINUX_MOUNT
|
||||||
+
|
+
|
||||||
|
+ if (mount(argv[0], argv[1], type, flags, 0) < 0)
|
||||||
|
+ perror("mount failed");
|
||||||
|
+
|
||||||
|
+#elif HAVE_BSD_MOUNT
|
||||||
+ {
|
+ {
|
||||||
+ struct ufs_args ufs;
|
+ struct ufs_args ufs;
|
||||||
+ struct adosfs_args adosfs;
|
+ struct adosfs_args adosfs;
|
||||||
@ -104,53 +81,47 @@ $OpenBSD: patch-cmds_c,v 1.1.1.1 2001/07/06 13:33:48 lebel Exp $
|
|||||||
+ args = &msdosfs;
|
+ args = &msdosfs;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ fprintf(stderr, "Unknown filesystem type: %s", type);
|
+ fprintf(stderr, "Unknown filesystem type: %s", type);
|
||||||
|
+ fprintf(stderr,
|
||||||
|
+ "Supported: ffs ufs adosfs cd9660 mfs msdos\n");
|
||||||
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ fprintf(stderr, "type=%s, dev=%s, point=%s\n", type,
|
|
||||||
+ argv[0], argv[1]);
|
|
||||||
+ if (mount(type, argv[1], flags, args) < 0)
|
+ if (mount(type, argv[1], flags, args) < 0)
|
||||||
+ perror(argv[0]);
|
+ perror(argv[0]);
|
||||||
+ }
|
+ }
|
||||||
+#endif
|
+#endif
|
||||||
+
|
|
||||||
+#ifdef __Linux__
|
|
||||||
if (mount(argv[0], argv[1], type, flags, 0) < 0)
|
|
||||||
perror("mount failed");
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
do_umount(int argc, const char ** argv)
|
do_umount(int argc, const char ** argv)
|
||||||
{
|
{
|
||||||
|
+#if HAVE_LINUX_MOUNT
|
||||||
|
if (umount(argv[1]) < 0)
|
||||||
|
perror(argv[1]);
|
||||||
|
+#elif HAVE_BSD_MOUNT
|
||||||
|
+ {
|
||||||
+ const char * str;
|
+ const char * str;
|
||||||
+ int flags = 0;
|
+ int flags = 0;
|
||||||
+
|
+
|
||||||
+#ifdef __OpenBSD__
|
+ for (argc--, argv++;
|
||||||
+ argc--;
|
+ (argc > 0) && (**argv == '-');) {
|
||||||
+ argv++;
|
|
||||||
+
|
|
||||||
+ while ((argc > 0) && (**argv == '-'))
|
|
||||||
+ {
|
|
||||||
+ argc--;
|
+ argc--;
|
||||||
+ str = *argv++;
|
+ str = *argv++;
|
||||||
+
|
+
|
||||||
+ while (*++str) switch (*str)
|
+ while (*++str) {
|
||||||
|
+ switch (*str)
|
||||||
+ {
|
+ {
|
||||||
+ case 'r':
|
+ case 'f':
|
||||||
+ flags = MNT_FORCE;
|
+ flags = MNT_FORCE;
|
||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
+ }
|
||||||
+
|
+
|
||||||
+ if (unmount(argv[0], flags) < 0)
|
+ if (unmount(argv[0], flags) < 0)
|
||||||
+ perror(argv[0]);
|
+ perror(argv[0]);
|
||||||
+#endif
|
+ }
|
||||||
+
|
|
||||||
+#ifdef __Linux__
|
|
||||||
if (umount(argv[1]) < 0)
|
|
||||||
perror(argv[1]);
|
|
||||||
+#endif
|
+#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,26 +1,29 @@
|
|||||||
$OpenBSD: patch-sash_1,v 1.1.1.1 2001/07/06 13:33:48 lebel Exp $
|
$OpenBSD: patch-sash_1,v 1.2 2002/03/13 13:26:59 lebel Exp $
|
||||||
--- sash.1.orig Sat Oct 2 06:16:45 1999
|
--- sash.1.orig Wed Mar 13 06:29:36 2002
|
||||||
+++ sash.1 Fri Jul 6 09:21:42 2001
|
+++ sash.1 Wed Mar 13 06:36:54 2002
|
||||||
@@ -359,9 +359,10 @@ LINES and COLS can be used to set the pa
|
@@ -369,10 +369,14 @@ LINES and COLS can be used to set the pa
|
||||||
.TP
|
.TP
|
||||||
.B -mount [-t type] [-r] [-m] devName dirName
|
.B -mount [-t type] [-r] [-m] devName dirName
|
||||||
Mount a filesystem on a directory name. The -t option specifies the
|
Mount a filesystem on a directory name. The -t option specifies the
|
||||||
-type of filesystem being mounted, and defaults to "ext2".
|
-type of filesystem being mounted, and defaults to "ext3" for Linux.
|
||||||
+type of filesystem being mounted, and defaults to "ffs".
|
+type of filesystem being mounted, and defaults to "ext3" for Linux
|
||||||
|
+and "ffs" for BSD.
|
||||||
The -r option indicates to mount the filesystem read-only.
|
The -r option indicates to mount the filesystem read-only.
|
||||||
-The -m option indicates to remount an already mounted filesystem.
|
The -m option indicates to remount an already mounted filesystem.
|
||||||
+The -s option indicates to mount the filesystem with nosuid.
|
-The -r and -m options are only available on Linux.
|
||||||
+The -e option indicates to mount the filesystem with noexec.
|
+The -s option indicates to mount the filesystem nosuid.
|
||||||
|
+The -e option indicates to mount the filesystem noexec.
|
||||||
|
+The -r and -m options are only available on Linux. The -s and -e
|
||||||
|
+options are only availble on BSD.
|
||||||
.TP
|
.TP
|
||||||
.B -mv srcName ... destName
|
.B -mv srcName ... destName
|
||||||
Moves one or more files from the
|
Moves one or more files from the
|
||||||
@@ -443,7 +444,8 @@ current umask value is printed. The mas
|
@@ -455,6 +459,8 @@ current umask value is printed. The mas
|
||||||
.B -umount fileName
|
|
||||||
Unmounts a file system. The file name can either be the device name
|
Unmounts a file system. The file name can either be the device name
|
||||||
which is mounted, or else the directory name which the file system
|
which is mounted, or else the directory name which the file system
|
||||||
-is mounted onto.
|
is mounted onto.
|
||||||
+is mounted onto. The -f option unmounts the filesystem even if it is
|
+The -f option unmounts the filesystem even if it is being used.
|
||||||
+being used.
|
+The -f option is only available on BSD.
|
||||||
.TP
|
.TP
|
||||||
.B unalias name
|
.B unalias name
|
||||||
Remove the definition for the specified alias.
|
Remove the definition for the specified alias.
|
||||||
|
@ -1,12 +1,28 @@
|
|||||||
$OpenBSD: patch-sash_c,v 1.1.1.1 2001/07/06 13:33:48 lebel Exp $
|
$OpenBSD: patch-sash_c,v 1.2 2002/03/13 13:26:59 lebel Exp $
|
||||||
--- sash.c.orig Sat Sep 25 00:03:29 1999
|
--- sash.c.orig Fri Mar 8 07:28:21 2002
|
||||||
+++ sash.c Fri Jul 6 09:21:42 2001
|
+++ sash.c Wed Mar 13 07:11:35 2002
|
||||||
@@ -312,7 +312,7 @@ static const CommandEntry commandEntryTa
|
@@ -224,6 +224,8 @@ static const CommandEntry commandEntryTa
|
||||||
{
|
"Mount or remount a filesystem on a directory",
|
||||||
"-umount", do_umount, 2, 2,
|
#if HAVE_LINUX_MOUNT
|
||||||
"Unmount a filesystem",
|
"[-t type] [-r] [-m] devName dirName"
|
||||||
- "fileName"
|
+#elif HAVE_BSD_MOUNT
|
||||||
+ "[-f] fileName"
|
+ "[-t type] [-r] [-s] [-e] devName dirName"
|
||||||
|
#else
|
||||||
|
"[-t type] devName dirName"
|
||||||
|
#endif
|
||||||
|
@@ -314,9 +316,15 @@ static const CommandEntry commandEntryTa
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
+#if HAVE_BSD_MOUNT
|
||||||
|
+ "-umount", do_umount, 2, 3,
|
||||||
|
+ "Unmount a filesystem",
|
||||||
|
+ "[-f] fileName"
|
||||||
|
+#else
|
||||||
|
"-umount", do_umount, 2, 2,
|
||||||
|
"Unmount a filesystem",
|
||||||
|
"fileName"
|
||||||
|
+#endif
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,23 @@
|
|||||||
$OpenBSD: patch-sash_h,v 1.1.1.1 2001/07/06 13:33:48 lebel Exp $
|
$OpenBSD: patch-sash_h,v 1.2 2002/03/13 13:26:59 lebel Exp $
|
||||||
--- sash.h.orig Sat Sep 25 00:03:29 1999
|
--- sash.h.orig Fri Mar 8 03:21:18 2002
|
||||||
+++ sash.h Fri Jul 6 09:21:42 2001
|
+++ sash.h Wed Mar 13 06:53:22 2002
|
||||||
@@ -16,7 +16,6 @@
|
@@ -9,14 +9,18 @@
|
||||||
|
#ifndef SASH_H
|
||||||
|
#define SASH_H
|
||||||
|
|
||||||
|
-
|
||||||
|
+#if __OpenBSD__
|
||||||
|
+#include <sys/param.h>
|
||||||
|
+#endif
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
-#include <malloc.h>
|
+#if __Linux__
|
||||||
|
#include <malloc.h>
|
||||||
|
+#endif
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
SASH - Stand-alone shell with built-in commands.
|
|
||||||
|
|
||||||
The sash program is a stand-alone shell which is useful for recovering
|
The sash program is a stand-alone shell which is useful for recovering
|
||||||
from certain types of system failures. In particular, it was created
|
from certain types of system failures. In particular, it was created
|
||||||
in order to cope with the problem of missing shared libraries or
|
in order to cope with the problem of missing shared libraries or
|
||||||
important executable.
|
important executables.
|
||||||
|
|
||||||
Flavors:
|
|
||||||
static - Build with statically linked binaries.
|
|
||||||
|
|
||||||
WWW: ${HOMEPAGE}
|
WWW: ${HOMEPAGE}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/07/06 13:33:47 lebel Exp $
|
@comment $OpenBSD: PLIST,v 1.2 2002/03/13 13:26:59 lebel Exp $
|
||||||
share/doc/sash/README
|
|
||||||
bin/sash
|
bin/sash
|
||||||
man/man1/sash.1
|
man/man1/sash.1
|
||||||
@dirrm share/doc/sash
|
|
||||||
|
Loading…
Reference in New Issue
Block a user