Finding location of mongo source on Alpine linux - 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.

Related

How to uninstall RStudio (server) under Ubuntu from source build

I was trying to install RStudio-v2022.07.1-554 (server) under Ubuntu 22.04 LTS (arm64). Because there doesn't exist a binary for arm64, I have to build the RStudio from the source. After download the source (tag 2022.07.1-554), and installed all dependencies. I was able to install the binary.
However, after make install, I found out that the default CMAKE_INSTALL_PREFIX was set to /usr/local, not as the INSTALL file claimed: /usr/local/lib/rstudio-server! Now, all the 1560 library and binary files of RStudio-server are spread over under the folder /usr/local(Thank you RStudio team!):
/usr/local/./README.md
/usr/local/./INSTALL
/usr/local/./COPYING
/usr/local/./NOTICE
/usr/local/./SOURCE
/usr/local/./VERSION
...
When I try to make uninstall, I found out the makefile doesn't define any uninstall action. Fortunately, there is an install_manifest.txt file which listed all the files installed under usr/local. What I could think of to "uninstall" RStudio is to use shell script to loop through the files list and remove them one by one.
Is there any better way to uninstall the RStudio-server compiled from source other than manually delete the files one by one.
Thank you for your attention and reply in advance.

Integrating custom Linux test project package with Alpine

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 !

How to properly build package from sources

I'm using ubuntu 18.04.
I want to modify and build a project and install it as a package. For example gstreamer1.5.
So I clone repo, modify code and use ./autogen.sh and make install in project folder. Why don't I see it in apt list then? Also there is no files in /usr/lib/x86_64-linux-gnu/gstreamer-1.5/.
The reason why I want it to behave as the original package is becase I want to build another project that uses it (kurento media server). So I just want to remove some plugins I don't need that use another packages as deps I cannot use.
apt list is from the Linux distribution. You custom made things won't appear there magically.
If you make install from your custom tree your libraries and plugins will land in /usr/local/lib/.. (note the local path). You may have some control over it by setting the prefix path. Just be careful you don't break you system by overwriting with broken libraries.

How to create debian bundle?

i am new to Debian. so can anybody send a link to Debian source code of configuring and installation. i know all linux commands, but i need step by step explanation to create Debian package of my project. which includes some jar files and some config files
thanks in advance
there is plenty of documentation on how to create a Debian package:
https://wiki.debian.org/HowToPackageForDebian
if you want to see a real-world example, you can get the code for any (official) package, by simply running apt-get source <mypackage>. E.g. the following command gets everything needed to create the hello Debian package (with the exception of build-dependencies):
apt-get source hello
This contains both
the code needed to create the deb with dpkg-buildpackage (everything contained in the debian/ subfolder)
and the original source code (everything outside of the debian/) subfolder).

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