Skip to content

Commit

Permalink
add apt to dpup, as a layer below the main SFS
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Jan 17, 2022
1 parent 3cb3988 commit 56c3197
Show file tree
Hide file tree
Showing 9 changed files with 168 additions and 21 deletions.
15 changes: 12 additions & 3 deletions woof-code/3builddistro
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ PKGLISTS_COMPAT="`echo "$PKG_DOCS_DISTRO_COMPAT" | tr ' ' '\n' | cut -f 3 -d '|'
PKGS_SPECS_TABLE="`echo "$PKGS_SPECS_TABLE" | grep -v '^#'`" # remove comments

export DISTRO_NAME DISTRO_VERSION DISTRO_COMPAT_VERSION
export BDRVSFS="bdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
export PUPPYSFS="puppy_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
export ZDRVSFS="zdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
export FDRVSFS="fdrv_${DISTRO_FILE_PREFIX}_${DISTRO_VERSION}.sfs"
Expand Down Expand Up @@ -66,7 +67,7 @@ rm -rf sandbox3/rootfs-complete
rm -rf sandbox3/devx
rm -rf sandbox3/docx ${DOCXSFS}
rm -rf sandbox3/nlsx ${NLSXSFS}
rm -rf sandbox3/adrv sandbox3/ydrv sandbox3/fdrv
rm -rf sandbox3/bdrv sandbox3/adrv sandbox3/ydrv sandbox3/fdrv
mkdir -p sandbox3/rootfs-complete/etc
mkdir -p sandbox3/devx
cp DISTRO_SPECS sandbox3/rootfs-complete/etc/
Expand Down Expand Up @@ -962,17 +963,25 @@ fi

if [ "$BUILD_SFS" = 'yes' ]; then
sh $MWD/support/files2delete.sh rootfs-complete

# frugalify puts bdrv below the main SFS
if [ "${DISTRO_BINARY_COMPAT}" = 'debian' -a "$FRUGALIFY" ]; then
echo "Now building sandbox3/bdrv"
$MWD/support/bdrv.sh || exit 1
fi

#build the rootfs-complete sfs...
echo -e "\nNow building the main f.s., ${PUPPYSFS}..."
rm -f build/${PUPPYSFS} 2>/dev/null
mksquashfs rootfs-complete build/${PUPPYSFS} ${SFSCOMP} #100911 110713
###########
if [ -d adrv -o -d fdrv -o -d ydrv ];then
if [ -d bdrv -o -d adrv -o -d fdrv -o -d ydrv ];then
#build the {a,f,y}drive sfs...
for SYS_SFS in adrv fdrv ydrv
for SYS_SFS in bdrv adrv fdrv ydrv
do
[ ! -d "$SYS_SFS" ] && echo "no $SYS_SFS" && continue
case $SYS_SFS in
bdrv) TYPE_SYS_SFS="${BDRVSFS}";;
adrv) TYPE_SYS_SFS="${ADRVSFS}";;
fdrv) TYPE_SYS_SFS="${FDRVSFS}";;
ydrv) TYPE_SYS_SFS="${YDRVSFS}";;
Expand Down
4 changes: 2 additions & 2 deletions woof-code/packages-templates/dbus_FIXUPHACK
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ case $DISTRO_BINARY_COMPAT in
echo '# newer slackware dbus needs system user "polkitd"
if [ -f etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf ];then
if grep -q "polkitd" etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf ;then
chroot . addgroup -g 87 -S polkitd
chroot . busybox addgroup -g 87 -S polkitd
sleep 1
chroot . adduser -S -D -H -h /var/lib/polkit -u 87 -s /bin/false -G polkitd polkitd
chroot . busybox adduser -S -D -H -h /var/lib/polkit -u 87 -s /bin/false -G polkitd polkitd
echo "Adding policy kit user"
fi
fi' > pinstall.sh
Expand Down
8 changes: 4 additions & 4 deletions woof-code/packages-templates/pulseaudio_FIXUPHACK
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
echo '
echo "Configuring Pulseaudio"
rm -f usr/share/applications/defaultaudiomixer.desktop usr/share/applications/ALSA-sound-Wizard.desktop usr/sbin/alsawizard
chroot . addgroup pulse
chroot . addgroup pulse-access
chroot . adduser -D -s /bin/false -g 'PulseAudio' -G audio -h /var/run/pulse pulse 2>/dev/null
chroot . passwd -d pulse 2>/dev/null' > pinstall.sh
chroot . busybox addgroup pulse
chroot . busybox addgroup pulse-access
chroot . busybox adduser -D -s /bin/false -g 'PulseAudio' -G audio -h /var/run/pulse pulse 2>/dev/null
chroot . busybox passwd -d pulse 2>/dev/null' > pinstall.sh

# add a yad volume control notification icon 'ppavol', requires pavucontrol
mkdir -p usr/local/bin
Expand Down
40 changes: 36 additions & 4 deletions woof-code/rootfs-skeleton/etc/group
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
root:x:0:
daemon:x:1:
tty:x:2:
ppp:x:200:
users:x:500:
users:x:100:
nobody:x:65534:
guest:x:501:
spot:x:502:spot
Expand All @@ -14,9 +13,41 @@ uucp::10:
lpadmin::112:root,spot,nobody,guest
netdev::113:
haldaemon::119:
sshd::33:sshd
sshd::32:sshd
webgroup:x:504:
disk::100:root,spot
disk:x:6:root,spot
sys:x:3:
adm:x:4:
tty:x:5:
lp:x:7:
mail:x:8:
news:x:9:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:
fax:x:21:
voice:x:22:
cdrom:x:24:
floppy:x:25:
tape:x:26:
sudo:x:27:
audio:x:29:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:
sasl:x:45:
plugdev:x:46:
staff:x:50:
games:x:60:
disk::90:root,spot
audio::101:root,spot
lp::102:root,daemon,spot
dialout::103:root,spot
Expand All @@ -28,3 +59,4 @@ tape::108:root
tty::109:root,spot
plugdev::110:root,spot
bluetooth::111:root,spot
nogroup:x:65533:
17 changes: 15 additions & 2 deletions woof-code/rootfs-skeleton/etc/passwd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,20 @@ bin:x:2:2:bin:/bin:
messagebus:x:503:503:Linux User,,,:/tmp:/bin/sh
ftp:x:1000:1000:Linux User,,,:/root/ftpd:/bin/sh
haldaemon:x:108:119:Hardware abstraction layer,,,:/var/run/hald:/bin/false
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
sshd:x:33:33:sshd:/:
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
webuser:x:1002:504:Linux User,,,:/root/Web-Server:/bin/sh
man:x:65534:65534::/tmp:
sshd:x:1003:1003:sshd:/:
14 changes: 14 additions & 0 deletions woof-code/rootfs-skeleton/etc/shadow
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@ haldaemon::0:99999:7:::
uucp::0:99999:7:::
sshd:*:9797:0:::::
webuser:!:14442:0:99999:7:::
sys:*:19008:0:99999:7:::
sync:*:19008:0:99999:7:::
games:*:19008:0:99999:7:::
man:*:19008:0:99999:7:::
lp:*:19008:0:99999:7:::
mail:*:19008:0:99999:7:::
news:*:19008:0:99999:7:::
proxy:*:19008:0:99999:7:::
www-data:*:19008:0:99999:7:::
backup:*:19008:0:99999:7:::
list:*:19008:0:99999:7:::
irc:*:19008:0:99999:7:::
gnats:*:19008:0:99999:7:::
_apt:*:19008:0:99999:7:::
77 changes: 77 additions & 0 deletions woof-code/support/bdrv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/bin/sh -e

. ../DISTRO_SPECS

case "$DISTRO_TARGETARCH" in
x86_64) ARCH=amd64 ;;
x86) ARCH=i386 ;;
arm) ARCH=armhf ;;
arm64) ARCH=aarch64 ;;
esac

export LD_LIBRARY_PATH=
export DEBIAN_FRONTEND=noninteractive

# create a tiny Debian installation
debootstrap --no-merged-usr --variant=minbase ${DISTRO_COMPAT_VERSION} bdrv http://deb.debian.org/debian

# make sure UIDs and GIDs are consistent with Puppy
cat rootfs-complete/etc/group > bdrv/etc/group
cat rootfs-complete/etc/passwd > bdrv/etc/passwd
cat rootfs-complete/etc/shadow > bdrv/etc/shadow

# blacklist packages that may conflict with packages in the main SFS
chroot bdrv apt-mark hold busybox
chroot bdrv apt-mark hold busybox-static

mount --bind /etc/resolv.conf bdrv/etc/resolv.conf
trap "umount -l bdrv/etc/resolv.conf" INT ERR

# configure the package manager
echo "deb http://deb.debian.org/debian ${DISTRO_COMPAT_VERSION} main contrib non-free" > bdrv/etc/apt/sources.list
if [ "$DISTRO_COMPAT_VERSION" != "sid" ]; then
cat << EOF >> bdrv/etc/apt/sources.list
deb http://deb.debian.org/debian ${DISTRO_COMPAT_VERSION}-updates main contrib non-free
deb http://deb.debian.org/debian-security ${DISTRO_COMPAT_VERSION}-security main contrib non-free
EOF
fi
cat << EOF > bdrv/etc/apt/apt.conf.d/00puppy
APT::Install-Recommends "false";
APT::Install-Suggests "false";
EOF
chroot bdrv apt-get update

# install all packages included in the woof-CE build
chroot bdrv apt-get install -y `cat ../status/findpkgs_FINAL_PKGS-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION} | cut -f 5 -d \| | tr '\n' ' '`

# add Synaptic
chroot bdrv apt-get install -y synaptic
sed -e 's/^Categories=.*/Categories=X-Setup-puppy/' -i bdrv/usr/share/applications/synaptic.desktop

umount -l bdrv/etc/resolv.conf

# remove any unneeded packages
chroot bdrv apt-get autoremove -y --purge

# prevent updates
chroot bdrv apt-mark hold `chroot bdrv dpkg-query -f '${binary:Package}\n' -W | tr '\n' ' '`

# remove unneeded files
chroot bdrv apt-get clean
rm -f bdrv/var/lib/apt/lists/* 2>/dev/null || :
rm -rf bdrv/home bdrv/root bdrv/dev bdrv/run bdrv/var/log bdrv/var/cache/man bdrv/var/cache/fontconfig bdrv/var/cache/ldconfig bdrv/etc/ssl bdrv/lib/udev bdrv/lib/modprobe.d bdrv/lib/firmware bdrv/usr/share/icons bdrv/usr/share/mime bdrv/etc/ld.so.cache
rm -rf `find bdrv -name __pycache__`

# delete files and directories present in the main SFS
cat ../status/findpkgs_FINAL_PKGS-${DISTRO_BINARY_COMPAT}-${DISTRO_COMPAT_VERSION} | cut -f 5 -d \| | while read NAME; do
LIST=bdrv/var/lib/dpkg/info/$NAME:$ARCH.list
[ -f "$LIST" ] || LIST=bdrv/var/lib/dpkg/info/$NAME.list

while read FILE; do
[ -d "bdrv/$FILE" ] || rm -f "bdrv/$FILE" 2>/dev/null
done < $LIST

while read FILE; do
[ ! -d "bdrv/$FILE" ] || rmdir "bdrv/$FILE" 2>/dev/null || :
done < $LIST
done
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ no|aalib|libaa1|exe,dev>null,doc,nls #ascii library, needed by mplayer, gphoto
yes|acl|libacl1|exe,dev,doc,nls||deps:yes
no|acpi|acpi|exe,dev,doc,nls
no|acpid-busibox||exe
yes|adduser|adduser|exe>null,dev>null,doc>null,nls>null
yes|adduser|adduser|exe,dev,doc,nls
no|advancecomp|advancecomp|exe>dev,dev,doc,nls
no|alsaequal|libasound2-plugin-equal,caps|exe,dev,doc,nls| #needed by pequalizer.
yes|alsa-lib|libasound2,libasound2-data,alsa-topology-conf,alsa-ucm-conf|exe,dev,doc,nls||deps:yes
Expand Down Expand Up @@ -92,8 +92,9 @@ yes|dbus-glib|libdbus-glib-1-2|exe,dev,doc,nls||deps:yes
yes|dbus-user-session|dbus-user-session|exe>null,dev>null,doc>null,nls>null
yes|d-conf|dconf-gsettings-backend,dconf-service,libdconf1|exe,dev,doc,nls||deps:yes #needed by gsettings-desktop-settings
#yes|deadbeef|deadbeef,deadbeef-waveform-seekbar,deadbeef-vu-meter,deadbeef-spectrogram,deadbeef-rating,deadbeef-musical-spectrum,deadbeef-infobar|exe|
yes|debconf|debconf|exe>null,dev>null,doc>null,nls>null
yes|debconf|debconf|exe,dev,doc,nls
yes|debianutils|debianutils|exe,dev,doc,nls||deps:yes
yes|debootstrap|debootstrap|exe>dev,dev,doc,nls||deps:yes
yes|dejavu_fonts|fonts-dejavu-core,fonts-dejavu-extra|exe,dev,doc,nls||deps:yes
no|desk_icon_theme_uniform||exe
no|desk_icon_theme_neon||exe
Expand Down Expand Up @@ -263,7 +264,7 @@ no|lcms2|liblcms2-2,liblcms2-dev,liblcms2-utils|exe,dev,doc,nls
yes|less|less|exe,dev>null,doc,nls||deps:yes
no|libaacs|libaacs0,libaacs-dev|exe,dev,doc,nls #mplayer needs this.
no|libao|libao4,libao-common,libao-dev|exe,dev,doc,nls||deps:yes
yes|libavcodec|libavcodec58,libavcodec-extra58|exe,dev,doc,nls||deps:yes
yes|libavcodec|libavcodec58|exe,dev,doc,nls||deps:yes
no|libappindicator|libappindicator3-1,libappindicator3-dev,libindicator3-7,libindicator3-dev|exe,dev,doc,nls #needs gtk3, needed by transmission. no, using my pet.
yes|libarchive|libarchive13|exe>dev,dev,doc,nls||deps:yes #needed by cmake.
no|libart|libart-2.0-2,libart-2.0-dev|exe,dev,doc,nls
Expand Down
7 changes: 4 additions & 3 deletions woof-distro/x86_64/debian/sid64/DISTRO_PKGS_SPECS-debian-sid
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ no|aalib|libaa1|exe,dev>null,doc,nls #ascii library, needed by mplayer, gphoto
yes|acl|libacl1|exe,dev,doc,nls||deps:yes
no|acpi|acpi|exe,dev,doc,nls
no|acpid-busibox||exe
yes|adduser|adduser|exe>null,dev>null,doc>null,nls>null
yes|adduser|adduser|exe,dev,doc,nls
no|advancecomp|advancecomp|exe>dev,dev,doc,nls
no|alsaequal|libasound2-plugin-equal,caps|exe,dev,doc,nls| #needed by pequalizer.
yes|alsa-lib|libasound2,libasound2-data,libasound2-dev,alsa-topology-conf,alsa-ucm-conf|exe,dev,doc,nls||deps:yes
Expand Down Expand Up @@ -93,8 +93,9 @@ yes|dbus-glib|libdbus-glib-1-2|exe,dev,doc,nls||deps:yes
yes|dbus-user-session|dbus-user-session|exe>null,dev>null,doc>null,nls>null
yes|d-conf|dconf-gsettings-backend,dconf-service,libdconf1|exe,dev,doc,nls||deps:yes #needed by gsettings-desktop-settings
#yes|deadbeef|deadbeef,deadbeef-waveform-seekbar,deadbeef-vu-meter,deadbeef-spectrogram,deadbeef-rating,deadbeef-musical-spectrum,deadbeef-infobar|exe|
yes|debconf|debconf|exe>null,dev>null,doc>null,nls>null
yes|debconf|debconf|exe,dev,doc,nls
yes|debianutils|debianutils|exe,dev,doc,nls||deps:yes
yes|debootstrap|debootstrap|exe>dev,dev,doc,nls||deps:yes
yes|dejavu_fonts|fonts-dejavu-core,fonts-dejavu-extra|exe,dev,doc,nls||deps:yes
no|desk_icon_theme_uniform||exe
no|desk_icon_theme_neon||exe
Expand Down Expand Up @@ -269,7 +270,7 @@ no|lcms2|liblcms2-2,liblcms2-dev,liblcms2-utils|exe,dev,doc,nls
yes|less|less|exe,dev>null,doc,nls||deps:yes
no|libaacs|libaacs0,libaacs-dev|exe,dev,doc,nls #mplayer needs this.
no|libao|libao4,libao-common,libao-dev|exe,dev,doc,nls||deps:yes
yes|libavcodec|libavcodec58,libavcodec-extra58|exe,dev,doc,nls||deps:yes
yes|libavcodec|libavcodec58|exe,dev,doc,nls||deps:yes
no|libappindicator|libappindicator3-1,libappindicator3-dev,libindicator3-7,libindicator3-dev|exe,dev,doc,nls #needs gtk3, needed by transmission. no, using my pet.
yes|libarchive|libarchive13|exe>dev,dev,doc,nls||deps:yes #needed by cmake.
no|libart|libart-2.0-2,libart-2.0-dev|exe,dev,doc,nls
Expand Down

0 comments on commit 56c3197

Please sign in to comment.