Bug 12295 - Cannot create debugfs with logrotate
Summary: Cannot create debugfs with logrotate
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.2
Hardware: All Multiple
: Medium+ normal
Target Milestone: 2.2.3
Assignee: Armin Kuster
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-11-02 18:58 UTC by michalp
Modified: 2018-01-04 15:59 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
build log (39.37 KB, application/octet-stream)
2017-11-02 18:58 UTC, michalp
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description michalp 2017-11-02 18:58:53 UTC
Created attachment 4115 [details]
build log

Configuring conf/local.cont with the following:
  PACKAGE_CLASSES ?= "package_ipk"
  IMAGE_INSTALL_append = " logrotate"
  IMAGE_GEN_DEBUGFS = "1"
  IMAGE_FSTYPES_DEBUGFS = "tar.bz2"

results with debugfs creation error:

  ERROR: core-image-minimal-1.0-r0 do_rootfs: Cannot get the installed packages list. Command '/build/yoctoproject/build_morty/tmp/sysroots/x86_64-linux/usr/bin/opkg -f /build/yoctoproject/build_morty/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/opkg.conf -o /build/yoctoproject/build_morty/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs  --force_postinstall --prefer-arch-to-version status' returned 0 and stderr:
  Collected errors:
   * file_md5sum_alloc: Failed to open file /build/yoctoproject/build_morty/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs/var/lib/logrotate.status: No such file or directory.

  ERROR: core-image-minimal-1.0-r0 do_rootfs: Function failed: do_rootfs
  ERROR: Logfile of failure stored in: /build/yoctoproject/build_morty/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.13401
  ERROR: Task (/build/yoctoproject/poky/meta/recipes-core/images/core-image-minimal.bb:do_rootfs) failed with exit code '1'


Quick investigation shows the following:
- logrotate recipe touches /var/lib/logrotate.status file during installation
- Rootfs::_setup_dbg_rootfs() renames "rootfs" directory into "rootfs-orig" and copies original opkg database to the new "rootfs" directory so that later on OpkgPkgsList::list_pkgs() can get list of packages to install,
- opkg fails because of missing logrotate.status file.

This bug can well be an opkg issue (should it fail "status" call because of missing file?)
Comment 1 michalp 2017-11-02 19:03:12 UTC
Could be related to https://bugzilla.yoctoproject.org/show_bug.cgi?id=10761 (supposed to be fixed)
Comment 2 michalp 2017-11-02 20:21:17 UTC
I have just confirmed the patch 0aaaacdf4456fe832b1c3940997c097e7e94b9e6 against "opkg" (referred in Bug 10761) works fine.
Please back-port to yocto 2.2
Comment 3 Armin Kuster 2017-11-09 15:45:50 UTC
in stagging akuster/morty-next
Comment 4 Joshua Lock 2018-01-04 15:59:03 UTC
Patch in morty for 2.2.3 release