Yum, apt-get, the usual package managers are not exactly written for an embedded system. Yum is mostly python, and re-writing it would be unmaintanable overkill. Apt-get is possible, but for several reasons, rpm would be nicer to use at the moment.
So that leaves a little known, but known by everyone package called apt-rpm.
A package manager, possibly for an embedded system.
Here's how to build directly from git on FC15...
1001 git clone http://apt-rpm.org/scm/apt.git
1002 cd apt
1008 autoreconf -i -s
1011 sudo yum -y install bzip2-libs bzip2-devel rpm-devel
1031 sudo yum -y install sqlite2 sqlite-devel sqlite2-devel
1034 sudo yum -y install libxml2-devel
1038 sudo yum -y install lua-devel readline-devel
1009 ./configure
1039 make
1040 sudo make install
1042 apt-get
1043 apt
apt-cache apt-cdrom apt-config apt-get apt-shell
the package is also still available on the upstream repo, so that is good.
=============================== Matched: apt-rpm ===============================
apt.i686 : Debian's Advanced Packaging Tool with RPM support
apt.x86_64 : Debian's Advanced Packaging Tool with RPM support
fedora-package-config-apt.noarch : Fedora configuration files for the apt-rpm
: package manager
apt-devel.i686 : Development files and documentation for APT's libapt-pkg
apt-devel.x86_64 : Development files and documentation for APT's libapt-pkg
apt-plugins-list.x86_64 : Additional commands to list extra packages and leaves
apt-plugins-log.x86_64 : Log the changes being introduced by the transaction
apt-python.x86_64 : Python bindings for libapt-pkg
For embedded, it definitely needs to be stripped.
[14:34] | <rickfoosusa> | rwxr-xr-x. 1 root root 967980 Aug 19 14:24 /usr/local/bin/apt- |
[14:34] | <rickfoosusa> | -rwxr-xr-x. 1 root root 761665 Aug 19 14:24 /usr/local/bin/apt- |
[14:34] | <rickfoosusa> | -rwxr-xr-x. 1 root root 79131 Aug 19 14:24 /usr/local/bin/apt- |
[14:34] | <rickfoosusa> | -rwxr-xr-x. 1 root root 1252005 Aug 19 14:24 /usr/local/bin/apt- |
Added -Os to the build...
./configure, and ./configure --enable-static
make install-strip
-rwxr-xr-x. 1 root root 110592 Aug 19 15:27 /usr/local/bin/apt-cache
-rwxr-xr-x. 1 root root 788088 Aug 19 15:26 /usr/local/bin/apt-cache-static
-rwxr-xr-x. 1 root root 77848 Aug 19 15:27 /usr/local/bin/apt-cdrom
-rwxr-xr-x. 1 root root 728984 Aug 19 15:26 /usr/local/bin/apt-cdrom-static
-rwxr-xr-x. 1 root root 11944 Aug 19 15:27 /usr/local/bin/apt-config
-rwxr-xr-x. 1 root root 160376 Aug 19 15:27 /usr/local/bin/apt-get
-rwxr-xr-x. 1 root root 827448 Aug 19 15:26 /usr/local/bin/apt-get-static
-rwxr-xr-x. 1 root root 163808 Aug 19 15:27 /usr/local/bin/apt-shell
The stock fedora versions (64 bit) are about the same size.
yum -y install fedora-package-config-apt.noarch
-rwxr-xr-x. 1 root root 110952 May 6 01:19 /usr/bin/apt-cache
-rwxr-xr-x. 1 root root 78064 May 6 01:19 /usr/bin/apt-cdrom
-rwxr-xr-x. 1 root root 11880 May 6 01:19 /usr/bin/apt-config
-rwxr-xr-x. 1 root root 160680 May 6 01:19 /usr/bin/apt-get
-rwxr-xr-x. 1 root root 164488 May 6 01:19 /usr/bin/apt-shell
So there, more to come later...
No comments:
Post a Comment