[Share Experiences] deepin搭建本地软件源更新软件(deb打包简化搭建过程)
Tofloor
poster avatar
ThinkYoung
deepin
2022-06-30 18:14
Author

简化搭建过程直接打包deb了,安装即可:

deepinstore.source.list.deb

https://thinkyoung.lanzouw.com/iQS9i07zopuh 密码:dpkg


应用商店如果没能及时更新,自己下个最新deb包放在一起做个本地应用软件源(非系统镜像源)吧,

断网以及重装就能省去大量下载时间,岂不快哉?

根据https://blog.csdn.net/zweib730/article/details/50972365

简单粗暴的修改下脚本,本地配置做信任了,没做签名,比较简单粗暴

deb放在pool里,执行deepinstore.sh扫描deb生成索引

但是遇到的问题是:

1.有的个别deb包,例如lx-music-desktop不被扫描工具识别,不知道是包签名本身问题还是什么其他打包配置问题,

2.apt update 不提示新版本呀? apt install 安装倒是没问题

截图_2022-06-30_10-12-20.png

架设本地软件源



目录:
/home/packages/deepinstore
/home/packages/deepinstore/dists
/home/packages/deepinstore/pool
/home/packages/deepinstore/pool/deepinstore.sh
#http://deepin.store/pkg/deepin/pool/main/s/source/deepinstore.sh
/etc/apt/sources.list.d/deepinstore.list
# deb [trusted=yes] file:///home/packages/deepinstore stable deepinstore

deepinstore.sh

#!/bin/sh

# debian本地源
# 搜索
#suite:bullseye  apricot
#component="contrib main non-free"
#arch="amd64 i386 armhf armel"

SUITE="stable"
COMPONENT="deepinstore"
ARCH="amd64 i386"

sudo chmod 777 -R /home/packages/deepinstore
rm -rf /home/packages/deepinstore/dists/$SUITE



for arch in $ARCH
do
        for cc in $COMPONENT 
        do
		   mkdir -p dists/$SUITE/$cc/binary-$arch/binary-$arch/
                dpkg-scanpackages -a $arch pool/$cc > dists/$SUITE/$cc/binary-$arch/Packages
                gzip -9c dists/$SUITE/$cc/binary-$arch/Packages > dists/$SUITE/$cc/binary-$arch/Packages.gz
        done
done

#dpkg-scanpackages pool/main /dev/null | gzip -9c > dists/$SUITE/main/binary-amd64/Packages.gz
#dpkg-scanpackages pool/main /dev/null | gzip -9c > dists/$SUITE/main/binary-i386/Packages.gz


for cc in $COMPONENT
do
        mkdir -p dists/$SUITE/$cc/source/Sources
        dpkg-scansources pool/$cc > dists/$SUITE/$cc/source/Sources
        gzip -9c dists/$SUITE/$cc/source/Sources > dists/$SUITE/$cc/source/Sources.gz
done

# rm -f dists/$SUITE/Release
# rm -f dists/$SUITE/InRelease
# rm -f dists/$SUITE/Release.gpg
# apt-ftparchive -c /home/buildd/debian-dev/apt-release.cnf  release dists/$SUITE > .Release
# mv .Release dists/$SUITE/Release
# gpg --clearsign -o dists/$SUITE/InRelease dists/$SUITE/Release
# gpg -o dists/$SUITE/Release.gpg -abs dists/$SUITE/Release

#以上脚本用于生成Packages文件和Sources文件,并生成.gz压缩包;
#apt-ftparchive release时用到了上一步的apt-release.cnf配置文件,用于Release文件头部分信息的生成;
Reply Favorite View the author
All Replies
babyfengfjx
Super Moderator
CQA
2022-06-30 18:20
#1

@zeno 或许可以帮到忙?

Reply View the author
deepin-superuser
deepin
2022-06-30 23:05
#2

sudo apt update && sudo apt dist-upgrade

Reply View the author
ThinkYoung
deepin
2022-07-01 00:32
#3
deepin-superuser

sudo apt update && sudo apt dist-upgrade

感谢!

Reply View the author