You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yum install package.rpm (or yum update package.rpm) installs the updated RPM without errors
Actual behaviour
The package is updated, however with this error:
/var/tmp/rpm-tmp.qvjCjS: line 4: restartService: command not found
Failed to try-restart package
Full output:
[root@centos7 ~]# yum update package.1.0.1-1.noarch.rpm
Loaded plugins: fastestmirror
Examining package.1.0.1-1.noarch.rpm
Marking package.1.0.1-1.noarch.rpm as an update to package.1.0.0-1.noarch.rpm
Resolving Dependencies
--> Running transaction check
---> Package package.noarch 0:1.0.0-1 will be updated
---> Package package.noarch 0:1.0.1-1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================================
Updating:
package noarch 1.0.1-1 /package.1.0.1-1.noarch 139 M
Transaction Summary
===========================================================================================================================================================================================
Upgrade 1 Package
Total size: 139 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : package.1.0.1-1.noarch 1/2
Cleanup : package.1.0.0-1.noarch 2/2
/var/tmp/rpm-tmp.qvjCjS: line 4: restartService: command not found
Failed to try-restart package
Verifying : package.1.0.1-1.noarch 1/2
Verifying : package.1.0.0-1.noarch 2/2
Updated:
package.noarch 0:1.0.1-1
Complete!
If I list the scripts in the RPM, there is a snippet at the very top of the postuninstall block that is calling restartService() but the function is not defined within.
Here is my applicable build.sbt:
daemonUser in Linux := "package"
daemonUserUid in Linux := Some("1010")
daemonGroup in Linux := "package"
daemonGroupGid in Linux := Some("1010")
packageName in Linux := "package"
packageName in Rpm := "package"
packageSummary in Linux := "Our Application"
packageDescription := "Our Application"
rpmVendor := "xyz"
rpmRelease := "1"
rpmUrl := Some("http://example.com")
rpmLicense := Some("Commercial")
rpmRequirements := Seq("java-1.8.0-openjdk","java-1.8.0-openjdk-devel")
defaultLinuxStartScriptLocation in Rpm := "/etc/systemd/system"
serviceAutostart in Rpm:= false
// Needed to add this to reload systemd after upgrades
import RpmConstants._
maintainerScripts in Rpm := maintainerScriptsAppend((maintainerScripts in Rpm).value)(
Post -> s"""|if [ $$1 -eq 2 ] ;
|then
|systemctl daemon-reload
|fi
|""".stripMargin
)
Information
What sbt-native-packager are you using: 1.2.0
What sbt version: 0.13.15.3-3
What is your build system: CentOS 7
What package are you building: rpm
What version has your build tool: RPM version 4.11.3
What is your target system: CentOS 7
The text was updated successfully, but these errors were encountered:
Expected behaviour
yum install package.rpm
(oryum update package.rpm
) installs the updated RPM without errorsActual behaviour
The package is updated, however with this error:
Full output:
If I list the scripts in the RPM, there is a snippet at the very top of the postuninstall block that is calling restartService() but the function is not defined within.
Here is my applicable build.sbt:
Information
The text was updated successfully, but these errors were encountered: