PDA

View Full Version : gpg: WARNING: unsafe permissions on homedir '/root/.gnupg'



dfear
2016-12-04, 22:57
Hi

I am trying to create a custom Kali live-cd with a few extra packages, some of which are not in the kali repos or available as a deb. The one piece of software that is causing the the most problems is: FreeFileSync. I can use it in the virtualbox image by downloading and extracting FreeFileSync_8.6_Debian_8.6_64-bit.tar.gz (which comes from the official website) and by installing downloading and installing libpng12-0_1.2.50-2+deb8u2_amd64.deb (which comes from the debian repo, but is manually downloaded).

In order to have this program included in my custom live-cd I have done the following:



wget http://*******.co.uk/freefilesync/FreeFileSync_8.6_Debian_8.6_64-bit.tar.gz
wget http://*******.co.uk/freefilesync/freefilesync-extra-files.tar.gz
tar zxvf FreeFileSync_8.6_Debian_8.6_64-bit.tar.gz

cd FreeFileSync
mkdir -p /root/live-build-config/kali-config/common/includes.chroot/usr/bin
mkdir -p /root/live-build-config/kali-config/common/includes.chroot/usr/share/doc/FreeFileSync
mkdir -p /root/live-build-config/kali-config/common/includes.chroot/usr/share/FreeFileSync/Help
mkdir -p /root/live-build-config/kali-config/common/includes.chroot/usr/share/FreeFileSync/Languages

cp -r -t /root/live-build-config/kali-config/common/includes.chroot/usr/share/doc/FreeFileSync/ ./CHANGELOG
cp -r -t /root/live-build-config/kali-config/common/includes.chroot/usr/share/FreeFileSync/ ./Help
cp -r -t /root/live-build-config/kali-config/common/includes.chroot/usr/share/doc/FreeFileSync/ ./LICENSE
cp -r -t /root/live-build-config/kali-config/common/includes.chroot/usr/share/FreeFileSync/ ./ding.wav
cp -r -t /root/live-build-config/kali-config/common/includes.chroot/usr/share/FreeFileSync/ ./gong.wav
cp -r -t /root/live-build-config/kali-config/common/includes.chroot/usr/share/FreeFileSync/ ./Languages
cp -r -t /root/live-build-config/kali-config/common/includes.chroot/usr/bin/ ./RealTimeSync
cp -r -t /root/live-build-config/kali-config/common/includes.chroot/usr/bin/ ./FreeFileSync
cp -r -t /root/live-build-config/kali-config/common/includes.chroot/usr/share/FreeFileSync/ ./harp.wav
cp -r -t /root/live-build-config/kali-config/common/includes.chroot/usr/share/FreeFileSync/ ./Resources.zip

cd ..
tar zxvf freefilesync-extra-files.tar.gz -C /root/live-build-config/kali-config/common/includes.chroot/
rm -rf FreeFileSync
rm -f FreeFileSync_8.6_Debian_8.6_64-bit.tar.gz freefilesync-extra-files.tar.gz


and I have copied it's dependency (libpng12-0_1.2.50-2+deb8u2_amd64.deb) to config/packages.chroot.

when in run the build.sh file
ex.
time ./build.sh --distribution kali-rolling --variant gnome.custom --verbose

it fails with the following error:



[2016-12-04 14:45:12] lb chroot_archives chroot install
P: Configuring file /etc/apt/sources.list
gpg: WARNING: unsafe permissions on homedir '/root/.gnupg'
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: agent_genkey failed: Inappropriate ioctl for device
gpg: key generation failed: Inappropriate ioctl for device
gpg: WARNING: unsafe permissions on homedir '/root/.gnupg'
gpg: no default secret key: No secret key
gpg: signing failed: No secret key
P: Begin unmounting filesystems...
P: Saving caches...
Reading package lists...
Building dependency tree...
Build of kali-rolling/gnome.custom/amd64 live image failed (see build.log for details)


Can anyone help?

dfear
2016-12-06, 16:18
I have managed to fix the error I was having. I am not sure what exactly caused the error or what exactly fixed the error, but the build script is now working.

I have done is comment out "debian-archive-keyring" from "kali.list.chroot" AND update all pending system updates.

Maybe one of the updated packages fixed the issue I was having with the build script and GPG/GNUPG.