GithubHelp home page GithubHelp logo

debian-adapter's Introduction

EO principles respected here DevOps By Rultor.com We recommend IntelliJ IDEA

Javadoc License codecov Hits-of-Code Maven Central PDD status

This Java library turns your binary storage (files, S3 objects, anything) into a Debian repository. You may add it to your binary storage and it will become a fully-functionable Debian repository, which apt will perfectly understand.

Debian repository structure

Debian repository has the following structure:

(repository root) 
| 
+-dists
  | 
  |-my_repo
  | |-main
  | | |-binary-*
  | | +-source 
  | |-contrib
  | | |-binary-*
  | | +-source 
  | +-non-free
  |   |-binary-*
  |   +-source
  |
  |-testing 
  | ...
  |
  +-unstable 
    | ...
    |

main contains free package, non-free - non-free ones and contrib contains free packages which depend on non-free ones. testing and unstable have the same structure as main or testing.

* in binary-* stands for the architecture, currently Debian supports more than 20 of them. Each binary-* directory contains a Packages.gz index file. Index files contain paths to the individual packages, so packages can be located anywhere in the repository.

File /dists/my-repo/Release (or gpg-signed /dists/my-repo/InRelease file) contains general information about the repository and list of the checksums and paths to the Packages indexes.

Release files

Release files contain information about distribution and checksums for the indexes, they are located in the repository root /dists/my-repo/Release. Here is the example with minimal fields set:

Codename: artipie #Repository name
Architectures: amd64 #Space separated supported architectures set
Components: main #Repository components set
Date: Sat, 05 Dec 2020 10:35:57 UTC #Creation date
SHA256: #checksums for Packages indexes
  eb8cb7a51d9fe47bde0a32a310b93c01dba531c6f8d14362552f65fcc4277af8 1351 main/binary-amd64/Packages.gz
  c1cfc96b4ca50645c57e10b65fcc89fd1b2b79eb495c9fa035613af7ff97dbff 2564 main/binary-amd64/Packages

The most important fields here are Architectures (list of the architectures this repository supports separated by space) and Components (a whitespace separated list of components or areas, in the layout above components are main, contrib and non-free) as they define repository structure.

SHA256 field contains list of the repository Packages indexes files along with their sha-256 checksum, size and filename relative to the directory of the Release file. Checksums data have to be provided for uncompressed files as well even if they are not present in the repository.

Packages index file

Packages index files are called Binary Packages Indices and contains information about packages in paragraphs, each paragraph has the format defined by Debian Policy and several other fields such as Filename, Size and checksums, here is an example of one paragraph (information about one package):

Package: aglfn
Version: 1.7-3
Architecture: all
Maintainer: Debian Fonts Task Force <[email protected]>
Installed-Size: 138
Filename: main/aglfn_1.7-3_all.deb
Size: 29238
MD5sum: cee972bb5e9f9151239e146743a40c9c
SHA1: d404261883ae7bd5a3e35abca99b1256ae070ed5
SHA256: 421a5c6432cb7f9c398aa5c89676884e421ad0fde6bf13d0cadee178bf0daf7c
Section: fonts
Priority: extra
Homepage: http://sourceforge.net/adobe/aglfn/
Description: Adobe Glyph List For New Fonts
 AGL (Adobe Glyph List) maps glyph names to Unicode values ...

Debian sources list

Debian repository can be added to the apt-get sources list by editing /etc/apt/sources.list file, here is the file entry format:

deb [trusted=yes] http://site.example.com/debian distribution component1 component2 component3

distribution is repository name, my-repo in the example above, components are set of the repository components apt is allowed to work with, parameter [trusted=yes] allows to work without gpg-signatures.

How to contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

$ mvn clean install -Pqulice

To avoid build errors use Maven 3.2+.

debian-adapter's People

Contributors

g4s8 avatar olegmoz avatar olenagerasimova avatar yegor256 avatar

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.