~alpine/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 2

[alpine-devel] [PATCH] abuild: check for man pages in non-standard locations

Details
Message ID
<1439928059-5204-1-git-send-email-soeren+git@soeren-tempel.net>
Sender timestamp
1439928059
DKIM signature
missing
Download raw message
Patch: +11 -4
Some packages like fakeroot install man pages to
/usr/share/man/{de,fr,pl,...}. In my opinion we don't need those man
pages and thus I would suggest that only /usr/share/man[0-8] should
exist.

This also allows us to simply our check for non-compressed man pages.
---
 abuild.in | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/abuild.in b/abuild.in
index 6d393c8..da83ca1 100644
--- a/abuild.in
+++ b/abuild.in
@@ -655,13 +655,20 @@ postcheck() {
		if ! is_doc_pkg "$name"; then
			warning "Found /usr/share/man but package name doesn't end with -doc"
		fi
		# check for uncompressed man pages
		i=$(find "$dir"/usr/share/man -name '*.[0-9]' -type f | sed "s|^$dir|\t|")
		# check for man pages in non-standard locations
		i=$(find "$dir"/usr/share/man -maxdepth 1 \! \( -name man[0-8] -a -type d \) -a \! -path "$dir"/usr/share/man | sed "s|^$dir|\t|")
		if [ -n "$i" ]; then
			error "Found uncompressed man pages:"
			echo "$i"
			error "Found non-standard man page sections:"
			echo $i
			return 1
		fi
		# check for uncompressed man pages
		for i in "$dir"/usr/share/man/man[0-8]/*.[0-8]; do
			if [ -e "$i" ]; then
				error "Found uncompressed man pages: ${i#$dir/}"
				return 1
			fi
		done
	fi
	# check directory permissions
	i=$(find "$dir" -type d -perm -777 | sed "s|^$dir|\t|")
-- 
2.5.0



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Isaac Dunham <ibid.ag@gmail.com>
Details
Message ID
<20150818231729.GA1900@newbook>
In-Reply-To
<1439928059-5204-1-git-send-email-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1439939851
DKIM signature
missing
Download raw message
On Tue, Aug 18, 2015 at 10:00:59PM +0200, Sören Tempel wrote:
> Some packages like fakeroot install man pages to
> /usr/share/man/{de,fr,pl,...}. In my opinion we don't need those man
> pages and thus I would suggest that only /usr/share/man[0-8] should
> exist.

These are not non-standard locations.
They are the standard locations for non-english languages.

/usr/share/man/man[0-8] is the standard location for english manpages
(not /usr/share/man[0-8] as you say in the commit message), but your patch
gets that right.

FYI, this patch does not fix one standing issue with compressing manpages:
symlinks to manpages are not fixed to point to the compressed one.

Thanks,
Isaac Dunham


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20150819081953.190ad948@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1439928059-5204-1-git-send-email-soeren+git@soeren-tempel.net> (view parent)
Sender timestamp
1439965193
DKIM signature
missing
Download raw message
On Tue, 18 Aug 2015 22:00:59 +0200
Sören Tempel <soeren+git@soeren-tempel.net> wrote:

> Some packages like fakeroot install man pages to
> /usr/share/man/{de,fr,pl,...}. In my opinion we don't need those man
> pages and thus I would suggest that only /usr/share/man[0-8] should
> exist.

I don't mind those localized pages. We may not support it but I don't
want forbid it either.

> This also allows us to simply our check for non-compressed man pages.

The check is still flawed, there are still things like *.[0-9]pm and
*.[0.9]p. And as Isaac mentioned, we need to deal with symlinks too.

I wonder if we should look for an external tool to help us do the
compression.


> ---
>  abuild.in | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/abuild.in b/abuild.in
> index 6d393c8..da83ca1 100644
> --- a/abuild.in
> +++ b/abuild.in
> @@ -655,13 +655,20 @@ postcheck() {
>  		if ! is_doc_pkg "$name"; then
>  			warning "Found /usr/share/man but package name doesn't end with -doc"
>  		fi
> -		# check for uncompressed man pages
> -		i=$(find "$dir"/usr/share/man -name '*.[0-9]' -type f | sed "s|^$dir|\t|")
> +		# check for man pages in non-standard locations
> +		i=$(find "$dir"/usr/share/man -maxdepth 1 \! \( -name man[0-8] -a -type d \) -a \! -path "$dir"/usr/share/man | sed "s|^$dir|\t|")
>  		if [ -n "$i" ]; then
> -			error "Found uncompressed man pages:"
> -			echo "$i"
> +			error "Found non-standard man page sections:"
> +			echo $i

I don't think we should error on
>  			return 1
>  		fi
> +		# check for uncompressed man pages
> +		for i in "$dir"/usr/share/man/man[0-8]/*.[0-8]; do
> +			if [ -e "$i" ]; then
> +				error "Found uncompressed man pages: ${i#$dir/}"
> +				return 1
> +			fi
> +		done
>  	fi
>  	# check directory permissions
>  	i=$(find "$dir" -type d -perm -777 | sed "s|^$dir|\t|")



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20150819110626.6875a599@ncopa-desktop.alpinelinux.org>
In-Reply-To
<20150818231729.GA1900@newbook> (view parent)
Sender timestamp
1439975186
DKIM signature
missing
Download raw message
On Tue, 18 Aug 2015 16:17:31 -0700
Isaac Dunham <ibid.ag@gmail.com> wrote:

> On Tue, Aug 18, 2015 at 10:00:59PM +0200, Sören Tempel wrote:
> > Some packages like fakeroot install man pages to
> > /usr/share/man/{de,fr,pl,...}. In my opinion we don't need those man
> > pages and thus I would suggest that only /usr/share/man[0-8] should
> > exist.
> 
> These are not non-standard locations.
> They are the standard locations for non-english languages.
> 
> /usr/share/man/man[0-8] is the standard location for english manpages
> (not /usr/share/man[0-8] as you say in the commit message), but your patch
> gets that right.
> 
> FYI, this patch does not fix one standing issue with compressing manpages:
> symlinks to manpages are not fixed to point to the compressed one.


I have pushed a fix for symlinks and hardlinks and man pages found in
other sections and localized man pages.

http://git.alpinelinux.org/cgit/abuild/commit/?id=fe2332d186cad4edc0a1b721ce657015a60c00f5

dosfstools-doc has symlinks
tcl-doc has hardlinks

It would be nice if someone could help me test it from abuild git.
There are some other improvements I'd like relatively soon so I'd like
tag a new abuild release.

Thanks!

-nc



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