Karaf configuration - apache-karaf

When installing karaf in one computer and shifting it to another, lot of base directories have deafult path made during installation.
how to change the variables KARAF_BASE, KARAF_ETC, KARAF_DATA in karaf?

Have a look at your karaf–folder/bin/setenv(.bat/.sh)

In karaf–folder/bin/karaf.bat, you can override these variables.
Example:
-Dkaraf.etc="%KARAF_HOME%\..."
Note: you can also customize the KARAF_HOME variable at the begin of the karaf.bat script.

You can change KARAF environment variables in bin/setenv Unix script .

Related

What is the difference between local_settings.py and settings.py in openstack_dashboard?

Hi i have installed openstack-dashboard and i noticed that exists two files of configuration local_settings.py in /etc/openstack_dashboard and settings.py in /usr/share/openstack_dashboard so can you tell me the difference between them .
Thank you in advance.
The file in /usr/share/openstack_dashboard/... contains the default application settings.
The file /etc/openstack_dashboard/local_settings.py contains overrides that are particular to your environment.
You would edit the latter to make configuration changes in your environment, but not the former. The file in /usr/share/openstack_dashboard/... will be replaced on package updates/new version installs, but the file in /etc/openstack_dashboard should be preserved on upgrades.

Installing Capistrano with a specific config dir

I have a Symfony2 application that I would like to deploy using Capistrano3. Performing cap install creates a config directory in the projectroot. To keep my project clean, I would like it to install the config dir into something like app\config\capistrano. Is this possible? I cannot find any hints in the documentations.
Found the anwser in a pull request on Github.
Enter the following two lines to your Capfile, before capistrano\setup beign called.
set :deploy_config_path, 'app/config/deploy.rb'
set :stage_config_path, 'app/config/deploy'
`
It is implemented in the 3.1.x branch
Look at your Capfile and change the path to the config file. This should be enough.

How to change global variable in Solaris?

I've tried to change global variable DSQUERY in Solaris with this command:
setenv DSQUERY "SYBSERVER"
but it wasn't persisted. When I entered again in the machine the value was set to the older one.
How can I persist this change?
You have to put this line in your profile file. This file is read when you start a shell, and allows you to set-up some specific settings.
The filename depends on the shell you use and how you connect (with a direct connexion or with a su for example).
It seems you use csh, so you will have to change $HOME/.cshrc and.or $HOME/.login files.
Add your SetEnv command to .cshrc and .login file will do the job.
You have to do it in the user profile files, depending on the shell being used (.login, .cshrc, .bashrc, etc) so that when you log in again, it's executed automatically. There are global versions of those files under /etc for some shells, in case you want that to be applied to all users.
Rgds,
Daniel

How to make use of the INSTALL_ROOT that resides in generated Makefiles?

qmake generates the following (among the others) rule for installing a target:
-$(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/$(TARGET)"
I cannot set INSTALL_ROOT with something like this in a *.pro file
isEmpty(INSTALL_ROOT) {
INSTALL_ROOT=/usr
}
because INSTALL_ROOT is somehow local to generated Makefiles. According to what I've found out so far INSTALL_ROOT is empty by default. It could be used like
INSTALL_ROOT=$HOME make install
when invoking make, which is fine. However I want to be able to specify default installation root, say /usr. I can do it introducing a new variable PREFIX as suggested here.
Then generated rule will look like (if PREFIX was set to /usr)
-$(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/usr/$(TARGET)"
however
INSTALL_ROOT=$HOME make install
installs target to /home/<user_name>/usr/$(TARGET) which is not that one would expect.
So setting INSTALL_ROOT to some default value will produce consistent behavior, which is superior to adding PREFIX, but how to set INSTALL_ROOT in a *.pro file?
What is the purpose of INSTALL_ROOT is it supposed to be used at all?
INSTALL_ROOT is for use with package building systems, like NSIS, debian, or any other way for parcelling up built software and delivering it.
For this purpose you want the result of
INSTALL_ROOT=$PWD/package_root make install
to create a tree under $PWD/package_root that exactly mimics that on your target system you plan to deliver to. Note that you need INSTALL_ROOT to be a full path (hence the $PWD), not a relative path.
When you create your package you can compress that tree into an archive and then your installation process simply uncompresses the same tree on to the target file-system.
$PWD/package_root/usr/bin/my_binary
would get installed to
/usr/bin/my_binary
on the target.
So that is the answer to the question what INSTALL_ROOT is for. To answer how to specify "default installation root" requires more information about what you want to achieve.
Have a look at the output of qmake -query:
sez#ubuntu-11.10:~$ qmake -query
QT_INSTALL_PREFIX:/usr
QT_INSTALL_DATA:/usr/share/qt4
QT_INSTALL_DOCS:/usr/share/qt4/doc
QT_INSTALL_HEADERS:/usr/include/qt4
QT_INSTALL_LIBS:/usr/lib/i386-linux-gnu
QT_INSTALL_BINS:/usr/bin
<snipped>
QT_VERSION:4.7.4
and the use of the INSTALLS variable in qmake: http://doc.qt.digia.com/qt/qmake-environment-reference.html#installs - and How do I specify input the QMake INSTALLS variable?
By default if you just do
target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
Then your binary will get installed in whatever qt thinks is the right place, QT_INSTALL_BINS. You can change those defaults of course by setting target.path to something else. Qt supplies those paths but its up to you to use them or not.
You could do
MY_DEFAULT_INSTALL=/opt/myproj
somedocs.files = docs/index.html
somedocs.path = $$MY_DEFAULT_INSTALL/docs
target.path = $$MY_DEFAULT_INSTALL/bin
INSTALLS += somedocs target
for example, where MY_DEFAULT_INSTALL is the one place in your .pro file that defines the default for installs.
I'm answering for Windows here. You appear to be using UNIX, Linux, or Mac OS X so you may have to make a few changes.
INSTALL_ROOT is a poorly documented feature that appears to have been added so that those without root or admin access can install Qt in their local filesystem. It's actually a bit of a hack since, as you have already seen, it is not possible to specify an arbitrary target, but you can always move the files to the desired location afterwards.

How to change package destination folder in CPack?

I have a multiple module CMake project with a root CMakeLists.txt with multipe add_subdirectory macros.
As far as I understand the default for CPack/CMake is to create package in project root folder, where root CMakeLists.txt resides. I would like to create a separate install module, with its own folder and create packages there? How to do this?
To get the created packages in the "packages" subdirectory of your build directory, use:
SET(CPACK_OUTPUT_FILE_PREFIX packages)
Use the CPack variable CPACK_PACKAGE_DIRECTORY.
Example:
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Packaging")
Do not use the non-documented variable CPACK_OUTPUT_FILE_PREFIX as suggested in one of the answers. It makes the -B argument of the cpack command unusable (tested with CMake v3.21.0).
Also note that the variables CPACK_PACKAGE_FILE_NAME and CPACK_TOPLEVEL_TAG mentioned in the accepted answer are unrelated to the package (output) directory used by CPack.
Take a look at the CPACK_TOPLEVEL_TAG and the CPACK_PACKAGE_FILE_NAME variables in the documentation.

Resources