how to get the source code of a RPM package - linux

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

Related

undefined symbol: __atomic_exchange_8

I'm trying to run google assistant on my raspberry pi following the steps on: https://developers.google.com/assistant/sdk/guides/service/python/embed/run-sample
all works fine until activating the Google Assistant with the command:
googlesamples-assistant-pushtotalk --project-id my-dev-project --device-model-id my-model
I'm getting the following ImportError:
Traceback (most recent call last):
File "/home/pi/env/bin/googlesamples-assistant-pushtotalk", line 5, in <module>
from googlesamples.assistant.grpc.pushtotalk import main
File "/home/pi/env/lib/python3.9/site-packages/googlesamples/assistant/grpc/pushtotalk.py", line 28, in <module>
import grpc
File "/home/pi/env/lib/python3.9/site-packages/grpc/__init__.py", line 22, in <module>
from grpc import _compression
File "/home/pi/env/lib/python3.9/site-packages/grpc/_compression.py", line 15, in <module>
from grpc._cython import cygrpc
ImportError: /home/pi/env/lib/python3.9/site-packages/grpc/_cython/cygrpc.cpython-39-arm-linux-gnueabihf.so: undefined symbol: __atomic_exchange_8
Any ideas on how to fix this?
just ended up here since I ran into the same problem (on a different project) but also involving python3.9, cygrpc on a RPi4 with a recent raspbian-lite (32bit).
While I don't have a solution here are my guesses:
formerly __atomic_exchange_8 was defined in /lib/arm-linux-gnueabihf/libgcc_s.so.1 but now it seems defined in libatomic:
$ grep __atomic_exchange_8 /lib/arm-linux-gnueabihf/libatomic.so.1
grep: /lib/arm-linux-gnueabihf/libatomic.so.1: binary file matches
EDIT:
Solved it. I was looking at the patch which tried to solve the problem two years ago:
https://github.com/grpc/grpc/pull/20514/commits/b912fc7d8d401bb65b3147ee77d03beaa3d46038
I figured their test check_linker_need_libatomic() might be broken, and patched it again to always return True, the problem got fixed.
Had tried earlier to fix it by adding CFLAGS='-latomic' CPPFLAGS='-latomic' but that didn't help.
here's my tiny workaround (not fix!) for today's grpc git HEAD:
root#mypi:/home/pi/CODE/grpc# git diff
diff --git a/setup.py b/setup.py
index 1a72c5c668..60b7705cd2 100644
--- a/setup.py
+++ b/setup.py
## -197,6 +197,7 ## ENABLE_DOCUMENTATION_BUILD = _env_bool_value(
def check_linker_need_libatomic():
"""Test if linker on system needs libatomic."""
+ return True
code_test = (b'#include <atomic>\n' +
b'int main() { return std::atomic<int64_t>{}; }')
cxx = os.environ.get('CXX', 'c++')
diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py
index 6b842f56b9..8d5f581ac7 100644
--- a/tools/distrib/python/grpcio_tools/setup.py
+++ b/tools/distrib/python/grpcio_tools/setup.py
## -85,6 +85,7 ## BUILD_WITH_STATIC_LIBSTDCXX = _env_bool_value(
def check_linker_need_libatomic():
"""Test if linker on system needs libatomic."""
+ return True
code_test = (b'#include <atomic>\n' +
b'int main() { return std::atomic<int64_t>{}; }')
cxx = os.environ.get('CXX', 'c++')
root#mypi:/home/pi/CODE/grpc#
EDIT:
as a quick test, cygrpc.cpython-39-arm-linux-gnueabihf.so needs to depend on libatomic:
pi#mypi:~/CODE/grpc $ ldd /usr/local/lib/python3.9/dist-packages/grpc/_cython/cygrpc.cpython-39-arm-linux-gnueabihf.so
linux-vdso.so.1 (0xbeef7000)
/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb698b000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb695f000)
libatomic.so.1 => /lib/arm-linux-gnueabihf/libatomic.so.1 (0xb6946000)
libstdc++.so.6 => /lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb67be000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb674f000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb65fb000)
/lib/ld-linux-armhf.so.3 (0xb6fcc000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb65ce000)
This works for me on RPI0 + Bullseye + Python3.9:
pip3 uninstall -y grpcio grpcio-tools
sudo apt install -y python3-grpcio python3-grpc-tools
EDIT: Update to gRPC v1.44.0. The issue has been fixed there, see the explanation below in the old answer.
There was a problem with the order of the parameters used by the compiler to compile some test code which result is used to determine whether libatomic needs to be linked or not.
The issue will be fixed with the next release of grpc. If they maintain the same schedule of previous releases it should be v1.44.0 which should come out some time the next month.
In the mean time you can git cherry-pick the proper fix and build grpc yourself

Compiling Rocket in Bazel

I'm attempting to get a working prototype of the following scenario:
Language: Rust (rustc 1.45.0-nightly (ad4bc3323 2020-06-01))
Framework: Rocket v0.4.4
Build Tool: Bazel
Platform: Mac OS X / Darwin x64
Running bazel build //web-api yields the below error. I believe, based on looking at the Cargo.lock file it is because Rocket's dependency on the hyper library specifies a dependency on the log 0.3.9 library. For whatever reason it is not using the more recent log=0.4.x. That said, I don't know why it's pulling this library since, if I build it manually, it works fine.
ERROR: /private/var/tmp/_bazel_nathanielford/2a39169ea9f6eb02fe788b12f9eae88f/external/raze__log__0_3_9/BUILD.bazel:27:1: error executing shell command: '/bin/bash -c CARGO_MANIFEST_DIR=$(pwd)/external/raze__log__0_3_9 external/rust_darwin_x86_64/bin/rustc "$#" --remap-path-prefix="$(pwd)"=__bazel_redacted_pwd external/raze__log__0_3_9/src/lib.rs -...' failed (Exit 1) bash failed: error executing command /bin/bash -c 'CARGO_MANIFEST_DIR=$(pwd)/external/raze__log__0_3_9 external/rust_darwin_x86_64/bin/rustc "$#" --remap-path-prefix="$(pwd)"=__bazel_redacted_pwd' '' external/raze__log__0_3_9/src/lib.rs ... (remaining 24 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
error[E0425]: cannot find function `set_logger` in crate `log`
--> external/raze__log__0_3_9/src/lib.rs:731:16
|
731 | match log::set_logger(&ADAPTOR) {
| ^^^^^^^^^^ not found in `log`
|
help: consider importing this function
|
204 | use set_logger;
|
The following is my directory structure:
/
|-WORKSPACE
|-BUILD # Empty
|-web-api/
| |-BUILD
| |-src/
| | |-main.rs
| |-cargo/
| |-Cargo.toml
| |-Cargo.lock
| |-BUILD.bazel
| |-remote/
| |-... (Cargo-raze files)
In order to set up the cargo-raze I did the following, following instructions from the github page.:
$ cd web-api/cargo
$ cargo generate-lockfile
$ cargo vendor --versioned-dirs --locked
$ cargo raze
(The generate-lockfile is what creates the Cargo.lock file, and the cargo raze is what creates the BUILD.bazel file and all the contents of the remote sub directory.)
And then to execute the bazel build I go back to the root and run bazel build //web-api, which produces the above error.
This is my WORKSPACE file:
workspace(name = "rocket-bazel")
load("#bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_rust",
sha256 = "f21c67fc2fef9d57fa3c81fde1defd9e57d451883388c0a469ec1c470fd30dcb",
strip_prefix = "rules_rust-master",
urls = [
"https://github.com/bazelbuild/rules_rust/archive/master.tar.gz"
],
)
http_archive(
name = "bazel_skylib",
sha256 = "9a737999532daca978a158f94e77e9af6a6a169709c0cee274f0a4c3359519bd",
strip_prefix = "bazel-skylib-1.0.0",
url = "https://github.com/bazelbuild/bazel-skylib/archive/1.0.0.tar.gz",
)
load("#io_bazel_rules_rust//rust:repositories.bzl", "rust_repositories")
rust_repositories(version="nightly", iso_date="2020-06-02")
load("#io_bazel_rules_rust//:workspace.bzl", "bazel_version")
bazel_version(name = "bazel_version")
load("//web-api/cargo:crates.bzl", "raze_fetch_remote_crates")
raze_fetch_remote_crates()
This is my web-api/BUILD file:
load("#io_bazel_rules_rust//rust:rust.bzl", "rust_binary")
rust_binary(
name = "web-api",
srcs = ["src/main.rs"],
deps = [
"//web-api/cargo:rocket",
],
)
And my web-api/cargo/Cargo.toml file:
load("#io_bazel_rules_rust//rust:rust.bzl", "rust_binary")
rust_binary(
name = "web-api",
srcs = ["src/main.rs"],
deps = [
"//web-api/cargo:rocket",
],
)
I've run out of ideas as to what to try. I can get this to compile without Bazel, just using rust (though obviously the files are in slightly different places). I can get it to compile inside a Docker container. I just can't get Bazel (necessarily with cargo raze, either in vendor or remote mode) to run successfully: I assume that there is some mismatch in compile target or the nightly build that is not being properly set - but I'm not sure how to diagnose or get past that.
Here is a link to a repository with the files/structure I tried.
I had a similar issue when I made a minimal Bazel workspace with rust and the log crate together with env_logger crate. I found a similar issue when you try to compile without features = ["std"]. I then tried to enable that in Cargo.toml on the log dependency without success.
My solution is that in Cargo.toml under [raze] I added:
default_gen_buildrs = true
I could trace it down to that when default_gen_buildrs flag is not set in the generated log crate the BUILD.bazel file did not have a cargo_build_script definition or this:
crate_features = [
"std",
],

How to batch rename file names by delete content between certain characters Linux

I have many files named like this:
BH_Undetermined_S0_L001_R1_001.fastq.gz__1.fq.gz
BH_Undetermined_S0_L001_R1_001.fastq.gz__merged.fq.gz
BH_Undetermined_S0_L001_R2_001.fastq.gz__2.fq.gz
BHos1_S1_L001_R1_001.fastq.gz__1.fq.gz
BHos1_S1_L001_R1_001.fastq.gz__merged.fq.gz
BHos1_S1_L001_R2_001.fastq.gz__2.fq.gz
BHos2_S2_L001_R1_001.fastq.gz__1.fq.gz
BHos2_S2_L001_R1_001.fastq.gz__merged.fq.gz
BHos2_S2_L001_R2_001.fastq.gz__2.fq.gz
ChLJ1511Da_HNVMLBCXX_L2_1.fq.gz__1.fq.gz
ChLJ1511Da_HNVMLBCXX_L2_1.fq.gz__merged.fq.gz
ChLJ1511Da_HNVMLBCXX_L2_2.fq.gz__2.fq.gz
ChLJ1511Db_HNVMLBCXX_L2_1.fq.gz__1.fq.gz
ChLJ1511Db_HNVMLBCXX_L2_1.fq.gz__merged.fq.gz
ChLJ1511Db_HNVMLBCXX_L2_2.fq.gz__2.fq.gz
ML-3_H7VFTALXX_L2_1.fq.gz__1.fq.gz
ML-3_H7VFTALXX_L2_1.fq.gz__merged.fq.gz
ML-3_H7VFTALXX_L2_2.fq.gz__2.fq.gz
T2S170523_H23HKDMXX_L1_1.fq.gz__1.fq.gz
T2S170523_H23HKDMXX_L1_1.fq.gz__merged.fq.gz
T2S170523_H23HKDMXX_L1_2.fq.gz__2.fq.gz
T4S170523_H23HKDMXX_L1_1.fq.gz__1.fq.gz
I want to batch rename them by deleting the content between the first '_' and the '__'. So they will be like:
BH_1.fq.gz
BH_merged.fq.gz
BH_2.fq.gz
BHos1_1.fq.gz
BHos1_merged.fq.gz
BHos1_2.fq.gz
BHos2_1.fq.gz
BHos2_merged.fq.gz
BHos2_2.fq.gz
ChLJ1511Da_1.fq.gz
ChLJ1511Da_merged.fq.gz
ChLJ1511Da_2.fq.gz
ChLJ1511Db_1.fq.gz
ChLJ1511Db_merged.fq.gz
ChLJ1511Db_2.fq.gz
ML-3_H7VFTALXX_1.fq.gz
ML-3_H7VFTALXX_merged.fq.gz
ML-3_H7VFTALXX_2.fq.gz
T2S170523_1.fq.gz
T2S170523_merged.fq.gz
T2S170523_2.fq.gz
T4S170523_1.fq.gz
How to make it?
Thank you very much!
You can use the Perl-based rename (available is file-rename on Mint/19). Some systems are shipping with other version of rename (rename.ul), make sure you get the right one.
file-rename 's/_.*__//' BH_Undetermined_S0_L001_R1_001.fastq.gz__1.fq.gz
BH_Undetermined_S0_L001_R1_001.fastq.gz__merged.fq.gz
BH_Undetermined_S0_L001_R2_001.fastq.gz__2.fq.gz ...
You can verify rename operation without executing it (-v: verbose, -n: no action)
file-rename -n -v 's/_.*__//' BH_Undetermined_S0_L001_R1_001.fastq.gz__1.fq.gz ...

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.

yesod devel fail when starting development server

I was starting to read about Yesod and I tried to install it on my Linux Mint Maya 64-bit machine.
The haskell platform was already installed, I just installed the yesod-platform package with cabal install yesod-platform and all worked very well.
Next step was to call yesod init with respond to all the questions - the application name: test. The problems starts when I called yesod devel... here it is what I've got:
Yesod devel server. Press ENTER to quit
Resolving dependencies...
Configuring test-0.0.0...
Rebuilding application...
Building test-0.0.0...
Preprocessing library test-0.0.0...
Registering test-0.0.0...
Starting development server: runghc -package-confdist/package.conf.inplace devel.hs
devel.hs:2:1:
Failed to load interface for `Application'
It is not a module in the current program, or in any known package.
Exit code: ExitFailure 1
I'm a little bit lost with this issue - I made a lot of research related to it but I have no luck...
Can anyone help with this problem?
Here it is my ghc-pkg list:
/var/lib/ghc/package.conf.d:
Cabal-1.14.0
GLUT-2.1.2.1
HDBC-2.3.1.1
HDBC-odbc-2.2.3.0
HTTP-4000.2.2
HUnit-1.2.4.2
MonadCatchIO-mtl-0.3.0.4
OpenGL-2.2.3.1
QuickCheck-2.4.2
SHA-1.5.0.0
aeson-0.6.0.0
ansi-terminal-0.5.5
array-0.4.0.0
asn1-data-0.6.1.3
attoparsec-0.10.1.1
attoparsec-conduit-0.2.0
attoparsec-enumerator-0.3
authenticate-1.0.0.1
base-4.5.0.0
base-unicode-symbols-0.2.2.3
base64-bytestring-0.1.1.0
bin-package-db-0.0.0.0
binary-0.5.1.0
blaze-builder-0.3.1.0
blaze-builder-conduit-0.2.0
blaze-html-0.4.3.1
byteorder-1.0.3
bytestring-0.9.2.1
bytestring-lexing-0.4.0
case-insensitive-0.4.0.1
cereal-0.3.5.1
certificate-1.1.0
cgi-3001.1.8.2
clientsession-0.7.4.1
conduit-0.2.0
containers-0.4.2.1
convertible-1.0.11.0
cookie-0.4.0
cprng-aes-0.2.3
crypto-api-0.9
crypto-conduit-0.1.3.1
crypto-pubkey-types-0.1.0
cryptocipher-0.3.0
cryptohash-0.7.4
css-text-0.1.1
data-default-0.3.0
deepseq-1.3.0.0
directory-1.1.0.2
dlist-0.5
email-validate-0.2.8
entropy-0.2.1
enumerator-0.4.18
extensible-exceptions-0.1.1.4
failure-0.2.0
fast-logger-0.0.2
fgl-5.4.2.4
file-embed-0.0.4.1
filepath-1.3.0.0
(ghc-7.4.1)
ghc-prim-0.2.0.0
hamlet-0.10.8
hashable-1.1.2.3
haskell-src-1.0.1.5
(haskell2010-1.1.0.1)
(haskell98-2.0.0.1)
hjsmin-0.0.15
hoopl-3.8.7.3
hpc-0.5.1.1
html-1.0.1.2
http-conduit-1.2.5
http-date-0.0.2
http-types-0.6.9
integer-gmp-0.4.0.0
language-javascript-0.4.10
largeword-1.0.1
lifted-base-0.1.0.3
mime-mail-0.4.1.1
monad-control-0.3.1
mtl-2.0.1.0
network-2.3.0.10
old-locale-1.0.0.4
old-time-1.1.0.0
parallel-3.2.0.2
parsec-3.1.2
path-pieces-0.1.0
persistent-0.8.0.1
persistent-template-0.8.1.1
pool-conduit-0.0.0.1
pretty-1.1.1.0
primitive-0.4.1
process-1.1.0.1
pureMD5-2.1.0.3
pwstore-fast-2.2
random-1.0.1.1
ranges-0.2.4
regex-base-0.93.2
regex-compat-0.95.1
regex-posix-0.95.1
resource-pool-0.2.1.0
rts-1.0
safe-0.3.3
semigroups-0.8
shakespeare-0.10.3.1
shakespeare-css-0.10.7
shakespeare-i18n-0.0.1
shakespeare-js-0.11.0.1
shakespeare-text-0.10.5
simple-sendfile-0.2.0
skein-0.1.0.5
socks-0.4.1
stm-2.2.0.1
syb-0.3.6
system-filepath-0.4.6
tagged-0.2.3.1
tagsoup-0.12.6
template-haskell-2.7.0.0
text-0.11.1.13
time-1.4
tls-0.9.0
tls-extra-0.4.3
transformers-0.2.2.0
transformers-base-0.4.1
unix-2.5.1.0
unix-compat-0.3.0.1
unordered-containers-0.1.4.6
utf8-light-0.4.0.1
utf8-string-0.3.7
vault-0.1.0.0
vector-0.9.1
wai-1.1.0.1
wai-app-static-1.1.2
wai-extra-1.1.0.1
wai-logger-0.1.4
warp-1.1.0.1
xhtml-3000.2.0.5
xml-conduit-0.5.3
xml-types-0.3.1
xss-sanitize-0.3.1
yaml-0.5.2
yesod-0.10.1.3
yesod-auth-0.8.1.1
yesod-core-0.10.2.1
yesod-form-0.4.2
yesod-json-0.3.1
yesod-persistent-0.3.1
yesod-routes-0.0.1
yesod-static-0.10.1
zlib-0.5.3.3
zlib-bindings-0.0.3.2
zlib-conduit-0.2.0
/home/ionica/.ghc/x86_64-linux-7.4.1/package.conf.d:
Cabal-1.16.0.1
HDBC-2.3.1.1
HDBC-odbc-2.3.1.0
HDBC-sqlite3-2.3.3.0
HaXml-1.23.3
SHA-1.5.1
aeson-0.6.0.2
ansi-terminal-0.5.5
asn1-data-0.7.1
attoparsec-0.10.2.0
attoparsec-conduit-0.5.0.2
authenticate-1.3.1.1
base-unicode-symbols-0.2.2.4
base64-bytestring-1.0.0.0
blaze-builder-0.3.1.0
blaze-builder-conduit-0.5.0.1
blaze-html-0.5.1.0
blaze-markup-0.5.1.1
byteorder-1.0.3
cairo-0.12.3.1
case-insensitive-0.4.0.3
cereal-0.3.5.2
certificate-1.2.8
cipher-aes-0.1.2
clientsession-0.8.0.1
conduit-0.5.2.5
conduit-0.5.2.6
convertible-1.0.11.1
cookie-0.4.0.1
cpphs-1.14
cprng-aes-0.2.4
cpu-0.1.1
crypto-api-0.10.2
crypto-conduit-0.4.0.1
crypto-pubkey-types-0.1.1
cryptocipher-0.3.5
cryptohash-0.7.5
css-text-0.1.1
data-default-0.5.0
date-cache-0.3.0
derive-2.5.11
dlist-0.5
email-validate-0.2.8
entropy-0.2.1
failure-0.2.0.1
fast-logger-0.3.1
file-embed-0.0.4.6
filesystem-conduit-0.5.0.1
ghc-paths-0.1.0.8
gio-0.12.3
glib-0.12.3.1
gtk-0.12.3.1
hamlet-1.1.1
hashable-1.1.2.5
haskell-src-exts-1.13.5
hjsmin-0.1.3
hspec-1.3.0.1
hspec-expectations-0.3.0.2
html-conduit-0.1.0.2
http-conduit-1.6.1.2
http-date-0.0.2
http-types-0.7.3.0.1
language-javascript-0.5.5
largeword-1.0.3
lifted-base-0.1.2
lifted-base-0.2
mime-mail-0.4.1.2
mime-types-0.1.0.0
monad-control-0.3.1.4
monad-logger-0.2.1
network-conduit-0.6.0
network-conduit-0.6.1.1
pango-0.12.3
parallel-3.2.0.2
parallel-3.2.0.3
parallel-io-0.3.2.1
path-pieces-0.1.2
pem-0.1.1
persistent-1.0.1.3
persistent-sqlite-0.8.0
persistent-sqlite-1.0.0
persistent-template-1.0.0.2
polyparse-1.8
pool-conduit-0.1.0.3
primitive-0.5
primitive-0.5.0.1
pureMD5-2.1.2.1
pwstore-fast-2.3
ranges-0.2.4
resource-pool-0.2.1.1
resourcet-0.4.0.1
resourcet-0.4.0.2
safe-0.3.3
semigroups-0.8.4.1
shakespeare-1.0.1.4
shakespeare-css-1.0.1.5
shakespeare-i18n-1.0.0.2
shakespeare-js-1.0.0.6
shakespeare-text-1.0.0.5
silently-1.2.0.2
simple-sendfile-0.2.8
skein-0.1.0.9
socks-0.4.2
split-0.1.4.3
stringsearch-0.3.6.4
system-fileio-0.3.10
system-filepath-0.4.7
tagged-0.4.4
tagsoup-0.12.8
tagstream-conduit-0.5.3
tar-0.3.2.0
tar-0.4.0.1
tls-0.9.11
tls-extra-0.4.7
transformers-base-0.4.1
uniplate-1.6.7
unix-compat-0.4.0.0
unix-time-0.1.2
unordered-containers-0.2.2.1
utf8-string-0.3.7
vault-0.2.0.1
vector-0.10
vector-0.10.0.1
void-0.5.8
wai-1.3.0.1
wai-app-static-1.3.0.2
wai-extra-1.3.0.3
wai-logger-0.3.0
wai-test-1.3.0
warp-1.3.4.1
xml-conduit-1.0.3.1
xml-types-0.3.3
xss-sanitize-0.3.2
yaml-0.8.1
yesod-1.1.2
yesod-auth-1.1.1.2
yesod-core-1.1.3.1
yesod-default-0.6.1
yesod-default-1.1.0.2
yesod-form-1.1.3
yesod-json-1.1.0
yesod-persistent-1.1.0
yesod-platform-1.1.4
yesod-routes-1.1.0.1
yesod-routes-1.1.0.2
yesod-static-1.1.0.1
yesod-test-0.3.0.1
zlib-bindings-0.1.1.1
zlib-conduit-0.5.0.1
After a complete clean up of the system - I mean uninstall haskell-platform, yesod-platform and delete files related to haskell, yesod and ghc - then a fresh install for haskell-platform + yesod-platform all goes splendid.

Resources