On Mon, Feb 28, 2022 at 04:14:25PM +0100, Christian Weisgerber wrote:
> Drop all checks for $OpenBSD$ keywords from portcheck(1).
> 
> Or should we instead complain if files do have $OpenBSD$?

I think it's better if we have a policy, so complaining might be better.

> Index: infrastructure/bin/portcheck
> ===================================================================
> RCS file: /cvs/ports/infrastructure/bin/portcheck,v
> retrieving revision 1.140
> diff -u -p -r1.140 portcheck
> --- infrastructure/bin/portcheck      6 Nov 2021 19:10:18 -0000       1.140
> +++ infrastructure/bin/portcheck      28 Feb 2022 15:08:44 -0000
> @@ -1563,7 +1563,6 @@ check_files_dir() {
>  
>  # Checks made:
>  #   * The patch is not empty.
> -#   * The patch contains an OpenBSD RCS tag.
>  check_patch() {
>       local F=$1
>  
> @@ -1572,18 +1571,12 @@ check_patch() {
>               return
>       }
>  
> -     if [ -s "$F" ]; then
> -             head -n 1 -- "$F" | egrep -q '^\$OpenBSD.*\$$' ||
> -                 err "$F does not have \$OpenBSD\$ RCS tag at the top"
> -     else
> -             err "$F is empty and should be removed"
> -     fi
> +     [[ -s $F ]] || err "$F is empty and should be removed"
>  
>       check_dos_line_endings "$F"
>  }
>  
>  # Checks made:
> -#   * Each patch contains OpenBSD RCS tag.
>  #   * Directory is not empty and consists only of plain files starting
>  #     with 'patch-' and not ending with '.orig'.
>  check_patches_dir() {
> @@ -1614,8 +1607,6 @@ check_patches_dir() {
>  
>  # Checks made:
>  #   * Directory is not empty and consist only of plain files with fixed 
> names.
> -#   * PFRAG, PLIST, README and .rc files contain appropriate OpenBSD RCS
> -#     tags; other files should NOT contain OpenBSD RCS tag.
>  #   * PFRAG.shared should be merged into PLIST.
>  #   * No trailing whitespace for DESCR, MESSAGE, README, UNMESSAGE and
>  #     .rc files (PLIST and PFRAG are better checked with "make package").
> @@ -1647,8 +1638,6 @@ check_pkg_dir() {
>               check_long_lines "$F"
>               check_hardcoded "$F"
>               [[ -n $subst_cmd ]] && check_subst_vars "$F" "$subst_cmd"
> -             egrep -q '\$OpenBSD.*\$' "$F" &&
> -                     err "$F should not contain \$OpenBSD\$ tag"
>               ;;
>  
>       PFRAG.shared?(-*))
> @@ -1673,9 +1662,6 @@ check_pkg_dir() {
>               check_newline_at_eof "$F"
>               check_long_lines "$F"
>               check_hardcoded "$F"
> -             head -n 1 -- "$F" |
> -                     egrep -q '^(#[[:space:]]*)?\$OpenBSD(:.*)?\$$' ||
> -                     err "$F does not have \$OpenBSD\$ RCS tag at the top"
>               ;;
>  
>       *.rc)
> @@ -1687,9 +1673,6 @@ check_pkg_dir() {
>               check_long_lines "$F"
>               check_hardcoded "$F"
>               check_rcscript "$dir" "${F##*/}"
> -             head -n 5 -- "$F" |
> -                     egrep -q '^#[[:space:]]*\$OpenBSD(:.*)?\$$' ||
> -                     err "$F does not have \$OpenBSD\$ RCS tag at the top"
>               ;;
>  
>       MESSAGE?(-*)|UNMESSAGE?(-*))
> @@ -1700,8 +1683,6 @@ check_pkg_dir() {
>               check_newline_at_eof "$F"
>               check_long_lines "$F"
>               check_hardcoded "$F"
> -             egrep -q '\$OpenBSD.*\$' "$F" &&
> -                     err "$F should not contain \$OpenBSD\$ tag"
>               ;;
>  
>       *)
> @@ -1755,7 +1736,6 @@ check_long_lines() {
>  }
>  
>  # Checks made:
> -#   * There is an OpenBSD RCS tag at the top.
>  #   * No items with ${FULLPKGNAME} are allowed, except readme.
>  #   * No empty lines.
>  check_plist_file() {
> @@ -1763,9 +1743,6 @@ check_plist_file() {
>  
>       [[ -f $1 ]] ||
>               err "$1 is not a file"
> -     head -n 1 -- "$1" |
> -             egrep -q '^@comment \$OpenBSD.*\$$' ||
> -             err "$1 does not have \$OpenBSD\$ RCS tag at the top"
>  
>       # Do not match just '${FULLPKGNAME}' because many ports use the
>       # following trick:
> @@ -1793,7 +1770,6 @@ check_subst_vars() {
>  }
>  
>  # Checks made:
> -#   * Contains OpenBSD RCS tag at the top line.
>  #   * No REVISION marks present in given file (unless in update mode).
>  #   * Each REVISION mark presents only once.
>  #   * BUILD_DEPENDS, MODULES and PERMIT_DISTFILES are not defined in
> @@ -1811,9 +1787,6 @@ check_makefile() {
>       check_trailing_whitespace "$F"
>       check_long_lines "$F"
>       check_hardcoded "$F"
> -     head -n 1 -- "$F" |
> -             egrep -q '^#[[:space:]]*\$OpenBSD.*\$' ||
> -             err "$F does not have \$OpenBSD\$ RCS tag at the top"
>  
>       local iflevel=0 l lnum=0 revs= t r mkvars= var duprevfound
>       # do not unset mkvars, having empty element(-s) is fine
> -- 
> Christian "naddy" Weisgerber                          na...@mips.inka.de
> 
> 

Reply via email to