How to get a file/directory added to existing .deb file - linux

We have a nicely tested executable that is installed with a .deb file. We decided that we need to add a couple licensing files to the existing .deb file so that they are readable after installing the .deb file. Is there an easy way to add a couple of text files to the .deb file?
I saw add to archive but it didn't mention .deb files. Just .tar.
I also saw deb package but I wasn't sure about opening the existing package without more info.

Related

Mingw-W64 is downloaded as a winrar file not as an installer.exe and even i can't install it as a winrar when i extract it

I want to install Mingw-W64, but the download is in winrar form not in a .exe. When I extract, it the folder is filled with bunch of files. None of them contains the installer.
I searched, but nothing is working. All I want is the installer.exe but every time it's just an archive.
I found a video, but there is a problem when I tried the instructions. The download kept restarting and nothing happened. When I extracted the archive the files are not same as shown in the video.
There is a windows installer at the msys2 official website https://www.msys2.org/ . Follow the guides for a successful installation.
Alternatively you need to extract the downloaded files to a path like the root of your C: drive and add the contents to your system or user path as an environment variable.

Debain Package rebuild

I've downloaded .deb package
Then I've extracted all the data from the current .deb file and add a new file with arbitrary content.
My question: how can I create a new .deb package from this modified directory /tmp/tcpdump?
Create a necessity directory structure, then:
dpkg-deb --build package_name
Found answer here: https://ubuntuforums.org/showthread.php?t=910717

Buildroot tools - adding a user libs from .RPM

I have some task to make linux's bootable image with my own package. This package (named starlet) is a set of .C modules + Makefile. I created the package/starlet directory and added Config.in and starlet.mk; selected in the Buildroot configuration to include my package to build target image.
So, it's works fine...
Now i'm need to build starlet's image with additional library from the zztop-dev package.
zztop-dev package is an .RPM package with set of .H and .C files to build target zztop.a (.so) libraries.
What do I need to do to install zztop-dev.RPM before building STARLET image?
Having the source code for a package stored in a .rpm file is quite uncommon. Buildroot has built-in rules to extract all the most common formats. Using an uncommon format requires you to write extraction rules on your own.
So the first question is whether you can use a more common format that Buildroot has rules for. You probably can access the source code from its original location in a source code repository (git, Subversion, whatever) or a tarball.
If you really need to extract the sources from am .rpm file, then you need to write your own custom extract commands. Look for LIBFOO_EXTRACT_CMDS in the Buildroot user manual.
But if your extract commands call the rpm command to do the extraction then you'll need the rpm tool either installed on your host machine, or packaged as a host package in Buildroot and listed as a dependency of zztop-dev. The former approach is way simpler, but it will force you to have rpm installed on every host machine where you run the build.

Removing RPM Packages

Hello experts and thank you for taking your time to answer the question:
Can I remove the .rpm files after having installed the program?
EXAMPLE:
I have installed the rar.rpm file and now I have the rar.rpm in a directory where I downloaded the file and want to know if I could remove that file without disrupting the rar program's function in centos.
Regards
Sam
Yes, you can.
Though you may want to keep it in case you need to install it again.
Also, in general, you shouldn't be (and shouldn't need to) use randomly downloaded .rpm files.
You should usually be using yum or similar tool to install a package from the configured repositories on the system.

Pack file to user Dekstop from deb archive

Is there a way to set the unpacking destination a single file to user Desktop folder?
To set Something like home\$user\Desktop structure in the package folder.
I know I can set unpacking directory with --root option for the whole package, but I need only part of the archive to be unpacked to the Desktop
You need to write a postinst script. Check out the debian website for details:
https://wiki.debian.org/DebianEdu/HowTo/DistributeFilesToUserDesktops
If your not bothered about having a desktop icon; then I would recommend that you create a path for the launcher. Normal launchers are really .desktop files in /usr/share/applications/

Resources