Re: [packages/php] - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16), we have fully transiti

2021-05-15 Thread Neal Gompa
On Sat, May 15, 2021 at 12:08 PM Jan Palus  wrote:
>
> On 15.05.2021 11:44, Neal Gompa wrote:
> > On Sat, May 15, 2021 at 10:41 AM Adam Gołębiowski  
> > wrote:
> > >
> > >
> > > W dniu 2021-05-15 o 15:26, Neal Gompa pisze:
> > > > On Sat, May 15, 2021 at 6:23 AM Adam Gołębiowski  
> > > > wrote:
> > > >>
> > > >> W dniu 2021-05-15 o 11:52, Neal Gompa pisze:
> > > >>> On Sat, May 15, 2021 at 5:38 AM Adam Gołębiowski 
> > > >>>  wrote:
> > >  W dniu 2021-05-13 o 21:32, Elan Ruusamäe pisze:
> > > 
> > > > point of that guard was to wait for support to become available or
> > > > someone implement a solution.
> > > > (...)
> > > > but as no such solution as provided, you need to update obsoletes to
> > > > fill **all** package names that provide that file path.
> > > >
> > > > I refuse to do that myself as it's pretty stupid.
> > >  ugly, for sure, but unless we come up with another solution (patching
> > >  rpm to support Obsoletes: /path), we will need to maintain 11 
> > >  Obsoletes:
> > >  lines per package ...
> > > 
> > > >>> What problem are you trying to solve here? I'm not sure I understand
> > > >>> why you're doing this.
> > > >> Each of the php*-program packages provide /usr/bin/php symlink:
> > > >>
> > > >> /poldek:/all-avail> install phpcsProcessing 
> > > >> dependencies...phpcs-3.4.1-2.noarch: required "/usr/bin/php" is 
> > > >> provided by the
> > > >> following packages:a) php4-program-4.4.9-67.x86_64b) 
> > > >> php52-program-5.2.17-20130717.35.x86_64c) 
> > > >> php53-program-5.3.29-52.x86_64d) 
> > > >> php54-program-5.4.45-30.x86_64e) 
> > > >> php55-program-5.5.38-22.x86_64f) 
> > > >> php56-program-5.6.40-9.x86_64g) 
> > > >> php70-program-7.0.33-8.x86_64h) 
> > > >> php71-program-7.1.33-3.x86_64i) 
> > > >> php72-program-7.2.34-1.x86_64j) 
> > > >> php73-program-7.3.24-1.x86_64k) 
> > > >> php74-program-7.4.12-2.x86_64l) 
> > > >> php80-program-8.0.0-2.x86_64Which one do you want to install ('Q' 
> > > >> to abort)?
> > > >> [php4-program-4.4.9-67.x86_64]/
> > > >>
> > > >>
> > > >>
> > > >> Prior to rpm switch, each of those packages also had Obsoletes: 
> > > >> /usr/bin/php so that you could easily switch the provider of 
> > > >> /usr/bin/php symlinkL
> > > >> /poldek:/all-avail> install php80-program-8.0.0-2.x86_64///
> > > >>
> > > >> /Loading [pndir]th-2020-updates...
> > > >> Loading [pndir]th-2020-updates...
> > > >> Loading [pndir]th-2020...
> > > >> Loading [pndir]th-2020...
> > > >> 29952 packages read
> > > >> Processing dependencies...
> > > >> php80-program-8.0.0-2.x86_64 marks php80-cli-8.0.0-2.x86_64 (cap
> > > >> php80-cli = 4:8.0.0-2)
> > > >>php80-cli-8.0.0-2.x86_64 marks php80-common-8.0.0-2.x86_64 (cap
> > > >> /etc/php80)
> > > >> There are 3 packages to install (2 marked by dependencies):
> > > >> A php80-cli-8.0.0-2.x86_64  php80-common-8.0.0-2.x86_64
> > > >> php80-program-8.0.0-2.x86_64
> > > >> This operation will use 4.6MB of disk space.
> > > >> Need to get 1.4MB of archives (1.4MB to download).
> > > >>
> > > >> [1/3] th-2020::php80-common-8.0.0-2.x86_64.rpm [1.4M (1.4M/s)]
> > > >> [2/3] th-2020::php80-cli-8.0.0-2.x86_64.rpm [51.7K (51.7K/s)]
> > > >> [3/3] th-2020::php80-program-8.0.0-2.x86_64.rpm [5.0K (5.0K/s)]
> > > >> Executing pm-command.sh --upgrade -vh --root / --define
> > > >> _check_dirname_deps 1...
> > > >> error: failed to open /etc/mtab: No such file or directory
> > > >> Preparing... ### [100%]
> > > >> Repackaging...
> > > >>  1:php72-program ### [100%]
> > > >> Upgrading...
> > > >>  1:php80-common ### [ 33%]
> > > >>  2:php80-cli ### [ 67%]
> > > >>  3:php80-program ### [100%]
> > > >> poldek:/all-avail>/
> > > >>
> > > >>
> > > >> But rpm-4 no longer allows / in Obsoletes:
> > > >>
> > > >> /Illegal char '/' (0x2f) in: Obsoletes: /usr/bin/php /
> > > >>
> > > >> Which makes this smooth transition no longer possible:
> > > >>
> > > >> /poldek:/all-avail> install php73-program-7.3.27-1.x86_64//
> > > >> //Processing dependencies...//
> > > >> //php73-program-7.3.27-1.x86_64 marks php73-cli-7.3.27-1.x86_64 (cap
> > > >> php73-cli = 4:7.3.27-1)//
> > > >> // php73-cli-7.3.27-1.x86_64 marks php73-common-7.3.27-1.x86_64 (cap
> > > >> libphp_common-7.3.27.so()(64bit))//
> > > >> //There are 3 packages to install (2 marked by dependencies)://
> > > >> //A php73-cli-7.3.27-1.x86_64 php73-common-7.3.27-1.x86_64
> > > >> php73-program-7.3.27-1.x86_64//
> > > >> //This operation will use 4.2MB of disk space.//
> > > >> //Need to get 1.2MB of archives.//
> > > >> //php73-common-7.3.27-1.x86_64.rpm: digests OK//
> > > >> //php73-cli-7.3.27-1.x86_64.rpm: digests OK//
> > > >> //php73-program-7.3.27-1.x86_64.rpm: 

Re: [packages/php] - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16), we have fully transiti

2021-05-15 Thread Jan Palus
On 15.05.2021 11:44, Neal Gompa wrote:
> On Sat, May 15, 2021 at 10:41 AM Adam Gołębiowski  wrote:
> >
> >
> > W dniu 2021-05-15 o 15:26, Neal Gompa pisze:
> > > On Sat, May 15, 2021 at 6:23 AM Adam Gołębiowski  
> > > wrote:
> > >>
> > >> W dniu 2021-05-15 o 11:52, Neal Gompa pisze:
> > >>> On Sat, May 15, 2021 at 5:38 AM Adam Gołębiowski  
> > >>> wrote:
> >  W dniu 2021-05-13 o 21:32, Elan Ruusamäe pisze:
> > 
> > > point of that guard was to wait for support to become available or
> > > someone implement a solution.
> > > (...)
> > > but as no such solution as provided, you need to update obsoletes to
> > > fill **all** package names that provide that file path.
> > >
> > > I refuse to do that myself as it's pretty stupid.
> >  ugly, for sure, but unless we come up with another solution (patching
> >  rpm to support Obsoletes: /path), we will need to maintain 11 
> >  Obsoletes:
> >  lines per package ...
> > 
> > >>> What problem are you trying to solve here? I'm not sure I understand
> > >>> why you're doing this.
> > >> Each of the php*-program packages provide /usr/bin/php symlink:
> > >>
> > >> /poldek:/all-avail> install phpcsProcessing 
> > >> dependencies...phpcs-3.4.1-2.noarch: required "/usr/bin/php" is 
> > >> provided by the
> > >> following packages:a) php4-program-4.4.9-67.x86_64b) 
> > >> php52-program-5.2.17-20130717.35.x86_64c) 
> > >> php53-program-5.3.29-52.x86_64d) 
> > >> php54-program-5.4.45-30.x86_64e) 
> > >> php55-program-5.5.38-22.x86_64f) php56-program-5.6.40-9.x86_64g) 
> > >> php70-program-7.0.33-8.x86_64h) php71-program-7.1.33-3.x86_64i) 
> > >> php72-program-7.2.34-1.x86_64j) php73-program-7.3.24-1.x86_64k) 
> > >> php74-program-7.4.12-2.x86_64l) 
> > >> php80-program-8.0.0-2.x86_64Which one do you want to install ('Q' to 
> > >> abort)?
> > >> [php4-program-4.4.9-67.x86_64]/
> > >>
> > >>
> > >>
> > >> Prior to rpm switch, each of those packages also had Obsoletes: 
> > >> /usr/bin/php so that you could easily switch the provider of 
> > >> /usr/bin/php symlinkL
> > >> /poldek:/all-avail> install php80-program-8.0.0-2.x86_64///
> > >>
> > >> /Loading [pndir]th-2020-updates...
> > >> Loading [pndir]th-2020-updates...
> > >> Loading [pndir]th-2020...
> > >> Loading [pndir]th-2020...
> > >> 29952 packages read
> > >> Processing dependencies...
> > >> php80-program-8.0.0-2.x86_64 marks php80-cli-8.0.0-2.x86_64 (cap
> > >> php80-cli = 4:8.0.0-2)
> > >>php80-cli-8.0.0-2.x86_64 marks php80-common-8.0.0-2.x86_64 (cap
> > >> /etc/php80)
> > >> There are 3 packages to install (2 marked by dependencies):
> > >> A php80-cli-8.0.0-2.x86_64  php80-common-8.0.0-2.x86_64
> > >> php80-program-8.0.0-2.x86_64
> > >> This operation will use 4.6MB of disk space.
> > >> Need to get 1.4MB of archives (1.4MB to download).
> > >>
> > >> [1/3] th-2020::php80-common-8.0.0-2.x86_64.rpm [1.4M (1.4M/s)]
> > >> [2/3] th-2020::php80-cli-8.0.0-2.x86_64.rpm [51.7K (51.7K/s)]
> > >> [3/3] th-2020::php80-program-8.0.0-2.x86_64.rpm [5.0K (5.0K/s)]
> > >> Executing pm-command.sh --upgrade -vh --root / --define
> > >> _check_dirname_deps 1...
> > >> error: failed to open /etc/mtab: No such file or directory
> > >> Preparing... ### [100%]
> > >> Repackaging...
> > >>  1:php72-program ### [100%]
> > >> Upgrading...
> > >>  1:php80-common ### [ 33%]
> > >>  2:php80-cli ### [ 67%]
> > >>  3:php80-program ### [100%]
> > >> poldek:/all-avail>/
> > >>
> > >>
> > >> But rpm-4 no longer allows / in Obsoletes:
> > >>
> > >> /Illegal char '/' (0x2f) in: Obsoletes: /usr/bin/php /
> > >>
> > >> Which makes this smooth transition no longer possible:
> > >>
> > >> /poldek:/all-avail> install php73-program-7.3.27-1.x86_64//
> > >> //Processing dependencies...//
> > >> //php73-program-7.3.27-1.x86_64 marks php73-cli-7.3.27-1.x86_64 (cap
> > >> php73-cli = 4:7.3.27-1)//
> > >> // php73-cli-7.3.27-1.x86_64 marks php73-common-7.3.27-1.x86_64 (cap
> > >> libphp_common-7.3.27.so()(64bit))//
> > >> //There are 3 packages to install (2 marked by dependencies)://
> > >> //A php73-cli-7.3.27-1.x86_64 php73-common-7.3.27-1.x86_64
> > >> php73-program-7.3.27-1.x86_64//
> > >> //This operation will use 4.2MB of disk space.//
> > >> //Need to get 1.2MB of archives.//
> > >> //php73-common-7.3.27-1.x86_64.rpm: digests OK//
> > >> //php73-cli-7.3.27-1.x86_64.rpm: digests OK//
> > >> //php73-program-7.3.27-1.x86_64.rpm: digests OK//
> > >> //Executing pm-command.sh --upgrade -vh --root / --define
> > >> _check_dirname_deps 0...//
> > >> //Verifying... # [100%]//
> > >> //Preparing... # [100%]//
> > >> //file /usr/bin/php from install of
> > 

Re: [packages/php] - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16), we have fully transiti

2021-05-15 Thread Neal Gompa
On Sat, May 15, 2021 at 10:41 AM Adam Gołębiowski  wrote:
>
>
> W dniu 2021-05-15 o 15:26, Neal Gompa pisze:
> > On Sat, May 15, 2021 at 6:23 AM Adam Gołębiowski  
> > wrote:
> >>
> >> W dniu 2021-05-15 o 11:52, Neal Gompa pisze:
> >>> On Sat, May 15, 2021 at 5:38 AM Adam Gołębiowski  
> >>> wrote:
>  W dniu 2021-05-13 o 21:32, Elan Ruusamäe pisze:
> 
> > point of that guard was to wait for support to become available or
> > someone implement a solution.
> > (...)
> > but as no such solution as provided, you need to update obsoletes to
> > fill **all** package names that provide that file path.
> >
> > I refuse to do that myself as it's pretty stupid.
>  ugly, for sure, but unless we come up with another solution (patching
>  rpm to support Obsoletes: /path), we will need to maintain 11 Obsoletes:
>  lines per package ...
> 
> >>> What problem are you trying to solve here? I'm not sure I understand
> >>> why you're doing this.
> >> Each of the php*-program packages provide /usr/bin/php symlink:
> >>
> >> /poldek:/all-avail> install phpcsProcessing 
> >> dependencies...phpcs-3.4.1-2.noarch: required "/usr/bin/php" is 
> >> provided by the
> >> following packages:a) php4-program-4.4.9-67.x86_64b) 
> >> php52-program-5.2.17-20130717.35.x86_64c) 
> >> php53-program-5.3.29-52.x86_64d) php54-program-5.4.45-30.x86_64e) 
> >> php55-program-5.5.38-22.x86_64f) php56-program-5.6.40-9.x86_64g) 
> >> php70-program-7.0.33-8.x86_64h) php71-program-7.1.33-3.x86_64i) 
> >> php72-program-7.2.34-1.x86_64j) php73-program-7.3.24-1.x86_64k) 
> >> php74-program-7.4.12-2.x86_64l) php80-program-8.0.0-2.x86_64Which 
> >> one do you want to install ('Q' to abort)?
> >> [php4-program-4.4.9-67.x86_64]/
> >>
> >>
> >>
> >> Prior to rpm switch, each of those packages also had Obsoletes: 
> >> /usr/bin/php so that you could easily switch the provider of /usr/bin/php 
> >> symlinkL
> >> /poldek:/all-avail> install php80-program-8.0.0-2.x86_64///
> >>
> >> /Loading [pndir]th-2020-updates...
> >> Loading [pndir]th-2020-updates...
> >> Loading [pndir]th-2020...
> >> Loading [pndir]th-2020...
> >> 29952 packages read
> >> Processing dependencies...
> >> php80-program-8.0.0-2.x86_64 marks php80-cli-8.0.0-2.x86_64 (cap
> >> php80-cli = 4:8.0.0-2)
> >>php80-cli-8.0.0-2.x86_64 marks php80-common-8.0.0-2.x86_64 (cap
> >> /etc/php80)
> >> There are 3 packages to install (2 marked by dependencies):
> >> A php80-cli-8.0.0-2.x86_64  php80-common-8.0.0-2.x86_64
> >> php80-program-8.0.0-2.x86_64
> >> This operation will use 4.6MB of disk space.
> >> Need to get 1.4MB of archives (1.4MB to download).
> >>
> >> [1/3] th-2020::php80-common-8.0.0-2.x86_64.rpm [1.4M (1.4M/s)]
> >> [2/3] th-2020::php80-cli-8.0.0-2.x86_64.rpm [51.7K (51.7K/s)]
> >> [3/3] th-2020::php80-program-8.0.0-2.x86_64.rpm [5.0K (5.0K/s)]
> >> Executing pm-command.sh --upgrade -vh --root / --define
> >> _check_dirname_deps 1...
> >> error: failed to open /etc/mtab: No such file or directory
> >> Preparing... ### [100%]
> >> Repackaging...
> >>  1:php72-program ### [100%]
> >> Upgrading...
> >>  1:php80-common ### [ 33%]
> >>  2:php80-cli ### [ 67%]
> >>  3:php80-program ### [100%]
> >> poldek:/all-avail>/
> >>
> >>
> >> But rpm-4 no longer allows / in Obsoletes:
> >>
> >> /Illegal char '/' (0x2f) in: Obsoletes: /usr/bin/php /
> >>
> >> Which makes this smooth transition no longer possible:
> >>
> >> /poldek:/all-avail> install php73-program-7.3.27-1.x86_64//
> >> //Processing dependencies...//
> >> //php73-program-7.3.27-1.x86_64 marks php73-cli-7.3.27-1.x86_64 (cap
> >> php73-cli = 4:7.3.27-1)//
> >> // php73-cli-7.3.27-1.x86_64 marks php73-common-7.3.27-1.x86_64 (cap
> >> libphp_common-7.3.27.so()(64bit))//
> >> //There are 3 packages to install (2 marked by dependencies)://
> >> //A php73-cli-7.3.27-1.x86_64 php73-common-7.3.27-1.x86_64
> >> php73-program-7.3.27-1.x86_64//
> >> //This operation will use 4.2MB of disk space.//
> >> //Need to get 1.2MB of archives.//
> >> //php73-common-7.3.27-1.x86_64.rpm: digests OK//
> >> //php73-cli-7.3.27-1.x86_64.rpm: digests OK//
> >> //php73-program-7.3.27-1.x86_64.rpm: digests OK//
> >> //Executing pm-command.sh --upgrade -vh --root / --define
> >> _check_dirname_deps 0...//
> >> //Verifying... # [100%]//
> >> //Preparing... # [100%]//
> >> //file /usr/bin/php from install of
> >> php73-program-4:7.3.27-1.x86_64 conflicts with file from package
> >> php74-program-4:7.4.19-1.1.x86_64//
> >> //file /usr/share/man/man1/php.1 from install of
> >> php73-program-4:7.3.27-1.x86_64 conflicts with file from package
> >> 

Re: [packages/php] - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16), we have fully transiti

2021-05-15 Thread Adam Gołębiowski


W dniu 2021-05-15 o 15:26, Neal Gompa pisze:

On Sat, May 15, 2021 at 6:23 AM Adam Gołębiowski  wrote:


W dniu 2021-05-15 o 11:52, Neal Gompa pisze:

On Sat, May 15, 2021 at 5:38 AM Adam Gołębiowski  wrote:

W dniu 2021-05-13 o 21:32, Elan Ruusamäe pisze:


point of that guard was to wait for support to become available or
someone implement a solution.
(...)
but as no such solution as provided, you need to update obsoletes to
fill **all** package names that provide that file path.

I refuse to do that myself as it's pretty stupid.

ugly, for sure, but unless we come up with another solution (patching
rpm to support Obsoletes: /path), we will need to maintain 11 Obsoletes:
lines per package ...


What problem are you trying to solve here? I'm not sure I understand
why you're doing this.

Each of the php*-program packages provide /usr/bin/php symlink:

/poldek:/all-avail> install phpcsProcessing dependencies...phpcs-3.4.1-2.noarch: 
required "/usr/bin/php" is provided by the
following packages:a) php4-program-4.4.9-67.x86_64b) 
php52-program-5.2.17-20130717.35.x86_64c) 
php53-program-5.3.29-52.x86_64d) php54-program-5.4.45-30.x86_64e) 
php55-program-5.5.38-22.x86_64f) php56-program-5.6.40-9.x86_64g) 
php70-program-7.0.33-8.x86_64h) php71-program-7.1.33-3.x86_64i) 
php72-program-7.2.34-1.x86_64j) php73-program-7.3.24-1.x86_64k) 
php74-program-7.4.12-2.x86_64l) php80-program-8.0.0-2.x86_64Which one 
do you want to install ('Q' to abort)?
[php4-program-4.4.9-67.x86_64]/



Prior to rpm switch, each of those packages also had Obsoletes: /usr/bin/php so 
that you could easily switch the provider of /usr/bin/php symlinkL
/poldek:/all-avail> install php80-program-8.0.0-2.x86_64///

/Loading [pndir]th-2020-updates...
Loading [pndir]th-2020-updates...
Loading [pndir]th-2020...
Loading [pndir]th-2020...
29952 packages read
Processing dependencies...
php80-program-8.0.0-2.x86_64 marks php80-cli-8.0.0-2.x86_64 (cap
php80-cli = 4:8.0.0-2)
   php80-cli-8.0.0-2.x86_64 marks php80-common-8.0.0-2.x86_64 (cap
/etc/php80)
There are 3 packages to install (2 marked by dependencies):
A php80-cli-8.0.0-2.x86_64  php80-common-8.0.0-2.x86_64
php80-program-8.0.0-2.x86_64
This operation will use 4.6MB of disk space.
Need to get 1.4MB of archives (1.4MB to download).

[1/3] th-2020::php80-common-8.0.0-2.x86_64.rpm [1.4M (1.4M/s)]
[2/3] th-2020::php80-cli-8.0.0-2.x86_64.rpm [51.7K (51.7K/s)]
[3/3] th-2020::php80-program-8.0.0-2.x86_64.rpm [5.0K (5.0K/s)]
Executing pm-command.sh --upgrade -vh --root / --define
_check_dirname_deps 1...
error: failed to open /etc/mtab: No such file or directory
Preparing... ### [100%]
Repackaging...
 1:php72-program ### [100%]
Upgrading...
 1:php80-common ### [ 33%]
 2:php80-cli ### [ 67%]
 3:php80-program ### [100%]
poldek:/all-avail>/


But rpm-4 no longer allows / in Obsoletes:

/Illegal char '/' (0x2f) in: Obsoletes: /usr/bin/php /

Which makes this smooth transition no longer possible:

/poldek:/all-avail> install php73-program-7.3.27-1.x86_64//
//Processing dependencies...//
//php73-program-7.3.27-1.x86_64 marks php73-cli-7.3.27-1.x86_64 (cap
php73-cli = 4:7.3.27-1)//
// php73-cli-7.3.27-1.x86_64 marks php73-common-7.3.27-1.x86_64 (cap
libphp_common-7.3.27.so()(64bit))//
//There are 3 packages to install (2 marked by dependencies)://
//A php73-cli-7.3.27-1.x86_64 php73-common-7.3.27-1.x86_64
php73-program-7.3.27-1.x86_64//
//This operation will use 4.2MB of disk space.//
//Need to get 1.2MB of archives.//
//php73-common-7.3.27-1.x86_64.rpm: digests OK//
//php73-cli-7.3.27-1.x86_64.rpm: digests OK//
//php73-program-7.3.27-1.x86_64.rpm: digests OK//
//Executing pm-command.sh --upgrade -vh --root / --define
_check_dirname_deps 0...//
//Verifying... # [100%]//
//Preparing... # [100%]//
//file /usr/bin/php from install of
php73-program-4:7.3.27-1.x86_64 conflicts with file from package
php74-program-4:7.4.19-1.1.x86_64//
//file /usr/share/man/man1/php.1 from install of
php73-program-4:7.3.27-1.x86_64 conflicts with file from package
php74-program-4:7.4.19-1.1.x86_64//
//There were errors//
//poldek:/all-avail>/

To keep what we had with rpm5 , we either need to patch rpm, or add 11
(as of today) Obsoletes: php${ver}-program  lines to each spec.

RPM supports using Provides+Conflicts to represent this issue.

Provides: php-interpreter
Conflicts: php-interpreter

When this is set, RPM knows that one and only one implementation
providing "php-interpreter" is permitted and permits swapping them.


Nope, this does seem to not work like that:

[adamg@pld-xcp-ng RPMS]$ rpm -q --provides php80-program
php-interpreter
php80-program = 4:8.0.6-1.2

Re: [packages/php] - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16), we have fully transiti

2021-05-15 Thread Neal Gompa
On Sat, May 15, 2021 at 6:23 AM Adam Gołębiowski  wrote:
>
>
> W dniu 2021-05-15 o 11:52, Neal Gompa pisze:
> > On Sat, May 15, 2021 at 5:38 AM Adam Gołębiowski  
> > wrote:
> >>
> >> W dniu 2021-05-13 o 21:32, Elan Ruusamäe pisze:
> >>
> >>> point of that guard was to wait for support to become available or
> >>> someone implement a solution.
> >>> (...)
> >>> but as no such solution as provided, you need to update obsoletes to
> >>> fill **all** package names that provide that file path.
> >>>
> >>> I refuse to do that myself as it's pretty stupid.
> >> ugly, for sure, but unless we come up with another solution (patching
> >> rpm to support Obsoletes: /path), we will need to maintain 11 Obsoletes:
> >> lines per package ...
> >>
> > What problem are you trying to solve here? I'm not sure I understand
> > why you're doing this.
>
> Each of the php*-program packages provide /usr/bin/php symlink:
>
> /poldek:/all-avail> install phpcsProcessing 
> dependencies...phpcs-3.4.1-2.noarch: required "/usr/bin/php" is provided 
> by the
> following packages:a) php4-program-4.4.9-67.x86_64b) 
> php52-program-5.2.17-20130717.35.x86_64c) 
> php53-program-5.3.29-52.x86_64d) php54-program-5.4.45-30.x86_64e) 
> php55-program-5.5.38-22.x86_64f) php56-program-5.6.40-9.x86_64g) 
> php70-program-7.0.33-8.x86_64h) php71-program-7.1.33-3.x86_64i) 
> php72-program-7.2.34-1.x86_64j) php73-program-7.3.24-1.x86_64k) 
> php74-program-7.4.12-2.x86_64l) php80-program-8.0.0-2.x86_64Which one 
> do you want to install ('Q' to abort)?
> [php4-program-4.4.9-67.x86_64]/
>
>
>
> Prior to rpm switch, each of those packages also had Obsoletes: /usr/bin/php 
> so that you could easily switch the provider of /usr/bin/php symlinkL
> /poldek:/all-avail> install php80-program-8.0.0-2.x86_64///
>
> /Loading [pndir]th-2020-updates...
> Loading [pndir]th-2020-updates...
> Loading [pndir]th-2020...
> Loading [pndir]th-2020...
> 29952 packages read
> Processing dependencies...
> php80-program-8.0.0-2.x86_64 marks php80-cli-8.0.0-2.x86_64 (cap
> php80-cli = 4:8.0.0-2)
>   php80-cli-8.0.0-2.x86_64 marks php80-common-8.0.0-2.x86_64 (cap
> /etc/php80)
> There are 3 packages to install (2 marked by dependencies):
> A php80-cli-8.0.0-2.x86_64  php80-common-8.0.0-2.x86_64
> php80-program-8.0.0-2.x86_64
> This operation will use 4.6MB of disk space.
> Need to get 1.4MB of archives (1.4MB to download).
>
> [1/3] th-2020::php80-common-8.0.0-2.x86_64.rpm [1.4M (1.4M/s)]
> [2/3] th-2020::php80-cli-8.0.0-2.x86_64.rpm [51.7K (51.7K/s)]
> [3/3] th-2020::php80-program-8.0.0-2.x86_64.rpm [5.0K (5.0K/s)]
> Executing pm-command.sh --upgrade -vh --root / --define
> _check_dirname_deps 1...
> error: failed to open /etc/mtab: No such file or directory
> Preparing... ### [100%]
> Repackaging...
> 1:php72-program ### [100%]
> Upgrading...
> 1:php80-common ### [ 33%]
> 2:php80-cli ### [ 67%]
> 3:php80-program ### [100%]
> poldek:/all-avail>/
>
>
> But rpm-4 no longer allows / in Obsoletes:
>
> /Illegal char '/' (0x2f) in: Obsoletes: /usr/bin/php /
>
> Which makes this smooth transition no longer possible:
>
> /poldek:/all-avail> install php73-program-7.3.27-1.x86_64//
> //Processing dependencies...//
> //php73-program-7.3.27-1.x86_64 marks php73-cli-7.3.27-1.x86_64 (cap
> php73-cli = 4:7.3.27-1)//
> // php73-cli-7.3.27-1.x86_64 marks php73-common-7.3.27-1.x86_64 (cap
> libphp_common-7.3.27.so()(64bit))//
> //There are 3 packages to install (2 marked by dependencies)://
> //A php73-cli-7.3.27-1.x86_64 php73-common-7.3.27-1.x86_64
> php73-program-7.3.27-1.x86_64//
> //This operation will use 4.2MB of disk space.//
> //Need to get 1.2MB of archives.//
> //php73-common-7.3.27-1.x86_64.rpm: digests OK//
> //php73-cli-7.3.27-1.x86_64.rpm: digests OK//
> //php73-program-7.3.27-1.x86_64.rpm: digests OK//
> //Executing pm-command.sh --upgrade -vh --root / --define
> _check_dirname_deps 0...//
> //Verifying... # [100%]//
> //Preparing... # [100%]//
> //file /usr/bin/php from install of
> php73-program-4:7.3.27-1.x86_64 conflicts with file from package
> php74-program-4:7.4.19-1.1.x86_64//
> //file /usr/share/man/man1/php.1 from install of
> php73-program-4:7.3.27-1.x86_64 conflicts with file from package
> php74-program-4:7.4.19-1.1.x86_64//
> //There were errors//
> //poldek:/all-avail>/
>
> To keep what we had with rpm5 , we either need to patch rpm, or add 11
> (as of today) Obsoletes: php${ver}-program  lines to each spec.

RPM supports using Provides+Conflicts to represent this issue.

Provides: php-interpreter
Conflicts: php-interpreter

When this is set, RPM knows that one and only one implementation
providing "php-interpreter" 

Re: [packages/php] - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16), we have fully transiti

2021-05-15 Thread Adam Gołębiowski


W dniu 2021-05-15 o 11:52, Neal Gompa pisze:

On Sat, May 15, 2021 at 5:38 AM Adam Gołębiowski  wrote:


W dniu 2021-05-13 o 21:32, Elan Ruusamäe pisze:


point of that guard was to wait for support to become available or
someone implement a solution.
(...)
but as no such solution as provided, you need to update obsoletes to
fill **all** package names that provide that file path.

I refuse to do that myself as it's pretty stupid.

ugly, for sure, but unless we come up with another solution (patching
rpm to support Obsoletes: /path), we will need to maintain 11 Obsoletes:
lines per package ...


What problem are you trying to solve here? I'm not sure I understand
why you're doing this.


Each of the php*-program packages provide /usr/bin/php symlink:

/poldek:/all-avail> install phpcsProcessing dependencies...phpcs-3.4.1-2.noarch: required "/usr/bin/php" is provided by the 
following packages:a) php4-program-4.4.9-67.x86_64b) php52-program-5.2.17-20130717.35.x86_64c) php53-program-5.3.29-52.x86_64d) php54-program-5.4.45-30.x86_64e) php55-program-5.5.38-22.x86_64f) php56-program-5.6.40-9.x86_64g) php70-program-7.0.33-8.x86_64h) php71-program-7.1.33-3.x86_64i) php72-program-7.2.34-1.x86_64j) php73-program-7.3.24-1.x86_64k) php74-program-7.4.12-2.x86_64l) php80-program-8.0.0-2.x86_64Which one do you want to install ('Q' to abort)? 
[php4-program-4.4.9-67.x86_64]/




Prior to rpm switch, each of those packages also had Obsoletes: /usr/bin/php so 
that you could easily switch the provider of /usr/bin/php symlinkL
/poldek:/all-avail> install php80-program-8.0.0-2.x86_64///

/Loading [pndir]th-2020-updates...
Loading [pndir]th-2020-updates...
Loading [pndir]th-2020...
Loading [pndir]th-2020...
29952 packages read
Processing dependencies...
php80-program-8.0.0-2.x86_64 marks php80-cli-8.0.0-2.x86_64 (cap 
php80-cli = 4:8.0.0-2)
 php80-cli-8.0.0-2.x86_64 marks php80-common-8.0.0-2.x86_64 (cap 
/etc/php80)

There are 3 packages to install (2 marked by dependencies):
A php80-cli-8.0.0-2.x86_64  php80-common-8.0.0-2.x86_64 
php80-program-8.0.0-2.x86_64

This operation will use 4.6MB of disk space.
Need to get 1.4MB of archives (1.4MB to download).

[1/3] th-2020::php80-common-8.0.0-2.x86_64.rpm [1.4M (1.4M/s)]
[2/3] th-2020::php80-cli-8.0.0-2.x86_64.rpm [51.7K (51.7K/s)]
[3/3] th-2020::php80-program-8.0.0-2.x86_64.rpm [5.0K (5.0K/s)]
Executing pm-command.sh --upgrade -vh --root / --define 
_check_dirname_deps 1...

error: failed to open /etc/mtab: No such file or directory
Preparing... ### [100%]
Repackaging...
   1:php72-program ### [100%]
Upgrading...
   1:php80-common ### [ 33%]
   2:php80-cli ### [ 67%]
   3:php80-program ### [100%]
poldek:/all-avail>/


But rpm-4 no longer allows / in Obsoletes:

/Illegal char '/' (0x2f) in: Obsoletes: /usr/bin/php /

Which makes this smooth transition no longer possible:

/poldek:/all-avail> install php73-program-7.3.27-1.x86_64//
//Processing dependencies...//
//php73-program-7.3.27-1.x86_64 marks php73-cli-7.3.27-1.x86_64 (cap 
php73-cli = 4:7.3.27-1)//
// php73-cli-7.3.27-1.x86_64 marks php73-common-7.3.27-1.x86_64 (cap 
libphp_common-7.3.27.so()(64bit))//

//There are 3 packages to install (2 marked by dependencies)://
//A php73-cli-7.3.27-1.x86_64 php73-common-7.3.27-1.x86_64  
php73-program-7.3.27-1.x86_64//

//This operation will use 4.2MB of disk space.//
//Need to get 1.2MB of archives.//
//php73-common-7.3.27-1.x86_64.rpm: digests OK//
//php73-cli-7.3.27-1.x86_64.rpm: digests OK//
//php73-program-7.3.27-1.x86_64.rpm: digests OK//
//Executing pm-command.sh --upgrade -vh --root / --define 
_check_dirname_deps 0...//

//Verifying... # [100%]//
//Preparing... # [100%]//
//    file /usr/bin/php from install of 
php73-program-4:7.3.27-1.x86_64 conflicts with file from package 
php74-program-4:7.4.19-1.1.x86_64//
//    file /usr/share/man/man1/php.1 from install of 
php73-program-4:7.3.27-1.x86_64 conflicts with file from package 
php74-program-4:7.4.19-1.1.x86_64//

//There were errors//
//poldek:/all-avail>/

To keep what we had with rpm5 , we either need to patch rpm, or add 11 
(as of today) Obsoletes: php${ver}-program  lines to each spec.

___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: [packages/php] - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16), we have fully transiti

2021-05-15 Thread Neal Gompa
On Sat, May 15, 2021 at 5:38 AM Adam Gołębiowski  wrote:
>
>
> W dniu 2021-05-13 o 21:32, Elan Ruusamäe pisze:
>
> > point of that guard was to wait for support to become available or
> > someone implement a solution.
> > (...)
> > but as no such solution as provided, you need to update obsoletes to
> > fill **all** package names that provide that file path.
> >
> > I refuse to do that myself as it's pretty stupid.
>
> ugly, for sure, but unless we come up with another solution (patching
> rpm to support Obsoletes: /path), we will need to maintain 11 Obsoletes:
> lines per package ...
>

What problem are you trying to solve here? I'm not sure I understand
why you're doing this.



-- 
真実はいつも一つ!/ Always, there's only one truth!
___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: [packages/php] - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16), we have fully transiti

2021-05-15 Thread Adam Gołębiowski


W dniu 2021-05-13 o 21:32, Elan Ruusamäe pisze:

point of that guard was to wait for support to become available or 
someone implement a solution.

(...)
but as no such solution as provided, you need to update obsoletes to 
fill **all** package names that provide that file path.


I refuse to do that myself as it's pretty stupid.


ugly, for sure, but unless we come up with another solution (patching 
rpm to support Obsoletes: /path), we will need to maintain 11 Obsoletes: 
lines per package ...



___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en


Re: [packages/php] - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16), we have fully transiti

2021-05-13 Thread Elan Ruusamäe


On 13.05.2021 22:04, adamg wrote:

commit 45629e6e9bbed84edb75f9580aabea932a696556
Author: Adam Gołębiowski 
Date:   Thu May 13 15:03:01 2021 +

 - drop if clause introduced in commit 20dcadbb (guard clause for rpm 4.16),
   we have fully transitioned to rpm 4 by now, and there is no easy way
   to match 4.16* (4.16.0, 4.16.1, etc) - at least not without some lua
   scripting, so just drop this.


there is a way to match:


[~/rpm/packages/php(7.4.19) (PHP_7_4)★] ➔ grep -r _rpmversion ~/all-specs
/home/users/glen/all-specs/php.spec:%if "%_rpmversion" != "4.16.0"
/home/users/glen/all-specs/rpm.spec:%if "%{_rpmversion}" >= "4.12" && 
"%{_rpmversion}" < "5"

/home/users/glen/all-specs/orc.spec:%if 0%{?ver_ge "%{_rpmversion}" "4.6"}
/home/users/glen/all-specs/perl.spec:%if %{_ver_ge '%{_rpmversion}' 
'4.16'} && %{_ver_lt '%{_rpmversion}' '5'}

/home/users/glen/all-specs/lightdm.spec:%if "%{_rpmversion}" >= "5"
/home/users/glen/all-specs/acroread.spec:%if "%{_rpmversion}" >= "5.0"


however,


point of that guard was to wait for support to become available or 
someone implement a solution.


the error being:


error: line 466: Illegal char '/' (0x2f) in: Obsoletes: /usr/bin/php
error: line 466: Only package names are allowed in Obsoletes: 
Obsoletes:    /usr/bin/php



but as no such solution as provided, you need to update obsoletes to 
fill **all** package names that provide that file path.



I refuse to do that myself as it's pretty stupid.





  php.spec | 3 ---
  1 file changed, 3 deletions(-)
---
diff --git a/php.spec b/php.spec
index b1388c5..19ed4d3 100644
--- a/php.spec
+++ b/php.spec
@@ -459,9 +459,6 @@ Summary:/usr/bin/php symlink
  Summary(pl.UTF-8):Dowiązanie symboliczne /usr/bin/php
  Group:Development/Languages/PHP
  Requires: %{name}-cli = %{epoch}:%{version}-%{release}
-%if "%_rpmversion" != "4.16.0"
-Obsoletes: /usr/bin/php
-%endif
  Obsoletes:php-program < 4:5.3.28-7
  


___
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en