Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 442020 - sys-apps/openrc-0.11.4: double slash in initscript symlinks
Summary: sys-apps/openrc-0.11.4: double slash in initscript symlinks
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 439098
  Show dependency tree
 
Reported: 2012-11-06 11:07 UTC by Alexander Tsoy
Modified: 2012-11-07 19:11 UTC (History)
1 user (show)

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


Attachments
openrc-0.11.4.ebuild.patch (openrc-0.11.4.ebuild.patch,1.07 KB, patch)
2012-11-06 11:08 UTC, Alexander Tsoy
Details | Diff
openrc-0.11.4.ebuild.patch (openrc-0.11.4.ebuild.patch,483 bytes, patch)
2012-11-06 11:19 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2012-11-06 11:07:18 UTC
After upgrade from openrc-0.10* to openrc-0.11.4 this symlinks got created:

$ ls -l /etc/runlevels/*/ | grep '//'
lrwxrwxrwx 1 root root 27 нояб.  6 12:28 tmpfiles.setup -> //etc/init.d/tmpfiles.setup
lrwxrwxrwx 1 root root 18 нояб.  6 12:27 sysfs -> //etc/init.d/sysfs

Reproducible: Always
Comment 1 Alexander Tsoy 2012-11-06 11:08:05 UTC
Created attachment 328534 [details, diff]
openrc-0.11.4.ebuild.patch

This patch should fix this.
Comment 2 Alexander Tsoy 2012-11-06 11:19:14 UTC
Created attachment 328536 [details, diff]
openrc-0.11.4.ebuild.patch
Comment 3 Arfrever Frehtes Taifersar Arahesis 2012-11-07 02:29:13 UTC
(In reply to comment #2)

${D}, ${ED}, ${ROOT} and ${EROOT} are guaranteed by PMS to always end with "/", so ebuild can use:

ln -snf "${EROOT}"etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
Comment 4 William Hubbs gentoo-dev 2012-11-07 15:18:37 UTC
This is fixed in thelive ebuild. Based on the information in comment #3,
I did not use the patch in Comment #2.
Comment 5 Arfrever Frehtes Taifersar Arahesis 2012-11-07 19:11:05 UTC
You can also remove slashes in the following lines:

$ grep -E '\${E?(D|ROOT)}"?/' openrc-9999.ebuild
        local file="${ED}/$1" var=$2 val com
        #mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die
        cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die
        rm -rf "${ED}"/etc/runlevels
                rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont
        [[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \
                cp "${EROOT}"etc/conf.d/net "${ED}"/etc/conf.d/
        if [[ -e ${EROOT}etc/conf.d/clock && ! -e ${EROOT}/etc/timezone ]] ; then
        for f in $(cd "${ED}"/usr/share/${PN}/runlevels/boot || exit; echo *) ; do
                [[ -e "${EROOT}"etc/conf.d/rc ]] && source "${EROOT}"/etc/conf.d/rc
                                ' "${f}" >> "${ED}"/etc/conf.d/modules
        [[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u