Merge pull request #225 from oxedions/master

Fix: bundles - Replace glibc_libcrypt by libxcrypt
This commit is contained in:
John Davidson 2020-10-19 23:01:10 +03:00 committed by GitHub
commit f7ca5df2d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 96 additions and 35 deletions

View File

@ -1,4 +1,4 @@
glibc_libnsl
#glibc_libnss_compat
glibc_libutil
glibc_libcrypt
libxcrypt

View File

@ -2,7 +2,6 @@ glibc_ld-linux
glibc_libBrokenLocale
glibc_libanl
glibc_libc
glibc_libcrypt
glibc_libdl
glibc_libm
glibc_libnsl
@ -15,3 +14,4 @@ glibc_libresolv
glibc_librt
glibc_libthread_db
glibc_libutil
libxcrypt

View File

@ -1,33 +0,0 @@
#!/bin/sh
set -e
. ../../common.sh
if [ ! -d $SYSROOT ] ; then
echo "Cannot continue - GLIBC is missing. Please buld GLIBC first."
exit 1
fi
mkdir -p "$WORK_DIR/overlay/$BUNDLE_NAME"
cd $WORK_DIR/overlay/$BUNDLE_NAME
rm -rf $DEST_DIR
mkdir -p $DEST_DIR/lib
cp $SYSROOT/lib/libcrypt.so.1 $DEST_DIR/lib/
ln -s libcrypt.so.1 $DEST_DIR/lib/libcrypt.so
echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/*
set -e
# With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/* \
$OVERLAY_ROOTFS
echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR

View File

@ -0,0 +1,5 @@
# You can find the latest xcrypt source bundles here:
#
# https://github.com/besser82/libxcrypt
#
LIBXCRYPT_SOURCE_URL=https://github.com/besser82/libxcrypt/archive/v4.4.17.tar.gz

View File

@ -0,0 +1,38 @@
#!/bin/sh
set -e
. ../../common.sh
# Read the common configuration properties.
DOWNLOAD_URL=`read_property LIBXCRYPT_SOURCE_URL`
USE_LOCAL_SOURCE=`read_property USE_LOCAL_SOURCE`
# Grab everything after the last '/' character.
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE ] ; then
echo "Source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE is missing and will be downloaded."
USE_LOCAL_SOURCE="false"
fi
cd $MAIN_SRC_DIR/source/overlay
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
# Downloading LIBXCRYPT source bundle file. The '-c' option allows the download to resume.
echo "Downloading LIBXCRYPT source bundle from $DOWNLOAD_URL"
wget -c $DOWNLOAD_URL
else
echo "Using local LIBXCRYPT source bundle $MAIN_SRC_DIR/source/overlay/$ARCHIVE_FILE"
fi
# Delete folder with previously extracted LIBXCRYPT.
echo "Removing LIBXCRYPT work area. This may take a while."
rm -rf $WORK_DIR/overlay/$BUNDLE_NAME
mkdir $WORK_DIR/overlay/$BUNDLE_NAME
# Extract LIBXCRYPT to folder 'work/overlay/libxcrypt'.
# Full path will be something like 'work/overlay/libxcrypt/libxcrypt-4.4.17'.
tar -xvf $ARCHIVE_FILE -C $WORK_DIR/overlay/$BUNDLE_NAME
cd $SRC_DIR

View File

@ -0,0 +1,41 @@
#!/bin/sh
set -e
. ../../common.sh
cd $WORK_DIR/overlay/$BUNDLE_NAME
# Change to the Links source directory which ls finds, e.g. 'libxcrypt-4.4.17'.
cd $(ls -d libxcrypt-*)
echo "Generating configure."
./autogen.sh
rm -rf $DEST_DIR
echo "Configuring '$BUNDLE_NAME'."
CFLAGS="$CFLAGS" ./configure \
--prefix=$DEST_DIR
echo "Preparing '$BUNDLE_NAME' work area. This may take a while."
make clean
echo "Building '$BUNDLE_NAME'."
make -j $NUM_JOBS
echo "Installing '$BUNDLE_NAME'."
make -j $NUM_JOBS install
echo "Reducing '$BUNDLE_NAME' size."
set +e
strip -g $DEST_DIR/lib/*
set -e
# With '--remove-destination' all possibly existing soft links in
# '$OVERLAY_ROOTFS' will be overwritten correctly.
cp -r --remove-destination $DEST_DIR/lib/libcrypt.so* $OVERLAY_ROOTFS/lib/
echo "Bundle '$BUNDLE_NAME' has been installed."
cd $SRC_DIR

View File

@ -0,0 +1,10 @@
#!/bin/sh
set -e
. ../../common.sh
./01_get.sh
./02_build.sh
cd $SRC_DIR