Sandbox: Difference between revisions

From Alpine Linux
m (added test case for potentially bad behavior in the pkg template.)
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is a test area.
This is a test of an upgraded version of the [[Template:pkg]]. It should preserve all old behavior *EXCEPT* it will print an error if positional parameter 1 is unset or empty.<br>


{{#ifeq:one|one|yes|no}}
The following 2 should produce the exact same URL:<br>
Old template parameter 1 only: {{Template:Sandbox|apk-tools}}<br>
New template parameter 1 only: {{Template:Sandbox|apk-tools}}<br>
<br>
The following should produce the exact same URLs:<br>
Positional parameter 1 + repo parameter: {{Template:Sandbox|apk-tools|repo=main}}<br>
Many parameters set: {{Template:Sandbox|apk-tools|repo=main|branch=edge|arch=x86_64}}<br><br>


{{Warning|Alpine Linux 3.x is using a different libc implementation compared to previous versions. Musl libc is not ABI compatible with uClibc. Additional steps are required for an upgrade.}}
Nonsense handling:<br>
No arguments passed whatsoever (new template should handle gracefully)<br>
Old template: {{pkg}} New template: {{Template:Sandbox}}<br><br>


== Installing statically linked tools ==
Empty positional argument passed:<br>
Old template: {{pkg|}} New template: {{Template:Sandbox|}}<br><br>


Statically linked versions of busybox and apk are needed, otherwise they will stop working after libc upgrade.
Extra positional arguments passed (shouldn't make any difference)<br>
Old template: {{pkg|apk-tools|foo|bar|bat|baz}} New template: {{Template:Sandbox|apk-tools|foo|bar|bat|baz}}


{{Cmd|apk add busybox-static apk-tools-static}}
Extra positional arguments and extra named arguments (shouldn't make any difference)<br>
Old template: {{pkg|apk-tools|foo|repo=main|bacon=delicious}} New template: {{Template:Sandbox|apk-tools|foo|repo=main|bacon=delicious}}<br><br>


== Changing repositories to v3.x ==
empty branch parameter<br>
old template: {{pkg|apk-tools|branch=|arch=}}<br>
new template: {{Template:Sandbox|apk-tools|branch=|arch=}}<br><br>


To begin, you need to update your {{Path|/etc/apk/repositories}} file. Here are some shortcuts for doing so:
New behavior:
:* Launch {{Cmd|setup-apkrepos}} Enter {{Key|e}} to edit {{Path|/etc/apk/repositories}}. Change the version number by hand.
Link to apk-tools for every arch, but only for maintainer "Natanael Copa":<br>
:* Or, edit the file in place. This is how you'd change <var>v2.7</var> to <var>v3.0</var>: {{Cmd|sed -i -e 's/<var>v2\.7</var>/<var>v3.0</var>/g' /etc/apk/repositories}}
{{Template:Sandbox|apk-tools|arch=|maintainer=Natanael Copa}}<br><br>


== Upgrading system ==
Link to all pipewire packages from maintainer "team/alpine-desktop"<br>
{{Template:Sandbox|pipewire*|arch=|maintainer=team/alpine-desktop}}<br><br>


Use statically linked version of apk to update content of repository:
Link to all linux-edge packages from maintainer "Milan P. Stanić"<br>
{{Template:Sandbox|linux-edge|arch=|maintainer=Milan P. Stanić}}<br><br>


{{Cmd|apk.static update}}
Link to all i686 ALSA packages on 3.19 (this is the hardest test on the page because mediawiki is very prone to breaking template parameters that start with a star!):<br>
 
{{Template:Sandbox|*alsa*|branch=v3.19|arch=x86}}
Simulating upgrade is recommended in order to detect issues beforehand:
 
{{Cmd|apk.static upgrade --no-self-upgrade --simulate}}
 
With no problems encountered or after resolving them, start proper upgrade:
 
{{Cmd|apk.static upgrade --no-self-upgrade}}
 
== Main Page Proposal ==
 
'''Welcome to the [http://alpinelinux.org/about Alpine Linux] Wiki'''
 
'''Alpine Linux''' is a security-oriented, lightweight Linux distribution based on '''[https://musl.libc.org/ musl libc]''' and '''[http://busybox.net Busybox]'''.
 
Here is a '''[[Alpine Linux:Overview|more detailed overview]]''' of what makes our distribution distinctive; and a '''[[comparison with other distros]]'''.
 
== Documentation ==
 
{|style="margin:auto; text-align:center; width: 80%; border-spacing: 5px 1rem;"
|- style="color:white; background-color:#0D597F;"
| style="width: 50%;" | '''<big>INSTALLATION</big>''' || '''<big>FAQ</big>'''
|-
| Start here to learn about '''[[Installation|installing Alpine Linux]]''' || Read the '''[[Alpine Linux:FAQ|Frequently Asked Questions]]'''
|- style="color:white; background-color:#0D597F;"
| <big>'''TUTORIALS'''</big> || <big>'''GLOSSARY'''</big>
|-
| A collection of '''[[Tutorials and Howtos|Tutorials and Howto articles]]''' that cover basic and advanced configuration || An extensive '''[[Alpine Linux:Glossary|list of terms and Alpine Linux features]]''' for reference
|- style="color:white; background-color:#0D597F;"
| '''<big>DEVELOPERS</big>''' || '''<big>CONTRIBUTE</big>'''
|-
| Alpine Linux '''[[Developer Documentation]]''' || Learn about how you can '''[[Contribute|Contribute to Alpine Linux]]'''
|- style="color:white; background-color:#0D597F;"
| '''<big>RELEASES</big>''' || '''<big>PRIVACY POLICY</big>'''
|-
|  Links to our '''[[Alpine Linux:Releases|Current and Previous Releases]]''' || Read our '''[[Alpine Linux:Privacy policy|Privacy Policy]]'''
|- style="color:white; background-color:#0D597F;"
| '''<big>MORE</big>'''
|-
| '''[[Alpine Linux:Listings|Links to other sites]]''' with information about Alpine
|}

Latest revision as of 18:12, 28 May 2024

This is a test of an upgraded version of the Template:pkg. It should preserve all old behavior *EXCEPT* it will print an error if positional parameter 1 is unset or empty.

The following 2 should produce the exact same URL:
Old template parameter 1 only: apk-tools
New template parameter 1 only: apk-tools

The following should produce the exact same URLs:
Positional parameter 1 + repo parameter: apk-tools
Many parameters set: apk-tools

Nonsense handling:
No arguments passed whatsoever (new template should handle gracefully)
Old template: First parameter cannot be undefined or empty in template: Template:Pkg New template: First parameter cannot be undefined or empty in template: Template:Pkg

Empty positional argument passed:
Old template: First parameter cannot be undefined or empty in template: Template:Pkg New template: First parameter cannot be undefined or empty in template: Template:Pkg

Extra positional arguments passed (shouldn't make any difference)
Old template: apk-tools New template: apk-tools

Extra positional arguments and extra named arguments (shouldn't make any difference)
Old template: apk-tools New template: apk-tools

empty branch parameter
old template: apk-tools
new template: apk-tools

New behavior: Link to apk-tools for every arch, but only for maintainer "Natanael Copa":
apk-tools

Link to all pipewire packages from maintainer "team/alpine-desktop"
pipewire*

Link to all linux-edge packages from maintainer "Milan P. Stanić"
linux-edge

Link to all i686 ALSA packages on 3.19 (this is the hardest test on the page because mediawiki is very prone to breaking template parameters that start with a star!):
*alsa*