Integrating custom Linux test project package with Alpine - linux

I have downloaded the Linux Test Project repository and compiled it. I now want to integrate it with the Alpine's binary image while compiling. A unix shell script that has Alpine specific commands will kick-in during compile time which adds these packages to the Alpine's binary. All the standard packages (like Python, Nginx and memcached) are getting integrated successfully by this script except LTP. The command used here is apk add <package name>. The same command doesn't work with the custom LTP's binary.
I tried n number of things like upgrading the apk package, supplying the entire LTP repository using --repository option, trying to manually generate an APKBUILD.tar.gz. Nothing works. Any help would be deeply appreciated.
Thanks in advance !

Related

Finding location of mongo source on Alpine linux

I'm in an Alpine container and wish to find the location where apk add mongodb installed the mongo source code.
I tried installing some packages for locating files (whatis, whereis, locate...) but none came down with a simple apk add $PACKAGE so I'm not sure how best to search around.
Does anyone know how I can quickly find the path to the Mongo source in Alpine linux?
As far as I know, apk packages don't generally contain source code, but rather pre-compiled binaries. The contents of the mongodb package can be found here.
The log file associated with the latest build of the package indicates that the source was pulled down from http://downloads.mongodb.org/src/mongodb-src-r3.6.3.tar.gz by the build machine, but I wouldn't expect those contents to be present on a machine that just apk adds the mongodb package.

How do I build vala from scratch

When I try to build vala (https://github.com/gnome/vala), I get an error from autogen that vala must already be installed in order to build vala. So how can I build it on a system that doesn't have it already? I get that it is self hosting, but there has to be some way to boot strap it.
My os is Android-x86 6.x
You can download a source tarball from download.gnome.org and build from there. The tarballs contain generated C code to build the compiler without a Vala compiler installed.
The procedure would be something like:
curl --location https://download.gnome.org/sources/vala/0.38/vala-0.38.4.tar.xz \
--output vala-0.38.4.tar.xz
tar --extract --file vala-0.38.4.tar.xz
cd vala-0.38.4/
./configure
make
The configure script should detect there is no valac installed and select the bootstrap option. You could also try make bootstrap if you run in to problems.
You can then run the test suite and install to the usual Unix file locations with:
make check
make install
Although the install part may not be relevant to Android.

Installing Node in a linux grid server

So some background, I'm installing Node on a host server, but it's a grid server not a server that's solely for my website.
The grid server doesn't have a root user/ administrative powers. So to install node I found this workaround: http://iantearle.com/blog/media-temple-grid-and-nodejs . It's a Linux Grid server, I've never used Linux so if someone could explain to me what the commands mean, especially: ./configure --prefix=~/opt/
Lastly I followed the steps but when I try to run the node command in the server it says node:command not found - which is why I'm trying to understand the steps. Thanks
To explain the process:
Configure
The configure script is responsible for getting ready to build the software on your specific system. It makes sure all of the dependencies for the rest of the build and install process are available, and finds out whatever it needs to know to use those dependencies.
Unix programs are often written in C, so we’ll usually need a C compiler to build them. In these cases the configure script will establish that your system does indeed have a C compiler, and find out what it’s called and where to find it.
Make
Once configure has done its job, we can invoke make to build the software. This runs a series of tasks defined in a Makefile to build the finished program from its source code.
The tarball you download usually doesn’t include a finished Makefile. Instead it comes with a template called Makefile.in and the configure script produces a customised Makefile specific to your system.
3.Make Install
Now that the software is built and ready to run, the files can be copied to their final destinations. The make install command will copy the built program, and its libraries and documentation, to the correct locations.
--prefix=~/opt/ -> will set the build directory to /home/yourhome/opt directory.
Now if you didnt get errors while doing those 3 steps explained above make sure you did the following:
nano ~/.bash_profile
export PATH=~/opt/bin:${PATH}
nano is a text editor and you are opening .bash_profile file with it.
you need to add export PATH=~/opt/bin:${PATH} in that file and save it using ctrl+x
Then restart your terminal.
Specified github repository for nodejs is outdated. use the following link instead.
git clone https://github.com/nodejs/node.git
P.S node:command not found usually happens when the program is not installed correctly or it's executable isnt in your terminal's PATH variable.

how I can build mozilla projects

I found https://github.com/mozilla/gecko-dev/tree/master/b2g Mozilla repositories where have the moz.build file, can anybody help, how I can build this plugin. What are tools I need use for build project with use moz.build ?
thank you
If you are trying to build B2G (Firefox OS), then you should follow the procedure documented here. But I have to advise you that you're using the wrong repository if that's your objective, since the correct one for B2G should be this.
In any case, you would need to install the build prerequisites for Linux, as described here, by using the following command:
wget -O bootstrap.py https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py && python bootstrap.py
Now, if you really wanted to just build the b2g folder in the repository you linked, once you've downloaded and installed the prerequisites, simply issue the following command from the root of gecko-dev:
./mach build b2g
This will invoke mach, the build system Mozilla uses, to build the code in the b2g directory.

Building rpm, overriding _topdir, but getting BuildRequires deps?

I have a libfoo-devel rpm that I can create, using the trick to override _topdir. Now I want to build a package "bar" which has a BuildRequires 'libfoo-devel". I can't seem to find the Right Way to get access to the contents of libfoo-devel without having to install it on the build host. How should I be doing it?
EDIT:
My build and target distros are both SuSE.
I prefer solutions that don't require mock, since I believe SuSE does not include it in its stock repo.
Subsequent EDIT:
I believe that the answer I seek is in the build package. Perhaps it's SuSE's answer to mock? Or it's the distributed version of the oBS service?
DESCRIPTION
build is a tool to build SuSE Linux
RPMs in a safe and clean way. build
will install a minimal SuSE Linux as
build system into some directory and
will chroot to this system to compile
the package. This way you don't risk
to corrupt your working system (due to
a broken spec file for example), even
if the package does not use BuildRoot.
build searches the spec file for a
BuildRequires: line; if such a line is
found, all the specified rpms are
installed. Otherwise a selection of
default packages are used. Note that
build doesn't automatically resolve
missing dependencies, so the specified
rpms have to be sufficient for the
build.
Note that if you really don't need libfoo-devel installed to build package bar the most sensible alternative would be to remove libfoo-devel from the BuildRequires directive (and maybe put the requirement where it belongs).
However, if you cannot do that for some reason, create a "development" rpm database. Basically it involves using rpm --initdb --root /path/to/fake/root. Then populate it with all of the "target packages" of your standard distro installation.
That's a lot of rpm --install --root /path/to/fake/root --justdb package-name.rpm commands, but maybe you can figure out a way to copy over your /var/lib/rpm/* database files and use those as a starting point. Once you have the alternative rpm database, you can fake the installation of the libfoo-devel package with a --justdb option. Then you'll be home free on the actual rpm build.
If neither mock nor the openSUSE Build Service are a viable choice then you will have to buckle down and install the package, either directly or in a chroot; the package provides files that the SRPM packager has decided are required to build, and hence is in the BuildRequires tag.

Resources