Created
May 29, 2022 17:35
-
-
Save ChatchaiJ/d7cc508e46ae8f6712853f2229dbae61 to your computer and use it in GitHub Desktop.
Config reprepro on debian server to create debian repository -- example add python package to repos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BASEDIR="/srv/repos/apt/debian" | |
CONFDIR="${BASEDIR}/conf" | |
DISTFILE="${CONFDIR}/distributions" | |
OPTIONS="${CONFDIR}/options" | |
DEBWORKDIR="/home/cj/work" | |
# DEBFILE="${DEBWORKDIR}/python_3.10.4-1_amd64.deb" | |
DEBFILE="python_3.10.4-1_amd64.deb" | |
PROJECT="CJ Debian Repository Test" | |
OSRELEASE="bullseye" | |
OSRELEASE_TESTING="bookworm" | |
KEYID="9FCA072DABD4D084C8BC5F8A54EEE5C3993AA1A7" | |
mkdir -p ${CONFDIR} | |
cat << EOT > ${DISTFILE} | |
Origin: ${PROJECT} | |
Label: ${PROJECT} | |
Codename: ${OSRELEASE} | |
Architectures: amd64 | |
Components: main | |
Description: Apt repository for project ${PROJECT} | |
SignWith: ${KEYID} | |
Origin: ${PROJECT} | |
Label: ${PROJECT} | |
Codename: ${OSRELEASE_TESTING} | |
Architectures: amd64 | |
Components: main | |
Description: Apt repository for project ${PROJECT} | |
SignWith: ${KEYID} | |
EOT | |
cat << EOT > ${OPTIONS} | |
verbose | |
basedir ${BASEDIR} | |
ask-passphrase | |
EOT | |
# cd $BASEDIR || { echo "Cant't change directory to $BASEDIR"; exit; } | |
# reprepro includedeb ${OSRELEASE} ${DEBFILE} | |
# reprepro includedeb ${OSRELEASE_TESTING} ${DEBFILE} | |
reprepro -V -b ${BASEDIR} -S python -C main -P standard includedeb ${OSRELEASE} ${DEBFILE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment