Importing the secret key like this used to work in up until gnupg 2.0.22:
$ gpg2 --import < admin_secure.asc
In newer versions, this fails with the following confusing messages:
gpg: key DFF515D9AD9B2D90/DFF515D9AD9B2D90: error sending to agent: Inappropriate ioctl for device gpg: error building skey array: Inappropriate ioctl for device gpg: error reading '[stdin]': Inappropriate ioctl for device gpg: import from '[stdin]' failed: Inappropriate ioctl for device
The simple workaround is to provide --batch, which passes the agent the information that the import should be unattended and will not attempt to ask for the passphrase on stdin. Other option is to use gpg --import admin_secure.asc, which will use the correct FD to ask for passphrase (at least in case of curses or tty pinentry).
Given that this worked before, would it be possible to capture this combination (secret key from stdin and no --batch) and warn user rather than failing with this cryptic message?