RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/ CHANGES rpmpopt.in rpm/scripts/ Makefile.am deb_contro...

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 26 Jan 2009 - 17:45:49 CET
Message-id: <17177959-56C6-49D7-8249-4ED5362BB634@mac.com>
This check-in is pretty close to generating the elements
normally contained in control.tar.gz of a mythical binary time*.deb
package.

For comparison, here is the control file from Debian, followed
by rpm -q --deb:control time (on my F11 system).

=====================================================
Package: time
Version: 1.7-23
Architecture: i386
Maintainer: Tollef Fog Heen <tfheen@debian.org>
Installed-Size: 104
Depends: libc6 (>= 2.7-1)
Section: utils
Priority: standard
Description: The GNU time program for measuring cpu resource usage
  The `time' command runs another program, then displays information
  about the resources used by that program, collected by the system  
while
  the program was running.  You can select which information is reported
  and the format in which it is shown, or have `time' save the  
information
  in a file instead of display it on the screen.
  .
  The resources that `time' can report on fall into the general
  categories of time, memory, I/O, and IPC calls.
  .
  The GNU version can format the output in arbitrary ways by using a
  printf-style format string to include various resource measurements.
=====================================================
Package: time
Version: 1.7-34
Architecture: i386
Installed-Size: 39
Depends: glibc-2.9.90-2.i686 time-1.7-34.i386
Section: Applications/System
Priority: standard
Description: A GNU utility for monitoring a program's use of system  
resources
  The GNU time utility runs another program, collects information about
  the resources used by that program while it is running, and displays
  the results.
=====================================================

Hmmm, Maintainer: should have been mapped to RPMTAG_PACKAGER, easy todo 
++.

I'll fix the formatting in Depends: shortly; note that file/library
dependencies are already converted to package names, that was the
hardest part of the implementation.

There is of course much more to be done before RPM can produce
the widdle *.deb pwescious cupcakes.

Any help extending the queryformat templates to accomodate *.deb
packaging is most certainly welcomed. Templating with queryformats
requires no programming skills whatsoever (although some of the
deeper representational conversions need to be done with additional
header extension tags/formats in rpmdb/hdrfmt.c).

Enjoy!

73 de Jeff

On Jan 26, 2009, at 11:31 AM, Jeff Johnson wrote:

>  RPM Package Manager, CVS Repository
>  http://rpm5.org/cvs/
>   
> ____________________________________________________________________________
>
>  Server: rpm5.org                         Name:   Jeff Johnson
>  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
>  Module: rpm                              Date:   26-Jan-2009 17:31:13
>  Branch: HEAD                             Handle: 2009012616311201
>
>  Added files:
>    rpm/scripts             deb_control
>  Modified files:
>    rpm                     CHANGES rpmpopt.in
>    rpm/scripts             Makefile.am deb_md5sums
>
>  Log:
>    - install/use deb:control queryformat. todo++
>
>  Summary:
>    Revision    Changes     Path
>    1.2764      +1  -0      rpm/CHANGES
>    2.80        +48 -45     rpm/rpmpopt.in
>    1.55        +2  -2      rpm/scripts/Makefile.am
>    1.1         +20 -0      rpm/scripts/deb_control
>    1.2         +1  -2      rpm/scripts/deb_md5sums
>   
> ____________________________________________________________________________
>
>  patch -p0 <<'@@ .'
>  Index: rpm/CHANGES
>   
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
>  $ cvs diff -u -r1.2763 -r1.2764 CHANGES
>  --- rpm/CHANGES	26 Jan 2009 15:41:57 -0000	1.2763
>  +++ rpm/CHANGES	26 Jan 2009 16:31:12 -0000	1.2764
>  @@ -1,5 +1,6 @@
>
>   5.2a2 -> 5.2a3:
>  +    - jbj: install/use deb:control queryformat. todo++
>       - jbj: install/use deb:{md5sums,preinst,postinst,prerm,postrm}  
> queryformats.
>       - jbj: install/use wnh:{primary,filelists,other}.yaml  
> queryformats.
>       - jbj: attempt --yum:other.yaml markup definition (gud enuf  
> for now).
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/rpmpopt.in
>   
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
>  $ cvs diff -u -r2.79 -r2.80 rpmpopt.in
>  --- rpm/rpmpopt.in	26 Jan 2009 15:41:57 -0000	2.79
>  +++ rpm/rpmpopt.in	26 Jan 2009 16:31:12 -0000	2.80
>  @@ -2,7 +2,7 @@
>   # \verbatim
>   #
>   # @USRLIBRPM@/@configure_input@
>  -# $Id: rpmpopt.in,v 2.79 2009/01/26 15:41:57 jbj Exp $
>  +# $Id: rpmpopt.in,v 2.80 2009/01/26 16:31:12 jbj Exp $
>   #
>   # This file *should not be modified*. Local customizations
>   # belong in /etc/popt, not here. This file will be replaced
>  @@ -167,50 +167,53 @@
>   #\n'
>
>    
> #= 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
>  -rpm	alias --deb:control --qf '\
>  -Package: %{NAME}\
>  -\nVersion: %|EPOCH?{%{EPOCH}:}|%{VERSION}-%{RELEASE}\
>  -\nSection: %{GROUP}\
>  -%|Priority?{\
>  -\nPriority: %{Priority}\
>  -}:{\
>  -\nPriority: standard\
>  -}|\
>  -\nArchitecture: %{ARCH:strsub(noarch,all,src,source)}\
>  -%|Essential?{\
>  -\nEssential: %{Essential}\
>  -}|\
>  -%|REQUIRENAME?{\
>  -\nDepends:[ %{Debdepends}]\
>  -}|\
>  -%|Predepends?{\
>  -\nPre-Depends:[ %{Predepends}]\
>  -}|\
>  -%|Recommends?{\
>  -\nRecommends:[ %{Recommends}]\
>  -}|\
>  -%|Suggests?{\
>  -\nSuggests:[ %{Suggests}]\
>  -}|\
>  -%|Enhances?{\
>  -\nEnhances:[ %{Enhances}]\
>  -}|\
>  -%|Breaks?{\
>  -\nBreaks:[ %{Breaks}]\
>  -}|\
>  -%|CONFLICTNAME?{\
>  -\nConflicts:[ %{Debconflicts}]\
>  -}|\
>  -\nInstalled-Size: %{SIZE:rpn(1023,+,1024,/)}\
>  -%|PACKAGER?{\
>  -\nMaintainer: %{PACKAGER}\
>  -}|\
>  -\nDescription: %{SUMMARY}\
>  -\n%{DESCRIPTION:strsub(^, )}\
>  -%|URL?{\
>  -\nHomepage: %{URL}\
>  -}|\
>  -\n' \
>  +#rpm	alias --deb:control --qf '\
>  +#Package: %{NAME}\
>  +#\nVersion: %|EPOCH?{%{EPOCH}:}|%{VERSION}-%{RELEASE}\
>  +#\nSection: %{GROUP}\
>  +#%|Priority?{\
>  +#\nPriority: %{Priority}\
>  +#}:{\
>  +#\nPriority: standard\
>  +#}|\
>  +#\nArchitecture: %{ARCH:strsub(noarch,all,src,source)}\
>  +#%|Essential?{\
>  +#\nEssential: %{Essential}\
>  +#}|\
>  +#%|REQUIRENAME?{\
>  +#\nDepends:[ %{Debdepends}]\
>  +#}|\
>  +#%|Predepends?{\
>  +#\nPre-Depends:[ %{Predepends}]\
>  +#}|\
>  +#%|Recommends?{\
>  +#\nRecommends:[ %{Recommends}]\
>  +#}|\
>  +#%|Suggests?{\
>  +#\nSuggests:[ %{Suggests}]\
>  +#}|\
>  +#%|Enhances?{\
>  +#\nEnhances:[ %{Enhances}]\
>  +#}|\
>  +#%|Breaks?{\
>  +#\nBreaks:[ %{Breaks}]\
>  +#}|\
>  +#%|CONFLICTNAME?{\
>  +#\nConflicts:[ %{Debconflicts}]\
>  +#}|\
>  +#\nInstalled-Size: %{SIZE:rpn(1023,+,1024,/)}\
>  +#%|PACKAGER?{\
>  +#\nMaintainer: %{PACKAGER}\
>  +#}|\
>  +#\nDescription: %{SUMMARY}\
>  +#\n%{DESCRIPTION:strsub(^, )}\
>  +#%|URL?{\
>  +#\nHomepage: %{URL}\
>  +#}|\
>  +#\n' \
>  +#	--POPTdesc=$"display binary debian/control file"
>  +
>  +rpm	alias --deb:control --qf @USRLIBRPM@/qf/deb_control \
>   	--POPTdesc=$"display binary debian/control file"
>
>   rpm	alias --deb:preinst --qf @USRLIBRPM@/qf/deb_preinst \
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/scripts/Makefile.am
>   
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
>  $ cvs diff -u -r1.54 -r1.55 Makefile.am
>  --- rpm/scripts/Makefile.am	26 Jan 2009 15:41:57 -0000	1.54
>  +++ rpm/scripts/Makefile.am	26 Jan 2009 16:31:13 -0000	1.55
>  @@ -8,7 +8,7 @@
>   	brp-strip-shared brp-strip-static-archive brp-sparc64-linux \
>   	brp-implant-ident-static brp-java-repack-jars \
>   	check-files cross-build \
>  -	deb_md5sums deb_postinst deb_postrm deb_preinst deb_prerm \
>  +	deb_control deb_md5sums deb_postinst deb_postrm deb_preinst  
> deb_prerm \
>   	executabledeps.sh \
>   	find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
>   	find-provides.ksyms find-requires.ksyms kmodtool \
>  @@ -56,7 +56,7 @@
>
>   pkglibqfdir =		@USRLIBRPM@/qf
>   pkglibqf_DATA = \
>  -	deb_md5sums deb_postinst deb_postrm deb_preinst deb_prerm \
>  +	deb_control deb_md5sums deb_postinst deb_postrm deb_preinst  
> deb_prerm \
>   	wnh_filelists_yaml wnh_other_yaml wnh_primary_yaml \
>   	yum_filelists_sqlite yum_other_sqlite yum_primary_sqlite \
>   	yum_filelists_xml yum_other_xml yum_primary_xml
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/scripts/deb_control
>   
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
>  $ cvs diff -u -r0 -r1.1 deb_control
>  --- /dev/null	2009-01-26 17:30:27 +0100
>  +++ deb_control	2009-01-26 17:31:13 +0100
>  @@ -0,0 +1,20 @@
>  +"\
>  +Package: %{NAME}\
>  +\nVersion: %|EPOCH?{%{EPOCH}:}|%{VERSION}-%{RELEASE}\
>  +\nArchitecture: %{ARCH:strsub(noarch,all,src,source)}\
>  +%|PACKAGER?{\
>  +\nMaintainer: %{PACKAGER}\
>  +}|\
>  +\nInstalled-Size: %{SIZE:rpn(1023,+,1024,/)}\
>  +%|REQUIRENAME?{\
>  +\nDepends:[ %{needswhat}]\
>  +}|\
>  +\nSection: %{GROUP}\
>  +%|Priority?{\
>  +\nPriority: %{Priority}\
>  +}:{\
>  +\nPriority: standard\
>  +}|\
>  +\nDescription: %{SUMMARY}\
>  +\n%{DESCRIPTION:strsub(^, )}\
>  +\n"
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/scripts/deb_md5sums
>   
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
>  $ cvs diff -u -r1.1 -r1.2 deb_md5sums
>  --- rpm/scripts/deb_md5sums	26 Jan 2009 15:41:57 -0000	1.1
>  +++ rpm/scripts/deb_md5sums	26 Jan 2009 16:31:13 -0000	1.2
>  @@ -1,8 +1,7 @@
>   "\
>   %|FILENAMES?{\
>   [\
>  -\n%{Debmd5sums}\
>  +%{Debmd5sums}\n\
>   ]\
>  -\n\
>   }|\
>   "
>  @@ .
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> CVS Sources Repository                                rpm-cvs@rpm5.org



  • application/pkcs7-signature attachment: smime.p7s
Received on Mon Jan 26 17:45:57 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.