Patchwork [v2,1/6] sg3_utils: new package

login
register
mail settings
Submitter Marek Belisko
Date Jan. 7, 2013, 8:43 p.m.
Message ID <1357591399-3566-2-git-send-email-marek.belisko@open-nandra.com>
Download mbox | patch
Permalink /patch/210232/
State Superseded
Headers show

Comments

Marek Belisko - Jan. 7, 2013, 8:43 p.m.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 package/Config.in              |    1 +
 package/sg3_utils/Config.in    |   15 +++++++++++++++
 package/sg3_utils/sg3_utils.mk |   35 +++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+)
 create mode 100644 package/sg3_utils/Config.in
 create mode 100644 package/sg3_utils/sg3_utils.mk
Thomas Petazzoni - Jan. 7, 2013, 9:26 p.m.
Dear Marek Belisko,

On Mon,  7 Jan 2013 21:43:14 +0100, Marek Belisko wrote:

> +config BR2_PACKAGE_SG3_UTILS
> +	bool "sgutils"
> +	depends on BR2_LARGEFILE
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	help
> +	  Low level utilities for devices that use a SCSI command set.
> +

You should mention here that this option only installs the library
(libraries?), but not the programs.

> +SG3_UTILS_LICENSE = BSD GPL

You should be work specific than just BSD and GPL. Like BSD-3c or
BSD-4c, GPLv2, GPLv2+, GPLv3, GPLv3+, etc.

Otherwise, looks good.

Thomas
Belisko Marek - Jan. 7, 2013, 9:45 p.m.
Hi Thomas,

On Mon, Jan 7, 2013 at 10:26 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Marek Belisko,
>
> On Mon,  7 Jan 2013 21:43:14 +0100, Marek Belisko wrote:
>
>> +config BR2_PACKAGE_SG3_UTILS
>> +     bool "sgutils"
>> +     depends on BR2_LARGEFILE
>> +     depends on BR2_TOOLCHAIN_HAS_THREADS
>> +     help
>> +       Low level utilities for devices that use a SCSI command set.
>> +
>
> You should mention here that this option only installs the library
> (libraries?), but not the programs.
OK.
>
>> +SG3_UTILS_LICENSE = BSD GPL
>
> You should be work specific than just BSD and GPL. Like BSD-3c or
> BSD-4c, GPLv2, GPLv2+, GPLv3, GPLv3+, etc.
After proper reading of COPYING file it seems it GPLv2+
"Some of the older utilities are covered by the GPL. More precisely:
You are free to distribute this software under the terms of the
GNU General Public License either version 2, or (at your option)
any later version." but in same file there is no mention about BSD
license version.
>
> Otherwise, looks good.
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

Thanks,

mbe
Thomas Petazzoni - Jan. 7, 2013, 9:52 p.m.
Dear Belisko Marek,

On Mon, 7 Jan 2013 22:45:50 +0100, Belisko Marek wrote:

> > You should be work specific than just BSD and GPL. Like BSD-3c or
> > BSD-4c, GPLv2, GPLv2+, GPLv3, GPLv3+, etc.
> After proper reading of COPYING file it seems it GPLv2+
> "Some of the older utilities are covered by the GPL. More precisely:
> You are free to distribute this software under the terms of the
> GNU General Public License either version 2, or (at your option)
> any later version." but in same file there is no mention about BSD
> license version.

There is a BSD_LICENSE file that contains a BSD three clause license,
so I would say:

SG3_UTILS_LICENSE = GPLv2+ BSD-3c
SG3_UTILS_LICENSE_FILES = COPYING BSD_LICENSE

Thomas
Yann E. MORIN - Jan. 7, 2013, 9:56 p.m.
Thomas, Belisko, All,

On Monday 07 January 2013 Thomas Petazzoni wrote:
> On Mon, 7 Jan 2013 22:45:50 +0100, Belisko Marek wrote:
> > > You should be work specific than just BSD and GPL. Like BSD-3c or
> > > BSD-4c, GPLv2, GPLv2+, GPLv3, GPLv3+, etc.
> > After proper reading of COPYING file it seems it GPLv2+
> > "Some of the older utilities are covered by the GPL. More precisely:
> > You are free to distribute this software under the terms of the
> > GNU General Public License either version 2, or (at your option)
> > any later version." but in same file there is no mention about BSD
> > license version.
> 
> There is a BSD_LICENSE file that contains a BSD three clause license,

Actually, what matters in the content of the source files. Do some of
them refer to either license?
  - if the files only refer to GPLv2+, then the BSD-3c does not apply,
  - if the files only refer to BSD-3c, then the GPLv2+ does not apply,
  - if some file refer to one or two of the licenses, then both apply.

(/me likes how he managed to line up the above! ;-) )

Regards,
Yann E. MORIN.
Arnout Vandecappelle - Jan. 8, 2013, 8:05 a.m.
On 07/01/13 22:56, Yann E. MORIN wrote:
> Thomas, Belisko, All,
>
> On Monday 07 January 2013 Thomas Petazzoni wrote:
>> On Mon, 7 Jan 2013 22:45:50 +0100, Belisko Marek wrote:
>>>> You should be work specific than just BSD and GPL. Like BSD-3c or
>>>> BSD-4c, GPLv2, GPLv2+, GPLv3, GPLv3+, etc.
>>> After proper reading of COPYING file it seems it GPLv2+
>>> "Some of the older utilities are covered by the GPL. More precisely:
>>> You are free to distribute this software under the terms of the
>>> GNU General Public License either version 2, or (at your option)
>>> any later version." but in same file there is no mention about BSD
>>> license version.
>>
>> There is a BSD_LICENSE file that contains a BSD three clause license,
>
> Actually, what matters in the content of the source files. Do some of
> them refer to either license?
>    - if the files only refer to GPLv2+, then the BSD-3c does not apply,
>    - if the files only refer to BSD-3c, then the GPLv2+ does not apply,
>    - if some file refer to one or two of the licenses, then both apply.

      - if all files refer to GPLv2+ and BSD-3c, then either applies.

Putting GPLv2+ BSD-3c implies that parts are GPLv2+, other parts and 
BSD-3c. But it's also possible (and likely) that either applies.  BTW, 
it's not possible that both apply because they have conflicting terms.

  Regards,
  Arnout

>
> (/me likes how he managed to line up the above! ;-) )
>
> Regards,
> Yann E. MORIN.
>
Belisko Marek - Jan. 15, 2013, 8:48 p.m.
Hi Arnout, All,

On Tue, Jan 8, 2013 at 9:05 AM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 07/01/13 22:56, Yann E. MORIN wrote:
>>
>> Thomas, Belisko, All,
>>
>> On Monday 07 January 2013 Thomas Petazzoni wrote:
>>>
>>> On Mon, 7 Jan 2013 22:45:50 +0100, Belisko Marek wrote:
>>>>>
>>>>> You should be work specific than just BSD and GPL. Like BSD-3c or
>>>>> BSD-4c, GPLv2, GPLv2+, GPLv3, GPLv3+, etc.
>>>>
>>>> After proper reading of COPYING file it seems it GPLv2+
>>>> "Some of the older utilities are covered by the GPL. More precisely:
>>>> You are free to distribute this software under the terms of the
>>>> GNU General Public License either version 2, or (at your option)
>>>> any later version." but in same file there is no mention about BSD
>>>> license version.
>>>
>>>
>>> There is a BSD_LICENSE file that contains a BSD three clause license,
>>
>>
>> Actually, what matters in the content of the source files. Do some of
>> them refer to either license?
>>    - if the files only refer to GPLv2+, then the BSD-3c does not apply,
>>    - if the files only refer to BSD-3c, then the GPLv2+ does not apply,
>>    - if some file refer to one or two of the licenses, then both apply.
>
>
>      - if all files refer to GPLv2+ and BSD-3c, then either applies.
>
> Putting GPLv2+ BSD-3c implies that parts are GPLv2+, other parts and BSD-3c.
> But it's also possible (and likely) that either applies.  BTW, it's not
> possible that both apply because they have conflicting terms.
Hmm what then should be in SG3_UTILS_LICENSE? I've checked files and
some of them are BSD some GPLv2.
>
>  Regards,
>  Arnout
>
>
>>
>> (/me likes how he managed to line up the above! ;-) )
>>
>> Regards,
>> Yann E. MORIN.
>>
>
>
> --
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

Thanks,

marek
Yann E. MORIN - Jan. 15, 2013, 8:59 p.m.
Belisko, Arnout, All,

On Tuesday 15 January 2013 Belisko Marek wrote:
> On Tue, Jan 8, 2013 at 9:05 AM, Arnout Vandecappelle <arnout@mind.be> wrote:
> > On 07/01/13 22:56, Yann E. MORIN wrote:
> >> Actually, what matters in the content of the source files. Do some of
> >> them refer to either license?
> >>    - if the files only refer to GPLv2+, then the BSD-3c does not apply,
> >>    - if the files only refer to BSD-3c, then the GPLv2+ does not apply,
> >>    - if some file refer to one or two of the licenses, then both apply.
> >
> >
> >      - if all files refer to GPLv2+ and BSD-3c, then either applies.
> >
> > Putting GPLv2+ BSD-3c implies that parts are GPLv2+, other parts and BSD-3c.
> > But it's also possible (and likely) that either applies.  BTW, it's not
> > possible that both apply because they have conflicting terms.

Yes, the BSD-3c *is* compatible with the GPLv2. See:
    http://directory.fsf.org/wiki/License:BSD_3Clause

> Hmm what then should be in SG3_UTILS_LICENSE? I've checked files and
> some of them are BSD some GPLv2.

Assuming that the libraries are dual-licensed LGPLv2.1+ / BSD-3c, and the
programs are dual-licensed GPLv2+ / BSD-3c, I'd do something like:

SG3_UTILS_LICENCE = LGPLv2.1+ BSD-3c
ifneq ($(BR2_PACKAGE_SG3_UTILS_PROGS),)
SG3_UTILS_LICENCE += GPLV2+ BSD-3c
endif

Adapt to the real situation, of course.

Keep in minf that we try to keep the legal-info stuff correct, but we only
advertise it as a non-authoritative status, and it is the responsibility of
the person/entity that distributes the firmware to check the legal-info
for correctness.

I think we should make that crystal-clear when generating the legal-info,
so there is no ambiguity.

Regards,
Yann E. MORIN.
Belisko Marek - Jan. 15, 2013, 9:04 p.m.
Hi Yann, All,

On Tue, Jan 15, 2013 at 9:59 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Belisko, Arnout, All,
>
> On Tuesday 15 January 2013 Belisko Marek wrote:
>> On Tue, Jan 8, 2013 at 9:05 AM, Arnout Vandecappelle <arnout@mind.be> wrote:
>> > On 07/01/13 22:56, Yann E. MORIN wrote:
>> >> Actually, what matters in the content of the source files. Do some of
>> >> them refer to either license?
>> >>    - if the files only refer to GPLv2+, then the BSD-3c does not apply,
>> >>    - if the files only refer to BSD-3c, then the GPLv2+ does not apply,
>> >>    - if some file refer to one or two of the licenses, then both apply.
>> >
>> >
>> >      - if all files refer to GPLv2+ and BSD-3c, then either applies.
>> >
>> > Putting GPLv2+ BSD-3c implies that parts are GPLv2+, other parts and BSD-3c.
>> > But it's also possible (and likely) that either applies.  BTW, it's not
>> > possible that both apply because they have conflicting terms.
>
> Yes, the BSD-3c *is* compatible with the GPLv2. See:
>     http://directory.fsf.org/wiki/License:BSD_3Clause
>
>> Hmm what then should be in SG3_UTILS_LICENSE? I've checked files and
>> some of them are BSD some GPLv2.
>
> Assuming that the libraries are dual-licensed LGPLv2.1+ / BSD-3c, and the
> programs are dual-licensed GPLv2+ / BSD-3c, I'd do something like:
>
> SG3_UTILS_LICENCE = LGPLv2.1+ BSD-3c
> ifneq ($(BR2_PACKAGE_SG3_UTILS_PROGS),)
> SG3_UTILS_LICENCE += GPLV2+ BSD-3c
> endif
It's bit complicated. All library files are BSD only but utils files
are mixed (BSD + GPLv2).
>
> Adapt to the real situation, of course.
>
> Keep in minf that we try to keep the legal-info stuff correct, but we only
> advertise it as a non-authoritative status, and it is the responsibility of
> the person/entity that distributes the firmware to check the legal-info
> for correctness.
>
> I think we should make that crystal-clear when generating the legal-info,
> so there is no ambiguity.
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
>

Cheers,

marek
Yann E. MORIN - Jan. 15, 2013, 9:29 p.m.
Belisko, All,

On Tuesday 15 January 2013 Belisko Marek wrote:
> On Tue, Jan 15, 2013 at 9:59 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > SG3_UTILS_LICENCE = LGPLv2.1+ BSD-3c
> > ifneq ($(BR2_PACKAGE_SG3_UTILS_PROGS),)
> > SG3_UTILS_LICENCE += GPLV2+ BSD-3c
> > endif
> It's bit complicated. All library files are BSD only but utils files
> are mixed (BSD + GPLv2).

Then: 

SG3_UTILS_LICENSE = BSD-3c
ifneq ($(BR2_PACKAGE_SG3_UTILS_PROGS),)
SG3_UTILS_LICENSE += GPLV2+
endif

(Note: LICENSE with a 'S', not LICENCE, my bad...)

Regards,
Yann E. MORIN.
Arnout Vandecappelle - Jan. 16, 2013, 8:17 a.m.
On 15/01/13 22:29, Yann E. MORIN wrote:
> Belisko, All,
>
> On Tuesday 15 January 2013 Belisko Marek wrote:
>> On Tue, Jan 15, 2013 at 9:59 PM, Yann E. MORIN<yann.morin.1998@free.fr>  wrote:
>>> SG3_UTILS_LICENCE = LGPLv2.1+ BSD-3c
>>> ifneq ($(BR2_PACKAGE_SG3_UTILS_PROGS),)
>>> SG3_UTILS_LICENCE += GPLV2+ BSD-3c
>>> endif
>> It's bit complicated. All library files are BSD only but utils files
>> are mixed (BSD + GPLv2).
>
> Then:
>
> SG3_UTILS_LICENSE = BSD-3c
> ifneq ($(BR2_PACKAGE_SG3_UTILS_PROGS),)
> SG3_UTILS_LICENSE += GPLV2+
> endif

  Agreed.

  Regards,
  Arnout

Patch

diff --git a/package/Config.in b/package/Config.in
index 11e6f3a..e6153f0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -261,6 +261,7 @@  source "package/rpi-userland/Config.in"
 source "package/sane-backends/Config.in"
 source "package/sdparm/Config.in"
 source "package/setserial/Config.in"
+source "package/sg3_utils/Config.in"
 source "package/smartmontools/Config.in"
 source "package/snowball-hdmiservice/Config.in"
 source "package/sredird/Config.in"
diff --git a/package/sg3_utils/Config.in b/package/sg3_utils/Config.in
new file mode 100644
index 0000000..a2a3acc
--- /dev/null
+++ b/package/sg3_utils/Config.in
@@ -0,0 +1,15 @@ 
+config BR2_PACKAGE_SG3_UTILS
+	bool "sgutils"
+	depends on BR2_LARGEFILE
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  Low level utilities for devices that use a SCSI command set.
+
+	  http://sg.danny.cz/sg/sg3_utils.html
+
+config BR2_PACKAGE_SG3_UTILS_PROGS
+	bool "install programs"
+	depends on BR2_PACKAGE_SG3_UTILS
+
+comment "sgutils requires a toolchain with LARGEFILE and threads support"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/sg3_utils/sg3_utils.mk b/package/sg3_utils/sg3_utils.mk
new file mode 100644
index 0000000..7a18a8d
--- /dev/null
+++ b/package/sg3_utils/sg3_utils.mk
@@ -0,0 +1,35 @@ 
+#############################################################
+#
+# sg3_utils
+#
+#############################################################
+SG3_UTILS_VERSION = 1.34
+SG3_UTILS_SITE    = http://sg.danny.cz/sg/p/
+SG3_UTILS_LICENSE = BSD GPL
+SG3_UTILS_LICENSE_FILES = COPYING BSD_LICENSE
+
+# install the libsgutils2 library
+SG3_UTILS_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),)
+define SG3_UTILS_REMOVE_PROGS
+	for prog in \
+		dd decode_sense emc_trespass format get_config \
+		get_lba_status ident inq logs luns map26 \
+		map sgm_dd modes opcodes sgp_dd persist prevent \
+		raw rbuf rdac read readcap read_block_limits \
+		read_buffer read_long reassign referrals \
+		requests reset rmsn rtpg safte sanitize \
+		sat_identify sat_phy_event sat_set_features scan \
+		senddiag ses start stpg sync test_rwbuf turs \
+		unmap verify vpd write_buffer write_long \
+		write_same wr_mode ; do \
+		$(RM) $(TARGET_DIR)/usr/bin/sg_$${prog} ; \
+	done
+	$(RM) $(TARGET_DIR)/usr/bin/sginfo
+endef
+
+SG3_UTILS_POST_INSTALL_TARGET_HOOKS += SG3_UTILS_REMOVE_PROGS
+endif
+
+$(eval $(autotools-package))