index : bootstrap32 | |
Archlinux32 bootstrap scripts | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-01-28 10:58:24 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-01-28 10:58:24 +0100 |
commit | 164181c1589942d9d1c8e1bf6cbba76974b7e1c7 (patch) | |
tree | 9ac1b5b1b8f4ab8a00ac82f98c28497b10ddd5a9 /create_ca-certificates-utils_shim.sh | |
parent | 54ebd1dea1dd4ad68d28e27f7a20ce843f1d2f59 (diff) |
-rw-r--r-- | create_ca-certificates-utils_shim.sh | 45 |
diff --git a/create_ca-certificates-utils_shim.sh b/create_ca-certificates-utils_shim.sh new file mode 100644 index 0000000..6026454 --- /dev/null +++ b/create_ca-certificates-utils_shim.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +. "./default.conf" + +# the ca-certificates-utils-shim shim + +if test ! -f $STAGE1_CHROOT/packages/$TARGET_CPU/ca-certificates-utils-shim-20170307-1-any.pkg.tar.xz; then + + cd $STAGE1_BUILD + rm -rf ca-certificates-utils-shim + + mkdir ca-certificates-utils-shim + cd ca-certificates-utils-shim + mkdir -p pkg/ca-certificates-utils-shim/etc/ssl/certs/ + cp /etc/ssl/certs/ca-certificates.crt pkg/ca-certificates-utils-shim/etc/ssl/certs/. + + BUILDDATE=`date '+%s'` + size=`du -sk --apparent-size pkg/` + size="$(( ${size%%[^0-9]*} * 1024 ))" + cat > pkg/ca-certificates-utils-shim/.PKGINFO <<EOF +pkgname = ca-certificates-utils-shim +pkgver = 20170307-1 +pkgdesc = Common CA certificates (utilities, from host machine) +url = http://pkgs.fedoraproject.org/cgit/rpms/ca-certificates.git +builddate = $BUILDDATE +size = $size +arch = any +provides = ca-certificates-utils +conflict = ca-certificates-utils +EOF + + cd pkg/ca-certificates-utils-shim + tar cJvf - .PKGINFO * | xz > ../../ca-certificates-utils-shim-20170307-1-any.pkg.tar.xz + cd ../.. + + cp -v *.pkg.tar.xz $STAGE1_CHROOT/packages/$TARGET_CPU/. + rm -rf $STAGE1_CHROOT/var/cache/pacman/pkg/* + rm -rf $STAGE1_CHROOT/packages/$TARGET_CPU/temp.db* + rm -rf $STAGE1_CHROOT/packages/$TARGET_CPU/temp.files* + repo-add $STAGE1_CHROOT/packages/$TARGET_CPU/temp.db.tar.gz $STAGE1_CHROOT/packages/$TARGET_CPU/*pkg.tar.xz + sudo pacman --force --noconfirm --config $STAGE1_CHROOT/etc/pacman.conf -r $STAGE1_CHROOT -Syy ca-certificates-utils-shim + +fi + +echo "ca-certificate shim exists." |