我们正在使用 dpkg-deb 为 war 文件和一些脚本创建一个简单的二进制包。
一个问题是,假设我们以名为“goofy”的本地用户身份执行此操作,那么包中的文件将归高飞所有。
当我们后来尝试以 root 身份安装这个包时,我们惊讶地发现它放在 /opt/ourpackage 中的文件仍然归 goofy 所有。
现在大多数人的机器上都不会存在愚蠢的用户,那么处理这个问题的最佳方法是什么?
我们假设有两种选择:
推荐什么方法?
如果答案是 2,是否有人可以将任何经过试验和测试的脚本添加到包中来执行此操作?
我们本来会选择选项 1,但由于将创建和构建包的“用户”是 jenkins,因此无法轻松创建由 root 拥有的文件,这一事实阻碍了这一点。
When we do:
# apt-get install mysql-server-5.6
Run Code Online (Sandbox Code Playgroud)
we get version 5.6.28. We have tested and certified our app with 5.6.19, and we cant even create the schema in 5.6.28 due to changes made in 5.6.20.
The question is, how to we install 5.6.19 on a server? We tried this:
# apt-get install mysql-server-5.6=5.6.19
Run Code Online (Sandbox Code Playgroud)
but this does not work, presumably there is some other version string we need such as "5.6.19_ubuntu_amd" or similar.
FYI, I am trying to replace 5.6.28. I …