修改 deb 软件包

修改 deb 软件包

Acha
2023-09-25 / 0 评论 / 143 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2024年06月13日,已超过196天没有更新,若内容或图片失效,请留言反馈。

重新编译 deb

TIPS: 使用 src源 对应 os

1、添加 src 源

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
apt-get clean all
apt update

2、安装编译环境

apt-get  install  dpkg-dev devscripts build-essential

3、编译

# 创建 文件夹
mkdir nginx

cd nginx

# 下载源码包
apt-get source nginx

# 修改 源码、编译参数
...

# 提交修改
dpkg-buildpackage commit

# 编译
dpkg-buildpackage -us -uc
 # 清理
 dpkg-buildpackage -rfakeroot -Tclean
0

评论

博主关闭了当前页面的评论