From c17976eba549f44cbc34233cfaac4faddb3918c0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 30 Sep 2026 21:18:49 -0700 Subject: [PATCH] tar: drop RTU support Masscomp, which became Concurrent, dropped support for RTU in the early 2000s, and there is no longer a need for tar to worry about it. * src/create.c (file_dumpable_p, dump_regular_file, dump_file0): Do not worry about S_ISCTG; assume it always returns 0. --- NEWS | 5 ++++- doc/intern.texi | 8 ++++---- src/create.c | 8 ++------ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index 5018327b..7b05757f 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -GNU tar NEWS - User visible changes. 2026-08-21 +GNU tar NEWS - User visible changes. 2026-09-30 Please send GNU tar bug reports to version 1.35.90 (git) @@ -44,6 +44,9 @@ option. Formerly, the behavior was undocumented and differed from one tar version to the next. +** Support for RTU-style contiguous files has been withdrawn. + RTU’s supplier dropped support for RTU decades ago. + * Bug fixes ** When extracting, tar no longer follows symbolic links to targets diff --git a/doc/intern.texi b/doc/intern.texi index 436bf622..87f45b0d 100644 --- a/doc/intern.texi +++ b/doc/intern.texi @@ -242,10 +242,10 @@ FIFO file archives the existence of this file and not its contents. @item @code{CONTTYPE} This specifies a contiguous file, which is the same as a normal -file except that, in operating systems which support it, all its -space is allocated contiguously on the disk. Operating systems -which do not allow contiguous allocation should silently treat this -type as a normal file. +file except that in the old RTU operating system that implemented it, +all the file space was allocated contiguously on disk. +Today's operating systems do not consider contiguous files to be a +separate type, and @command{tar} extracts these files like regular files. @item @code{A} @dots{} @code{Z} These are reserved for custom implementations. Some of these are diff --git a/src/create.c b/src/create.c index 89d50937..ec8331e5 100644 --- a/src/create.c +++ b/src/create.c @@ -454,7 +454,7 @@ file_dumpable_p (struct stat const *st) { if (S_ISDIR (st->st_mode)) return true; - if (! (S_ISREG (st->st_mode) || S_ISCTG (st->st_mode))) + if (!S_ISREG (st->st_mode)) return false; if (dev_null_output) return totals_option && sparse_option && ST_IS_SPARSE (*st); @@ -1028,10 +1028,6 @@ dump_regular_file (int fd, struct tar_stat_info *st) if (!blk) return dump_status_fail; - /* Mark contiguous files, if we support them. */ - if (archive_format != V7_FORMAT && S_ISCTG (st->stat.st_mode)) - blk->header.typeflag = CONTTYPE; - finish_header (st, blk, block_ordinal); mv_begin_write (st->file_name, st->stat.st_size, st->stat.st_size); @@ -1712,7 +1708,7 @@ dump_file0 (struct tar_stat_info *st, char const *name, char const *p) if (!is_dir && dump_hard_link (st)) return allocated; - if (is_dir || S_ISREG (st->stat.st_mode) || S_ISCTG (st->stat.st_mode)) + if (is_dir || S_ISREG (st->stat.st_mode)) { bool ok; struct stat st2;