This is the script I use to generate my x86_gcc2 repository:
#!/bin/sh
cd /boot/home/projects/repo
repositoryDir="repo"
repoInfo="example.info"
rm -rf "$repositoryDir"
mkdir -p "$repositoryDir"
packageDir="$repositoryDir/packages"
mkdir -p "$packageDir"
# Get the canonical names for the packages and copy them to the package
# directory.
cd /boot/home/projects/repo
for packageFile in *.hpkg; do
fileName=`package info -f "%fileName%" "$packageFile"`
cp -v "$packageFile" "$packageDir/$fileName"
done
#packageList=""
#for packageFile in "$packageDir"/*.hpkg; do
# packageList="$packageList $packageFile"
#done
#echo "$packageList"
echo "build the repo file"
# build the repository file
cp "$repoInfo" "$repositoryDir/repo.info"
package_repo create "$repositoryDir/repo.info" "$packageDir"/*.hpkg
# create the checksum file
sha256sum "$repositoryDir/repo" \
| sed -r 's,([^[:space:]]*).*,\1,' > "$repositoryDir/repo.sha256"
# The sed part is only necessary for sha256sum, but it doesn't harm for
# sha256 either.
The script works fine, been using it for years (originally got it from bbjimmy IIRC). My question is this: If I tweak the paths as required, can I use this script to generate my x86_64 repo, from the x86_gcc2 installation, without first booting into x86_64? I don’t know enough about what package_repo and sha256sum do to make that judgement call, and If I get it wrong, it means re-uploading gigabytes of data to my FTP server … fixable, but not pleasant.