Author |
Message |
s243a
Joined: 02 Sep 2014 Posts: 2626
|
Posted: Tue 25 Jun 2019, 19:05 Post subject:
|
|
s243a wrote: | The package managers that I'm using:
1. sc0tmann's pkg
2. mistfires ppm3
seem to depend on the symlink:
/initrd/pup_ro1
and there seems to be a bug in my ISO where this isn't being created properly in the initrd0/init script. I don't know if it was an issue with the woof-CE snapshot that I pulled or something that I did. However, in the short term I'm going to patch with a fix like follows:
Code: |
#!/bin/sh
. /etc/rc.d/PUPSTATE
SAVE_REL="$(echo $PUPSAVE | cut -d',' -f3)"
SAVE_PATH="/initrd/mnt/dev_save$SAVE_REL"
if [ -d "$SAVE_PATH" ] ; then
if [ -d /initrd/pup_ro1 ]; then
cp -arfv --remove-destination "$SAVE_PATH"
rm -rf /initrd/pup_ro1
elif [ -L /initrd/pup_ro1 ]; then
rm -rf /initrd/pup_ro1
fi
if [ ! -L /initrd/pup_ro1 ]; then
ln -sv "$SAVE_PATH" /initrd/pup_ro1 #for after switch
fi
fi
|
https://pastebin.com/0gLTFNdv
Maybe I"ll call this script when starting x. I'll test this sortly.
Eventually, of course a I'll both:
1. debug my /initrd/init script
2. remove the dependencies of said package managers on this symlink.
The reason for the later is that the symlink is for lagacy apps:
gyrog tells me that:
Quote: | That symlink is there for old utilites that have /initrd/pup_ro1 hardcoded, rather than being coded the better way. |
https://github.com/puppylinux-woof-CE/woof-CE/issues/1469#issuecomment-504771021
More about this topic can be found in the thread:
Process Substitution & The pup initr0/init |
After more thought I think the following is more what I want:
Code: |
#!/bin/sh
. /etc/rc.d/PUPSTATE
SAVE_REL="$(echo $PUPSAVE | cut -d',' -f3)"
SAVE_PATH="/initrd/mnt/dev_save$SAVE_REL"
if [ -d "$SAVE_PATH" ] ; then
if [ -d /initrd/pup_ro1 ] && [ ! -L /initrd/pup_ro1 ]; then
cp -arfv --remove-destination /initrd/pup_ro1 "$SAVE_PATH"
rm -rf /initrd/pup_ro1
ln -sv "$SAVE_PATH" /initrd/pup_ro1 #for after switch
fi
fi
|
I'm wondering if the missing symlink is due to not having the right version of aufs-tools. For some reason I have a mount.aufs binary that requires too new a version of libc. I'm not sure how I would have got this "too new" version because my libc is newer than the one in devaun ascii.
Anyway, full mount fails if mount.aufs is too new. Also "busybox mount" fails if we use tinycores version of busybox. Here's an example that fails from sc0ttman's pkg:
Code: |
busybox mount -t aufs -o remount,udba=reval unionfs / #remount with faster evaluation mode.
|
https://gitlab.com/sc0ttj/Pkg/blob/master/usr/sbin/pkg#L4918
the reason is that tinycore has separated the busybox applets into two parts. Those which only root can use are in /bin/busybox. Those in which some non-root users can use are in busybox.suid
I could create a wrapper script for busybox that calls the correct binary, although there would be a slight performance cost to do this.
Edit 1:
Here is more on this error:
Code: |
#120102 install may have overwritten a symlink-to-dir...
#tar defaults to not following symlinks, for both dirs and files, but i want to follow symlinks
#for dirs but not for files. so, fix here... (note, dir entries in .files have / on end)
|
https://gitlab.com/sc0ttj/Pkg/blob/master/usr/sbin/pkg#L4820
Code: |
#120107 rerwin: need quotes around some paths in case of space chars. remove '--unlink-first' from tar (was introduced 120102, don't think necessary).
|
/woof-code/rootfs-skeleton/usr/local/petget/installpkg.sh#L26
Code: |
tar -x --strip=2 --directory=${DIRECTSAVEPATH}/ -f ${tarball} #120102. 120107 remove --unlink-first
|
/woof-code/rootfs-skeleton/usr/local/petget/installpkg.sh#L254
_________________ Find me on minds and on pearltrees.
|
Back to top
|
|
 |
s243a
Joined: 02 Sep 2014 Posts: 2626
|
Posted: Tue 25 Jun 2019, 19:57 Post subject:
|
|
Related to the previous post:
Code: |
# set $DIRECTSAVEPATH (where we want to install pkgs)
if [ $PUPMODE -eq 3 -o $PUPMODE -eq 7 -o $PUPMODE -eq 13 ];then
DIRECTSAVEPATH="/initrd${SAVE_LAYER}" #SAVE_LAYER is in /etc/rc.d/PUPSTATE.
elif [ "$PUPMODE" = "2" ]; then
DIRECTSAVEPATH=""
fi
|
https://gitlab.com/sc0ttj/Pkg/blob/master/usr/sbin/pkg#L147
Code: |
# some old types need this extra step
if [ -f "${CURDIR}/${PKGNAME}.tar.$TAREXT" ];then
cd "${CURDIR}/${PKGNAME}/" 1>/dev/null
tar --absolute-names $tarops "./${PKGNAME}.tar.$TAREXT" ${DIRECTSAVEPATH}/ 2> $TMPDIR/$SELF-cp-errlog #260713
sync
rm -f "./${PKGNAME}.tar.$TAREXT" 1>/dev/null
cd - 1>/dev/null
fi
|
https://gitlab.com/sc0ttj/Pkg/blob/master/usr/sbin/pkg#L4563
The following explimation sounds wrong to me:
The above tar command might delete the pup_ro1 symlink. For some reason this isn't a problem if the following mount statment works:
Code: |
busybox mount -t aufs -o remount,udba=reval unionfs / #remount with faster evaluation mode.
|
can also use the full version of mount instead if one has a working "mount.aufs".
However, if the mount fails, then tar extracts stuff to a new directory called pup_ro1 and the symlink is broken.
...but I think I"m looking in the right area
I just don't completly understand why the symlink breaks if mount fails.
_________________ Find me on minds and on pearltrees.
|
Back to top
|
|
 |
s243a
Joined: 02 Sep 2014 Posts: 2626
|
Posted: Tue 25 Jun 2019, 22:12 Post subject:
|
|
I was thinking that if I write a wrapper script for busybox, that there might be the possibility of handling options not supported by busybox. The goal would be so that the wrapper script could handle these options well enough that coreutils wouldn't be required for sc0ttman's package manager "i.e. pkg".
_________________ Find me on minds and on pearltrees.
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2806 Location: UK
|
Posted: Wed 26 Jun 2019, 05:36 Post subject:
|
|
s243a wrote: | I was thinking that if I write a wrapper script for busybox, that there might be the possibility of handling options not supported by busybox. The goal would be so that the wrapper script could handle these options well enough that coreutils wouldn't be required for sc0ttman's package manager "i.e. pkg". |
You are clearly doing lots of work, so why not try some fixes for Pkg itself, to remove those deps? ..
It's surely less work than a lot of the other stuff you have been willing to get stuck into...
The quickest way may be to remove core utils after boot (manually delete/move stuff), replace with busybox, and keep running/fixing Pkg till it works again..
(Ideally where I can check the changes in a PR or at least a diff, and incorporate it into Pkg..)
_________________ Pkg, mdsh, Woofy, Akita, VLC-GTK, Search
|
Back to top
|
|
 |
s243a
Joined: 02 Sep 2014 Posts: 2626
|
Posted: Wed 03 Jul 2019, 23:47 Post subject:
|
|
sc0ttman wrote: | s243a wrote: | I was thinking that if I write a wrapper script for busybox, that there might be the possibility of handling options not supported by busybox. The goal would be so that the wrapper script could handle these options well enough that coreutils wouldn't be required for sc0ttman's package manager "i.e. pkg". |
You are clearly doing lots of work, so why not try some fixes for Pkg itself, to remove those deps? ..
It's surely less work than a lot of the other stuff you have been willing to get stuck into...
The quickest way may be to remove core utils after boot (manually delete/move stuff), replace with busybox, and keep running/fixing Pkg till it works again..
(Ideally where I can check the changes in a PR or at least a diff, and incorporate it into Pkg..) |
I'm not sure if this is an easy or hard thing to do but it's not the most critical thing that I need at the moment.
At the moment, I will be experimenting with integrating Mistire's ppm 3 with with pkg. I think that many of the changes in Mistfire's ppm3 have been incorporated into Woof-CE, so I might eventually get in better sync with the woof-CE ppm. For the moment, I"m more interested in Mistfire's version because (at this moment) I can't keep pace with all changes in woof-CE. Also, I'm interested in back compatibility and Mistire's ppm was built for older versions of puppy than the bleeding edge woof-CE code is likely built for.
_________________ Find me on minds and on pearltrees.
|
Back to top
|
|
 |
s243a
Joined: 02 Sep 2014 Posts: 2626
|
Posted: Thu 04 Jul 2019, 00:21 Post subject:
|
|
Apologizes for being slow on updating this. I've put off easier fixes while I dig both into Sc0ttmann's and Mistfire's package managers because I think that this is a critical piece.
Tonight I look at Mistfire's first post in the PPMv3 thread for some inscite:
Quote: |
The repo information is implemented by list (csv). The files are located in .packages/database
PET_REPO_LIST - PET Repo list
PET_DB_REPO - Repo list for package database
PET_ORDER_LIST - Priority list for searching packages
COMPAT_REPO_LIST - Compatible distro repo list
COMPAT_DB_REPO - Repo list for Compatible distro package database
|
http://murga-linux.com/puppy/viewtopic.php?p=914058&search_id=934267901#914058
The key info here is the file "/root/.packages/database/COMPAT_DB_REPO"
Here is what I have for this file in Tiny_Devaun
Code: |
z|http://packages.devuan.org/merged/dists/ascii/main/binary-i386/Packages.xz|Packages-devuan-ascii-main
z|http://packages.devuan.org/merged/dists/ascii/contrib/binary-i386/Packages.xz|Packages-devuan-ascii-contrib
z|http://packages.devuan.org/merged/dists/ascii/non-free/binary-i386/Packages.xz|Packages-devuan-ascii-non-free
z|http://packages.devuan.org/merged/dists/ascii/main/binary-i386/Packages.xz|Packages-devuan-ascii-main
z|http://packages.devuan.org/merged/dists/ascii/contrib/binary-i386/Packages.xz|Packages-devuan-ascii-contrib
z|http://packages.devuan.org/merged/dists/ascii/non-free/binary-i386/Packages.xz|Packages-devuan-ascii-non-free
|
We can see that this file gives the complete path to the DB file for the repo and it doesn't depend on the DISTRO_SPEC file. This is important. In Sc0tmann's thread, I noted that I think that there should be enough info in Sc0tmann's package to be able to update the repo despite errors in DISTRO_SPECS.
Such robustness would make it easier for people to configure "pkg".
My Post: http://murga-linux.com/puppy/viewtopic.php?p=1030857#1030857
Sc0ttman's reply: http://murga-linux.com/puppy/viewtopic.php?p=1030898#1030898
I will note that Mistfire's approach is more explicit. Conversly to infer this exact path from one of the pkg configuration files (in sc0tman's ppm) such as :
Code: |
/root/.pkg/pkgrc
/root/.pkg/sources
/root/.pkg/sources-all
|
requires some knowledge about how the repos are structured but perhaps most versions of linux structure their repos in very standard ways.
I will also note that that sc0tman provides a more standard way of adding repos:
Code: |
# for each repo in $apt_sources_list, use `ppa2pup` to update the repo
for line in $apt_sources_list
do
[ "$line" = "" ] && continue
[ "$line" = "\n" ] && continue
local ppa_repo_url="$(echo ${line//|/ } | cut -f1 -d" ")"
local ppa_repo_name=$(cat ~/.pkg/sources-all | grep -m1 $ppa_repo_url | cut -f1 -d'|')
# if a PPA repo, get a user-friendly repo name from the /etc/sources.list entry
if [ "$ppa_repo_name" = "" ];then
ppa_repo_name="$(echo ${line} | cut -f3 -d'|')-$(echo $line | cut -f2 -d':' | cut -f1 -d '/' | tr -d '-' | tr -d '_')"
fi
echo
echo "Processing: ${line//|/ }"
ANSWER=y
if [ "$ASK" = true ];then
# ask user to update repo
bash -c 'read -r -N 1 -p "Update repo $ppa_repo_name? [y/n] " ANSWER; echo $ANSWER > /tmp/pkg/ANSWER'
echo
ANSWER="$(cat /tmp/pkg/ANSWER)"
fi
if [ "$ANSWER" = 'y' ] || [ "$ANSWER" = 'Y' ];then
echo "Please wait..."
ppa2pup ${line//|/ } 1>/dev/null && echo -e "${green}Success${endcolour}: Updated repo '$ppa_repo_name'"
retval=$?
fi
done
|
https://gitlab.com/sc0ttj/Pkg/blob/master/usr/sbin/pkg#L1776
That is with pkg if a repo follows the debian formant (but not the standard puppy format) then you can add it by updating /etc/sources.list. Note this is slower than the way that the puppy package manager does it but will make it easier to add repos that don't fit puppies standard format (e.g. the tor repo).
_________________ Find me on minds and on pearltrees.
|
Back to top
|
|
 |
s243a
Joined: 02 Sep 2014 Posts: 2626
|
Posted: Thu 04 Jul 2019, 00:44 Post subject:
|
|
I thought I would add a bit more info on how Mistfire's PPMv3 made this change. Recall from the previous post that the file "COMPAT_DB_REPO" contains the complete path the the package DB file (AKA the REPO doc file).
Each line of this file is contactenated into a space seperated string:
Code: |
for line1 in `cat /root/.packages/database/COMPAT_DB_REPO`
do
if [ "$COMPATDOCREPOS" == "" ]; then
COMPATDOCREPOS="$line1"
else
COMPATDOCREPOS="$COMPATDOCREPOS $line1"
fi
done
|
*around line 61 to 68 of /usr/bin/sync-repo
and the result is stored in a variable in the following the file "DISTRO_COMPAT_REPOS"
Code: |
echo "PKG_DOCS_DISTRO_COMPAT='$COMPATDOCREPOS'" >> /root/.packages/DISTRO_COMPAT_REPOS
|
*around line 78 of /usr/bin/sync-repo
Note that this file is the standard puppy file. The main thing we are doing here is putting the full paths to the repo DB file into the var PKG_DOCS_DISTRO_COMPAT. I had some issues (about a year or more ago) when I tried this approach with the tor REPO and had to make some hacky mods to 0setup but perhaps this is no longer an issue with the puppy package manager or perhaps Mistfire modified 0setup just enough to make it work. Note that 0Setup still contains references to DISTRO_SPECS so it might be possible to use these vars in the path if one wants to.
_________________ Find me on minds and on pearltrees.
|
Back to top
|
|
 |
darry19662018
Joined: 31 Mar 2018 Posts: 731 Location: Rakaia
|
Posted: Sat 06 Jul 2019, 20:26 Post subject:
|
|
First of all thank you very much for this new exciting Pup.
I have one question regarding installing puppy linux firewall - I got this message when it installed.
Is there an answer to fixing this, otherwise enjoying this test release.
Connected fine to internet and pkgdialog enabled me to install Pfind.
_________________ Puppy Linux Wiki: http://wikka.puppylinux.com/HomePage
https://freemedia.neocities.org/
|
Back to top
|
|
 |
darry19662018
Joined: 31 Mar 2018 Posts: 731 Location: Rakaia
|
Posted: Sun 07 Jul 2019, 14:56 Post subject:
|
|
I have been working with this iso and have go quite a lot working including mpv and a working firewall, isomaster, retrovol, pfind, xarchive and peasy firewall monitor as well as getting ntp, ntpd set-up working for correct system time.
I made an iso using isomaster as remaster2 wouldn't work here is my first working iso
https://archive.org/details/tiny_puduan_asciiprealpha11revised
iso: https://archive.org/download/tiny_puduan_asciiprealpha11revised/tiny_puduan_asciiPrealpha11%28revised%29.iso
_________________ Puppy Linux Wiki: http://wikka.puppylinux.com/HomePage
https://freemedia.neocities.org/
|
Back to top
|
|
 |
darry19662018
Joined: 31 Mar 2018 Posts: 731 Location: Rakaia
|
Posted: Mon 08 Jul 2019, 02:57 Post subject:
|
|
Well this Pup is quite a journey.
Got .pet installing working by finding a missing link to .petget in /usr/sbin which links to /usr/local/petget
Found that installwatch probably needs to be installed.
Pwallpaper so that wallpaper can be changed.
There was no firewall so installed from the very reliable pkgdialog
Linux-firewall 2.0-rc9-patched-3-1 and peasy firewall monitor.
Will not install from package manager - mpv this really added a quite a few libs should have used one OscarTalks .pets.
To get time to work properly installed I installed ntp and ntpd.
_________________ Puppy Linux Wiki: http://wikka.puppylinux.com/HomePage
https://freemedia.neocities.org/
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15588 Location: Paradox Realm
|
Posted: Mon 08 Jul 2019, 06:12 Post subject:
|
|
This pre-alpha is interesting.
It would be an ideal base for those of us interested in:
- learning about cli
- security base Puppy
- return to minimal/core pup honing
Bravo guys
Puppy Linux
Inspired by Chihuahua
_________________ Puppy Raspup 8.2 Final
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html 
|
Back to top
|
|
 |
s243a
Joined: 02 Sep 2014 Posts: 2626
|
Posted: Tue 09 Jul 2019, 13:28 Post subject:
|
|
darry19662018 wrote: | Well this Pup is quite a journey. |
It's quite preliminary but the bugs posted in this thread thus far will help alot.
Quote: | Got .pet installing working by finding a missing link to .petget in /usr/sbin which links to /usr/local/petget
|
Alternatively, one could create a script that calls "pkg -i". Thanks for noticing this . What I think I will do is create a script that calls "pkg -i" by default but if not installed will try some fallbacks like petget.
Quote: | Found that installwatch probably needs to be installed.
Pwallpaper so that wallpaper can be changed. |
I'll look into this. As a side note wallpapers aren't a big thing to me, which means if I add it it might eventually be pushed out of the main sfs to something like the adrv or an extra_sfs.
Quote: | There was no firewall so installed from the very reliable pkgdialog
Linux-firewall 2.0-rc9-patched-3-1 and peasy firewall monitor. |
I'm glad pkg is working well for you. When running in pmedia=usb mode it had some major issues for me.
**as a side note I prefer just using IPTABLES rather then a specific firewall ap.
Quote: | Will not install from package manager - mpv this really added a quite a few libs should have used one OscarTalks .pets. |
I'll also look into that. Note that at this moment pkg might be installing more libs than are needed.
Quote: | To get time to work properly installed I installed ntp and ntpd. |
Thanks for the tip. I'll add this in the next release.
_________________ Find me on minds and on pearltrees.
|
Back to top
|
|
 |
s243a
Joined: 02 Sep 2014 Posts: 2626
|
Posted: Wed 10 Jul 2019, 14:09 Post subject:
|
|
I think I'll give your technique a try mostly as a way to test changes that I've made to pkg:
https://pastebin.com/Q8KUt6wa
but I'll post both yours and my remaster in the second post. Most of the upcomming changes to "pkg" are related to coding style (using variables instead of explict paths) but such changes will allow better integration with mistfire's package manager (i.e. PPMv3). However, one of the changes is semi-criticle for running in pmedia=usb mode.
http://murga-linux.com/puppy/viewtopic.php?p=1030958#1030958
I will add the changes to my woof-next github fork once they've been tested more.
P.S. one aspect of this integration is to use (when it exists) the subdirectory "package-files" for the files ending in ".file". If one makes my changes to pkg then if said path exists (e.g. /var/packages/package-files) then one must move these files into this sub directory.
_________________ Find me on minds and on pearltrees.
|
Back to top
|
|
 |
s243a
Joined: 02 Sep 2014 Posts: 2626
|
Posted: Wed 10 Jul 2019, 14:30 Post subject:
|
|
s243a wrote: |
Quote: | Will not install from package manager - mpv this really added a quite a few libs should have used one OscarTalks .pets. |
I'll also look into that. Note that at this moment pkg might be installing more libs than are needed.
|
Just to clarify here. There are two issues. One is whether or not pkg looking in the right place to see if a package is installed.
1. For instance if there is a file like:
Code: |
/var/packages/package-files/pkgname.files
or
/var/packages/builtin_files/pkgname
|
then pkg shouldn't (in my opinon) install the package. In the case of the first path the issue is that I need to better integrate pkg with mistfire's PPMv3 (see previous post about how to do this). In the second case I need to verify whether or not pkg does this properly. This might not be default behavor (need to verify).
I did notice though, that I do have an issue with the way that I syncked the dpkg build (via woof-next) with the puppy package managers (e.g. PPMv3 & pkg). The issue is that for some reason if I look in:
that for some files listed in
Code: |
/var/lib/dpkg/status
|
there is no coresponding file with either of the following forms:
Code: |
/var/lib/dpkg/info/pkgname.list
or
/var/lib/dpkg/info/pkgname:i386.list
|
In which case I'll have to generate said list rather than relying on dpkg to generate it.
_________________ Find me on minds and on pearltrees.
Last edited by s243a on Wed 10 Jul 2019, 14:37; edited 8 times in total
|
Back to top
|
|
 |
darry19662018
Joined: 31 Mar 2018 Posts: 731 Location: Rakaia
|
Posted: Wed 10 Jul 2019, 14:30 Post subject:
|
|
I'm going to put up my second iso as well at archive.org because it includes my final fixes such as working petget.
Thanks for your replies.
https://archive.org/download/tiny_puduan_asciiprealpha11revised/tiny_puduanasciiprealpha11revised2.iso
Still using isomaster method at this stage as remaster2 doesn't work and neither does Shinobar's program.
_________________ Puppy Linux Wiki: http://wikka.puppylinux.com/HomePage
https://freemedia.neocities.org/
|
Back to top
|
|
 |
|