public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
       [not found] ` <87d047r0ro.fsf@Rainer.invalid>
@ 2020-08-04 12:54   ` Lemures Lemniscati
  2020-08-04 13:46     ` Thomas Wolff
  2020-08-04 17:02     ` ASSI
  0 siblings, 2 replies; 21+ messages in thread
From: Lemures Lemniscati @ 2020-08-04 12:54 UTC (permalink / raw)
  To: cygwin-apps

Date: Mon, 03 Aug 2020 21:24:11 +0200
From: Achim Gratz <Stromeko@nexgo.de>

> Lemures Lemniscati via Cygwin writes:
> > This is another patch, so that cygport shall make tarballs with
> > specified owner and group names.
> 
> Cygport patches should better go to cygwin-apps.  I've already sent a
> patch that allows you to do the same thing some time ago, but it has
> not been reviewed yet.
> 
> https://repo.or.cz/cygport/rpm-style.git/commitdiff/c6af2ca23aae5da3e99c70cf2b704430b929f431
> 

Nice.

Then, how about a commit following yours.

https://github.com/cygwin-lem/cygport/commit/a88f1dfa3619fcf817d558761a5249b09e71cc3c

Now it is suffienct to specify CYGPORT_TAR_EXT as ".tar.zst" in order
use zstd. But it needs tar version >= 1.31.



And a next one is for making BUILD_REQUIRES a single-line list in
*src.hint files.

https://github.com/cygwin-lem/cygport/commit/7607782d3d1972aef6b88ee32f5211f21abbbcfb

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-04 12:54   ` cygport: Request a new feature in order to set owner/group names in packaged tarballs Lemures Lemniscati
@ 2020-08-04 13:46     ` Thomas Wolff
  2020-08-04 20:34       ` Lemures Lemniscati
  2020-08-04 17:02     ` ASSI
  1 sibling, 1 reply; 21+ messages in thread
From: Thomas Wolff @ 2020-08-04 13:46 UTC (permalink / raw)
  To: cygwin-apps



Am 04.08.2020 um 14:54 schrieb Lemures Lemniscati via Cygwin-apps:
> Date: Mon, 03 Aug 2020 21:24:11 +0200
> From: Achim Gratz <Stromeko@nexgo.de>
>
>> Lemures Lemniscati via Cygwin writes:
>>> This is another patch, so that cygport shall make tarballs with
>>> specified owner and group names.
>> Cygport patches should better go to cygwin-apps.  I've already sent a
>> patch that allows you to do the same thing some time ago, but it has
>> not been reviewed yet.
>>
>> https://repo.or.cz/cygport/rpm-style.git/commitdiff/c6af2ca23aae5da3e99c70cf2b704430b929f431
>>
> Nice.
>
> Then, how about a commit following yours.
It is much less than obvious in that older patch that you can trick the 
owner/group information into that option.
I'd appreciate a simple explicit option for that.
>
> https://github.com/cygwin-lem/cygport/commit/a88f1dfa3619fcf817d558761a5249b09e71cc3c
>
> Now it is suffienct to specify CYGPORT_TAR_EXT as ".tar.zst" in order
> use zstd. But it needs tar version >= 1.31.
>
>
>
> And a next one is for making BUILD_REQUIRES a single-line list in
> *src.hint files.
>
> https://github.com/cygwin-lem/cygport/commit/7607782d3d1972aef6b88ee32f5211f21abbbcfb

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-04 12:54   ` cygport: Request a new feature in order to set owner/group names in packaged tarballs Lemures Lemniscati
  2020-08-04 13:46     ` Thomas Wolff
@ 2020-08-04 17:02     ` ASSI
  2020-08-04 20:49       ` Lemures Lemniscati
  1 sibling, 1 reply; 21+ messages in thread
From: ASSI @ 2020-08-04 17:02 UTC (permalink / raw)
  To: cygwin-apps

Lemures Lemniscati via Cygwin-apps writes:

Don't quote email addresses, please.

> Nice.
>
> Then, how about a commit following yours.

That's really for Yaakov to say.

> Now it is suffienct to specify CYGPORT_TAR_EXT as ".tar.zst" in order
> use zstd. But it needs tar version >= 1.31.

I've asked Eric Blake quite some time ago about an update of GNU tar, so
don't hold your breath.

> And a next one is for making BUILD_REQUIRES a single-line list in
> *src.hint files.

… or just don't embed newlines.  Since cygport is bash under the hood
you can do

BUILD_REQUIRES+=" whatever"

instead of wrapping lines.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-04 13:46     ` Thomas Wolff
@ 2020-08-04 20:34       ` Lemures Lemniscati
  2020-08-05 18:31         ` ASSI
  2020-08-07  7:45         ` Thomas Wolff
  0 siblings, 2 replies; 21+ messages in thread
From: Lemures Lemniscati @ 2020-08-04 20:34 UTC (permalink / raw)
  To: cygwin-apps

On Tue, 4 Aug 2020 15:46:13 +0200, Thomas Wolff
> Am 04.08.2020 um 14:54 schrieb Lemures Lemniscati via Cygwin-apps:
> > Date: Mon, 03 Aug 2020 21:24:11 +0200
> > From: Achim Gratz
> >
> >> Lemures Lemniscati via Cygwin writes:
> >>> This is another patch, so that cygport shall make tarballs with
> >>> specified owner and group names.
> >> Cygport patches should better go to cygwin-apps.  I've already sent a
> >> patch that allows you to do the same thing some time ago, but it has
> >> not been reviewed yet.
> >>
> >> https://repo.or.cz/cygport/rpm-style.git/commitdiff/c6af2ca23aae5da3e99c70cf2b704430b929f431
> >>
> > Nice.
> >
> > Then, how about a commit following yours.
> It is much less than obvious in that older patch that you can trick the owner/group information into that option.
> I'd appreciate a simple explicit option for that.

All right.

I've simplified options to Simplify options to CYGPORT_TAR_OPTS and
CYGPORT_TAR_EXT.

https://github.com/cygwin-lem/cygport/commit/5a502cc84b8db0b47eae8b3571d363d106e74160


This will work:

CYGPORT_TAR_OPTS="--owner=foo --group=bar" cygport baz.cygport package

And if you have tar >=1.31, these will also work:

CYGPORT_TAR_EXT=".tar.zst" cygport baz.cygport package

CYGPORT_TAR_OPTS="--owner=foo --group=bar" CYGPORT_TAR_EXT=".tar.zst" cygport baz.cygport package



Regards,

Lem

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-04 17:02     ` ASSI
@ 2020-08-04 20:49       ` Lemures Lemniscati
  2020-08-05 19:34         ` Jon Turney
  0 siblings, 1 reply; 21+ messages in thread
From: Lemures Lemniscati @ 2020-08-04 20:49 UTC (permalink / raw)
  To: cygwin-apps

On Tue, 04 Aug 2020 19:02:35 +0200, ASSI
> Lemures Lemniscati via Cygwin-apps writes:
> 
> Don't quote email addresses, please.

Sorry, I've changed settings of my mailer not to do so.

> 
> > Nice.
> >
> > Then, how about a commit following yours.
> 
> That's really for Yaakov to say.
> 
> > Now it is suffienct to specify CYGPORT_TAR_EXT as ".tar.zst" in order
> > use zstd. But it needs tar version >= 1.31.
> 
> I've asked Eric Blake quite some time ago about an update of GNU tar, so
> don't hold your breath.
> 
> > And a next one is for making BUILD_REQUIRES a single-line list in
> > *src.hint files.
> 
> … or just don't embed newlines.  Since cygport is bash under the hood
> you can do
> 
> BUILD_REQUIRES+=" whatever"
> 
> instead of wrapping lines.

By squeezing white spaces, we can save some characters in *.cygport
files :). And new maintainers can avoid an issue relating newlines in
BUILD_REQUIRES without knowing it (I was trapped in it once).

Regards,

--
Lem

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-04 20:34       ` Lemures Lemniscati
@ 2020-08-05 18:31         ` ASSI
  2020-08-05 21:21           ` Lemures Lemniscati
  2020-08-07  7:45         ` Thomas Wolff
  1 sibling, 1 reply; 21+ messages in thread
From: ASSI @ 2020-08-05 18:31 UTC (permalink / raw)
  To: cygwin-apps

Lemures Lemniscati via Cygwin-apps writes:
> I've simplified options to Simplify options to CYGPORT_TAR_OPTS and
> CYGPORT_TAR_EXT.

You've also removed the possibility to invoke tar with a different
environment, which you must do if you want to control the compression
parameters.  You would now need to introduce another configuration
variable for if you wanted to keep that ability…


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-04 20:49       ` Lemures Lemniscati
@ 2020-08-05 19:34         ` Jon Turney
  2020-08-05 21:50           ` Lemures Lemniscati
  0 siblings, 1 reply; 21+ messages in thread
From: Jon Turney @ 2020-08-05 19:34 UTC (permalink / raw)
  To: Lemures Lemniscati, cygwin-apps

On 04/08/2020 21:49, Lemures Lemniscati via Cygwin-apps wrote:
> On Tue, 04 Aug 2020 19:02:35 +0200, ASSI
>> Lemures Lemniscati via Cygwin-apps writes:
>>> And a next one is for making BUILD_REQUIRES a single-line list in
>>> *src.hint files.
>>
>> … or just don't embed newlines.  Since cygport is bash under the hood
>> you can do
>>
>> BUILD_REQUIRES+=" whatever"
>>
>> instead of wrapping lines.
> 
> By squeezing white spaces, we can save some characters in *.cygport
> files :). And new maintainers can avoid an issue relating newlines in
> BUILD_REQUIRES without knowing it (I was trapped in it once).
Yes, this would be nice.

However, I think there is a consistency problem here, as other variables 
which should only produce a single line in the .hint file (e.g. 
REQUIRES, etc.) don't get whitespace canonicalized (as least, that's how 
it seemed to me when I briefly looked at this).

Thanks for the patch.


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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-05 18:31         ` ASSI
@ 2020-08-05 21:21           ` Lemures Lemniscati
  2020-08-06 18:25             ` ASSI
  0 siblings, 1 reply; 21+ messages in thread
From: Lemures Lemniscati @ 2020-08-05 21:21 UTC (permalink / raw)
  To: cygwin-apps

On Wed, 05 Aug 2020 20:31:33 +0200, ASSI
> Lemures Lemniscati via Cygwin-apps writes:
> > I've simplified options to Simplify options to CYGPORT_TAR_OPTS and
> > CYGPORT_TAR_EXT.
> 
> You've also removed the possibility to invoke tar with a different
> environment, which you must do if you want to control the compression
> parameters.  You would now need to introduce another configuration
> variable for if you wanted to keep that ability…
> 

Do you mean controlling with '-I' or '--use-compress-program='?
(And I didn't know these options of tar... oh.)
---- from 'man tar'
       -I, --use-compress-program=COMMAND
              Filter  data through COMMAND.  It must accept the -d option, for
              decompression.  The argument can contain command line options.
---- from 'man tar'

Because these options can take a space-containing parameter,
I guess I understand that we would need another variable, as you write.

Regards,
Lem

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-05 19:34         ` Jon Turney
@ 2020-08-05 21:50           ` Lemures Lemniscati
  2020-08-06 17:13             ` Jon Turney
  0 siblings, 1 reply; 21+ messages in thread
From: Lemures Lemniscati @ 2020-08-05 21:50 UTC (permalink / raw)
  To: cygwin-apps

On Wed, 5 Aug 2020 20:34:24 +0100, Jon Turney
> On 04/08/2020 21:49, Lemures Lemniscati via Cygwin-apps wrote:
> > On Tue, 04 Aug 2020 19:02:35 +0200, ASSI
> >> Lemures Lemniscati via Cygwin-apps writes:
> >>> And a next one is for making BUILD_REQUIRES a single-line list in
> >>> *src.hint files.
> >>
> >> … or just don't embed newlines.  Since cygport is bash under the hood
> >> you can do
> >>
> >> BUILD_REQUIRES+=" whatever"
> >>
> >> instead of wrapping lines.
> >
> > By squeezing white spaces, we can save some characters in *.cygport
> > files :). And new maintainers can avoid an issue relating newlines in
> > BUILD_REQUIRES without knowing it (I was trapped in it once).
> Yes, this would be nice.
> 
> However, I think there is a consistency problem here, as other variables which should only produce a single line in the .hint file (e.g. REQUIRES, etc.) don't get whitespace canonicalized (as least, that's how it seemed to me when I briefly looked at this).
> 
> Thanks for the patch.

Thank you for reviewing.

It would be easy to canonicalize through a functiion like
__single_line_list () in the commit
https://github.com/cygwin-lem/cygport/commit/7607782d3d1972aef6b88ee32f5211f21abbbcfb

I'll check later for 'category:', 'requires:', 'obsoletes:',
'provides:', and 'conflicts:'.

Any other field to be checked for canonicalization?


--
Lem

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-05 21:50           ` Lemures Lemniscati
@ 2020-08-06 17:13             ` Jon Turney
  2020-08-07 14:43               ` Lemures Lemniscati
  0 siblings, 1 reply; 21+ messages in thread
From: Jon Turney @ 2020-08-06 17:13 UTC (permalink / raw)
  To: cygwin-apps

On 05/08/2020 22:50, Lemures Lemniscati via Cygwin-apps wrote:
> On Wed, 5 Aug 2020 20:34:24 +0100, Jon Turney
>>
>> However, I think there is a consistency problem here, as other variables which should only produce a single line in the .hint file (e.g. REQUIRES, etc.) don't get whitespace canonicalized (as least, that's how it seemed to me when I briefly looked at this).
>>
>> Thanks for the patch.
> 
> Thank you for reviewing.
> 
> It would be easy to canonicalize through a functiion like
> __single_line_list () in the commit
> https://github.com/cygwin-lem/cygport/commit/7607782d3d1972aef6b88ee32f5211f21abbbcfb
> 
> I'll check later for 'category:', 'requires:', 'obsoletes:',
> 'provides:', and 'conflicts:'.
> 
> Any other field to be checked for canonicalization?

Although it's not very clearly specified in [1], the only keys in a 
.hint file for which multiline values are currently permitted are ldesc: 
and message:

[1] https://cygwin.com/packaging-hint-files.html

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-05 21:21           ` Lemures Lemniscati
@ 2020-08-06 18:25             ` ASSI
  0 siblings, 0 replies; 21+ messages in thread
From: ASSI @ 2020-08-06 18:25 UTC (permalink / raw)
  To: cygwin-apps

Lemures Lemniscati via Cygwin-apps writes:
> Do you mean controlling with '-I' or '--use-compress-program='?
> (And I didn't know these options of tar... oh.)

No, I was talking about things like XZ_OPT or ZSTD_CLEVEL.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-04 20:34       ` Lemures Lemniscati
  2020-08-05 18:31         ` ASSI
@ 2020-08-07  7:45         ` Thomas Wolff
  2020-08-07 14:33           ` Lemures Lemniscati
  1 sibling, 1 reply; 21+ messages in thread
From: Thomas Wolff @ 2020-08-07  7:45 UTC (permalink / raw)
  To: cygwin-apps

Am 04.08.2020 um 22:34 schrieb Lemures Lemniscati via Cygwin-apps:
> On Tue, 4 Aug 2020 15:46:13 +0200, Thomas Wolff
>> Am 04.08.2020 um 14:54 schrieb Lemures Lemniscati via Cygwin-apps:
>>> Date: Mon, 03 Aug 2020 21:24:11 +0200
>>> From: Achim Gratz
>>>
>>>> Lemures Lemniscati via Cygwin writes:
>>>>> This is another patch, so that cygport shall make tarballs with
>>>>> specified owner and group names.
>>>> Cygport patches should better go to cygwin-apps.  I've already sent a
>>>> patch that allows you to do the same thing some time ago, but it has
>>>> not been reviewed yet.
>>>>
>>>> https://repo.or.cz/cygport/rpm-style.git/commitdiff/c6af2ca23aae5da3e99c70cf2b704430b929f431
>>>>
>>> Nice.
>>>
>>> Then, how about a commit following yours.
>> It is much less than obvious in that older patch that you can trick the owner/group information into that option.
>> I'd appreciate a simple explicit option for that.
> All right.
>
> I've simplified options to Simplify options to CYGPORT_TAR_OPTS and
> CYGPORT_TAR_EXT.
>
> https://github.com/cygwin-lem/cygport/commit/5a502cc84b8db0b47eae8b3571d363d106e74160
>
>
> This will work:
>
> CYGPORT_TAR_OPTS="--owner=foo --group=bar" cygport baz.cygport package
>
> And if you have tar >=1.31, these will also work:
>
> CYGPORT_TAR_EXT=".tar.zst" cygport baz.cygport package
>
> CYGPORT_TAR_OPTS="--owner=foo --group=bar" CYGPORT_TAR_EXT=".tar.zst" cygport baz.cygport package
I'd like to suggest, additionally to an explicit option, to set user and 
group by default, as it is also a privacy issue to spread the packager's 
user name out to the world in the tar archive.
In that case I'd use the project name (no version) for the user name and 
"cygwin" for the group name.
Thomas

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-07  7:45         ` Thomas Wolff
@ 2020-08-07 14:33           ` Lemures Lemniscati
  2020-08-07 19:09             ` ASSI
  0 siblings, 1 reply; 21+ messages in thread
From: Lemures Lemniscati @ 2020-08-07 14:33 UTC (permalink / raw)
  To: cygwin-apps

On Fri, 7 Aug 2020 09:45:34 +0200, Thomas Wolff
> Am 04.08.2020 um 22:34 schrieb Lemures Lemniscati via Cygwin-apps:
> > CYGPORT_TAR_OPTS="--owner=foo --group=bar" cygport baz.cygport package
> >
> > And if you have tar >=1.31, these will also work:
> >
> > CYGPORT_TAR_EXT=".tar.zst" cygport baz.cygport package
> >
> > CYGPORT_TAR_OPTS="--owner=foo --group=bar" CYGPORT_TAR_EXT=".tar.zst" cygport baz.cygport package
> I'd like to suggest, additionally to an explicit option, to set user and group by default, as it is also a privacy issue to spread the packager's user name out to the world in the tar archive.
> In that case I'd use the project name (no version) for the user name and "cygwin" for the group name.


Now the default is --owner=${NAME} --group=cygwin
And we can override like this

CYGPORT_TAR_OPTS="--owner=very --group=happy" cygport aaa.cygport package



On Thu, 06 Aug 2020 20:25:01 +0200, ASSI
> Lemures Lemniscati via Cygwin-apps writes:
> > Do you mean controlling with '-I' or '--use-compress-program='?
> > (And I didn't know these options of tar... oh.)
> 
> No, I was talking about things like XZ_OPT or ZSTD_CLEVEL.

I think XZ_OPT or ZSTD_CLEVEL can be passed through environment.
And this should control xz or zstd..

XZ_OPT="..." cygport foo.cygport package
ZSTD_CLEVEL="..." cygport foo.cygport package

And cygport does not prevent from passing parameter through environment.
Maybe I understand you in a wrong way. Pardon me.


But I've introduced a variable CYGPORT_TAR_FILTER to be passed to tar
with '-I' option which can contain spaces.

For example, it's ok now to invoke like this:

CYGPORT_TAR_FILTER="zstd -T0 --long --19" CYGPORT_TAR_EXT=".tar.zst" cygport aaa.cygport package


Here is the new commit revised.
https://github.com/cygwin-lem/cygport/commit/7155f24df1d6058c5c5554d28b9eeb8b2b9f1a16




Regards,

Lem


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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-06 17:13             ` Jon Turney
@ 2020-08-07 14:43               ` Lemures Lemniscati
  0 siblings, 0 replies; 21+ messages in thread
From: Lemures Lemniscati @ 2020-08-07 14:43 UTC (permalink / raw)
  To: cygwin-apps

On Thu, 6 Aug 2020 18:13:52 +0100, Jon Turney
> On 05/08/2020 22:50, Lemures Lemniscati via Cygwin-apps wrote:
> > On Wed, 5 Aug 2020 20:34:24 +0100, Jon Turney
> >>
> >> However, I think there is a consistency problem here, as other variables which should only produce a single line in the .hint file (e.g. REQUIRES, etc.) don't get whitespace canonicalized (as least, that's how it seemed to me when I briefly looked at this).
> >>
> >> Thanks for the patch.
> >
> > Thank you for reviewing.
> >
> > It would be easy to canonicalize through a functiion like
> > __single_line_list () in the commit
> > https://github.com/cygwin-lem/cygport/commit/7607782d3d1972aef6b88ee32f5211f21abbbcfb
> >
> > I'll check later for 'category:', 'requires:', 'obsoletes:',
> > 'provides:', and 'conflicts:'.
> >
> > Any other field to be checked for canonicalization?
> 
> Although it's not very clearly specified in [1], the only keys in a ..hint file for which multiline values are currently permitted are ldesc: and message:
> 
> [1] https://cygwin.com/packaging-hint-files.html

Thank you!


Here is a revised commit:

https://github.com/cygwin-lem/cygport/commit/7bd6b12ee10892b7ec18df93a51dbc274b3af968

Canonicalization of single-line fields in .hint files

We mean trimming and squeezing white spaces by 'canonicalization', here.

- Canonicalization of single-line lists:
  - category
  - requires
  - obsoletes
  - provides
  - conflicts
  - build-depends
- Canonicalization of single-line double-quoted strings:
  - sdesc
  - message


Regards, 

Lem


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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-07 14:33           ` Lemures Lemniscati
@ 2020-08-07 19:09             ` ASSI
  2020-08-08  0:43               ` Lemures Lemniscati
  0 siblings, 1 reply; 21+ messages in thread
From: ASSI @ 2020-08-07 19:09 UTC (permalink / raw)
  To: cygwin-apps

Lemures Lemniscati via Cygwin-apps writes:
>> No, I was talking about things like XZ_OPT or ZSTD_CLEVEL.
>
> I think XZ_OPT or ZSTD_CLEVEL can be passed through environment.
> And this should control xz or zstd..
>
> XZ_OPT="..." cygport foo.cygport package
> ZSTD_CLEVEL="..." cygport foo.cygport package
>
> And cygport does not prevent from passing parameter through environment.
> Maybe I understand you in a wrong way. Pardon me.

Maybe if you'd gone back to the post I sent on June 14 when I originally
offered the patch you'd have seen:

>> This patch keeps the current defaults in place, but allows one to set up
>> two environment variables to control how tar gets invoked during
>> packaging.  You could do that from either the cygport file or the
>> .cygport.conf file:
>>
>> CYGPORT_TAR_CMD="env ZSTD_CLEVEL=19 tar -I zstd --group nobody:65534 --owner nobody:65534"
>> CYGPORT_TAR_EXT=".tar.zst"

I don't want to pollute the environment for any other command obviously…
and really, I still think creating five new configuration variables to
do what can be accomplished with two isn't a good trade-off.

Factoring out the command invocation into a function probably is a net
win, though -- so I'd keep that part.  It'd probably be useful in some
other instances to so a similar refactoring.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-07 19:09             ` ASSI
@ 2020-08-08  0:43               ` Lemures Lemniscati
  2020-08-08  4:32                 ` ASSI
  0 siblings, 1 reply; 21+ messages in thread
From: Lemures Lemniscati @ 2020-08-08  0:43 UTC (permalink / raw)
  To: cygwin-apps

On Fri, 07 Aug 2020 21:09:11 +0200, ASSI
> Lemures Lemniscati via Cygwin-apps writes:
> >> No, I was talking about things like XZ_OPT or ZSTD_CLEVEL.
> >
> > I think XZ_OPT or ZSTD_CLEVEL can be passed through environment.
> > And this should control xz or zstd..
> >
> > XZ_OPT="..." cygport foo.cygport package
> > ZSTD_CLEVEL="..." cygport foo.cygport package
> >
> > And cygport does not prevent from passing parameter through environment.
> > Maybe I understand you in a wrong way. Pardon me.
> 
> Maybe if you'd gone back to the post I sent on June 14 when I originally
> offered the patch you'd have seen:
> 
> >> This patch keeps the current defaults in place, but allows one to set up
> >> two environment variables to control how tar gets invoked during
> >> packaging.  You could do that from either the cygport file or the
> >> .cygport.conf file:
> >>
> >> CYGPORT_TAR_CMD="env ZSTD_CLEVEL=19 tar -I zstd --group nobody:65534 --owner nobody:65534"
> >> CYGPORT_TAR_EXT=".tar.zst"
> 
> I don't want to pollute the environment for any other command obviously…
> and really, I still think creating five new configuration variables to
> do what can be accomplished with two isn't a good trade-off.
> 
> Factoring out the command invocation into a function probably is a net
> win, though -- so I'd keep that part.  It'd probably be useful in some
> other instances to so a similar refactoring.

Thank you for your patience, Achim.
Now I've understood.

But I feel uneasy about the usase of CYGPORT_TAR_CMD, because we must
specify 'tar' in it. It is a redundancy.



The following is a thought experiment to avoid this redundancy.


Still, a work-around is to split it into two variables CYGPORT_TAR_ENV
and CYGPORT_TAR_OPTS, and do something like 

(1)  env ${CYGPORT_TAR_ENV} tar ${CYGPORT_TAR_OPTS} ...

or 

(2)  sh -c "env ${CYGPORT_TAR_ENV} tar ${CYGPORT_TAR_OPTS} ..."


The problem is that it is demanding more keystrokes when we use both of
them:

CYGPORT_TAR_ENV="..." CYGPORT_TAR_OPTS="..." cygport zzz.cygport package


But when specifying owner/group, we can do it simply,

CYGPORT_TAR_OPTS="--group=nobody:65534 --owner=nobody:65534" cygport zzz.cygport package

or by invoking tar as (2) you would be able to specify compression level
and multi-threading like this:

CYGPORT_TAR_OPTS="-I 'zstd -19 -T2' --group=nobody:65534 --owner=nobody:65534" cygport zzz.cygport package

This looks good enough to me.


And I've looked into the GNU tar source, and found that tar calls
a compression filter through execv 'sh' '-c' ...
https://git.savannah.gnu.org/cgit/tar.git/tree/src/system.c?h=release_1_32#n26
So, I guess it is not so bad to use 'sh' '-c' here in the script like 
(2).

Regards, 

Lem

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-08  0:43               ` Lemures Lemniscati
@ 2020-08-08  4:32                 ` ASSI
  2020-08-08 11:14                   ` Lemures Lemniscati
  0 siblings, 1 reply; 21+ messages in thread
From: ASSI @ 2020-08-08  4:32 UTC (permalink / raw)
  To: cygwin-apps

Lemures Lemniscati via Cygwin-apps writes:
> But I feel uneasy about the usase of CYGPORT_TAR_CMD, because we must
> specify 'tar' in it. It is a redundancy.

It is also a way to do nefarious things, but there are already many
more such places.

> The following is a thought experiment to avoid this redundancy.
[…]

As I said, you'll end up with configuration variables for everything
except the actual command (which is found in PATH, so if I really wanted
to mess with it I could do that anyway).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-08  4:32                 ` ASSI
@ 2020-08-08 11:14                   ` Lemures Lemniscati
  2020-08-10  3:42                     ` Lemures Lemniscati
  0 siblings, 1 reply; 21+ messages in thread
From: Lemures Lemniscati @ 2020-08-08 11:14 UTC (permalink / raw)
  To: cygwin-apps

On Sat, 08 Aug 2020 06:32:06 +0200, ASSI
> Lemures Lemniscati via Cygwin-apps writes:
> > But I feel uneasy about the usase of CYGPORT_TAR_CMD, because we must
> > specify 'tar' in it. It is a redundancy.
> 
> It is also a way to do nefarious things, but there are already many
> more such places.
> 
> > The following is a thought experiment to avoid this redundancy.
> […]
> 
> As I said, you'll end up with configuration variables for everything
> except the actual command (which is found in PATH, so if I really wanted
> to mess with it I could do that anyway).

Oh, I see. My comment was maybe misleading.

My point is that it would be happy for me if it is sufficient to specify
changed parameters only.  (the point is not about avoiding wicked things).

And I guess your point of view about configuration is more general than
mine.


Now, my last wish, in this case, is that these settings, for example,
would be effective and would do well:

CYGPORT_TAR_EXT=".tar.zst"
CYGPORT_TAR_CMD="tar -I 'zstd -19 -T0'"

And, I think it will be user-friendly.


Regards,
Lem

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-08 11:14                   ` Lemures Lemniscati
@ 2020-08-10  3:42                     ` Lemures Lemniscati
  2020-08-10 19:51                       ` Achim Gratz
  0 siblings, 1 reply; 21+ messages in thread
From: Lemures Lemniscati @ 2020-08-10  3:42 UTC (permalink / raw)
  To: cygwin-apps

On Sat, 08 Aug 2020 20:14:59 +0900, Lemures Lemniscati
> On Sat, 08 Aug 2020 06:32:06 +0200, ASSI
> > Lemures Lemniscati via Cygwin-apps writes:
> > > But I feel uneasy about the usase of CYGPORT_TAR_CMD, because we must
> > > specify 'tar' in it. It is a redundancy.
> > 
> > It is also a way to do nefarious things, but there are already many
> > more such places.
> > 
> > > The following is a thought experiment to avoid this redundancy.
> > […]
> > 
> > As I said, you'll end up with configuration variables for everything
> > except the actual command (which is found in PATH, so if I really wanted
> > to mess with it I could do that anyway).
> 
> Oh, I see. My comment was maybe misleading.
> 
> My point is that it would be happy for me if it is sufficient to specify
> changed parameters only.  (the point is not about avoiding wicked things).
> 
> And I guess your point of view about configuration is more general than
> mine.
> 
> 
> Now, my last wish, in this case, is that these settings, for example,
> would be effective and would do well:
> 
> CYGPORT_TAR_EXT=".tar.zst"
> CYGPORT_TAR_CMD="tar -I 'zstd -19 -T0'"
> 
> And, I think it will be user-friendly.
> 
> 
> Regards,
> Lem


Now, I suggest another patch, so that both of the following invocations
work [1].


CYGPORT_TAR_EXT=".tar.zst" CYGPORT_TAR_CMD="env ZSTD_CLEVEL=19 tar -I zstd --group nobody:65534 --owner nobody:65534" cygport foo.cygport package

CYGPORT_TAR_EXT=".tar.zst" CYGPORT_TAR_CMD="tar -I 'zstd -19 -T0' --group nobody:65534 --owner nobody:65534" cygport foo.cygport package


[1]: https://github.com/cygwin-lem/cygport/commit/7ae236b524fa5f5b27f9773cdf21ee4f6624a53b

Regards,
Lem

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-10  3:42                     ` Lemures Lemniscati
@ 2020-08-10 19:51                       ` Achim Gratz
  2020-08-10 21:45                         ` Lemures Lemniscati
  0 siblings, 1 reply; 21+ messages in thread
From: Achim Gratz @ 2020-08-10 19:51 UTC (permalink / raw)
  To: cygwin-apps

Lemures Lemniscati via Cygwin-apps writes:
> [1]: https://github.com/cygwin-lem/cygport/commit/7ae236b524fa5f5b27f9773cdf21ee4f6624a53b

You set the variable CYGPORT_TAR_EXT in pkg_pkg.cygpart, then use it in
pkg_upload-cygport.  Have you verified tha the latter will have that
definition included regardless of the code path taken?


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf Blofeld V1.15B11:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

* Re: cygport: Request a new feature in order to set owner/group names in packaged tarballs.
  2020-08-10 19:51                       ` Achim Gratz
@ 2020-08-10 21:45                         ` Lemures Lemniscati
  0 siblings, 0 replies; 21+ messages in thread
From: Lemures Lemniscati @ 2020-08-10 21:45 UTC (permalink / raw)
  To: cygwin-apps

On Mon, 10 Aug 2020 21:51:35 +0200, Achim Gratz
> Lemures Lemniscati via Cygwin-apps writes:
> > [1]: https://github.com/cygwin-lem/cygport/commit/7ae236b524fa5f5b27f9773cdf21ee4f6624a53b
> 
> You set the variable CYGPORT_TAR_EXT in pkg_pkg.cygpart, then use it in
> pkg_upload-cygport.  Have you verified tha the latter will have that
> definition included regardless of the code path taken?
> 

Thank you for reviewing, Achim.


Both of pkg_pkg.cygpart and pkg_upload.cygpart are called from cygport
https://github.com/cygwin-lem/cygport/blob/7ae236b524fa5f5b27f9773cdf21ee4f6624a53b/bin/cygport.in#L325-L331

before the functions are called.
https://github.com/cygwin-lem/cygport/blob/7ae236b524fa5f5b27f9773cdf21ee4f6624a53b/bin/cygport.in#L561-L565



But, probably, configuration like this should go to a more suitable
place, as written in comments (in order to avoid concerning which you
have pointed out)
https://github.com/cygwin-lem/cygport/blob/7ae236b524fa5f5b27f9773cdf21ee4f6624a53b/lib/pkg_pkg.cygpart#L23-L24

For example, it might be placed in this part
https://github.com/cygwin-lem/cygport/blob/7ae236b524fa5f5b27f9773cdf21ee4f6624a53b/bin/cygport.in#L249-L274


Regards,
Lem

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

end of thread, other threads:[~2020-08-10 21:45 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200803205512.E3F1.50F79699@gmail.com>
     [not found] ` <87d047r0ro.fsf@Rainer.invalid>
2020-08-04 12:54   ` cygport: Request a new feature in order to set owner/group names in packaged tarballs Lemures Lemniscati
2020-08-04 13:46     ` Thomas Wolff
2020-08-04 20:34       ` Lemures Lemniscati
2020-08-05 18:31         ` ASSI
2020-08-05 21:21           ` Lemures Lemniscati
2020-08-06 18:25             ` ASSI
2020-08-07  7:45         ` Thomas Wolff
2020-08-07 14:33           ` Lemures Lemniscati
2020-08-07 19:09             ` ASSI
2020-08-08  0:43               ` Lemures Lemniscati
2020-08-08  4:32                 ` ASSI
2020-08-08 11:14                   ` Lemures Lemniscati
2020-08-10  3:42                     ` Lemures Lemniscati
2020-08-10 19:51                       ` Achim Gratz
2020-08-10 21:45                         ` Lemures Lemniscati
2020-08-04 17:02     ` ASSI
2020-08-04 20:49       ` Lemures Lemniscati
2020-08-05 19:34         ` Jon Turney
2020-08-05 21:50           ` Lemures Lemniscati
2020-08-06 17:13             ` Jon Turney
2020-08-07 14:43               ` Lemures Lemniscati

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).