File::Slurp triggers warnings on perl 5.24 and it is recommended to not use it

RESOLVED FIXED in Bugzilla 5.0

Status

()

RESOLVED FIXED
2 years ago
10 months ago

People

(Reporter: dylan, Assigned: dylanAtHome)

Tracking

unspecified
Bugzilla 5.0
Bug Flags:
approval5.0 +

Details

Attachments

(3 attachments)

See http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is-broken-and-wrong.html

We could use Leon's replacement, or we could just do file IO natively.
Created attachment 8790043 [details] [review]
[bugzilla] dylanwh:bug-1301887 > bugzilla:master
(Reporter)

Updated

2 years ago
Duplicate of this bug: 1288495
(Reporter)

Updated

2 years ago
Attachment #8790043 - Flags: review?(jfearn)

Comment 3

2 years ago
Comment on attachment 8790043 [details] [review]
[bugzilla] dylanwh:bug-1301887 > bugzilla:master

Looks good to me.
Attachment #8790043 - Flags: review?(jfearn) → review+
(Reporter)

Comment 4

2 years ago
This will continue being a warning reported for users of the 5.x branch.
I know we generally don't backport new features, or add new dependencies to old releases,
but in this case it 1) removes a rather annoying warning message that happens during every request and 2) removes a dependency.
Should we backport this to the 5.0 branch?

Setting approval5.0? and asking gerv to make the call on this.
Flags: needinfo?(gerv)
Flags: approval5.0?
(Reporter)

Comment 5

2 years ago
To github.com:bugzilla/bugzilla.git
   31651c9..df46774  master -> master

Leaving open pending gerv's call on merging this into 5.0 too
Changing dependencies, I'd be nervous about. Removing them seems no problem. Well done for taking that path. Let's merge into 5.0.

Gerv
Flags: needinfo?(gerv)
(Reporter)

Updated

2 years ago
Flags: approval5.0? → approval5.0+
Created attachment 8817745 [details] [review]
[bugzilla] dylanwh:bug-1301887-5.0 > bugzilla:5.0
(Reporter)

Updated

2 years ago
Attachment #8817745 - Flags: review?(gerv)
Comment on attachment 8817745 [details] [review]
[bugzilla] dylanwh:bug-1301887-5.0 > bugzilla:5.0

r- - see Github.

Gerv
Attachment #8817745 - Flags: review?(gerv) → review-
(Reporter)

Updated

2 years ago
Assignee: dylan → dylan
There's a problem with this patch that cropped up in Gentoo's usage.

File::Slurp write_file defaults the umask to 0666, and mktemp uses a much more restrictive umask.
This is exposed by data/assets/ css files being written out without being readable by group.
Created attachment 8915568 [details] [review]
[bugzilla] vvb16:5.0 > bugzilla:5.0
(Reporter)

Updated

10 months ago
Status: NEW → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 5.0
Version: 5.1.1 → unspecified
You need to log in before you can comment on or make changes to this bug.