summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Warn “file changed as we read it” less oftenPaul Eggert2022-06-093-20/+61
| | | | | | | | | | * src/create.c (dump_file0): Remove an fstatat call that is unnecessary because the file wasn’t read so we can treat the first fstatat as atomic. Warn “file changed” when the file’s size, mtime, user ID, group ID, or mode changes, instead of when the file’s size or ctime changes. Also, when such a change happens, do not change exit status if --ignore-failed-read. Finally, don’t attempt to change atime back if it didn’t change.
* Modernize NEWS hook to current EmacsPaul Eggert2022-06-091-2/+2
|
* doc: fix abrupt sentence in HTMLPaul Eggert2022-05-031-6/+1
| | | | | | | Typo reported by Jackson Dougherty in: https://lists.gnu.org/r/bug-tar/2022-05/msg00000.html * doc/tar.texi: Don’t assume that tex and info are the only two formats.
* tar: revamp "file is the archive" diagnosticPaul Eggert2022-02-154-9/+6
| | | | | | * src/create.c (dump_file0): For clarity, change diagnostic wording from "file is the archive; not dumped" to "archive cannot contain itself; not dumped". All test cases and documentation changed.
* Update copyright yearsSergey Poznyakoff2022-01-02311-311/+312
|
* Copy COPYING and fdl.texi from upstreamPaul Eggert2021-12-132-10/+9
|
* Format ` and ' more nicely in docPaul Eggert2021-12-131-0/+10
| | | | | Use @documentencoding and set txicodequoteundirected and txicodequotebacktick to get nicer-looking quoting in the manual.
* Don’t recommend delete=mtimePaul Eggert2021-12-131-13/+7
| | | | That stops working after the year 2242.
* More reproducible tarball docPaul Eggert2021-12-131-17/+24
| | | | | * doc/tar.texi (PAX keywords): Improve discussion of how to generate reproducible tarballs.
* Raise version numberSergey Poznyakoff2021-12-132-3/+3
|
* .gitignore maintenance (some automated)Paul Eggert2021-12-132-15/+12
|
* bootstrap: copy from GnulibPaul Eggert2021-12-131-188/+264
|
* build: update gnulib and paxutils submodules to latestPaul Eggert2021-12-132-0/+0
|
* Add NEWS items for changes since 1.34Paul Eggert2021-12-131-5/+28
|
* Omit unnecessary devmajor and devminor settingPaul Eggert2021-12-131-9/+0
| | | | | * src/create.c (dump_file0): Omit redundant setting of devmajor and devminor; start_header already does this.
* Omit devmajor and devminor for non-special filesPaul Eggert2021-12-131-6/+0
| | | | | | | | | * src/create.c (start_header): Leave the devmajor and devminor fields empty for files that are not character and block special devices, even when the archive format is pax, ustar or v7. This avoids generating irrelevant differences which helps with reproducible builds, and is more compatible with what Solaris 10 tar does.
* Use ‘bool’ in create.cPaul Eggert2021-12-131-21/+21
| | | | * src/create.c: Prefer ‘bool’, ‘true’, ‘false’ for booleans.
* * gnulib.modules: Add year2038.Paul Eggert2021-10-131-0/+1
|
* build: improve build-from-git for older GCCsPaul Eggert2021-09-201-1/+1
| | | | | | | configure.ac: Bump GCC version from 4.6 to 11.2 when deciding whether to default to enabling GCC warnings when --enable-gcc-warnings is not specified, as older GCCs can generate too many false alarms. From a suggestion by Christian Schoenebeck.
* Simplify wordsplit code a bitPaul Eggert2021-09-191-7/+7
| | | | | | | These changes pacify gcc -Wanalyzer-null-dereference on x86-64 gcc 11.2.1 20210728 (Red Hat 11.2.1-1). * lib/wordsplit.c (wsnode_tail): Remove unnecessary test. (coalesce_segment): Coalesce calls to wsnode_len.
* build: document WERROR_CFLAGSPaul Eggert2021-09-181-0/+4
| | | | * README-hacking: Mention 'make WERROR_CFLAGS='.
* build: update paxutils submodule to latestPaul Eggert2021-09-171-0/+0
|
* build: update gnulib submodule to latestPaul Eggert2021-09-172-1/+2
| | | | | | | * src/common.h (get_directory_entries): Add _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE. Problem found by gcc -Wsuggest-attribute=malloc and current Gnulib.
* Pacify gcc -Warray-parameterPaul Eggert2021-09-171-1/+2
| | | | | * src/common.h (code_timespec): Declare sbuf arg to be an array, to be consistent with definition.
* Fix null rereference if low-memoryPaul Eggert2021-09-171-5/+5
| | | | | * src/incremen.c (read_incr_db_01): Use xstrdup not strdup. Problem found by gcc -Wanalyzer-possible-null-argument.
* Provide functions for manipulating arrays of extended attributesSergey Poznyakoff2021-09-027-134/+123
| | | | | | | | | | | | | | | | | | | | * src/common.h (xheader_xattr_free,xheader_xattr_copy): Remove protos. (xattr_map_init,xattr_map_copy) (xattr_map_add,xattr_map_free): New protos. * src/tar.h (xattr_map): New struct. (tar_stat_info): Replace xattr_map_size and xattr_map with one field: xattr_map. * src/xattrs.c (XATTRS_PREFIX,XATTRS_PREFIX_LEN): New defines. (xheader_xattr_init,xattr_map_init) (xattr_map_free,xattr_map_add) (xheader_xattr_add,xattr_map_copy): New functions. All uses changed. * src/create.c (start_header): Update to use struct xattr_map. * src/extract.c: Update to use struct xattr_map. * src/tar.c: Likewise. * src/xheader.c (xheader_xattr_init,xheader_xattr_free) (xheader_xattr_add,xheader_xattr_copy): Remove. (xattr_coder,xattr_decoder): Use xattr_map_ functions.
* Fix handling of extended header prefixesSergey Poznyakoff2021-08-281-8/+9
| | | | | | * src/xheader.c (locate_handler): Recognize prefix keywords only when followed by a dot. (xattr_decoder): Use xmalloc/xstrdup instead of alloc
* Handle invalid sparse entries in pax headerSergey Poznyakoff2021-08-281-1/+3
| | | | | | * src/sparse.c (pax_decode_header): Check if sp.offset+sp.numbytes falls within the reported file size. Check for possible integer overflow.
* transform: fix replacement of particular pattern instanceSergey Poznyakoff2021-08-281-3/+3
| | | | | | | | | This fixes handling of expressions like 's/s/@/2' Fix suggested by Anthony Heading. * src/transform.c (_single_transform_name_to_obstack): Avoid duplicating initial prefix if replace is not needed.
* Fix crash on invalid command line argumentSamanta Navarro2021-07-011-1/+1
| | | | | | | | | | The copy_string_unquote function does not handle arguments which only consist of a single quote. A string is only quoted if two quoting characters exist. How to reproduce: tar --checkpoint-action exec=\"
* Fix the use of options with trailing slash in files-from listSergey Poznyakoff2021-07-011-1/+1
| | | | | | | | * src/names.c (read_name_from_file): Do not remove trailing slash here, since name_buffer might contain an option (e.g. -C /). (read_next_name): Remove trailing slash when we're sure we're dealing with a file name. See 163e96a0.
* Minor fixSergey Poznyakoff2021-06-011-2/+2
| | | | * scripts/backup-specs: Set standard paths for rsh (patch#9275).
* Fix typosSamanta Navarro2021-06-0116-18/+18
| | | | Typos found with codespell
* Minor changes.Samanta Navarro2021-06-011-2/+2
| | | | | * src/xheader.c (decode_record): Fix format specification. (xattr_encode_keyword): Allocate space for terminating \0.
* Fix gendocs_templateSergey Poznyakoff2021-03-242-21/+14
|
* Tune for single-threaded tarPaul Eggert2021-03-071-0/+14
| | | | | | | | This takes advantage of recent optimizations in Gnulib for single-threaded programs. * configure.ac (GNULIB_EXCLUDE_SINGLE_THREAD) (GNULIB_MBRTOWC_SINGLE_THREAD, GNULIB_REGEX_SINGLE_THREAD) (GNULIB_WCHAR_SINGLE_LOCALE): Define.
* Port linking to AIX 7.1Paul Eggert2021-03-072-4/+8
| | | | | | | | | * src/Makefile.am (LDADD): Remove, folding into tar_LDADD. * src/Makefile.am (tar_LDADD), tests/Makefile.am (LDADD): Add the libraries gnulib-tool currently recommends: LIB_ACL, LIB_CLOCK_GETTIME, LIB_GETRANDOM, LIB_HARD_LOCALE, LIB_HAS_ACL, LIB_MBRTOWC, LIB_SETLOCALE_NULL. Otherwise, tar won’t link on AIX 7.1 with xlc because the -lpthread option is missing.
* Port xattr-at.h to AIX 7.1Paul Eggert2021-03-071-0/+1
| | | | | * lib/xattr-at.h: Include <errno.h> before testing whether ENOATTR is defined.
* build: update gnulib submodule to latestPaul Eggert2021-03-071-0/+0
|
* Fix building the online version of the manual.Sergey Poznyakoff2021-03-016-103/+692
| | | | | | | | | | | | | * doc/Makefile.am (GENDOCS): Use the version from the tar repository. (manual): Set the DISTRIN rendition. (manual-rebuild): New goal. * doc/README.manual: New file. Instructions for maintainers on how to update web documentation. * doc/gendocs.sh: A version from gnulib fixed as per https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00002.html. * doc/gendocs_template: Updated version from gnulib. * doc/intern.texi: Fix the use of UNREVISED. * doc/tar.texi: Fix the use of GNUTAR.
* Fix unlikely uninitalized var bug with sparse filePaul Eggert2021-03-011-1/+4
| | | | | | | * src/sparse.c (sparse_extract_file): Set *SIZE to stat.st_size so that the caller does not use *SIZE when uninitalized. Problem found with GCC 10 and --enable-gcc-warnings CFLAGS='-O2 -flto -fanalyzer'.
* Pacify --enable-gcc-warnings -flto -fanalyzerPaul Eggert2021-03-011-4/+4
| | | | | | | | | | | | | | With GCC 10.2.1, ‘./configure --enable-gcc-warnings CFLAGS='-O2 -flto -fanalyzer' issued a false alarm about uninitialized variable use. Pacify GCC by using a variant of the code. * src/buffer.c (zip_program): Omit last placeholder entry. (n_zip_programs): New constant. (find_zip_program): Use it instead of placeholder. (first_decompress_program): Set *PSTATE to maximum value if skipping the table. This avoids confusing gcc -flto into thinking *PSTATE is used uninitialized. (next_decompress_program): Simplify now that *PSTATE is maximal when skipping.
* Pacify clang for unreachable ‘return’Paul Eggert2021-03-011-2/+0
| | | | * src/sparse.c (sparse_scan_file_seek): Omit unreachable statement.
* Pacify clang char conversionPaul Eggert2021-03-011-1/+1
| | | | | * src/create.c (to_chars): Pacify ‘clang’ about assigning 128 to ‘char’.
* Omit most uses of ‘inline’Paul Eggert2021-03-018-35/+24
| | | | | | | | | | | | | | | | | | | With today’s compilers ‘inline’ is typically not needed for performance (at least the way GNU Tar uses it) and it gets in the way of portability. * configure.ac: Omit AC_C_INLINE; no longer needed here. * lib/attr-xattr.in.h (setxattr, lsetxattr, fsetxattr, getxattr) (lgetxattr, fgetxattr, listxattr, llistxattr, flistxattr): * lib/wordsplit.c (skip_delim_internal, skip_delim) (skip_delim_real, exptab_matches): * src/delete.c (flush_file): * src/extract.c (safe_dir_mode): * src/misc.c (ptr_align): Now just static, not static inline. * lib/wordsplit.h (wordsplit_getwords): Remove; no longer used. * src/common.h (name_more_files): Now COMMON_INLINE, not extern inline - which is not portable according to C99, the way we were using it.
* maint: port better to non-GCC compilersPaul Eggert2021-03-018-95/+77
| | | | | | | | | | | | This can be helpful in porting to compilers like Oracle Developer Studio that support some but not all GCC attributes. * lib/wordsplit.c (FALLTHROUGH): Remove; now done by attribute.h. * lib/wordsplit.h (__WORDSPLIT_ATTRIBUTE_FORMAT): Remove; all uses replaced by ATTRIBUTE_FORMAT. * lib/wordsplit.h, src/buffer.c, src/common.h, src/compare.c: * src/sparse.c, src/system.c, src/xheader.c: Prefer ATTRIBUTE_FORMAT, MAYBE_UNUSED, _Noreturn, etc. to __attribute__.
* Update paxutils from upstreamPaul Eggert2021-03-011-0/+0
|
* maint: 1.34 announcement updatePaul Eggert2021-02-272-2/+18
| | | | | | Hand-install 1.34 changes into master. Evidently these changes were not pushed to savannah, before I installed further changes today.
* maint: port to Fedora 33Paul Eggert2021-02-277-100/+124
| | | | | | | | | | | | | | | | | | | | | | | Fedora 33 uses GCC 10.2.1, which is a bit pickier. * configure.ac: Do not use -Wsystem-headers, as this runs afoul of netdb.h on Fedora 33. * gnulib.modules: Add ‘attribute’. * lib/wordsplit.c (wsnode_new): Return the newly allocated pointer instead of a boolean, to pacify GCC 10.2.1 which otherwise complains about use of possibly-null pointers. All uses changed. * src/buffer.c (try_new_volume): Don’t assume find_next_block succeeds. (_write_volume_label): Pacify GCC 10.2.1 with an ‘assume’, since LABEL must be nonnull here. * src/common.h (FALLTHROUGH): Remove; now in attribute.h. Include attribute.h, for ATTRIBUTE_NONNULL. * src/misc.c (assign_string_or_null): New function, taking over the old role of assign_string. (assign_string): Assume VALUE is non-null. (assign_null): New function, taking over the old role of assign_string when its VALUE was nonnull. All callers of assign_string changed to use these functions. (assign_string_n): Clear *STRING if VALUE is null, to fix a potential double-free.
* Update gnulib and paxutils from upstreamPaul Eggert2021-02-272-0/+0
|