first commit
This commit is contained in:
commit
3d6c49df65
16 files changed
+1137
No files matched your search
Executable
+46
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
source /opt/rust-package-builder/scripts/lib.sh
|
||||
|
||||
APTLY_CONF="$DATA_DIR/state/aptly.conf"
|
||||
APTLY_ROOT="$DATA_DIR/aptly"
|
||||
REPOSITORY="$DATA_DIR/repository"
|
||||
|
||||
mkdir -p "$APTLY_ROOT" "$REPOSITORY/releases"
|
||||
|
||||
cat > "$APTLY_CONF" <<JSON
|
||||
{
|
||||
"rootDir": "$APTLY_ROOT",
|
||||
"architectures": ["amd64"],
|
||||
"dependencyFollowSuggests": false,
|
||||
"dependencyFollowRecommends": false,
|
||||
"dependencyFollowAllVariants": false,
|
||||
"dependencyFollowSource": false,
|
||||
"gpgDisableSign": false,
|
||||
"gpgDisableVerify": false,
|
||||
"gpgProvider": "gpg",
|
||||
"downloadSourcePackages": false,
|
||||
"skipLegacyPool": true
|
||||
}
|
||||
JSON
|
||||
|
||||
export APTLY_CONF
|
||||
|
||||
if ! aptly -config="$APTLY_CONF" repo list -raw | grep -Fx package-builder >/dev/null; then
|
||||
log "creating aptly local repository"
|
||||
aptly -config="$APTLY_CONF" repo create \
|
||||
-distribution="$REPO_DISTRIBUTION" \
|
||||
-component="$REPO_COMPONENT" \
|
||||
package-builder >/dev/null
|
||||
fi
|
||||
|
||||
for item in apt rpm repo-key.gpg index.html; do
|
||||
if [[ -e "$REPOSITORY/$item" && ! -L "$REPOSITORY/$item" ]]; then
|
||||
fatal "$REPOSITORY/$item exists and is not a symlink; refusing to overwrite"
|
||||
fi
|
||||
done
|
||||
|
||||
ln -sfn current/apt "$REPOSITORY/apt"
|
||||
ln -sfn current/rpm "$REPOSITORY/rpm"
|
||||
ln -sfn current/repo-key.gpg "$REPOSITORY/repo-key.gpg"
|
||||
ln -sfn current/index.html "$REPOSITORY/index.html"
|
||||
Reference in new issue
Block a user