checkinstall build of ZNC fails with warnings about "cp: preserving times for [...]: No such file or directory" #3

Closed
opened 2026-10-05 03:52:34 +02:00 by adam · 4 comments
Owner

STEPS TO REPRODUCE:

  1. Clone the ZNC source. (Run autogen.sh if you lack a 'configure'.)
  2. Run ./configure in the znc source directory
  3. Run "checkinstall --install=no" inside the znc source directory

EXPECTED RESULTS: Checkinstall should complete successfully & spit out a deb
ACTUAL RESULTS: Checkinstall fails while buildling znc, with this message:

 cp -Rp ./webskins /usr/local/share/znc
 cp: preserving times for `/usr/local/share/znc/webskins/dark-clouds/pub': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins/dark-clouds/tmpl': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins/dark-clouds': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins/_default_/pub': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins/_default_/tmpl': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins/_default_': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins/forest/pub': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins/forest/tmpl': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins/forest': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins/ice/pub': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins/ice/tmpl': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins/ice': No such file or directory
 cp: preserving times for `/usr/local/share/znc/webskins': No such file or directory
 make: *** [install] Error 1
 
 ****  Installation failed. Aborting package creation.
_STEPS TO REPRODUCE:_ 1. Clone the ZNC source. (Run autogen.sh if you lack a 'configure'.) 2. Run ./configure in the znc source directory 3. Run "checkinstall --install=no" inside the znc source directory _EXPECTED RESULTS:_ Checkinstall should complete successfully & spit out a deb _ACTUAL RESULTS:_ Checkinstall fails while buildling znc, with this message: <pre> cp -Rp ./webskins /usr/local/share/znc cp: preserving times for `/usr/local/share/znc/webskins/dark-clouds/pub': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins/dark-clouds/tmpl': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins/dark-clouds': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins/_default_/pub': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins/_default_/tmpl': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins/_default_': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins/forest/pub': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins/forest/tmpl': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins/forest': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins/ice/pub': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins/ice/tmpl': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins/ice': No such file or directory cp: preserving times for `/usr/local/share/znc/webskins': No such file or directory make: *** [install] Error 1 **** Installation failed. Aborting package creation. </pre> <!-- github-sync-id:631643 -->
adam closed this issue 2026-10-05 03:52:34 +02:00
Author
Owner

http://dholbert.pastebin.mozilla.org/1106632

I'm a bit new to github, so I'm not sure what the best way is to attach a patch. So I've just included one inline, as it's pretty trivial. The following patch fixes the issue for me and lets checkinstall run to completion. (I've confirmed that the generated .deb is functional, too)

EDIT: Replaced patch with a pastebin, since github's whitespace formatting seems to destroy tabs, even in 'pre' regions

Patch available here: http://dholbert.pastebin.mozilla.org/1106632

Basically, the "p" in "cp -Rp" isn't useful here -- it tells cp to preserve the user & timestamp & mode. It's counterproductive to preserve the user, though, since the source's owner might very well be a normal system-user-account, whereas we want the system-installed versions to be owned by root. Meanwhile, the timestamp isn't worth preserving, and the mode should get preserved automatically without any special request needed. (not to mention that these files don't have any special modes that need preserving)

(I'm not 100% sure what about timestamp-preservation confuses checkinstall, but I'm guessing it's something about trying to do an extra operation on the just-copied file, and getting confused because the file ended up in a checkinstall-generated temporary directory rather than at its expected location.)

http://dholbert.pastebin.mozilla.org/1106632 I'm a bit new to github, so I'm not sure what the best way is to attach a patch. So I've just included one inline, as it's pretty trivial. The following patch fixes the issue for me and lets checkinstall run to completion. (I've confirmed that the generated .deb is functional, too) _EDIT: Replaced patch with a pastebin, since github's whitespace formatting seems to destroy tabs, even in 'pre' regions_ Patch available here: http://dholbert.pastebin.mozilla.org/1106632 Basically, the "p" in "cp -Rp" isn't useful here -- it tells cp to preserve the user & timestamp & mode. It's counterproductive to preserve the user, though, since the source's owner might very well be a normal system-user-account, whereas we want the system-installed versions to be owned by root. Meanwhile, the timestamp isn't worth preserving, and the mode should get preserved automatically without any special request needed. (not to mention that these files don't have any special modes that need preserving) (I'm not 100% sure what about timestamp-preservation confuses checkinstall, but I'm guessing it's something about trying to do an extra operation on the just-copied file, and getting confused because the file ended up in a checkinstall-generated temporary directory rather than at its expected location.) <!-- github-comment-id:814822 -->
Author
Owner

The usual way to attach a patch with github is to create your own clone of a repo, commit you changes there and then send a pull request.

The usual way to attach a patch with github is to create your own clone of a repo, commit you changes there and then send a pull request. <!-- github-comment-id:814862 -->
Author
Owner

Done -- here's the pull request: https://github.com/znc/znc/pull/14

Done -- here's the pull request: https://github.com/znc/znc/pull/14 <!-- github-comment-id:816466 -->
Author
Owner

Pulled that commit, thanks a lot

Pulled that commit, thanks a lot <!-- github-comment-id:817594 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#3