Install rpm or dpkg with no package manager in embedded Linux - linux

I need to add new functionality to a chinese Linux-based time attendance clock. More specifically I need to make It SNMP capable, which is not available by factory default.
After some research I found a login:password which worked for the TelNet login and managed to get inside the system with root privileges.
The first thing I did was to figure out which Linux distro was It running:
cat /etc/issue throws this:
"PXA Linux Preview Kit
Kernel 2.6.29 on armv5tejl"
I did a quick google search and found that
"PXA Linux is a port of the Linux kernel for PXA based processor based devices and machines."
I dont understand why It's running a PXA Linux Preview Kit on an armv5tejl.
I gave no importance to this fact, and got to the next step: finding which package manager has this system:
I tried several commands:
apt-get, aptitude, rpm, dpkg, yum, slapt-get, ipkg, and several others. None of them worked.
I found that the system had Busybox installed. More specifically BusyBox 1.15.3. In this BusyBox I couldnt find any of those commands. I found that BusyBox does implement rpm and dpkg but this version doesnt have them.
The only command which seems to be "software installation related" I found was the command "install". From BusyBox docs:
"install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [source] dest|directory
Copy files and set attributes"
But probably it doesnt replace the package manager tool. I think that I need to get a way to install dpkg or rpm, and then use them to install the SNMP packages I want. As I read, the lowest level package installation tool is dpkg so I don't have a clue on where to begin.
Can someone give me some advice on how to approach this issue? How can I install a package with no package manager possiblities at all?

You won't be able to install additional software to that system via a package manager. Such devices aren't designed like that. The firmware that was shipped with the device is all there is. What would be the incentive of the device manufacturer to maintain a package repository with general purpose linux software?
But not all hope is lost. You can of course try to compile the needed software yourself (and by that extend the firmware). For that to work you will need a suitable ARM cross compiler (GCC). Via static linking your SNMP package won't have any dependencies to the library versions already on the device (so you don't need a sysroot matching the libraries on the device).

Related

make-kpkg not working in Fedora 20

I have been working with Linux kernel, compiling and inserting modules, in my custom kernels. Previously I had Ubuntu where I had been working with my custom kernel and all the commands for compiling and installing kernel worked like a charm once I had installed all the required libraries.
Now I have switched over to Fedora 20, here I want to install my custom kernel and for that I downloaded all possible kernel tools, namely, Kernel Development Kernel Tools these are group installs and other libraries that I downloaded were ia32 libraries (as I am working on 64-bit OS), kernel-devel package. Still I am not able to work with make-kpkg command. It says bash: make-kpkg: command not found....
I googled out and did everything I could.
Can anyone get me out of this trouble?
make-kpkg is a Debian kernel packaging tool. It does not exist on RHEL family distributions, such as Fedora.
Please refer to the Fedora documentation page "Building a custom kernel" for the correct procedure. (I have not reproduced it here as it is rather long, and I'm not sure how far you may have gotten.)
The make-kpkg tool is part of the 'kernel-package' package on Debian systems. It is a Debian tool to produce debian package files. Ubuntu is based on Debian and has this tool. However, Fedora uses a different system to manage packages. So, make-kpkg would not be available on Fedora.

How to install gcc onto a RedHat Enterprise 5 virtual machine?

I am trying to install gcc onto a linux RedHat Enterprise 5 virtual machine, and I have tried using a tar.gz package and also a rpm, and both methods give errors. The tar.gz says there is no c compiler found, and the rpm has dependencies that it can not find. Yum is available on this machine, however, there are no repositories found and I am still unsure of how to install the necessary repositories to get gcc installed. The end goal for installing gcc is to be able to install rsync, tcl, and the expect package for shell scripts. Any advice?
Your .tar.gz probably didn't work because it was the raw source code for GCC. The source for the compiler requires a compiler to build it — the classic chicken & egg problem. To get around this, you'd need to get a precompiled compiler for your system's architecture. GCC is not offered in a precompiled form by the FSF, as far as I know. If you're ever interested in actually trying to build a Linux system from the ground up like that, you might find Linux From Scratch interesting.
You'll probably not even need GCC to get rsync, tcl, etc. There are almost certainly pre-built packages available from yum repos for those tools. As #PeteyT said, RHEL uses a subscription to allow you to access packages using yum. You can learn more from the Red Hat Subscription Management Guide.
If you don't have a Red Hat subscription, you might be interested in CentOS, Scientific Linux and Fedora. As I understand it, CentOS and Scientific Linux are meant to be almost identical to RHEL. On the other hand, Fedora is a separate project owned by Red Hat (according to Wikipedia) which is an OS in its own right, and sometimes serves as a feeder to Red Hat products.
Once you have repos available, either via subscription or switching OSs, you should be able to simply run yum install rsync tcl expect to install rsync, tcl, and expect.
You might look at yum's docs for more about the various commands you can use with yum, and Red Hat's docs for more on package management in RHEL.

How to get started with Bluetooth for Ubuntu

I really need help getting started. I want to make a basic program (in C) that can read a bluetooth socket and print whatever it is sent. I tried to get Bluez (followed this:http://hackgnar.com/article/installing-the-latest-bluez-software-in-ubuntu-12/ it went great until the "make" at the end and then no luck, would not make and example program could not find bluetooth/bluetooth.h).
I guess my hopeful options are:
some one can tell me what I'm missing with Bluez's install and possibly how to get started with it (compiling etc)
Alternative to bluez? Laptop could do bluetooth file transfers before I installed bluez so do I even need it for this application?
Any sort of comprehensive hello world (download, install, example, compile and run)
I have a strong programming background, just not in Linux (you can gloss over the C stuff but please not the Linux/Ubuntu stuff).
Thanks!
I can only guess that you have an old version of the kernel, or one of the required libraries. Try updating your linux installation (e.g. to a 3.5.x kernel or thereabouts).
I had no problem completing the steps you took.
If you are looking for example programs, you can always look at the simpler tools.
On my ubuntu box I'd do e.g.
sudo apt-get build-dep bluez-tools
apt-get source --compile bluez-tools
which gets all build dependencies, sources and builds the bluez-tools package on your system.

Linux standalone 'installation' of Postgresql

For easy deployment, I'd like to ship an installation of Postgres as part of the application. Is it possible to include an already compiled and runnable version of Postgres that can be launched as process? I was able to do such thing with a Windows and MacOS version, but haven't found anything about Linux on that matter yet. Perhaps someone has tried this before and can share some insights...
You haven't stated what linux OS you're using.
Assuming it's a Redhat variant why not package your application as an RPM package? You could then declare a dependency on the standard Postgres package which would be automatically installed yum. Same principle applies if you're using Debian based systems, just a different packaging format.
From the user's perspective the OS's native packaging format is always the easiest way to install your application. Just requires effort to package it properly.
You can find cross-platform binaries from these pages on PostgreSQL official website:
For easy GUI .run installers, use links provided at http://www.enterprisedb.com/products-services-training/pgdownload.
If your target machine has no X installed on it, or you want to automate installation process with shell scripts, then you can download RPM or Deb packages from http://community.openscg.com/se/postgresql/packages.jsp
I found these links on http://www.postgresql.org/download/linux/ubuntu/, under "Cross distribution packages" and "Graphical installer".
I quote from those pages:
Note: The cross distribution packages do not fully integrate with the platform-specific packaging systems.
You must have root priviliges to install these packages, however, none of your systems library files will be altered. The supporting libraries that these binaries require are included locally as part of the install. This is the "special sauce" that allows identical binaries to run on different linux distro's.

Port a debian package to YUM for CentOS

I have a project that runs on Debian and uses many packages provided from the Debian repositories.
Because of demand, I've looked into porting the project to CentOS, but found that many of the packages I require are completely missing - at least 10 dependencies would have to be compiled manually at install time on the users machine.
My question is, what is the best way to create an installer for the user's machine? Should I use automake tools (with the standard ./configure, make, make install), to compile the required libraries, or is this a non-standard approach. Note that my app doesn't actually need to be compiled since it is written in Python, so is it weird to do a "make", when you're not compiling your own app?
Should the configure script just warn the user that package X is missing, and let them handle the rest?
Should I roll my own dependency checker by runng pkg-config manually a few times for each library required, and exit if something is missing?
I'm quite new to this, so any tips to get me moving in the right direction are appreciated.
Edit: I am familiar with RPM and yum for red hat base distros, but CentOS is missing many multimedia packages that I require. An example of one of my package dependencies is "liquidsoap" which is a programmable audio engine: http://savonet.sourceforge.net/
This is available on Debian, but not Redhat/Centos
See this link on CentOS package management.
http://wiki.centos.org/PackageManagement/Yum
CentOS is redhat based and does not use .deb packages by default. However apt package management has been ported to tons of platforms, you may be able to use a port for centOS
If you use YUM whatever packages you need will be there for your application as redhat distros need all the same things that any other distro does.
EDIT: To get the details out of comments
Packages not available on the target platform either have to be built (possibly as a port) on the target platform and then shipped in the ported package (in this case YUM), or code needs to be modified and forked to use packages which already are available on the target platform. The choice depends on which is worse, or which is even possible given your constraints.

Resources