User:Jaffa/mud design
m (Typo fix) |
m (Reverted edits by 67.180.227.180 (Talk); changed back to last version by Amigadave) |
||
(19 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | With the new [[Extras repository process definition|extras process]], [http://mud-builder | + | With the new [[Extras repository process definition|extras process]], [http://mud-builder.garage.maemo.org/ mud-builder] should be re-focused<ref>[https://garage.maemo.org/pipermail/mud-builder-users/2008-June/000255.html MUD Direction?], ''Andrew Flegg'', 26 June 2008</ref> and re-invigorated to help packaging in accordance with the Maemo Packaging Policy<ref>[https://maemo.org/forrest-images/pdf/maemo-policy.pdf Maemo Packaging Policy], ''Eero Tamminen'', 28 May 2008</ref> and [[Uploading to Extras-devel]]. |
== Requirements == | == Requirements == | ||
- | * Any package patched, or not from a existing deb source, needs to have a ''maemo'' version suffix. | + | * Taking an upstream project (from somewhere) and applying zero or more patches for Maemo. |
- | ** For example, if the base version is 7.0, the package version from mud should be '''7.0-0maemo1''' for the first upload, '''7.0-0maemo2''' for the second, etc. | + | ** Automate creation of projects. |
- | ** If the upstream package comes from Debian (with version 3.5-7) and is unpatched, the package uploaded from mud is also '''3.5-7'''. | + | ** Take URL of upstream source deb info page (fish out .dsc, .diff.gz and .tar.gz). |
- | ** If the upstream package comes from Debian (with version 3.5-7) and ''is'' patched, the package uploaded from mud is '''3.5-7maemo1''' for the first upload, '''3.5-7maemo2''' for the second, etc. | + | ** Take URL of upstream tarball <strike>done</strike> |
- | * Warnings should be given when uploading a package with "Section: user/(.*)" where <code>$1</code> is not in the accepted list. | + | * Provide easy in-life management, e.g. changelogs and maintaining the patch. |
- | * It is an error to try and upload a package with no description. | + | * Proper debification and Maemo additions (like <code>Section: user/</code> and the icon) <strike>done</strike> |
+ | * Conformant with the Maemo Packaging Policy: | ||
+ | ** Any package patched, or not from a existing deb source, needs to have a ''maemo'' version suffix. | ||
+ | *** For example, if the base version is 7.0, the package version from mud should be '''7.0-0maemo1''' for the first upload, '''7.0-0maemo2''' for the second, etc. | ||
+ | *** If the upstream package comes from Debian (with version 3.5-7) and is unpatched, the package uploaded from mud is also '''3.5-7'''. | ||
+ | *** If the upstream package comes from Debian (with version 3.5-7) and ''is'' patched, the package uploaded from mud is '''3.5-7maemo1''' for the first upload, '''3.5-7maemo2''' for the second, etc. | ||
+ | ** Warnings should be given when uploading a package with "Section: user/(.*)" where <code>$1</code> is not in the accepted list. | ||
+ | ** It is an error to try and upload a package with no description. | ||
* Auto-sign & upload to ...-extras-builder in one-step | * Auto-sign & upload to ...-extras-builder in one-step | ||
- | ** Use scp to upload all the files, uploading .changes and .dsc ''last'', to avoid auto-builder issues (driven by .dsc files) | + | ** Use scp to upload all the files, uploading .changes and .dsc ''last'', to avoid auto-builder issues (driven by .dsc files and [https://bugs.maemo.org/show_bug.cgi?id=3354 #3354]) |
+ | * Auto-determine Build-Depends <strike>r234</strike> | ||
== Examples == | == Examples == | ||
Line 32: | Line 40: | ||
== Workflow == | == Workflow == | ||
+ | Use quilt<ref>[http://www.suse.de/~agruen/quilt.pdf "Introduction to Quilt", ''Andreas Gr¨unbacher'', June 12 2005</ref>? | ||
+ | |||
TBC | TBC | ||
== Internals == | == Internals == | ||
- | + | ||
+ | === Package structure === | ||
+ | Instead of having <code>''package''.xml</code>, <code>patches/''package''.patch</code> and <code>icon/''package''</code>, v2.0 of mud should have more consolidation: | ||
+ | |||
+ | ''package''.pkg/ | ||
+ | mud.xml - required | ||
+ | ''package''.png - optional icon, used if -nn not present | ||
+ | ''package''-26.png - optional, if present copied to right place | ||
+ | ''package''-64.png - optional, if present copied to right place | ||
+ | ''package''.desktop - if present, auto-copied to right place | ||
+ | ''package''.service - if present, auto-copied to right place | ||
+ | extras.xml- optional specification of file destinations, modes, owners, groups etc. | ||
+ | extras/ - copied to ''build-dir''/mud-extras | ||
+ | ... | ||
+ | patches/ - contains quilt patch set | ||
+ | ... | ||
+ | ... | ||
+ | |||
+ | Icon files, desktop and service files are auto-considered part of 'extras' with implicit rules for their destination. | ||
+ | |||
+ | <pre> | ||
+ | <extras> | ||
+ | <file name="foo.sh"> | ||
+ | <destination path="/usr/bin/foo.sh" [mode="auto|0755" ][owner="..."][group="..." ]/> | ||
+ | <destination path="/usr/bin/foo2.sh" /> | ||
+ | </file> | ||
+ | </extras> | ||
+ | </pre> | ||
+ | |||
+ | Mode is optional (set to 0644 if unspecified, unless the file starts #!). Owner and group default to root. <code>install -D</code> lines are auto-added to end of <code>debian/rules:install</code>. | ||
=== Install steps === | === Install steps === | ||
- | |||
# Add extras and extras-devel to /etc/apt/sources.list.d in Scratchbox | # Add extras and extras-devel to /etc/apt/sources.list.d in Scratchbox | ||
# Install mud. | # Install mud. | ||
Line 44: | Line 82: | ||
For example: | For example: | ||
- | |||
/scratchbox/login | /scratchbox/login | ||
for j in '' '-src'; do for i in '' '-devel'; do | for j in '' '-src'; do for i in '' '-devel'; do | ||
Line 54: | Line 91: | ||
GPG_KEY=FC11178D | GPG_KEY=FC11178D | ||
EOM | EOM | ||
+ | |||
+ | === Extras package === | ||
+ | mud should be in Extras, and needs dependencies on: | ||
+ | * xsltproc | ||
+ | * devscripts | ||
+ | * gnupg | ||
+ | * sharutils | ||
+ | |||
+ | Suggests: | ||
+ | * imagemagick | ||
+ | |||
+ | == Notes == | ||
+ | |||
+ | <references /> |
Latest revision as of 08:56, 1 November 2011
With the new extras process, mud-builder should be re-focused[1] and re-invigorated to help packaging in accordance with the Maemo Packaging Policy[2] and Uploading to Extras-devel.
Contents |
[edit] Requirements
- Taking an upstream project (from somewhere) and applying zero or more patches for Maemo.
- Automate creation of projects.
- Take URL of upstream source deb info page (fish out .dsc, .diff.gz and .tar.gz).
- Take URL of upstream tarball
done
- Provide easy in-life management, e.g. changelogs and maintaining the patch.
- Proper debification and Maemo additions (like
Section: user/
and the icon)done - Conformant with the Maemo Packaging Policy:
- Any package patched, or not from a existing deb source, needs to have a maemo version suffix.
- For example, if the base version is 7.0, the package version from mud should be 7.0-0maemo1 for the first upload, 7.0-0maemo2 for the second, etc.
- If the upstream package comes from Debian (with version 3.5-7) and is unpatched, the package uploaded from mud is also 3.5-7.
- If the upstream package comes from Debian (with version 3.5-7) and is patched, the package uploaded from mud is 3.5-7maemo1 for the first upload, 3.5-7maemo2 for the second, etc.
- Warnings should be given when uploading a package with "Section: user/(.*)" where
$1
is not in the accepted list. - It is an error to try and upload a package with no description.
- Any package patched, or not from a existing deb source, needs to have a maemo version suffix.
- Auto-sign & upload to ...-extras-builder in one-step
- Use scp to upload all the files, uploading .changes and .dsc last, to avoid auto-builder issues (driven by .dsc files and #3354)
- Auto-determine Build-Depends
r234
[edit] Examples
Create new packages within mud's packages/
directory. They can then be manipulated, built, edited and uploaded:
mud create http://packages.debian.org/source/lenny/cal mud create http://packages.ubuntu.com/source/hardy/libgee mud create http://download.gnome.org/sources/vala/0.3/vala-0.3.4.tar.bz2 mud create new-package
Take a package (for example, from the upstream deb source - in the above case - Ubuntu Hardy), build it; sign it and upload it to diablo-extras-builder:
mud build libgee mud upload libgee
Typical workflow for getting a package, unpacking the source, editing it, checking the result and then cleaning out the working copy:
mud get vala mud compile vala ... mud diff vala ... mud compile vala mud clean vala
[edit] Workflow
Use quilt[3]?
TBC
[edit] Internals
[edit] Package structure
Instead of having package.xml
, patches/package.patch
and icon/package
, v2.0 of mud should have more consolidation:
package.pkg/ mud.xml - required package.png - optional icon, used if -nn not present package-26.png - optional, if present copied to right place package-64.png - optional, if present copied to right place package.desktop - if present, auto-copied to right place package.service - if present, auto-copied to right place extras.xml- optional specification of file destinations, modes, owners, groups etc. extras/ - copied to build-dir/mud-extras ... patches/ - contains quilt patch set ... ...
Icon files, desktop and service files are auto-considered part of 'extras' with implicit rules for their destination.
<extras> <file name="foo.sh"> <destination path="/usr/bin/foo.sh" [mode="auto|0755" ][owner="..."][group="..." ]/> <destination path="/usr/bin/foo2.sh" /> </file> </extras>
Mode is optional (set to 0644 if unspecified, unless the file starts #!). Owner and group default to root. install -D
lines are auto-added to end of debian/rules:install
.
[edit] Install steps
- Add extras and extras-devel to /etc/apt/sources.list.d in Scratchbox
- Install mud.
- Create
~/.mudrc
containing garage username and gnupg key to use
For example:
/scratchbox/login for j in '-src'; do for i in '-devel'; do echo "deb$j http://repository.maemo.org/extras$i diablo free non-free" >>/etc/apt/sources.list.d/extras-repo.list done; done apt-get update && apt-get install mud cat >~/.mudrc <<EOM USERNAME=jaffa GPG_KEY=FC11178D EOM
[edit] Extras package
mud should be in Extras, and needs dependencies on:
- xsltproc
- devscripts
- gnupg
- sharutils
Suggests:
- imagemagick
[edit] Notes
- ↑ MUD Direction?, Andrew Flegg, 26 June 2008
- ↑ Maemo Packaging Policy, Eero Tamminen, 28 May 2008
- ↑ [http://www.suse.de/~agruen/quilt.pdf "Introduction to Quilt", Andreas Gr¨unbacher, June 12 2005
- This page was last modified on 1 November 2011, at 08:56.
- This page has been accessed 30,057 times.