Page 2 of 2

Re: Personal Updates Server

Posted: 19 Dec 2010, 23:57
by chaslinux
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

Re: Personal Updates Server

Posted: 20 Dec 2010, 00:18
by Jaxad0127
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.

Re: Personal Updates Server

Posted: 31 Dec 2010, 01:15
by argul
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

Re: Personal Updates Server

Posted: 01 Jan 2011, 17:26
by argul
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

Re: Personal Updates Server

Posted: 28 Mar 2011, 08:43
by Merlin
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?

Re: Personal Updates Server

Posted: 28 Mar 2011, 09:09
by Freeyorp101
I believe the package you're looking for is zlib1g-dev ?

---Freeyorp

Re: Personal Updates Server

Posted: 28 Mar 2011, 14:38
by Jumpy
hi

Is UFB online ?

Re: Personal Updates Server

Posted: 28 Mar 2011, 17:41
by Merlin
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.

Re: Personal Updates Server

Posted: 08 Apr 2011, 04:26
by Merlin
Turns out that it's my ISP's fault for locking down NAT redirection and that also caused seemly ALL my problems.

Re: Personal Updates Server

Posted: 22 Apr 2011, 00:12
by chaslinux
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/

Re: Personal Updates Server

Posted: 22 Apr 2011, 00:35
by Freeyorp101
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

Re: Personal Updates Server

Posted: 29 Jul 2011, 02:40
by meway
Ah, this is what I was looking for :)

Re: Personal Updates Server

Posted: 07 May 2018, 14:45
by TeZeR.D
This topic is 7 years old, please don't necro :D