diff mbox series

[bug#49729,core-updates] build-system/gnu: Make gzip files writable before resetting timestamps.

Message ID f45aa05904dcb0cb8718be3d32d9bae9807ed8c0.1627193346.git.iskarian@mgsn.dev
State New
Headers show
Series [bug#49729,core-updates] build-system/gnu: Make gzip files writable before resetting timestamps. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Sarah Morgensen July 25, 2021, 6:12 a.m. UTC
guix/build/gnu-build-system.scm (reset-gzip-timestamps): Ensure gzip
files are writable before resetting their timestamps.
---
Hello Guix,

There have been a number of instances of packages having to add their own phase
before 'reset-gzip-timestamps to make the gzip files writable--perhaps the gnu
build system can take care of this itself? WDYT?

--
Sarah
 guix/build/gnu-build-system.scm | 2 ++
 1 file changed, 2 insertions(+)


base-commit: 7bef3be1d318beebaf48ac6daa3140205ba18e98

Comments

M July 25, 2021, 3:26 p.m. UTC | #1
[CC'ing Ludo because Ludo introduced the 'reset-gzip-timestamps' phase]
Sarah Morgensen schreef op za 24-07-2021 om 23:12 [-0700]:
> guix/build/gnu-build-system.scm (reset-gzip-timestamps): Ensure gzip
> files are writable before resetting their timestamps.
> ---
> Hello Guix,
> 
> There have been a number of instances of packages having to add their own phase
> before 'reset-gzip-timestamps to make the gzip files writable--perhaps the gnu
> build system can take care of this itself? WDYT?

This seems reasonable to me.  There are 35 package definions referring to
'reset-gzip-timestamps', could you follow up with patches removing the phases
for making gzip files writable?

Greetings,
Maxime.
Sarah Morgensen July 25, 2021, 8:45 p.m. UTC | #2
Hi,

Thanks for taking a look at this.

Maxime Devos <maximedevos@telenet.be> writes:

> [CC'ing Ludo because Ludo introduced the 'reset-gzip-timestamps' phase]
> Sarah Morgensen schreef op za 24-07-2021 om 23:12 [-0700]:
>> guix/build/gnu-build-system.scm (reset-gzip-timestamps): Ensure gzip
>> files are writable before resetting their timestamps.
>> ---
>> Hello Guix,
>> 
>> There have been a number of instances of packages having to add their own phase
>> before 'reset-gzip-timestamps to make the gzip files writable--perhaps the gnu
>> build system can take care of this itself? WDYT?
>
> This seems reasonable to me.  There are 35 package definions referring to
> 'reset-gzip-timestamps', could you follow up with patches removing the phases
> for making gzip files writable?

Yes, I intend to. Should I send them to this issue #, or separately?
(And one commit per package, yes?)

--
Sarah
M July 26, 2021, 8:49 p.m. UTC | #3
Hi,

> > This seems reasonable to me.  There are 35 package definions referring to
> > 'reset-gzip-timestamps', could you follow up with patches removing the phases
> > for making gzip files writable?
> 
> Yes, I intend to. Should I send them to this issue #, or separately?

Personally, I'd send them to this issue # (easier to test whether this patch
works that way).

> (And one commit per package, yes?)
Indeed!

Greetings,
Maxime.
Sarah Morgensen July 27, 2021, 2:16 a.m. UTC | #4
This follow-up series removes phases some packages added to specifically make
gzip files writable before the 'reset-gzip-timestamps phase. For cpuid, it
removes a similar file permissions tweak to the Makefile.

After this patchset, there are only 7 other packages which reference
'reset-gzip-timestamps', and they delete the 'reset-gzip-timestamps phase. Upon
inspection, I think all should remain unaltered. They have gzip files present
in their sources which should be preserved in their output, and (as far as I
can tell) they do not generate any gzip files or man pages (which would then be
gzipped). For reference, they are:

texlive-pstricks
texlive-xypic
texlive-cm-super
julia-fileio
go-github-com-go-git-go-git-fixtures
cl-uffi
cl-dexador

--
Sarah Morgensen (20):
  gnu: python-biom-format: Remove obsolete phase.
  gnu: clipper: Remove obsolete phase.
  gnu: khmer: Remove obsolete phase.
  gnu: cups-minimal: Remove obsolete phase.
  gnu: emacs: Remove obsolete phase.
  gnu: po4a: Remove obsolete phase.
  gnu: go-golang-org-x-crypto: Remove obsolete phase.
  gnu: go-github-com-docker-distribution: Remove obsolete phase.
  gnu: go-github-com-gdamore-tcell: Remove obsolete phase.
  gnu: python-plotly: Remove obsolete phase.
  gnu: go-ipfs: Remove obsolete phase.
  gnu: python-scikit-learn: Remove obsolete phase.
  gnu: jalv-select: Remove obsolete phase.
  gnu: lmms: Remove obsolete phase.
  gnu: helm: Remove obsolete phase.
  gnu: arcanist: Remove obsolete phase.
  gnu: python-pdfminer-six: Remove obsolete phase.
  gnu: go-github-com-prometheus-common: Remove obsolete phase.
  gnu: pre-commit: Remove obsolete phase.
  gnu: cpuid: Remove obsolete file permissions change.

 gnu/packages/bioinformatics.scm   | 31 ++-------------------------
 gnu/packages/cups.scm             |  9 --------
 gnu/packages/emacs.scm            | 11 +---------
 gnu/packages/gettext.scm          |  7 -------
 gnu/packages/golang.scm           | 35 +++----------------------------
 gnu/packages/graph.scm            |  9 +-------
 gnu/packages/ipfs.scm             | 11 +---------
 gnu/packages/linux.scm            |  7 +------
 gnu/packages/machine-learning.scm | 10 +--------
 gnu/packages/music.scm            | 27 ++----------------------
 gnu/packages/phabricator.scm      |  8 +------
 gnu/packages/python-xyz.scm       |  8 +------
 gnu/packages/syncthing.scm        |  9 --------
 gnu/packages/version-control.scm  |  9 +-------
 14 files changed, 15 insertions(+), 176 deletions(-)


base-commit: e2690a8eb2df2cfc24bd84454dbfe092a6bf5139
prerequisite-patch-id: 89dd022dfbf4b935c4b8ba4002df7995d7a664e1
Sarah Morgensen July 28, 2021, 1:21 a.m. UTC | #5
Hello again,

Maxime Devos <maximedevos@telenet.be> writes:

> Hi,
>
>> > This seems reasonable to me.  There are 35 package definions referring to
>> > 'reset-gzip-timestamps', could you follow up with patches removing the phases
>> > for making gzip files writable?
>> 
>> Yes, I intend to. Should I send them to this issue #, or separately?
>
> Personally, I'd send them to this issue # (easier to test whether this patch
> works that way).

I've sent a followup patchset; I only found 27 package definitions
referring to 'reset-gzip-timestamps', 7 of which delete the phase for
other reasons, as I've detailed in the cover letter. It's possible some
of these could be unnecessary after this change, but I'm not familiar
enough with the packages to tell.

>
>> (And one commit per package, yes?)
> Indeed!
>
> Greetings,
> Maxime.

--
Sarah
Attila Lendvai Oct. 26, 2021, 1:14 p.m. UTC | #6
i'm working on the golang importer (testing it on go-ethereum), and i see multiple packages in its output that have this issue.

any ETA when this will reach master?

- attila
PGP: 5D5F 45C7 DFCD 0A39
Maxim Cournoyer Dec. 24, 2021, 5:51 a.m. UTC | #7
Hello,

Attila Lendvai <attila@lendvai.name> writes:

> i'm working on the golang importer (testing it on go-ethereum), and i see multiple packages in its output that have this issue.
>
> any ETA when this will reach master?
>
> - attila
> PGP: 5D5F 45C7 DFCD 0A39

I've merged this to my local version-1.4.0 branch that I'll push
shortly, and if everything goes fine it should reach master in about a
week or so.

Thanks,

Maxim
Maxim Cournoyer Jan. 17, 2022, 5:09 p.m. UTC | #8
Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> Hello,
>
> Attila Lendvai <attila@lendvai.name> writes:
>
>> i'm working on the golang importer (testing it on go-ethereum), and
>> i see multiple packages in its output that have this issue.
>>
>> any ETA when this will reach master?
>>
>> - attila
>> PGP: 5D5F 45C7 DFCD 0A39
>
> I've merged this to my local version-1.4.0 branch that I'll push
> shortly, and if everything goes fine it should reach master in about a
> week or so.

This has now been merged back into master.

Closing.

Thank you!

Maxim
diff mbox series

Patch

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index d0f7413268..d84411c090 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -598,6 +598,8 @@  and 'man/'.  This phase moves directories to the right place if needed."
                                         (string-suffix? ".tgz" file))
                                     (gzip-file? file)))
                              #:stat lstat)))
+      ;; Ensure the files are writable.
+      (for-each make-file-writable files)
       (for-each reset-gzip-timestamp files)))
 
   (match outputs