-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Added RPM package generation and upload #37
Conversation
Error on Fedora 24:
adduser exists on the system, provided by shadow-utils package:
In https://github.com/openhab/openhab-linuxpkg/pull/37/files I see:
One way to fix might be (though might not be right for non-RH/Fedora/CentOS distros, I'm unsure):
I don't know if gradle exposes this at the build.gradle level, but Fedora packaging guidelines use |
Hmm, even getting passed that the openhab user doesn't exist because there's no RPM based addgroup. Bare with me for a bit. |
@BClark09 I did the rpm packaging some weeks ago for a project at work. I've used the packaging of elasticsearch as template: The script files are called with a different set of arguments depending if the executor is rpm or deb. Therefore you can distinguish between rpm and deb installations. |
The yum repo packages still give me the adduser error - guessing the rpm in the repo has not been updated yet? |
Hmm, what happens when you
? |
Just a cosmetic thing, but you want way to rename it to openHAB rather then openHABRepo. Only issue I ran into was a LOT of warnings like: warning: user openhab does not exist - using root Should not the .spec file create the user if it does not exist? Also, should think about signing the rpms. Was not able to install addons: Transaction check error: Also some errors with remove: Running transaction Removed: Complete! |
Thanks for testing both, this is really helpful!
Good point! Will change that when I come to writing it up in docs.
Right, I see that RPM and APT use different terms for [pre/post][inst/rm] and was trying to use the same ones. I've submitted another package to the repo to address this. Does this fix all the known errors (besides not being able to install addons)?
They will be signed with the same GPG key as the Deb files are when testing is complete. |
@theoweiss Have just seen your comment, sorry. Now that the basics are working I will follow the same style as you have showed. |
@BClark09 - dnf clean worked, but repos don't normally require that step to find newer packages. The following worked and installled openhab2-2.1.0.20170218221203-1.noarch.rpm:
|
Error on installing openhab2-addons:
|
Signed-off-by: Ben Clark <ben@benjyc.uk>
Signed-off-by: Ben Clark <ben@benjyc.uk>
Signed-off-by: Ben Clark <ben@benjyc.uk>
Signed-off-by: Ben Clark <ben@benjyc.uk>
Hi @Stormwind99 and @sipvoip. I have completed the work on the rpm packages, and all known issues are resolved. Would you be able to test them for me? To do so you'll need to first
if you want to simulate an upgrade, then you can pick the other version (has the same rpm setup as the latest) on the repo, simply by running the command:
Please let me know how you get on, I have tested a new install and upgrade of all packages on Fedora 25, but would like confirmation before I start moving to a full repo with GPG signing. |
Signed-off-by: Ben Clark <ben@benjyc.uk>
@theoweiss, assuming that others are able to confirm my tests would you be happy for this PR (based on this diff to be merged? |
Both packages installed without error for me in Fedora 24:
|
On Centos 7, I tested openhab2 first, and then addons, and also tested just
installed addons and having yum realize it needed to pull openhab2 also.
yum remove openhab2 also works, tho I don't know why anyone would want to
remove openHab. ;-)
<>
nathan stratton
…On Sat, Feb 25, 2017 at 11:30 AM, Jason Spangler ***@***.***> wrote:
Both packages installed without error for me:
dnf remove openhab2
dnf update
dnf install --nogpgcheck openhab2
dnf install --nogpgcheck openhab2-addons
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABMUEirvtdPRhjkBjMFcQ4S-XAEn-iK4ks5rgFdBgaJpZM4MEZeV>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Some documentation would be fine, see my comments.
@@ -56,8 +56,8 @@ waitForStopFinished(){ | |||
} | |||
|
|||
case "$1" in | |||
configure) | |||
if [ -z $2 ] ; then | |||
configure|1|2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment with doc about what 1|2 args mean.
resources/deb/control-runtime/prerm
Outdated
;; | ||
remove|deconfigure) | ||
remove|deconfigure|0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment with doc about the 0 arg.
resources/deb/control-runtime/postrm
Outdated
removeCache | ||
exit 0 | ||
;; | ||
0) # RPM has no purge, assume remove does this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment with doc about 0 arg.
Signed-off-by: Ben Clark <ben@benjyc.uk>
Signed-off-by: Ben Clark <ben@benjyc.uk>
Thanks @Stormwind99 and @sipvoip for testing! And thanks @theoweiss for reviewing, I've added the documentation now so will merge and test a gpg signed version! |
Requires testing to confirm the following before merge:
To help test, please use the following
/etc/yum.repos.d/openHAB.repo
install with:
Closes #36
Signed-off-by: Ben Clark ben@benjyc.uk