Development system (2)

Date: 2021/04/09 (initial publish), 2023/04/29 (last update)

Source: en/note-00013.md

Previous Post Top Next Post

TOC

See Personal DEB package repository for updated easier alternative method.

Local private package repo

After reading https://wiki.debian.org/DebianRepository/Setup checking their popularity, I decided to go with reprepro package.

Here, I follow https://wiki.debian.org/DebianRepository/SetupWithReprepro (It was slightly outdated. I update it.)

Setting up an web server

 $ sudo apt install apache2

Now you can see a nice “Default Page” at “[::1]” (or “127.0.0.1” for IPV4) using browser.

Let’s create a simple directory tree for single distribution case.

 $ sudo bash -i
 # mkdir -p /var/www/html/debian
 # cat > /etc/apache2/conf-available/repos.conf <<'EOF'
<Directory /var/www/html/debian/ >
    # We want the user to be able to browse the directory manually
    Options Indexes FollowSymLinks Multiviews
    Require all granted
</Directory>

# This syntax supports several repositories, e.g. one for Debian, one for Ubuntu.
# Replace * with debian, if you intend to support one distribution only.
<Directory "/var/www/html/debian/db/">
    Require all denied
</Directory>

<Directory "/var/www/html/debian/conf/">
    Require all denied
</Directory>

<Directory "/var/www/html/debian/incoming/">
    Require all denied
</Directory>
EOF

Let’s enable configuration

$ sudo a2enconf repos
Enabling conf repos.
To activate the new configuration, you need to run:
  systemctl reload apache2
$ sudo systemctl reload apache2

GNU PG

Since we need to use sub-key for this purpose, let me check:

$ gpg --list-secret-keys  --with-subkey-fingerprint
pub   rsa4096 2010-09-23 [SC]
      3133724D6207881579E95D621E1356881DD8D791
uid           [ultimate] Osamu Aoki <osamu@debian.org>
sub   rsa4096 2010-09-23 [E]
      FDCAD8AB29E281A0E004B510A04CBCEEF08BEFAD

Setting up APT repository

$ sudo mkdir -p /var/www/html/debian/conf
$ cd /var/www/html/debian/conf

In there, distributions:

Origin: Osamu
Label: Osamu
Codename: sid
Architectures: amd64
Components: main
Description: APT repository for Osamu's infrastructure
SignWith: FDCAD8AB29E281A0E004B510A04CBCEEF08BEFAD

Also, in there options:

verbose
basedir /var/www/html/debian/
ask-passphrase

Installing package

$ reprepro -b /path/to/package_build_results includedeb sid *.deb
Previous Post Top Next Post