docker-fossil: How to update fossil to current release?
(1) By heribert (derhexer13) on 2019-03-15 08:54:13 [source]
I want to switch my project repos from github to local hosted fossil server. So i will use Docker on my RAID6 NAS (Synology + Tandberg), but the current fossil version in nijtmans/docker-fossil is not 2.8. I attempted (and failed) to update fossil in the docker-fossil to the current release 2.8. Is there any 'HowTo'?
(2) By Richard Hipp (drh) on 2019-03-15 10:35:32 and edited on 2019-03-15 10:35:50 [history] [link] [source] in reply to 1
Fossil is a single self-contained executable file named "fossil" that is located somewhere on your $PATH. Simply find out where that place is (perhaps using the command "which fossil") and replace the older executable with a newer one.
The problem is the Docker app of the Synology NAS. I've to download and install fossil inside the docker container. The docker container based fedora do not have installed wget. So i have to install wget. But this fails... bash-4.3$ dnf install wget Last metadata expiration check: 0:00:01 ago on Fri Mar 15 11:43:08 2019. Dependencies resolved. ============================================================================================================= Package Arch Version Repository Size ============================================================================================================= Installing: libicu x86_64 54.1-5.fc23 fedora 8.4 M libpsl x86_64 0.7.0-5.fc23 fedora 52 k wget x86_64 1.18-1.fc23 updates 661 k Transaction Summary ============================================================================================================= Install 3 Packages Total download size: 9.1 M Installed size: 32 M Is this ok [y/N]: y Downloading Packages: (1/3): libpsl-0.7.0-5.fc23.x86_64.rpm 377 kB/s | 52 kB 00:00 (2/3): wget-1.18-1.fc23.x86_64.rpm 1.7 MB/s | 661 kB 00:00 (3/3): libicu-54.1-5.fc23.x86_64.rpm 4.8 MB/s | 8.4 MB 00:01 ------------------------------------------------------------------------------------------------------------- Total 3.1 MB/s | 9.1 MB 00:02 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Failed to obtain the transaction lock (logged in as: fossil). The downloaded packages were saved in cache until the next successful transaction. You can remove cached packages by executing 'dnf clean packages'. Error: Could not run transaction. bash-4.3$
The error message seems to be that your user ("fossil") does not have permission to install the app. Try: sudo dnf install wget Alternately, does it perhaps have curl installed instead of wget? curl can do the same things.
The error message seems to be that your user ("fossil") does not have permission to install the app.
Or that may just be my ignorance of how docker containers work. The error message is similar to the one you get on an Ubuntu system when running "apt-get install..." as a non-root user. Rather than saying "you need to be root", it complains about its inability to lock the software db.
Thx for the hint, but same problem: user 'fossil' has too few user rights. bash-4.3$ sudo dnf install wget bash: sudo: command not found bash-4.3$ curl curl: try 'curl --help' or 'curl --manual' for more information bash-4.3$ curl -O https://fossil-scm.org/index.html/uv/fossil-linux-x64-2.8.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0Warning: Failed to create the f ile fossil-linux-x64-2.8.tar.gz: Permission Warning: denied curl: (23) Failed writing body (0 != 3860) bash-4.3$
The problem is the Docker app of the Synology NAS.
The point drh is making is that you probably don't need a whole Docker container just to run Fossil. Docker exists to bundle an app and its complex dependencies up into a bundle that will run underneath another OS, but there really aren't any dependencies in the case of Fossil, outside of things like libssl, which probably exist on the NAS already.
I'm suggesting that you might be able to build Fossil for Synology on the bare metal.
I've never developed an app for Synology, but the last time I talked to their technical sales people at a trade show, I got the impression that it's basically just a Linux box with an available SDK for cross-compiling applications. If that's still true, you don't necessarily need to involve Docker at all.
The privileges of the "Synology nas-admin" are limited. I attempted to unpack fossil via ssh (into sbin; usr/bin and usr/sbin), but all fails: herschar@nas:/sbin$ sudo curl https://fossil-scm.org/index.html/uv/fossil-linux-x64-2.8.tar.gz | tar xvz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0fossil 100 2838k 100 2838k 0 0 911k 0 0:00:03 0:00:03 --:--:-- 911k tar: fossil: Cannot open: Permission denied tar: Exiting with failure status due to previous errors I think the only way is to run fossil within a docker-container.
> sudo curl https://fossil-scm.org/index.html/uv/fossil-linux-x64-2.8.tar.gz | tar xvz Running sudo that way does not do what you want. There are two problems here: 1) curl does not send its output to stdout by default, so the pipe to tar does not work. 2) The command writing to the filesystem (in this case "tar") needs permission to do write. So, assuming 'sudo' actually does something useful on your NAS device, you'll need something like: curl -o- http.... | sudo tar xzf - The curl process does not need extra privileges because it's writing to stdout (-o-), but the tar process would need permission to write its output to the filesystem (and thus "sudo" to give the process root permissions).
Thx a lot - it works. 'Installed' via SSH with: sudo wget https://fossil-scm.org/index.html/uv/fossil-linux-x64-2.8.tar.gz | tar xzf
To serve Fossil repos from your NAS you don't need docker at all. Besides eating up NAS resources, it's simply a redundant layer in this case.
Have you tried downloading and running the fossil binary directly on your NAS?
If your NAS is Linux based, the pre-built version from the official site should work as is.
Fossil binary does not need root access either, you can run it from unprivileged user on NAS and serve the repos (on ports > 1024, by default it's 8080).
This is great news... but how is fossil configured to run as a service when it's in userspace on DSM?
Let us first make the wild assumption that by "DSM" you mean the Synology DiskStation Manager rather than the multibillion euro multinational combine Royal DSM (first web search hit for "DSM") or the well-known American Psychiatry Association's Diagnostic and Statistical Manual of Mental Disorders (second hit). I characterize this as a wild guess because I had to scroll down to the 16th result to find it, and I made the leap only from other context in this thread.
(See how easy it is to add hyperlinks to disambiguate TLAs?)
I would suggest using SSH URLs in this case:
$ fossil clone ssh://myremoteuser@mynas/museum/repo.fossil ~/museum/repo.fossil