Bug 42294 - run on svn checkin - don't check generated files for copyright
run on svn checkin - don't check generated files for copyright
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: ucslint
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.4-4-errata
Assigned To: Philipp Hahn
Florian Best
:
Depends on: 49520
Blocks: 51546
  Show dependency treegraph
 
Reported: 2016-09-06 17:22 CEST by Philipp Hahn
Modified: 2020-06-24 12:52 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2016-09-06 17:22:11 CEST
E:0010-2: tests/clib: file contains no copyright text block
E:0010-2: compile: file contains no copyright text block
 Those are *compiled* binaries

$ readlink /var/build/temp/tmp.VPPaDfNmIS/univention-config-registry-12.0.0/compile 
/usr/share/automake-1.14/compile

Similar to other generated files.


ucslint should better run automatically on svn checkin, before the version is patched:
 W:0007-2: debian/changelog: latest changelog entry does not contain bug/ticket/issue number

Then we could just drop all those manual calls to ucslint from debian/rules and debian/control.
Comment 1 Philipp Hahn univentionstaff 2020-04-15 07:31:00 CEST
<https://git.knut.univention.de/univention/ucs/-/tree/phahn/gitlab> does this: It first builds a Docker images from packaging/ucslint/ and then uses it to check all modified packages.

Currently ucslint can only run *after* the code has been commited to a branch. Then it is too late to reject the code if ucslint fails.
To use ucslint as a gate-keeper we would need to switch to a "commit only to feature branches"-model and allow merges on the release branch using "Pull requests". This is relatively easy with <https://docs.gitlab.com/ee/user/project/push_options.html>, where you can push your FB and automatically get it merged into an RB if the pipeline (running ucslint) succeeds:
  $ git config --get push.default
  current
  $ git push \
    -o merge_request.create \
    -o merge_request.merge_when_pipeline_succeeds \
    -o merge_request.target=4.4-4 \
    origin
Comment 2 Philipp Hahn univentionstaff 2020-05-21 14:52:19 CEST
Fixes as part of
commit 201203e4241d94e359d91633881254ecd4182ed7 (HEAD -> 4.4-4)
Merge: b5c78bf91a fa6215000c
Author: Philipp Hahn <hahn@univention.de>
Date:   Wed May 20 17:19:41 2020 +0200

    Bug #49704: Merge branch 'phahn/ucslint' into 4.4-4
    
    Bug #42294      run on svn checkin - don't check generated files for copyright
    Bug #51248      Check debian/compat
    Bug #51247      Minimal debian/*.dirs
    Bug #51246      Check for unassigned debian/$pkg.$dh files
    Bug #51107      Check UCR template for valid Python2/3 syntax
    Bug #51105      Check for invalid Python string escape
    Bug #49704      Migrate ucslint to Python3
    Bug #49683      py3: Check debian/*.ucr files for ConfigParser(strict=true)
    Bug #49620      check for monotonic timestamp in debian/changelog
    Bug #48747      ucslint doesn't warn/error about joinscript-api-bindpwdfile in unjoin scripts
    Bug #43981      Add check for wrong comparision in postinst

[4.4-4] fa6215000c Bug #42294: Invoke ucslint from GitLab-CI
[4.4-4] 7c26cced9e Bug #42294: debian/control ucslint
[4.4-4] f749577efc Bug #42294 ucslint: Run from CI pipeline
[4.4-4] a668865b19 Bug #43981 ucslint: Check Debian maintainer script actions
[4.4-4] 1f5c5b5a09 Bug #49704 ucslint: Convert 0017 to UPCFileTeste
[4.4-4] 1ad5c9bf56 Bug #49704 ucslint: Convert 0002 to UPCFileTeste
[4.4-4] 1f995151c7 Bug #48747 ucslint: Check .uinst files
[4.4-4] b6685dee8a Bug #48747 ucslint: Add filename and line number
[4.4-4] 826f9cc9c3 Bug #49620 USS: Make debian/changelog monotone
[4.4-4] 7853e7e0b7 Bug #49620 ssl: Make debian/changelog monotone
[4.4-4] 7d459daf6f Bug #49620 ucslint: Check debian/changelog is strict-monotonical
[4.4-4] 348d00439e Bug #49683 ucslint: Allow UCRWARNING_ASCII= UCR header
[4.4-4] 296c8949c5 Bug #49688 diary: Remove duplicate UCRV
[4.4-4] 16d7176b52 Bug #49665 samba: Remove duplicate UCRV
[4.4-4] adae84d0be Bug #49689 mail: Remove duplicate UCRV
[4.4-4] 18ba8ddaee Bug #49683 ucslint: Use ConfigParser
[4.4-4] eac6b51cc0 Bug #49683 ucslint: Duplicate check debian/*.ucr
[4.4-4] 5d559b8d0d Bug #49683 ucslint: Incremental syntax check debian/*.ucr
[4.4-4] 75d4831a3c Bug #49683 ucslint: Check debian/*.ucr syntax
[4.4-4] aa72725106 Bug #49683 ucslint: Fix regular expressions
[4.4-4] 6399d11505 Bug #51107 ucslint: Extend testsuite for 0020
[4.4-4] daad950141 Bug #51107 ucslint: flake8 for conffiles
[4.4-4] f5857ea6ab Bug #51246: Rename debian/* files
[4.4-4] 0c005a03f0 Bug #51246 ucslint: Ignore more DH files
[4.4-4] 303365ddc0 Bug #51247: Cleanup debian/*.dirs
[4.4-4] 99406e1ee5 Bug #51247 ucslint: Check debian/*.dirs
[4.4-4] d7df4bcddd Bug #51248: Sync debian/control with debian/compat
[4.4-4] f86daf058d Bug #51248: wrap-and-sort debian/control
[4.4-4] 81aee7ecc9 Bug #51248 ucslint: Check debian/compat
[4.4-4] 00e37d83c7 Bug #51105 ucslint: Check invalid Python string literals
[4.4-4] 3a9554a235 Bug #51105 ucslint: Extract common code
[4.4-4] d96ce205b7 Bug #49704 ucslint: Remove Python 2 code
[4.4-4] b9efd4a3de Bug #49704 ucslint: Use file context manager
[4.4-4] 48ad9457af Bug #49704 ucslint: Fix unicode handling
[4.4-4] 99014c3177 Bug #49704 ucslint: flake8 cleanup
[4.4-4] c159741c4c Bug #49704 ucslint: flake8 --help
[4.4-4] ff50080c19 Bug #49704 ucslint: Refactor 0018
[4.4-4] db86907de8 Bug #49704 ucslint: Convert message info to tuple
[4.4-4] 0e591aa022 Bug #49704 ucslint: Make error reporting independent from display filter
[4.4-4] bd9eeaa8f9 Bug #49704 ucslint: Add JUnit XML support
[4.4-4] a23cc0c887 Bug #49704 ucslint: Add missing mypy/PyDoc
[4.4-4] 71909f14a6 Bug #49704 ucslint: Fix ucspep8 issues
[4.4-4] 4ac398b60d Bug #49704 ucslint: Move to univention namespace
[4.4-4] 8ce7fd7727 Bug #49704 ucslint: Use optparse.append
[4.4-4] bc14dadf88 Bug #49704 ucslint: Improve --help output
[4.4-4] 7ea7202095 Bug #49704 ucslint: Convert to setup.py
[4.4-4] 46abd8b64a Bug #49704 ucslint: Run test suite
[4.4-4] 2deac0ddbd Bug #49704 ucslint: Convert to Python3
[4.4-4] 5c85c35487 Bug #49704 ucslint: Use EnvironmentError
[4.4-4] 7b9f3ba328 Bug #49704 ucslint: Remove default postinit() method
[4.4-4] 7c631f5fe7 Bug #49704 ucslint: Remove dead code
[4.4-4] 89c6b0fe12 Bug #49704 ucslint: Fix shellcheck issues in tests

[4.4-4] 1bde0a6dee Bug #49704 ucslint: Fix running test suite
 packaging/ucslint/debian/control | 1 +
 1 file changed, 1 insertion(+)

[4.4-4] 5f06175d5f Bug #49704 ucslint: Fix running test suite 2
 packaging/ucslint/debian/control | 1 +
 1 file changed, 1 insertion(+)

[4.4-4] db22237608 Bug #49704 ucslint: Fix merged package install
 packaging/ucslint/debian/ucslint.install | 1 -
 1 file changed, 1 deletion(-)

[4.4-4] 2c4ee05348 Bug #51107 ucslint: Fix testsuite for 0020
 packaging/ucslint/testframework/0020.correct           | 2 +-
 packaging/ucslint/testframework/0020/conffiles/python3 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

[4.4-4] 84d8d9c2cc Bug #51107 ucslint: Fix testsuite for 0020 2
 packaging/ucslint/testframework/0020.correct        |  6 +++++-
 packaging/ucslint/testframework/0020/test.py        |  2 +-
 packaging/ucslint/testframework/0020/test2          |  2 +-
 packaging/ucslint/ucslint-sort-output.py            |  2 +-
 packaging/ucslint/univention/ucslint/0020-flake8.py | 10 +++++++---
 5 files changed, 15 insertions(+), 7 deletions(-)


Package: ucslint
Version: 8.0.0-14A~4.4.0.202005210708
Branch: ucs_4.4-0
Scope: errata4.4-4

[4.4-4] 2bf7de9926 Bug #49704: ucslint 8.0.0-14A~4.4.0.202005210708
 doc/errata/staging/ucslint.yaml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
Comment 3 Philipp Hahn univentionstaff 2020-05-21 14:58:39 CEST
TODO:
- invoke ucslint from repong
- make "msgfmt" fatal for fuzzy translations; maybe use
  find -name \*.po -exec msgattrib --only-fuzzy {} \;

FYI: Our docker package in UCS-4.4-4 is too old and only supports Docker API 1.39, which is now forced through the group variable DOCKER_API_VERSION=1.39 see <https://docs.docker.com/engine/api/>
Comment 4 Philipp Hahn univentionstaff 2020-06-22 12:16:37 CEST
(In reply to Philipp Hahn from comment #3)
> TODO:
> - invoke ucslint from repong
> - make "msgfmt" fatal for fuzzy translations; maybe use
>   find -name \*.po -exec msgattrib --only-fuzzy {} \;

Moved to Bug #51546
The changes to ucslint are all done.
Comment 5 Florian Best univentionstaff 2020-06-22 12:24:25 CEST
OK
Comment 6 Erik Damrose univentionstaff 2020-06-24 12:52:50 CEST
<http://errata.software-univention.de/ucs/4.4/630.html>