IRIX Tar, Replacing the most frustrating util of the IRIX userland
#21
RE: IRIX Tar, Replacing the most frustrating util of the IRIX userland
Here's a first-draft of a manpage for the modified version of tar.  Since the standard IRIX manpages are shipped pre-formated, I don't have access to the original nroff source.  I was able to (try to) recreate it with the "PolyglotMan" utility.  It needed a lot of cleaning up, though.  I then edited the re-created source to document the new z, j, and J options.

Attached is the resulting output after formatting it with tbl and nroff from the Documenter's Workbench tools (tar.txt).  After backing up the original tar manpage at /usr/share/catman/u_man/cat1/tar.z, save the attached tar.txt file as /usr/share/catman/u_man/cat/tar (without the .txt suffix), and then (optionally) run "pack" on that to compress it just like the original was.  Now "man tar" will give you the modified page, and you don't need nroff installed.

Please (everyone!) have a look and compare to the original tar manpage if you can.  There are quite likely places where I've goofed the formatting of the pre-existing text that came through the PolyglotMan re-creation process.

I haven't polished the roff source enough to share it yet, but I will soon.  I'll have to put aside this whole project for a week, though.  Then I'll try to get to addressing the known deficiencies in the C version and polishing off the manpage (including any suggestions received in this thread).

Oh, BTW, the roff source also formats correctly with mandoc in addition to the real IRIX tbl and nroff.  It almost works in the basic awf formatter, too!


Attached Files
.txt tar.txt Size: 30.73 KB  Downloads: 307

SGI:  Indigo, Indigo2, Octane, Origin 300
Sun:  SPARCstation 20 (x4), Ultra 2, Blade 2500, T5240
HP:  9000/380, 425e, C8000
Digital: DECstation 5000/125, PWS 600au
jpstewart
Developer

Trade Count: (1)
Posts: 444
Threads: 6
Joined: May 2018
Location: SW Ontario, CA
Find Reply
03-30-2020, 11:22 PM
#22
RE: IRIX Tar, Replacing the most frustrating util of the IRIX userland
Here's the long-overdue next draft of the tar wrapper in C.  Compilation instructions and options are the same as before.

This version has been enhanced to be more selective about quoting arguments that get passed through to the real tar program.  It now only quotes arguments that contain at least one shell meta-character, and it's also careful to properly handle embedded single quotes in an argument.  So the previous warning that you can't specify filenames containing single quotes no longer applies.

The environment variables TAR_GZIP, TAR_BZIP2, and TAR_XZ can be used to override the built-in default compression programs at runtime.  You no longer need to re-compile it to change them.  They can either be simple program names in which case it will respect your PATH, or they can be full paths to the binaries.

The attached tar file also contains the updated (and cleaned up) source for the man page.  It has to be pre-processed with tbl, then either nroff (for text output) or psroff (PostScript) all from the Documenter's Workbench CD.  Or mandoc works for ASCII output but not PostScript.  (There's a table that doesn't get processed correctly in PostScript mode for some reason.)

Sorry it has taken so long.  Frankly I'm having a hard time finding motivation to do anything with all the Covid-related restrictions we're under with no end in sight.  It's really got me down when it should be giving me lots of time to work on stuff like this.


Attached Files
.gz tar_wrapper.tar.gz Size: 12.7 KB  Downloads: 225

SGI:  Indigo, Indigo2, Octane, Origin 300
Sun:  SPARCstation 20 (x4), Ultra 2, Blade 2500, T5240
HP:  9000/380, 425e, C8000
Digital: DECstation 5000/125, PWS 600au
jpstewart
Developer

Trade Count: (1)
Posts: 444
Threads: 6
Joined: May 2018
Location: SW Ontario, CA
Find Reply
04-18-2020, 11:27 PM
#23
RE: IRIX Tar, Replacing the most frustrating util of the IRIX userland
Yikes, I can't believe how long it has been since the last draft. 

Unless there are major complaints or serious bugs, this is likely to be my last draft.  All that's changed is added support for a TAR_REAL environment variable to override the name of the actual IRIX tar program at runtime, like the compressor overrides.  And it is documented in the man page.

I still don't check overflowing the command buffer but it's very unlikely to happen.  (That had been planned for this release.)  As far as I can tell, you'd have to pass in enough arguments to almost (but not quite) fill the command line buffer.  Then, if after adding the compression command, it does overflow you'll be in trouble.  But that's the only way I can see that the wrapper would have a problem when plain tar wouldn't.  You've got to be very close to the limit to trigger it.  (And the limit is 256kb!)  Unless I'm missing something....

I've lost my motivation for everything in the last few weeks.  Questions, comments, and bug reports are welcome.  They may just help me get motivated to work on it more.  Or if somebody else wants to pick it up and run with it, by all means, go for it.


Attached Files
.gz tar_wrapper.tar.gz Size: 12.58 KB  Downloads: 205

SGI:  Indigo, Indigo2, Octane, Origin 300
Sun:  SPARCstation 20 (x4), Ultra 2, Blade 2500, T5240
HP:  9000/380, 425e, C8000
Digital: DECstation 5000/125, PWS 600au
jpstewart
Developer

Trade Count: (1)
Posts: 444
Threads: 6
Joined: May 2018
Location: SW Ontario, CA
Find Reply
06-06-2020, 12:25 AM
#24
RE: IRIX Tar, Replacing the most frustrating util of the IRIX userland
I will update this and get it into the first patch set. I appreciate your hard work.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,240
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
06-06-2020, 01:00 AM
#25
RE: IRIX Tar, Replacing the most frustrating util of the IRIX userland
(06-06-2020, 01:00 AM)Raion Wrote:  I appreciate your hard work.

That's nice of you to say, but it wasn't "hard" work.  It was only a few hours spread out over several months.  I get distracted easily, so didn't work on it as much as I should have.  And motivation was hard to come by.  It's the sort of thing I actually enjoy doing (and should do more of) since it is a small enough project that I can see the light at the end of the tunnel, so to speak.  Plus I'm an old-school C guy.  When you first mentioned the idea of adding compression support while maintaining compatibility with the native tar it sounded like a good idea for a useful tool.  But the lack of feedback from anybody other than you kind of left me thinking maybe nobody else will use it.  And that made it hard to motivate myself to finish.

SGI:  Indigo, Indigo2, Octane, Origin 300
Sun:  SPARCstation 20 (x4), Ultra 2, Blade 2500, T5240
HP:  9000/380, 425e, C8000
Digital: DECstation 5000/125, PWS 600au
jpstewart
Developer

Trade Count: (1)
Posts: 444
Threads: 6
Joined: May 2018
Location: SW Ontario, CA
Find Reply
06-06-2020, 11:45 PM
#26
RE: IRIX Tar, Replacing the most frustrating util of the IRIX userland
People will use it if we get them to take things seriously that's my view.

You look at projects that have very radical changes to things. Such as libdicl, or the RPM Software Environment. There are people using that. the reason they're using it is because it's packaged in a specific way.

So it's my job to make sure that this is patchable. And it's the reason that I'll eventually be making custom distributions of IRIX.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,240
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
06-06-2020, 11:54 PM
#27
RE: IRIX Tar, Replacing the most frustrating util of the IRIX userland
This interim solution that I worked out works perfectly! I've fully tested it on large ".tar.gz" files, and it works perfectly and it's allot simpler than going to the trouble of writing something new!

Irinikus
Hardware Connoisseur

Trade Count: (0)
Posts: 3,475
Threads: 319
Joined: Dec 2017
Location: South Africa
Website Find Reply
09-06-2020, 06:54 AM


Forum Jump:


Users browsing this thread: 1 Guest(s)