Hi/2. Sergey Poznyakoff wrote: > Hello, > > I plan to release 1.29 within 7-10 days. I'm aware of several still > pending issues, but these don't seem to be important enough to justify > further delays. Please, correct me if I'm wrong. Paul, Pavel - your > opinions? >
Here are OS/2 patches for tar and paxutils. -- KO Myung-Hun Using Mozilla SeaMonkey 2.7.2 Under OS/2 Warp 4 for Korean with FixPak #15 In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM Korean OS/2 User Community : http://www.ecomstation.co.kr
From ce8df624ee6922f7e04cb3676875e51edb61cadf Mon Sep 17 00:00:00 2001 From: KO Myung-Hun <[email protected]> Date: Sun, 23 Nov 2014 17:04:18 +0900 Subject: [PATCH 1/3] configure.ac: add -Zargs-wild to LDFLAGS on OS/2 -Zargs-wild enables to support wild cards on OS/2. * configure.ac (LDFLAGS): Add -Zargs-wild on os2*. --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 6d14bbd..925878b 100644 --- a/configure.ac +++ b/configure.ac @@ -368,6 +368,9 @@ else BACKUP_SED_COND='/^\#IF_DATE_FORMAT_OK/,/^\#ELSE_DATE_FORMAT_OK/d;/^\#ENDIF_DATE_FORMAT_OK/d' fi +AC_CANONICAL_HOST +AS_CASE([$host_os], [os2*], [LDFLAGS="$LDFLAGS -Zargs-wild"]) + AC_OUTPUT([Makefile\ doc/Makefile\ gnu/Makefile\ -- 2.7.0
From b3994fef0c1bfb5cdc790c823bece9b808475113 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun <[email protected]> Date: Mon, 24 Nov 2014 12:01:23 +0900 Subject: [PATCH 2/3] tar: set stdin/stdout to binary mode correctly with binary-io * gnulib.modules: Add binary-io. * src/buffer.c (_open_archive): Ensure that stdin is binary mode before check_compressed_archive(). Set stdout to binary mode if writing archives to stdout. * src/common.h: Include binary-io.h * src/extract.c (extract_file): Set stdout to binary mode if writing to stdout. * src/misc.c (xpipe): Set pipes to binary mode * src/system.c (sys_child_open_for_compress): Set stdout to binary mode. (sys_child_open_for_uncompress): Set stdin to binary mode. --- gnulib.modules | 1 + src/buffer.c | 6 ++++-- src/common.h | 1 + src/extract.c | 5 ++++- src/misc.c | 3 +++ src/system.c | 10 ++++++++-- 6 files changed, 21 insertions(+), 5 deletions(-) diff --git a/gnulib.modules b/gnulib.modules index 0e1de2f..d8e01f1 100644 --- a/gnulib.modules +++ b/gnulib.modules @@ -24,6 +24,7 @@ argmatch argp argp-version-etc backupfile +binary-io closeout configmake dirname diff --git a/src/buffer.c b/src/buffer.c index dcbfd02..32cad32 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -751,6 +751,7 @@ _open_archive (enum access_mode wanted_access) enum compress_type type; archive = STDIN_FILENO; + SET_BINARY (archive); type = check_compressed_archive (&shortfile); if (type != ct_tar && type != ct_none) FATAL_ERROR ((0, 0, @@ -770,6 +771,7 @@ _open_archive (enum access_mode wanted_access) case ACCESS_UPDATE: archive = STDIN_FILENO; write_archive_to_stdout = true; + SET_BINARY (STDOUT_FILENO); record_end = record_start; /* set up for 1st record = # 0 */ if (!index_file_name) stdlis = stderr; @@ -830,7 +832,7 @@ _open_archive (enum access_mode wanted_access) sys_detect_dev_null_output (); sys_save_archive_dev_ino (); - SET_BINARY_MODE (archive); + SET_BINARY (archive); switch (wanted_access) { @@ -1376,7 +1378,7 @@ new_volume (enum access_mode mode) goto tryagain; } - SET_BINARY_MODE (archive); + SET_BINARY (archive); return true; } diff --git a/src/common.h b/src/common.h index 2337b0e..0cc27ce 100644 --- a/src/common.h +++ b/src/common.h @@ -51,6 +51,7 @@ #include "arith.h" #include <backupfile.h> +#include <binary-io.h> #include <exclude.h> #include <full-write.h> #include <modechange.h> diff --git a/src/extract.c b/src/extract.c index f982433..346ced2 100644 --- a/src/extract.c +++ b/src/extract.c @@ -1121,7 +1121,10 @@ extract_file (char *file_name, int typeflag) mode_t current_mode_mask = 0; if (to_stdout_option) - fd = STDOUT_FILENO; + { + fd = STDOUT_FILENO; + SET_BINARY (fd); + } else if (to_command_option) { fd = sys_exec_command (file_name, 'f', ¤t_stat_info); diff --git a/src/misc.c b/src/misc.c index 8d8f538..4c31803 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1129,6 +1129,9 @@ xpipe (int fd[2]) { if (pipe (fd) < 0) call_arg_fatal ("pipe", _("interprocess channel")); + + SET_BINARY (fd[0]); + SET_BINARY (fd[1]); } /* Return PTR, aligned upward to the next multiple of ALIGNMENT. diff --git a/src/system.c b/src/system.c index e7eede7..4476f17 100644 --- a/src/system.c +++ b/src/system.c @@ -407,7 +407,10 @@ sys_child_open_for_compress (void) xclose (child_pipe[PWRITE]); if (strcmp (archive_name_array[0], "-") == 0) - archive = STDOUT_FILENO; + { + archive = STDOUT_FILENO; + SET_BINARY (archive); + } else { archive = rmtcreat (archive_name_array[0], MODE_RW, rsh_command_option); @@ -577,7 +580,10 @@ sys_child_open_for_uncompress (void) xclose (child_pipe[PREAD]); if (strcmp (archive_name_array[0], "-") == 0) - archive = STDIN_FILENO; + { + archive = STDIN_FILENO; + SET_BINARY (archive); + } else archive = rmtopen (archive_name_array[0], O_RDONLY | O_BINARY, MODE_RW, rsh_command_option); -- 2.7.0
From d6306135ea623486f96f315ddbc6591a5dd9ed29 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun <[email protected]> Date: Thu, 14 Jan 2016 12:52:16 +0900 Subject: [PATCH 3/3] boostrap: support --copy correctly bootstrap.conf is invoked before --copy is parsed. And ln is called regardless of --copy in bootstrap.conf. * bootstrap (bootstrap.conf): Invoke bootstrap.conf after parsing options. * bootstrap.conf (copy_files): Use cp if --copy is specified. --- bootstrap | 16 ++++++++-------- bootstrap.conf | 6 +++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/bootstrap b/bootstrap index 74eba0e..ba750cd 100755 --- a/bootstrap +++ b/bootstrap @@ -325,14 +325,6 @@ symlink_to_dir() } } -# Override the default configuration, if necessary. -# Make sure that bootstrap.conf is sourced from the current directory -# if we were invoked as "sh bootstrap". -case "$0" in - */*) test -r "$0.conf" && . "$0.conf" ;; - *) test -r "$0.conf" && . ./"$0.conf" ;; -esac - # Extra files from gnulib, which override files from other sources. test -z "${gnulib_extra_files}" && \ gnulib_extra_files=" @@ -387,6 +379,14 @@ if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then die "Bootstrapping from a non-checked-out distribution is risky." fi +# Override the default configuration, if necessary. +# Make sure that bootstrap.conf is sourced from the current directory +# if we were invoked as "sh bootstrap". +case "$0" in + */*) test -r "$0.conf" && . "$0.conf" ;; + *) test -r "$0.conf" && . ./"$0.conf" ;; +esac + # Strip blank and comment lines to leave significant entries. gitignore_entries() { sed '/^#/d; /^$/d' "$@" diff --git a/bootstrap.conf b/bootstrap.conf index 7f5c4f4..1ea62b4 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -92,7 +92,11 @@ copy_files() { esac fi if [ "$2" = '.' ]; then - ln -sf $1/$file $2 + if $copy; then + cp -fp $1/$file $2 + else + ln -sf $1/$file $2 + fi else symlink_to_dir "$1" "$file" "$2/$dst" || exit fi -- 2.7.0
From e02ea9efb3a6ae50fbd58c4e59d20b3631820605 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun <[email protected]> Date: Tue, 18 Nov 2014 10:21:15 +0900 Subject: [PATCH 1/4] lib: check if dev_name is a drive letter On OS/2, 'x:' is a drive letter not a remote device. * lib/rmt.h (_remdev): Check if dev_name is a drive letter. (_drivedev): New. --- lib/rmt.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/rmt.h b/lib/rmt.h index ff10e7c..da46119 100644 --- a/lib/rmt.h +++ b/lib/rmt.h @@ -35,10 +35,19 @@ extern bool force_local_option; Distributed File System (DFS). However, when --force-local, a filename is never remote. */ +#ifdef __OS2__ +# define _drivedev(dev_name) \ + ((((dev_name)[0] >= 'a' && (dev_name)[0] <= 'z') || \ + ((dev_name)[0] >= 'A' && (dev_name)[0] <= 'Z')) && ((dev_name)[1] == ':')) +#else +# define _drivedev(dev_name) 0 +#endif + #define _remdev(dev_name) \ (!force_local_option && (rmt_dev_name__ = strchr (dev_name, ':')) \ && rmt_dev_name__ > (dev_name) \ - && ! memchr (dev_name, '/', rmt_dev_name__ - (dev_name))) + && ! memchr (dev_name, '/', rmt_dev_name__ - (dev_name)) \ + && ! _drivedev(dev_name)) #define _isrmt(fd) \ ((fd) >= __REM_BIAS) -- 2.7.0
From 0d4dab6e8161a2d68b2927a7133a62923dedf5fe Mon Sep 17 00:00:00 2001 From: KO Myung-Hun <[email protected]> Date: Tue, 9 Sep 2014 17:43:17 +0900 Subject: [PATCH 2/4] lib: define wrapper macros for OS/2 * lib/system.h: Define wrapper macros for OS/2 --- lib/system.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/system.h b/lib/system.h index e7f531c..aa2404a 100644 --- a/lib/system.h +++ b/lib/system.h @@ -467,11 +467,15 @@ char *getenv (); # include <grp.h> #endif -#if MSDOS -# include <process.h> +#if MSDOS || defined(__OS2__) +# ifdef __OS2__ +# include <io.h> /* setmode() */ +# else +# include <process.h> +# define mkdir(file, mode) (mkdir) (file) +# endif # define SET_BINARY_MODE(arc) setmode(arc, O_BINARY) # define ERRNO_IS_EACCES errno == EACCES -# define mkdir(file, mode) (mkdir) (file) # define TTY_NAME "con" # define sys_reset_uid_gid() #else -- 2.7.0
From 44487d0c35617f5f7c0dd5f8607014a0003f6496 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun <[email protected]> Date: Tue, 9 Sep 2014 17:44:25 +0900 Subject: [PATCH 3/4] genfile: fix build failure * tests/genfile.c: Declare program_name as extern. ----- CCLD genfile.exe ld.exe: symbol `_program_name' defined more than once in ../gnu/libgnu.a(progname.o) --- tests/genfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/genfile.c b/tests/genfile.c index 336788f..9cd79ac 100644 --- a/tests/genfile.c +++ b/tests/genfile.c @@ -55,7 +55,7 @@ enum pattern }; /* The name this program was run with. */ -const char *program_name; +extern const char *program_name; /* Name of file to generate */ static char *file_name; -- 2.7.0
From fb11cc295cd714e6d30efdceb7925296f8308f1a Mon Sep 17 00:00:00 2001 From: KO Myung-Hun <[email protected]> Date: Tue, 9 Sep 2014 17:45:45 +0900 Subject: [PATCH 4/4] genfile: set pipe handles to binary mode On OS/2, pipe() is opened in text mode. * tests/genfile.c (exec_command): Set pipe handles to binary mode. --- tests/genfile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/genfile.c b/tests/genfile.c index 9cd79ac..b28b181 100644 --- a/tests/genfile.c +++ b/tests/genfile.c @@ -839,6 +839,9 @@ exec_command (void) if (pipe (fd) != 0) error (EXIT_FAILURE, errno, "pipe"); + SET_BINARY_MODE (fd[0]); + SET_BINARY_MODE (fd[1]); + pid = fork (); if (pid == -1) error (EXIT_FAILURE, errno, "fork"); -- 2.7.0
