Last active
February 5, 2017 00:34
-
-
Save subuk/29cdd09257a22947e5a4922724e25820 to your computer and use it in GitHub Desktop.
Simple debian repository
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
1. Put Makefile and Release.in to dists/trusty/ | |
2. Put binary debian packages to dists/trusty/pool | |
3. Run make | |
4. Add repo to the sources.list: deb https://host.name/rootdir trusty main |
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 | |
set -e | |
PKGS=$(wc -c ${PACKAGES}) | |
PKGS_GZ=$(wc -c ${PACKAGES}.gz) | |
cat << EOF | |
Date: $(date -R) | |
MD5Sum: | |
$(md5sum ${PACKAGES} | cut -d" " -f1) $PKGS | |
$(md5sum ${PACKAGES}.gz | cut -d" " -f1) $PKGS_GZ | |
SHA1: | |
$(sha1sum ${PACKAGES} | cut -d" " -f1) $PKGS | |
$(sha1sum ${PACKAGES}.gz | cut -d" " -f1) $PKGS_GZ | |
SHA256: | |
$(sha256sum ${PACKAGES} | cut -d" " -f1) $PKGS | |
$(sha256sum ${PACKAGES}.gz | cut -d" " -f1) $PKGS_GZ | |
EOF |
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
default: | |
mkdir -p main/binary-amd64 | |
dpkg-scanpackages -a amd64 pool/ /dev/null dists/trusty/ >main/binary-amd64/Packages | |
cat main/binary-amd64/Packages | gzip -c9 >main/binary-amd64/Packages.gz | |
cat main/binary-amd64/Packages | bzip2 -c9 >main/binary-amd64/Packages.bz2 | |
cat Release.in > Release | |
PACKAGES=main/binary-amd64/Packages /usr/local/bin/make-debian-release-file >> Release | |
rm -f Release.gpg | |
gpg --digest-algo sha512 -abs -o Release.gpg Release |
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
Archive: trusty | |
Suite: trusty | |
Components: main | |
Origin: project.org | |
Label: Simple ubuntu repository | |
Architectures: amd64 i386 | |
Description: Packages for ubuntu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment