Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 632586 - sys-cluster/util-vserver-0.30.216_pre3120 : installs into paths that should be created at runtime
Summary: sys-cluster/util-vserver-0.30.216_pre3120 : installs into paths that should b...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal QA with 1 vote (vote)
Assignee: Patrice Clement
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-30 21:48 UTC by Toralf Förster
Modified: 2019-02-20 07:57 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Remove runtime install paths (util-vserver-install-paths.patch,2.21 KB, patch)
2019-02-19 11:12 UTC, Sandino Araico Sanchez
Details | Diff
Ebuild with runtime paths patch (util-vserver-0.30.216_pre3120-r3.ebuild,2.67 KB, text/plain)
2019-02-19 11:17 UTC, Sandino Araico Sanchez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-09-30 21:48:47 UTC
QA: other
QA Notice: This ebuild installs into paths that should be created at runtime.
 To fix, simply do not install into these directories.  Instead, your package
 should create dirs on the fly at runtime as needed via init scripts/etc...

  var/cache
  var/cache/vservers
  var/cache/vservers/.keep_sys-cluster_util-vserver-0  var/run
  var/run/vshelper
  var/run/vservers.rev
  var/run/vservers
QA Notice: #!/sbin/runscript is deprecated, use #!/sbin/openrc-run instead:
   //etc/init.d/util-vserver
QA Notice: #!/sbin/runscript is deprecated, use #!/sbin/openrc-run instead:
   //etc/init.d/vprocunhide
QA Notice: #!/sbin/runscript is deprecated, use #!/sbin/openrc-run instead:
   //etc/init.d/vservers.default
QA Notice: Package triggers severe warnings which indicate that it
           may exhibit random runtime failures.
src/vcontext.c:324:6: warning: implicit declaration of function ‘pivot_root’ [-Wimplicit-function-declaration]
Please do not file a Gentoo bug and instead report the above QA
issues directly to the upstream developers of this software.
Homepage: http://www.nongnu.org/util-vserver/

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 13.0-desktop-plasma-systemd_libressl_20170927-191034

  -------------------------------------------------------------------
Comment 1 Sandino Araico Sanchez 2019-02-19 10:20:12 UTC
These directories are created by the util-vserver init script so they might be safely deleted in src_install()

  var/run/vshelper
  var/run/vservers.rev
  var/run/vservers

Directory /var/cache/vservers might also be created by the util-vserver init script in function create_dirs()

About pivot_root I think it's desired functionality but we should better ask upstream.
Comment 2 Sandino Araico Sanchez 2019-02-19 11:12:38 UTC
Created attachment 565846 [details, diff]
Remove runtime install paths

This patch removes runtime paths in src_install(). 
Runtime paths are created by util-vserver init script.
Comment 3 Sandino Araico Sanchez 2019-02-19 11:17:49 UTC
Created attachment 565848 [details]
Ebuild with runtime paths patch

this ebuild applies the attached runtime paths patch and other patch from bug  650578.
You can get the other patch (dietlibc) from attachment 565832 [details]
Comment 4 Sandino Araico Sanchez 2019-02-19 11:37:05 UTC
Ebuild for 0.30.216_pre3131 in attachment 565852 [details] with dietlibc patch in attachment 565834 [details, diff]
Comment 5 Larry the Git Cow gentoo-dev 2019-02-19 22:52:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a838aa7a0762719f9aae0aa46568ac802dc90f9

commit 3a838aa7a0762719f9aae0aa46568ac802dc90f9
Author:     Patrice Clement <monsieurp@gentoo.org>
AuthorDate: 2019-02-19 22:48:11 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2019-02-19 22:48:11 +0000

    sys-cluster/util-vserver: create needed runtime directories.
    
    Closes: https://bugs.gentoo.org/632586
    Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../util-vserver/util-vserver-0.30.216_pre3120-r1.ebuild      | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
Comment 6 Sandino Araico Sanchez 2019-02-20 01:18:57 UTC
Last commit missing this patch. 
Need to add $_MKDIR -p "$__PKGCACHEDIR" to function create_dirs()

 
diff -puriN util-vserver-0.30.216-pre3131.orig/scripts/vserver-init.functions util-vserver-0.30.216-pre3131/scripts/vserver-init.functions
--- util-vserver-0.30.216-pre3131.orig/scripts/vserver-init.functions	2018-01-14 06:26:26.000000000 -0600
+++ util-vserver-0.30.216-pre3131/scripts/vserver-init.functions	2019-02-19 04:21:14.000000000 -0600
@@ -80,7 +80,7 @@ function kill_contexts()
 
 function create_dirs()
 {
-    $_MKDIR -p "$__RUNDIR" && $_MKDIR -p "$__VSHELPERSTATEDIR" && $_MKDIR -p `$_READLINK "$__PKGSTATEREVDIR"`
+    $_MKDIR -p "$__RUNDIR" && $_MKDIR -p "$__VSHELPERSTATEDIR" && $_MKDIR -p "$__PKGCACHEDIR" && $_MKDIR -p `$_READLINK "$__PKGSTATEREVDIR"`
 }
 
 function mount_cgroup()
Comment 7 Larry the Git Cow gentoo-dev 2019-02-20 07:57:32 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee09b60d21a7950cc42135247d2840a3287f6c10

commit ee09b60d21a7950cc42135247d2840a3287f6c10
Author:     Patrice Clement <monsieurp@gentoo.org>
AuthorDate: 2019-02-20 07:57:12 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2019-02-20 07:57:24 +0000

    sys-cluster/util-vserver: add missing patch.
    
    Bug: https://bugs.gentoo.org/632586
    Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 ...util-vserver-0.30.216_pre3120-vserver-init-functions.patch | 11 +++++++++++
 .../util-vserver/util-vserver-0.30.216_pre3120-r1.ebuild      |  4 ++++
 2 files changed, 15 insertions(+)