Article 5GPA7 [SOLVED] File lxc-slackware in package lxc needs updated

[SOLVED] File lxc-slackware in package lxc needs updated

by
drumz
from LinuxQuestions.org on (#5GPA7)
Try to set up an lxc container in -current following the guide:

https://docs.slackware.com/howtos:misc:lxc

And it fails:

Code:$ cat /etc/lxc/slackware.conf
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0Code:# MIRROR=https://mirrors.slackware.com/slackware/ lxc-create -n SlackwareSBo -t slackware -f /etc/lxc/slackware.conf
installpkg is /sbin/installpkg
slackpkg is /usr/sbin/slackpkg

Your slackpkg.conf is outdated. Please, edit it using slackpkg.conf.new
as example or overwrite it with slackpkg.conf.new.

You can use 'slackpkg new-config' to do that.

Your slackpkg.conf is outdated. Please, edit it using slackpkg.conf.new
as example or overwrite it with slackpkg.conf.new.

You can use 'slackpkg new-config' to do that.

/usr/share/lxc/templates/lxc-slackware: line 309: /var/cache/lxc/slackware/rootfs-current-x86_64/etc/slackpkg/mirrors: No such file or directory
Error creating container SlackwareSBoI discovered it's because of an outdated slackpkg.conf embedded in /usr/share/lxc/templates/lxc-slackware. Here is the diff I applied:

Code:$ diff -Nau lxc-slackware.orig lxc-slackware
--- lxc-slackware.orig 2021-04-16 08:41:25.247209674 -0700
+++ lxc-slackware 2021-04-16 08:54:45.012747109 -0700
@@ -206,10 +206,11 @@
touch $CONF/blacklist

cat <<EOF > $CONF/slackpkg.conf
-# v2.8
+# v15.0
ARCH=$arch
TEMP=$cache/cache-$release-$arch
WORKDIR=$cache/slackpkg-$release-$arch
+WGETFLAGS="--passive-ftp"
DELALL=off
CHECKMD5=on
CHECKGPG=on
@@ -217,6 +218,7 @@
PRIORITY=( patches %PKGMAIN extra pasture testing )
POSTINST=on
ONLY_NEW_DOTNEW=off
+ORIG_BACKUPS=on
ONOFF=on
DOWNLOAD_ALL=on
DIALOG=off
@@ -224,6 +226,7 @@
DEFAULT_ANSWER=y
USE_INCLUDES=on
SPINNING=off
+DIALOG_MAXARGS=139000
EOF

# thanks to Vincent Batts for this list of packagesBut now I have a new error:

Code:...
...
Package xz-5.2.5-x86_64-3.txz is already in cache - not downloading
Installing xz-5.2.5-x86_64-3...
Verifying package xz-5.2.5-x86_64-3.txz.
Installing package xz-5.2.5-x86_64-3.txz:
PACKAGE DESCRIPTION:
# xz (compression utility based on the LZMA algorithm)
#
# LZMA is a general purpose compression algorithm designed by Igor
# Pavlov as part of 7-Zip. It provides high compression ratio while
# keeping the decompression speed fast. XZ Utils are an attempt to make
# LZMA compression easy to use on free (as in freedom) operating
# systems.
#
# The people most responsible for xz are Igor Pavlov, Ville Koskinen,
# and Lasse Collin. Homepage: http://tukaani.org/xz/
#
Executing install script for xz-5.2.5-x86_64-3.txz.
Package xz-5.2.5-x86_64-3.txz installed.
Searching for NEW configuration files...
No .new files found.

Configuring...

Adding an etc/fstab that must be modified later with the
full path of the container's rootfs if you decide to move it.
chroot: failed to run command chpasswd': No such file or directory
Error creating container SlackwareSBoI wonder with the addition of PAM, do more packages need to be added to minimal-lxc.template (also defined in lxc-slackware)?

P. S. On 14.2 I build SBo packages using chroot with my own homegrown scripts using overlayfs to always have a clean build system. I thought I'd take the opportunity to investigate using lxc instead - this is the first time I've played with lxc. So if I'm doing something wrong let me know! Also I don't use slackpkg (well, I guess I am now with lxc) so my patch needs to be checked by those who actually know what they're doing.latest?d=yIl2AUoC8zA latest?i=EBdaHYR8yj0:Tw-gE2tR_58:F7zBnMy latest?i=EBdaHYR8yj0:Tw-gE2tR_58:V_sGLiP latest?d=qj6IDK7rITs latest?i=EBdaHYR8yj0:Tw-gE2tR_58:gIN9vFwEBdaHYR8yj0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments