~alpine/devel

4 2

[alpine-devel] Re: [PATCH] alpine-conf: add script to add dl-3 internet repos from setup-alpine script

Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20101228154223.5155c4ec@ncopa-desktop.nor.wtbts.net>
Sender timestamp
1293547343
DKIM signature
missing
Download raw message
On Mon, 27 Dec 2010 18:10:52 -0500
Jeff Bilyk <jbilyk@gmail.com> wrote:

> Hey Natanael,
> 
> Thoughts on this patch?

sorry for beeing slow :-(

1. we should autodetect if its v2.2+ or edge. I don't think we need to
backport to pre v2.2. Also, we do not want modify this script everytiem
we make new release.

So what do you think about something like:

	release=$(cut -f1 /etc/alpine-release)
	case "$release" in
		*_git*) repo="edge";;
		[0-9]*.[0-9]*.[0-9]*)
			# release is in x.y.z format. lets cut the last
				digit
			repo=v${release%.[0-9]*};;
	esac
	
	if [ -z "$repo" ]; then
	  #prompt user
	fi

2. we should append the arch (right Timo?)

	case "$(uname -m)" in
		i[3-9]86) arch=x86;;
		x86_64) arch=x86_64;;
	esac


3. we should not have any hardcoded repo (dl-3.a.o) but we should fetch
a list of mirrors with wget and either present a choice for the users
or just pick one without any questions asked. I'd prefer the latter.

	mirror=$(wget -q -O - \
		http://www.alpinelinux.org/alpine/MIRRORS.txt \
		| head -n 1)

	url=$mirror/$repo/$arch
	...


That said, we gotta start from somewhere so I applied your patch.

Thanks for looking into this!

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Timo Teräs <timo.teras@iki.fi>
Details
Message ID
<4D19F9CB.8050807@iki.fi>
In-Reply-To
<20101228154223.5155c4ec@ncopa-desktop.nor.wtbts.net> (view parent)
Sender timestamp
1293547979
DKIM signature
missing
Download raw message
On 12/28/2010 04:42 PM, Natanael Copa wrote:
> 2. we should append the arch (right Timo?)
> 
> 	case "$(uname -m)" in
> 		i[3-9]86) arch=x86;;
> 		x86_64) arch=x86_64;;
> 	esac

To where?

Apk-tools will auto-append that, so no, it should not be in
/etc/apk/repositories

- Timo


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20101229082233.17af33bc@ncopa-desktop.nor.wtbts.net>
In-Reply-To
<4D19F9CB.8050807@iki.fi> (view parent)
Sender timestamp
1293607353
DKIM signature
missing
Download raw message
On Tue, 28 Dec 2010 16:52:59 +0200
Timo Teräs <timo.teras@iki.fi> wrote:

> On 12/28/2010 04:42 PM, Natanael Copa wrote:
> > 2. we should append the arch (right Timo?)
> > 
> > 	case "$(uname -m)" in
> > 		i[3-9]86) arch=x86;;
> > 		x86_64) arch=x86_64;;
> > 	esac
> 
> To where?
> 
> Apk-tools will auto-append that, so no, it should not be in
> /etc/apk/repositories

Is that supposed to work in current apk-tools, because it does not.

ncopa-desktop:~$ uname -m
x86_64
ncopa-desktop:~$ cat /etc/apk/repositories 
http://nl.alpinelinux.org/alpine/edge/main
#http://nl.alpinelinux.org/alpine/edge/main/x86_64
#http://nl.alpinelinux.org/alpine/edge/testing/x86_64

ncopa-desktop:~$ sudo apk add -v sed
(1/1) Installing sed (4.2.1-r1)
Executing busybox-1.17.4-r0.trigger
OK: 276 packages, 2688 dirs, 36927 files
ncopa-desktop:~$ file /usr/bin/sed 
/usr/bin/sed: ELF 32-bit LSB shared object, Intel 80386, version 1
(SYSV), dynamically linked (uses shared libs), stripped

hum. Maybe i need to make a git snapshot of apk-tools.

Thanks!

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Timo Teräs <timo.teras@iki.fi>
Details
Message ID
<4D1AE247.8060707@iki.fi>
In-Reply-To
<20101229082233.17af33bc@ncopa-desktop.nor.wtbts.net> (view parent)
Sender timestamp
1293607495
DKIM signature
missing
Download raw message
On 12/29/2010 09:22 AM, Natanael Copa wrote:
> On Tue, 28 Dec 2010 16:52:59 +0200
> Timo Teräs <timo.teras@iki.fi> wrote:
> 
>> On 12/28/2010 04:42 PM, Natanael Copa wrote:
>>> 2. we should append the arch (right Timo?)
>>>
>>> 	case "$(uname -m)" in
>>> 		i[3-9]86) arch=x86;;
>>> 		x86_64) arch=x86_64;;
>>> 	esac
>>
>> To where?
>>
>> Apk-tools will auto-append that, so no, it should not be in
>> /etc/apk/repositories
> 
> Is that supposed to work in current apk-tools, because it does not.

Implemented in commit fca1c30b801537ce35c1e4aa50331ae52c9bf567.
Not sure if it's in any pre-built binary yet.

- Timo


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20101230204937.70e82e24@alpinelinux.org>
In-Reply-To
<4D1AE247.8060707@iki.fi> (view parent)
Sender timestamp
1293742177
DKIM signature
missing
Download raw message
On Wed, 29 Dec 2010 09:24:55 +0200
Timo Teräs <timo.teras@iki.fi> wrote:

> On 12/29/2010 09:22 AM, Natanael Copa wrote:
> > On Tue, 28 Dec 2010 16:52:59 +0200
> > Timo Teräs <timo.teras@iki.fi> wrote:
> > 
> >> On 12/28/2010 04:42 PM, Natanael Copa wrote:
> >>> 2. we should append the arch (right Timo?)
> >>>
> >>> 	case "$(uname -m)" in
> >>> 		i[3-9]86) arch=x86;;
> >>> 		x86_64) arch=x86_64;;
> >>> 	esac
> >>
> >> To where?
> >>
> >> Apk-tools will auto-append that, so no, it should not be in
> >> /etc/apk/repositories
> > 
> > Is that supposed to work in current apk-tools, because it does not.
> 
> Implemented in commit fca1c30b801537ce35c1e4aa50331ae52c9bf567.
> Not sure if it's in any pre-built binary yet.

Oh, yes... I don't think its applied yet.

I'll apply it sometime you are around and have time to fix bugs. iirc
it segfaults with apk add --virtual .makedepends-foo pkg1 pkg2

-nc



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)