检查安装的 .deb 包未创建空目录

检查安装的 .deb 包未创建空目录

我正在尝试为我的 xymon-client 安装创建一个 .deb 包,但它没有创建用于日志和临时文件的空目录。

如果我跑步checkinstall -D make install或者checkinstall

然后

/# ls -l ~xymon/client
drwxr-xr-x 2 xymon root 4096 Dez 18 15:19 bin
drwxr-xr-x 2 xymon root 4096 Dez 18 15:19 etc
drwxr-xr-x 2 xymon root 4096 Dez 18 15:19 ext
drwxr-xr-x 2 xymon root 4096 Dez 18 15:19 logs
-rwxr-xr-x 1 xymon  500 3990 Fev 22  2009 runclient.sh
drwxr-xr-x 2 xymon root 4096 Dez 18 15:19 tmp

效果很好!

但如果checkinstall --install=no -D make installcheckinstall --install=nodpkg -i xymon_4.2.3-1_i386.deb

然后

/# ls -l ~xymon/client
drwxr-xr-x 2 xymon root 4096 Dez 18 15:19 bin
drwxr-xr-x 2 xymon root 4096 Dez 18 15:19 etc
-rwxr-xr-x 1 xymon  500 3990 Fev 22  2009 runclient.sh

我不知道运行checkinstall和之间的区别checkinstall -D make install,但它不会影响结果。

dpkg-deb -c xymon_4.2.3-1_i386.deb给我

drwxr-xr-x root/root         0 2014-12-18 15:19 ./
drwxr-xr-x root/root         0 2014-12-18 14:21 ./home/
drwxr-xr-x xymon/xymon       0 2014-12-18 15:19 ./home/xymon/
drwxr-xr-x xymon/root        0 2014-12-18 15:19 ./home/xymon/client/
-rwxr-xr-x xymon/500      3990 2009-02-22 07:35 ./home/xymon/client/runclient.sh
drwxr-xr-x xymon/root        0 2014-12-18 15:19 ./home/xymon/client/etc/
-rw-r--r-- xymon/root     1623 2014-12-18 15:19 ./home/xymon/client/etc/hobbitclient.cfg
-rw-r--r-- xymon/root     1343 2014-12-18 15:19 ./home/xymon/client/etc/clientlaunch.cfg
-rw-r--r-- xymon/root    20998 2014-12-18 15:19 ./home/xymon/client/etc/localclient.cfg
drwxr-xr-x xymon/root        0 2014-12-18 15:19 ./home/xymon/client/bin/
-rwxr-xr-x xymon/500      1904 2006-07-05 02:52 ./home/xymon/client/bin/hobbitclient-openbsd.sh
-rwxr-xr-x xymon/500      1972 2008-11-26 10:47 ./home/xymon/client/bin/hobbitclient-aix.sh
-rwxr-xr-x xymon/500      1701 2006-07-05 02:52 ./home/xymon/client/bin/hobbitclient-osf1.sh
-rwxr-xr-x xymon/root    50964 2014-12-18 14:22 ./home/xymon/client/bin/hobbitlaunch
-rwxr-xr-x xymon/500      1841 2006-08-02 10:35 ./home/xymon/client/bin/hobbitclient-sco_sv.sh
-rwxr-xr-x xymon/root    55080 2014-12-18 14:22 ./home/xymon/client/bin/orcahobbit
-rwxr-xr-x xymon/500      2528 2008-11-28 16:19 ./home/xymon/client/bin/hobbitclient-linux.sh
-rwxr-xr-x xymon/root    63212 2014-12-18 14:22 ./home/xymon/client/bin/bbdigest
-rwxr-xr-x xymon/root    55072 2014-12-18 14:22 ./home/xymon/client/bin/bb
-rwxr-xr-x xymon/500      1834 2006-07-05 02:52 ./home/xymon/client/bin/hobbitclient-irix.sh
-rwxr-xr-x xymon/root    59192 2014-12-18 14:22 ./home/xymon/client/bin/clientupdate
-rwxr-xr-x xymon/root    50988 2014-12-18 14:22 ./home/xymon/client/bin/msgcache
-rwxr-xr-x xymon/root    46828 2014-12-18 14:22 ./home/xymon/client/bin/bbcmd
-rwxr-xr-x xymon/500      2891 2006-07-06 06:07 ./home/xymon/client/bin/hobbitclient.sh
-rwxr-xr-x xymon/500      1907 2006-07-05 02:52 ./home/xymon/client/bin/hobbitclient-netbsd.sh
-rwxr-xr-x xymon/root    75572 2014-12-18 14:22 ./home/xymon/client/bin/logfetch
-rwxr-xr-x xymon/500      2039 2006-07-05 02:52 ./home/xymon/client/bin/hobbitclient-freebsd.sh
-rwxr-xr-x xymon/root    75680 2014-12-18 14:22 ./home/xymon/client/bin/bbhostgrep
-rwxr-xr-x xymon/500      2070 2006-07-05 02:52 ./home/xymon/client/bin/hobbitclient-hp-ux.sh
-rwxr-xr-x xymon/500      3033 2008-11-26 10:25 ./home/xymon/client/bin/hobbitclient-sunos.sh
-rwxr-xr-x xymon/root    42724 2014-12-18 14:22 ./home/xymon/client/bin/bbhostshow
-rwxr-xr-x xymon/500      1555 2008-11-26 10:47 ./home/xymon/client/bin/hobbitclient-darwin.sh
...

如您所见,deb 包不包含空目录...知道为什么吗?

答案1

我刚刚遇到了同样的问题,并发布了错误报告

作为一种解决方法,您可以使用安装后脚本来创建空目录(不知道是否可以使用相对目录)。这将包含在包中并在安装后运行。

cat << EOF > postinstall-pak
#! /bin/sh
mkdir #DIRECTORY#
EOF

相关内容