Original link: Kylin KYLINIOS software warehouse construction 03-adding new version of software package to software warehouse
Hello, everyone, today I bring you article 03 on how to build a software warehouse for the Kirin desktop operating system – adding a new version of the software package to the software warehouse. This article mainly introduces how to add a new version of the software package to the software warehouse on the Kirin desktop operating system 2203- On the x86 version, in order to add a new version of the software package to the intranet software warehouse source, this series has three contents. Everyone is welcome to browse, share and forward. Follow me.
4. Add new versions of software packages to the software repository
Providing the linuxqq software installation package to the outside world as an example.
(1) Operations on the software warehouse server
1. Copy the .deb package to the pool directory
Execute command:
cp /var/cache/apt/archives/linuxqq_3.2.0-16605_amd64.deb /software/pool/main/ ll /software/pool/main/linuxqq_*
Output information:
root@pdsyw-xnc30:~# cp /var/cache/apt/archives/linuxqq_3.2.0-16605_amd64.deb /software/pool/main/ root@pdsyw-xnc30:~# ll /software/pool/main/linuxqq_* -rw-r--r-- 1 root root 124810416 November 1 13:37 /software/pool/main/linuxqq_3.1.2-13107_amd64.deb -rw-r--r-- 1 root root 127921412 November 1 13:53 /software/pool/main/linuxqq_3.2.0-16605_amd64.deb root@pdsyw-xnc30:~#
Output screenshot:
2. Generate Packages index file
Execute command:
cd /software/dists/x86-2203/main/binary-amd64/ rm -rf Packages* dpkg-scanpackages --multiversion ../../../../pool/main/ > Packages gzip -c Packages > Packages.gz
Output information:
root@pdsyw-xnc30:~# cd /software/dists/x86-2203/main/binary-amd64/ root@pdsyw-xnc30:/software/dists/x86-2203/main/binary-amd64# rm -rf Packages* root@pdsyw-xnc30:/software/dists/x86-2203/main/binary-amd64# dpkg-scanpackages --multiversion ../../../../pool/main/ > Packages dpkg-scanpackages: info: Wrote 30 entries to output Packages file. root@pdsyw-xnc30:/software/dists/x86-2203/main/binary-amd64# gzip -c Packages > Packages.gzroot@pdsyw-xnc30:/software/dists/x86-2203/main/binary-amd64#
Output screenshot:
3. Generate Release file
Execute command:
cd /software/dists/x86-2203 apt-ftparchive release . > Release vi Release Origin: 2203repo Label: 2203repo software Suite: stable Version: 1.0 Codename: x86-2203 Architectures: amd64 i386 Components: main Description: x86-2203 nginx deb
Output information:
root@pdsyw-xnc30:~# cd /software/dists/x86-2203 root@pdsyw-xnc30:/software/dists/x86-2203# rm -rf Release* root@pdsyw-xnc30:/software/dists/x86-2203# root@pdsyw-xnc30:/software/dists/x86-2203# apt-ftparchive release . > Release root@pdsyw-xnc30:/software/dists/x86-2203# vi Release root@pdsyw-xnc30:/software/dists/x86-2203# cat Release Origin: 2203repo Label: 2203repo software Suite: stable Version: 1.0 Codename: x86-2203 Architectures: amd64 i386 Components: main Description: x86-2203 nginx deb Date: Wed, 01 Nov 2023 05:44:19 + 0000 MD5Sum: 51b3204132c0216478acaa2075189bec 38 Release f91c271a83febfa3a5704ebe16d4f773 39936 main/binary-amd64/Packages fca30300cb802df40dcf91870b5fdc75 10669 main/binary-amd64/Packages.gz SHA1: ec11d4d90dcccdcffffd2cdcc5e159f8b6849668 38 Release dc4cc2e0c51b5354143f02726b37434411a1470b 39936 main/binary-amd64/Packages 74789cf5fd35cf9e077a28bbf614f949e0d9fd78 10669 main/binary-amd64/Packages.gz SHA256: db34c73eabacb4c6f2e261869818df41b5faef9e6abd57d5f62a57130b5c72df 38 Release e8eb88fd3e4865342449c01c2f59d2a913b61cdcecc487d7fa328db5f308c083 39936 main/binary-amd64/Packages 91476d1118a45543a70e1ba3acac2e6087c08c79cbec5c5cc623f46795598f0c 10669 main/binary-amd64/Packages.gz SHA512: 38 Release b098e82baa775a70a298c59e69c65e5e402ff2df579224f96296e588517578d4c87a026a13ce6f6ea9c7485464013778caba1f56e00484428f84f342f3ceaf23 399 36 main/binary-amd64/Packages 5ea86d77cd8fa81d3682f7d3c23bd60d8b9fec02cea5ee13c277ec14d405811b9c73336a6ac67bee3fad3e492d4175031af8984e0e5b9205ab2bdccd630db7e1 10669 main/ binary-amd64/Packages.gz root@pdsyw-xnc30:/software/dists/x86-2203#
Output screenshot:
4. Digitally sign Release files
Execute command:
gpg --output Release.gpg -ba Release
Output information:
root@pdsyw-xnc30:/software/dists/x86-2203# gpg --output Release.gpg -ba Release The file 'Release.gpg' already exists. Covered? (y/N) y root@pdsyw-xnc30:/software/dists/x86-2203#
Output screenshot:
(2) Operations on the terminal
1. Update software source list
Execute command:
apt update
Output information:
root@pdsyw-xnc30:~# apt update Ignore:1 http://192.168.0.247/software x86-2203 InRelease Get: 2 http://192.168.0.247/software x86-2203 Release [1,511 B] Get: 3 http://192.168.0.247/software x86-2203 Release.gpg [659 B] Get: 4 http://192.168.0.247/software x86-2203/main amd64 Packages [10.7 kB] Downloaded 12.8 kB, took 0 seconds (83.6 kB/s) Reading package list... Done Analyzing a package's dependency tree Reading status information... Complete All packages are up to date. root@pdsyw-xnc30:~#
Output screenshot:
2. Install linuxqq software for testing
Execute command:
apt install linuxqq
Output information:
root@pdsyw-xnc30:~# apt install linuxqq Reading package list... Done Analyzing a package's dependency tree Reading status information... Complete The following packages were installed automatically and are no longer needed: libyaml-cpp0.6 localechooser-data user-setup Use 'apt autoremove' to uninstall it(them). The following [new] packages will be installed: linuxqq 0 packages upgraded, 1 newly installed, 0 packages to uninstall, and 0 packages not upgraded. Requires download of 0 B/128 MB archive. After decompression, it consumes 437 MB of additional space. Selecting unselected package linuxqq. (Reading database... The system currently has a total of 193176 files and directories installed.) Prepare to decompress .../linuxqq_3.2.0-16605_amd64.deb ... Decompressing linuxqq (3.2.0-16605)... Setting up linuxqq (3.2.0-16605) ... Error in file "/usr/share/applications/kylin-installer.desktop": "application/vnd.debian.binary-package,application/octet-stream" is an invalid MIME type ("application/vnd .debian.binary-package,application/octet-stream" contains an invalid character in the subtype) Processing triggers for desktop-file-utils (0.24-1kylin2) ... Processing triggers for mime-support (3.64kylin1) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for bamfdaemon (0.5.3 + 18.04.20180207.2-0kylin2) ... Rebuilding /usr/share/applications/bamf-2.index... root@pdsyw-xnc30:~#
Output screenshot: