282
edits
m (Added category) |
(Added HS4 repack instructions for demonstrating how to pack a .deb file and then create a repo) |
||
Line 1: | Line 1: | ||
[[Category:Miscellaneous]] | [[Category:Miscellaneous]] | ||
Notes and other various tutorials on how to package .deb files for Debian based distributions | Notes and other various tutorials on how to package .deb files for Debian based distributions | ||
==Notes on repackaging the HomeSeer Linux tarfile== | |||
Recently, I decided to repack the latest HomeSeer 4 Linux distribution file into a .deb package and then create a repository to share with others to download it. | |||
The inspiration for this comes from the now defunct SavageAutomate's original .deb repack, repo and helper scripts to install HS4 on Debian/Ubuntu systems. | |||
===Prerequisites=== | |||
# You need a Debian/Ubuntu Linux system to build the packages and create the repo on. | |||
# You need to have a GPG key that you will use for signing packages in the repo. | |||
# You should have a place to serve the repo for public access. I am using Github pages with a custom domain for the HomeSeer Linux repack. | |||
# You should have the prerequisites installed on your system to test the package. Ideally a virtual machine you can do snapshots on works best. | |||
Since I am doing this for HomeSeer v4 Linux, I will install some packages so I can run HomeSeer and test the .deb pacakge I create: | |||
<syntaxhighlight lang="shell"> | |||
apt-get install --yes mono-complete mono-devel flite chromium aha ffmpeg alsa-utils tmux curl wget nano sudo install | |||
apt-get install --yes binutils cpp cpio dpkg-dev file gcc make patch dh-make debhelper devscripts fakeroot lintian aptly | |||
apt-get install --yes debian-policy developers-reference man-db debsigs debsigs debsig-verify manpages reportbug | |||
</syntaxhighlight> | |||
You can also try to install the mono-vbnc package. It may be missing from your system, which is ok since there is a helper script I created/package to download, build, and install it. | |||
<syntaxhighlight lang="shell"> | |||
apt-get install --yes mono-vbnc | |||
</syntaxhighlight> | |||
===Create GPG Public Key=== | |||
If you don't already have a GPG key to sign packages, you can generate one with: | |||
<syntaxhighlight lang="shell"> | |||
gpg --full-generate-key | |||
</syntaxhighlight> | |||
When prompted, choose options 9 and 1 to generate the key (should be the defaults). | |||
''Note that Redhat has a good walkthrough on generating new GPG keys and exporting the public part for distribution: https://www.redhat.com/en/blog/creating-gpg-keypairs'' | |||
Doing the steps above, this is the key that was generate to sign the HomeSeer Repak Github Repo (https://homeseer.digiflux.org). | |||
<syntaxhighlight lang="shell"> | |||
gpg --export --armor 888F492DFBCB1C4D4C5B6077FA324674BB6F3B03 > /etc/apt/keyrings/homeseer-key.asc | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="text"> | |||
-----BEGIN PGP PUBLIC KEY BLOCK----- | |||
mDMEaMZUcRYJKwYBBAHaRw8BAQdAi8/Bt66wmJKcj0d4RC3jj6hDQ3TIxj71tVys | |||
E1Tb9sG0SVN0YWN5IE9saXZhcyAoR1BHIEtleSBPbmx5IHRvIHNpZ24gSG9tZVNl | |||
ZXIgLmRlYiBmaWxlcykgPGtnN3FpbkBhcnJsLm5ldD6IlgQTFgoAPhYhBIiPSS37 | |||
yxxNTFtgd/oyRnS7bzsDBQJoxlRxAhsDBQkSzAMABQsJCAcCBhUKCQgLAgQWAgMB | |||
Ah4BAheAAAoJEPoyRnS7bzsDA74BAPSlHZ+tMbGlQBusMvtOMe7h7STtbK+STv7i | |||
3XkrgkyNAQD3EmK8zgFYWoAyATi+Fl19OUY8qsXtVMrXDSYvmZchAbg4BGjGVHES | |||
CisGAQQBl1UBBQEBB0AleQey27FKEkqEpAkLfcWrhGlwBNlgnyB5DNvSo43PZAMB | |||
CAeIfgQYFgoAJhYhBIiPSS37yxxNTFtgd/oyRnS7bzsDBQJoxlRxAhsMBQkSzAMA | |||
AAoJEPoyRnS7bzsDsBMA/RPZwHIIIjbhAwjCuFGMqG3YdU/dbm2K7nuJ5z3DKt40 | |||
AQCBtaXI5Lm/0WfRJcG4jEkbnOCipjZN+XWOGWs1XV38AQ== | |||
=A3Z+ | |||
-----END PGP PUBLIC KEY BLOCK----- | |||
</syntaxhighlight> | |||
===Add GPG public key to system APT keyring for testing=== | |||
<syntaxhighlight lang="shell"> | |||
gpg --yes -o /etc/apt/keyrings/homeseer-key.gpg --dearmor /etc/apt/keyrings/homeseer-key.asc | |||
rm /etc/apt/keyrings/homeseer-key.asc | |||
chown root:root /etc/apt/keyrings/homeseer-key.gpg | |||
chmod ugo+r /etc/apt/keyrings/homeseer-key.gpg | |||
chmod go-w /etc/apt/keyrings/homeseer-key.gpg | |||
</syntaxhighlight> | |||
===Add test repo to system for testing=== | |||
Note: You will do your initial testing with aptly serve. You can change this after setting up your public facing distribution point. | |||
Add create a file called '''''/etc/apt/sources.list.d/homeseer-repak.list''''': | |||
<syntaxhighlight lang="shell"> | |||
deb [signed-by=/etc/apt/keyrings/homeseer_key.gpg] http://<build machine IP>:8080/public stable main | |||
</syntaxhighlight> | |||
===Prepare build environment=== | |||
* I've downloaded the HS4 4.2.44.4 tarfile and exracted it to a directory called '''homeseer-4.2.22-4_all'''. The general format for a .deb package build directory is '''<program>-<version>_<architecture>'''. In this instance, the _all signifies that it is for both 32 and 64 bit systems. | |||
* Inside the homeseer-4.2.22-4_all directory I create the following directory structure: | |||
<syntaxhighlight lang="shell"> | |||
DEBIAN | |||
etc/systemd/system | |||
opt/HomeSeer | |||
</syntaxhighlight> | |||
* The DEBIAN directory hold the files needed to tell dpkg-deb how to build the .deb file. | |||
* The '''etc''' and '''opt''' directories contain the filestructure with the files to be extracted/installed on the target system when the .deb file is installed. In our case there is a systemd .service file in etc that is placed in '''/etc/systemd/system''' and HomeSeer is put in '''/opt/HomeSeer'''. | |||
====DEBIAN directory files==== | |||
Inside the DEBIAN directory resides 3 files: | |||
<syntaxhighlight lang="text"> | |||
control | |||
postinst | |||
prerm | |||
</syntaxhighlight> | |||
* '''''control''''' is the file that contains information for dpkg-deb to build the package file. In the case of the .deb we are building, the control file contains: | |||
<syntaxhighlight lang="text"> | |||
Package: homeseer | |||
Version: 4.2.22.4 | |||
Architecture: all | |||
Essential: no | |||
Maintainer: Only Packaged for Linux by kg7qin@arrl.net | |||
Depends: mono-complete,mono-devel,flite,aha,ffmpeg,alsa-utils,tmux,curl,wget,nano,sudo | |||
Recommends: chromium | |||
Section: misc | |||
Priority: optional | |||
Homepage: https://homeseer.digiflux.org | |||
Description: HomeSeer Home Automation Server (Linux Debian Package) | |||
</syntaxhighlight> | |||
* '''''postinst''''' is the script file that is run and contains any setup/items needed after the .deb file is installed. | |||
<syntaxhighlight lang="bash"> | |||
#!/bin/sh | |||
/usr/sbin/useradd -m homeseer | |||
/usr/sbin/usermod -a -G sudo homeseer | |||
/usr/sbin/usermod -a -G dialout homeseer | |||
echo "homeseer ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/homeseer | |||
/usr/bin/chown -R homeseer:homeseer /opt/HomeSeer | |||
/usr/bin/systemctl enable homeseer | |||
echo " " | |||
echo "HomeSeer install directory: /opt/HomeSeer" | |||
echo "Additional files located in /opt" | |||
echo " " | |||
echo "*******************************************" | |||
echo "* HomeSeer for Linux Setup Instructions *" | |||
echo "* ------------------------------------- *" | |||
echo "* For systems that do not have the *" | |||
echo "* mono-vbnc package, you will need to *" | |||
echo "* run the /opt/install-mono-basic.sh *" | |||
echo "* script to download, compile, and *" | |||
echo "* install this components of mono before *" | |||
echo "* you can start HomeSeer. *" | |||
echo "*******************************************" | |||
echo " " | |||
echo "* HomeSeer service installed" | |||
echo " " | |||
echo "Note: HomeSeer is run under the homeseer" | |||
echo "user instead of root and uses sudo." | |||
echo " " | |||
echo "Refer to the README and README-CEPSTRAL files" | |||
echo "located in /opt for more information." | |||
echo " " | |||
</syntaxhighlight> | |||
Note: The sudoers.d file should be more restrictive. This is the first iteration of this package and this was done to make it easier to test. Subsequent releases will have sudo locked down to specific commands to make it more secure. Adjust as necessary. | |||
* '''''prerm''''' is the script file that is run and contains any items needed before the .deb package is removed. | |||
<syntaxhighlight lang="bash"> | |||
#!/bin/sh | |||
echo "Uninstalling HomeSeer..." | |||
/usr/bin/systemctl disable homeseer | |||
/usr/bin/systemctl stop --force homeseer | |||
rm /etc/systemctl/system/homeseer.service | |||
/usr/bin/systemctl daemon-reload | |||
</syntaxhighlight> | |||
====etc directory files==== | |||
The /etc/systemd/system directory contains the homeseer.service file to allow homeseer to run as a service with systemd: | |||
<syntaxhighlight lang="text"> | |||
[Unit] | |||
Description=HomeSeer Server | |||
Documentation=https://homeseer.com | |||
After=network-online.target remote-fs.target time-sync.target | |||
Before=multi-user.target | |||
[Service] | |||
User=homeseer | |||
WorkingDirectory=/opt/HomeSeer | |||
ExecStart=/usr/bin/mono /opt/HomeSeer/HSConsole.exe --log | |||
SyslogIdentifier=HS4 | |||
StandardOutput=null | |||
StandardError=syslog | |||
Restart=on-failure | |||
RestartSec=30 | |||
KillMode=none | |||
TimeoutStopSec=60 | |||
ExecStop=/opt/HomeSeer/hsstop.sh | |||
AmbientCapabilities=CAP_NET_BIND_SERVICE | |||
[Install] | |||
WantedBy=multi-user.target | |||
</syntaxhighlight> | |||
====opt directory files==== | |||
* The HS4 Linux distrubution tarfile is extracted to /opt/HomeSeer. | |||
* This directory also contains other files such as the README, README-CEPSTRAL, client.conf, puseaudio.service, and install-mono-basic.sh. These are additional files distributed with this package for users to install the missing mono-basic package (mono-vbnc), provides general information on the package, and also how to setup the Cepstral voices for use with HomeSeer. | |||
===Building .deb package=== | |||
One you have all the files in the homeseer-4.2.22-4_all directory, you are then ready to build the .deb package file: | |||
<syntaxhighlight lang="bash"> | |||
dpkg-deb --build --root-owner-group homeseer-4.2.22-4_all | |||
</syntaxhighlight> | |||
If all goes well, you will have a .deb file called homeseer-4.2.22-4_all.deb created. | |||
===Creating .deb repo=== | |||
We use the aptly utility to create the .deb repo and package/sign our .deb file for distribution. | |||
====aptly configuration==== | |||
The defaults for aptly need to be changed to make it easier to publish the repo created. | |||
* Place the following configuration file in /etc/aptly.conf | |||
<syntaxhighlight lang="text"> | |||
# Aptly Configuration File | |||
########################### | |||
# vim: : filetype=yaml | |||
# aptly 1.6.0 supports yaml configuraiton files with inline documentation and examples. | |||
# Legacy json config files are still supported, and may be converted to yaml with `aptly config show -yaml` | |||
# Root directory for: | |||
# - downloaded packages (`rootDir`/pool) | |||
# - database (`rootDir`/db) | |||
# - published repositories (`rootDir`/public) | |||
root_dir: /srv/repos | |||
# Log Level | |||
# * debug | |||
# * info | |||
# * warning | |||
# * error | |||
log_level: info | |||
# Log Format | |||
# * default (text) | |||
# * json | |||
log_format: default | |||
# Number of attempts to open database if it's locked by other instance | |||
# * -1 (no retry) | |||
database_open_attempts: -1 | |||
# Default Architectures | |||
# empty list defaults to all available architectures | |||
architectures: | |||
# - amd64 | |||
# OBSOLETE | |||
# in aptly up to version 1.0.0, package files were stored in internal package pool | |||
# with MD5-dervied path, since 1.1.0 package pool layout was changed; | |||
# if option is enabled, aptly stops checking for legacy paths; | |||
# by default option is enabled for new aptly installations and disabled when | |||
# upgrading from older versions | |||
skip_legacy_pool: true | |||
# Dependency following | |||
####################### | |||
# Follow contents of `Suggests:` field when processing dependencies for the package | |||
dep_follow_suggests: false | |||
# Follow contents of `Recommends:` field when processing dependencies for the package | |||
dep_follow_recommends: false | |||
# When dependency looks like `package-a | package-b`, follow both variants always | |||
dep_follow_allvariants: false | |||
# Follow dependency from binary package to source package | |||
dep_follow_source: false | |||
# Log additional details while resolving dependencies (useful for debugging) | |||
dep_verbose_resolve: false | |||
# PPA | |||
###### | |||
# Specify paramaters for short PPA url expansion | |||
# empty defaults to output of `lsb_release` command | |||
ppa_distributor_id: ubuntu | |||
# Codename for short PPA url expansion | |||
ppa_codename: "" | |||
# Aptly Server | |||
############### | |||
# Serve published repos as well as API | |||
serve_in_api_mode: false | |||
# Enable metrics for Prometheus client | |||
enable_metrics_endpoint: false | |||
# Not implemented in this version. | |||
# Enable API documentation on /docs | |||
#enable_swagger_endpoint: false | |||
# OBSOLETE: use via url param ?_async=true | |||
async_api: false | |||
# Database | |||
########### | |||
# Database backend | |||
# Type must be one of: | |||
# * leveldb (default) | |||
# * etcd | |||
database_backend: | |||
type: leveldb | |||
# Path to leveldb files | |||
# empty dbPath defaults to `rootDir`/db | |||
db_path: "" | |||
# type: etcd | |||
# # URL to db server | |||
# url: "127.0.0.1:2379" | |||
# Mirroring | |||
############ | |||
# Downloader | |||
# * "default" | |||
# * "grab" (more robust) | |||
downloader: default | |||
# Number of parallel download threads to use when downloading packages | |||
download_concurrency: 4 | |||
# Limit in kbytes/sec on download speed while mirroring remote repositories | |||
download_limit: 0 | |||
# Number of retries for download attempts | |||
download_retries: 0 | |||
# Download source packages per default | |||
download_sourcepackages: false | |||
# Signing | |||
########## | |||
# GPG Provider | |||
# * "internal" (Go internal implementation) | |||
# * "gpg" (External `gpg` utility) | |||
gpg_provider: gpg | |||
# Disable signing of published repositories | |||
gpg_disable_sign: false | |||
# Disable signature verification of remote repositories | |||
gpg_disable_verify: false | |||
# Publishing | |||
############# | |||
# Do not publish Contents files | |||
skip_contents_publishing: false | |||
# Do not create bz2 files | |||
skip_bz2_publishing: false | |||
# Storage | |||
########## | |||
# Filesystem publishing endpoints | |||
# | |||
# aptly defaults to publish to a single publish directory under `rootDir`/public. For | |||
# a more advanced publishing strategy, you can define one or more filesystem endpoints in the | |||
# `FileSystemPublishEndpoints` list of the aptly configuration file. Each endpoint has a name | |||
# and the following associated settings. | |||
# | |||
# In order to publish to such an endpoint, specify the endpoint as `filesystem:endpoint-name` | |||
# with `endpoint-name` as the name given in the aptly configuration file. For example: | |||
# | |||
# `aptly publish snapshot wheezy-main filesystem:test1:wheezy/daily` | |||
# | |||
filesystem_publish_endpoints: | |||
# # Endpoint Name | |||
# test1: | |||
# # Directory for publishing | |||
# root_dir: /opt/srv/aptly_public | |||
# # File Link Method for linking files from the internal pool to the published directory | |||
# # * hardlink | |||
# # * symlink | |||
# # * copy | |||
# link_method: hardlink | |||
# # File Copare Method for comparing existing links from the internal pool to the published directory | |||
# # Only used when "linkMethod" is set to "copy" | |||
# # * md5 (default: compare md5 sum) | |||
# # * size (compare file size) | |||
# verify_method: md5 | |||
# S3 Endpoint Support | |||
# | |||
# cloud storage). First, publishing | |||
# endpoints should be described in aptly configuration file. Each endpoint has name | |||
# and associated settings. | |||
# | |||
# In order to publish to S3, specify endpoint as `s3:endpoint-name:` before | |||
# publishing prefix on the command line, e.g.: | |||
# | |||
# `aptly publish snapshot wheezy-main s3:test:` | |||
# | |||
s3_publish_endpoints: | |||
# # Endpoint Name | |||
# test: | |||
# # Amazon region for S3 bucket | |||
# region: us-east-1 | |||
# # Bucket name | |||
# bucket: test-bucket | |||
# # Prefix (optional) | |||
# # publishing under specified prefix in the bucket, defaults to | |||
# # no prefix (bucket root) | |||
# prefix: "" | |||
# # Default ACLs (optional) | |||
# # assign ACL to published files: | |||
# # * private (default, for use with apt S3 transport) | |||
# # * public-read (public repository) | |||
# # * none (don't set ACL) | |||
# acl: private | |||
# # Credentials (optional) | |||
# # Amazon credentials to access S3 bucket. If not supplied, environment variables | |||
# # `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_SESSION_TOKEN` are used | |||
# access_key_id: "" | |||
# secret_access_key: "" | |||
# session_token: "" | |||
# # Endpoint (optional) | |||
# # When using S3-compatible cloud storage, specify hostname of service endpoint here, | |||
# # region is ignored if endpoint is set (set region to some human-readable name) | |||
# # (should be left blank for real Amazon S3) | |||
# endpoint: "" | |||
# # Storage Class (optional) | |||
# # Amazon S3 storage class, defaults to `STANDARD`. Other values | |||
# # available: `REDUCED_REDUNDANCY` (lower price, lower redundancy) | |||
# storage_class: STANDARD | |||
# # Encryption Method (optional) | |||
# # Server-side encryption method, defaults to none. Currently | |||
# # the only available encryption method is `AES256` | |||
# encryption_method: "" | |||
# # Plus Workaround (optional) | |||
# # Workaround misbehavior in apt and Amazon S3 for files with `+` in filename by | |||
# # creating two copies of package files with `+` in filename: one original | |||
# # and another one with spaces instead of plus signs | |||
# # With `plusWorkaround` enabled, package files with plus sign | |||
# # would be stored twice. aptly might not cleanup files with spaces when published | |||
# # repository is dropped or updated (switched) to new version of repository (snapshot) | |||
# plus_workaround: false | |||
# # Disable MultiDel (optional) | |||
# # For S3-compatible cloud storages which do not support `MultiDel` S3 API, | |||
# # enable this setting (file deletion would be slower with this setting enabled) | |||
# disable_multidel: false | |||
# # Force Signature v2 (optional) | |||
# # Disable Signature V4 support, useful with non-AWS S3-compatible object stores | |||
# # which do not support SigV4, shouldn't be enabled for AWS | |||
# force_sigv2: false | |||
# # Force VirtualHosted Style (optional) | |||
# # Disable path style visit, useful with non-AWS S3-compatible object stores | |||
# # which only support virtual hosted style | |||
# force_virtualhosted_style: false | |||
# # Debug (optional) | |||
# # Enables detailed request/response dump for each S3 operation | |||
# debug: false | |||
# Swift Endpoint Support | |||
# | |||
# aptly can publish a repository directly to OpenStack Swift. | |||
# Each endpoint has name and associated settings. | |||
# | |||
# In order to publish to Swift, specify endpoint as `swift:endpoint-name:` before | |||
# publishing prefix on the command line, e.g.: | |||
# | |||
# `aptly publish snapshot jessie-main swift:test:` | |||
# | |||
swift_publish_endpoints: | |||
# # Endpoint Name | |||
# test: | |||
# # Container Name | |||
# container: taylor1 | |||
# # Prefix (optional) | |||
# # Publish under specified prefix in the container, defaults to no prefix (container root) | |||
# prefix: "" | |||
# # Credentials (optional) | |||
# # OpenStack credentials to access Keystone. If not supplied, environment variables `OS_USERNAME` and `OS_PASSWORD` are used | |||
# username: "" | |||
# password: "" | |||
# # Domain (optional) | |||
# # OpenStack domain | |||
# domain: "" | |||
# domain_id: "" | |||
# # Tenant (optional) | |||
# # OpenStack tenant (in order to use v2 authentication) | |||
# tenant: "" | |||
# tenant_id: "" | |||
# tenant_domain: "" | |||
# tenant_domain_id: "" | |||
# # Auth URL (optional) | |||
# # Full url of Keystone server (including port, and version). | |||
# # Example `http://identity.example.com:5000/v2.0` | |||
# auth_url: "" | |||
# Azure Endpoint Support | |||
# | |||
# aptly can be configured to publish repositories directly to Microsoft Azure Blob | |||
# Storage. First, publishing endpoints should be described in the aptly | |||
# configuration file. Each endpoint has its name and associated settings. | |||
azure_publish_endpoints: | |||
# # Endpoint Name | |||
# test: | |||
# # Container Name | |||
# container: container1 | |||
# # Prefix (optional) | |||
# # Publishing under specified prefix in the container, defaults to no prefix (container root) | |||
# prefix: "" | |||
# # Credentials | |||
# # Azure storage account access key to access blob storage | |||
# account_name: "" | |||
# account_key: "" | |||
# # Endpoint URL | |||
# # See: Azure documentation https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string | |||
# # defaults to "https://<accountName>.blob.core.windows.net" | |||
# endpoint: "" | |||
# Package Pool | |||
# | |||
# Location for storing downloaded packages | |||
# Type must be one of: | |||
# * local | |||
# * azure | |||
packagepool_storage: | |||
# Local Pool | |||
type: local | |||
# Local Pool Path | |||
# empty path defaults to `rootDir`/pool | |||
path: | |||
# # Azure Azure Blob Storage Pool | |||
# type: azure | |||
# # Container Name | |||
# container: pool1 | |||
# # Prefix (optional) | |||
# # Publishing under specified prefix in the container, defaults to no prefix (container root) | |||
# prefix: "" | |||
# # Credentials | |||
# # Azure storage account access key to access blob storage | |||
# account_name: "" | |||
# account_key: "" | |||
# # Endpoint URL | |||
# # See: Azure documentation https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string | |||
# # defaults to "https://<accountName>.blob.core.windows.net" | |||
# endpoint: " | |||
</syntaxhighlight> | |||
You make note of the location of the repo that is created by aptly and adjust as needed. We are creating our repo in /srv/repos. | |||
====Create repo==== | |||
Create the repository with the following aptly commands | |||
* Create the repo | |||
<syntaxhighlight lang="bash"> | |||
aptly repo create -distribution=stable -component=main binary-all | |||
</syntaxhighlight> | |||
* Add the .deb file we built to the repo | |||
<syntaxhighlight lang="bash"> | |||
aptly repo add binary-all homeseer-4.2.22-4_all.deb | |||
</syntaxhighlight> | |||
* Publish the .deb file we added to the repo (note you will be prompted for your GPG key's password) | |||
<syntaxhighlight lang="bash"> | |||
aptly publish repo -architectures="i386,amd64" binary-all | |||
</syntaxhighlight> | |||
===Finished product=== | |||
* When completed you will have your repository in the directory specified in your aptly.conf file. In our case it resides in /srv/repos | |||
<syntaxhighlight lang="text"> | |||
db | |||
pool | |||
public | |||
</syntaxhighlight> | |||
* '''''db''''' and '''''pool''''' are used by aptly to track the files added to the repo | |||
* '''''public''''' is the directory you will want to make available for public access. The '''''dists''''' and '''''pool''''' directory are where apt/apt-get will go to download files from your repo. When serving the contents of public, make sure the first directory of the repo is called public, otherwise you will need to alter your /etc/apt/sources.list.d file to contain the path of the .deb files in dists and pool. | |||
Congratulations! You have successfully created your first .deb repository. Now test out the installation of the .deb file and removal | |||
* Start test server | |||
<syntaxhighlight lang="bash"> | |||
aptly serve | |||
</syntaxhighlight> | |||
* Install the .deb file | |||
<syntaxhighlight lang="bash"> | |||
apt-get update | |||
apt-get install homeseer | |||
</syntaxhighlight> | |||
* Start the sytemd service | |||
<syntaxhighlight lang="bash"> | |||
systemctl start homeseer | |||
systemctl status homeseer | |||
</syntaxhighlight> | |||
* Attempt to login to the homeseer web interface -- it should prompt you for a username and password (default/default) | |||
* Ensure the HS4 registration/serial page is displayed | |||
* Uninstall the .deb file | |||
<syntaxhighlight lang="bash"> | |||
apt-get remove homeseer | |||
</syntaxhighlight> | |||
==Debian Packaging Tutorial by Gürkan Myczko== | ==Debian Packaging Tutorial by Gürkan Myczko== |