Bug 50572 - Simlifying the work with Debian packages storage
Simlifying the work with Debian packages storage
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: portmgr
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-03 19:10 UTC by alexs
Modified: 2003-08-04 02:21 UTC (History)
0 users

See Also:


Attachments
file.diff (752 bytes, patch)
2003-04-03 19:10 UTC, alexs
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description alexs 2003-04-03 19:10:00 UTC
If we are going to fetch something from of the sites listed as
MASTER_SITE_DEBIAN we need to set up subdarictory manually to
/main/pool/<first-letter-of-the-package-name>/<package-name>
The principle of this path every time is the same so it is easy to
automate this.

Fix: I propose to add new variable, DEBIAN_POOL. If this variable is defined in
the port Makefile and the variable MASTER_SITE_SUBDIR is not defined the
last one will be set to proper path as deswcribed above. The patch to
the bsd.port.mk is short and simple:
How-To-Repeat: 
N/A
Comment 1 Tilman Keskinoz freebsd_committer 2003-04-05 19:48:42 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

Over to bsd.port.mk Maintainers
Comment 2 kris 2003-04-13 04:51:22 UTC
I'm not sure I like this.  Are there ports that use MASTER_SITE_DEBIAN
that do not need DEBIAN_POOL?  If not, why can't we just redefine
MASTER_SITE_DEBIAN and fix them?

Kris
Comment 3 kris freebsd_committer 2003-04-13 04:51:29 UTC
State Changed
From-To: open->feedback

Awaiting submitter feedback
Comment 4 kris 2003-07-28 01:33:02 UTC
Adding to audit trail

----- Forwarded message from Alex Semenyaka <alexs@ratmir.ru> -----

On Sat, Apr 12, 2003 at 08:51:22PM -0700, Kris Kennaway wrote:
> I'm not sure I like this.  Are there ports that use MASTER_SITE_DEBIAN
> that do not need DEBIAN_POOL?  If not, why can't we just redefine
> MASTER_SITE_DEBIAN and fix them?

Well, it would be too global proposition (just joke).

There are 19 FreeBSD ports which are using MASTER_SITE_DEBIAN:

audio/flac
audio/mp3rename
devel/ecgi
editors/beav
editors/dedit
ftp/wget
games/an
games/xjump
graphics/panorama
mail/ssmtp
math/xspread
misc/mime-support
multimedia/vcdtools
net/netmask
net/sniffit
security/makepasswd
security/pam-pgsql
x11/gvid
x11/xloadimage

[By the way, in the misc/mime-support the same approach I proposed is used -
I thing that the supporter of this ports wants to reach the same goals as I
do.]

So, there are 5 ports living not under pool/main/<letter>/<name>:
 * devel/ecgi - comes from          pool/main/libe/libecgi
 * security/pam-pgsql - comes from  pool/non-US/main/p/pam-pgsql
 * math/xspread - comes from        dists/potato/main/source/math
 * net/netmask  - comes from        dists/potato/main/source/net
 * security/makepasswd - comes from dists/potato/main/source/admin

I fetch ls-lR from the Debian ftp and found that there are a LOT of
another packages stored under dists/potato/main/source/. We just do not
have them under ports' tree right now (well, I don't mean that we really
need the most of them <g>). So it is better to save our MASTER_SITE_DEBIAN
as is, I think.

It is easy to define also some macros and for other Debian hierarchies
(e.g. DEBIAN_POOL_LIB and DEBIAN_POTATO) but right now much more our ported
packages live under pool/main/ than under dists/potato/main/source/ or
others, thats why I proposed the introduction of DEBIAN_POOL only.

								SY, Alex

----- End forwarded message -----
Comment 5 kris 2003-07-28 01:33:21 UTC
Adding to audit trail

----- Forwarded message from Kris Kennaway <kris@obsecurity.org> -----

On Tue, Apr 15, 2003 at 02:44:38AM +0400, Alex Semenyaka wrote:

> So, there are 5 ports living not under pool/main/<letter>/<name>:
>  * devel/ecgi - comes from          pool/main/libe/libecgi
>  * security/pam-pgsql - comes from  pool/non-US/main/p/pam-pgsql
>  * math/xspread - comes from        dists/potato/main/source/math
>  * net/netmask  - comes from        dists/potato/main/source/net
>  * security/makepasswd - comes from dists/potato/main/source/admin
> 
> I fetch ls-lR from the Debian ftp and found that there are a LOT of
> another packages stored under dists/potato/main/source/. We just do not
> have them under ports' tree right now (well, I don't mean that we really
> need the most of them <g>). So it is better to save our MASTER_SITE_DEBIAN
> as is, I think.

I think the best solution is to add MASTER_SITE_DEBIAN_POOL then.

Kris

----- End forwarded message -----
Comment 6 kris 2003-07-28 01:33:34 UTC
Adding to audit trail

----- Forwarded message from Alex Semenyaka <alexs@ratmir.ru> -----

On Mon, Apr 14, 2003 at 09:25:47PM -0700, Kris Kennaway wrote:
> I think the best solution is to add MASTER_SITE_DEBIAN_POOL then.

Uhmmmm... That's better and I would understand it before. Sure,
MASTER_SITE_DEBIAN_POOL fits perfectly to the current concept of
bsd.port.mk. Thanks.

Do you need my help with the correction of the existing Makefiles for
the ports which are using Debian?

								SY, Alex

----- End forwarded message -----
Comment 7 kris 2003-07-28 01:33:45 UTC
Adding to audit trail

----- Forwarded message from Kris Kennaway <kris@obsecurity.org> -----

On Tue, Apr 15, 2003 at 01:55:24PM +0400, Alex Semenyaka wrote:
> On Mon, Apr 14, 2003 at 09:25:47PM -0700, Kris Kennaway wrote:
> > I think the best solution is to add MASTER_SITE_DEBIAN_POOL then.
> 
> Uhmmmm... That's better and I would understand it before. Sure,
> MASTER_SITE_DEBIAN_POOL fits perfectly to the current concept of
> bsd.port.mk. Thanks.
> 
> Do you need my help with the correction of the existing Makefiles for
> the ports which are using Debian?

If you can submit a patch to bsd.sites.mk and to the relevant ports,
that would be great.

Kris

----- End forwarded message -----
Comment 8 kris 2003-07-28 01:34:06 UTC
Adding to audit trail

----- Forwarded message from Alex Semenyaka <alexs@ratmir.ru> -----

On Tue, Apr 15, 2003 at 03:01:26AM -0700, Kris Kennaway wrote:
> If you can submit a patch to bsd.sites.mk and to the relevant ports,
> that would be great.

Sure, will be done by tomorrow evening :)

								SY, Alex

----- End forwarded message -----
Comment 9 kris 2003-07-28 01:34:20 UTC
Adding to audit trail

----- Forwarded message from Alex Semenyaka <alexs@ratmir.ru> -----

On Tue, Apr 15, 2003 at 03:01:26AM -0700, Kris Kennaway wrote:
> If you can submit a patch to bsd.sites.mk and to the relevant ports,
> that would be great.

I attached the patch to this message. A couple of notes.

1) Since bsd.sites.mk introduces _sites_ per se, and there is special %SUBDIR%
abstraction to specify the _directory_, and new macro is represents some
hierarchy inside the set of specific - namely, Debian - sites, I decided
that the definition of the new macro should not be placed to bsd.sites.mk.
So I placed that definition into bsd.port.mk, immediately after the inclusion
of bsd.sites.mk.

2) After every change I tried to build the affected packages. Funny but two
of them had errors. In audio/mp3rename there was MASTER_SITES_DEBIAN instead
of MASTER_SITE_DEBIAN. In editors/dedit there was line

USE_GNOME=     yes

while semantics of USE_GNOME macro assume the enumeration of the Gnome
components. Since there is no such Gnome component as "yes" the port
editors/dedit immediately was marked as BROKEN by bsd.gnome.mk. I fixed that
line also.

3) Some ports are using Debian pool as a source of patches, not main files.
But there is no PATCHNAME macro, only PATCH_FILES, and, generally speaking,
it can enumerate several patchfiles with names starting with different letters.
So in the _general_ _case_ MASTER_SITE_DEBIAN_POOL (which depends on the
port's name and it's first letter) may not help. But in ALL cases we are
dealing with now all patchfiles' names are starting from the package name
(something like xloadimage_4.1-10.diff.gz) so using that new macro works
perfectly.

Hope it will help!

								SY, Alex

diff -u -U2 -r ./Mk/bsd.port.mk ../ports/Mk/bsd.port.mk
--- ./Mk/bsd.port.mk	Thu Apr 10 22:54:46 2003
+++ ../ports/Mk/bsd.port.mk	Tue Apr 15 17:58:52 2003
@@ -1640,4 +1640,7 @@
 .include "bsd.sites.mk"
 
+MASTER_SITE_DEBIAN_POOL+=	\
+	${MASTER_SITE_DEBIAN:C|(/%SUBDIR%/)|/pool/main/${PORTNAME:C/^(.).*$/\1/}/${PORTNAME}/|}
+
 # Empty declaration to avoid "variable MASTER_SITES recursive" error
 MASTER_SITES?=
diff -u -U2 -r ./audio/flac/Makefile ../ports/audio/flac/Makefile
--- ./audio/flac/Makefile	Tue Feb 25 13:29:58 2003
+++ ../ports/audio/flac/Makefile	Tue Apr 15 16:45:00 2003
@@ -12,6 +12,5 @@
 MASTER_SITE_SUBDIR=	${PORTNAME}
 
-PATCH_SITES=	${MASTER_SITE_DEBIAN}
-PATCH_SITE_SUBDIR=	pool/main/f/${PORTNAME}
+PATCH_SITES=	${MASTER_SITE_DEBIAN_POOL}
 PATCHFILES=	${PORTNAME}_${PORTVERSION}-3.diff.gz
 PATCH_DIST_STRIP=	-p1
diff -u -U2 -r ./audio/mp3rename/Makefile ../ports/audio/mp3rename/Makefile
--- ./audio/mp3rename/Makefile	Tue Feb 25 13:30:24 2003
+++ ../ports/audio/mp3rename/Makefile	Tue Apr 15 16:50:12 2003
@@ -9,6 +9,5 @@
 PORTVERSION=	0.6
 CATEGORIES=	audio
-MASTER_SITES=	${MASTER_SITES_DEBIAN}
-MASTER_SITE_SUBDIR=	pool/main/m/mp3rename
+MASTER_SITES=	${MASTER_SITE_DEBIAN_POOL}
 DISTNAME=	${PORTNAME}_${PORTVERSION}.orig
 
diff -u -U2 -r ./editors/beav/Makefile ../ports/editors/beav/Makefile
--- ./editors/beav/Makefile	Tue Feb 25 13:30:43 2003
+++ ../ports/editors/beav/Makefile	Tue Apr 15 16:51:26 2003
@@ -9,6 +9,5 @@
 PORTVERSION=	1.40.15
 CATEGORIES=	editors
-MASTER_SITES=	${MASTER_SITE_DEBIAN}
-MASTER_SITE_SUBDIR=	pool/main/b/beav
+MASTER_SITES=	${MASTER_SITE_DEBIAN_POOL}
 DISTNAME=	${PORTNAME}_${PORTVERSION:R}-${PORTVERSION:E}
 
diff -u -U2 -r ./editors/dedit/Makefile ../ports/editors/dedit/Makefile
--- ./editors/dedit/Makefile	Mon Mar 10 21:47:23 2003
+++ ../ports/editors/dedit/Makefile	Tue Apr 15 17:37:30 2003
@@ -10,6 +10,5 @@
 PORTREVISION=	1
 CATEGORIES=	editors gnome
-MASTER_SITES=	${MASTER_SITE_DEBIAN}
-MASTER_SITE_SUBDIR=	pool/main/d/dedit
+MASTER_SITES=	${MASTER_SITE_DEBIAN_POOL}
 DISTNAME=	${PORTNAME}_${PORTVERSION}
 
@@ -22,5 +21,5 @@
 
 USE_X_PREFIX=	yes
-USE_GNOME=	yes
+USE_GNOME=	gnomelibs gtk12 glib12 orbit
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
diff -u -U2 -r ./ftp/wget/Makefile ../ports/ftp/wget/Makefile
--- ./ftp/wget/Makefile	Thu Apr 10 22:54:59 2003
+++ ../ports/ftp/wget/Makefile	Tue Apr 15 17:40:43 2003
@@ -13,6 +13,5 @@
 MASTER_SITE_SUBDIR=	wget
 
-PATCH_SITES=	${MASTER_SITE_DEBIAN}
-PATCH_SITE_SUBDIR=	pool/main/w/wget
+PATCH_SITES=	${MASTER_SITE_DEBIAN_POOL}
 PATCHFILES=	wget_${PORTVERSION}-10.diff.gz
 PATCH_DIST_STRIP=	-p1
diff -u -U2 -r ./games/an/Makefile ../ports/games/an/Makefile
--- ./games/an/Makefile	Tue Feb 25 13:30:47 2003
+++ ../ports/games/an/Makefile	Tue Apr 15 17:41:33 2003
@@ -9,6 +9,5 @@
 PORTVERSION=	0.95
 CATEGORIES=	games
-MASTER_SITES=	${MASTER_SITE_DEBIAN}
-MASTER_SITE_SUBDIR=	pool/main/a/an
+MASTER_SITES=	${MASTER_SITE_DEBIAN_POOL}
 DISTNAME=	${PORTNAME}_${PORTVERSION}.orig
 
diff -u -U2 -r ./games/xjump/Makefile ../ports/games/xjump/Makefile
--- ./games/xjump/Makefile	Tue Feb 25 13:30:50 2003
+++ ../ports/games/xjump/Makefile	Tue Apr 15 17:42:06 2003
@@ -9,6 +9,5 @@
 PORTVERSION=	2.7.5
 CATEGORIES=	games
-MASTER_SITES=	${MASTER_SITE_DEBIAN}
-MASTER_SITE_SUBDIR=	pool/main/x/xjump
+MASTER_SITES=	${MASTER_SITE_DEBIAN_POOL}
 DISTNAME=	${PORTNAME}_${PORTVERSION}.orig
 
diff -u -U2 -r ./graphics/panorama/Makefile ../ports/graphics/panorama/Makefile
--- ./graphics/panorama/Makefile	Tue Feb 25 13:30:55 2003
+++ ../ports/graphics/panorama/Makefile	Tue Apr 15 17:44:02 2003
@@ -10,10 +10,8 @@
 PORTREVISION=	1
 CATEGORIES=	graphics
-MASTER_SITES=	${MASTER_SITE_DEBIAN}
-MASTER_SITE_SUBDIR=	pool/main/p/panorama
+MASTER_SITES=	${MASTER_SITE_DEBIAN_POOL}
 DISTNAME=	${PORTNAME}_${PORTVERSION}.orig
 
 PATCH_SITES=	${MASTER_SITES}
-PATCH_SITE_SUBDIR=	${MASTER_SITE_SUBDIR}
 PATCHFILES=	${PORTNAME}_${PORTVERSION}-2.1.diff.gz
 PATCH_DIST_STRIP=	-p1
diff -u -U2 -r ./mail/ssmtp/Makefile ../ports/mail/ssmtp/Makefile
--- ./mail/ssmtp/Makefile	Mon Apr 14 18:45:53 2003
+++ ../ports/mail/ssmtp/Makefile	Tue Apr 15 17:44:35 2003
@@ -9,6 +9,5 @@
 PORTVERSION=	2.60.3
 CATEGORIES=	mail
-MASTER_SITES=	${MASTER_SITE_DEBIAN}
-MASTER_SITE_SUBDIR=	pool/main/s/${PORTNAME}
+MASTER_SITES=	${MASTER_SITE_DEBIAN_POOL}
 DISTNAME=	${PORTNAME}_${PORTVERSION}
 
diff -u -U2 -r ./misc/mime-support/Makefile ../ports/misc/mime-support/Makefile
--- ./misc/mime-support/Makefile	Thu Mar 27 05:37:36 2003
+++ ../ports/misc/mime-support/Makefile	Tue Apr 15 17:46:08 2003
@@ -9,6 +9,5 @@
 PORTVERSION=	3.21.1
 CATEGORIES=	misc
-MASTER_SITES=	${MASTER_SITE_DEBIAN}
-MASTER_SITE_SUBDIR=	pool/main/${PORTNAME:C/^(.).*$/\1/}/${PORTNAME}
+MASTER_SITES=	${MASTER_SITE_DEBIAN_POOL}
 DISTNAME=	${PORTNAME}_${PORTVERSION:C/(.*)\.([^.])/\1-\2/}
 
diff -u -U2 -r ./multimedia/vcdtools/Makefile ../ports/multimedia/vcdtools/Makefile
--- ./multimedia/vcdtools/Makefile	Tue Feb 25 13:31:16 2003
+++ ../ports/multimedia/vcdtools/Makefile	Tue Apr 15 17:46:59 2003
@@ -11,6 +11,5 @@
 PORTREVISION=	1
 CATEGORIES=	multimedia
-MASTER_SITES=	${MASTER_SITE_DEBIAN}
-MASTER_SITE_SUBDIR=	pool/main/v/vcdtools
+MASTER_SITES=	${MASTER_SITE_DEBIAN_POOL}
 DISTNAME=	${PORTNAME}_${PORTVERSION}.orig
 
diff -u -U2 -r ./net/sniffit/Makefile ../ports/net/sniffit/Makefile
--- ./net/sniffit/Makefile	Tue Feb 25 13:31:26 2003
+++ ../ports/net/sniffit/Makefile	Tue Apr 15 17:48:06 2003
@@ -16,6 +16,5 @@
 DISTNAME=	sniffit.0.3.7.beta
 
-PATCH_SITES=	${MASTER_SITE_DEBIAN}
-PATCH_SITE_SUBDIR=	pool/main/s/sniffit
+PATCH_SITES=	${MASTER_SITE_DEBIAN_POOL}
 PATCHFILES=	sniffit_0.3.7.beta-6.1.diff.gz
 PATCH_DIST_STRIP=	-p1
diff -u -U2 -r ./x11/gvid/Makefile ../ports/x11/gvid/Makefile
--- ./x11/gvid/Makefile	Tue Feb 25 13:31:52 2003
+++ ../ports/x11/gvid/Makefile	Tue Apr 15 17:50:16 2003
@@ -9,6 +9,5 @@
 PORTVERSION=	0.3
 CATEGORIES=	x11 gnome
-MASTER_SITES=	${MASTER_SITE_DEBIAN}
-MASTER_SITE_SUBDIR=	pool/main/g/gvid
+MASTER_SITES=	${MASTER_SITE_DEBIAN_POOL}
 DISTNAME=	${PORTNAME}_${PORTVERSION}.orig
 
diff -u -U2 -r ./x11/xloadimage/Makefile ../ports/x11/xloadimage/Makefile
--- ./x11/xloadimage/Makefile	Tue Feb 25 13:31:53 2003
+++ ../ports/x11/xloadimage/Makefile	Tue Apr 15 17:51:27 2003
@@ -15,6 +15,5 @@
 MASTER_SITES=	ftp://ftp.x.org/R5contrib/
 DISTNAME=	${PORTNAME}.${VERSION}
-PATCH_SITES=	${MASTER_SITE_DEBIAN}
-PATCH_SITE_SUBDIR=	pool/main/x/xloadimage
+PATCH_SITES=	${MASTER_SITE_DEBIAN_POOL}
 PATCHFILES=	xloadimage_${VERSION}-${REVISION}.diff.gz
 PATCH_DIST_STRIP= -p1


----- End forwarded message -----
Comment 10 kris freebsd_committer 2003-07-28 02:15:38 UTC
State Changed
From-To: feedback->analyzed

A version of this patch (MASTER_SITE_DEBIAN_POOL put back 
into bsd.sites.mk) is being tested on the current package run.
Comment 11 kris freebsd_committer 2003-08-04 02:21:09 UTC
State Changed
From-To: analyzed->closed

Patch committed, thanks!