A European mirror for MX-14 / MEPIS 12 repositories

Message
Author
User avatar
kmathern
Developer
Posts: 2402
Joined: Wed Jul 12, 2006 2:26 pm

Re: A European mirror for MX-14 / MEPIS 12 repositories

#11 Post by kmathern »

Gaer Boy wrote:On a Live boot, using F2 to select English (UK) the UK debian mirrors are listed in sources. I don't know where this magic happens, but could something similar be done for the MX mirrors?
I think that magic happens in the "set_mirror" function of the /etc/init.d/antiX-init script:

Code: Select all

set_mirror() {
    local mirror=$1

    case "$mirror" in
        [a-zA-Z][a-zA-Z]) ;;
        *)
            error "$_Bad_mirror_code_X_expected_two_letters_" $(pquote $mirror)
            return;;
    esac

    source_list=/etc/apt/sources.list.d/debian.list

    first_write $source_list || [ "$CMD_MIRROR" ] || return

    echo_live "$_Localizing_X_to_Y_mirror_" $(pquote $source_list) $(pquote $MIRROR)
    sed -i "s=/ftp\.\(..\.\)\\?debian\.org/=/ftp.$mirror.debian.org/=" $source_list
}

User avatar
Stevo
Developer
Posts: 12774
Joined: Fri Dec 15, 2006 8:07 pm

Re: A European mirror for MX-14 / MEPIS 12 repositories

#12 Post by Stevo »

So would the the debian.list file be possibly reset at every boot? If so, it would be frustrating for someone that edited it to get a custom mirror, only to have the customizations vanish. If that's how it does work, we should add a comment in the file documenting that.

It seems you could have something the same for the mepis.list file, but we'd have to decide which locales use the EU server and which the US one. That looks tough to implement.

User avatar
kmathern
Developer
Posts: 2402
Joined: Wed Jul 12, 2006 2:26 pm

Re: A European mirror for MX-14 / MEPIS 12 repositories

#13 Post by kmathern »

Stevo wrote:So would the the debian.list file be possibly reset at every boot? If so, it would be frustrating for someone that edited it to get a custom mirror, only to have the customizations vanish. ...
The /etc/init.d/antiX-init script is only present and only gets run when booting the live session, so I think the sed edit of the debian.list file only happens once.

From what I can see, the /etc/init.d/antiX-init script isn't present on a harddrive install. Either it doesn't get copied over to harddrive partition during the install process, or it gets copied over and then removed by the installer.

User avatar
BitJam
Developer
Posts: 2283
Joined: Sat Aug 22, 2009 11:36 pm

Re: A European mirror for MX-14 / MEPIS 12 repositories

#14 Post by BitJam »

Stevo wrote:So would the the debian.list file be possibly reset at every boot? If so, it would be frustrating for someone that edited it to get a custom mirror, only to have the customizations vanish. If that's how it does work, we should add a comment in the file documenting that.
That is why the call to first_write() comes first. We only update the mirror once, even on a live system unless a user specifically types in a mirror=xx cheat code. The mirror is also automatically set if you select a language in the bootloader but that only happens once. The CMD_MIRROR variable is set by the mirror= cheat while the MIRROR variable is set by both the mirror= cheat and the lang= cheat.

For systems without persistence this makes no difference because you always start out with a clean slate on every live boot (so we always update the mirror in that case if a language is set). The first_write() call is designed to protect live systems with persistence. Since the antiX-init script (now called live-init) only runs on live systems, people with installed systems have nothing to worry about.

This system has been a place for a number of years. We tried to strike the right balance between automation and customization without clobbering changes made by users.

BTW: the files we use to record which files we've written to are at /etc/live/protect/persist and /etc/live/protect/remaster. The 2nd one is generally not used. The first one could/should be optionally deleted when doing a snapshot depending on whether it is to be general purpose or personal.
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."

-- Richard Feynman

User avatar
timkb4cq
Developer
Posts: 3186
Joined: Wed Jul 12, 2006 4:05 pm

Re: A European mirror for MX-14 / MEPIS 12 repositories

#15 Post by timkb4cq »

I should have thought of this earlier, but I finally realized that the antiX server, located in Ontario, must also be experiencing the increased traffic. So I asked Anticapitalista if I should host a mirror of the antiX repos as well. That made sense to him as well so:

antix.daveserver.info/stable & antix.daveserver.info/testing
are now being mirrored at
nl.mxrepo.com/antix/stable & nl.mxrepo.com/antix/testing

Specifically for MX-14 that means that
deb http://antix.daveserver.info/stable/ stable main
can be replaced in /etc/apt/sources.d/antix.list by
deb http://nl.mxrepo.com/antix/stable/ stable main
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

antiX-Dave
Developer
Posts: 372
Joined: Mon Apr 16, 2012 4:51 pm

Re: A European mirror for MX-14 / MEPIS 12 repositories

#16 Post by antiX-Dave »

Well there was nothing really to out of the ordinary. My server only really complained (sent me a message) about a large set of connections coming from an address in the Netherlands recently... go figure why that may have been :P

Anyway for the somewhat curious there has always been a log set...
http://antix.daveserver.info/log/


Edit:
May I ask what times have you set the sync for? Then I can add it to the ignore / trust list and I should not get unwanted messages warning me of possible issues :)

User avatar
Pierre
Posts: 310
Joined: Thu Apr 19, 2007 9:23 am

Re: A European mirror for MX-14 / MEPIS 12 repositories

#17 Post by Pierre »

timkb4cq wrote:Community Repository traffic hit an all-time record last month at over twice the prior years average. Only 1/3 of this traffic was from the US, while Germany, France, U.K, & Italy together accounted for another 1/3.

Accordingly, I've set up a repository mirror in the Netherlands that should serve our European users better, as well as provide some desirable redundancy.

BTW, mxrepo.com also points to the old US server and may be used interchangeably with main.mepis-deb.org

Enjoy!

as an item of curiosity:
what is the traffic from Oceania?. - if that is available. ..

- from here, the US may be faster, but the EU can be more stable.
& there is now also the issue, now that Netflix has arrived locally,
of congestion issue, at peak times.
- some ISPs are reporting that Netflix is ~25% of their traffic. ..
that alone, is causing congestion.
- is is indeed an issue, that so much traffic is derived from NA sources.
it's a serious bottle-neck, to deal with.

User avatar
timkb4cq
Developer
Posts: 3186
Joined: Wed Jul 12, 2006 4:05 pm

Re: A European mirror for MX-14 / MEPIS 12 repositories

#18 Post by timkb4cq »

antiX-Dave wrote:May I ask what times have you set the sync for? Then I can add it to the ignore / trust list and I should not get unwanted messages warning me of possible issues :)
I have it set to update hourly at 4 minutes after the hour. I can easily adjust that if you would prefer a different frequency and/or time .
Now that the initial mirror is complete that will only retrieve index files and any newly added files, so it shouldn't really be noticeable.
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

User avatar
timkb4cq
Developer
Posts: 3186
Joined: Wed Jul 12, 2006 4:05 pm

Re: A European mirror for MX-14 / MEPIS 12 repositories

#19 Post by timkb4cq »

Pierre wrote:as an item of curiosity:
what is the traffic from Oceania?. - if that is available.
After a quick tally, it looks like about 4% of the traffic is from Oceania. Another 2.5% is from eastern Asia (Japan ,China, Taiwan, Hong Kong, Singapore, Thailand, Vietnam, Cambodia, S. Korea).
Over 100 countries are represented.
HP Pavillion TP01, AMD Ryzen 3 5300G (quad core), Crucial 500GB SSD, Toshiba 6TB 7200rpm
Dell Inspiron 15, AMD Ryzen 7 2700u (quad core). Sabrent 500GB nvme, Seagate 1TB

User avatar
Gaer Boy
Posts: 859
Joined: Sat Jun 06, 2009 6:06 am

Re: A European mirror for MX-14 / MEPIS 12 repositories

#20 Post by Gaer Boy »

I made the change from the daveserver repo to nl.mxrepo this morning, but had a 'not found' on Reload in Synaptic. I've tried intermittently during the day but still no joy.

Phil

Gigabyte B550I Aorus Pro AX, Ryzen 5 5600G, 16GB, 250GB Samsung SSD (GPT), 2x1TB HDD (MBR), MX-21-AHS
Lenovo Thinkpad X220, dual-core i5, 4MB, 120GB Samsung SSD (GPT), MX-21

Post Reply

Return to “MX Repositories”