<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">
<title>Konsole output</title>
I guess the only difference seems to be "Architecture = i686"
instead of auto. And then I removed the multilib section (which I
think might only be relevant in Manjaro; also the 2 packages I
listed as examples are only in multilib; so I don't have an
example where this patch is necessary in plain Arch)<br>
<br>
<blockquote type="cite">
<div><span style="font-family:monospace"><span
style="font-weight:bold;color:#ff5454;background-color:#ffffff;">root</span><span
style="font-weight:bold;color:#ff54ff;background-color:#ffffff;">@</span><span
style="font-weight:bold;color:#ff5454;background-color:#ffffff;">peter:</span><span
style="font-weight:bold;color:#5454ff;background-color:#ffffff;">~</span><span
style="font-weight:bold;color:#ff5454;background-color:#ffffff;"> #</span><span
style="color:#000000;background-color:#ffffff;"> diff -u
/etc/pacman.conf /opt/arch32/pacman.conf
</span><br>
--- /etc/pacman.conf 2015-02-21 17:53:33.000000000 +0100
<br>
+++ /opt/arch32/pacman.conf 2015-06-20
09:44:52.939178697 +0200
<br>
@@ -21,7 +21,8 @@
<br>
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
<br>
#CleanMethod = KeepInstalled
<br>
#UseDelta = 0.7
<br>
-Architecture = auto
<br>
+#Architecture = auto
<br>
+Architecture = i686
<br>
<br>
# Pacman won't upgrade packages listed in IgnorePkg and
members of IgnoreGroup
<br>
#IgnorePkg =
<br>
@@ -81,9 +82,9 @@
<br>
# If you want to run 32 bit applications on your x86_64
system,
<br>
# enable the multilib repositories as required here.
<br>
<br>
-[multilib]
<br>
-SigLevel = PackageRequired
<br>
-Include = /etc/pacman.d/mirrorlist
<br>
+#[multilib]
<br>
+#SigLevel = PackageRequired
<br>
+#Include = /etc/pacman.d/mirrorlist
<br>
<br>
# An example of a custom package repository. See the pacman
manpage for
<br>
# tips on creating your own repositories.<br>
<br>
</span></div>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</blockquote>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<br>
<br>
On 06/26/2015 03:07 PM, Serge Hallyn wrote:<br>
</div>
<blockquote cite="mid:20150626130737.GA26633@ubuntumail" type="cite">
<pre wrap="">Quoting Peter Maloney (<a class="moz-txt-link-abbreviated" href="mailto:peter.maloney@yahoo.ca">peter.maloney@yahoo.ca</a>):
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
Here is a simple patch that makes sure the "base" is resolved for the
given ${pacman_conf}, so it won't have nonexistent packages, like when
building a 32 bit lxc, you don't want 32 bit support packages that are
for 64 bit only.
To do that, I just added "${pacman_config"} in the options for when
generating base_packages, and I also moved the generation to after the
-c option is handled, so the pacman_config is known.
I needed to do this to build a 32 bit LXC container. Without it, some
packages found in the base_package array do not exist in the
repositories actually used to download ( Konsole output lib32-glibc and
Konsole output lib32-tcp_wrappers are 2 examples) . I used the
"/opt/arch32/pacman.conf" file created by "pacman -S devtools
arch-install-scripts", (which I modified also to have no "multilib"
section, which also doesn't belong on a 32 bit system, and makes the
script fail when refreshing repositories... not sure whether or not to
report that somewhere)
I tested the following 2 cases:
# ./lxc-archlinux -n arch32 -a i686 -c /opt/arch32/pacman.conf
# ./lxc-archlinux -n arch32
Konsole output
</pre>
</blockquote>
<pre wrap="">
Hi - The lxc-archlinux file is a generated one, lxc-archlinux.in is
the one which needs to be patched.
Is there a way for the template to automatically determine the file
to use when building for 32-bit, so the user doesn't need to know where
it is?
</pre>
<blockquote type="cite">
<pre wrap="">*I am not on the list, so be sure to CC me when replying.
*
Peter*
*
</pre>
</blockquote>
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">--- /usr/share/lxc/templates/lxc-archlinux.orig 2015-06-20 09:51:02.778719562 +0200
+++ /usr/share/lxc/templates/lxc-archlinux 2015-06-20 09:57:09.849332795 +0200
@@ -50,9 +50,6 @@
# by default, install 'base' except the kernel
pkg_blacklist="linux"
base_packages=()
-for pkg in $(pacman -Sqg base); do
- [ "${pkg_blacklist#*$pkg}" = "$pkg_blacklist" ] && base_packages+=($pkg)
-done
declare -a additional_packages
# split comma-separated string into an array
@@ -231,6 +228,11 @@
esac
done
+# generate base_packages only after the -c option is handled
+for pkg in $(pacman --config "${pacman_config}" -Sqg base); do
+ [ "${pkg_blacklist#*$pkg}" = "$pkg_blacklist" ] && base_packages+=($pkg)
+done
+
if [ -z "${name}" ]; then
echo "missing required 'name' parameter"
exit 1
</pre>
</blockquote>
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">_______________________________________________
lxc-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lxc-devel@lists.linuxcontainers.org">lxc-devel@lists.linuxcontainers.org</a>
<a class="moz-txt-link-freetext" href="http://lists.linuxcontainers.org/listinfo/lxc-devel">http://lists.linuxcontainers.org/listinfo/lxc-devel</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>