mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 06:05:57 +03:00
[GH-ISSUE #602] [GMOD] Command to update addons from github #486
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#486
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @UltimateByte on GitHub (Jan 2, 2016).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/602
Originally assigned to: @UltimateByte on GitHub.
Many server admins use addons coming from github such as ACF, Advanced Duplicator 2, Wiremod...).
Those are quite boring to keep updated.
LGSM could provide a way to help updating them, either by using github API (i don't know how to use it), or by pasting their zip link to a new file called for example github_addons.
Then a command (or a cron job) like ./gmodserver update-git-addons would update them.
Two problems to face : those addons usually have caps characters while they have to be lower case to work with Linux, and ultimately, it will have to deal with older addons.
So name greps and convert to lowercase commands will be required.
Do you feel like such a function has its place into LGSM ?
@JimTR commented on GitHub (Jan 2, 2016):
why not just a workshop ? this would mean (perhaps) the server gets content that works rather than bleading edge code that could crash the server ?
@UltimateByte commented on GitHub (Jan 2, 2016):
Workshop is already supported by LGSM for gmod.
Github addons are updated more frequently because uploading and updating a workshop addon is very painful. Some devs chose not to use the workshop, others update the workshop addon only for major updates, just because it's long and boring to do.
@JimTR commented on GitHub (Jan 3, 2016):
I understand that however code that is new should be ignored until it is deemed to be good so adding content via the workshop should be better than git ... I suppose it could be said from your comment there is no need for steam .... perhaps the end user needs stable rather than beta ... If steam makes this pain full perhaps another method needs to be employed
@UltimateByte commented on GitHub (Jan 3, 2016):
Haha ! Nothing is ever stable with gmod ! I'm saying that because i started playing before it was even available on steam. I can guarantee you that it won't ever be stable. The game engine doesn't even support multi thread anymore (even if settings seems to allow it) because it breaks the lua engine synchronization and makes the game unstable !
I see your point, and it's very valid... Except not for gmod. Many admins are still using github addons, as some of them have more functionalities or correct some more bugs. Gmod server admins AND players usually prefer functionalities over stability. Everyone is used to a server crashing because of a coded by feet duplicator tool... Or because a guy welded the head of a ragdoll to a high enough skymap.
I'm thinking about mainly 2 addons that are Adv Dupe 2, and ACF that are only found onto github. But it could also apply to ulx/ulib, utime, and uclip, which would be very cool, as they are serious developers that update their addons only when it's really required. And it could be a step forward to adding optional and very used and useful addons to gmod that would be managed by LGSM.
@JimTR commented on GitHub (Jan 3, 2016):
I am supprised I don't know you then ... back in they day the guys from wolverhampton used to come down to mine for the odd house party
@UltimateByte commented on GitHub (Jan 3, 2016):
That's just because i'm french. Otherwise i'd have come.
No seriously, you're just worried about admins having buggy addons in the end ?
@EstevanTH commented on GitHub (Jan 3, 2016):
Hi,
I have a more generic idea. Addons do not always use GitHub but many of them (including the ones hosted at GitHub) support Subversion (SVN).
And I guess that it must be easy to do because command-line SVN clients already exist.
@UltimateByte commented on GitHub (Jan 3, 2016):
@EstevanTH Clever. It's true that SVN has been used forever in gmod, and slowly disappeared. It shouldn't stop us from using it if possible. It would eliminate quite a few problems of managing old files.
That would probably require a new packet for the server, that hopefully will be available for any distro, and some SVN knowledge to code it that i don't have already. Any good documentation to provide ?
@jaredballou commented on GitHub (Jan 5, 2016):
My thinking here is that an external tool might be a better idea, especially given how much extra functionality this will need to work robustly. Otherwise, we need to consider a few big issues with this:
My suggestion here would be to clearly state what you want, so we can define a specification for the script. That way, we know what we want to do, and then can build the tool to the desired actions, not just go in blind. Something like this:
I want to be able to create a list of Git repos with the local paths they should be installed in. I want to be able to add repos to the file and have the tool clone them. I want to be able to update and pull all repos, or just individual ones. I want to be able to push changes back upstream as well, or branch my own versions.
Once we have a clear idea exactly what you're looking to do, we can look at creating a tool. I have a simple script for my Insurgency servers that clones out a bunch of repos, rsyncs some maps, and does some other cleanup afterwards, all driven by a config manifest. I'm sure that a lot of what you're looking to do could be done with this script, I'd be happy to take a crack at helping you add the features you need to it and sharing it.
@UltimateByte commented on GitHub (Jan 6, 2016):
@jaredballou
Well, thanks for your attention.
I guess you have some misconceptions about my idea.
Is that clear enough ?
@jaredballou commented on GitHub (Jan 6, 2016):
So I'm not clear on how the current manual process works. Any chance you can link me to a document that shows me how it's done? I bet if I saw what you're trying to do I'd be able to pick it up. And I am usually reluctant to put new stuff in if it's just for one game, but if it's common with other games we can certainly give it a shot.
@UltimateByte commented on GitHub (Jan 6, 2016):
I don't have a doc, but i can give you an example of how i'm doing it manually. It's actually the same process for a server than for the user.
I made a video for the user, just mute the sound if you don't speak french :p
https://www.youtube.com/watch?v=F6pDOAbm6-Q
Get your zip containing the addon.
Ensure that you get a folder containing at least a "lua" folder.
Copy that whole folder to your "addons" folder.
Done.
So if for example i wanna add that https://github.com/nrlulz/ACF addon to my server, i'll get the zip link (right click on "Download ZIP" then copy url) https://github.com/nrlulz/ACF/archive/master.zip
Then on the server :
cd serverfiles/garrysmod/addons
wget https://github.com/nrlulz/ACF/archive/master.zip
tar -zxvf ACF-master.zip
rm ACF-master.zip
mv ACF-master acf-master //gmod for linux dosn't support uppercase
Done !
Repeat that for all addons.
The idea would be that users could do that, by simply pasting github links into text document.
For example, at $serverdir, there would be a githubaddons.txt containing
Paste here addons from github you wish to install or update line by line
Then use the command ./gmodserver git-update-addons
Then user pastes links such as :
https://github.com/nrlulz/ACF
https://github.com/wiremod/advdupe2
https://github.com/wiremod/wire
[...]
@UltimateByte commented on GitHub (Jan 7, 2016):
Sorry i'm not uzing tar -zxvf on .zip files, but ofc unzip command !
BTW i'll start working on a standalone script supporting .zip only first here : https://github.com/UltimateByte/zip-updater
@UltimateByte commented on GitHub (Jan 9, 2016):
My standalone function is pretty much working ! It's even working quite well, i'm already using it onto my ProBuild Gmod server, i'll make a crontab soon ! :)
For now it's enough, any suggestion is very very welcome.
I'm gonna wait until we can make modules for lgsm (which seems likely to happen) to think about implementing it as an optional function :)
@JimTR commented on GitHub (Jan 9, 2016):
I still think workshop covers this ... if it's not in workshop the code is not at release standard ... you guys may want 'bleeding edge' but the users of this script may have no clue on how to add this to their server .... are you trying to over complicate ?
@UltimateByte commented on GitHub (Jan 9, 2016):
Workshop is not a "standard" in any way. Especially for server based addons. Do you know about scriptfodder ? Sadly this script doesn't apply to it but still, it's light years away from the Workshop.
You most likely know ULX, the most famous admin plugin for gmod. Is this and its dependency Ulib on gmod workshop ? No. Such as utime, Uclip, ACF and extentions, advdupe2 and other wiremod extentions... I use all of that on several servers, and it's a damn pain to keep updated.
So i don't think i overcomplicate, it's event the opposite, i give a way to make boring tasks automatic with a bit of configuration instead of a lot of scripting. A guy i host a server for just told me "Finally ! It finally exists ! I won't be so bored doing this anymore", and that's exactly for that same thought that i made this script ! If it's useful to us, it most likely is for others.
@jaredballou commented on GitHub (Jan 13, 2016):
Let me take a crack at this tonight, I have some free time and might be able to draft up at least some pseudocode to make sure I have it.
@jaredballou commented on GitHub (Jan 13, 2016):
Damn, wish I'd seen you already built this. Mine is fancy in a different way, mine takes an array of GitHub user,repo,branch,method and allows native Git cloning, Tarball downloads, or Zip downloads. For archives, it keeps tabs on what update it's on by querying the GitHub downloader for headers and divining the filename. The archive is then unpacked into the directory named the same thing as the archive, and the short name of the mod is symlinked. This obviously isn't production ready as it has multiple copies of the same mod, but it was more about me getting the logic working. For native Git, it uses the GitHub API and finds the latest commit, then makes sure the repo exists locally and is configured/updated properly, Let me know what you think, feel free to steal it and do whatever you want with it, I really don't have time to maintain it. I just wanted to poke at it a bit.
https://github.com/jaredballou/linuxgsm/blob/master/GarrysMod/addons.sh
@UltimateByte commented on GitHub (Jan 13, 2016):
That rocks mate !
I had no idea how to use GitHub API, so i did it with rough zipfiles.
Both can be complementary BTW, that's something to develop ! ^^
@UltimateByte commented on GitHub (Aug 27, 2016):
Will be able to do it through this :
https://github.com/GameServerManagers/LinuxGSM/issues/631
First time launching :
@UltimateByte commented on GitHub (Nov 2, 2016):
Obsoleted by https://github.com/GameServerManagers/LinuxGSM/issues/631
@lock[bot] commented on GitHub (Jul 19, 2018):
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.