Trucrux Inc

Package.gz for OTA update on apache server

Create Debian Package #

Debian package for binary files

Add repository’s public key on PC host:

DOWNLOAD KEY FILE TO PC HOST WHICH IS GIVEN BELOW AND RUN BELOW COMMAND FROM DOWNLOADED FOLDER:

$ sudo apt-key add keyFile

To check if key is added or not run below command: #

$ apt-key list

above command give result as below:

pub 4096R/A282B7A5 2018-01-05
uid repository

Sign the created helloworld.deb with attached keyFile using below command: #

$ sudo dpkg-sig --sign builder file1.deb

After signing deb package, copy it to the local server folder(i.e inside /var/www/html/debs/amd64)

$ sudo cp helloworld.deb /var/www/html/debs/amd64/

Go to the local server folder as given below #

$ cd /var/www/html/debs/

Now run following command to create Package.gz for deb packages inside amd64 folder #

$ sudo chown user:user -R .

$ dpkg-scanpackages amd64 | gzip -9c > amd64/Packages.gz