~alpine/devel

2 2

[alpine-devel] RFC: Distribution variables for abuild

Details
Message ID
<594F59F5.5000104@adelielinux.org>
Sender timestamp
1498372597
DKIM signature
missing
Download raw message
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

===========================================================
 Proposal for addition of distribution variables to abuild
===========================================================

:Author:
  A. Wilcox (Adélie Linux)
:Date:
  2017-06-25
:Status:
  Request for Comment




Introduction
- ------------

This proposal outlines the addition of environment variables to
``abuild.conf`` for the purposes of identifying the distribution of
built packages.


Background
- ----------

Alpine Linux is a secure, solid foundation for creators and
organisations to build atop for their own forks or spins (derivative
distributions).  Some that exist are postmarketOS and Adélie.


Current Situation
- -----------------

Currently, forks and spins of Alpine are required to choose one of
only two options.  They can either use aports as is, which causes
packages to identify as being built for Alpine and causes most
autoconf-based packages to have their builder and bug report URLs
point to Alpine.  Alternatively, they can fork the Git repository,
requiring the need of manual merges when conflicts arise, and constant
monitoring of new packages to ensure they are branded correctly.


Deficiencies
- ------------

If a fork or spin of Alpine does not have the manpower or resources to
modify all packages that mention the Alpine name / bug URL (about
300-400 at my last count, with many more possible), then both
distributions suffer.  Users of the spin will file bugs with Alpine
that are not bugs in Alpine.  Developers of the spin will not know
about said bugs, and be unable to fix them.  Alpine developers will
have to waste time and resources testing bugs and finding out they are
not even Alpine bugs.

If they choose the alternative of forking the repository and changing
these parameters in the packages, then it makes upstreaming their
improvements much more difficult.


Solution Objectives
- -------------------

* Protect Alpine's name, trademark, and reputation by avoiding the
  appearance that derivative distributions are part of the Alpine
  Linux project.

* Lessen number of inappropriate bugs filed with Alpine due to forks
  and spins.

* Foster better collaboration and sharing of improvements between
  Alpine and its forks/spins.

* Future potential changes to the bug report URL, while unlikely,
  are additionally made easier if there is a move off of Redmine.


Solution Vision
- ---------------

I hereby propose adding the following four variables to abuild.conf,
with the default values in abuild being appropriate for Alpine.

:``${DISTRO_NAME}``:
  The name of the distribution, such as "Alpine Linux" or
  "Adélie Linux".

:``${DISTRO_SHORT_NAME}``:
  A single word describing the distribution, such as "Alpine" or
  "Adelie".

:``${DISTRO_URL}``:
  The home page of the distribution, i.e. "https://alpinelinux.org".

:``${DISTRO_BUG_URL}``:
  The URL to use to report bugs with software on the distribution.
  This would be set to "https://bugs.alpinelinux.org" by default.

By replacing references to 'Alpine Linux' passed to ./configure, make,
etc with ``${DISTRO}``, forks and spins will be able to notate their
name as the distributor on packages.  This will affect packages such
as LibreOffice, OpenRC, X.Org, coreutils, and more, which are all
compiled with the name of the distribution internally. They use this
for bug information, and having the proper distribution name will
allow for more proper bug handling and ensure less inappropriate blame
is assigned to Alpine.  This also ensures that the fork or spin's own
mailing lists, forums, and so on are searched and contacted before
Alpine's.

By replacing references to 'bugs.alpinelinux.org' passed to
./configure with ``${DISTRO_BUG_URL}``, the Alpine project will have a
significant reduction in wasted effort handling inappropriately filed
bugs when the issues are caused by changes by the forks and spins.


Roadmap
- -------

Since the shell environment is flexible, this change can be
implemented almost immediately; the defaults specified ensure that at
worst, nothing will change.  As forks and spins change the environment
variables in their ``abuild.conf`` files, all updated packages will
immediately reflect those changes.

If there is interest, I would be happy to work on the abuild code and
adding the variables in relevant APKBUILDs. There are a few packages
that don't specify bug report URLs where they could; I could
additionally add support there, if desired.

One alternative is sourcing this information from ``/etc/os-release``
instead of ``abuild.conf``, or using os-release when abuild.conf does
not have anything set.


Thank you for your time in reviewing this proposal. If you have any
questions or concerns or changes, I would love to discuss them. I'm
open to any comments the community has.


All the best to you and yours,
- --arw


- -- 
A. Wilcox (awilfox)
Project Lead, Adélie Linux
http://adelielinux.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJZT1nuAAoJEMspy1GSK50U6/QP/Rys7v6C380T/wbyB9zN1jj8
CPBFSs2zmz3jK0KbG0Upd84oMX6lbbLotIK2t9n2P/wWihR9dnNoQAkUU/FGRXSn
9blSBGZxPxWf85638IJe22b4F3qUpnA8wklJa0sReqbQrtA7cPsj7iuyAvibnk1Z
H3XnosWxV2Z7l/0hgHiBCT0AHzd/e2sDYs2RIpMM3MP4GRLTu6WhgP9iNyYMExZE
O+jGWsgba1SUNEu62aIxI6me3zi6JOuUYnw735Ytxj5hxKe/UlcJ0worXaLIynVh
t8Dft2bkpzPEAAxIhi25XhgXQeqGKIby33fWAmW+CA0nTGvOPJpgQLl+2wz3X9c9
qiStYkIy9PtmhiubTVU8FMSJWsTNQ052mjq7f95WA19AkUWNXYRpJLj54G93qX22
c7mptXTYyxPcAoMptpQJJXpYEQGKA7fi1zG8jVBvHXPftqpCh255/q1tLNZOAXVY
KGLYrtmVzQz4+ejrGvS21DK9IjVyMITRCVBI8V35u69ObAmZLr3w2rMc96bhSyM1
rpIwMCLr84r0WPcXsTzLSbKCsT29iSn6d0xs+ZtP6YawvwlvShMAlFJ+C/5tJ8+a
noA4ZQ3oPlvJ7QCGuCWgaMIBKmPexUrnKTinRS+XAXfoiV8pfe6a5N3+gSYz7ez0
NLCd9hwJeDYvcttb2OOo
=bJYX
-----END PGP SIGNATURE-----


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20170630075233.47637483@ncopa-desktop.copa.dup.pw>
In-Reply-To
<594F59F5.5000104@adelielinux.org> (view parent)
Sender timestamp
1498801953
DKIM signature
missing
Download raw message
Patch: +6 -6
On Sun, 25 Jun 2017 01:36:37 -0500
"A. Wilcox" <awilfox@adelielinux.org> wrote:

...

> I hereby propose adding the following four variables to abuild.conf,
> with the default values in abuild being appropriate for Alpine.
> 
> :``${DISTRO_NAME}``:
>   The name of the distribution, such as "Alpine Linux" or
>   "Adélie Linux".
> 
> :``${DISTRO_SHORT_NAME}``:
>   A single word describing the distribution, such as "Alpine" or
>   "Adelie".
> 
> :``${DISTRO_URL}``:
>   The home page of the distribution, i.e. "https://alpinelinux.org".
> 
> :``${DISTRO_BUG_URL}``:
>   The URL to use to report bugs with software on the distribution.
>   This would be set to "https://bugs.alpinelinux.org" by default.

I think this is a good idea. It is trivial to implement and does not
cause any maintenance burden.

...

> Roadmap
> - -------
> 
> Since the shell environment is flexible, this change can be
> implemented almost immediately; the defaults specified ensure that at
> worst, nothing will change.  As forks and spins change the environment
> variables in their ``abuild.conf`` files, all updated packages will
> immediately reflect those changes.

How much code is needed in abuild? I think we could start with the APKBUILDs:

	${DISTRO_URL:-https://alpinelinux.org}

That way you can override the default and we are still backwards
compatible. No code changes in abuild required to get started.

This makes it also possible backport security and bug fixes to stable
branches if needed.

> If there is interest, I would be happy to work on the abuild code and
> adding the variables in relevant APKBUILDs. There are a few packages
> that don't specify bug report URLs where they could; I could
> additionally add support there, if desired.

Yes. This would be great!

> One alternative is sourcing this information from ``/etc/os-release``
> instead of ``abuild.conf``, or using os-release when abuild.conf does
> not have anything set.

Nah, I like your proposal better.
  
> Thank you for your time in reviewing this proposal. If you have any
> questions or concerns or changes, I would love to discuss them. I'm
> open to any comments the community has.

Are you ok with using the style ${DISTRO_NAME:-Alpine Linux} in the
APKBUILDs?

Something like:
diff --git a/main/alpine-base/APKBUILD b/main/alpine-base/APKBUILD
index e5cfeba83f..58980b5273 100644
--- a/main/alpine-base/APKBUILD
+++ b/main/alpine-base/APKBUILD
@@ -26,7 +26,7 @@ package() {

       # create /etc/issue
       cat >"$pkgdir"/etc/issue<<EOF
Welcome to Alpine Linux ${pkgver%.*}
Welcome to ${DISTRO_NAME:-Alpine Linux} ${pkgver%.*}
Kernel \\r on an \\m (\\l)

EOF
@@ -34,11 +34,11 @@ EOF
       _ver="$(echo "$pkgver" | grep -E -o '^[0-9]+\.[0-9]+')"
       # create os-release
       cat >"$pkgdir"/etc/os-release<<EOF
NAME="Alpine Linux"
ID=alpine
NAME="${DISTRO_NAME:-Alpine Linux}"
ID=${DISTRO_SHORT_NAME:-alpine}
VERSION_ID=$pkgver
PRETTY_NAME="Alpine Linux v$_ver"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
PRETTY_NAME="${DISTRO_NAME:-Alpine Linux} v$_ver"
HOME_URL="${DISTRO_URL:-https://alpinelinux.org}"
BUG_REPORT_URL="${DISTRO_BUG_URL:-https://bugs.alpinelinux.org}"
EOF
}


Thanks for working on this.

nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<5956A6E7.10101@adelielinux.org>
In-Reply-To
<20170630075233.47637483@ncopa-desktop.copa.dup.pw> (view parent)
Sender timestamp
1498851047
DKIM signature
missing
Download raw message
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 30/06/17 00:52, Natanael Copa wrote:
> On Sun, 25 Jun 2017 01:36:37 -0500 "A. Wilcox"
> <awilfox@adelielinux.org> wrote:
>> Roadmap
>> 
> How much code is needed in abuild? I think we could start with the
> APKBUILDs:
> 
> ${DISTRO_URL:-https://alpinelinux.org}
> 
> That way you can override the default and we are still backwards 
> compatible. No code changes in abuild required to get started.
> 
> This makes it also possible backport security and bug fixes to
> stable branches if needed.


That is a good thought, it is fine I think.  It does erase one good
feature in that if bug URL changes, all the APKBUILDs still have to be
updated.  But probably would be doable with a single `sed` command, so
that should still be okay.


>> If there is interest, I would be happy to work on the abuild code
>> and adding the variables in relevant APKBUILDs. There are a few
>> packages that don't specify bug report URLs where they could; I
>> could additionally add support there, if desired.
> 
> Yes. This would be great!


Great, I will start work on this.


>> Thank you for your time in reviewing this proposal. If you have
>> any questions or concerns or changes, I would love to discuss
>> them. I'm open to any comments the community has.
> 
> Are you ok with using the style ${DISTRO_NAME:-Alpine Linux} in
> the APKBUILDs?


Yes, this is fine.


> Something like: [diff showing good implementation of proposal]
> 
> Thanks for working on this.
> 
> -nc
> 


Always glad to contribute to a worthy cause :)


Best,
- --arw


- -- 
A. Wilcox (awilfox)
Project Lead, Adélie Linux
http://adelielinux.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJZVqbiAAoJEMspy1GSK50U34oQAK5prKfN8o4FlJ63UU74LXyp
JMx5nwdyAnuikXMcRCRgIbbRN4YrNI5+okxKo/sP+EPiQzt1JIQqafXGscyacRhQ
+CaTXpuOKih5Akc6WDrW1/qbQpJcpoXCWmQw0iCG11xE180/+Grnqo2MXZhRUINP
62kSn9+9iRJEJcOR642U9nxmNkXzOoE1Iak85+XeB4p5sdwxi4JNp3Npcg1p4vB9
PJWy3iJqHgw33Jpf1guvvslzHlRA5YnM6JNHk+bN+oWVYzN0oopf2h1mYynUAoZr
JyzvzV/5sdM7/tiYZWI6vM0eEOHYzKOzwPKVAaInpyzugEn9Jl86bx5aaIb9LIxk
EeYvhNa6ObIz4jWTPmN4hvUQPxA9CCbzrgQdOwSlpbf+jgeTWztW2l2NlgJ7/nky
5Q884dzMotceCO0z6EmaBlsF3f0YXwJYbeaeNk0Wb1FDKxXe5Gl/YbO4yXYIwjWh
OoGfFlbmvvYDM97dEaP9c1DMPkwqJHicQIlhv/8vQQGwzoy68LQ+Z7qbIo7riHBr
X7RU8XC2GOGOVVIX6xRhaigq55zV1+uOGsHQRPotg/Rqt/pIQKxuJABYKkfVbkDG
YkYDdwDGZVFI9XuDeSLlooxCN9Rpb+kp7hhnJx7R6DggJj3SrX4vznSd7Bq9uGeJ
dhaCTuAmwXkMulZehS8A
=Bezi
-----END PGP SIGNATURE-----


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