Personal Updates Server

Ask for help regarding any technical issue or report any bug or OS independent issues.
User avatar
chaslinux
Novice
Novice
Posts: 109
Joined: 08 Aug 2009, 02:57
Location: Kitchener, Ontario

Re: Personal Updates Server

Post by chaslinux » 20 Dec 2010, 00:57

MadCamel wrote: In order to make updates you need to use the adler32 tool from tools/ in the mana source tree:

Code: Select all

gcc -o adler32 mana/src/tools/adler32.c
So after checking out the repos I noticed the tools directory is in mana/tools not mana/src/tools. I got the same error as someone else did below, and adding the -lz did seem to fix the problem: adler32 was created.
MadCamel wrote:

Code: Select all

cd tmwdata
This is where I got stopped, there is no tmwdata. After checkout I have ~/mainline and ~/mana.

Thanks
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: Personal Updates Server

Post by Jaxad0127 » 20 Dec 2010, 01:18

chaslinux wrote:
MadCamel wrote:

Code: Select all

cd tmwdata
This is where I got stopped, there is no tmwdata. After checkout I have ~/mainline and ~/mana.

Thanks
Then clone it.
Image
User avatar
argul
Novice
Novice
Posts: 237
Joined: 08 Aug 2010, 19:43

Re: Personal Updates Server

Post by argul » 31 Dec 2010, 02:15

Ok thx to MadCamel and Jaxad0127.
I have tried those commands and they seem to work.
Here is a script which restarts the whole server, and updates all of the repos and the files.
Please have a look and comment on that.
This script assumes this structure on the folder it is run on:

Code: Select all

ls -l
7546 2010-12-31 01:51 adler32        - the hash calculator checkout out and compiled from mana repo
4096 2010-12-31 01:56 eathena        - The server sources
4096 2010-12-29 21:44 eathena-data   - the server content
66 2010-12-31 02:02 resources2.txt   - the file which contains all the zip files and its hashes
1055 2010-12-31 02:07 restart.sh     - This script is shown below
4096 2010-12-31 01:54 tmwdata        - clients data
134733 2010-12-31 01:52 update-ba63d39..e86f9e1.zip - lots of those here, the updated zip files

Code: Select all

#!/bin/bash
killall login-server
killall char-server
killall map-server

# get new server binaries
cd eathena
git pull
make
cd ..

# copy the binaries to the eathena-data
cp ./eathena/login-server ./eathena-data
cp ./eathena/char-server ./eathena-data
cp ./eathena/map-server ./eathena-data

# get new content
cd eathena-data
git pull
cd conf
cat magic.conf.template | ./spells-build > magic.conf
cd ..
./login-server &
./char-server &
./map-server &
cd ..

# calculate the update for clients tmwdata
cd tmwdata
#caclulate the commits which got added
previous=`git log --pretty=oneline -n 1 | awk '{print $1}'`
git pull
head=`git log --pretty=oneline -n 1 | awk '{print $1}'`
# get the short form of the commit hashes
u1=`echo ${previous} | cut -c 1-7`
u2=`echo ${head} | cut -c 1-7`
# get the filelist and zip those files
git log --name-status ${previous}..${head} | awk '/^(A|M)\t/ {print $2}' | sort | uniq | xargs zip -9 -r ../update-${u1}..${u2}.zip
cd ..
# append the zip file to resources2.txt
./adler32 update-${u1}..${u2}.zip >>resources2.txt
---
User avatar
argul
Novice
Novice
Posts: 237
Joined: 08 Aug 2010, 19:43

Re: Personal Updates Server

Post by argul » 01 Jan 2011, 18:26

ok i changed the last lines to:

Code: Select all

# append the zip file to resources2.txt
if [ -f update-${u1}..${u2}.zip ]; then
  ./adler32 update-${u1}..${u2}.zip >>resources2.txt
fi
---
User avatar
MerlinX420
Warrior
Warrior
Posts: 575
Joined: 23 Dec 2007, 05:42

Re: Personal Updates Server

Post by MerlinX420 » 28 Mar 2011, 09:43

I can't seem to get the adler32 tool to compile I keep getting:

fatal error: zlib.h: No such file or directory
compilation terminated.



I figured I needed something called zlib and it's on here. I don't know why I cant compile it. ubuntu 10.10 if that matters any.
Usually when I try to compile something I just go get what it tells me I'm missing. Am I doing something wrong here?
MerlinX420
Computer games don't affect kids, I mean if Pac Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music. Has anybody seen this princess I'm looking for?
User avatar
Freeyorp101
Administrator
Administrator
Posts: 710
Joined: 04 Nov 2008, 10:17
Location: New Zealand

Re: Personal Updates Server

Post by Freeyorp101 » 28 Mar 2011, 10:09

I believe the package you're looking for is zlib1g-dev ?

---Freeyorp
(09:58:17) < tux9th> Freeyorp: your sig on the forums is kind of outdated
User avatar
Jumpy
Warrior
Warrior
Posts: 611
Joined: 26 Jan 2009, 00:31
Location: Somewhere on Earth between an Ocean and a Blue Sea

Re: Personal Updates Server

Post by Jumpy » 28 Mar 2011, 15:38

hi

Is UFB online ?
DBMP - BMS - HFDI
Don't Bring Me Problems - Bring Me Solution
and Have Fun Doing It : P

lvl 99 89 56 51 47 42 7
User avatar
MerlinX420
Warrior
Warrior
Posts: 575
Joined: 23 Dec 2007, 05:42

Re: Personal Updates Server

Post by MerlinX420 » 28 Mar 2011, 18:41

I'll try that. ty freeyorp. I found another way to get the alder32 hash of a file. :)
I still can't get my updates to work correctly. This is one area that has me a little confused.
MerlinX420
Computer games don't affect kids, I mean if Pac Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music. Has anybody seen this princess I'm looking for?
User avatar
MerlinX420
Warrior
Warrior
Posts: 575
Joined: 23 Dec 2007, 05:42

Re: Personal Updates Server

Post by MerlinX420 » 08 Apr 2011, 05:26

Turns out that it's my ISP's fault for locking down NAT redirection and that also caused seemly ALL my problems.
MerlinX420
Computer games don't affect kids, I mean if Pac Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music. Has anybody seen this princess I'm looking for?
User avatar
chaslinux
Novice
Novice
Posts: 109
Joined: 08 Aug 2009, 02:57
Location: Kitchener, Ontario

Re: Personal Updates Server

Post by chaslinux » 22 Apr 2011, 01:12

MadCamel wrote: Check out tmwdata and Mana from git:

Code: Select all

git clone git://gitorious.org/tmwdata/mainline.git
git clone git://gitorious.org/mana/mana.git
Should these two lines be?

Code: Select all

git clone git://gitorious.org/tmwdata/mainline.git tmwdata/
git clone git://gitorious.org/mana/mana.git mana/
Or should they both goto tmwdata?

Code: Select all

git clone git://gitorious.org/tmwdata/mainline.git tmwdata/
git clone git://gitorious.org/mana/mana.git tmwdata/
User avatar
Freeyorp101
Administrator
Administrator
Posts: 710
Joined: 04 Nov 2008, 10:17
Location: New Zealand

Re: Personal Updates Server

Post by Freeyorp101 » 22 Apr 2011, 01:35

chaslinux wrote:
MadCamel wrote: Check out tmwdata and Mana from git:

Code: Select all

git clone git://gitorious.org/tmwdata/mainline.git
git clone git://gitorious.org/mana/mana.git
Should these two lines be?

Code: Select all

git clone git://gitorious.org/tmwdata/mainline.git tmwdata/
git clone git://gitorious.org/mana/mana.git mana/
Or should they both goto tmwdata?

Code: Select all

git clone git://gitorious.org/tmwdata/mainline.git tmwdata/
git clone git://gitorious.org/mana/mana.git tmwdata/
The original lines were correct. As originally given, they will create tmwdata and mana directories. Attempting to put the client source and update data in the same repository makes no sense.

Note that trying the second set of commands you suggested will give an error, as the destination path tmwdata would already exist and is not an empty directory.


---Freeyorp
(09:58:17) < tux9th> Freeyorp: your sig on the forums is kind of outdated
User avatar
meway
Knight
Knight
Posts: 1736
Joined: 04 Jan 2009, 06:02
Location: Detroit MI
Contact:

Re: Personal Updates Server

Post by meway » 29 Jul 2011, 03:40

Ah, this is what I was looking for :)
User avatar
TeZeR.D
Wannabe President
Wannabe President
Posts: 107
Joined: 05 Dec 2011, 19:26

Re: Personal Updates Server

Post by TeZeR.D » 07 May 2018, 15:45

This topic is 7 years old, please don't necro :D
Locked