[opensuse-packaging] %setup -q -a 0 for Source0 then %setup -q a 1 -n pkg-%{version}/lib but need --strip-components=1

Guys, I'm trying to package pngquant that relies on: Source0: https://github.com/kornelski/%{name}/archive/pngquant-%{version}.tar.gz Source1: https://github.com/ImageOptim/libimagequant/archive/libimagequant-%{version}.tar.gz What needs to happen is for pngquant-%{version}.tar.gz alone to be unzipped. It creates a pngquant-%{version}/lib directory that I need to unzip Source1 into. I've tried %setup -q -a 0 %setup -q -a 1 -n pngquant-%{version}/lib which unzips in the correct order, but does not provide a way to --strip-components=1 to get rid of the libimagequant-%{version} default directory. When I manually put the sources together to build, I simply tar -xzf pngquant-2.12.2.tar.gz cd pngquant-2.12.2 tar -xz --directory=./pngquant-2.12.2/lib --strip-components=1 -f ~/apps/src/libimagequant-2.12.2.tar.gz How do I tell setup to do that in a spec? -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Thursday 2019-05-02 06:50, David C. Rankin wrote:
I've tried
%setup -q -a 0 %setup -q -a 1 -n pngquant-%{version}/lib
which unzips in the correct order, but does not provide a way to --strip-components=1 to get rid of the libimagequant-%{version} default directory.
There is no way to combine %setup with --strip-components. tar -xf is the only option. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

Gesendet: Donnerstag, 02. Mai 2019 um 07:25 Uhr Von: "Jan Engelhardt" <jengelh@inai.de> An: "David C. Rankin" <drankinatty@suddenlinkmail.com> Cc: "openSuSE Packaging" <opensuse-packaging@opensuse.org> Betreff: Re: [opensuse-packaging] %setup -q -a 0 for Source0 then %setup -q a 1 -n pkg-%{version}/lib but need --strip-components=1
On Thursday 2019-05-02 06:50, David C. Rankin wrote:
I've tried
%setup -q -a 0 %setup -q -a 1 -n pngquant-%{version}/lib
which unzips in the correct order, but does not provide a way to --strip-components=1 to get rid of the libimagequant-%{version} default directory.
There is no way to combine %setup with --strip-components. tar -xf is the only option.
you need to use bsdtar if you want the strip-components option -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Thu, May 2, 2019 at 10:49 AM Axel Braun <Axel.Braun@gmx.de> wrote:
Gesendet: Donnerstag, 02. Mai 2019 um 07:25 Uhr Von: "Jan Engelhardt" <jengelh@inai.de> An: "David C. Rankin" <drankinatty@suddenlinkmail.com> Cc: "openSuSE Packaging" <opensuse-packaging@opensuse.org> Betreff: Re: [opensuse-packaging] %setup -q -a 0 for Source0 then %setup -q a 1 -n pkg-%{version}/lib but need --strip-components=1
On Thursday 2019-05-02 06:50, David C. Rankin wrote:
I've tried
%setup -q -a 0 %setup -q -a 1 -n pngquant-%{version}/lib
which unzips in the correct order, but does not provide a way to --strip-components=1 to get rid of the libimagequant-%{version} default directory.
There is no way to combine %setup with --strip-components. tar -xf is the only option.
you need to use bsdtar if you want the strip-components option
The flag has been implemented in GNU tar for quite a while... -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

Gesendet: Donnerstag, 02. Mai 2019 um 17:07 Uhr Von: "Neal Gompa" <ngompa13@gmail.com> An: "Axel Braun" <Axel.Braun@gmx.de> Cc: "openSUSE Packaging Mailingliste" <opensuse-packaging@opensuse.org> Betreff: Re: Re: [opensuse-packaging] %setup -q -a 0 for Source0 then %setup -q a 1 -n pkg-%{version}/lib but need --strip-components=1
On Thu, May 2, 2019 at 10:49 AM Axel Braun <Axel.Braun@gmx.de> wrote:
Gesendet: Donnerstag, 02. Mai 2019 um 07:25 Uhr Von: "Jan Engelhardt" <jengelh@inai.de> An: "David C. Rankin" <drankinatty@suddenlinkmail.com> Cc: "openSuSE Packaging" <opensuse-packaging@opensuse.org> Betreff: Re: [opensuse-packaging] %setup -q -a 0 for Source0 then %setup -q a 1 -n pkg-%{version}/lib but need --strip-components=1
On Thursday 2019-05-02 06:50, David C. Rankin wrote:
I've tried
%setup -q -a 0 %setup -q -a 1 -n pngquant-%{version}/lib
which unzips in the correct order, but does not provide a way to --strip-components=1 to get rid of the libimagequant-%{version} default directory.
There is no way to combine %setup with --strip-components. tar -xf is the only option.
you need to use bsdtar if you want the strip-components option
The flag has been implemented in GNU tar for quite a while...
I thought so as well.....but at least in Leap 15 it war not working with strip-components -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Thu, May 2, 2019 at 11:24 AM Axel Braun <Axel.Braun@gmx.de> wrote:
Gesendet: Donnerstag, 02. Mai 2019 um 17:07 Uhr Von: "Neal Gompa" <ngompa13@gmail.com> An: "Axel Braun" <Axel.Braun@gmx.de> Cc: "openSUSE Packaging Mailingliste" <opensuse-packaging@opensuse.org> Betreff: Re: Re: [opensuse-packaging] %setup -q -a 0 for Source0 then %setup -q a 1 -n pkg-%{version}/lib but need --strip-components=1
On Thu, May 2, 2019 at 10:49 AM Axel Braun <Axel.Braun@gmx.de> wrote:
Gesendet: Donnerstag, 02. Mai 2019 um 07:25 Uhr Von: "Jan Engelhardt" <jengelh@inai.de> An: "David C. Rankin" <drankinatty@suddenlinkmail.com> Cc: "openSuSE Packaging" <opensuse-packaging@opensuse.org> Betreff: Re: [opensuse-packaging] %setup -q -a 0 for Source0 then %setup -q a 1 -n pkg-%{version}/lib but need --strip-components=1
On Thursday 2019-05-02 06:50, David C. Rankin wrote:
I've tried
%setup -q -a 0 %setup -q -a 1 -n pngquant-%{version}/lib
which unzips in the correct order, but does not provide a way to --strip-components=1 to get rid of the libimagequant-%{version} default directory.
There is no way to combine %setup with --strip-components. tar -xf is the only option.
you need to use bsdtar if you want the strip-components option
The flag has been implemented in GNU tar for quite a while...
I thought so as well.....but at least in Leap 15 it war not working with strip-components
That's weird, it exists in GNU tar 1.26 in CentOS 7, so it doesn't make sense that it's not in openSUSE Leap 15... -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

Am Donnerstag, 2. Mai 2019, 17:24:19 CEST schrieb Axel Braun:
Gesendet: Donnerstag, 02. Mai 2019 um 17:07 Uhr Von: "Neal Gompa" <ngompa13@gmail.com> An: "Axel Braun" <Axel.Braun@gmx.de> Cc: "openSUSE Packaging Mailingliste" <opensuse-packaging@opensuse.org> Betreff: Re: Re: [opensuse-packaging] %setup -q -a 0 for Source0 then %setup -q a 1 -n pkg-%{version}/lib but need --strip-components=1> On Thu, May 2, 2019 at 10:49 AM Axel Braun <Axel.Braun@gmx.de> wrote:
Gesendet: Donnerstag, 02. Mai 2019 um 07:25 Uhr Von: "Jan Engelhardt" <jengelh@inai.de> An: "David C. Rankin" <drankinatty@suddenlinkmail.com> Cc: "openSuSE Packaging" <opensuse-packaging@opensuse.org> Betreff: Re: [opensuse-packaging] %setup -q -a 0 for Source0 then %setup -q a 1 -n pkg-%{version}/lib but need --strip-components=1> > > On Thursday 2019-05-02 06:50, David C. Rankin wrote:
I've tried
%setup -q -a 0 %setup -q -a 1 -n pngquant-%{version}/lib
which unzips in the correct order, but does not provide a way to --strip-components=1 to get rid of the libimagequant-%{version} default directory.> > > There is no way to combine %setup with --strip-components. tar -xf is the only option.
you need to use bsdtar if you want the strip-components option
The flag has been implemented in GNU tar for quite a while...
I thought so as well.....but at least in Leap 15 it war not working with strip-components
Correction, I found it - problem was in TW end of February: As part of a script the command tar --strip-components 3 -xzf /tmp/${lang_file} || bailout failed with ... gzip: stdin has more than one entry - rest ignored tar: This does not look like a tar archive tar: Skipping to next header tar: Child returned status 2 running the same command with bsdtar worked, and w/o the strip-compnents it worked as well if I remember right -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

Hello, On Wed, 01 May 2019, David C. Rankin wrote:
I'm trying to package pngquant that relies on:
Source0: https://github.com/kornelski/%{name}/archive/pngquant-%{version}.tar.gz Source1: https://github.com/ImageOptim/libimagequant/archive/libimagequant-%{version}.tar.gz
What needs to happen is for pngquant-%{version}.tar.gz alone to be unzipped. It creates a pngquant-%{version}/lib directory that I need to unzip Source1 into.
I've tried
%setup -q -a 0 %setup -q -a 1 -n pngquant-%{version}/lib
which unzips in the correct order, but does not provide a way to --strip-components=1 to get rid of the libimagequant-%{version} default directory.
I usually just be pragmatic and extract and then create symlinks. In this case: ==== %setup -q -a 1 rm -rf lib ln -s libimagequant-%{version} lib ==== or something. Or extract manually as suggested by Jan. But there's a better way, you've got a pending sr... https://build.opensuse.org/request/show/700043 That %doc COPYRIGHT line should be changed to %license COPYRIGHT once you drop 13.x support. Or I backport the %license stuff ;) HTH, -dnh -- Writing non-free software is not an ethically legitimate activity, so if people who do this run into trouble, that's good! All businesses based on non-free software ought to fail, and the sooner the better. -- Richard Stallman -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Thursday 2019-05-02 10:39, David Haller wrote:
I'm trying to package pngquant that relies on:
Source0: https://github.com/kornelski/%{name}/archive/pngquant-%{version}.tar.gz Source1: https://github.com/ImageOptim/libimagequant/archive/libimagequant-%{version}.tar.gz
I've tried %setup -q -a 0 %setup -q -a 1 -n pngquant-%{version}/lib
which unzips in the correct order, but does not provide a way to --strip-components=1 to get rid of the libimagequant-%{version} default directory. [...] But there's a better way, you've got a pending sr... https://build.opensuse.org/request/show/700043
Moreover to the SR ("initial package for opensuse"), we _already_ have imagequant and pngquant in the graphics/ project, without any %setup or --strip-component hacks. Isn't that good enough? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On 05/02/2019 06:41 AM, Jan Engelhardt wrote:
[...] But there's a better way, you've got a pending sr... https://build.opensuse.org/request/show/700043 Moreover to the SR ("initial package for opensuse"), we _already_ have imagequant and pngquant in the graphics/ project, without any %setup or --strip-component hacks. Isn't that good enough?
Thank you Jan and dnh (all) for all the info. I didn't find pngquant when I looked for it. My webpin-foo is slipping.... If it's already packaged, we are golden, no need to duplicated it. I just had a note on the KDE3 list that after Felix and I looked at the package, I was going to "get around to" packaging it.... Slowly I did.... I'll check out the one in the graphics project. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On 04/05/2019 02:07, David C. Rankin wrote:
Thank you Jan and dnh (all) for all the info. I didn't find pngquant when I looked for it. My webpin-foo is slipping....
Try "Maintainer Finder Tool" https://maintainer.zq1.de/# I use it all the time. Regards Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On 05/02/2019 03:39 AM, David Haller wrote:
I usually just be pragmatic and extract and then create symlinks. In this case:
==== %setup -q -a 1 rm -rf lib ln -s libimagequant-%{version} lib ====
or something. Or extract manually as suggested by Jan.
But there's a better way, you've got a pending sr... https://build.opensuse.org/request/show/700043
That
%doc COPYRIGHT
line should be changed to
%license COPYRIGHT
once you drop 13.x support. Or I backport the %license stuff ;)
Thank you dnh, Both for the good info here and for the clean up on the spec in the request. (I hope I didn't screw up accepting it somehow on buildservice -- I'm never quite sure what that interface is doing behind the scenes...) So from your cleanup, removing the manual gzipping of the man1 page on the install, that means that the man1 page is automatically gzipped? I notice all 42.3+ pages are gzipped, and I think I can recall from the distant past there were occasions when the man pages were a mix of gzipped and non-gzipped pages. (that's what prompted me to manually gzip it before I installed it, I didn't want to be the one who forgot to zip it) Good learning on this one with the separate lib source needing to be shoehorned into the ./lib directory before the build. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On 05/02/2019 05:10 AM, Stefan Brüns wrote:
Use the package from the graphics repo ...
Agreed, But question, how would I have found it now before I start packaging. I searched https://software.opensuse.org/ and it returned: "No packages found matching your search." Is there something post-webpin that will search the community and specialty repos by package name and find it? zypper is limited to added repos. software.opensuse.org checks OSS, what scans the rest? I'm not one for re-inventing the wheel if it can be avoided. -- David C. Rankin, J.D.,P.E.

Am 04.05.19 um 02:33 schrieb David C. Rankin:
On 05/02/2019 05:10 AM, Stefan Brüns wrote:
Use the package from the graphics repo ...
Agreed,
But question, how would I have found it now before I start packaging. I searched https://software.opensuse.org/ and it returned:
"No packages found matching your search."
Is there something post-webpin that will search the community and specialty repos by package name and find it? zypper is limited to added repos. software.opensuse.org checks OSS, what scans the rest?
No matches found for 'pngquant' in projects #################################################################### matches for 'pngquant' in packages: # Project # Package SUSE:SLE-15:GA pngquant graphics pngquant home:Andreas_Schwab:Factory pngquant home:csbuild:DBA pngquant home:drankinatty pngquant home:frost_ii pngquant home:munix9 pngquant isv:perlur:epel pngquant openSUSE:Factory pngquant openSUSE:Factory:Rings:1-MinimalX pngquant openSUSE:Leap:15.0 pngquant openSUSE:Leap:15.0:Rings:1-MinimalX pngquant openSUSE:Leap:15.1 pngquant openSUSE:Leap:15.1:Rings:1-MinimalX pngquant seife@strolchi:~> -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

Hi, I just noticed that for some reason the command that I issued die not show up in the mail m-( Am 04.05.19 um 09:34 schrieb Stefan Seyfried:
Am 04.05.19 um 02:33 schrieb David C. Rankin:
On 05/02/2019 05:10 AM, Stefan Brüns wrote:
Use the package from the graphics repo ...
Agreed,
But question, how would I have found it now before I start packaging. I searched https://software.opensuse.org/ and it returned:
"No packages found matching your search."
Is there something post-webpin that will search the community and specialty repos by package name and find it? zypper is limited to added repos. software.opensuse.org checks OSS, what scans the rest?
seife@strolchi:~> osc se pngquant
No matches found for 'pngquant' in projects #################################################################### matches for 'pngquant' in packages:
# Project # Package SUSE:SLE-15:GA pngquant graphics pngquant home:Andreas_Schwab:Factory pngquant home:csbuild:DBA pngquant home:drankinatty pngquant home:frost_ii pngquant home:munix9 pngquant isv:perlur:epel pngquant openSUSE:Factory pngquant openSUSE:Factory:Rings:1-MinimalX pngquant openSUSE:Leap:15.0 pngquant openSUSE:Leap:15.0:Rings:1-MinimalX pngquant openSUSE:Leap:15.1 pngquant openSUSE:Leap:15.1:Rings:1-MinimalX pngquant seife@strolchi:~>
Best regards, -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (9)
-
Axel Braun
-
Axel Braun
-
Dave Plater
-
David C. Rankin
-
David Haller
-
Jan Engelhardt
-
Neal Gompa
-
Stefan Brüns
-
Stefan Seyfried