[lxc-devel] [PATCH 1/3] Fix default package selection

Leonid Isaev lisaev at umail.iu.edu
Tue Apr 1 02:18:23 UTC 2014


On Mon, 31 Mar 2014 20:43:01 -0400
Stéphane Graber <stgraber at ubuntu.com> wrote:

> On Mon, Mar 31, 2014 at 08:33:51PM -0400, Leonid Isaev wrote:
> > On Mon, 31 Mar 2014 18:34:13 -0500
> > Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> > 
> > > Quoting Leonid Isaev (lisaev at umail.iu.edu):
> > > > Do not cherry-pick packages for the default install to avoid dependency
> > > > issues. Instead, install the base group modulo blacklisted packages.
> > > > 
> > > > Signed-off-by: Leonid Isaev <lisaev at umail.iu.edu>
> > > 
> > > Hi - these look good to me (except for adding bashisms which is
> > > something we generally try to avoid), but I'm not a user/admin/
> > 
> > But... I am confused. The sheband on this template says "bash", not
> > "sh" (actually, 14 of 17 templates have #!/bin/bash). Isn't this already
> > enough reason to not consider other shells? 
> 
> Most of them are indeed marked as /bin/bash, however we intend to slowly
> switch to POSIX shell, so while we do accept bashisms when they
> massively improve readability, things like [[ a = b ]] or [ a == b ]
> instead of [ a = b ], don't provide any extra functionality and just
> make things harder, so please refrain from using those.

OK, I'll resend the patch series.

Thanks,
L.

> 
> I suppose I should spend a few minutes and write something in our coding
> guidelines to that effect, to make it clearer for newcomers.
> 
> > Moreover, archlinux and its install scripts heavily rely on (modern) bash,
> > so in the current form (even before these patches) lxc-archlinux will most
> > likely not work properly with other shells.
> > 
> > Thanks,
> > L.
> > 
> > > developer on arch linux.  Alexander or John, do these 3 look
> > > good to you?
> > > 
> > > > ---
> > > >  templates/lxc-archlinux.in | 32 ++++++--------------------------
> > > >  1 file changed, 6 insertions(+), 26 deletions(-)
> > > > 
> > > > diff --git a/templates/lxc-archlinux.in b/templates/lxc-archlinux.in
> > > > index 15283df..5aa9e53 100644
> > > > --- a/templates/lxc-archlinux.in
> > > > +++ b/templates/lxc-archlinux.in
> > > > @@ -47,32 +47,12 @@ default_locale="en-US.UTF-8"
> > > >  default_timezone="UTC"
> > > >  pacman_config="/etc/pacman.conf"
> > > >  
> > > > -# sort of minimal package set
> > > > -base_packages=(
> > > > -    "systemd"
> > > > -    "systemd-sysvcompat"
> > > > -    "filesystem"
> > > > -    "coreutils"
> > > > -    "kmod"
> > > > -    "procps"
> > > > -    "psmisc"
> > > > -    "pacman"
> > > > -    "bash"
> > > > -    "cronie"
> > > > -    "iproute2"
> > > > -    "iputils"
> > > > -    "inetutils"
> > > > -    "dhcpcd"
> > > > -    "dnsutils"
> > > > -    "nano"
> > > > -    "grep"
> > > > -    "less"
> > > > -    "gawk"
> > > > -    "sed"
> > > > -    "tar"
> > > > -    "gzip"
> > > > -    "which"
> > > > -)
> > > > +# 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
> > > > -- 
> > > > 1.8.5.3
> > > > 
> > > > -- 
> > > > Leonid Isaev
> > > > GnuPG key fingerprint: C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B
> > > > 5A6D
> > > 
> > > 
> > > 
> > > > _______________________________________________
> > > > lxc-devel mailing list
> > > > lxc-devel at lists.linuxcontainers.org
> > > > http://lists.linuxcontainers.org/listinfo/lxc-devel
> > > 
> > > _______________________________________________
> > > lxc-devel mailing list
> > > lxc-devel at lists.linuxcontainers.org
> > > http://lists.linuxcontainers.org/listinfo/lxc-devel
> > 
> > -- 
> > Leonid Isaev
> > GnuPG key fingerprint: C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
> 
> 
> 
> > _______________________________________________
> > lxc-devel mailing list
> > lxc-devel at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-devel
> 
> 



-- 
Leonid Isaev
GnuPG key fingerprint: C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140331/554a6250/attachment-0001.pgp>


More information about the lxc-devel mailing list