On 2016-08-17 16:28:38 +0000, John Reagan said:
> On Wednesday, August 17, 2016 at 10:49:31 AM UTC-4, Stephen Hoffman wrote:
>> On 2016-08-17 02:42:33 +0000, John E. Malmberg said:
>>
>>> There is no way for DCL to query an image before it is activated to
>>> determine how to parse the arguments to it.
>>
>> Ayup. Though this can be fixed. There's a very similar existing
>> implementation within OpenVMS I64 executables with SET IMAGE /FLAGS,
>> too.
>>
>> Whether something akin to moving to application bundles and info.plist
>>
https://developer.apple.com/library/ios/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html
>> — you can put licensing and signatures, requested access entitlements
>> and such into an analogous file in a bundle, too — and toward better
>> support of packaged applications and targeting app stacking and
>> container/sandbox deployments, or something following the more
>> traditional SET IMAGE implementation and approach, maybe using an ELF
>> note section or a user section.
>>
>> A look at the whole of the C RTL settings logical name morass would be
>> nice here too, maybe providing support for application-specific
>> settings files — even if OpenVMS doesn't go as far as bundles? Have
>> the image activator and application callbacks allow access to that,
>> with some settings for OpenVMS and C and such, and have the storage
>> also available for application-specific keys and values.
>>
>
> You mean like the old MacOS resource fork or the Windows resource
> compiler (RC) that comes with Visual Studio?
Here, I was thinking more along the lines of using existing ELF data
structures intended for this sort of usage. Resource forks involve
lower-level work in the file system, and have some trade-offs.
Resource forks or other "outboard" or out-of-image mechanisms tends to
get skewed or get stripped off, and that tends to get ugly. That
skewage includes plist files and logical names, which is at the core of
various gripes — surprises from out-of-band. That outside of an
implementation that provides application bundles that is, as that would
reduce the likelihood of a skew between the application and its
settings, particularly if the bundles are signed.
Settings that are embedded within an ELF image will persist across most
typical file-related operations involving executable and shareable
images, after all.
With the ELF sections — and haven't looked at nor thought through how
feasible this inheritance might or would be — shareable images might
conceivably allow shareable-specific settings for the non-global the C
settings, though explaining and documenting that might get as messy as
implementing that.
I'm not familiar with Visual Studio and the resource compiler, but
looking at
https://msdn.microsoft.com/en-us/library/windows/desktop/aa381042(v=vs.85).aspx
and related, that looks very similar. The macOS equivalent to that is
NSUserDefaults
https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/index.html
and the users and preferences settings.
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/UserDefaults/Introduction/Introduction.html#//apple_ref/doc/uid/10000059i
In any event, if there's data embedded somewhere, there needs to be
some related callbacks to access the data. SET IMAGE is the closest
analog to that, in the existing OpenVMS environment. It's too limited,
though.
OpenVMS lacks any sort of standardized mechanism for storing this sort
of configuration or installation or preferences data, whether it's in
the bundle or in an external file or logical name or other data blob...
The old X stuff — and the name of the routines involved escapes me at
present — is one of the closest analogs that is available in OpenVMS,
and understandably almost nobody ever uses that stuff outside of
X-based applications.
http://labs.hoffmanlabs.com/node/1923
http://labs.hoffmanlabs.com/node/1733
After a while, writing and debugging and troubleshooting Yet Another
Parser for Yet Another Configuration File gets... old. it's the sort
of mechanism that's increasingly built into platforms. Or grab one of
the license-compatible libraries or frameworks, and use that.
> Besides trying to force the CRTL settings into the ELF dynamic section,
> you could also go the protected/hidden ACE route but that could be just
> as clumsy and awkward.
I've extended that particular ACL mechanism for other uses. It works,
and you'll need to implement an ACL-specific parser and formatter and
some other giblets. Biggest issue with using ACLs as a data store
tends to be encountering BACKUP /EXCHANGE and similar tools and
operations; cases where the ACLs get stripped off. (That there's such
a small and overlapping space for UIC identifiers is another and
related issue. Using UUIDs for that avoids much of that mess and the
need for tools such as ACL_SCRUB
http://labs.hoffmanlabs.com/node/426
and such. Fixing that and moving to UUIDs most everywhere would be an
overhaul bigger than V6.0, though. But I digress.)
> I've NEVER been able to edit an ACL with EDIT/ACL even with the manual
> in front of me.
That's at least partially the fault of the EDIT /ACL user interface,
and the help text in that tool and the use of the keypad certainly
don't led themselves to ease-of-use. EDIT /ACL tends toward vim or
emacs as a user interface design, and probably should have aimed rather
more toward nano / pico. Experienced users are probably going to use
SET SECURITY, after all. But then EDIT /ACL and SET SECURITY
commands, and components such as ACME and CDSA and Enterprise Directory
and other security-related pieces all tend to get pretty murky pretty
quickly, and pieces are not nearly as integrated nor as consistent as
anybody would like, and murkiness and inconsistencies around security
tends to be problematic for folks...