What is the nature of a "MVFS filesystem" with ClearCase? - unix

What does MVFS in a clearcase server?

MVFS (Multi-Version Filesystem) don't so much "create" a filesystem, but give you access to one.
M: (on Windows) or /view (on Unix) is a mounting point allowing to browse the content of any Vob (the ClearCase repositories) you mount (like a classic network mount, but made by ClearCase).
When you create a dynamic view, you will use MVFS to browse the "dynamic" filesystem, meaning you want load any file on your hard disk: you will remotely see any version you have selected through the config spec of the view.
See About the MultiVersion File System (MVFS):
The MultiVersion File System (MVFS) creates a virtual file system specifically designed for accessing data within a Rational ClearCase VOB.
The MVFS works similarly to UNIX® Network File System (NFS), in that it loads a kernel driver that presents a file system to the user through a standard interface within the Windows, UNIX or Linux kernel.
Notes:
a snapshot view won't use MVFS (see "What are the differences between a snapshot view and a dynamic view?")
With a dynamic view, you can directly browse any version you want, using extended pathnames.
Any read/write operation is done through cleartool and ClearCase: you cannot, as you tried in your previous question "rm doesn't detect failure of fchdir in walkfs", to rm elements through a Unix rm or Windows del. Only cleartool command can modify an element managed by ClearCase in a dynamic view.

Related

How to use LibTiff.NET Tiff2Pdf in .NET 6

I want to provide support to convert single-page and multi-page tiff files into PDFs. There is an executable in Bit Miracle's LibTiff.NET called Tiff2Pdf.
How do I use Tiff2Pdf in my application to convert tiff data stream (not a file) into a pdf data stream (not a file)?
I do not know if there is an API exposed because the documentation only lists Tiff2Pdf as a tool. I also do not see any examples in the examples folder using it in a programmatic way to determine if it can handle data streams or how to use it in my own program.
libtiff tools expect a filename so the background run shown below is simply from upper right X.tif to various destinations, first is default
tiff2pdf x.tif
and we can see it writes a tiff2pdf file stream to console (Standard Output) however it failed in memory without a directory to write to. However on second run we can redirect
tiff2pdf x.tif > a.pdf
or alternately specify a destination
tiff2pdf -o b.pdf x.tif
So in order to use those tools we need a File System to receive the file objects, The destination folder/file directory can be a Memory File System drive or folder.
Thus you need to initiate that first.
NuGet is a package manager simply bundling the lib and as I don't use .net your a bit out on a limb as BitMiricle are not offering free support (hence point you at Stack Overflow, a very common tech support PLOY, Pass Liability Over Yonder) however looking at https://github.com/BitMiracle/libtiff.net/tree/master/Samples
they suggest memory in some file names such as https://github.com/BitMiracle/libtiff.net/tree/master/Samples/ConvertToSingleStripInMemory , perhaps get more ideas there?

missing sqlite3 history file

I cannot find the command history created by sqlite3.
I have both Windows and Cygwin version.
Using the Windows binary, I can use up/down arrow to see previous commands, even from previous runs of command. But I can't find the file .sqlite_history. This answer suggests it should be in the home directory, but I can't find it there. I do have working a .sqliterc so I know it is the correct directory.
Using the Cygwin binary, I can't get the history to work at all. It seems history is not saved at all?
On the documentation page I cannot find any mention of history at all.
For Windows console programs, the command history is handled by the Windows console itself. There are separate history buffers for different programs and different console sessions, and these buffers are not stored anywhere by default. However, you can use the doskey tool to manage them manually.
Cygwin uses Windows pipes to emulate the Unix tty devices; this often results in programs not detecting that they are running in a console. Try running the program both from within the Cygwin shell and from the Windows shell.
The SQLITE_HISTORY environment variable, if it exists, specifies
the name of the command-line editing history file
To repeat the last command, just press the ↑ key, to search for older
ones — use Ctrl+R shortcut. History search It's faster to find a query than to type it again
By default, SQLite stores the history file in the user’s home directory
and names it .sqlite_history It’s in plain text, so you can view it
in your favorite editor. If you prefer to save it elsewhere, specify
the full path in the SQLITE_HISTORY environment variable.
source: https://antonz.org/sqlite-history
e.g:
cd ~
nano .sqlite_history

mkfifo command failing on clearcase vobs

I am trying to create named pipe in a directory which is created under clearcase's vobs tree (/vobs/something/something) but not checked-in. I am getting this error:
"mkfifo: No such device or address"
I am not able to understand why pipe creation is failing while other files are getting created.
I am using Solaris 10. Is there any way I can create named pipes in vobs?
/vobs/something/something means MVFS path with a view set (as in cleartool setview).
First, try the same operation with the fumm path instead of trying to set a view. As I explain in "Python and ClearCase setview", setting a view creates a sub-shell, with all kinds of side effect for your processes (in term of environment variables and other non-heirted attributes).
So try it in /views/MyView/vobs/something/something.
Second, regarding pipe, check if this thread applies to your case:
Just off the top of my head if you using a pipe and not a file, then it should be specified something like this ..
destination my_pipe pipe("/data/pipes/net_pipe");
rather than
destination my_file file("/data/pipes/net_pipe");
Note that, for ClearCase up to 7.0.x:
ClearCase does not support adding to source control special files such as named pipes, fifos or device files. There are no type mangers available to manage these special files.
Note: Attempts to execute these files in the MVFS is not supported.
WORKAROUNDS:
Keep multiple versions of directories with device files outside of a VOB and versioned directories/symlinks in a VOB to point to correct directory location outside the VOB.
Keep a tar or zip archive of the tree with device files in the VOB, and extract it to a temporary workspace when needed in the development process.

Need encrypted virtual filesystem tool

I am currently working on a project where i need to store few files and folders in encrypted manner. This project will be platform independent and hence will be written in Java.
Instead of encrypting individual file and folder, we have been thinking of using some virtual file-system where a single container file will hold complete file-system.
Most of the open source virtual encrypted file-system tools we studied work on following principle.
mount the virtual file system (using secure password)
use this filesystem
finally dismount it
But the main problem here we face is that anyone who has access of the PC (e.g. network admin) will be able to see decrypted files when virtual drive is mounted. We want to restrict access to encrypted file system at process level. No one else in same OS session should be able to see the contents, hence no drive mounting, etc.
So we are looking for some open source tool which will provided some some APIs using which we will be able to access files in encrypted container without mounting it.
can anyone point us to any such library?
This thing I'd normally say was pretty cool.
http://www.pismotechnic.com/pfm/
But I've recently accidently copied a sub-repository in a mercurial repository to another folder and when that happened a lot of files got magically messed up. If you don't mind possible issues like that (eg. keeping backups) this could be a solution for you.
I've stumbled upon this question while hunting for an alternative because corrupted files are definitely not on my requirement list.

Does Adobe Air have unconstrained file system access?

I've found several examples and documentation that show how to read and write files on the system, but all show user intervention or reading/writing files in user profile directories. There are a few things I want to do:
Monitor system and other application log files for changes, then automatically load those files when changes occur
Reload a previously open file when the application launches
Write files into a log directory, which probably will not exist in the same path as the application.
In my very quick search, it seems that there may be a security model that constrains an AIR application's access to the file system, so that files can only be read or written to directories selected by the user with the file system dialog OR files can be written within the user profile or air application directory.
Does an Adobe Air application have unconstrained access to the file system?
AIR has exactly the same access to the file system as the current User. If you are admin on your computer, AIR har full access to all files. If you are a restricted user, AIR has restricted access.
One thing to be mindful of is that if you load swf:s from the AIR app's home directory, it will be run in the Application sandbox. If you read it from outside, it will be executed within a File sandbox which is essentially the same as loading from the web.
Some comments on your list:
1 Monitor system and other application log files for changes, then automatically load those files when changes occur
As far as I know, AIR cannot monitor the file system. You will have to poll this regularly.
2 Reload a previously open file when the application launches
Save this info in a file or SQLite and check it when the app starts.
3 Write files into a log directory, which probably will not exist in the same path as the application.
The main thing to remember is to use the file path abstractions in AIR rather than OS specific paths such as c:/
I would say your answer depends on the platform. I'm sure that Adobe Air does not automatically have root access on OS X, so it would not be able to read, write and execute in cases where whatever owner started the AIR app did not have the right permissions for accessing a file. In short, you probably have the same privileges any other program running on the computer might have that was installed by the same user.
More information here:
http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7f05.html#WS5b3ccc516d4fbf351e63e3d118666ade46-7e35

Resources