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, 01:57
Location: Kitchener, Ontario

Re: Personal Updates Server

Post 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
User avatar
Jaxad0127
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: Personal Updates Server

Post 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.
Image
User avatar
argul
Novice
Novice
Posts: 237
Joined: 08 Aug 2010, 18:43

Re: Personal Updates Server

Post 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
---
User avatar
argul
Novice
Novice
Posts: 237
Joined: 08 Aug 2010, 18:43

Re: Personal Updates Server

Post 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
---
User avatar
Merlin
Developer
Developer
Posts: 601
Joined: 23 Dec 2007, 04:42

Re: Personal Updates Server

Post 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?
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
Archivist Prime
Archivist Prime
Posts: 765
Joined: 04 Nov 2008, 09:17
Location: New Zealand

Re: Personal Updates Server

Post by Freeyorp101 »

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
Knight
Knight
Posts: 611
Joined: 25 Jan 2009, 23:31
Location: Somewhere on Earth between an Ocean and a Blue Sea

Re: Personal Updates Server

Post by Jumpy »

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
Merlin
Developer
Developer
Posts: 601
Joined: 23 Dec 2007, 04:42

Re: Personal Updates Server

Post 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.
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
Merlin
Developer
Developer
Posts: 601
Joined: 23 Dec 2007, 04:42

Re: Personal Updates Server

Post by Merlin »

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, 01:57
Location: Kitchener, Ontario

Re: Personal Updates Server

Post 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/
User avatar
Freeyorp101
Archivist Prime
Archivist Prime
Posts: 765
Joined: 04 Nov 2008, 09:17
Location: New Zealand

Re: Personal Updates Server

Post 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
(09:58:17) < tux9th> Freeyorp: your sig on the forums is kind of outdated
User avatar
meway
TMW Classic
TMW Classic
Posts: 1737
Joined: 04 Jan 2009, 05:02
Location: Detroit MI

Re: Personal Updates Server

Post by meway »

Ah, this is what I was looking for :)
TeZeR.D
TMW Adviser
TMW Adviser
Posts: 131
Joined: 05 Dec 2011, 18:26

Re: Personal Updates Server

Post by TeZeR.D »

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