diff options
author | grant <grant@pkgsrc.org> | 2003-09-23 14:37:41 +0000 |
---|---|---|
committer | grant <grant@pkgsrc.org> | 2003-09-23 14:37:41 +0000 |
commit | 20360d359cdc9c9d90ee1b7ca942dc29885cbe30 (patch) | |
tree | 75f1edc943faf5830e32d8678b111621f5fc78cf /archivers/pax | |
parent | f30daed5f607fd2bcb5dc79d19133ea0b3203f2f (diff) | |
download | pkgsrc-20360d359cdc9c9d90ee1b7ca942dc29885cbe30.tar.gz |
sync with NetBSD-current's pax-20030923.
Diffstat (limited to 'archivers/pax')
-rw-r--r-- | archivers/pax/Makefile | 4 | ||||
-rw-r--r-- | archivers/pax/files/ar_io.c | 15 | ||||
-rw-r--r-- | archivers/pax/files/cpio.cat1 | 8 | ||||
-rw-r--r-- | archivers/pax/files/pax.cat1 | 70 | ||||
-rw-r--r-- | archivers/pax/files/tar.cat1 | 22 |
5 files changed, 62 insertions, 57 deletions
diff --git a/archivers/pax/Makefile b/archivers/pax/Makefile index 295e686ffec..e1d34b54833 100644 --- a/archivers/pax/Makefile +++ b/archivers/pax/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.7 2003/09/15 04:39:14 grant Exp $ +# $NetBSD: Makefile,v 1.8 2003/09/23 14:37:41 grant Exp $ # -DISTNAME= pax-20030915 +DISTNAME= pax-20030923 CATEGORIES= archivers pkgtools MASTER_SITES= # empty DISTFILES= # empty diff --git a/archivers/pax/files/ar_io.c b/archivers/pax/files/ar_io.c index 6fd13e9c2c8..5ae73c6128d 100644 --- a/archivers/pax/files/ar_io.c +++ b/archivers/pax/files/ar_io.c @@ -1,4 +1,4 @@ -/* $NetBSD: ar_io.c,v 1.2 2003/09/05 18:40:49 jlam Exp $ */ +/* $NetBSD: ar_io.c,v 1.3 2003/09/23 14:37:42 grant Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -78,7 +78,7 @@ #if 0 static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94"; #else -__RCSID("$NetBSD: ar_io.c,v 1.2 2003/09/05 18:40:49 jlam Exp $"); +__RCSID("$NetBSD: ar_io.c,v 1.3 2003/09/23 14:37:42 grant Exp $"); #endif #endif /* not lint */ @@ -421,6 +421,8 @@ ar_open(const char *name) void ar_close(void) { + int status; + if (arfd < 0) { did_io = io_ok = flcnt = 0; return; @@ -456,11 +458,8 @@ ar_close(void) * for a quick extract/list, pax frequently exits before the child * process is done */ - if ((act == LIST || act == EXTRACT) && nflag && zpid > 0) { - int status; + if ((act == LIST || act == EXTRACT) && nflag && zpid > 0) kill(zpid, SIGINT); - waitpid(zpid, &status, 0); - } #ifdef SUPPORT_RMT if (artyp == ISRMT) @@ -469,6 +468,10 @@ ar_close(void) #endif /* SUPPORT_RMT */ (void)close(arfd); + /* Do not exit before child to ensure data integrity */ + if (zpid > 0) + waitpid(zpid, &status, 0); + if (vflag && (artyp == ISTAPE)) { (void)fputs("done.\n", listf); vfpart = 0; diff --git a/archivers/pax/files/cpio.cat1 b/archivers/pax/files/cpio.cat1 index b2fdcbbf5e8..5c4c83d8458 100644 --- a/archivers/pax/files/cpio.cat1 +++ b/archivers/pax/files/cpio.cat1 @@ -1,4 +1,4 @@ -CPIO(1) NetBSD Reference Manual CPIO(1) +CPIO(1) NetBSD General Commands Manual CPIO(1) NNAAMMEE ccppiioo - copy file archives in and out @@ -18,8 +18,8 @@ DDEESSCCRRIIPPTTIIOONN The options are as follows: --oo, ----ccrreeaattee - Create an archive. Reads the list of files to store in the - archive from standard input, and writes the archive on standard + Create an archive. Reads the list of files to store in the ar- + chive from standard input, and writes the archive on standard output. --aa, ----rreesseett--aacccceessss--ttiimmee @@ -203,4 +203,4 @@ AAUUTTHHOORRSS BBUUGGSS The --ss and --SS options are currently not implemented. -NetBSD 1.6 February 16, 1997 4 +NetBSD 1.6 February 16, 1997 NetBSD 1.6 diff --git a/archivers/pax/files/pax.cat1 b/archivers/pax/files/pax.cat1 index 38482f91081..ecc61dea9f9 100644 --- a/archivers/pax/files/pax.cat1 +++ b/archivers/pax/files/pax.cat1 @@ -1,20 +1,20 @@ -PAX(1) NetBSD Reference Manual PAX(1) +PAX(1) NetBSD General Commands Manual PAX(1) NNAAMMEE ppaaxx - read and write file archives and copy directory hierarchies SSYYNNOOPPSSIISS ppaaxx [--ccddjjnnvvzzOO] [--EE _l_i_m_i_t] [--ff _a_r_c_h_i_v_e] [--NN _d_b_d_i_r] [--ss _r_e_p_l_s_t_r] _._._. - [--UU _u_s_e_r] _._._. [--GG _g_r_o_u_p] _._._. [--TT [_f_r_o_m___d_a_t_e][,_t_o___d_a_t_e]] _._._. [_p_a_t_t_e_r_n - _._._.] + [--UU _u_s_e_r] _._._. [--GG _g_r_o_u_p] _._._. [--TT [_f_r_o_m___d_a_t_e] [,_t_o___d_a_t_e]] _._._. + [_p_a_t_t_e_r_n _._._.] ppaaxx --rr [--ccddiijjkknnuuvvzzAADDOOYYZZ] [--EE _l_i_m_i_t] [--ff _a_r_c_h_i_v_e] [--NN _d_b_d_i_r] [--oo _o_p_t_i_o_n_s] _._._. [--pp _s_t_r_i_n_g] _._._. [--ss _r_e_p_l_s_t_r] _._._. [--UU _u_s_e_r] _._._. [--GG _g_r_o_u_p] _._._. [--TT - [_f_r_o_m___d_a_t_e][,_t_o___d_a_t_e]] _._._. [_p_a_t_t_e_r_n _._._.] + [_f_r_o_m___d_a_t_e] [,_t_o___d_a_t_e]] _._._. [_p_a_t_t_e_r_n _._._.] ppaaxx --ww [--ddiijjttuuvvzzAAHHLLMMOOPPXX] [--bb _b_l_o_c_k_s_i_z_e] [[--aa] [--ff _a_r_c_h_i_v_e]] [--xx _f_o_r_m_a_t] [--BB _b_y_t_e_s] [--NN _d_b_d_i_r] [--oo _o_p_t_i_o_n_s] _._._. [--ss _r_e_p_l_s_t_r] _._._. [--UU _u_s_e_r] _._._. - [--GG _g_r_o_u_p] _._._. [--TT [_f_r_o_m___d_a_t_e][,_t_o___d_a_t_e][/[cc][mm]]] _._._. [_f_i_l_e _._._.] + [--GG _g_r_o_u_p] _._._. [--TT [_f_r_o_m___d_a_t_e] [,_t_o___d_a_t_e][/[cc][mm]]] _._._. [_f_i_l_e _._._.] ppaaxx --rr --ww [--ddiijjkkllnnttuuvvzzAADDHHLLMMOOPPXXYYZZ] [--NN _d_b_d_i_r] [--pp _s_t_r_i_n_g] _._._. [--ss _r_e_p_l_s_t_r] - _._._. [--UU _u_s_e_r] _._._. [--GG _g_r_o_u_p] _._._. [--TT [_f_r_o_m___d_a_t_e][,_t_o___d_a_t_e][/[cc][mm]]] + _._._. [--UU _u_s_e_r] _._._. [--GG _g_r_o_u_p] _._._. [--TT [_f_r_o_m___d_a_t_e] [,_t_o___d_a_t_e][/[cc][mm]]] _._._. [_f_i_l_e _._._.] _d_i_r_e_c_t_o_r_y DDEESSCCRRIIPPTTIIOONN @@ -54,12 +54,12 @@ DDEESSCCRRIIPPTTIIOONN --rr --ww _C_o_p_y. ppaaxx copies the _f_i_l_e operands to the destination _d_i_r_e_c_t_o_r_y. When no _f_i_l_e operands are specified, a list of files to copy with - one per line is read from the standard input. When a _f_i_l_e - operand is also a directory the entire file hierarchy rooted at - that directory will be included. The effect of the _c_o_p_y is as if - the copied files were written to an archive file and then subse- - quently extracted, except that there may be hard links between - the original and the copied files (see the --ll option below). + one per line is read from the standard input. When a _f_i_l_e oper- + and is also a directory the entire file hierarchy rooted at that + directory will be included. The effect of the _c_o_p_y is as if the + copied files were written to an archive file and then subsequent- + ly extracted, except that there may be hard links between the + original and the copied files (see the --ll option below). _W_a_r_n_i_n_g: The destination _d_i_r_e_c_t_o_r_y must not be one of the _f_i_l_e operands or a member of a file hierarchy rooted at one of the @@ -97,8 +97,8 @@ OOPPTTIIOONNSS _f_i_l_e_s. If any intermediate directories are needed in order to ex- tract an archive member, these directories will be created as if mkdir(2) was called with the bitwise inclusive OR of S_IRWXU, - S_IRWXG, and S_IRWXO as the mode argument. When the selected - archive format supports the specification of linked files and these + S_IRWXG, and S_IRWXO as the mode argument. When the selected ar- + chive format supports the specification of linked files and these files cannot be linked while the archive is being extracted, ppaaxx will write a diagnostic message to standard error and exit with a non-zero exit status at the completion of operation. @@ -153,9 +153,9 @@ OOPPTTIIOONNSS the archive. --ii Interactively rename files or archive members. For each archive - member matching a _p_a_t_t_e_r_n operand or each file matching a _f_i_l_e - operand, ppaaxx will prompt to _/_d_e_v_/_t_t_y giving the name of the file, - its file mode and its modification time. ppaaxx will then read a line + member matching a _p_a_t_t_e_r_n operand or each file matching a _f_i_l_e op- + erand, ppaaxx will prompt to _/_d_e_v_/_t_t_y giving the name of the file, its + file mode and its modification time. ppaaxx will then read a line from _/_d_e_v_/_t_t_y. If this line is blank, the file or archive member is skipped. If this line consists of a single period, the file or archive member is processed with no modification to its name. Oth- @@ -178,9 +178,9 @@ OOPPTTIIOONNSS that directory is also matched (unless --dd is also specified). --oo _o_p_t_i_o_n_s - Information to modify the algorithm for extracting or writing - archive files which is specific to the archive format specified by - --xx. In general, _o_p_t_i_o_n_s take the form: nnaammee==vvaalluuee + Information to modify the algorithm for extracting or writing ar- + chive files which is specific to the archive format specified by + --xx. In general, _o_p_t_i_o_n_s take the form: nnaammee==vvaalluuee --pp _s_t_r_i_n_g Specify one or more file characteristic options (privileges). The @@ -294,12 +294,12 @@ OOPPTTIIOONNSS tected by ppaaxx and is repaired. _b_c_p_i_o The old binary cpio format. The default blocksize for - this format is 5120 bytes. This format is not very - portable and should not be used when other formats are - available. Inode and device information about a file - (used for detecting file hard links by this format) which - may be truncated by this format is detected by ppaaxx and is - repaired. + this format is 5120 bytes. This format is not very porta- + ble and should not be used when other formats are avail- + able. Inode and device information about a file (used for + detecting file hard links by this format) which may be + truncated by this format is detected by ppaaxx and is re- + paired. _s_v_4_c_p_i_o The AT&T System V.4 UNIX cpio. The default blocksize for this format is 5120 bytes. Inode and device information @@ -398,8 +398,8 @@ OOPPTTIIOONNSS specify at least the following parameters in the specfile: ttyyppee, mmooddee, ggnnaammee or ggiidd, and uunnaammee or uuiidd, ddeevviiccee (in the case of block or character devices), and lliinnkk (in the case of symbolic links). - If ttiimmee isn't provided, the current time will be used. A `faked- - up' entry that is marked `ooppttiioonnaall' will not be copied. + If ttiimmee isn't provided, the current time will be used. A + `faked-up' entry that is marked `ooppttiioonnaall' will not be copied. --NN _d_b_d_i_r Except for lookups for the --GG and --UU options, use the user database @@ -412,8 +412,8 @@ OOPPTTIIOONNSS for automated tasks where error recovery cannot be performed by a human. - --PP Do not follow symbolic links, perform a physical file system - traversal. This is the default mode. + --PP Do not follow symbolic links, perform a physical file system tra- + versal. This is the default mode. --TT _[_f_r_o_m___d_a_t_e_]_[_,_t_o___d_a_t_e_]_[_/_[_c_]_[_m_]_] Allow files to be selected based on a file modification or inode @@ -535,8 +535,8 @@ EEXXAAMMPPLLEESS The command: pax -r -s ',^//*usr//*,,' -f a.pax - reads the archive _a_._p_a_x, with all files rooted in ``/usr'' into the - archive extracted relative to the current directory. + reads the archive _a_._p_a_x, with all files rooted in ``/usr'' into the ar- + chive extracted relative to the current directory. The command: pax -rw -i . dest_dir @@ -588,12 +588,12 @@ SSEEEE AALLSSOO SSTTAANNDDAARRDDSS The ppaaxx utility is a superset of the IEEE Std 1003.2 (``POSIX.2'') stan- dard. The options --BB, --DD, --EE, --GG, --HH, --LL, --MM, --OO, --PP, --TT, --UU, --YY, --ZZ, - --zz, the archive formats _b_c_p_i_o, _s_v_4_c_p_i_o, _s_v_4_c_r_c, _t_a_r, and the flawed - archive handling during _l_i_s_t and _r_e_a_d operations are extensions to the + --zz, the archive formats _b_c_p_i_o, _s_v_4_c_p_i_o, _s_v_4_c_r_c, _t_a_r, and the flawed ar- + chive handling during _l_i_s_t and _r_e_a_d operations are extensions to the POSIX standard. AAUUTTHHOORRSS Keith Muller at the University of California, San Diego. Luke Mewburn implemented --MM. -NetBSD 1.6.1_STABLE March 31, 2003 10 +NetBSD 1.6 March 31, 2003 NetBSD 1.6 diff --git a/archivers/pax/files/tar.cat1 b/archivers/pax/files/tar.cat1 index 829c3ea7b73..49515625d4f 100644 --- a/archivers/pax/files/tar.cat1 +++ b/archivers/pax/files/tar.cat1 @@ -1,11 +1,11 @@ -TAR(1) NetBSD Reference Manual TAR(1) +TAR(1) NetBSD General Commands Manual TAR(1) NNAAMMEE ttaarr - tape archiver SSYYNNOOPPSSIISS - ttaarr [-]{crtux}[--bbeeffhhjjkkllmmooppqqvvwwzzHHLLOOPPXXZZ001144557788] [_a_r_c_h_i_v_e] [_b_l_o_c_k_s_i_z_e] [--CC - _d_i_r_e_c_t_o_r_y] [--TT _f_i_l_e] [--ss _r_e_p_l_s_t_r] [_f_i_l_e _._._.] + ttaarr [-]{crtux}[--bbeeffhhjjkkllmmooppqqvvwwzzHHLLOOPPXXZZ001144557788] [_a_r_c_h_i_v_e] [_b_l_o_c_k_s_i_z_e] + [--CC _d_i_r_e_c_t_o_r_y] [--TT _f_i_l_e] [--ss _r_e_p_l_s_t_r] [_f_i_l_e _._._.] DDEESSCCRRIIPPTTIIOONN The ttaarr command creates, adds files to, or extracts files from an archive @@ -30,8 +30,8 @@ DDEESSCCRRIIPPTTIIOONN --xx, ----eexxttrraacctt, ----ggeett Extract files from archive. If any files are named on the command line, only those files will be extracted from the - archive. If more than one copy of a file exists in the - archive, later copies will overwrite earlier copies during + archive. If more than one copy of a file exists in the ar- + chive, later copies will overwrite earlier copies during extraction. The file mode and modification time are pre- served if possible. The file mode is subject to modifica- tion by the umask(2). @@ -41,8 +41,8 @@ DDEESSCCRRIIPPTTIIOONN --bb _b_l_o_c_k_i_n_g _f_a_c_t_o_r, ----bblloocckk--ssiizzee _b_l_o_c_k_i_n_g _f_a_c_t_o_r Set blocking factor to use for the archive. ttaarr uses 512 - byte blocks. The default is 20, the maximum is 126. - Archives with a blocking factor larger 63 violate the POSIX + byte blocks. The default is 20, the maximum is 126. Ar- + chives with a blocking factor larger 63 violate the POSIX standard and will not be portable to all systems. --ee Stop after first error. @@ -70,7 +70,9 @@ DDEESSCCRRIIPPTTIIOONN --mm, ----mmooddiiffiiccaattiioonn--ttiimmee Do not preserve modification time. - --OO Write old-style (non-POSIX) archives. + --OO When creating and appending to an archive, write old-style + (non-POSIX) archives. When extracting from an archive, ex- + tract to standard output. --oo, ----ppoorrttaabbiilliittyy, ----oolldd--aarrcchhiivvee Don't write directory information that the older (V7) style @@ -96,7 +98,7 @@ DDEESSCCRRIIPPTTIIOONN sions are: /old/new/[gp] As in ed(1), oolldd is a basic regular expression and nneeww can - contain an ampersand (), \n (where n is a digit) back-ref- + contain an ampersand (&), \n (where n is a digit) back-ref- erences, or subexpression matching. The oolldd string may al- so contain <newline> characters. Any non-null character can be used as a delimiter (/ is shown here). Multiple --ss @@ -213,4 +215,4 @@ HHIISSTTOORRYY AAUUTTHHOORRSS Keith Muller at the University of California, San Diego. -NetBSD 1.6 April 4, 2003 4 +NetBSD 1.6 July 8, 2003 NetBSD 1.6 |