More > JRiver Media Center 25 for Linux

Set up JRiver Media Center 25 in Fedora and CentOS

<< < (3/7) > >>

max096:
So that's what I ended up with for the time being. It also saves the version number into a file and only tries to make a new rpm if the version number is either not there or the new one from interact is greater than the old one.
And then moves the RPM to a folder specified. (btw, Upload isn't actually Uploaded anywhere if you are wondering, that's just in my local network :P)

Though... I'm not sure this works when I put this into a cron job yet (hope it does "just work"). Fingers crossed.

(Not a replacement for BryanC's script I deleted the entire "actually install the thing" portion and some user inputs, because that's not the goal I have in mind for this.)

EDIT 1:
Ok, it technically works, but dumps all the things into my home folder instead of the folder it should be in. Not that it really matters since it's a home folder on a VM that's gonna do essentially nothing else. I still should change that.

EDIT 2:
I modified the script a bit, now it works fine. I put a line similar to this into the crontab of my user.
--- Code: ---0 0 * * * /home/someuser/jriver_rpm_horder/jriver_rpm_horder.sh
--- End code ---
(will run it once every day). Does not need to be in the root's crontab. But then you need to run the script manually once and enter your password before the cron job will work (pretty sure, but it didn't ask me for it I already entered my password 2 seconds before). Installing packages needs root (the rest of the script does not), so that's why. And you also gotta change 'rpmdest' to wherever you want the rpms to go to. It works fine now, except you don't notice when a new version was added.  :-\

max096:

--- Quote from: BryanC on March 22, 2019, 10:24:36 pm ---I am going to continue symlinking the Fedora CA certificates to /etc/ssl/certs/ca-certificates.crt for the time being.

--- End quote ---

Why did you need this btw? I didn't need this, but I already ran your script before once. So there is that. I have not tried yet on a completely clean Fedora installation if it works to install those rpm's. Only on my notebook where your script failed half way threw, because it failed to install dpkg and all those things (for some reason I didn't bother to fix, just grabbed the rpm from my desktop and it worked). It should not even have gotten to that line technically, but I also don't know for certain.

BryanC:

--- Quote from: max096 on May 25, 2019, 01:07:41 pm ---Why did you need this btw? I didn't need this, but I already ran your script before once. So there is that. I have not tried yet on a completely clean Fedora installation if it works to install those rpm's. Only on my notebook where your script failed half way threw, because it failed to install dpkg and all those things (for some reason I didn't bother to fix, just grabbed the rpm from my desktop and it worked). It should not even have gotten to that line technically, but I also don't know for certain.

--- End quote ---

Once you've run the script once, the symlink will always be there. The reason for the symlinking is because the location of the security certificates is different on Fedora than it is on Debian/Ubuntu and MC is hardcoded to look in the Debian/Ubuntu directories.

I also updated the script in the OP to not rebuild the RPMs if they already exist in the BUILD directory. This is useful for a couple of reasons: 1) I use syncthing to keep my build directories in sync, thus it only needs to be built once on one of my machines and 2) if you run the program without sudo and it times out waiting for a password it will not have to rebuild the RPM again.

BryanC:

--- Quote from: max096 on May 25, 2019, 12:00:02 pm ---So that's what I ended up with for the time being. It also saves the version number into a file and only tries to make a new rpm if the version number is either not there or the new one from interact is greater than the old one.
And then moves the RPM to a folder specified. (btw, Upload isn't actually Uploaded anywhere if you are wondering, that's just in my local network :P)

Though... I'm not sure this works when I put this into a cron job yet (hope it does "just work"). Fingers crossed.

(Not a replacement for BryanC's script I deleted the entire "actually install the thing" portion and some user inputs, because that's not the goal I have in mind for this.)

EDIT 1:
Ok, it technically works, but dumps all the things into my home folder instead of the folder it should be in. Not that it really matters since it's a home folder on a VM that's gonna do essentially nothing else. I still should change that.

EDIT 2:
I modified the script a bit, now it works fine. I put a line similar to this into the crontab of my user.
--- Code: ---0 0 * * * /home/someuser/jriver_rpm_horder/jriver_rpm_horder.sh
--- End code ---
(will run it once every day). Does not need to be in the root's crontab. But then you need to run the script manually once and enter your password before the cron job will work (pretty sure, but it didn't ask me for it I already entered my password 2 seconds before). Installing packages needs root (the rest of the script does not), so that's why. And you also gotta change 'rpmdest' to wherever you want the rpms to go to. It works fine now, except you don't notice when a new version was added.  :-\

--- End quote ---

I will update my script to check the installed version if the latest version==installed version.

UPDATE: I updated the script so in automatic mode it will not attempt to reinstall the installed version which should improve performance if you are automating it.

I'm not entirely certain what your end goal is, but if it could be useful for other users I can add it. It looks like you want to build a repository or cache of MC RPMs? If so, I have some suggestions about logic (e.g., querying rpm instead of tracking version numbers with text files, etc).

max096:

--- Quote from: BryanC on May 25, 2019, 02:51:31 pm ---I will update my script to check the installed version if the latest version==installed version.

UPDATE: I updated the script so in automatic mode it will not attempt to reinstall the installed version which should improve performance if you are automating it.

I'm not entirely certain what your end goal is, but if it could be useful for other users I can add it. It looks like you want to build a repository or cache of MC RPMs? If so, I have some suggestions about logic (e.g., querying rpm instead of tracking version numbers with text files, etc).

--- End quote ---

I'm not really installing jriver on the VM that runs that script now. It's a headless Fedora 30 Server install on my NAS without a desktop environment that makes the RPMs now and then I can install them on PCs I actually use. Ideally I would like it to not only make the RPMs ready for use, but also host a DNF repo on that headless machine. But that's nothing I'm gonna do currently but a bit later maybe.

About saving the version number in a text field. I don't like it either. But I didn't know how else to do it. I'm not sure how dnf repos are hosted and what goes into that, but I probably can query that if I do that. But since I wasn't planning on installing it on the machine making the RPMs, there was really nothing to query.

I think this is already a bit better than running the script on every machine. Except it does not tell me in any way that there might be a new version it built or install the rpm with dnf upgrade.

The next step would be to create a 'nightly' dnf repo automatically. Witch is probably the best I can do for myself anyways. Since I won't have anyone validating if it worked or not when I do it myself. Might as well use the nightly repo. Thankfully, I do not have a big problem with it breaking on my PCs since on all of them I don't have any music. So I can just purge it and install another RPM from the bunch I'll have by then.
All of my music is on a JRiver instance on my NAS and I remote play it on every PC and that one still runs a version of MC24, because it worked and I didn't bother to upgrade it yet. Also has something to do with that I wanted to maybe make my own docker image for MC25 based on this image https://hub.docker.com/r/jlesage/baseimage-gui witch would allow you to get VNC access with a browser. I'm using this guys handbrake image and it's really great to use! But I didn't succeed doing that (yet) with JRiver. I did succeed making a jriver docker image similar to the one I'm currently using with MC24.

In your script you mentioned this: 'Symlinking ca-certificates for license registration.' I remember JRiver on my notebook not having accepted my license key once. But when I went to the website and requested a restore code or whatever they call it, it worked. And some time ago I also had to re-enter it again.
Should also do the symlink on said notebook, likely gonna fix that. The more you know.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version