How to generate uuid in solaris 11? - solaris

How to generate UUID in solaris 11?
In Solaris 10 i was using makeuuid command to generate.
I can not find it in solaris 11 while it exist as per oracle documents
https://docs.oracle.com/cd/E23824_01/html/821-1462/makeuuid-1m.html
but I can't find it, also I can not find the container package.

You can also use the very small Python program below. Would this help?
$ cat bin/uuidgen.py
#!/usr/bin/python
import uuid
print(uuid.uuid4())
$ uuidgen.py
c4f248e9-c398-4054-9208-6badd366f857

Searching for makeuuid in all Solaris 11 packages:
# pkg search -flr makeuuid
INDEX ACTION VALUE PACKAGE
basename file usr/bin/makeuuid pkg:/system/management/product-registry#0.5.11-0.151.0.1
OK, what about that package?
# pkg info -r pkg:/system/management/product-registry
Name: system/management/product-registry
Summary:
State: Not installed (Obsolete)
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.171
Packaging Date: August 1, 2011 04:48:45 PM
Size: 5.45 kB
FMRI: pkg://solaris/system/management/product-registry#0.5.11,5.11-0.171:20110801T164845Z
Note that the package is obsolete. You can try force-installing it, but the Solaris 11 package system might remove it on your next update.
I'm not sure why it's obsolete, but the man page you linked is part of the DCE/RPC OpenGroup specification from 1997. The version string 0.5.11-0.151.0.1 seems to indicate an old OpenSolaris/Nevada package, likely from SNV version 151.
Note that makeuuid is not in the Solaris 11.3 man pages section 1M.
If you really want that makeuuid binary, you should be able to download the package locally following this procedure: https://serverfault.com/a/348265/283415 Once you have the package on your local system, you should be able to take it apart and pull out the makeuuid binary. Note that grabbing the binary from the package won't install any dependencies, and the makeuuid binary from that old package may not work or it might work improperly on your later system.

Related

How best to handle previously installed modules when upgrading Perl version with homebrew

I run into this every so often: I run a brew install foobar and as a result, Perl version gets updated. Whenever this happens, the Perl modules that I had installed are no longer found because they were installed in /usr/local/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0/ and the new version is now looking in /usr/local/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.1_1/.
I have/had a ton of modules installed with the previous version and I'd rather not reinstall all of them (at least manually). What's the best way to have the previously-installed modules work with the new Perl version?
For such a small version change above, I could presumably just copy all of the files from the 5.32.0 dir to the 5.32.1_1 dir, but preferably there is a more general and/or robust solution for when the version change is more substantial.
The cpan command can make an "autobundle" file. You'd use the cpan from the prior installation to do this:
$ cpan -a
Creating autobundle in /Users/brian/.cpan/Bundle
Reading '/Users/brian/.cpan/Metadata'
Database was generated on Fri, 19 Mar 2021 05:41:03 GMT
Package namespace installed latest in CPAN file
Algorithm::C3 0.11 0.11 HAARG/Algorithm-C3-0.11.tar.gz
Algorithm::Cron 0.10 0.10 PEVANS/Algorithm-Cron-0.10.tar.gz
Algorithm::Diff 1.1903 1.201 RJBS/Algorithm-Diff-1.201.tar.gz
...
version::regex 0.9924 0.9928 LEONT/version-0.9928.tar.gz
vmsish 1.04 1.04 SHAY/perl-5.32.1.tar.gz
warnings 1.47 1.47 SHAY/perl-5.32.1.tar.gz
warnings::register 1.04 1.04 SHAY/perl-5.32.1.tar.gz
Wrote bundle file
/Users/brian/.cpan/Bundle/Snapshot_2021_03_20_00.pm
At the top of that file, there are instructions on installing it. Use the cpan from the new installation to handle this part:
package Bundle::Snapshot_2021_03_20_00;
$VERSION = '0.01';
1;
__END__
=head1 NAME
Bundle::Snapshot_2021_03_20_00 - Snapshot of installation on otter on Sat Mar 20 00:19:35 2021
=head1 SYNOPSIS
perl -MCPAN -e 'install Bundle::Snapshot_2021_03_20_00'
I hardly ever do this though. When I install a new perl and want to use a new project on it, I install the project. That project installs whatever it needs. I like the fresh start instead of carrying over stuff I might not be using anymore.
Also, note that cpan installs the latest versions of whatever you are asking for. If you need particular versions, cpanm is easier to handle. And, in that case, you might consider using a cpanfile to lock down exactly what you want.

cpanm not finding newer version in local mirror

I created some proprietary Perl modules I can't share so I put them into a local "darkpan" with orepan2. Here is the beginning of 02packages.details.txt.
[~] $ gunzip -c darkpan/modules/02packages.details.txt.gz
File: 02packages.details.txt
URL: http://www.perl.com/CPAN/modules/02packages.details.txt
Description: DarkPAN
Columns: package name, version, path
Intended-For: Automated fetch routines, namespace documentation.
Written-By: OrePAN2 0.47
Line-Count: 30
Last-Updated: Wed Apr 24 15:44:46 2019
MyProj::MyMod 1.201904241840 D/DU/DUMMY/MyProj-MyMod-v1.20190424.1840.tar.gz
When I type
cpanm --mirror=file:///path/to/darkpan --mirror-only MyProj::MyMod
it responds that MyProj::MyMod is up-to-date even though the version in darktab is newer. To get it to install, I have to say "MyProj::MyMod-201904241840" on the command line.
Why won't cpanm recognize that the version in the darkpan index is newer than the one installed?
Why can't I just say
cpanm --mirror=file:///path/to/darkpan --mirror-only MyProj-MyMod
in order to load this as a module and not a single package?
as far as I know, cpanm is right, ‘up-to-dateness’ is based on the fact that something is installed that fits the minimal version specified... which you didn’t. correct me if i’m wrong, but there is a reinstall option that would do the trick and get any latest it can find

Doxygen generated latex failing with pdflatex

I have generated latex with doxygen, then I run the make pdf command.
This is the first time I tried it.
[mysite.lan] (liberz) latex> make pdf
rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf
pdflatex refman
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
restricted \write18 enabled.
kpathsea: Running mktexfmt pdflatex.fmt
/usr/bin/mktexfmt: line 395: /usr/share/texlive/texmf/texconfig/tcfmgr: No such file or directory
fmtutil: config file `fmtutil.cnf' not found.
I can't find the format file `pdflatex.fmt'!
make: *** [refman.pdf] Error 1
I looked at the mkexfmt command and it is trying to invoke tcfmgr as a command.
The /usr/share/texlive/texmf/texconfig folder exists, but there is no tcfmgr command in it.
Previously I was getting the pdflatex command was not found, so that is recently installed.
[edit to answer version information question] I am sure I need to install more tools, but it is not clear what packages I need to install. I am using CentOS 7.1.
> pdflatex -version
pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)
kpathsea version 6.1.1
Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.5.13; using libpng 1.5.13
Compiled with zlib 1.2.7; using zlib 1.2.7
Compiled with poppler version 0.22.5
Doxygen PDF output depends on pdflatex command, which in CentOS 7 is provided by texlive-latex-bin-bin package, but runnig make pdf invokes yet another command, tcfmgr, which is provided by texlive-texconfig, hence, run the following command to install those dependencies:
yum install -y texlive-latex-bin-bin texlive-texconfig
You can check which packages provide any necessary file:
$ yum --quiet provides "*bin/pdflatex"
...
2:texlive-latex-bin-bin-svn14050.0-38.20130427_r30134.el7.noarch :
Binaries for latex-bin
Repo : base
Matched from:
Filename : /usr/bin/pdflatex
$ yum --quiet provides /usr/share/texlive/texmf/texconfig/tcfmgr
...
2:texlive-texconfig-svn29349.0-38.el7.noarch : texconfig package
Repo : base
Matched from:
Filename : /usr/share/texlive/texmf/texconfig/tcfmgr
But even with these 2 basic requirements satisfied, I found that many other messages followed, and the whole list to reduce warnings was:
xargs <<_EOF_ yum -y install
texlive-latex-bin-bin
texlive-texconfig
texlive-metafont-bin
texlive-iftex
texlive-cm
texlive-xtab
texlive-multirow
texlive-ec
texlive-sectsty
texlive-fancyhdr
texlive-natbib
texlive-tocloft
texlive-tex4ht
texlive-helvetic
texlive-pslatex
texlive-courier
texlive-times
texlive-metapost
texlive-symbol
texlive-rsfs
texlive-dvips
texlive-base
texlive-makeindex-bin
_EOF_
...
Transaction Summary
==============================================================================================================================
Install 23 Packages (+132 Dependent packages)
Total download size: 43 M
Installed size: 134 M
...
And yet Tex2PDF conversion produces many warnings, but the resulting document is quite satisfatory.
[Edited on Nov 8th]
If you want a "recommended" package installation, you might choose one of these "virtual" packages that require other sets of packages, to compose a more "complete" Latex environment, in order of higher comprehensiveness:
texlive-collection-latex : LaTeX fundamental packages
texlive-collection-latexrecommended : LaTeX recommended packages
texlive

How to check version of libpkcs11 on Solaris

As stated in subject. How to check in terminal which version of pkcs11 I've got on SunOS 5.11?
How is it possible to update this library? It is causing me some issues to my Java standalone application.
Thanks!
The libpkcs11 library is part of the Solaris 11 system/library package. You query the package and its version with this command:
$ pkg search -l /usr/lib/libpkcs11.so
INDEX ACTION VALUE PACKAGE
path link usr/lib/libpkcs11.so pkg:/system/library#0.5.11-0.175.2.0.0.42.2
Should you want to update it, you need to update Solaris 11 itself to a newer version (eg: 11.2 or a newer SRU)

GtkMozEmbed module in PyGtk

I'm working on a soloution that needs the gtkMozembed module for python.
I had installed the pygtk2 and genome-python-* packages.
But still i don't have the gtkmozembed module. Can any one tell me how can i install this module.?
I'm also searching for some good repositories for CentOS so that I can update the latest packages. All the repositories now I have, do not maintain the updated packages.
I use CentOs 6.0.
Before continuing, note that gtkmozembed is deprecated, abandoned by the authors and therefore not packaged in CentOS 6 or Ubuntu Oneiric and later:
https://lists.ubuntu.com/archives/ubuntu-devel/2011-May/033229.html
https://groups.google.com/forum/#!topic/mozilla.dev.embedding/c_NMcO-N8wo/discussion
Therefore any use of gtkmozembed is temporary. You may wish to consider the following alternatives which are available as RPM packages on CentOS 6:
pywebkitgtk : Python Bindings for WebKitGTK+
gnome-python2-gtkhtml2 : Python bindings for interacting with gtkhtml2
I managed to download gnome-python2-extras from CentOS 5 and build it on CentOS 6 with the following commands:
rpm -ivh http://vault.centos.org/5.7/os/SRPMS/gnome-python2-extras-2.14.2-7.el5.src.rpm
# edit ~/rpmbuild/SPECS/gnome-python-extras.spec
# comment out the line starting with %patch1
rpmbuild -ba ~/rpmbuild/SPECS/gnome-python-extras.spec