From 89bda9217d4c0bb547448afd3439963075c35caf Mon Sep 17 00:00:00 2001 From: Sébastien Luttringer Date: Thu, 14 Mar 2013 03:55:39 +0100 Subject: archbuild: only use base-devel to new chroot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since TODO [1] which state: It would be good for base-devel to install everything needed for a build chroot we can remove base and sudo [1] https://www.archlinux.org/todo/add-more-to-base-devel/ Signed-off-by: Sébastien Luttringer Signed-off-by: Pierre Schmitz --- archbuild.in | 2 +- makechrootpkg.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/archbuild.in b/archbuild.in index 4054de7..9f9633c 100644 --- a/archbuild.in +++ b/archbuild.in @@ -2,7 +2,7 @@ m4_include(lib/common.sh) -base_packages=(base base-devel sudo) +base_packages=(base-devel) makechrootpkg_args=(-c -n) cmd="${0##*/}" diff --git a/makechrootpkg.in b/makechrootpkg.in index 08c76a8..1f0bbb2 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -41,7 +41,7 @@ usage() { echo '' echo 'The chroot "root" directory must be created via the following' echo 'command:' - echo ' mkarchroot /root base base-devel sudo' + echo ' mkarchroot /root base-devel' echo '' echo "Default makepkg args: $makepkg_args" echo '' @@ -112,7 +112,7 @@ if [[ ! -d $chrootdir ]]; then fi if [[ ! -d $chrootdir/root ]]; then - die "Missing chroot dir root directory. Try using: mkarchroot $chrootdir/root base base-devel sudo" + die "Missing chroot dir root directory. Try using: mkarchroot $chrootdir/root base-devel" fi umask 0022 -- cgit v1.2.3-70-g09d2 From 35dc7485fb1bbbe6c1dc236f35702561516f0836 Mon Sep 17 00:00:00 2001 From: Sébastien Luttringer Date: Thu, 14 Mar 2013 03:55:41 +0100 Subject: makechrootpkg: Stat chrootdir type after existancy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move detection of chrootdir type after have check if the directory exists. This avoid the following messages when -r is not given stat: cannot read file system information for '': No such file or directory Signed-off-by: Sébastien Luttringer Signed-off-by: Pierre Schmitz --- makechrootpkg.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makechrootpkg.in b/makechrootpkg.in index 1f0bbb2..e7e5f21 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -78,9 +78,6 @@ done # Canonicalize chrootdir, getting rid of trailing / chrootdir=$(readlink -e "$passeddir") -# Detect chrootdir filesystem type -chroottype=$(stat -f -c %T "$chrootdir") - if [[ ${copy:0:1} = / ]]; then copydir=$copy else @@ -117,6 +114,9 @@ fi umask 0022 +# Detect chrootdir filesystem type +chroottype=$(stat -f -c %T "$chrootdir") + # Lock the chroot we want to use. We'll keep this lock until we exit. # Note this is the same FD number as in mkarchroot exec 9>"$copydir.lock" -- cgit v1.2.3-70-g09d2