-Index: sash-3.7/Makefile
+Index: git/Makefile
===================================================================
---- sash-3.7.orig/Makefile 2010-04-04 10:13:55.176949485 +0200
-+++ sash-3.7/Makefile 2010-04-04 10:14:03.300968030 +0200
-@@ -13,13 +13,12 @@
- HAVE_BSD_MOUNT = 0
- MOUNT_TYPE = '"ext3"'
-
--
--CFLAGS = -O3 -Wall -Wmissing-prototypes \
-- -DHAVE_GZIP=$(HAVE_GZIP) \
-+DEFS = -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 -g $(DEFS)
-
- LDFLAGS = -static -s
- LIBS = -lz
-@@ -43,4 +42,7 @@
- cp sash $(BINDIR)/sash
- cp sash.1 $(MANDIR)/sash.1
+--- git.orig/Makefile 2014-04-20 08:48:43.255141891 +0200
++++ git/Makefile 2014-04-20 08:48:43.255141891 +0200
+@@ -63,4 +63,7 @@
+ cp sash $(DESTDIR)/$(BINDIR)/sash
+ cp sash.1 $(DESTDIR)/$(MANDIR)/man1/sash.1
+%.o: %.c
+ $(CC) $(CFLAGS) $(DEFS) -c $<
+++ /dev/null
-Index: sash-3.7/sash.c
-===================================================================
---- sash-3.7.orig/sash.c 2010-04-04 14:56:47.964954627 +0200
-+++ sash-3.7/sash.c 2010-04-04 14:57:03.932954934 +0200
-@@ -375,10 +375,10 @@
- */
- static void catchInt(int);
- static void catchQuit(int);
--static void readFile(const char * name);
--static void command(const char * cmd);
-+static int readFile(const char * name);
-+static int command(const char * cmd);
- static BOOL tryBuiltIn(const char * cmd);
--static void runCmd(const char * cmd);
-+static int runCmd(const char * cmd);
- static void childProcess(const char * cmd);
- static void showPrompt(void);
- static void usage(void);
-@@ -524,9 +524,7 @@
- */
- if (singleCommand)
- {
-- command(singleCommand);
--
-- return 0;
-+ return command(singleCommand);
- }
-
- /*
-@@ -561,9 +559,8 @@
- /*
- * Read commands from stdin or from a command file.
- */
-- readFile(commandFile);
-+ return readFile(commandFile);
-
-- return 0;
- }
-
-
-@@ -571,19 +568,20 @@
- * Read commands from the specified file.
- * A null name pointer indicates to read from stdin.
- */
--static void
-+static int
- readFile(const char * name)
- {
- FILE * fp;
- int cc;
- BOOL ttyFlag;
- char buf[CMD_LEN];
-+ int r = 0;
-
- if (sourceCount >= MAX_SOURCE)
- {
- fprintf(stderr, "Too many source files\n");
-
-- return;
-+ return 1;
- }
-
- fp = stdin;
-@@ -596,7 +594,7 @@
- {
- perror(name);
-
-- return;
-+ return 1;
- }
- }
-
-@@ -614,7 +612,7 @@
- fclose(fp);
- sourceCount--;
-
-- return;
-+ return 1;
- }
-
- if (fgets(buf, CMD_LEN - 1, fp) == NULL)
-@@ -639,7 +637,7 @@
-
- buf[cc] = '\0';
-
-- command(buf);
-+ r = command(buf);
- }
-
- if (ferror(fp))
-@@ -656,6 +654,7 @@
- fclose(fp);
-
- sourceCount--;
-+ return r;
- }
-
-
-@@ -664,7 +663,7 @@
- * This breaks the command line up into words, checks to see if the
- * command is an alias, and expands wildcards.
- */
--static void
-+static int
- command(const char * cmd)
- {
- const char * endCmd;
-@@ -690,7 +689,7 @@
- * If the command is empty or is a comment then ignore it.
- */
- if ((*cmd == '\0') || (*cmd == '#'))
-- return;
-+ return 0;
-
- /*
- * Look for the end of the command name and then copy the
-@@ -726,13 +725,13 @@
- * the command if found.
- */
- if (tryBuiltIn(cmd))
-- return;
-+ return 0; /* This is a blatant lie */
-
- /*
- * The command is not a built-in, so run the program along
- * the PATH list.
- */
-- runCmd(cmd);
-+ return runCmd(cmd);
- }
-
-
-@@ -809,7 +808,7 @@
- * Execute the specified command either by forking and executing
- * the program ourself, or else by using the shell.
- */
--static void
-+static int
- runCmd(const char * cmd)
- {
- const char * cp;
-@@ -854,9 +853,7 @@
- */
- if (magic)
- {
-- system(cmd);
--
-- return;
-+ return system(cmd);
- }
-
- /*
-@@ -869,7 +866,7 @@
- {
- perror("fork failed");
-
-- return;
-+ return -1;
- }
-
- /*
-@@ -894,7 +891,7 @@
- {
- fprintf(stderr, "Error from waitpid: %s", strerror(errno));
-
-- return;
-+ return -1;
- }
-
- if (WIFSIGNALED(status))
-@@ -902,6 +899,7 @@
- fprintf(stderr, "pid %ld: killed by signal %d\n",
- (long) pid, WTERMSIG(status));
- }
-+ return WEXITSTATUS(status);
- }
-
-
+++ /dev/null
-Subject: Don't check permissions before trying to execute a command
-From: Unknown
-Last-updated: 2010-04-04
-Index: sash-3.7/sash.c
-===================================================================
---- sash-3.7.orig/sash.c 2010-04-04 10:12:57.228978742 +0200
-+++ sash-3.7/sash.c 2010-04-04 10:13:04.008985124 +0200
-@@ -1172,13 +1172,6 @@
-
- name = argv[1];
-
-- if (access(name, 4))
-- {
-- perror(name);
--
-- return;
-- }
--
- while (--sourceCount >= 0)
- {
- if (sourcefiles[sourceCount] != stdin)
-@@ -1188,7 +1181,7 @@
- argv[argc] = NULL;
-
- execvp(name, (char **) argv + 1);
-- exit(1);
-+ perror(name);
- }
-
-
From: Axel Beckert <abe@debian.org>
Bug-Debian: #565539
Last-updated: 2010-04-04
-Index: sash-3.7/Makefile
+Index: git/Makefile
===================================================================
---- sash-3.7.orig/Makefile 2010-04-04 11:13:36.005953632 +0200
-+++ sash-3.7/Makefile 2010-04-04 11:38:19.300955689 +0200
-@@ -9,9 +9,17 @@
+--- git.orig/Makefile 2014-04-20 08:52:12.397361252 +0200
++++ git/Makefile 2014-04-20 08:53:32.416679945 +0200
+@@ -19,6 +19,7 @@
#
+
HAVE_GZIP = 1
+ifeq (Linux,$(shell uname -s))
HAVE_LINUX_ATTR = 1
+ HAVE_LINUX_CHROOT = 1
+ HAVE_LINUX_LOSETUP = 1
+@@ -26,6 +27,16 @@
HAVE_LINUX_MOUNT = 1
HAVE_BSD_MOUNT = 0
MOUNT_TYPE = '"ext3"'
+endif
+ifeq (GNU/kFreeBSD,$(shell uname -s))
+HAVE_LINUX_ATTR = 0
++HAVE_LINUX_CHROOT = 0
++HAVE_LINUX_LOSETUP = 0
++HAVE_LINUX_PIVOT = 0
+HAVE_LINUX_MOUNT = 0
+HAVE_BSD_MOUNT = 1
+MOUNT_TYPE = '"ufs"'
+endif
- DEFS = -DHAVE_GZIP=$(HAVE_GZIP) \
- -DHAVE_LINUX_ATTR=$(HAVE_LINUX_ATTR) \
-Index: sash-3.7/cmds.c
+ OPT = -O3
+
+Index: git/cmds.c
===================================================================
---- sash-3.7.orig/cmds.c 2010-04-04 11:13:36.025952857 +0200
-+++ sash-3.7/cmds.c 2010-04-04 11:37:59.160966064 +0200
+--- git.orig/cmds.c 2014-04-20 08:52:12.397361252 +0200
++++ git/cmds.c 2014-04-20 08:52:12.397361252 +0200
@@ -19,6 +19,10 @@
#if HAVE_LINUX_MOUNT
+#include <fs/msdosfs/msdosfsmount.h>
#endif
-
-@@ -599,26 +603,16 @@
- #elif HAVE_BSD_MOUNT
- {
- struct ufs_args ufs;
-- struct adosfs_args adosfs;
- struct iso_args iso;
-- struct mfs_args mfs;
- struct msdosfs_args msdosfs;
- void * args;
-
- if(!strcmp(type, "ffs") || !strcmp(type, "ufs")) {
- ufs.fspec = (char*) argv[0];
- args = &ufs;
-- } else if(!strcmp(type, "adosfs")) {
-- adosfs.fspec = (char*) argv[0];
-- adosfs.uid = 0;
-- adosfs.gid = 0;
-- args = &adosfs;
- } else if(!strcmp(type, "cd9660")) {
- iso.fspec = (char*) argv[0];
- args = &iso;
-- } else if(!strcmp(type, "mfs")) {
-- mfs.fspec = (char*) argv[0];
-- args = &mfs;
- } else if(!strcmp(type, "msdos")) {
- msdosfs.fspec = (char*) argv[0];
- msdosfs.uid = 0;
+ /* Need to tell loop.h what the actual dev_t type is. */
+++ /dev/null
-Subject: Add -i option
-From: Michael Meskes <meskes@debian.org>
-Bug-Debian: #19656
-Last-updated: 2010-04-04
-Index: sash-3.7/sash.c
-===================================================================
---- sash-3.7.orig/sash.c 2010-04-04 10:35:51.268950839 +0200
-+++ sash-3.7/sash.c 2010-04-04 10:36:42.572973204 +0200
-@@ -399,12 +399,14 @@
- const char * commandFile;
- BOOL quietFlag;
- BOOL aliasFlag;
-+ BOOL interactiveFlag;
- char buf[PATH_LEN];
-
- singleCommand = NULL;
- commandFile = NULL;
- quietFlag = FALSE;
- aliasFlag = FALSE;
-+ interactiveFlag = FALSE;
-
- /*
- * Look for options.
-@@ -419,11 +421,17 @@
-
- while (*cp) switch (*cp++)
- {
-+ case '-':
-+ /*
-+ * Ignore. This is so that we can be
-+ * run from login.
-+ */
-+ break;
- case 'c':
- /*
- * Execute specified command.
- */
-- if ((argc != 1) || singleCommand)
-+ if ((argc != 1) || singleCommand || interactiveFlag)
- usage();
-
- singleCommand = *argv++;
-@@ -446,6 +454,18 @@
-
- break;
-
-+ case 'i':
-+ /*
-+ * Be an interactive shell
-+ * ..is a no-op, but some contexts require this
-+ * ..interactiveFlag is to avoid -ic as a legacy
-+ */
-+ if (singleCommand)
-+ usage();
-+
-+ interactiveFlag = TRUE;
-+ break;
-+
- case 'p':
- /*
- * Set the prompt string.
-@@ -1263,7 +1290,7 @@
- {
- fprintf(stderr, "Stand-alone shell (version %s)\n", version);
- fprintf(stderr, "\n");
-- fprintf(stderr, "Usage: sash [-a] [-q] [-f fileName] [-c command] [-p prompt]\n");
-+ fprintf(stderr, "Usage: sash [-a] [-q] [-f fileName] [-c command] [-p prompt] [-i]\n");
-
- exit(1);
- }
touch_error_handling
-interactive_flag
-fix_exec
buildsystem
freebsd_build
-exit_with_command_status
From: Tollef Fog Heen <tfheen@debian.org>, Raul Miller <moth@debian.org>
Bug-Debian: #43428
Last-updated: 2010-04-04
-Index: sash-3.7/cmds.c
+Index: git/cmds.c
===================================================================
---- sash-3.7.orig/cmds.c 2010-04-04 10:58:51.000000000 +0200
-+++ sash-3.7/cmds.c 2010-04-04 11:04:55.185955708 +0200
-@@ -341,6 +341,11 @@
+--- git.orig/cmds.c 2014-04-20 08:44:47.785146575 +0200
++++ git/cmds.c 2014-04-20 08:44:47.785146575 +0200
+@@ -456,6 +456,11 @@
continue;
}
+ }
+
if (utime(name, &now) < 0)
+ {
perror(name);
- }