Using Stow as a package manager.

Chris Fowler <[email protected]> Wed, 4 Nov 2020 13:50:17 -0500
Newsgroups gmane.comp.gnu.stow.general
Message-ID <CAM9kbeNh+G=KV2xiWiVKMeh0e3gOX+9fWkiX1O1_P97-Y=p_3w@mail.gmail.com>
--000000000000003a5e05b34c7473
Content-Type: text/plain; charset="UTF-8"

I was browsing the message archives this morning and noticed a few threads
in regards to using Stow as a package manager.  Suggestions of features,
extensions, etc.  I was not a subscriber of the list so I would've not have
seen these threads when they were created, but I've been using Stow as my
package manager for over 5 yrs.  I thought I'd share some on what I did:

I was working on this project where I needed to build linux devices from
source,manage software versions, and keep track of every file that was on
the device.  I did this in the past, but without any package management it
was hard to track where files came from and if they should even be there.

I found Stow and what I liked about Stow is that it made it easy for me to
audit this system.  Every file in /bin was a symlink into /usr/pkg/$(uname
-m)/pkg-name/bin/.....   I could create scripts that would search / look
for files that were NOT symlinks.

To prepare for building these systems from scratch I worked through LFE
(Linux From Scratch) and BLFS (Beyond ..).  After /tools was built, per the
doc, I added a few perl modules and GNU Stow to /tools/  I then wrote shell
scripts for each page, did DESTDIR builds of everything, and used Stow for
EVERY PAGE.  When I was done the whole system booted into X and was all
created using Stow.  Every file in /bin, /sbin, /lib, /usr/lib were
symlinks to their owners,.  The project was as if you went to  Navy Seals
school and asked "show me the hardest way to succeed here."  If you look at
the BLFS page on ntp you'll notice that the instructions require you to add
a group.  Instead of doing that during the build, I add all that to
post-install scripts and the group is added after install if it does not
exist.

GNU Stow is not a package manager.  It needs a wrapper to do package
management.  I wrote one.  We'll call it sstow.

1.  Every pkg directory has a hidden json file with details about the
pkg..  Pkg name, version, files in the pkg.  The names of other pkgs that
must be installed before (dependencies), lists of libraries that the ELF
files were linked to use, etc. To see this info you execute:  query
package: 'sstow --qp pkg'.

2. I created strict rules where no package could edit any files in
another.  This means that /etc/httpd/httpd.conf that would normally be
httpd.conf -> ../../usr/pkg/apache-2.4.26/etc/httpd/httpd.conf had to be
converted from a symlink to a regular file.  Stow can't do any of that so I
had to add stow-pre/post-install and stow-pre/post-remove operations.  Now,
sstow will execute those as required.  stow-post-install converts
/etc/httpd/httpd.conf from a link to a real file and you can not edit it
without breaking those rules.   The rules allow you to tar the
/usr/pkg/apache-2.4.26  direcroy, transfer to another system and install
via 'sstow --tarball apache-2,4,26.tar.xz;'

One an audit, all files in /bin would be symlinks and most files in /etc
would be real files that were converted from symlinks.

3.  Some programs can't handle symlinks and expect the realpath to be the
same as the symlink. Python is an example of this.  For perl and python
modules I create packages for each module.I have to explicitly tell Python
where to find things.  In these cases I'll copy what normally goes into
/usr/bin to /lib/libexec.  I install a wrapper as /usr/bin/python and that
wrapper does the right thing.

Something like this:

PP="/opt/name"

LD_PRELOAD="libkeepalive.so"

PYTHONPATH="${PYTHONPATH}:${PP}/usr/lib/python3.7/site-packages"

PYTHONDONTWRITEBYTECODE=1

export PYTHONPATH PYTHONDONTWRITEBYTECODE





if [[ ! -e "${PP}/opt/extra/lib/libssl.so.1.1" ]]; then

  echo "ERROR: PKG openssl1 not installed."

  exit 1

fi



exec "${PP}/lib/libexec/python3.7" "$@"

Also, some programs have strict rules that don't allow symlinks.  Apache's
cgi-bin is an example.  You can either patch apache, or convert
/srv/www/cgi-bin to a real dire
copy and convert the cgi files from your own package into real files.

GCC is another example of a program that can break with symlinks.  When you
work the GCC page with LFS, after /tools, you'll run into some issues that
will require some changes to the instructions building GCC.

4.  My goal is to start with a simple directory tree at /, run a for loop
against a list of tarballs, run sstow on those files, and be running.  I
also want to run the same loop, do a sstow --purge, and have a directory
tree as pristine as when I started.  stow-post-remove scripts do remove
files like /etc/httpd/httpd.conf.  To accomplish this I support folding,
but I start out with a Linux FHS structure where each directory contains a
hidden file '.nofold'.  That is enough to keep Stow from folding /bin into
the first package it installs.   Works great for /var/log, /var/run/ /tmp,
/etc, etc.

5. Files that are added to for each perl module can be a problem.
   perllocal.pd and .packlist that are included with each perl module can
cause issue for Stow.  I don't need these files so I simply delete them
when I build those packages.  I build over 500 perl packages and install
via Stow. Originally, I hadded those files to stow-local-ignore and then
the post-install routine would add info to perllocal.pd and .packlist found
in /

6.  Packages are created as standard, deve, doc, extra, etc.  A full
install for a device is over 1G and 1,899 packages.  DOC, DEV, and pkgs ina
prune list are purged.  Now it is 503 packages and 250M.  That directory
becomes a squashfs image that runs on the device.  sstow-get will download
a package from a repo via https ,install on a portion of SSD that is
non-volatile, and at boot is installed via sstow and GNU Stow.

I liked the strict symlink farm that GNU Stow provided and it reminded me
of SCO OpenServer 5 Software Storage Objects.  That was also a symlink
farm.  Creating a system that uses GNU Stow as just the symlink farm I've
basically created a system that is not much different than apt-get, yum,
etc.  I have created most of their features.

In summary, I'm saying to those that have inquired about using Stow as a
package manager that it is possible, but you have to put a lot of work into
it.  Proficiency in Linux/UNIX is also a requirement since you have to
build software and install them into DESTDIR, create a package, and a
system to install it correctly. When I needed guidance on how to do a
DESTDIR install of a piece of OSS I would look at LFS, BLFS, or Arch
Linux.  The Arch Linux PKGBUILD files were VERY useful because it installs
everything into a DESTDIR before it installs anything into /. I would guess
that I've spent a few hundred hours creating the wrapper around Stow.  Even
so, it was a very good investment.  We now know where every file comes
from.  We know every version of what we have.  We know where the source
came from. We can recreate packages.  We can install packages on devices
that were needed in the "firmware".

sstow --installed
....
100 : apache-2.4.46-1
101 : tomcat-connectors-1.2.48-1
102 : libjson-maybexs-perl-1.003008-1
103 : libcrypt-openssl-guess-perl-0.11-1
104 : libcrypt-openssl-random-perl-0.15-1
105 : libcrypt-openssl-rsa-perl-0.31-1
106 : libconvert-asn1-perl-0.27-1
107 : libcrypt-openssl-bignum-perl-0.09-1
108 : libcrypt-le-perl-0.35-1
109 : liblog-log4perl-perl-1.47
110 : libperl-tidy-perl-20201001-1
111 : libtest-output-perl-1.031-1
112 : libpackage-alias-perl-0.13
113 : libnet-netmask-perl-1.9022-1
114 : libcgi-perl-4.51-1
....

sstow --qp libmysql-connector-java
PKG    : libmysql-connector-java-8.0.22-1
NAME   : libmysql-connector-java
VER    : 8.0.22-1
GROUP  : PROD
ARCH   : x86_64
BUILD  : 2020-11-04 13:35:33
SIZE   : 2.28M
FILES  :

./l/java/mysql-connector-java-8.0.22.jar
./l/java/mysql-connector-java.jar -> mysql-connector-java-8.0.22.jar

sstow --qp --qp-libs busybox
PKG    : busybox-1.29.2-1
NAME   : busybox
VER    : 1.29.2-1
GROUP  : PROD
ARCH   : x86_64
BUILD  : 2020-11-04 11:42:27
SIZE   : 646.41K
FILES  :

./b/busybox
  /lib64/ld-linux => /lib64/ld-linux-x86-64.so.2
  libc.so.6       => /lib64/libc.so.6
  libm.so.6       => /lib64/libm.so.6
  linux-vdso.so.1 => linux-vdso.so.1

./sb/ifconfig -> ../bin/busybox
./sb/telnet -> ../bin/busybox

sstow-deps rrdtool
PKG  : rrdtool-1.4.8-1
NAME : rrdtool
VER  : 1.4.8-1

Dependencies:
I: bzip2      1.0.6-1  PROD
I: expat      2.2.0-1  PROD
I: fontconfig 2.12.1-1 PROD
I: freetype   2.7.1-1  PROD
I: glib       2.30.0-1 PROD
I: libcairo   1.6.4-1  PROD
I: libdbi     0.9.0-1  PROD
I: libffi     3.2.1-1  PROD
I: libpango   1.21.1-1 PROD
I: libpixman  0.10.0-1 PROD
I: libpng     1.6.28-1 PROD
I: libxml2    2.6.26-1 PROD
I: pcre       8.35-1   PROD
I: system     0.0.0-1  PROD
I: zlib       1.2.8-1  PROD

Total          : 15

Packages dependent on rrdtool:
I: ops-cs-singularity 1.0.0 PROD

INSTALL        : 1
Total          : 1

sstow-get --not-installed
URL : http://10.0.20.57:9090/
REPO: pkg/cs/dev/i586

Downloading: md5.txt
########################################################################
100.0%
Downloading: index.json.xz
########################################################################
100.0%
Packages not installed.
1   : 3proxy-0.8.12-1                                            0.8.12-1
2   : 3proxy-doc-0.8.12-1                                        0.8.12-1
3   : SoapyRTLSDR-1542310902-1
1542310902-1
4   : SoapyRemote-1542309964-1
1542309964-1


It never started out as complex as above, it never does.  When building the
firmware I need to make sure all libs required are installed so I had to
add --qp-libs.  This required the program that generates the info file to
search the pkg directory, look for ELF, run ldd, and catalog the output.
This will not work on .so files hidden in java jars. I needed a way to
install packages that I needed rarely, while keeping firmware image down to
60M.  I had to add a repo feature.  The repo feature required a way to
install deps too.  I have to add dependency tracking.  sstow also support a
.acl file created by getfacl or the build.  It will set those perms after
install, but before running any post-install.

Chris

--000000000000003a5e05b34c7473
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>I was browsing the message archives this morning and =
noticed a few threads in regards to using Stow as a package manager.=C2=A0 =
Suggestions of features, extensions, etc.=C2=A0 I was not a subscriber of t=
he list so I would&#39;ve not have seen these threads when they were create=
d, but I&#39;ve been using Stow as my package manager for over 5 yrs.=C2=A0=
 I thought I&#39;d share some on what I did:</div><div><br></div><div>I was=
 working on this project where I needed to build linux devices from source,=
manage software versions, and keep track of every file that was on the devi=
ce.=C2=A0 I did this in the past, but without any package management it was=
 hard to track where files came from and if they should even be there.</div=
><div><br></div><div>I found Stow and what I liked about Stow is that it ma=
de it easy for me to audit this system.=C2=A0 Every file in /bin was a syml=
ink into /usr/pkg/$(uname -m)/pkg-name/bin/.....=C2=A0=C2=A0 I could create=
 scripts that would search / look for files that were NOT symlinks.=C2=A0 <=
br></div><div><br></div><div>To prepare for building these systems from scr=
atch I worked through LFE (Linux From Scratch) and BLFS (Beyond ..).=C2=A0 =
After /tools was built, per the doc, I added a few perl modules and GNU Sto=
w to /tools/=C2=A0 I then wrote shell scripts for each page, did DESTDIR bu=
ilds of everything, and used Stow for EVERY PAGE.=C2=A0 When I was done the=
 whole system booted into X and was all created using Stow.=C2=A0 Every fil=
e in /bin, /sbin, /lib, /usr/lib were symlinks to their owners,.=C2=A0 The =
project was as if you went to=C2=A0 Navy Seals school and asked &quot;show =
me the hardest way to succeed here.&quot;=C2=A0 If you look at the BLFS pag=
e on ntp you&#39;ll notice that the instructions require you to add a group=
.=C2=A0 Instead of doing that during the build, I add all that to post-inst=
all scripts and the group is added after install if it does not exist.<br><=
/div><div><br></div><div>GNU Stow is not a package manager.=C2=A0 It needs =
a wrapper to do package management.=C2=A0 I wrote one.=C2=A0 We&#39;ll call=
 it sstow.</div><div><br></div><div>1.=C2=A0 Every pkg directory has a hidd=
en json file with details about the pkg..=C2=A0 Pkg name, version, files in=
 the pkg.=C2=A0 The names of other pkgs that must be installed before (depe=
ndencies), lists of libraries that the ELF files were linked to use, etc. T=
o see this info you execute:=C2=A0 query package: &#39;sstow --qp pkg&#39;.=
=C2=A0=C2=A0</div><div><br></div><div>2. I created strict rules where no pa=
ckage could edit any files in another.=C2=A0 This means that /etc/httpd/htt=
pd.conf that would normally be httpd.conf -&gt; ../../usr/pkg/apache-2.4.26=
/etc/httpd/httpd.conf had to be converted from a symlink to a regular file.=
=C2=A0 Stow can&#39;t do any of that so I had to add stow-pre/post-install =
and stow-pre/post-remove operations.=C2=A0 Now, sstow will execute those as=
 required.=C2=A0 stow-post-install converts /etc/httpd/httpd.conf from a li=
nk to a real file and you can not edit it without breaking those rules.=C2=
=A0=C2=A0 The rules allow you to tar the /usr/pkg/apache-2.4.26=C2=A0 direc=
roy, transfer to another system and install via &#39;sstow --tarball apache=
-2,4,26.tar.xz;&#39;</div><div><br></div><div>One an audit, all files in /b=
in would be symlinks and most files in /etc would be real files that were c=
onverted from symlinks.</div><div><br></div><div>3.=C2=A0 Some programs can=
&#39;t handle symlinks and expect the realpath to be the same as the symlin=
k. Python is an example of this.=C2=A0 For perl and python modules I create=
 packages for each module.I have to explicitly tell Python where to find th=
ings.=C2=A0 In these cases I&#39;ll copy what normally goes into /usr/bin t=
o /lib/libexec.=C2=A0 I install a wrapper as /usr/bin/python and that wrapp=
er does the right thing.</div><div><br></div><div>Something like this:</div=
><div><br></div><div>PP=3D&quot;/opt/name&quot; =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=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=A0 =C2=A0 <br>fi =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0<br>exec &quot;${PP}/lib/libexec/python3.7&quot;=
 &quot;$@&quot; <br></div><div><br></div><div>Also, some programs have stri=
ct rules that don&#39;t allow symlinks.=C2=A0 Apache&#39;s cgi-bin is an ex=
ample.=C2=A0 You can either patch apache, or convert /srv/www/cgi-bin to a =
real dire</div><div>copy and convert the cgi files from your own package in=
to real files. <br></div><div><br></div><div>GCC is another example of a pr=
ogram that can break with symlinks.=C2=A0 When you work the GCC page with L=
FS, after /tools, you&#39;ll run into some issues that will require some ch=
anges to the instructions building GCC.<br></div><div><br></div><div>4.=C2=
=A0 My goal is to start with a simple directory tree at /, run a for loop a=
gainst a list of tarballs, run sstow on those files, and be running.=C2=A0 =
I also want to run the same loop, do a sstow --purge, and have a directory =
tree as pristine as when I started.=C2=A0 stow-post-remove scripts do remov=
e files like /etc/httpd/httpd.conf.=C2=A0 To accomplish this I support fold=
ing, but I start out with a Linux FHS structure where each directory contai=
ns a hidden file &#39;.nofold&#39;.=C2=A0 That is enough to keep Stow from =
folding /bin into the first package it installs.=C2=A0=C2=A0 Works great fo=
r /var/log, /var/run/ /tmp, /etc, etc.</div><div><br></div><div>5. Files th=
at are added to for each perl module can be a problem.</div><div>=C2=A0=C2=
=A0 perllocal.pd and .packlist that are included with each perl module can =
cause issue for Stow.=C2=A0 I don&#39;t need these files so I simply delete=
 them when I build those packages.=C2=A0 I build over 500 perl packages and=
 install via Stow. Originally, I hadded those files to stow-local-ignore an=
d then the post-install routine would add info to perllocal.pd and .packlis=
t found in /<br></div><div><br></div><div>6.=C2=A0 Packages are created as =
standard, deve, doc, extra, etc.=C2=A0 A full install for a device is over =
1G and 1,899 packages.=C2=A0 DOC, DEV, and pkgs ina prune list are purged.=
=C2=A0 Now it is 503 packages and 250M.=C2=A0 That directory becomes a squa=
shfs image that runs on the device.=C2=A0 sstow-get will download a package=
 from a repo via https ,install on a portion of SSD that is non-volatile, a=
nd at boot is installed via sstow and GNU Stow.=C2=A0 <br></div><div><br></=
div><div>I liked the strict symlink farm that GNU Stow provided and it remi=
nded me of SCO OpenServer 5 Software Storage Objects.=C2=A0 That was also a=
 symlink farm.=C2=A0 Creating a system that uses GNU Stow as just the symli=
nk farm I&#39;ve basically created a system that is not much different than=
 apt-get, yum, etc.=C2=A0 I have created most of their features.=C2=A0 <br>=
</div><div><br></div><div>In summary, I&#39;m saying to those that have inq=
uired about using Stow as a package manager that it is possible, but you ha=
ve to put a lot of work into it.=C2=A0 Proficiency in Linux/UNIX is also a =
requirement since you have to build software and install them into DESTDIR,=
 create a package, and a system to install it correctly. When I needed guid=
ance on how to do a DESTDIR install of a piece of OSS I would look at LFS, =
BLFS, or Arch Linux.=C2=A0 The Arch Linux PKGBUILD files were VERY useful b=
ecause it installs everything into a DESTDIR before it installs anything in=
to /. I would guess that I&#39;ve spent a few hundred hours creating the wr=
apper around Stow.=C2=A0 Even so, it was a very good investment.=C2=A0 We n=
ow know where every file comes from.=C2=A0 We know every version of what we=
 have.=C2=A0 We know where the source came from. We can recreate packages.=
=C2=A0 We can install packages on devices that were needed in the &quot;fir=
mware&quot;.=C2=A0 <br></div><div><br></div><div>sstow --installed</div><di=
v>....<br></div><div>100 : apache-2.4.46-1<br>101 : tomcat-connectors-1.2.4=
8-1<br>102 : libjson-maybexs-perl-1.003008-1<br>103 : libcrypt-openssl-gues=
s-perl-0.11-1<br>104 : libcrypt-openssl-random-perl-0.15-1<br>105 : libcryp=
t-openssl-rsa-perl-0.31-1<br>106 : libconvert-asn1-perl-0.27-1<br>107 : lib=
crypt-openssl-bignum-perl-0.09-1<br>108 : libcrypt-le-perl-0.35-1<br>109 : =
liblog-log4perl-perl-1.47<br>110 : libperl-tidy-perl-20201001-1<br>111 : li=
btest-output-perl-1.031-1<br>112 : libpackage-alias-perl-0.13<br>113 : libn=
et-netmask-perl-1.9022-1<br>114 : libcgi-perl-4.51-1</div><div>....</div><d=
iv><br></div><div>sstow --qp libmysql-connector-java</div><div>PKG =C2=A0 =
=C2=A0: libmysql-connector-java-8.0.22-1<br>NAME =C2=A0 : libmysql-connecto=
r-java<br>VER =C2=A0 =C2=A0: 8.0.22-1<br>GROUP =C2=A0: PROD<br>ARCH =C2=A0 =
: x86_64<br>BUILD =C2=A0: 2020-11-04 13:35:33<br>SIZE =C2=A0 : 2.28M<br>FIL=
ES =C2=A0:<br><br>./l/java/mysql-connector-java-8.0.22.jar<br>./l/java/mysq=
l-connector-java.jar -&gt; mysql-connector-java-8.0.22.jar</div><div><br></=
div><div>sstow --qp --qp-libs busybox</div><div>PKG =C2=A0 =C2=A0: busybox-=
1.29.2-1<br>NAME =C2=A0 : busybox<br>VER =C2=A0 =C2=A0: 1.29.2-1<br>GROUP =
=C2=A0: PROD<br>ARCH =C2=A0 : x86_64<br>BUILD =C2=A0: 2020-11-04 11:42:27<b=
r>SIZE =C2=A0 : 646.41K<br>FILES =C2=A0:<br><br>./b/busybox<br>=C2=A0 /lib6=
4/ld-linux =3D&gt; /lib64/ld-linux-x86-64.so.2<br>=C2=A0 libc.so.6 =C2=A0 =
=C2=A0 =C2=A0 =3D&gt; /lib64/libc.so.6<br>=C2=A0 libm.so.6 =C2=A0 =C2=A0 =
=C2=A0 =3D&gt; /lib64/libm.so.6<br>=C2=A0 linux-vdso.so.1 =3D&gt; linux-vds=
o.so.1<br><br>./sb/ifconfig -&gt; ../bin/busybox<br>./sb/telnet -&gt; ../bi=
n/busybox<br></div><div><br></div><div>sstow-deps rrdtool</div><div>PKG =C2=
=A0: rrdtool-1.4.8-1<br>NAME : rrdtool<br>VER =C2=A0: 1.4.8-1<br><br>Depend=
encies:<br>I: bzip2 =C2=A0 =C2=A0 =C2=A01.0.6-1 =C2=A0PROD<br>I: expat =C2=
=A0 =C2=A0 =C2=A02.2.0-1 =C2=A0PROD<br>I: fontconfig 2.12.1-1 PROD<br>I: fr=
eetype =C2=A0 2.7.1-1 =C2=A0PROD<br>I: glib =C2=A0 =C2=A0 =C2=A0 2.30.0-1 P=
ROD<br>I: libcairo =C2=A0 1.6.4-1 =C2=A0PROD<br>I: libdbi =C2=A0 =C2=A0 0.9=
.0-1 =C2=A0PROD<br>I: libffi =C2=A0 =C2=A0 3.2.1-1 =C2=A0PROD<br>I: libpang=
o =C2=A0 1.21.1-1 PROD<br>I: libpixman =C2=A00.10.0-1 PROD<br>I: libpng =C2=
=A0 =C2=A0 1.6.28-1 PROD<br>I: libxml2 =C2=A0 =C2=A02.6.26-1 PROD<br>I: pcr=
e =C2=A0 =C2=A0 =C2=A0 8.35-1 =C2=A0 PROD<br>I: system =C2=A0 =C2=A0 0.0.0-=
1 =C2=A0PROD<br>I: zlib =C2=A0 =C2=A0 =C2=A0 1.2.8-1 =C2=A0PROD<br><br>Tota=
l =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: 15<br><br>Packages dependent on rrdto=
ol:<br>I: ops-cs-singularity 1.0.0 PROD<br><br>INSTALL =C2=A0 =C2=A0 =C2=A0=
 =C2=A0: 1<br>Total =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0: 1<br><br></div><div=
>sstow-get --not-installed</div><div>URL : <a href=3D"http://10.0.20.57:909=
0/">http://10.0.20.57:9090/</a><br>REPO: pkg/cs/dev/i586<br><br>Downloading=
: md5.txt<br>##############################################################=
########## 100.0%<br>Downloading: index.json.xz<br>########################=
################################################ 100.0%<br>Packages not ins=
talled.<br>1 =C2=A0 : 3proxy-0.8.12-1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00.8.12-1<br>2 =C2=A0 : 3proxy-=
doc-0.8.12-1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A00.8.12-1<br>3 =C2=A0 : SoapyRTLSDR-1542310902-1 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 1542310902-1<br>4 =C2=A0 : SoapyRemote-1542309964-1 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1542309964-1</div><div><br></=
div><div><br></div><div>It never started out as complex as above, it never =
does.=C2=A0 When building the firmware I need to make sure all libs require=
d are installed so I had to add --qp-libs.=C2=A0 This required the program =
that generates the info file to search the pkg directory, look for ELF, run=
 ldd, and catalog the output.=C2=A0 This will not work on .so files hidden =
in java jars. I needed a way to install packages that I needed rarely, whil=
e keeping firmware image down to 60M.=C2=A0 I had to add a repo feature.=C2=
=A0 The repo feature required a way to install deps too.=C2=A0 I have to ad=
d dependency tracking.=C2=A0 sstow also support a .acl file created by getf=
acl or the build.=C2=A0 It will set those perms after install, but before r=
unning any post-install. <br></div><div><br></div><div>Chris<br></div></div=
>

--000000000000003a5e05b34c7473--