public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Should we allow picture files in the Portage tree?
@ 2014-02-13 15:12 Ulrich Mueller
  2014-02-13 15:24 ` Jason A. Donenfeld
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Ulrich Mueller @ 2014-02-13 15:12 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 730 bytes --]

When rewriting the script scanning for binary files in the Portage
tree [1], I noticed that there are some 25 XPM and SVG image files,
with sizes up to 13 kB.

For the time being, I've added exceptions for MIME types image/svg+xml
and image/x-xpmi [2], but I think it would be better to clarify our
policy on this. The devmanual currently says:

| Things that do not belong in the tree:
| * Large patches
| * Non-text files
| * Photos of teletubbies
| * Files whose name starts with a dot

Should we allow pictures if the image file format is a text file?

Ulrich

[1] http://qa-reports.gentoo.org/output/find-binary-files.txt
[2] http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=blob;f=find-binary-files.sh;hb=HEAD

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] Should we allow picture files in the Portage tree?
  2014-02-13 15:12 [gentoo-dev] Should we allow picture files in the Portage tree? Ulrich Mueller
@ 2014-02-13 15:24 ` Jason A. Donenfeld
  2014-02-13 15:28   ` Anthony G. Basile
  2014-02-15 20:06   ` James Cloos
  2014-02-13 15:26 ` Anthony G. Basile
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 10+ messages in thread
From: Jason A. Donenfeld @ 2014-02-13 15:24 UTC (permalink / raw
  To: gentoo-dev

On Thu, Feb 13, 2014 at 4:12 PM, Ulrich Mueller <ulm@gentoo.org> wrote:
> Should we allow pictures if the image file format is a text file?

I think we should not. Even if you can open it in a text editor, you
can't "read" it or interact with it in the same way that you can a
text-based patch. For that reason, big size or small size, it still in
essence falls under the 'binary file' criteria and thus should not be
permitted.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] Should we allow picture files in the Portage tree?
  2014-02-13 15:12 [gentoo-dev] Should we allow picture files in the Portage tree? Ulrich Mueller
  2014-02-13 15:24 ` Jason A. Donenfeld
@ 2014-02-13 15:26 ` Anthony G. Basile
  2014-02-15 20:18 ` Alexander Berntsen
  2014-02-16 12:03 ` Samuli Suominen
  3 siblings, 0 replies; 10+ messages in thread
From: Anthony G. Basile @ 2014-02-13 15:26 UTC (permalink / raw
  To: gentoo-dev

On 02/13/2014 10:12 AM, Ulrich Mueller wrote:
> When rewriting the script scanning for binary files in the Portage
> tree [1], I noticed that there are some 25 XPM and SVG image files,
> with sizes up to 13 kB.
>
> For the time being, I've added exceptions for MIME types image/svg+xml
> and image/x-xpmi [2], but I think it would be better to clarify our
> policy on this. The devmanual currently says:
>
> | Things that do not belong in the tree:
> | * Large patches
> | * Non-text files
> | * Photos of teletubbies
> | * Files whose name starts with a dot
>
> Should we allow pictures if the image file format is a text file?

Yes, provided it fits all the other criteria, ie small and does not 
contain teletubbies.  The problem as I understand it, is with version 
control systems work with text files only, irrespect of what those text 
files encode.

>
> Ulrich
>
> [1] http://qa-reports.gentoo.org/output/find-binary-files.txt
> [2] http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=blob;f=find-binary-files.sh;hb=HEAD


-- 
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail    : blueness@gentoo.org
GnuPG FP  : 1FED FAD9 D82C 52A5 3BAB  DC79 9384 FA6E F52D 4BBA
GnuPG ID  : F52D4BBA



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] Should we allow picture files in the Portage tree?
  2014-02-13 15:24 ` Jason A. Donenfeld
@ 2014-02-13 15:28   ` Anthony G. Basile
  2014-02-13 15:30     ` Kent Fredric
  2014-02-15 20:06   ` James Cloos
  1 sibling, 1 reply; 10+ messages in thread
From: Anthony G. Basile @ 2014-02-13 15:28 UTC (permalink / raw
  To: gentoo-dev

On 02/13/2014 10:24 AM, Jason A. Donenfeld wrote:
> On Thu, Feb 13, 2014 at 4:12 PM, Ulrich Mueller <ulm@gentoo.org> wrote:
>> Should we allow pictures if the image file format is a text file?
> I think we should not. Even if you can open it in a text editor, you
> can't "read" it or interact with it in the same way that you can a
> text-based patch. For that reason, big size or small size, it still in
> essence falls under the 'binary file' criteria and thus should not be
> permitted.
>
1) You can interact with svg files with a text editor if you know what 
you are doing.  2) You want your vcs to show the diff in that file and 
you can make sense of that diff.

-- 
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail    : blueness@gentoo.org
GnuPG FP  : 1FED FAD9 D82C 52A5 3BAB  DC79 9384 FA6E F52D 4BBA
GnuPG ID  : F52D4BBA



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] Should we allow picture files in the Portage tree?
  2014-02-13 15:28   ` Anthony G. Basile
@ 2014-02-13 15:30     ` Kent Fredric
  2014-02-13 15:40       ` Rich Freeman
  0 siblings, 1 reply; 10+ messages in thread
From: Kent Fredric @ 2014-02-13 15:30 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

On 14 February 2014 04:28, Anthony G. Basile <blueness@gentoo.org> wrote:

>  2) You want your vcs to show the diff in that file and you can make sense
> of that diff.
>

Though how many of them are "well formatted" SVGs, and how many of them are
single-line SVG files without whitespace, such as linefeeds and
appropriate  indentation?

Because diffs are usually not very useful if lots of changes occur on a
single line.


-- 
Kent

[-- Attachment #2: Type: text/html, Size: 988 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] Should we allow picture files in the Portage tree?
  2014-02-13 15:30     ` Kent Fredric
@ 2014-02-13 15:40       ` Rich Freeman
  0 siblings, 0 replies; 10+ messages in thread
From: Rich Freeman @ 2014-02-13 15:40 UTC (permalink / raw
  To: gentoo-dev

On Thu, Feb 13, 2014 at 10:30 AM, Kent Fredric <kentfredric@gmail.com> wrote:
>
> On 14 February 2014 04:28, Anthony G. Basile <blueness@gentoo.org> wrote:
>>
>>  2) You want your vcs to show the diff in that file and you can make sense
>> of that diff.
>
>
> Though how many of them are "well formatted" SVGs, and how many of them are
> single-line SVG files without whitespace, such as linefeeds and appropriate
> indentation?
>
> Because diffs are usually not very useful if lots of changes occur on a
> single line.

If these were really hand-maintained SVG files I could see how it
might fit into an scm model.  However, these are text files in the
same sense that an assembly language listing generated from a C++ file
would be.  Sure, you could manipulate it by hand, but the reality is
that upstream is going to change 47 lines in the source and you're
going to upgrade your gcc and as a result 90% of the 3M line listing
will change on a small upgrade.  Likewise, when upsteam changes their
desktop icon it isn't going to result in a 3-line change to the SVG
file.

I guess the question though is whether they cause harm.  If the files
are small and don't cause issues with the scm they're stored in, then
I don't really see the issue with storing them.  It doesn't really
matter if they're SVG files or uuencoded whatever (though if our tree
is GPL we need to make source available for anything that has it -
probably not an issue for SVG unless it is derived from some kind of
composite).

Rich


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] Should we allow picture files in the Portage tree?
  2014-02-13 15:24 ` Jason A. Donenfeld
  2014-02-13 15:28   ` Anthony G. Basile
@ 2014-02-15 20:06   ` James Cloos
  1 sibling, 0 replies; 10+ messages in thread
From: James Cloos @ 2014-02-15 20:06 UTC (permalink / raw
  To: gentoo-dev; +Cc: Jason A. Donenfeld

>>>>> "JAD" == Jason A Donenfeld <zx2c4@gentoo.org> writes:

UM>> Should we allow pictures if the image file format is a text file?

JAD> I think we should not. Even if you can open it in a text editor,
JAD> you can't "read" it or interact with it in the same way that you
JAD> can a text-based patch.

That's not true for xbm and xpm files; those are valid C programs and
are completely readable.  And editable.

The gentoo.logo file from app-misc/linux-logo is also easily read and edited.

Diff(5)s also work well, so their cvs and git history is usable.

-JimC
--
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] Should we allow picture files in the Portage tree?
  2014-02-13 15:12 [gentoo-dev] Should we allow picture files in the Portage tree? Ulrich Mueller
  2014-02-13 15:24 ` Jason A. Donenfeld
  2014-02-13 15:26 ` Anthony G. Basile
@ 2014-02-15 20:18 ` Alexander Berntsen
  2014-02-16 12:03 ` Samuli Suominen
  3 siblings, 0 replies; 10+ messages in thread
From: Alexander Berntsen @ 2014-02-15 20:18 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 13/02/14 16:12, Ulrich Mueller wrote:
> Should we allow pictures if the image file format is a text file?
Rather than having a hard rule for allowing or disallowing image
files, we should evaluate the intention of a file. If it make sense to
edit e.g. an SVG file in a text editor, and this seems to be the
intention, then allow it. If it is a minified ImageMagick export, it
is not intended to be edited, so disallow it.

- -- 
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlL/y5wACgkQRtClrXBQc7V3FQEAiUMdWEDa5R9iQht2tWYRZuos
LcipXUrzFZxim0/11VAA/AoOkIOPLtw2VFwipmKeVq02E4TpNXiHHFzXEfG5Bk9z
=nHwF
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] Should we allow picture files in the Portage tree?
  2014-02-13 15:12 [gentoo-dev] Should we allow picture files in the Portage tree? Ulrich Mueller
                   ` (2 preceding siblings ...)
  2014-02-15 20:18 ` Alexander Berntsen
@ 2014-02-16 12:03 ` Samuli Suominen
  2014-02-16 13:49   ` Ulrich Mueller
  3 siblings, 1 reply; 10+ messages in thread
From: Samuli Suominen @ 2014-02-16 12:03 UTC (permalink / raw
  To: gentoo-dev


On 13/02/14 17:12, Ulrich Mueller wrote:
> When rewriting the script scanning for binary files in the Portage
> tree [1], I noticed that there are some 25 XPM and SVG image files,
> with sizes up to 13 kB.
>
> For the time being, I've added exceptions for MIME types image/svg+xml
> and image/x-xpmi [2], but I think it would be better to clarify our
> policy on this. The devmanual currently says:
>
> | Things that do not belong in the tree:
> | * Large patches
> | * Non-text files
> | * Photos of teletubbies
> | * Files whose name starts with a dot
>
> Should we allow pictures if the image file format is a text file?

wasn't the whole argument for not allowing binary files in tree the
problems it causes w/ version control
history, web interface, and such?
then, what problems does .xpm or .svg cause? none, far as I know, so why
disallow them?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [gentoo-dev] Should we allow picture files in the Portage tree?
  2014-02-16 12:03 ` Samuli Suominen
@ 2014-02-16 13:49   ` Ulrich Mueller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Mueller @ 2014-02-16 13:49 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

>>>>> On Sun, 16 Feb 2014, Samuli Suominen wrote:

> wasn't the whole argument for not allowing binary files in tree the
> problems it causes w/ version control history, web interface, and
> such? then, what problems does .xpm or .svg cause? none, far as I
> know, so why disallow them?

That seems to be what most replies here have said. So my script will
keep the exceptions for xpm and svg.

The other restrictions should apply though, especially for the size of
the file. So small icons are o.k. but multi-kilobyte pictures are not.

Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-02-16 13:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-13 15:12 [gentoo-dev] Should we allow picture files in the Portage tree? Ulrich Mueller
2014-02-13 15:24 ` Jason A. Donenfeld
2014-02-13 15:28   ` Anthony G. Basile
2014-02-13 15:30     ` Kent Fredric
2014-02-13 15:40       ` Rich Freeman
2014-02-15 20:06   ` James Cloos
2014-02-13 15:26 ` Anthony G. Basile
2014-02-15 20:18 ` Alexander Berntsen
2014-02-16 12:03 ` Samuli Suominen
2014-02-16 13:49   ` Ulrich Mueller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox