Code Monkey home page Code Monkey logo

apt-blob-wireframe's Introduction

APT + Blob Repository Wireframe

This repository contains a wireframe for a Debian APT repository hosted on Azure Blob Storage. The repository is designed to be used with the apt package manager.

Basic configuration for the repository can be done by copying env.example.bash to env.bash and modifying the variables. The env.bash file is sourced by the other scripts in the repository. This file is not tracked by git by default.

cp env.example.bash env.bash
vim env.bash # Modify the variables

Repository

The repository structure follows the standard Debian repository layout.

  • KEY.asc: The ASCII armored public key used to sign the repository.
  • dists/: Contains the distribution information.
    • $(lsb_release -cs)/ (e.g., focal/): Contains the release information for the current distribution.
      • InRelease: The signed release file.
      • unstable/: Contains the package information for the unstable component.
        • binary-$(ARCH)/ (e.g., binary-arm64/): Contains the binary packages for a specific architecture.
  • pool/: Contains the packages.
    • unstable/: Contains the packages for the unstable component.
      • binary-$(ARCH)/ (e.g., binary-arm64/): Contains the binary packages for a specific architecture.
        • $(PACKAGE)_$(VERSION)_$(ARCH).deb: The package file.

Scripts in this repo are designed to output the repository structure to the repo/ directory.

Debian binary packages are built using dpkg-deb. See build-deb.bash for an example. The hello-blob-repo package is an example of a package that can be added to the repository. Packages must contain a DEBIAN/control file with required fields as specified in the Debian Policy Manual.

./build-deb.bash

The repository is signed using gpg. The public key is exported to KEY.asc and the private key is used to sign the release file.

The repository is managed using apt-ftparchive; see update-repo.bash for an example. Packages files are generated using the apt-ftparchive packages command using a recursive search of the pool/ directory. A Release file is generated using the apt-ftparchive release command, which is immediately piped to gpg to sign the file. Note: no Release is generated as this wireframe does not support older versions of apt.

./update-repo.bash

Hosting

The repository is hosted on Azure Blob Storage and is managed using the az CLI. The storage account is configured for blobs to be publically accessible. The account can be created with:

./create-storage.bash

The repository is hosted in the debian container, which is automatically created by the push-repo.bash script:

./push-repo.bash

Usage

The repository can be added to the sources.list file using the deb protocol and the URL of the repository. The URL is the public URL of the debian container in the storage account. The public key used to sign the repo is added to /etc/apt/keyrings/. See add-apt-source.bash for an example.

sudo ./add-apt-source.bash

Once the repository is added, the apt package manager can be used to install packages from the repository.

sudo apt update
sudo apt install hello-blob-repo
echo $(which hello-blob-repo)
hello-blob-repo

References

apt-blob-wireframe's People

Contributors

asasine avatar

Watchers

 avatar

apt-blob-wireframe's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.