* [gentoo-portage-dev] [PATCH 1/2] tmpfiles.eclass: allow EAPI 5 usage
@ 2017-12-31 15:22 Mike Gilbert
2017-12-31 15:22 ` [gentoo-portage-dev] [PATCH 2/2] sys-apps/portage: exclude /var/tmp/ccache from tmpfiles cleanup Mike Gilbert
0 siblings, 1 reply; 5+ messages in thread
From: Mike Gilbert @ 2017-12-31 15:22 UTC (permalink / raw
To: gentoo-portage-dev
---
eclass/tmpfiles.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass
index 2a158c482a58..e781037128f1 100644
--- a/eclass/tmpfiles.eclass
+++ b/eclass/tmpfiles.eclass
@@ -49,7 +49,7 @@ if [[ -z ${TMPFILES_ECLASS} ]]; then
TMPFILES_ECLASS=1
case "${EAPI}" in
-6) ;;
+5|6) ;;
*) die "API is undefined for EAPI ${EAPI}" ;;
esac
--
2.16.0.rc0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-portage-dev] [PATCH 2/2] sys-apps/portage: exclude /var/tmp/ccache from tmpfiles cleanup
2017-12-31 15:22 [gentoo-portage-dev] [PATCH 1/2] tmpfiles.eclass: allow EAPI 5 usage Mike Gilbert
@ 2017-12-31 15:22 ` Mike Gilbert
2018-01-01 23:23 ` Zac Medico
0 siblings, 1 reply; 5+ messages in thread
From: Mike Gilbert @ 2017-12-31 15:22 UTC (permalink / raw
To: gentoo-portage-dev
By default, systemd-tmpfiles removes files older than 30 days from /var/tmp.
The default portage config sets CCACHE_DIR=/var/tmp/ccache.
Bug: https://bugs.gentoo.org/490676#c14
Package-Manager: Portage-2.3.19_p3, Repoman-2.3.6_p37
---
sys-apps/portage/files/portage-ccache.conf | 2 ++
sys-apps/portage/portage-2.3.19.ebuild | 4 +++-
sys-apps/portage/portage-9999.ebuild | 4 +++-
3 files changed, 8 insertions(+), 2 deletions(-)
create mode 100644 sys-apps/portage/files/portage-ccache.conf
diff --git a/sys-apps/portage/files/portage-ccache.conf b/sys-apps/portage/files/portage-ccache.conf
new file mode 100644
index 000000000000..37857fde319b
--- /dev/null
+++ b/sys-apps/portage/files/portage-ccache.conf
@@ -0,0 +1,2 @@
+# Prevent ccache files from being cleaned
+x /var/tmp/ccache
diff --git a/sys-apps/portage/portage-2.3.19.ebuild b/sys-apps/portage/portage-2.3.19.ebuild
index b4f03d91d2de..1c78b4a699f7 100644
--- a/sys-apps/portage/portage-2.3.19.ebuild
+++ b/sys-apps/portage/portage-2.3.19.ebuild
@@ -10,7 +10,7 @@ PYTHON_COMPAT=(
)
PYTHON_REQ_USE='bzip2(+),threads(+)'
-inherit distutils-r1
+inherit distutils-r1 tmpfiles
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
@@ -203,6 +203,8 @@ python_install_all() {
esetup.py "${targets[@]}"
fi
+ dotmpfiles "${FILESDIR}"/portage-ccache.conf
+
# Due to distutils/python-exec limitations
# these must be installed to /usr/bin.
local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
diff --git a/sys-apps/portage/portage-9999.ebuild b/sys-apps/portage/portage-9999.ebuild
index adb4f2b5bde8..e025371418af 100644
--- a/sys-apps/portage/portage-9999.ebuild
+++ b/sys-apps/portage/portage-9999.ebuild
@@ -10,7 +10,7 @@ PYTHON_COMPAT=(
)
PYTHON_REQ_USE='bzip2(+),threads(+)'
-inherit distutils-r1 git-r3
+inherit distutils-r1 git-r3 tmpfiles
DESCRIPTION="Portage is the package management and distribution system for Gentoo"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
@@ -202,6 +202,8 @@ python_install_all() {
esetup.py "${targets[@]}"
fi
+ dotmpfiles "${FILESDIR}"/portage-ccache.conf
+
# Due to distutils/python-exec limitations
# they must be installed to /usr/bin.
local sbin_relocations='archive-conf dispatch-conf emaint env-update etc-update fixpackages regenworld'
--
2.16.0.rc0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 2/2] sys-apps/portage: exclude /var/tmp/ccache from tmpfiles cleanup
2017-12-31 15:22 ` [gentoo-portage-dev] [PATCH 2/2] sys-apps/portage: exclude /var/tmp/ccache from tmpfiles cleanup Mike Gilbert
@ 2018-01-01 23:23 ` Zac Medico
2018-01-02 1:00 ` Mike Gilbert
0 siblings, 1 reply; 5+ messages in thread
From: Zac Medico @ 2018-01-01 23:23 UTC (permalink / raw
To: gentoo-portage-dev, Mike Gilbert
[-- Attachment #1.1: Type: text/plain, Size: 680 bytes --]
On 12/31/2017 07:22 AM, Mike Gilbert wrote:
> By default, systemd-tmpfiles removes files older than 30 days from /var/tmp.
> The default portage config sets CCACHE_DIR=/var/tmp/ccache.
>
> Bug: https://bugs.gentoo.org/490676#c14
> Package-Manager: Portage-2.3.19_p3, Repoman-2.3.6_p37
> ---
> sys-apps/portage/files/portage-ccache.conf | 2 ++
> sys-apps/portage/portage-2.3.19.ebuild | 4 +++-
> sys-apps/portage/portage-9999.ebuild | 4 +++-
> 3 files changed, 8 insertions(+), 2 deletions(-)
> create mode 100644 sys-apps/portage/files/portage-ccache.conf
Looks good. Maybe we should also call tmpfiles_process in pkg_postinst?
--
Thanks,
Zac
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 224 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 2/2] sys-apps/portage: exclude /var/tmp/ccache from tmpfiles cleanup
2018-01-01 23:23 ` Zac Medico
@ 2018-01-02 1:00 ` Mike Gilbert
2018-01-02 1:29 ` Zac Medico
0 siblings, 1 reply; 5+ messages in thread
From: Mike Gilbert @ 2018-01-02 1:00 UTC (permalink / raw
To: gentoo-portage-dev
On Mon, Jan 1, 2018 at 6:23 PM, Zac Medico <zmedico@gentoo.org> wrote:
> On 12/31/2017 07:22 AM, Mike Gilbert wrote:
>> By default, systemd-tmpfiles removes files older than 30 days from /var/tmp.
>> The default portage config sets CCACHE_DIR=/var/tmp/ccache.
>>
>> Bug: https://bugs.gentoo.org/490676#c14
>> Package-Manager: Portage-2.3.19_p3, Repoman-2.3.6_p37
>> ---
>> sys-apps/portage/files/portage-ccache.conf | 2 ++
>> sys-apps/portage/portage-2.3.19.ebuild | 4 +++-
>> sys-apps/portage/portage-9999.ebuild | 4 +++-
>> 3 files changed, 8 insertions(+), 2 deletions(-)
>> create mode 100644 sys-apps/portage/files/portage-ccache.conf
>
> Looks good. Maybe we should also call tmpfiles_process in pkg_postinst?
Calling tmpfiles_process is only relevant for tmpfiles.d snippets that
create files/directories, which normally only happens on system
startup.
This one prevents files/directories from being removed during the
recurring "clean" job, which runs once every 24 hours on systemd.
OpenRC systems have no such process.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-portage-dev] [PATCH 2/2] sys-apps/portage: exclude /var/tmp/ccache from tmpfiles cleanup
2018-01-02 1:00 ` Mike Gilbert
@ 2018-01-02 1:29 ` Zac Medico
0 siblings, 0 replies; 5+ messages in thread
From: Zac Medico @ 2018-01-02 1:29 UTC (permalink / raw
To: gentoo-portage-dev, Mike Gilbert
[-- Attachment #1.1: Type: text/plain, Size: 1258 bytes --]
On 01/01/2018 05:00 PM, Mike Gilbert wrote:
> On Mon, Jan 1, 2018 at 6:23 PM, Zac Medico <zmedico@gentoo.org> wrote:
>> On 12/31/2017 07:22 AM, Mike Gilbert wrote:
>>> By default, systemd-tmpfiles removes files older than 30 days from /var/tmp.
>>> The default portage config sets CCACHE_DIR=/var/tmp/ccache.
>>>
>>> Bug: https://bugs.gentoo.org/490676#c14
>>> Package-Manager: Portage-2.3.19_p3, Repoman-2.3.6_p37
>>> ---
>>> sys-apps/portage/files/portage-ccache.conf | 2 ++
>>> sys-apps/portage/portage-2.3.19.ebuild | 4 +++-
>>> sys-apps/portage/portage-9999.ebuild | 4 +++-
>>> 3 files changed, 8 insertions(+), 2 deletions(-)
>>> create mode 100644 sys-apps/portage/files/portage-ccache.conf
>>
>> Looks good. Maybe we should also call tmpfiles_process in pkg_postinst?
>
> Calling tmpfiles_process is only relevant for tmpfiles.d snippets that
> create files/directories, which normally only happens on system
> startup.
>
> This one prevents files/directories from being removed during the
> recurring "clean" job, which runs once every 24 hours on systemd.
> OpenRC systems have no such process.
Ok, thanks for the explanation. The patches look good. Please go ahead
and apply them.
--
Thanks,
Zac
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 224 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-02 1:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-31 15:22 [gentoo-portage-dev] [PATCH 1/2] tmpfiles.eclass: allow EAPI 5 usage Mike Gilbert
2017-12-31 15:22 ` [gentoo-portage-dev] [PATCH 2/2] sys-apps/portage: exclude /var/tmp/ccache from tmpfiles cleanup Mike Gilbert
2018-01-01 23:23 ` Zac Medico
2018-01-02 1:00 ` Mike Gilbert
2018-01-02 1:29 ` Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox