How to change composer global vendor directory in ubuntu - linux

Something is wrong with my composer local installation.
I'm under ubuntu 22, my global vendor directory path is pointing to a project directory and not to a SO global directory, such as /home/username/.composer/vendor.
Take a look to this output
composer config --global -l
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///home/gik/.local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:879
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///home/gik/.local/bin/composer/src/Composer/Autoload/AutoloadGenerator.php:884
[repositories.packagist.org.type] composer
[repositories.packagist.org.url] https://repo.packagist.org
[process-timeout] 300
[use-include-path] false
[use-parent-dir] prompt
[preferred-install] dist
[notify-on-install] true
[github-protocols] [https, ssh]
[gitlab-protocol]
[vendor-dir] vendor (/home/username/workspaces/myproject/vendor)
[bin-dir] {$vendor-dir}/bin (/home/username/workspaces/myproject/vendor/bin)
[cache-dir] /home/username/.cache/composer
[data-dir] /home/username/.local/share/composer
[cache-files-dir] {$cache-dir}/files (/home/username/.cache/composer/files)
[cache-repo-dir] {$cache-dir}/repo (/home/username/.cache/composer/repo)
[cache-vcs-dir] {$cache-dir}/vcs (/home/username/.cache/composer/vcs)
[cache-ttl] 15552000
[cache-files-ttl] 15552000
[cache-files-maxsize] 300MiB (314572800)
[cache-read-only] false
[bin-compat] auto
[discard-changes] false
[autoloader-suffix]
[sort-packages] false
[optimize-autoloader] false
[classmap-authoritative] false
[apcu-autoloader] false
[prepend-autoloader] true
[github-domains] [github.com]
[bitbucket-expose-hostname] true
[disable-tls] false
[secure-http] true
[cafile]
[capath]
[github-expose-hostname] true
[gitlab-domains] [gitlab.com]
[store-auths] prompt
[archive-format] tar
[archive-dir] .
[htaccess-protect] true
[use-github-api] true
[lock] true
[platform-check] php-onl
[home] /home/username/.config/composer
The question are: How can i change this directory path (vendor-dir and bin-dir) ? Why I am experiencing this problem? What I did wrong?
I tried to check if there is a "set" command that allows me to update this global config variables vendor-dir and bin-dir with no results.

I managed to do it using different searching keywords
As suggested here https://github.com/composer/composer/issues/4450
You can update whatever variable in your configuration (either global or local) using the following command:
composer config variable_name variable_value
hope this helps.

Related

how to get the source code of a RPM package

I want to get the source code of an RPM package, with all patches applied. (what the apt source do)
For example, bash. Here is something I've tried.
Firstly, I download the src RPM package via yumdownloader:
yumdownloader --source bash
Then, I got a package named bash-4.2.46-35.el7_9.src.rpm. I used the following command to extract this file:
rpm2cpio bash-4.2.46-35.el7_9.src.rpm | cpio -ivdm
Then, I got the following files:
[root#ce944fc560a2 src]# ls
bash-2.02-security.patch bash-3.2-ssh_source_bash.patch bash-4.2-cve-2014-7169-0.patch bash-4.2-man-ulimit.patch bash-4.3-cve-2016-0634.patch bash-5.0-syslog-history.patch bash42-003 bash42-013 bash42-023 bash42-033 bash42-043
bash-2.03-paths.patch bash-4.0-nobits.patch bash-4.2-cve-2014-7169-1.patch bash-4.2-manpage.patch bash-4.3-cve-2016-7543.patch bash-bashbug.patch bash42-004 bash42-014 bash42-024 bash42-034 bash42-044
bash-2.03-profile.patch bash-4.1-broken_pipe.patch bash-4.2-cve-2014-7169-2.patch bash-4.2-manpage_trap.patch bash-4.3-dircomp-append-slash.patch bash-cve-2016-9401.patch bash42-005 bash42-015 bash42-025 bash42-035 bash42-045
bash-2.05a-interpreter.patch bash-4.1-defer-sigchld-trap.patch bash-4.2-double-alloc.patch bash-4.2-missing-opt-cd.patch bash-4.3-pipefd-leak.patch bash-infotags.patch bash42-006 bash42-016 bash42-026 bash42-036 bash42-046
bash-2.05b-debuginfo.patch bash-4.1-examples.patch bash-4.2-enable-hyphened-fn-export.patch bash-4.2-missing_closes.patch bash-4.3-trapped-signals.patch bash-requires.patch bash42-007 bash42-017 bash42-027 bash42-037 bash42-052
bash-2.05b-manso.patch bash-4.1-trap.patch bash-4.2-env-inject.patch bash-4.2-noecho.patch bash-4.3-wshouldquote.patch bash-setlocale.patch bash42-008 bash42-018 bash42-028 bash42-038 bash42-053
bash-2.05b-pgrp_sync.patch bash-4.2-brace-expand.patch bash-4.2-extglob-man.patch bash-4.2-rc2-logout.patch bash-4.4-bracketed-paste.patch bash-tty-tests.patch bash42-009 bash42-019 bash42-029 bash42-039 dot-bash_logout
bash-2.05b-readline-oom.patch bash-4.2-case-in-command-subst.patch bash-4.2-history-hang.patch bash-4.2-signal.patch bash-4.4-cve-2019-9924.patch bash.spec bash42-010 bash42-020 bash42-030 bash42-040 dot-bash_profile
bash-2.05b-xcc.patch bash-4.2-check-debugger.patch bash-4.2-ifs-in-temp-env.patch bash-4.2-size_type.patch bash-4.4-param-expansion.patch bash42-001 bash42-011 bash42-021 bash42-031 bash42-041 dot-bashrc
bash-3.2-audit.patch bash-4.2-coverity.patch bash-4.2-leak-compound.patch bash-4.2.tar.gz bash-4.4-pipeline-pgrp.patch bash42-002 bash42-012 bash42-022 bash42-032 bash42-042 fix-shopt-lastpipe-mode-crash.patch
There is a tgz file bash-4.2.tar.gz which is the original bash source code and lots of patch files.
How to patch these files to the original source code? If my steps are wrong, is there a simple way to solve my question?
After reading the Rebuild a Source RPM, I found an approach to solve the problem.
Firstly, use the yumdownloader to download a source package:
yumdownloader --source bash
Then, use the rpmbuild to rebuild the package without build and dependency check:
rpmbuild --nobuild --nodeps --rebuild bash-4.2.46-35.el7_9.src.rpm
rpmbuild will help you deal with all the things. Then the source code is here: $HOME/rpmbuild/BUILD/bash-4.2/:
[root#984f0a6b263e data]# ls /root/rpmbuild/BUILD/bash-4.2/
ABOUT-NLS aclocal.m4.pgrp_sync bashtypes.h configure execute_cmd.c.026 hashlib.c parse.y.005 patchlevel.h.006 patchlevel.h.027 pathexp.c.014 shell.h.053 subst.c.double-alloc variables.c.006
AUTHORS alias.c bracecomp.c configure.in execute_cmd.c.coverity hashlib.h parse.y.012 patchlevel.h.007 patchlevel.h.028 pathexp.h sig.c subst.c.leak-compound variables.c.7169-1
CHANGES alias.h braces.c configure.in.audit execute_cmd.c.fix-shopt-lastpipe-mode include parse.y.016 patchlevel.h.008 patchlevel.h.029 pathnames.h.in sig.c.008 subst.c.noecho variables.c.cve-2016-7543
COMPAT array.c braces.c.expand configure.in.check-debugger execute_cmd.c.interpreter input.c parse.y.034 patchlevel.h.009 patchlevel.h.030 pcomplete.c sig.h subst.c.param-expansion variables.c.cve-2019-9924
COPYING array.h builtins configure.in.interpreter execute_cmd.c.nobits input.h parse.y.042 patchlevel.h.010 patchlevel.h.031 pcomplete.h sig.h.signal subst.c.pipeline-pgrp variables.c.export
CWRU arrayfunc.c builtins.h conftypes.h execute_cmd.c.pipefd-leak jobs.c parse.y.053 patchlevel.h.011 patchlevel.h.032 pcomplib.c siglist.c subst.h variables.c.inject
ChangeLog arrayfunc.h builtins.h.requires copy_cmd.c execute_cmd.c.requires jobs.c.defer_sigchld_trap parse.y.7169-0 patchlevel.h.012 patchlevel.h.033 po siglist.h subst.h.001 variables.h
INSTALL assoc.c command.h copy_cmd.c.052 execute_cmd.h jobs.c.trapped-signals parse.y.7169-2 patchlevel.h.013 patchlevel.h.034 print_cmd.c stringlib.c subst.h.param-expansion variables.h.005
MANIFEST assoc.c.011 command.h.025 cross-build execute_cmd.h.requires jobs.h parse.y.command-subst patchlevel.h.014 patchlevel.h.035 print_cmd.c.010 subst.c support variables.h.size_type
MANIFEST.doc assoc.h config-bot.h dispose_cmd.c expr.c lib parse.y.cve-2016-0634 patchlevel.h.015 patchlevel.h.036 quit.h subst.c.001 syntax.h version.c
Makefile.in bashansi.h config-top.h dispose_cmd.h expr.c.015 list.c parse.y.noecho patchlevel.h.016 patchlevel.h.037 redir.c subst.c.004 test.c xmalloc.c
Makefile.in.xcc bashhist.c config-top.h.broken_pipe doc expr.c.039 locale.c parse.y.param-expansion patchlevel.h.017 patchlevel.h.038 redir.c.040 subst.c.007 test.h xmalloc.h
NEWS bashhist.c.syslog-history config-top.h.logout error.c externs.h mailcheck.c parse.y.security patchlevel.h.018 patchlevel.h.039 redir.c.045 subst.c.013 tests y.tab.c
NOTES bashhist.h config-top.h.paths error.c.023 findcmd.c mailcheck.h parser-built patchlevel.h.019 patchlevel.h.040 redir.c.temp-env subst.c.023 trap.c y.tab.c.cve-2016-0634
POSIX bashintl.h config-top.h.profile error.h findcmd.h make_cmd.c parser.h patchlevel.h.020 patchlevel.h.041 redir.h subst.c.025 trap.c.signal y.tab.c.param-expansion
RBASH bashjmp.h config-top.h.ssh_source_bash eval.c flags.c make_cmd.c.052 patchlevel.h patchlevel.h.021 patchlevel.h.042 shell.c subst.c.027 trap.c.trap y.tab.h
README bashline.c config-top.h.syslog-history eval.c.requires flags.h make_cmd.c.requires patchlevel.h.001 patchlevel.h.022 patchlevel.h.043 shell.c.bashbug subst.c.028 trap.h
Y2K bashline.c.029 config.h.in examples general.c make_cmd.h patchlevel.h.002 patchlevel.h.023 patchlevel.h.044 shell.c.check-debugger subst.c.032 unwind_prot.c
_distribution bashline.c.append-slash config.h.in.audit execute_cmd.c general.h mksyntax.c patchlevel.h.003 patchlevel.h.024 patchlevel.h.045 shell.c.requires subst.c.036 unwind_prot.h
_patchlevel bashline.h config.h.in.interpreter execute_cmd.c.018 hashcmd.c nojobs.c patchlevel.h.004 patchlevel.h.025 patchlevel.h.046 shell.h subst.c.041 variables.c
aclocal.m4 bashline.h.029 config.h.in.paths execute_cmd.c.025 hashcmd.h parse.y patchlevel.h.005 patchlevel.h.026 pathexp.c shell.h.012 subst.c.046 variables.c.005

Minting token in cardano mainnet --tx-out error

I am trying to mint a token in cardano mainnet. I have built a block and staking pool. I am working to mint a token and i am running into an error "unexpected '2', expecting space, "+" or end of input.
Here is the linux code I'm running:
cardano-cli transaction build-raw --shelley-era --fee $fee --tx-in $txhash#$txix --tx-out $address+$output+"$tokenamount $policyid.$tokenname1" --mint="$tokenamount $policyid.$tokenname1" --minting-script-file policy/policy.script --out-file matx.raw
Here is the error:
option --tx-out:
unexpected '2'
expecting space, "+" or end of input
Inputs:
I have tried different outputs of 10000000, 5000000, and 0.
$tokenamount="10000000"
$address=$(cat payment.addr)
$tokenname1="CpoolTest"
https://developers.cardano.org/docs/native-tokens/minting/
Please help
I guess i found the error.
Check $policyid whats inside. It should contain only 1x adress.
Try echo $policyid. It should only display 1 address
If its not the case, yo can try:
to delete your policyID:
rm -rf policy/policyID
After deleting create a brand new one:
cardano-cli transaction policyid --scriptfile ./policy/policy.script >> policy/policyID
Now set the variable:
policyid=$(cat policy/policyID)
Echo it
echo $policyid
There should be exactly 1 address displayed. Your code should work now

Building content shell as final and sharing

everything good? I'm doing working on a personal project that aims to use the content_shell as a minimal browser, just for viewing sites on terminals and some other options I'm adding. For this I am using the content shell I built it in Ubuntu 16.04 with the following flags ng:
is_debug = false
is_java_debug = false
is_official_build = true
target_cpu = "x86"
symbol_level = 0
remove_webcore_debug_symbols = true
enable_nacl = false
is_component_build = true
He generated all of these files:
AHEM____.TTF
angledata
args.gn
brotli
build.ninja
build.ninja.d
character_data_generator
clang_newlib_x64
content_shell
content_shell.log
content_shell.pak
fonts.conf
font_service.service
GardinerModBug.ttf
GardinerModCat.ttf
gen
genmacro
genmodule
genperf
genstring
genversion
glibc_x64
icudtl.dat
irt_x64
libaccessibility.so
libaccessibility.so.TOC
libanimation.so
libanimation.so.TOC
libaura_extra.so
libaura_extra.so.TOC
libaura.so
libaura.so.TOC
libbase_i18n.so
libbase_i18n.so.TOC
libbase.so
libbase.so.TOC
libbindings.so
libbindings.so.TOC
libblink_android_mojo_bindings_shared.so
libblink_android_mojo_bindings_shared.so.TOC
libblink_common.so
libblink_common.so.TOC
libblink_controller.so
libblink_controller.so.TOC
libblink_core.so
libblink_core.so.TOC
libblink_deprecated_test_plugin.so
libblink_modules.so
libblink_modules.so.TOC
libblink_mojo_bindings_shared.so
libblink_mojo_bindings_shared.so.TOC
libblink_offscreen_canvas_mojo_bindings_shared.so
libblink_offscreen_canvas_mojo_bindings_shared.so.TOC
libblink_platform.so
libblink_platform.so.TOC
libblink_test_plugin.so
libbluetooth.so
libbluetooth.so.TOC
libboringssl.so
libboringssl.so.TOC
libcapture_base.so
libcapture_base.so.TOC
libcapture_lib.so
libcapture_lib.so.TOC
libcc_animation.so
libcc_animation.so.TOC
libcc_base.so
libcc_base.so.TOC
libcc_blink.so
libcc_blink.so.TOC
libcc_debug.so
libcc_debug.so.TOC
libcc_ipc.so
libcc_ipc.so.TOC
libcc_paint.so
libcc_paint.so.TOC
libcc.so
libcc.so.TOC
libcdm_manager.so
libcdm_manager.so.TOC
libchromium_sqlite3.so
libchromium_sqlite3.so.TOC
libcodec.so
libcodec.so.TOC
libcolor_space.so
libcolor_space.so.TOC
libcompositor.so
libcompositor.so.TOC
libcontent_common_mojo_bindings_shared.so
libcontent_common_mojo_bindings_shared.so.TOC
libcontent_public_common_mojo_bindings_shared.so
libcontent_public_common_mojo_bindings_shared.so.TOC
libcontent.so
libcontent.so.TOC
libcrcrypto.so
libcrcrypto.so.TOC
libc++.so
libc++.so.TOC
libdbus.so
libdbus.so.TOC
libdevice_base.so
libdevice_base.so.TOC
libdevice_event_log.so
libdevice_event_log.so.TOC
libdevice_gamepad.so
libdevice_gamepad.so.TOC
libdevices.so
libdevices.so.TOC
libdevice_vr_mojo_bindings_blink.so
libdevice_vr_mojo_bindings_blink.so.TOC
libdevice_vr_mojo_bindings_shared.so
libdevice_vr_mojo_bindings_shared.so.TOC
libdevice_vr_mojo_bindings.so
libdevice_vr_mojo_bindings.so.TOC
libdiscardable_memory_client.so
libdiscardable_memory_client.so.TOC
libdiscardable_memory_common.so
libdiscardable_memory_common.so.TOC
libdiscardable_memory_service.so
libdiscardable_memory_service.so.TOC
libdisplay.so
libdisplay.so.TOC
libdisplay_types.so
libdisplay_types.so.TOC
libdisplay_util.so
libdisplay_util.so.TOC
libEGL.so
libEGL.so.TOC
libembedder.so
libembedder.so.TOC
libevents_base.so
libevents_base.so.TOC
libevents_devices_x11.so
libevents_devices_x11.so.TOC
libevents_ozone_layout.so
libevents_ozone_layout.so.TOC
libevents.so
libevents.so.TOC
libevents_x.so
libevents_x.so.TOC
libffmpeg.so
libffmpeg.so.TOC
libfingerprint.so
libfingerprint.so.TOC
libfreetype.so.6
libfreetype.so.6.TOC
libgeolocation.so
libgeolocation.so.TOC
libgeometry_skia.so
libgeometry_skia.so.TOC
libgeometry.so
libgeometry.so.TOC
libgesture_detection.so
libgesture_detection.so.TOC
libgfx_ipc_color.so
libgfx_ipc_color.so.TOC
libgfx_ipc_geometry.so
libgfx_ipc_geometry.so.TOC
libgfx_ipc_skia.so
libgfx_ipc_skia.so.TOC
libgfx_ipc.so
libgfx_ipc.so.TOC
libgfx.so
libgfx.so.TOC
libgfx_switches.so
libgfx_switches.so.TOC
libgfx_x11.so
libgfx_x11.so.TOC
libgin.so
libgin.so.TOC
libgles2_c_lib.so
libgles2_c_lib.so.TOC
libgles2_implementation.so
libgles2_implementation.so.TOC
libgles2_utils.so
libgles2_utils.so.TOC
libGLESv2.so
libGLESv2.so.TOC
libgl_init.so
libgl_init.so.TOC
libgl_in_process_context.so
libgl_in_process_context.so.TOC
libgl_wrapper.so
libgl_wrapper.so.TOC
libgpu.so
libgpu.so.TOC
libhost.so
libhost.so.TOC
libicui18n.so
libicui18n.so.TOC
libicuuc.so
libicuuc.so.TOC
libinterfaces_shared.so
libinterfaces_shared.so.TOC
libipc_mojom_shared.so
libipc_mojom_shared.so.TOC
libipc_mojom.so
libipc_mojom.so.TOC
libipc.so
libipc.so.TOC
libjs.so
libjs.so.TOC
libkeycodes_x11.so
libkeycodes_x11.so.TOC
libkeyed_service_content.so
libkeyed_service_content.so.TOC
libkeyed_service_core.so
libkeyed_service_core.so.TOC
libmedia_blink.so
libmedia_blink.so.TOC
libmedia_gpu.so
libmedia_gpu.so.TOC
libmedia_mojo_services.so
libmedia_mojo_services.so.TOC
libmedia.so
libmedia.so.TOC
libmetrics_cpp.so
libmetrics_cpp.so.TOC
libmidi.so
libmidi.so.TOC
libmirclient.so.9
libmirclient.so.9.TOC
libmojo_common_lib.so
libmojo_common_lib.so.TOC
libmojo_ime_lib.so
libmojo_ime_lib.so.TOC
libmojo_public_system_cpp.so
libmojo_public_system_cpp.so.TOC
libmojo_public_system.so
libmojo_public_system.so.TOC
libmojo_system_impl.so
libmojo_system_impl.so.TOC
libnative_theme.so
libnative_theme.so.TOC
libnet.so
libnet.so.TOC
libnet_with_v8.so
libnet_with_v8.so.TOC
libosmesa.so
libplatform.so
libplatform.so.TOC
libppapi_host.so
libppapi_host.so.TOC
libppapi_proxy.so
libppapi_proxy.so.TOC
libppapi_shared.so
libppapi_shared.so.TOC
libprefs.so
libprefs.so.TOC
libprinting.so
libprinting.so.TOC
libprotobuf_lite.so
libprotobuf_lite.so.TOC
librange.so
librange.so.TOC
libresource_coordinator_cpp.so
libresource_coordinator_cpp.so.TOC
libresource_coordinator_public_interfaces_internal_shared.so
libresource_coordinator_public_interfaces_internal_shared.so.TOC
libsandbox_services.so
libsandbox_services.so.TOC
libseccomp_bpf.so
libseccomp_bpf.so.TOC
libsensors.so
libsensors.so.TOC
libservice_manager_cpp.so
libservice_manager_cpp.so.TOC
libservice_manager_cpp_types.so
libservice_manager_cpp_types.so.TOC
libservice_manager_mojom_blink.so
libservice_manager_mojom_blink.so.TOC
libservice_manager_mojom_constants_blink.so
libservice_manager_mojom_constants_blink.so.TOC
libservice_manager_mojom_constants_shared.so
libservice_manager_mojom_constants_shared.so.TOC
libservice_manager_mojom_constants.so
libservice_manager_mojom_constants.so.TOC
libservice_manager_mojom_shared.so
libservice_manager_mojom_shared.so.TOC
libservice_manager_mojom.so
libservice_manager_mojom.so.TOC
libservice.so
libservice.so.TOC
libshared_memory_support.so
libshared_memory_support.so.TOC
libshell_dialogs.so
libshell_dialogs.so.TOC
libskia.so
libskia.so.TOC
libsnapshot.so
libsnapshot.so.TOC
libsql.so
libsql.so.TOC
libstartup_tracing.so
libstartup_tracing.so.TOC
libstorage_browser.so
libstorage_browser.so.TOC
libstorage_common.so
libstorage_common.so.TOC
libstub_window.so
libstub_window.so.TOC
libsuid_sandbox_client.so
libsuid_sandbox_client.so.TOC
libsurface.so
libsurface.so.TOC
libtest_runner.so
libtest_runner.so.TOC
libtracing.so
libtracing.so.TOC
libui_base_ime.so
libui_base_ime.so.TOC
libui_base.so
libui_base.so.TOC
libui_base_x.so
libui_base_x.so.TOC
libui_data_pack.so
libui_data_pack.so.TOC
libui_touch_selection.so
libui_touch_selection.so.TOC
libui_views_mus_lib.so
libui_views_mus_lib.so.TOC
liburl_ipc.so
liburl_ipc.so.TOC
liburl.so
liburl.so.TOC
libuser_prefs.so
libuser_prefs.so.TOC
libv8_libbase.so
libv8_libbase.so.TOC
libv8_libplatform.so
libv8_libplatform.so.TOC
libv8.so
libv8.so.TOC
libviews.so
libviews.so.TOC
libviz_common.so
libviz_common.so.TOC
libviz_resource_format.so
libviz_resource_format.so.TOC
libVkLayer_core_validation.so
libVkLayer_core_validation.so.TOC
libVkLayer_object_tracker.so
libVkLayer_object_tracker.so.TOC
libVkLayer_parameter_validation.so
libVkLayer_parameter_validation.so.TOC
libVkLayer_swapchain.so
libVkLayer_swapchain.so.TOC
libVkLayer_threading.so
libVkLayer_threading.so.TOC
libVkLayer_unique_objects.so
libVkLayer_unique_objects.so.TOC
libweb_dialogs.so
libweb_dialogs.so.TOC
libwebview.so
libwebview.so.TOC
libwm_public.so
libwm_public.so.TOC
libwm.so
libwm.so.TOC
libwtf.so
libwtf.so.TOC
libx11_events_platform.so
libx11_events_platform.so.TOC
libx11_window.so
libx11_window.so.TOC
locales
mksnapshot
mus_app_resources_100.pak
mus_app_resources_200.pak
mus_app_resources_strings.pak
nacl_bootstrap_x64
natives_blob.bin
newlib_pnacl
newlib_pnacl_nonsfi
obj
protoc
proto_zero_plugin
pyproto
re2c
resources
shell_resources.pak
snapshot_blob.bin
swiftshader
test_ime_driver.service
toolchain.ninja
transport_security_state_generator
ui
ui_resources_100_percent.pak
ui.service
ui_test.pak
v8_build_config.json
v8_context_snapshot.bin
v8_context_snapshot_generator
views_mus_resources.pak
yasm
How do I make all these files with the same structure as the official Chromium? I removed the folders I do not need and the files add up to about 1.7 GB I want to share with others my project. I have already researched and am looking here in the group something about this but I have not yet found, which one or which command should I use to reduce the number of files, I know it is not identical however Electron uses the content_shell and the file structure is similar to of Chromium:
Electron file structure
Do I have to build it again? If so, which flags should I use?
Thanks everyone for your attention :-)
You need to set is_component_build = false when invoking gn to generate ninja build files.
This is because when is_component_build is set to true, the build will generate a shared object for each component target to improve compile time (faster incremental builds), whereas when set to false it will produce static libs for each component and bundle them into a huge shared object to speed up the application at runtime (among other reasons).
Even if you need to build it on Linux, it might be helpful to have a look at Checking out and Building Chromium for Windows # Faster builds and this answer.

hiera() function and YAML hash lookups

How do I rewrite this YAML so it is more structured, then reference it in Puppet using hiera function?
Currently, I am working with a hieradata syntax that looks very flat and hard to read.
service::proxy::behind_reverse_proxy: true
service::proxy::proxy_timeout: 300
service::proxy::serverlist:
- host1.fqdn
- host2.fqdn
And grabbed these in a params.pp file, for example
$behind_reverse_proxy = hiera('service::proxy::behind_reverse_proxy', 'False')
$serverlist = hiera('service::proxy::serverlist')
I thought I could rewrite the YAML like so in an effort to make it more readable...
service::proxy:
behind_reverse_proxy: true
proxy_timeout: 300
serverlist:
- host1.fqdn
- host2.fqdn
And updated the params.pp file according to
Hiera Key.subkey syntax
interacting with structured data
$behind_reverse_proxy = hiera('service::proxy.behind_reverse_proxy', 'False')
$serverlist = hiera('service::proxy.serverlist')
However upon puppet agent -t that resulted in
Error 400 on SERVER: Could not find data item service::proxy.serverlist in any Hiera data file and no default supplied
I think these are relevant
[user#server ~]$ facter -y | grep 'version'
facterversion: 2.4.4
puppetversion: 3.8.2
Following up on my comment about how you can access your restructured data:
service::proxy:
behind_reverse_proxy: true
proxy_timeout: 300
serverlist:
- host1.fqdn
- host2.fqdn
In your manifest, instead of this ...
$behind_reverse_proxy = hiera('service::proxy.behind_reverse_proxy', 'False')
$serverlist = hiera('service::proxy.serverlist')
... you might do this:
$proxy_info = merge(
{ 'behind_reverse_proxy' => false, 'serverlist' => [] },
hiera('service::proxy', {})
)
$behind_reverse_proxy = $proxy_info{'behind_reverse_proxy'}
$serverlist = $proxy_info{'serverlist'}
The merge() function is not built-in, but rather comes from Puppet's (formerly PuppetLabs's) widely-used stdlib module. There's a good chance that you are already using that module elsewhere, but even if not, it may be well worth your while to introduce it to your stack.
I've never used Hiera, but I think the problem is that you have a sequence (array) when you wanted a mapping (hash).
In the below YAML, the value of the service::proxy key is a sequence with three elements, each of which is a mapping with one key:
service::proxy:
- behind_reverse_proxy: true
- proxy_timeout: 300
- serverlist:
- host1.fqdn
- host2.fqdn
What you probably wanted, though, was for service::proxy to be a mapping with three keys:
service::proxy:
behind_reverse_proxy: true
proxy_timeout: 300
serverlist:
- host1.fqdn
- host2.fqdn
The examples in the Hiera docs you linked to seem to support this.

puppet augeas resource only support avalialbe lenses

I am automating rhnplugin config file in puppet, below is my manifests
augeas { 'config' :
lens => 'Simplevars.lns',
incl => '/etc/yum/pluginconf.d/rhnplugin.conf',
changes => 'set /etc/yum/pluginconf.d/rhnplugin.conf/test " " '
}
getting below error
Warning: Augeas[config](provider=augeas): Loading failed for one or more files, see debug for /augeas//error outputeven
I tried with "simplelines lenses" not getting any o/p
I used "simplelines and simplevars" since could not find lenses for rhnplugin.
I treid in augtool and it worked
augtool> set /files/etc/yum/pluginconf.d/rhnplugin.conf/test
augtool> save
Saved 1 file(s)
augtool> set /files/etc/yum/pluginconf.d/rhnplugin.conf/test/enabled 1
augtool> save
Saved 1 file(s)
augtool> print /files/etc/yum/pluginconf.d/rhnplugin.conf/test
/files/etc/yum/pluginconf.d/rhnplugin.conf/test
/files/etc/yum/pluginconf.d/rhnplugin.conf/test/enabled = "1"
My doubt is can't we convert int to augeas resource if the lenses are not available.
rhnplugin.conf is not in a simplevars (i.e. key=value) format. It is an inifile. My recommendation would be to use puppet labs' inifile module to modify it.

Resources