Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging? rpm remove does not work #12213

Open
2 tasks done
ilippert opened this issue Nov 19, 2024 · 6 comments · May be fixed by #12217
Open
2 tasks done

packaging? rpm remove does not work #12213

ilippert opened this issue Nov 19, 2024 · 6 comments · May be fixed by #12217

Comments

@ilippert
Copy link
Contributor

JabRef version

Other (please describe below)

Operating system

GNU / Linux

Details on version and operating system

JabRef 6.0--2024-11-17--572c823 Linux 6.11.7-300.fc41.x86_64 amd64 Java 23.0.1 JavaFX 23.0.1+4

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. on Fedora use dnf to remove the rpm.

this does not work anymore.

Appendix

...

shell report
root@PC:~# dnf remove jabref
Package                                                           Arch            Version                                                            Repository                                Size
Removing:
 jabref                                                           x86_64          6.0.6580-1                                                         @commandline                         350.4 MiB
 jabref                                                           x86_64          6.0.6588-1                                                         <unknown>                            356.4 MiB

Transaction Summary:
 Removing:           2 packages

Is this ok [y/N]: y
Running transaction
[1/3] Prepare transaction                                                                                                                                  100% |   2.0   B/s |   2.0   B |  00m01s
>>> Running pre-uninstall scriptlet: jabref-0:6.0.6588-1.x86_64
>>> Error in pre-uninstall scriptlet: jabref-0:6.0.6588-1.x86_64
>>> Scriptlet output:
>>> /var/tmp/rpm-tmp.LOQnhY: line 116: do_if_file_belongs_to_single_package: command not found
>>> /var/tmp/rpm-tmp.LOQnhY: line 117: do_if_file_belongs_to_single_package: command not found
>>> /var/tmp/rpm-tmp.LOQnhY: line 118: do_if_file_belongs_to_single_package: command not found
>>> 
>>> [RPM] %preun(jabref-6.0.6588-1.x86_64) scriptlet failed, exit status 127
>>> Running pre-uninstall scriptlet: jabref-0:6.0.6580-1.x86_64
>>> Error in pre-uninstall scriptlet: jabref-0:6.0.6580-1.x86_64
>>> Scriptlet output:
>>> /var/tmp/rpm-tmp.w4SfXT: line 116: do_if_file_belongs_to_single_package: command not found
>>> /var/tmp/rpm-tmp.w4SfXT: line 117: do_if_file_belongs_to_single_package: command not found
>>> /var/tmp/rpm-tmp.w4SfXT: line 118: do_if_file_belongs_to_single_package: command not found
>>> 
>>> [RPM] jabref-6.0.6588-1.x86_64: erase failed
>>> [RPM] %preun(jabref-6.0.6580-1.x86_64) scriptlet failed, exit status 127
Transaction failed: Rpm transaction failed.

@ilippert ilippert changed the title rpm remove does not work packaging? rpm remove does not work Nov 19, 2024
@Siedlerchr Siedlerchr linked a pull request Nov 21, 2024 that will close this issue
7 tasks
@Siedlerchr
Copy link
Member

Thanks for the report, seems like there were some jdk changes related to the spec file.

Can you test the binary from #12217 once it's ready? (there will be a comment)

@Siedlerchr
Copy link
Member

@HoussemNasri
Copy link
Member

Similar error on openSUSE Leap 15.5.

/var/tmp/rpm-tmp.atA3dh: line 116: do_if_file_belongs_to_single_package: command not found
/var/tmp/rpm-tmp.atA3dh: line 117: do_if_file_belongs_to_single_package: command not found
/var/tmp/rpm-tmp.atA3dh: line 118: do_if_file_belongs_to_single_package: command not found
error: %preun(jabref-6.0.6591-1.x86_64) scriptlet failed, exit status 127
error: jabref-6.0.6591-1.x86_64: erase failed
(1/1) Removing: jabref-6.0.6591-1.x86_64 .................................................................................[error]
Removal of (657)jabref-6.0.6591-1.x86_64(@System) failed:
Error: Subprocess failed. Error: RPM failed: Command exited with status 1.

@ilippert
Copy link
Contributor Author

Can you test the binary from #12217 once it's ready? (there will be a comment)

tested, does not work. Now at


# dnf remove jabref*
Package                            Arch      Version                            Repository               Size
Removing:
 jabref                            x86_64    6.0.6580-1                         @commandline        350.4 MiB
 jabref                            x86_64    6.0.6588-1                         <unknown>           356.4 MiB
 jabref                            x86_64    6.0.36590-1                        <unknown>           349.4 MiB

Transaction Summary:
 Removing:           3 packages

Is this ok [y/N]: y
Running transaction
[1/4] Prepare transaction                                            100% |   2.0   B/s |   3.0   B |  00m01s
>>> Running pre-uninstall scriptlet: jabref-0:6.0.36590-1.x86_64
>>> Error in pre-uninstall scriptlet: jabref-0:6.0.36590-1.x86_64
>>> [RPM] %preun(jabref-6.0.36590-1.x86_64) scriptlet failed, exit status 1
>>> Running pre-uninstall scriptlet: jabref-0:6.0.6588-1.x86_64
>>> Error in pre-uninstall scriptlet: jabref-0:6.0.6588-1.x86_64
>>> Scriptlet output:
>>> /var/tmp/rpm-tmp.YNtwxb: line 116: do_if_file_belongs_to_single_package: command not found
>>> /var/tmp/rpm-tmp.YNtwxb: line 117: do_if_file_belongs_to_single_package: command not found
>>> /var/tmp/rpm-tmp.YNtwxb: line 118: do_if_file_belongs_to_single_package: command not found
>>> 
>>> [RPM] jabref-6.0.36590-1.x86_64: erase failed
>>> [RPM] %preun(jabref-6.0.6588-1.x86_64) scriptlet failed, exit status 127
>>> Running pre-uninstall scriptlet: jabref-0:6.0.6580-1.x86_64
>>> Error in pre-uninstall scriptlet: jabref-0:6.0.6580-1.x86_64
>>> Scriptlet output:
>>> /var/tmp/rpm-tmp.LilzB6: line 116: do_if_file_belongs_to_single_package: command not found
>>> /var/tmp/rpm-tmp.LilzB6: line 117: do_if_file_belongs_to_single_package: command not found
>>> /var/tmp/rpm-tmp.LilzB6: line 118: do_if_file_belongs_to_single_package: command not found
>>> 
>>> [RPM] jabref-6.0.6588-1.x86_64: erase failed
>>> [RPM] %preun(jabref-6.0.6580-1.x86_64) scriptlet failed, exit status 127
Transaction failed: Rpm transaction failed.

@Siedlerchr
Copy link
Member

Siedlerchr commented Nov 25, 2024

Can you please try again with https://builds.jabref.org/pull/12217/merge
Tried to add a couple of more things
I am not yet sure if this is enough, or if we need to add the util sh scripts from here as well
https://github.com/openjdk/jdk/blob/jdk-23%2B37/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/resources/common_utils.sh

@ilippert
Copy link
Contributor Author

ilippert commented Nov 27, 2024

Thanks, your changes did lead to changes on my side, but not a complete resolution.

:~# dnf install -y https://builds.jabref.org/pull/12217/merge/jabref-6.0-1.x86_64.rpm
Updating and loading repositories:
 Fedora 41 - x86_64 - Updates           100% |  27.0 KiB/s |  24.3 KiB |  00m01s
 Fedora 41 - x86_64 - Updates           100% | 100.2 KiB/s |   1.2 MiB |  00m12s
Repositories loaded.
 https://builds.jabref.org/pull/12217/m 100% |  64.1 MiB/s | 314.4 MiB |  00m05s
Package                 Arch   Version                  Repository          Size
Upgrading:
 jabref                 x86_64 6.0.36603-1              @commandline   349.4 MiB
   replacing jabref     x86_64 6.0.36590-1              <unknown>      349.4 MiB
   replacing jabref     x86_64 6.0.6588-1               <unknown>      356.4 MiB
   replacing jabref     x86_64 6.0.6580-1               @commandline   350.4 MiB

Transaction Summary:
 Upgrading:          1 package
 Replacing:          3 package

Total size of inbound packages is 314 MiB. Need to download 0 B.
Running transaction
[1/6] Verify package files              100% |   1.0   B/s |   1.0   B |  00m01s
[2/6] Prepare transaction               100% |   9.0   B/s |   4.0   B |  00m00s
[3/6] Upgrading jabref-0:6.0.36603-1.x8 100% | 152.1 MiB/s | 349.4 MiB |  00m02s
>>> Running pre-uninstall scriptlet: jabref-0:6.0.36590-1.x86_64
>>> Error in pre-uninstall scriptlet: jabref-0:6.0.36590-1.x86_64
>>> [RPM] %preun(jabref-6.0.36590-1.x86_64) scriptlet failed, exit status 1
>>> Running pre-uninstall scriptlet: jabref-0:6.0.6588-1.x86_64
>>> Error in pre-uninstall scriptlet: jabref-0:6.0.6588-1.x86_64
>>> Scriptlet output:
>>> /var/tmp/rpm-tmp.l2kxJg: line 116: do_if_file_belongs_to_single_package: com
>>> /var/tmp/rpm-tmp.l2kxJg: line 117: do_if_file_belongs_to_single_package: com
>>> /var/tmp/rpm-tmp.l2kxJg: line 118: do_if_file_belongs_to_single_package: com
>>> 
>>> [RPM] jabref-6.0.36590-1.x86_64: erase failed
>>> [RPM] %preun(jabref-6.0.6588-1.x86_64) scriptlet failed, exit status 127
>>> Running pre-uninstall scriptlet: jabref-0:6.0.6580-1.x86_64
>>> Error in pre-uninstall scriptlet: jabref-0:6.0.6580-1.x86_64
>>> Scriptlet output:
>>> /var/tmp/rpm-tmp.EYEhxU: line 116: do_if_file_belongs_to_single_package: com
>>> /var/tmp/rpm-tmp.EYEhxU: line 117: do_if_file_belongs_to_single_package: com
>>> /var/tmp/rpm-tmp.EYEhxU: line 118: do_if_file_belongs_to_single_package: com
>>> 
>>> [RPM] jabref-6.0.6588-1.x86_64: erase failed
>>> [RPM] %preun(jabref-6.0.6580-1.x86_64) scriptlet failed, exit status 127
Transaction failed: Rpm transaction failed.
Warning: skipped PGP checks for 1 package from repository: @commandline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants