Subversion Repositories ALCASAR

Compare Revisions

Regard whitespace Rev 2525 → Rev 2523

/iso/minimal-rpm-list
File deleted
/iso/procedure-iso_v2.3.odt
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/iso/build_alcasar_iso.sh
141,9 → 141,6
echo "Mageia-6-${arch} ${p}"
}
 
#################################
# BEGIN HERE #
#################################
# Checking arguments (rpm_list and iso file and eventually lang)
[[ ($# -lt 1) || ($# -gt 2) ]] && echo \
"Usage: $0 ARGS
173,9 → 170,8
RPMS_DIR=$(pwd)"/rpms"
[[ -d ${RPMS_DIR} ]] && rm -rf ${RPMS_DIR}
mkdir ${RPMS_DIR}
# Retreiving rpm_lists
rpm_need_by_alcasar=`rpm -qa`
rpm_need_by_mageia=`cat minimal-rpm-list`
# Retreiving rpm_list
rpm_needed=`rpm -qa`
 
# official and new dirs
mageiaNewDir=/tmp/mageia_new
197,7 → 193,7
 
# Copying main files except core and nonfree directories
echo "Extracting base image..."
cd $mageiaOfficialDir && \
cd /tmp/mageia_official && \
tar cf - --exclude=${arch}/media . | (cd $mageiaNewDir && tar xf - ) && cd "${actualDir}"
 
# Creating new directories core and nonfree and dir for alcasar stufs
220,9 → 216,10
# Copying the RPM in core and nonfree and clearing the plop.idx file
echo "Copying RPMS in ISO ..."
> ${plopFilePath}
total=`echo $rpm_need_by_mageia | wc -w`
# Selecting & copying of rpm need by Mageia
for rpm in ${rpm_need_by_mageia}; do
total=`echo $rpm_needed | wc -w`
 
# Selecting rpm
for rpm in ${rpm_needed}; do
let percent="${count} * 100 / ${total}"
print_percentage ${percent}
# Retreiving output of ls in directories
235,7 → 232,7
countCore=$(expr ${countCore} + 1)
# Updating the plop.idx
purifyRpmName ${rpm} ${arch} >> ${plopFilePath}
# if present in nonfree, copying in nonfree_new
# If present in nonfree, copying in nonfree_new
elif [[ ! -z ${fileInNonFree} ]]; then
# Copying RPM
cp "${nonFreeDir}/${fileInNonFree}" ${nonFreeDirNew}
243,43 → 240,30
# Updating the plop.idx
purifyRpmName ${rpm} ${arch} >> ${plopFilePath}
else
echo "$rpm not found"
# we need to download it and to copy on ALCASAR special RPM tarball
# if RPM name is also in core/nonfree, we need to copying it in core/nonfree
# be carefull with kernel (ISO must boot on the original one)
url=$(urpmq --ignorearch --sources ${rpm} | grep 'updates\|release' | uniq)
wget -P "${RPMS_DIR}" "${url}" --quiet
short_name=`rpm -q $rpm --qf "%{NAME}\n"`
# echo "$count - $countCore - $countNonFree : $rpm not in core/update - shortame = $short_name"
#read a
cp ${RPMS_DIR}/${rpm}.${arch}.rpm ${coreDirNew}
fi
count=$(expr ${count} + 1)
done
 
# Sorting the plop file alphabetically
cat ${plopFilePath} | sort > /tmp/tmpFileMageia && mv /tmp/tmpFileMageia ${plopFilePath}
# Informations
echo "$count RPMs copied (${countCore} from core and ${countNonFree} from nonfree)"
echo "Hit a Key to download complemmentary RPMs"
read a
 
count=0
total=`echo $rpm_need_by_alcasar | wc -w`
# Selecting & copying of rpm need by alcasar
for rpm in ${rpm_need_by_alcasar}; do
let percent="${count} * 100 / ${total}"
print_percentage ${percent}
# Retreiving output of ls in directories
fileInCore=$(ls ${coreDir} | grep "^${rpm}")
fileInNonFree=$(ls ${nonFreeDir} | grep "^${rpm}")
# we need to download icomplementary RPMS (that aren't in core nor in nonfree)
if [ -z ${fileInCore} ] && [ -z ${fileInNonFree} ]; then
url=$(urpmq --ignorearch --sources ${rpm} | grep 'updates\|release' | uniq)
wget -P "${RPMS_DIR}" "${url}" --quiet
short_name=`rpm -q $rpm --qf "%{NAME}\n"`
fi
count=$(expr ${count} + 1)
done
tar -cvf ${actualDir}/alcasar.tar.gz ${RPMS_DIR}/
cp ${actualDir}/alcasar.tar.gz ${mageiaNewDir}/${arch}/install/alcasar
# Informations
echo "$count complementary RPMs copied"
echo "Hit a Key to create the ISO file"
read a
echo "${countCore} files kept from core"
echo "${countNonFree} files kept from nonfree"
 
# Copying customized files
echo "Copying customized files..."
tar -cvf ${actualDir}/alcasar.tar.gz ${RPMS_DIR}/
cp ${actualDir}/alcasar.tar.gz ${mageiaNewDir}/${arch}/install/alcasar
### only if we want to change the normal install procedure ###
#cp ${actualDir}/config/first_login ${mageiaNewDir}/${arch}/install/alcasar
#cp ${actualDir}/config/auto_inst-${arch}${lang}.cfg.pl ${mageiaNewDir}/${arch}/install/alcasar/auto_inst-${arch}.cfg.pl